Regenerate, restoring full UpCast functionality.
[girtod.git] / gtk2 / gtk2.d
blob656b2605b7b3807360c031edc6d3c95f834ae3a7
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 //
52 // About dialog often contain links and email addresses. #GtkAboutDialog
53 // supports this by offering global hooks, which are called when the user
54 // clicks on a link or email address, see gtk_about_dialog_set_email_hook()
55 // and gtk_about_dialog_set_url_hook(). Email addresses in the
56 // authors, documenters and artists properties are recognized by looking for
57 // <literal>&lt;user@<!-- -->host&gt;</literal>, URLs are
58 // recognized by looking for <literal>http://url</literal>, with
59 // <literal>url</literal> extending to the next space, tab or line break.
60 //
61 // <para id="gtk-about-dialog-hook-setup">
62 // Since 2.18 #GtkAboutDialog provides default website and email hooks that
63 // use gtk_show_uri().
64 // </para>
65 //
66 // If you want provide your own hooks overriding the default ones, it is
67 // important to do so before setting the website and email URL properties,
68 // like this:
69 // <informalexample><programlisting>
70 // gtk_about_dialog_set_url_hook (GTK_ABOUT_DIALOG (dialog), launch_url, NULL, NULL);
71 // gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), app_url);
72 // </programlisting></informalexample>
73 // To disable the default hooks, you can pass %NULL as the hook func. Then,
74 // the #GtkAboutDialog widget will not display the website or the
75 // email addresses as clickable.
76 //
77 // To make constructing a #GtkAboutDialog as convenient as possible, you can
78 // use the function gtk_show_about_dialog() which constructs and shows a dialog
79 // and keeps it around so that it can be shown again.
80 //
81 // Note that GTK+ sets a default title of <literal>_("About &percnt;s")</literal>
82 // on the dialog window (where &percnt;s is replaced by the name of the
83 // application, but in order to ensure proper translation of the title,
84 // applications should set the title property explicitly when constructing
85 // a #GtkAboutDialog, as shown in the following example:
86 // <informalexample><programlisting>
87 // gtk_show_about_dialog (NULL,
88 // "program-name", "ExampleCode",
89 // "logo", example_logo,
90 // "title" _("About ExampleCode"),
91 // NULL);
92 // </programlisting></informalexample>
93 // Note that prior to GTK+ 2.12, the #GtkAboutDialog:program-name property
94 // was called "name". This was changed to avoid the conflict with the
95 // #GtkWidget:name property.
96 struct AboutDialog /* : Dialog */ {
97 mixin Atk.ImplementorIface.__interface__;
98 mixin Buildable.__interface__;
99 alias parent_instance this;
100 alias parent_instance super_;
101 alias parent_instance dialog;
102 Dialog parent_instance;
103 private void* private_data;
106 // VERSION: 2.6
107 // Creates a new #GtkAboutDialog.
108 // RETURNS: a newly created #GtkAboutDialog
109 static AboutDialog* new_()() nothrow {
110 return gtk_about_dialog_new();
112 static auto opCall()() {
113 return gtk_about_dialog_new();
116 // Unintrospectable function: set_email_hook() / gtk_about_dialog_set_email_hook()
117 // VERSION: 2.6
118 // DEPRECATED (v2.24) function: set_email_hook - Use the #GtkAboutDialog::activate-link signal
119 // Installs a global function to be called whenever the user activates an
120 // email link in an about dialog.
122 // Since 2.18 there exists a default function which uses gtk_show_uri(). To
123 // deactivate it, you can pass %NULL for @func.
124 // RETURNS: the previous email hook.
125 // <func>: a function to call when an email link is activated.
126 // <data>: data to pass to @func
127 // <destroy>: #GDestroyNotify for @data
128 static AboutDialogActivateLinkFunc set_email_hook(AT0)(AboutDialogActivateLinkFunc func, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
129 return gtk_about_dialog_set_email_hook(func, UpCast!(void*)(data), destroy);
132 // Unintrospectable function: set_url_hook() / gtk_about_dialog_set_url_hook()
133 // VERSION: 2.6
134 // DEPRECATED (v2.24) function: set_url_hook - Use the #GtkAboutDialog::activate-link signal
135 // Installs a global function to be called whenever the user activates a
136 // URL link in an about dialog.
138 // Since 2.18 there exists a default function which uses gtk_show_uri(). To
139 // deactivate it, you can pass %NULL for @func.
140 // RETURNS: the previous URL hook.
141 // <func>: a function to call when a URL link is activated.
142 // <data>: data to pass to @func
143 // <destroy>: #GDestroyNotify for @data
144 static AboutDialogActivateLinkFunc set_url_hook(AT0)(AboutDialogActivateLinkFunc func, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
145 return gtk_about_dialog_set_url_hook(func, UpCast!(void*)(data), destroy);
148 // VERSION: 2.6
149 // Returns the string which are displayed in the artists tab
150 // of the secondary credits dialog.
152 // %NULL-terminated string array containing the artists. The array is
153 // owned by the about dialog and must not be modified.
154 // RETURNS: A
155 char** get_artists()() nothrow {
156 return gtk_about_dialog_get_artists(&this);
159 // VERSION: 2.6
160 // Returns the string which are displayed in the authors tab
161 // of the secondary credits dialog.
163 // %NULL-terminated string array containing the authors. The array is
164 // owned by the about dialog and must not be modified.
165 // RETURNS: A
166 char** get_authors()() nothrow {
167 return gtk_about_dialog_get_authors(&this);
170 // VERSION: 2.6
171 // Returns the comments string.
173 // dialog and must not be modified.
174 // RETURNS: The comments. The string is owned by the about
175 char* get_comments()() nothrow {
176 return gtk_about_dialog_get_comments(&this);
179 // VERSION: 2.6
180 // Returns the copyright string.
182 // dialog and must not be modified.
183 // RETURNS: The copyright string. The string is owned by the about
184 char* get_copyright()() nothrow {
185 return gtk_about_dialog_get_copyright(&this);
188 // VERSION: 2.6
189 // Returns the string which are displayed in the documenters
190 // tab of the secondary credits dialog.
192 // %NULL-terminated string array containing the documenters. The
193 // array is owned by the about dialog and must not be modified.
194 // RETURNS: A
195 char** get_documenters()() nothrow {
196 return gtk_about_dialog_get_documenters(&this);
199 // VERSION: 2.6
200 // Returns the license information.
202 // dialog and must not be modified.
203 // RETURNS: The license information. The string is owned by the about
204 char* get_license()() nothrow {
205 return gtk_about_dialog_get_license(&this);
208 // VERSION: 2.6
209 // Returns the pixbuf displayed as logo in the about dialog.
211 // pixbuf is owned by the about dialog. If you want to keep a
212 // reference to it, you have to call g_object_ref() on it.
213 // RETURNS: the pixbuf displayed as logo. The
214 GdkPixbuf2.Pixbuf* get_logo()() nothrow {
215 return gtk_about_dialog_get_logo(&this);
218 // VERSION: 2.6
219 // Returns the icon name displayed as logo in the about dialog.
221 // owned by the dialog. If you want to keep a reference
222 // to it, you have to call g_strdup() on it.
223 // RETURNS: the icon name displayed as logo. The string is
224 char* get_logo_icon_name()() nothrow {
225 return gtk_about_dialog_get_logo_icon_name(&this);
228 // VERSION: 2.6
229 // DEPRECATED (v2.12) method: get_name - Use gtk_about_dialog_get_program_name() instead.
230 // Returns the program name displayed in the about dialog.
232 // dialog and must not be modified.
233 // RETURNS: The program name. The string is owned by the about
234 char* get_name()() nothrow {
235 return gtk_about_dialog_get_name(&this);
238 // VERSION: 2.12
239 // Returns the program name displayed in the about dialog.
241 // dialog and must not be modified.
242 // RETURNS: The program name. The string is owned by the about
243 char* get_program_name()() nothrow {
244 return gtk_about_dialog_get_program_name(&this);
247 // VERSION: 2.6
248 // Returns the translator credits string which is displayed
249 // in the translators tab of the secondary credits dialog.
251 // owned by the about dialog and must not be modified.
252 // RETURNS: The translator credits string. The string is
253 char* get_translator_credits()() nothrow {
254 return gtk_about_dialog_get_translator_credits(&this);
257 // VERSION: 2.6
258 // Returns the version string.
260 // dialog and must not be modified.
261 // RETURNS: The version string. The string is owned by the about
262 char* get_version()() nothrow {
263 return gtk_about_dialog_get_version(&this);
266 // VERSION: 2.6
267 // Returns the website URL.
269 // dialog and must not be modified.
270 // RETURNS: The website URL. The string is owned by the about
271 char* get_website()() nothrow {
272 return gtk_about_dialog_get_website(&this);
275 // VERSION: 2.6
276 // Returns the label used for the website link.
278 // owned by the about dialog and must not be modified.
279 // RETURNS: The label used for the website link. The string is
280 char* get_website_label()() nothrow {
281 return gtk_about_dialog_get_website_label(&this);
284 // VERSION: 2.8
285 // Returns whether the license text in @about is
286 // automatically wrapped.
287 // RETURNS: %TRUE if the license text is wrapped
288 int get_wrap_license()() nothrow {
289 return gtk_about_dialog_get_wrap_license(&this);
292 // VERSION: 2.6
293 // Sets the strings which are displayed in the artists tab
294 // of the secondary credits dialog.
295 // <artists>: a %NULL-terminated array of strings
296 void set_artists(AT0)(AT0 /*char**/ artists) nothrow {
297 gtk_about_dialog_set_artists(&this, toCString!(char**)(artists));
300 // VERSION: 2.6
301 // Sets the strings which are displayed in the authors tab
302 // of the secondary credits dialog.
303 // <authors>: a %NULL-terminated array of strings
304 void set_authors(AT0)(AT0 /*char**/ authors) nothrow {
305 gtk_about_dialog_set_authors(&this, toCString!(char**)(authors));
308 // VERSION: 2.6
309 // Sets the comments string to display in the about dialog.
310 // This should be a short string of one or two lines.
311 // <comments>: a comments string
312 void set_comments(AT0)(AT0 /*char*/ comments=null) nothrow {
313 gtk_about_dialog_set_comments(&this, toCString!(char*)(comments));
316 // VERSION: 2.6
317 // Sets the copyright string to display in the about dialog.
318 // This should be a short string of one or two lines.
319 // <copyright>: (allow-none) the copyright string
320 void set_copyright(AT0)(AT0 /*char*/ copyright) nothrow {
321 gtk_about_dialog_set_copyright(&this, toCString!(char*)(copyright));
324 // VERSION: 2.6
325 // Sets the strings which are displayed in the documenters tab
326 // of the secondary credits dialog.
327 // <documenters>: a %NULL-terminated array of strings
328 void set_documenters(AT0)(AT0 /*char**/ documenters) nothrow {
329 gtk_about_dialog_set_documenters(&this, toCString!(char**)(documenters));
332 // VERSION: 2.6
333 // Sets the license information to be displayed in the secondary
334 // license dialog. If @license is %NULL, the license button is
335 // hidden.
336 // <license>: the license information or %NULL
337 void set_license(AT0)(AT0 /*char*/ license=null) nothrow {
338 gtk_about_dialog_set_license(&this, toCString!(char*)(license));
341 // VERSION: 2.6
342 // Sets the pixbuf to be displayed as logo in the about dialog.
343 // If it is %NULL, the default window icon set with
344 // gtk_window_set_default_icon() will be used.
345 // <logo>: a #GdkPixbuf, or %NULL
346 void set_logo(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ logo=null) nothrow {
347 gtk_about_dialog_set_logo(&this, UpCast!(GdkPixbuf2.Pixbuf*)(logo));
350 // VERSION: 2.6
351 // Sets the pixbuf to be displayed as logo in the about dialog.
352 // If it is %NULL, the default window icon set with
353 // gtk_window_set_default_icon() will be used.
354 // <icon_name>: an icon name, or %NULL
355 void set_logo_icon_name(AT0)(AT0 /*char*/ icon_name=null) nothrow {
356 gtk_about_dialog_set_logo_icon_name(&this, toCString!(char*)(icon_name));
359 // VERSION: 2.6
360 // DEPRECATED (v2.12) method: set_name - Use gtk_about_dialog_set_program_name() instead.
361 // Sets the name to display in the about dialog.
362 // If this is not set, it defaults to g_get_application_name().
363 // <name>: the program name
364 void set_name(AT0)(AT0 /*char*/ name=null) nothrow {
365 gtk_about_dialog_set_name(&this, toCString!(char*)(name));
368 // VERSION: 2.12
369 // Sets the name to display in the about dialog.
370 // If this is not set, it defaults to g_get_application_name().
371 // <name>: the program name
372 void set_program_name(AT0)(AT0 /*char*/ name) nothrow {
373 gtk_about_dialog_set_program_name(&this, toCString!(char*)(name));
376 // VERSION: 2.6
377 // Sets the translator credits string which is displayed in
378 // the translators tab of the secondary credits dialog.
380 // The intended use for this string is to display the translator
381 // of the language which is currently used in the user interface.
382 // Using gettext(), a simple way to achieve that is to mark the
383 // string for translation:
384 // |[
385 // gtk_about_dialog_set_translator_credits (about, _("translator-credits"));
386 // ]|
387 // It is a good idea to use the customary msgid "translator-credits" for this
388 // purpose, since translators will already know the purpose of that msgid, and
389 // since #GtkAboutDialog will detect if "translator-credits" is untranslated
390 // and hide the tab.
391 // <translator_credits>: the translator credits
392 void set_translator_credits(AT0)(AT0 /*char*/ translator_credits=null) nothrow {
393 gtk_about_dialog_set_translator_credits(&this, toCString!(char*)(translator_credits));
396 // VERSION: 2.6
397 // Sets the version string to display in the about dialog.
398 // <version>: the version string
399 void set_version(AT0)(AT0 /*char*/ version_=null) nothrow {
400 gtk_about_dialog_set_version(&this, toCString!(char*)(version_));
403 // VERSION: 2.6
404 // Sets the URL to use for the website link.
406 // Note that that the hook functions need to be set up
407 // before calling this function.
408 // <website>: a URL string starting with "http://"
409 void set_website(AT0)(AT0 /*char*/ website=null) nothrow {
410 gtk_about_dialog_set_website(&this, toCString!(char*)(website));
413 // VERSION: 2.6
414 // Sets the label to be used for the website link.
415 // It defaults to the website URL.
416 // <website_label>: the label used for the website link
417 void set_website_label(AT0)(AT0 /*char*/ website_label) nothrow {
418 gtk_about_dialog_set_website_label(&this, toCString!(char*)(website_label));
421 // VERSION: 2.8
422 // Sets whether the license text in @about is
423 // automatically wrapped.
424 // <wrap_license>: whether to wrap the license
425 void set_wrap_license()(int wrap_license) nothrow {
426 gtk_about_dialog_set_wrap_license(&this, wrap_license);
429 // VERSION: 2.24
430 // The signal which gets emitted to activate a URI.
431 // Applications may connect to it to override the default behaviour,
432 // which is to call gtk_show_uri().
433 // RETURNS: %TRUE if the link has been activated
434 // <uri>: the URI that is activated
435 extern (C) alias static c_int function (AboutDialog* this_, char* uri, void* user_data=null) nothrow signal_activate_link;
437 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
438 return super_.signal_connect!name(cb, data, cf);
441 ulong signal_connect(string name:"activate-link", CB/*:signal_activate_link*/)
442 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
443 if (is(typeof(cb)==signal_activate_link)||_ttmm!(CB, signal_activate_link)()) {
444 return signal_connect_data!()(&this, cast(char*)"activate-link",
445 cast(GObject2.Callback)cb, data, null, cf);
450 // The type of a function which is called when a URL or email
451 // link is activated.
452 // <about>: the #GtkAboutDialog in which the link was activated
453 // <link_>: the URL or email address to which the activated link points
454 // <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()
455 extern (C) alias void function (AboutDialog* about, char* link_, void* data) nothrow AboutDialogActivateLinkFunc;
457 struct AboutDialogClass {
458 DialogClass parent_class;
459 extern (C) int function (AboutDialog* dialog, char* uri) nothrow activate_link;
460 extern (C) void function () nothrow _gtk_reserved1;
461 extern (C) void function () nothrow _gtk_reserved2;
462 extern (C) void function () nothrow _gtk_reserved3;
465 enum AccelFlags {
466 VISIBLE = 1,
467 LOCKED = 2,
468 MASK = 7
471 // A #GtkAccelGroup represents a group of keyboard accelerators,
472 // typically attached to a toplevel #GtkWindow (with
473 // gtk_window_add_accel_group()). Usually you won't need to create a
474 // #GtkAccelGroup directly; instead, when using #GtkItemFactory, GTK+
475 // automatically sets up the accelerators for your menus in the item
476 // factory's #GtkAccelGroup.
479 // Note that <firstterm>accelerators</firstterm> are different from
480 // <firstterm>mnemonics</firstterm>. Accelerators are shortcuts for
481 // activating a menu item; they appear alongside the menu item they're a
482 // shortcut for. For example "Ctrl+Q" might appear alongside the "Quit"
483 // menu item. Mnemonics are shortcuts for GUI elements such as text
484 // entries or buttons; they appear as underlined characters. See
485 // gtk_label_new_with_mnemonic(). Menu items can have both accelerators
486 // and mnemonics, of course.
487 struct AccelGroup /* : GObject.Object */ {
488 alias parent this;
489 alias parent super_;
490 alias parent object;
491 GObject2.Object parent;
492 uint lock_count;
493 Gdk2.ModifierType modifier_mask;
494 GLib2.SList* acceleratables;
495 uint n_accels;
496 AccelGroupEntry* priv_accels;
499 // Creates a new #GtkAccelGroup.
500 // RETURNS: a new #GtkAccelGroup object
501 static AccelGroup* /*new*/ new_()() nothrow {
502 return gtk_accel_group_new();
504 static auto opCall()() {
505 return gtk_accel_group_new();
508 // Finds the #GtkAccelGroup to which @closure is connected;
509 // see gtk_accel_group_connect().
510 // RETURNS: the #GtkAccelGroup to which @closure is connected, or %NULL.
511 // <closure>: a #GClosure
512 static AccelGroup* from_accel_closure(AT0)(AT0 /*GObject2.Closure*/ closure) nothrow {
513 return gtk_accel_group_from_accel_closure(UpCast!(GObject2.Closure*)(closure));
516 // Finds the first accelerator in @accel_group
517 // that matches @accel_key and @accel_mods, and
518 // activates it.
519 // RETURNS: %TRUE if an accelerator was activated and handled this keypress
520 // <accel_quark>: the quark for the accelerator name
521 // <acceleratable>: the #GObject, usually a #GtkWindow, on which to activate the accelerator.
522 // <accel_key>: accelerator keyval from a key event
523 // <accel_mods>: keyboard state mask from a key event
524 int activate(AT0)(GLib2.Quark accel_quark, AT0 /*GObject2.Object*/ acceleratable, uint accel_key, Gdk2.ModifierType accel_mods) nothrow {
525 return gtk_accel_group_activate(&this, accel_quark, UpCast!(GObject2.Object*)(acceleratable), accel_key, accel_mods);
528 // Installs an accelerator in this group. When @accel_group is being activated
529 // in response to a call to gtk_accel_groups_activate(), @closure will be
530 // invoked if the @accel_key and @accel_mods from gtk_accel_groups_activate()
531 // match those of this connection.
533 // The signature used for the @closure is that of #GtkAccelGroupActivate.
535 // Note that, due to implementation details, a single closure can only be
536 // connected to one accelerator group.
537 // <accel_key>: key value of the accelerator
538 // <accel_mods>: modifier combination of the accelerator
539 // <accel_flags>: a flag mask to configure this accelerator
540 // <closure>: closure to be executed upon accelerator activation
541 void connect(AT0)(uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags, AT0 /*GObject2.Closure*/ closure) nothrow {
542 gtk_accel_group_connect(&this, accel_key, accel_mods, accel_flags, UpCast!(GObject2.Closure*)(closure));
545 // Installs an accelerator in this group, using an accelerator path to look
546 // up the appropriate key and modifiers (see gtk_accel_map_add_entry()).
547 // When @accel_group is being activated in response to a call to
548 // gtk_accel_groups_activate(), @closure will be invoked if the @accel_key and
549 // @accel_mods from gtk_accel_groups_activate() match the key and modifiers
550 // for the path.
552 // The signature used for the @closure is that of #GtkAccelGroupActivate.
554 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
555 // pass a static string, you can save some memory by interning it first with
556 // g_intern_static_string().
557 // <accel_path>: path used for determining key and modifiers.
558 // <closure>: closure to be executed upon accelerator activation
559 void connect_by_path(AT0, AT1)(AT0 /*char*/ accel_path, AT1 /*GObject2.Closure*/ closure) nothrow {
560 gtk_accel_group_connect_by_path(&this, toCString!(char*)(accel_path), UpCast!(GObject2.Closure*)(closure));
563 // Removes an accelerator previously installed through
564 // gtk_accel_group_connect().
566 // Since 2.20 @closure can be %NULL.
567 // RETURNS: %TRUE if the closure was found and got disconnected
568 // <closure>: the closure to remove from this accelerator group, or %NULL to remove all closures
569 int disconnect(AT0)(AT0 /*GObject2.Closure*/ closure=null) nothrow {
570 return gtk_accel_group_disconnect(&this, UpCast!(GObject2.Closure*)(closure));
573 // Removes an accelerator previously installed through
574 // gtk_accel_group_connect().
575 // RETURNS: %TRUE if there was an accelerator which could be removed, %FALSE otherwise
576 // <accel_key>: key value of the accelerator
577 // <accel_mods>: modifier combination of the accelerator
578 int disconnect_key()(uint accel_key, Gdk2.ModifierType accel_mods) nothrow {
579 return gtk_accel_group_disconnect_key(&this, accel_key, accel_mods);
582 // Unintrospectable method: find() / gtk_accel_group_find()
583 // Finds the first entry in an accelerator group for which
584 // @find_func returns %TRUE and returns its #GtkAccelKey.
585 // RETURNS: the key of the first entry passing @find_func. The key is owned by GTK+ and must not be freed.
586 // <find_func>: a function to filter the entries of @accel_group with
587 // <data>: data to pass to @find_func
588 AccelKey* find(AT0)(AccelGroupFindFunc find_func, AT0 /*void*/ data) nothrow {
589 return gtk_accel_group_find(&this, find_func, UpCast!(void*)(data));
592 // VERSION: 2.14
593 // Locks are added and removed using gtk_accel_group_lock() and
594 // gtk_accel_group_unlock().
596 // %FALSE otherwise.
597 // RETURNS: %TRUE if there are 1 or more locks on the @accel_group,
598 int get_is_locked()() nothrow {
599 return gtk_accel_group_get_is_locked(&this);
602 // VERSION: 2.14
603 // Gets a #GdkModifierType representing the mask for this
604 // @accel_group. For example, #GDK_CONTROL_MASK, #GDK_SHIFT_MASK, etc.
605 // RETURNS: the modifier mask for this accel group.
606 Gdk2.ModifierType get_modifier_mask()() nothrow {
607 return gtk_accel_group_get_modifier_mask(&this);
610 // Locks the given accelerator group.
612 // Locking an acelerator group prevents the accelerators contained
613 // within it to be changed during runtime. Refer to
614 // gtk_accel_map_change_entry() about runtime accelerator changes.
616 // If called more than once, @accel_group remains locked until
617 // gtk_accel_group_unlock() has been called an equivalent number
618 // of times.
619 void lock()() nothrow {
620 gtk_accel_group_lock(&this);
623 // Unintrospectable method: query() / gtk_accel_group_query()
624 // Queries an accelerator group for all entries matching @accel_key and
625 // @accel_mods.
626 // RETURNS: an array of @n_entries #GtkAccelGroupEntry elements, or %NULL. The array is owned by GTK+ and must not be freed.
627 // <accel_key>: key value of the accelerator
628 // <accel_mods>: modifier combination of the accelerator
629 // <n_entries>: location to return the number of entries found, or %NULL
630 AccelGroupEntry* query(AT0)(uint accel_key, Gdk2.ModifierType accel_mods, AT0 /*uint*/ n_entries=null) nothrow {
631 return gtk_accel_group_query(&this, accel_key, accel_mods, UpCast!(uint*)(n_entries));
633 // Undoes the last call to gtk_accel_group_lock() on this @accel_group.
634 void unlock()() nothrow {
635 gtk_accel_group_unlock(&this);
638 // The accel-activate signal is an implementation detail of
639 // #GtkAccelGroup and not meant to be used by applications.
640 // RETURNS: %TRUE if the accelerator was activated
641 // <acceleratable>: the object on which the accelerator was activated
642 // <keyval>: the accelerator keyval
643 // <modifier>: the modifier combination of the accelerator
644 extern (C) alias static c_int function (AccelGroup* this_, GObject2.Object* acceleratable, c_uint keyval, Gdk2.ModifierType* modifier, void* user_data=null) nothrow signal_accel_activate;
646 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
647 return super_.signal_connect!name(cb, data, cf);
650 ulong signal_connect(string name:"accel-activate", CB/*:signal_accel_activate*/)
651 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
652 if (is(typeof(cb)==signal_accel_activate)||_ttmm!(CB, signal_accel_activate)()) {
653 return signal_connect_data!()(&this, cast(char*)"accel-activate",
654 cast(GObject2.Callback)cb, data, null, cf);
657 // The accel-changed signal is emitted when a #GtkAccelGroupEntry
658 // is added to or removed from the accel group.
660 // Widgets like #GtkAccelLabel which display an associated
661 // accelerator should connect to this signal, and rebuild
662 // their visual representation if the @accel_closure is theirs.
663 // <keyval>: the accelerator keyval
664 // <modifier>: the modifier combination of the accelerator
665 // <accel_closure>: the #GClosure of the accelerator
666 extern (C) alias static void function (AccelGroup* this_, c_uint keyval, Gdk2.ModifierType* modifier, GObject2.Closure* accel_closure, void* user_data=null) nothrow signal_accel_changed;
667 ulong signal_connect(string name:"accel-changed", CB/*:signal_accel_changed*/)
668 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
669 if (is(typeof(cb)==signal_accel_changed)||_ttmm!(CB, signal_accel_changed)()) {
670 return signal_connect_data!()(&this, cast(char*)"accel-changed",
671 cast(GObject2.Callback)cb, data, null, cf);
675 extern (C) alias int function (AccelGroup* accel_group, GObject2.Object* acceleratable, uint keyval, Gdk2.ModifierType modifier) nothrow AccelGroupActivate;
677 struct AccelGroupClass {
678 GObject2.ObjectClass parent_class;
679 extern (C) void function (AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifier, GObject2.Closure* accel_closure) nothrow accel_changed;
680 extern (C) void function () nothrow _gtk_reserved1;
681 extern (C) void function () nothrow _gtk_reserved2;
682 extern (C) void function () nothrow _gtk_reserved3;
683 extern (C) void function () nothrow _gtk_reserved4;
686 struct AccelGroupEntry {
687 AccelKey key;
688 GObject2.Closure* closure;
689 GLib2.Quark accel_path_quark;
692 // VERSION: 2.2
693 extern (C) alias int function (AccelKey* key, GObject2.Closure* closure, void* data) nothrow AccelGroupFindFunc;
695 struct AccelKey {
696 uint accel_key;
697 Gdk2.ModifierType accel_mods;
698 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
699 uint, "accel_flags", 16,
700 uint, "__dummy32A", 16));
704 // The #GtkAccelLabel widget is a subclass of #GtkLabel that also displays an
705 // accelerator key on the right of the label text, e.g. 'Ctl+S'.
706 // It is commonly used in menus to show the keyboard short-cuts for commands.
708 // The accelerator key to display is not set explicitly.
709 // Instead, the #GtkAccelLabel displays the accelerators which have been added to
710 // a particular widget. This widget is set by calling
711 // gtk_accel_label_set_accel_widget().
713 // For example, a #GtkMenuItem widget may have an accelerator added to emit the
714 // "activate" signal when the 'Ctl+S' key combination is pressed.
715 // A #GtkAccelLabel is created and added to the #GtkMenuItem, and
716 // gtk_accel_label_set_accel_widget() is called with the #GtkMenuItem as the
717 // second argument. The #GtkAccelLabel will now display 'Ctl+S' after its label.
719 // Note that creating a #GtkMenuItem with gtk_menu_item_new_with_label() (or
720 // one of the similar functions for #GtkCheckMenuItem and #GtkRadioMenuItem)
721 // automatically adds a #GtkAccelLabel to the #GtkMenuItem and calls
722 // gtk_accel_label_set_accel_widget() to set it up for you.
724 // A #GtkAccelLabel will only display accelerators which have %GTK_ACCEL_VISIBLE
725 // set (see #GtkAccelFlags).
726 // A #GtkAccelLabel can display multiple accelerators and even signal names,
727 // though it is almost always used to display just one accelerator key.
728 // <example>
729 // <title>Creating a simple menu item with an accelerator key.</title>
730 // <programlisting>
731 // GtkWidget *save_item;
732 // GtkAccelGroup *accel_group;
734 // /<!---->* Create a GtkAccelGroup and add it to the window. *<!---->/
735 // accel_group = gtk_accel_group_new (<!-- -->);
736 // gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
738 // /<!---->* Create the menu item using the convenience function. *<!---->/
739 // save_item = gtk_menu_item_new_with_label ("Save");
740 // gtk_widget_show (save_item);
741 // gtk_container_add (GTK_CONTAINER (menu), save_item);
743 // /<!---->* Now add the accelerator to the GtkMenuItem. Note that since we called
744 // gtk_menu_item_new_with_label(<!-- -->) to create the GtkMenuItem the
745 // GtkAccelLabel is automatically set up to display the GtkMenuItem
746 // accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. *<!---->/
747 // gtk_widget_add_accelerator (save_item, "activate", accel_group,
748 // GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
749 // </programlisting>
750 // </example>
751 struct AccelLabel /* : Label */ {
752 mixin Atk.ImplementorIface.__interface__;
753 mixin Buildable.__interface__;
754 alias label this;
755 alias label super_;
756 Label label;
757 uint gtk_reserved, accel_padding;
758 Widget* accel_widget;
759 GObject2.Closure* accel_closure;
760 AccelGroup* accel_group;
761 char* accel_string;
762 ushort accel_string_width;
765 // Creates a new #GtkAccelLabel.
766 // RETURNS: a new #GtkAccelLabel.
767 // <string>: the label string. Must be non-%NULL.
768 static AccelLabel* new_(AT0)(AT0 /*char*/ string_) nothrow {
769 return gtk_accel_label_new(toCString!(char*)(string_));
771 static auto opCall(AT0)(AT0 /*char*/ string_) {
772 return gtk_accel_label_new(toCString!(char*)(string_));
775 // Fetches the widget monitored by this accelerator label. See
776 // gtk_accel_label_set_accel_widget().
777 // RETURNS: the object monitored by the accelerator label, or %NULL.
778 Widget* get_accel_widget()() nothrow {
779 return gtk_accel_label_get_accel_widget(&this);
782 // Returns the width needed to display the accelerator key(s).
783 // This is used by menus to align all of the #GtkMenuItem widgets, and shouldn't
784 // be needed by applications.
785 // RETURNS: the width needed to display the accelerator key(s).
786 uint get_accel_width()() nothrow {
787 return gtk_accel_label_get_accel_width(&this);
790 // Recreates the string representing the accelerator keys.
791 // This should not be needed since the string is automatically updated whenever
792 // accelerators are added or removed from the associated widget.
793 // RETURNS: always returns %FALSE.
794 int refetch()() nothrow {
795 return gtk_accel_label_refetch(&this);
798 // Sets the closure to be monitored by this accelerator label. The closure
799 // must be connected to an accelerator group; see gtk_accel_group_connect().
800 // <accel_closure>: the closure to monitor for accelerator changes.
801 void set_accel_closure(AT0)(AT0 /*GObject2.Closure*/ accel_closure) nothrow {
802 gtk_accel_label_set_accel_closure(&this, UpCast!(GObject2.Closure*)(accel_closure));
805 // Sets the widget to be monitored by this accelerator label.
806 // <accel_widget>: the widget to be monitored.
807 void set_accel_widget(AT0)(AT0 /*Widget*/ accel_widget) nothrow {
808 gtk_accel_label_set_accel_widget(&this, UpCast!(Widget*)(accel_widget));
812 struct AccelLabelClass {
813 LabelClass parent_class;
814 char* signal_quote1, signal_quote2, mod_name_shift, mod_name_control, mod_name_alt, mod_separator, accel_seperator;
815 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
816 uint, "latin1_to_char", 1,
817 uint, "__dummy32A", 31));
818 extern (C) void function () nothrow _gtk_reserved1;
819 extern (C) void function () nothrow _gtk_reserved2;
820 extern (C) void function () nothrow _gtk_reserved3;
821 extern (C) void function () nothrow _gtk_reserved4;
824 struct AccelMap /* : GObject.Object */ {
825 alias method_parent this;
826 alias method_parent super_;
827 alias method_parent object;
828 GObject2.Object method_parent;
831 // Registers a new accelerator with the global accelerator map.
832 // This function should only be called once per @accel_path
833 // with the canonical @accel_key and @accel_mods for this path.
834 // To change the accelerator during runtime programatically, use
835 // gtk_accel_map_change_entry().
836 // The accelerator path must consist of "&lt;WINDOWTYPE&gt;/Category1/Category2/.../Action",
837 // where &lt;WINDOWTYPE&gt; should be a unique application-specific identifier, that
838 // corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image",
839 // "Abiword-Document" or "Gnumeric-Settings".
840 // The Category1/.../Action portion is most appropriately chosen by the action the
841 // accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path,
842 // e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All".
843 // So a full valid accelerator path may look like:
844 // "&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...".
846 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
847 // pass a static string, you can save some memory by interning it first with
848 // g_intern_static_string().
849 // <accel_path>: valid accelerator path
850 // <accel_key>: the accelerator key
851 // <accel_mods>: the accelerator modifiers
852 static void add_entry(AT0)(AT0 /*char*/ accel_path, uint accel_key, Gdk2.ModifierType accel_mods) nothrow {
853 gtk_accel_map_add_entry(toCString!(char*)(accel_path), accel_key, accel_mods);
856 // Adds a filter to the global list of accel path filters.
858 // Accel map entries whose accel path matches one of the filters
859 // are skipped by gtk_accel_map_foreach().
861 // This function is intended for GTK+ modules that create their own
862 // menus, but don't want them to be saved into the applications accelerator
863 // map dump.
864 // <filter_pattern>: a pattern (see #GPatternSpec)
865 static void add_filter(AT0)(AT0 /*char*/ filter_pattern) nothrow {
866 gtk_accel_map_add_filter(toCString!(char*)(filter_pattern));
869 // Changes the @accel_key and @accel_mods currently associated with @accel_path.
870 // Due to conflicts with other accelerators, a change may not always be possible,
871 // @replace indicates whether other accelerators may be deleted to resolve such
872 // conflicts. A change will only occur if all conflicts could be resolved (which
873 // might not be the case if conflicting accelerators are locked). Successful
874 // changes are indicated by a %TRUE return value.
876 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
877 // pass a static string, you can save some memory by interning it first with
878 // g_intern_static_string().
879 // RETURNS: %TRUE if the accelerator could be changed, %FALSE otherwise
880 // <accel_path>: a valid accelerator path
881 // <accel_key>: the new accelerator key
882 // <accel_mods>: the new accelerator modifiers
883 // <replace>: %TRUE if other accelerators may be deleted upon conflicts
884 static int change_entry(AT0)(AT0 /*char*/ accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int replace) nothrow {
885 return gtk_accel_map_change_entry(toCString!(char*)(accel_path), accel_key, accel_mods, replace);
888 // Unintrospectable function: foreach() / gtk_accel_map_foreach()
889 // Loops over the entries in the accelerator map whose accel path
890 // doesn't match any of the filters added with gtk_accel_map_add_filter(),
891 // and execute @foreach_func on each. The signature of @foreach_func is
892 // that of #GtkAccelMapForeach, the @changed parameter indicates whether
893 // this accelerator was changed during runtime (thus, would need
894 // saving during an accelerator map dump).
895 // <data>: data to be passed into @foreach_func
896 // <foreach_func>: function to be executed for each accel map entry which is not filtered out
897 static void foreach_(AT0)(AT0 /*void*/ data, AccelMapForeach foreach_func) nothrow {
898 gtk_accel_map_foreach(UpCast!(void*)(data), foreach_func);
901 // Unintrospectable function: foreach_unfiltered() / gtk_accel_map_foreach_unfiltered()
902 // Loops over all entries in the accelerator map, and execute
903 // @foreach_func on each. The signature of @foreach_func is that of
904 // #GtkAccelMapForeach, the @changed parameter indicates whether
905 // this accelerator was changed during runtime (thus, would need
906 // saving during an accelerator map dump).
907 // <data>: data to be passed into @foreach_func
908 // <foreach_func>: function to be executed for each accel map entry
909 static void foreach_unfiltered(AT0)(AT0 /*void*/ data, AccelMapForeach foreach_func) nothrow {
910 gtk_accel_map_foreach_unfiltered(UpCast!(void*)(data), foreach_func);
913 // Unintrospectable function: get() / gtk_accel_map_get()
914 // VERSION: 2.4
915 // Gets the singleton global #GtkAccelMap object. This object
916 // is useful only for notification of changes to the accelerator
917 // map via the ::changed signal; it isn't a parameter to the
918 // other accelerator map functions.
919 // RETURNS: the global #GtkAccelMap object
920 static AccelMap* get()() nothrow {
921 return gtk_accel_map_get();
924 // Parses a file previously saved with gtk_accel_map_save() for
925 // accelerator specifications, and propagates them accordingly.
926 // <file_name>: a file containing accelerator specifications, in the GLib file name encoding
927 static void load(AT0)(AT0 /*char*/ file_name) nothrow {
928 gtk_accel_map_load(toCString!(char*)(file_name));
931 // Filedescriptor variant of gtk_accel_map_load().
933 // Note that the file descriptor will not be closed by this function.
934 // <fd>: a valid readable file descriptor
935 static void load_fd()(int fd) nothrow {
936 gtk_accel_map_load_fd(fd);
939 // #GScanner variant of gtk_accel_map_load().
940 // <scanner>: a #GScanner which has already been provided with an input file
941 static void load_scanner(AT0)(AT0 /*GLib2.Scanner*/ scanner) nothrow {
942 gtk_accel_map_load_scanner(UpCast!(GLib2.Scanner*)(scanner));
945 // VERSION: 2.4
946 // Locks the given accelerator path. If the accelerator map doesn't yet contain
947 // an entry for @accel_path, a new one is created.
949 // Locking an accelerator path prevents its accelerator from being changed
950 // during runtime. A locked accelerator path can be unlocked by
951 // gtk_accel_map_unlock_path(). Refer to gtk_accel_map_change_entry()
952 // for information about runtime accelerator changes.
954 // If called more than once, @accel_path remains locked until
955 // gtk_accel_map_unlock_path() has been called an equivalent number
956 // of times.
958 // Note that locking of individual accelerator paths is independent from
959 // locking the #GtkAccelGroup containing them. For runtime accelerator
960 // changes to be possible both the accelerator path and its #GtkAccelGroup
961 // have to be unlocked.
962 // <accel_path>: a valid accelerator path
963 static void lock_path(AT0)(AT0 /*char*/ accel_path) nothrow {
964 gtk_accel_map_lock_path(toCString!(char*)(accel_path));
967 // Looks up the accelerator entry for @accel_path and fills in @key.
968 // RETURNS: %TRUE if @accel_path is known, %FALSE otherwise
969 // <accel_path>: a valid accelerator path
970 // <key>: the accelerator key to be filled in (optional)
971 static int lookup_entry(AT0, AT1)(AT0 /*char*/ accel_path, AT1 /*AccelKey*/ key) nothrow {
972 return gtk_accel_map_lookup_entry(toCString!(char*)(accel_path), UpCast!(AccelKey*)(key));
975 // Saves current accelerator specifications (accelerator path, key
976 // and modifiers) to @file_name.
977 // The file is written in a format suitable to be read back in by
978 // gtk_accel_map_load().
979 // <file_name>: the name of the file to contain accelerator specifications, in the GLib file name encoding
980 static void save(AT0)(AT0 /*char*/ file_name) nothrow {
981 gtk_accel_map_save(toCString!(char*)(file_name));
984 // Filedescriptor variant of gtk_accel_map_save().
986 // Note that the file descriptor will not be closed by this function.
987 // <fd>: a valid writable file descriptor
988 static void save_fd()(int fd) nothrow {
989 gtk_accel_map_save_fd(fd);
992 // VERSION: 2.4
993 // Undoes the last call to gtk_accel_map_lock_path() on this @accel_path.
994 // Refer to gtk_accel_map_lock_path() for information about accelerator path locking.
995 // <accel_path>: a valid accelerator path
996 static void unlock_path(AT0)(AT0 /*char*/ accel_path) nothrow {
997 gtk_accel_map_unlock_path(toCString!(char*)(accel_path));
1000 // VERSION: 2.4
1001 // Notifies of a change in the global accelerator map.
1002 // The path is also used as the detail for the signal,
1003 // so it is possible to connect to
1004 // changed::<replaceable>accel_path</replaceable>.
1005 // <accel_path>: the path of the accelerator that changed
1006 // <accel_key>: the key value for the new accelerator
1007 // <accel_mods>: the modifier mask for the new accelerator
1008 extern (C) alias static void function (AccelMap* this_, char* accel_path, c_uint accel_key, Gdk2.ModifierType* accel_mods, void* user_data=null) nothrow signal_changed;
1010 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1011 return super_.signal_connect!name(cb, data, cf);
1014 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
1015 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1016 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
1017 return signal_connect_data!()(&this, cast(char*)"changed",
1018 cast(GObject2.Callback)cb, data, null, cf);
1022 struct AccelMapClass {
1025 extern (C) alias void function (void* data, char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int changed) nothrow AccelMapForeach;
1027 struct Accessible /* : Atk.Object */ {
1028 alias parent this;
1029 alias parent super_;
1030 alias parent object;
1031 Atk.Object parent;
1032 Widget* widget;
1035 // This function specifies the callback function to be called when the widget
1036 // corresponding to a GtkAccessible is destroyed.
1037 void connect_widget_destroyed()() nothrow {
1038 gtk_accessible_connect_widget_destroyed(&this);
1041 // VERSION: 2.22
1042 // Gets the #GtkWidget corresponding to the #GtkAccessible. The returned widget
1043 // does not have a reference added, so you do not need to unref it.
1045 // the #GtkAccessible, or %NULL.
1046 // RETURNS: pointer to the #GtkWidget corresponding to
1047 Widget* get_widget()() nothrow {
1048 return gtk_accessible_get_widget(&this);
1051 // VERSION: 2.22
1052 // Sets the #GtkWidget corresponding to the #GtkAccessible.
1053 // <widget>: a #GtkWidget
1054 void set_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
1055 gtk_accessible_set_widget(&this, UpCast!(Widget*)(widget));
1059 struct AccessibleClass {
1060 Atk.ObjectClass parent_class;
1061 extern (C) void function (Accessible* accessible) nothrow connect_widget_destroyed;
1062 extern (C) void function () nothrow _gtk_reserved1;
1063 extern (C) void function () nothrow _gtk_reserved2;
1064 extern (C) void function () nothrow _gtk_reserved3;
1065 extern (C) void function () nothrow _gtk_reserved4;
1069 // Actions represent operations that the user can be perform, along with
1070 // some information how it should be presented in the interface. Each action
1071 // provides methods to create icons, menu items and toolbar items
1072 // representing itself.
1074 // As well as the callback that is called when the action gets activated,
1075 // the following also gets associated with the action:
1076 // <itemizedlist>
1077 // <listitem><para>a name (not translated, for path lookup)</para></listitem>
1078 // <listitem><para>a label (translated, for display)</para></listitem>
1079 // <listitem><para>an accelerator</para></listitem>
1080 // <listitem><para>whether label indicates a stock id</para></listitem>
1081 // <listitem><para>a tooltip (optional, translated)</para></listitem>
1082 // <listitem><para>a toolbar label (optional, shorter than label)</para></listitem>
1083 // </itemizedlist>
1084 // The action will also have some state information:
1085 // <itemizedlist>
1086 // <listitem><para>visible (shown/hidden)</para></listitem>
1087 // <listitem><para>sensitive (enabled/disabled)</para></listitem>
1088 // </itemizedlist>
1089 // Apart from regular actions, there are <link linkend="GtkToggleAction">toggle
1090 // actions</link>, which can be toggled between two states and <link
1091 // linkend="GtkRadioAction">radio actions</link>, of which only one in a group
1092 // can be in the "active" state. Other actions can be implemented as #GtkAction
1093 // subclasses.
1095 // Each action can have one or more proxy menu item, toolbar button or
1096 // other proxy widgets. Proxies mirror the state of the action (text
1097 // label, tooltip, icon, visible, sensitive, etc), and should change when
1098 // the action's state changes. When the proxy is activated, it should
1099 // activate its action.
1100 struct Action /* : GObject.Object */ {
1101 mixin Buildable.__interface__;
1102 alias object this;
1103 alias object super_;
1104 GObject2.Object object;
1105 private ActionPrivate* private_data;
1108 // VERSION: 2.4
1109 // Creates a new #GtkAction object. To add the action to a
1110 // #GtkActionGroup and set the accelerator for the action,
1111 // call gtk_action_group_add_action_with_accel().
1112 // See <xref linkend="XML-UI"/> for information on allowed action
1113 // names.
1114 // RETURNS: a new #GtkAction
1115 // <name>: A unique name for the action
1116 // <label>: the label displayed in menu items and on buttons, or %NULL
1117 // <tooltip>: a tooltip for the action, or %NULL
1118 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
1119 static Action* /*new*/ new_(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id) nothrow {
1120 return gtk_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id));
1122 static auto opCall(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id) {
1123 return gtk_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id));
1126 // VERSION: 2.4
1127 // Emits the "activate" signal on the specified action, if it isn't
1128 // insensitive. This gets called by the proxy widgets when they get
1129 // activated.
1131 // It can also be used to manually activate an action.
1132 void activate()() nothrow {
1133 gtk_action_activate(&this);
1136 // VERSION: 2.16
1137 // Disable activation signals from the action
1139 // This is needed when updating the state of your proxy
1140 // #GtkActivatable widget could result in calling gtk_action_activate(),
1141 // this is a convenience function to avoid recursing in those
1142 // cases (updating toggle state for instance).
1143 void block_activate()() nothrow {
1144 gtk_action_block_activate(&this);
1147 // VERSION: 2.4
1148 // DEPRECATED (v2.16) method: block_activate_from - activatables are now responsible for activating the
1149 // Disables calls to the gtk_action_activate()
1150 // function by signals on the given proxy widget. This is used to
1151 // break notification loops for things like check or radio actions.
1153 // This function is intended for use by action implementations.
1156 // action directly so this doesnt apply anymore.
1157 // <proxy>: a proxy widget
1158 void block_activate_from(AT0)(AT0 /*Widget*/ proxy) nothrow {
1159 gtk_action_block_activate_from(&this, UpCast!(Widget*)(proxy));
1162 // VERSION: 2.4
1163 // Installs the accelerator for @action if @action has an
1164 // accel path and group. See gtk_action_set_accel_path() and
1165 // gtk_action_set_accel_group()
1167 // Since multiple proxies may independently trigger the installation
1168 // of the accelerator, the @action counts the number of times this
1169 // function has been called and doesn't remove the accelerator until
1170 // gtk_action_disconnect_accelerator() has been called as many times.
1171 void connect_accelerator()() nothrow {
1172 gtk_action_connect_accelerator(&this);
1175 // VERSION: 2.4
1176 // DEPRECATED (v2.16) method: connect_proxy - Use gtk_activatable_set_related_action() instead.
1177 // Connects a widget to an action object as a proxy. Synchronises
1178 // various properties of the action with the widget (such as label
1179 // text, icon, tooltip, etc), and attaches a callback so that the
1180 // action gets activated when the proxy widget does.
1182 // If the widget is already connected to an action, it is disconnected
1183 // first.
1184 // <proxy>: the proxy widget
1185 void connect_proxy(AT0)(AT0 /*Widget*/ proxy) nothrow {
1186 gtk_action_connect_proxy(&this, UpCast!(Widget*)(proxy));
1189 // VERSION: 2.4
1190 // This function is intended for use by action implementations to
1191 // create icons displayed in the proxy widgets.
1192 // RETURNS: a widget that displays the icon for this action.
1193 // <icon_size>: the size of the icon that should be created.
1194 Widget* create_icon()(IconSize icon_size) nothrow {
1195 return gtk_action_create_icon(&this, icon_size);
1198 // VERSION: 2.12
1199 // If @action provides a #GtkMenu widget as a submenu for the menu
1200 // item or the toolbar item it creates, this function returns an
1201 // instance of that menu.
1203 // action, or %NULL.
1204 // RETURNS: the menu item provided by the
1205 Widget* create_menu()() nothrow {
1206 return gtk_action_create_menu(&this);
1209 // VERSION: 2.4
1210 // Creates a menu item widget that proxies for the given action.
1211 // RETURNS: a menu item connected to the action.
1212 Widget* create_menu_item()() nothrow {
1213 return gtk_action_create_menu_item(&this);
1216 // VERSION: 2.4
1217 // Creates a toolbar item widget that proxies for the given action.
1218 // RETURNS: a toolbar item connected to the action.
1219 Widget* create_tool_item()() nothrow {
1220 return gtk_action_create_tool_item(&this);
1223 // VERSION: 2.4
1224 // Undoes the effect of one call to gtk_action_connect_accelerator().
1225 void disconnect_accelerator()() nothrow {
1226 gtk_action_disconnect_accelerator(&this);
1229 // VERSION: 2.4
1230 // DEPRECATED (v2.16) method: disconnect_proxy - Use gtk_activatable_set_related_action() instead.
1231 // Disconnects a proxy widget from an action.
1232 // Does <emphasis>not</emphasis> destroy the widget, however.
1233 // <proxy>: the proxy widget
1234 void disconnect_proxy(AT0)(AT0 /*Widget*/ proxy) nothrow {
1235 gtk_action_disconnect_proxy(&this, UpCast!(Widget*)(proxy));
1238 // VERSION: 2.8
1239 // Returns the accel closure for this action.
1242 // returned closure is owned by GTK+ and must not be unreffed
1243 // or modified.
1244 // RETURNS: the accel closure for this action. The
1245 GObject2.Closure* get_accel_closure()() nothrow {
1246 return gtk_action_get_accel_closure(&this);
1249 // VERSION: 2.6
1250 // Returns the accel path for this action.
1253 // if none is set. The returned string is owned by GTK+
1254 // and must not be freed or modified.
1255 // RETURNS: the accel path for this action, or %NULL
1256 char* get_accel_path()() nothrow {
1257 return gtk_action_get_accel_path(&this);
1260 // VERSION: 2.20
1261 // Returns whether @action<!-- -->'s menu item proxies will ignore the
1262 // #GtkSettings:gtk-menu-images setting and always show their image,
1263 // if available.
1264 // RETURNS: %TRUE if the menu item proxies will always show their image
1265 int get_always_show_image()() nothrow {
1266 return gtk_action_get_always_show_image(&this);
1269 // VERSION: 2.16
1270 // Gets the gicon of @action.
1271 // RETURNS: The action's #GIcon if one is set.
1272 Gio2.Icon* get_gicon()() nothrow {
1273 return gtk_action_get_gicon(&this);
1276 // VERSION: 2.16
1277 // Gets the icon name of @action.
1278 // RETURNS: the icon name
1279 char* get_icon_name()() nothrow {
1280 return gtk_action_get_icon_name(&this);
1283 // VERSION: 2.16
1284 // Checks whether @action is important or not
1285 // RETURNS: whether @action is important
1286 int get_is_important()() nothrow {
1287 return gtk_action_get_is_important(&this);
1290 // VERSION: 2.16
1291 // Gets the label text of @action.
1292 // RETURNS: the label text
1293 char* get_label()() nothrow {
1294 return gtk_action_get_label(&this);
1297 // VERSION: 2.4
1298 // Returns the name of the action.
1300 // be freed.
1301 // RETURNS: the name of the action. The string belongs to GTK+ and should not
1302 char* get_name()() nothrow {
1303 return gtk_action_get_name(&this);
1306 // VERSION: 2.4
1307 // Returns the proxy widgets for an action.
1308 // See also gtk_widget_get_action().
1310 // and must not be modified.
1311 // RETURNS: a #GSList of proxy widgets. The list is owned by GTK+
1312 GLib2.SList* get_proxies()() nothrow {
1313 return gtk_action_get_proxies(&this);
1316 // VERSION: 2.4
1317 // Returns whether the action itself is sensitive. Note that this doesn't
1318 // necessarily mean effective sensitivity. See gtk_action_is_sensitive()
1319 // for that.
1320 // RETURNS: %TRUE if the action itself is sensitive.
1321 int get_sensitive()() nothrow {
1322 return gtk_action_get_sensitive(&this);
1325 // VERSION: 2.16
1326 // Gets the short label text of @action.
1327 // RETURNS: the short label text.
1328 char* get_short_label()() nothrow {
1329 return gtk_action_get_short_label(&this);
1332 // VERSION: 2.16
1333 // Gets the stock id of @action.
1334 // RETURNS: the stock id
1335 char* get_stock_id()() nothrow {
1336 return gtk_action_get_stock_id(&this);
1339 // VERSION: 2.16
1340 // Gets the tooltip text of @action.
1341 // RETURNS: the tooltip text
1342 char* get_tooltip()() nothrow {
1343 return gtk_action_get_tooltip(&this);
1346 // VERSION: 2.4
1347 // Returns whether the action itself is visible. Note that this doesn't
1348 // necessarily mean effective visibility. See gtk_action_is_sensitive()
1349 // for that.
1350 // RETURNS: %TRUE if the action itself is visible.
1351 int get_visible()() nothrow {
1352 return gtk_action_get_visible(&this);
1355 // VERSION: 2.16
1356 // Checks whether @action is visible when horizontal
1357 // RETURNS: whether @action is visible when horizontal
1358 int get_visible_horizontal()() nothrow {
1359 return gtk_action_get_visible_horizontal(&this);
1362 // VERSION: 2.16
1363 // Checks whether @action is visible when horizontal
1364 // RETURNS: whether @action is visible when horizontal
1365 int get_visible_vertical()() nothrow {
1366 return gtk_action_get_visible_vertical(&this);
1369 // VERSION: 2.4
1370 // Returns whether the action is effectively sensitive.
1372 // are both sensitive.
1373 // RETURNS: %TRUE if the action and its associated action group
1374 int is_sensitive()() nothrow {
1375 return gtk_action_is_sensitive(&this);
1378 // VERSION: 2.4
1379 // Returns whether the action is effectively visible.
1381 // are both visible.
1382 // RETURNS: %TRUE if the action and its associated action group
1383 int is_visible()() nothrow {
1384 return gtk_action_is_visible(&this);
1387 // VERSION: 2.4
1388 // Sets the #GtkAccelGroup in which the accelerator for this action
1389 // will be installed.
1390 // <accel_group>: a #GtkAccelGroup or %NULL
1391 void set_accel_group(AT0)(AT0 /*AccelGroup*/ accel_group=null) nothrow {
1392 gtk_action_set_accel_group(&this, UpCast!(AccelGroup*)(accel_group));
1395 // VERSION: 2.4
1396 // Sets the accel path for this action. All proxy widgets associated
1397 // with the action will have this accel path, so that their
1398 // accelerators are consistent.
1400 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
1401 // pass a static string, you can save some memory by interning it first with
1402 // g_intern_static_string().
1403 // <accel_path>: the accelerator path
1404 void set_accel_path(AT0)(AT0 /*char*/ accel_path) nothrow {
1405 gtk_action_set_accel_path(&this, toCString!(char*)(accel_path));
1408 // VERSION: 2.20
1409 // Sets whether @action<!-- -->'s menu item proxies will ignore the
1410 // #GtkSettings:gtk-menu-images setting and always show their image, if available.
1412 // Use this if the menu item would be useless or hard to use
1413 // without their image.
1414 // <always_show>: %TRUE if menuitem proxies should always show their image
1415 void set_always_show_image()(int always_show) nothrow {
1416 gtk_action_set_always_show_image(&this, always_show);
1419 // VERSION: 2.16
1420 // Sets the icon of @action.
1421 // <icon>: the #GIcon to set
1422 void set_gicon(AT0)(AT0 /*Gio2.Icon*/ icon) nothrow {
1423 gtk_action_set_gicon(&this, UpCast!(Gio2.Icon*)(icon));
1426 // VERSION: 2.16
1427 // Sets the icon name on @action
1428 // <icon_name>: the icon name to set
1429 void set_icon_name(AT0)(AT0 /*char*/ icon_name) nothrow {
1430 gtk_action_set_icon_name(&this, toCString!(char*)(icon_name));
1433 // VERSION: 2.16
1434 // Sets whether the action is important, this attribute is used
1435 // primarily by toolbar items to decide whether to show a label
1436 // or not.
1437 // <is_important>: %TRUE to make the action important
1438 void set_is_important()(int is_important) nothrow {
1439 gtk_action_set_is_important(&this, is_important);
1442 // VERSION: 2.16
1443 // Sets the label of @action.
1444 // <label>: the label text to set
1445 void set_label(AT0)(AT0 /*char*/ label) nothrow {
1446 gtk_action_set_label(&this, toCString!(char*)(label));
1449 // VERSION: 2.6
1450 // Sets the ::sensitive property of the action to @sensitive. Note that
1451 // this doesn't necessarily mean effective sensitivity. See
1452 // gtk_action_is_sensitive()
1453 // for that.
1454 // <sensitive>: %TRUE to make the action sensitive
1455 void set_sensitive()(int sensitive) nothrow {
1456 gtk_action_set_sensitive(&this, sensitive);
1459 // VERSION: 2.16
1460 // Sets a shorter label text on @action.
1461 // <short_label>: the label text to set
1462 void set_short_label(AT0)(AT0 /*char*/ short_label) nothrow {
1463 gtk_action_set_short_label(&this, toCString!(char*)(short_label));
1466 // VERSION: 2.16
1467 // Sets the stock id on @action
1468 // <stock_id>: the stock id
1469 void set_stock_id(AT0)(AT0 /*char*/ stock_id) nothrow {
1470 gtk_action_set_stock_id(&this, toCString!(char*)(stock_id));
1473 // VERSION: 2.16
1474 // Sets the tooltip text on @action
1475 // <tooltip>: the tooltip text
1476 void set_tooltip(AT0)(AT0 /*char*/ tooltip) nothrow {
1477 gtk_action_set_tooltip(&this, toCString!(char*)(tooltip));
1480 // VERSION: 2.6
1481 // Sets the ::visible property of the action to @visible. Note that
1482 // this doesn't necessarily mean effective visibility. See
1483 // gtk_action_is_visible()
1484 // for that.
1485 // <visible>: %TRUE to make the action visible
1486 void set_visible()(int visible) nothrow {
1487 gtk_action_set_visible(&this, visible);
1490 // VERSION: 2.16
1491 // Sets whether @action is visible when horizontal
1492 // <visible_horizontal>: whether the action is visible horizontally
1493 void set_visible_horizontal()(int visible_horizontal) nothrow {
1494 gtk_action_set_visible_horizontal(&this, visible_horizontal);
1497 // VERSION: 2.16
1498 // Sets whether @action is visible when vertical
1499 // <visible_vertical>: whether the action is visible vertically
1500 void set_visible_vertical()(int visible_vertical) nothrow {
1501 gtk_action_set_visible_vertical(&this, visible_vertical);
1504 // VERSION: 2.16
1505 // Reenable activation signals from the action
1506 void unblock_activate()() nothrow {
1507 gtk_action_unblock_activate(&this);
1510 // VERSION: 2.4
1511 // DEPRECATED (v2.16) method: unblock_activate_from - activatables are now responsible for activating the
1512 // Re-enables calls to the gtk_action_activate()
1513 // function by signals on the given proxy widget. This undoes the
1514 // blocking done by gtk_action_block_activate_from().
1516 // This function is intended for use by action implementations.
1519 // action directly so this doesnt apply anymore.
1520 // <proxy>: a proxy widget
1521 void unblock_activate_from(AT0)(AT0 /*Widget*/ proxy) nothrow {
1522 gtk_action_unblock_activate_from(&this, UpCast!(Widget*)(proxy));
1525 // VERSION: 2.4
1526 // The "activate" signal is emitted when the action is activated.
1527 extern (C) alias static void function (Action* this_, void* user_data=null) nothrow signal_activate;
1529 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1530 return super_.signal_connect!name(cb, data, cf);
1533 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
1534 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1535 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
1536 return signal_connect_data!()(&this, cast(char*)"activate",
1537 cast(GObject2.Callback)cb, data, null, cf);
1541 struct ActionClass {
1542 GObject2.ObjectClass parent_class;
1543 extern (C) void function (Action* action) nothrow activate;
1544 Type menu_item_type, toolbar_item_type;
1545 // RETURNS: a menu item connected to the action.
1546 extern (C) Widget* function (Action* action) nothrow create_menu_item;
1547 // RETURNS: a toolbar item connected to the action.
1548 extern (C) Widget* function (Action* action) nothrow create_tool_item;
1549 // <proxy>: the proxy widget
1550 extern (C) void function (Action* action, Widget* proxy) nothrow connect_proxy;
1551 // <proxy>: the proxy widget
1552 extern (C) void function (Action* action, Widget* proxy) nothrow disconnect_proxy;
1553 // RETURNS: the menu item provided by the
1554 extern (C) Widget* function (Action* action) nothrow create_menu;
1555 extern (C) void function () nothrow _gtk_reserved2;
1556 extern (C) void function () nothrow _gtk_reserved3;
1557 extern (C) void function () nothrow _gtk_reserved4;
1560 struct ActionEntry {
1561 char* name, stock_id, label, accelerator, tooltip;
1562 GObject2.Callback callback;
1565 struct ActionGroup /* : GObject.Object */ {
1566 mixin Buildable.__interface__;
1567 alias parent this;
1568 alias parent super_;
1569 alias parent object;
1570 GObject2.Object parent;
1571 private ActionGroupPrivate* private_data;
1574 // VERSION: 2.4
1575 // Creates a new #GtkActionGroup object. The name of the action group
1576 // is used when associating <link linkend="Action-Accel">keybindings</link>
1577 // with the actions.
1578 // RETURNS: the new #GtkActionGroup
1579 // <name>: the name of the action group.
1580 static ActionGroup* /*new*/ new_(AT0)(AT0 /*char*/ name) nothrow {
1581 return gtk_action_group_new(toCString!(char*)(name));
1583 static auto opCall(AT0)(AT0 /*char*/ name) {
1584 return gtk_action_group_new(toCString!(char*)(name));
1587 // VERSION: 2.4
1588 // Adds an action object to the action group. Note that this function
1589 // does not set up the accel path of the action, which can lead to problems
1590 // if a user tries to modify the accelerator of a menuitem associated with
1591 // the action. Therefore you must either set the accel path yourself with
1592 // gtk_action_set_accel_path(), or use
1593 // <literal>gtk_action_group_add_action_with_accel (..., NULL)</literal>.
1594 // <action>: an action
1595 void add_action(AT0)(AT0 /*Action*/ action) nothrow {
1596 gtk_action_group_add_action(&this, UpCast!(Action*)(action));
1599 // VERSION: 2.4
1600 // Adds an action object to the action group and sets up the accelerator.
1602 // If @accelerator is %NULL, attempts to use the accelerator associated
1603 // with the stock_id of the action.
1605 // Accel paths are set to
1606 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1607 // <action>: the action to add
1608 // <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
1609 void add_action_with_accel(AT0, AT1)(AT0 /*Action*/ action, AT1 /*char*/ accelerator=null) nothrow {
1610 gtk_action_group_add_action_with_accel(&this, UpCast!(Action*)(action), toCString!(char*)(accelerator));
1613 // VERSION: 2.4
1614 // This is a convenience function to create a number of actions and add them
1615 // to the action group.
1617 // The "activate" signals of the actions are connected to the callbacks and
1618 // their accel paths are set to
1619 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1620 // <entries>: an array of action descriptions
1621 // <n_entries>: the number of entries
1622 // <user_data>: data to pass to the action callbacks
1623 void add_actions(AT0, AT1)(AT0 /*ActionEntry*/ entries, uint n_entries, AT1 /*void*/ user_data) nothrow {
1624 gtk_action_group_add_actions(&this, UpCast!(ActionEntry*)(entries), n_entries, UpCast!(void*)(user_data));
1627 // VERSION: 2.4
1628 // This variant of gtk_action_group_add_actions() adds a #GDestroyNotify
1629 // callback for @user_data.
1630 // <entries>: an array of action descriptions
1631 // <n_entries>: the number of entries
1632 // <user_data>: data to pass to the action callbacks
1633 // <destroy>: destroy notification callback for @user_data
1634 void add_actions_full(AT0, AT1)(AT0 /*ActionEntry*/ entries, uint n_entries, AT1 /*void*/ user_data, GLib2.DestroyNotify destroy) nothrow {
1635 gtk_action_group_add_actions_full(&this, UpCast!(ActionEntry*)(entries), n_entries, UpCast!(void*)(user_data), destroy);
1638 // Unintrospectable method: add_radio_actions() / gtk_action_group_add_radio_actions()
1639 // VERSION: 2.4
1640 // This is a convenience routine to create a group of radio actions and
1641 // add them to the action group.
1643 // The "changed" signal of the first radio action is connected to the
1644 // @on_change callback and the accel paths of the actions are set to
1645 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1646 // <entries>: an array of radio action descriptions
1647 // <n_entries>: the number of entries
1648 // <value>: the value of the action to activate initially, or -1 if no action should be activated
1649 // <on_change>: the callback to connect to the changed signal
1650 // <user_data>: data to pass to the action callbacks
1651 void add_radio_actions(AT0, AT1)(AT0 /*RadioActionEntry*/ entries, uint n_entries, int value, GObject2.Callback on_change, AT1 /*void*/ user_data) nothrow {
1652 gtk_action_group_add_radio_actions(&this, UpCast!(RadioActionEntry*)(entries), n_entries, value, on_change, UpCast!(void*)(user_data));
1655 // VERSION: 2.4
1656 // This variant of gtk_action_group_add_radio_actions() adds a
1657 // #GDestroyNotify callback for @user_data.
1658 // <entries>: an array of radio action descriptions
1659 // <n_entries>: the number of entries
1660 // <value>: the value of the action to activate initially, or -1 if no action should be activated
1661 // <on_change>: the callback to connect to the changed signal
1662 // <user_data>: data to pass to the action callbacks
1663 // <destroy>: destroy notification callback for @user_data
1664 void add_radio_actions_full(AT0, AT1)(AT0 /*RadioActionEntry*/ entries, uint n_entries, int value, GObject2.Callback on_change, AT1 /*void*/ user_data, GLib2.DestroyNotify destroy) nothrow {
1665 gtk_action_group_add_radio_actions_full(&this, UpCast!(RadioActionEntry*)(entries), n_entries, value, on_change, UpCast!(void*)(user_data), destroy);
1668 // VERSION: 2.4
1669 // This is a convenience function to create a number of toggle actions and add them
1670 // to the action group.
1672 // The "activate" signals of the actions are connected to the callbacks and
1673 // their accel paths are set to
1674 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1675 // <entries>: an array of toggle action descriptions
1676 // <n_entries>: the number of entries
1677 // <user_data>: data to pass to the action callbacks
1678 void add_toggle_actions(AT0, AT1)(AT0 /*ToggleActionEntry*/ entries, uint n_entries, AT1 /*void*/ user_data) nothrow {
1679 gtk_action_group_add_toggle_actions(&this, UpCast!(ToggleActionEntry*)(entries), n_entries, UpCast!(void*)(user_data));
1682 // VERSION: 2.4
1683 // This variant of gtk_action_group_add_toggle_actions() adds a
1684 // #GDestroyNotify callback for @user_data.
1685 // <entries>: an array of toggle action descriptions
1686 // <n_entries>: the number of entries
1687 // <user_data>: data to pass to the action callbacks
1688 // <destroy>: destroy notification callback for @user_data
1689 void add_toggle_actions_full(AT0, AT1)(AT0 /*ToggleActionEntry*/ entries, uint n_entries, AT1 /*void*/ user_data, GLib2.DestroyNotify destroy) nothrow {
1690 gtk_action_group_add_toggle_actions_full(&this, UpCast!(ToggleActionEntry*)(entries), n_entries, UpCast!(void*)(user_data), destroy);
1693 // VERSION: 2.4
1694 // Looks up an action in the action group by name.
1695 // RETURNS: the action, or %NULL if no action by that name exists
1696 // <action_name>: the name of the action
1697 Action* get_action(AT0)(AT0 /*char*/ action_name) nothrow {
1698 return gtk_action_group_get_action(&this, toCString!(char*)(action_name));
1701 // VERSION: 2.4
1702 // Gets the name of the action group.
1703 // RETURNS: the name of the action group.
1704 char* get_name()() nothrow {
1705 return gtk_action_group_get_name(&this);
1708 // VERSION: 2.4
1709 // Returns %TRUE if the group is sensitive. The constituent actions
1710 // can only be logically sensitive (see gtk_action_is_sensitive()) if
1711 // they are sensitive (see gtk_action_get_sensitive()) and their group
1712 // is sensitive.
1713 // RETURNS: %TRUE if the group is sensitive.
1714 int get_sensitive()() nothrow {
1715 return gtk_action_group_get_sensitive(&this);
1718 // VERSION: 2.4
1719 // Returns %TRUE if the group is visible. The constituent actions
1720 // can only be logically visible (see gtk_action_is_visible()) if
1721 // they are visible (see gtk_action_get_visible()) and their group
1722 // is visible.
1723 // RETURNS: %TRUE if the group is visible.
1724 int get_visible()() nothrow {
1725 return gtk_action_group_get_visible(&this);
1728 // VERSION: 2.4
1729 // Lists the actions in the action group.
1730 // RETURNS: an allocated list of the action objects in the action group
1731 GLib2.List* /*new container*/ list_actions()() nothrow {
1732 return gtk_action_group_list_actions(&this);
1735 // VERSION: 2.4
1736 // Removes an action object from the action group.
1737 // <action>: an action
1738 void remove_action(AT0)(AT0 /*Action*/ action) nothrow {
1739 gtk_action_group_remove_action(&this, UpCast!(Action*)(action));
1742 // VERSION: 2.4
1743 // Changes the sensitivity of @action_group
1744 // <sensitive>: new sensitivity
1745 void set_sensitive()(int sensitive) nothrow {
1746 gtk_action_group_set_sensitive(&this, sensitive);
1749 // VERSION: 2.4
1750 // Sets a function to be used for translating the @label and @tooltip of
1751 // #GtkActionGroupEntry<!-- -->s added by gtk_action_group_add_actions().
1753 // If you're using gettext(), it is enough to set the translation domain
1754 // with gtk_action_group_set_translation_domain().
1755 // <func>: a #GtkTranslateFunc
1756 // <data>: data to be passed to @func and @notify
1757 // <notify>: a #GDestroyNotify function to be called when @action_group is destroyed and when the translation function is changed again
1758 void set_translate_func(AT0)(TranslateFunc func, AT0 /*void*/ data, GLib2.DestroyNotify notify) nothrow {
1759 gtk_action_group_set_translate_func(&this, func, UpCast!(void*)(data), notify);
1762 // VERSION: 2.4
1763 // Sets the translation domain and uses g_dgettext() for translating the
1764 // @label and @tooltip of #GtkActionEntry<!-- -->s added by
1765 // gtk_action_group_add_actions().
1767 // If you're not using gettext() for localization, see
1768 // gtk_action_group_set_translate_func().
1769 // <domain>: the translation domain to use for g_dgettext() calls
1770 void set_translation_domain(AT0)(AT0 /*char*/ domain) nothrow {
1771 gtk_action_group_set_translation_domain(&this, toCString!(char*)(domain));
1774 // VERSION: 2.4
1775 // Changes the visible of @action_group.
1776 // <visible>: new visiblity
1777 void set_visible()(int visible) nothrow {
1778 gtk_action_group_set_visible(&this, visible);
1781 // VERSION: 2.6
1782 // Translates a string using the specified translate_func(). This
1783 // is mainly intended for language bindings.
1784 // RETURNS: the translation of @string
1785 // <string>: a string
1786 char* translate_string(AT0)(AT0 /*char*/ string_) nothrow {
1787 return gtk_action_group_translate_string(&this, toCString!(char*)(string_));
1790 // VERSION: 2.4
1791 // The ::connect-proxy signal is emitted after connecting a proxy to
1792 // an action in the group. Note that the proxy may have been connected
1793 // to a different action before.
1795 // This is intended for simple customizations for which a custom action
1796 // class would be too clumsy, e.g. showing tooltips for menuitems in the
1797 // statusbar.
1799 // #GtkUIManager proxies the signal and provides global notification
1800 // just before any action is connected to a proxy, which is probably more
1801 // convenient to use.
1802 // <action>: the action
1803 // <proxy>: the proxy
1804 extern (C) alias static void function (ActionGroup* this_, Action* action, Widget* proxy, void* user_data=null) nothrow signal_connect_proxy;
1806 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1807 return super_.signal_connect!name(cb, data, cf);
1810 ulong signal_connect(string name:"connect-proxy", CB/*:signal_connect_proxy*/)
1811 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1812 if (is(typeof(cb)==signal_connect_proxy)||_ttmm!(CB, signal_connect_proxy)()) {
1813 return signal_connect_data!()(&this, cast(char*)"connect-proxy",
1814 cast(GObject2.Callback)cb, data, null, cf);
1817 // VERSION: 2.4
1818 // The ::disconnect-proxy signal is emitted after disconnecting a proxy
1819 // from an action in the group.
1821 // #GtkUIManager proxies the signal and provides global notification
1822 // just before any action is connected to a proxy, which is probably more
1823 // convenient to use.
1824 // <action>: the action
1825 // <proxy>: the proxy
1826 extern (C) alias static void function (ActionGroup* this_, Action* action, Widget* proxy, void* user_data=null) nothrow signal_disconnect_proxy;
1827 ulong signal_connect(string name:"disconnect-proxy", CB/*:signal_disconnect_proxy*/)
1828 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1829 if (is(typeof(cb)==signal_disconnect_proxy)||_ttmm!(CB, signal_disconnect_proxy)()) {
1830 return signal_connect_data!()(&this, cast(char*)"disconnect-proxy",
1831 cast(GObject2.Callback)cb, data, null, cf);
1834 // VERSION: 2.4
1835 // The ::post-activate signal is emitted just after the @action in the
1836 // @action_group is activated
1838 // This is intended for #GtkUIManager to proxy the signal and provide global
1839 // notification just after any action is activated.
1840 // <action>: the action
1841 extern (C) alias static void function (ActionGroup* this_, Action* action, void* user_data=null) nothrow signal_post_activate;
1842 ulong signal_connect(string name:"post-activate", CB/*:signal_post_activate*/)
1843 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1844 if (is(typeof(cb)==signal_post_activate)||_ttmm!(CB, signal_post_activate)()) {
1845 return signal_connect_data!()(&this, cast(char*)"post-activate",
1846 cast(GObject2.Callback)cb, data, null, cf);
1849 // VERSION: 2.4
1850 // The ::pre-activate signal is emitted just before the @action in the
1851 // @action_group is activated
1853 // This is intended for #GtkUIManager to proxy the signal and provide global
1854 // notification just before any action is activated.
1855 // <action>: the action
1856 extern (C) alias static void function (ActionGroup* this_, Action* action, void* user_data=null) nothrow signal_pre_activate;
1857 ulong signal_connect(string name:"pre-activate", CB/*:signal_pre_activate*/)
1858 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1859 if (is(typeof(cb)==signal_pre_activate)||_ttmm!(CB, signal_pre_activate)()) {
1860 return signal_connect_data!()(&this, cast(char*)"pre-activate",
1861 cast(GObject2.Callback)cb, data, null, cf);
1865 struct ActionGroupClass {
1866 GObject2.ObjectClass parent_class;
1868 // RETURNS: the action, or %NULL if no action by that name exists
1869 // <action_name>: the name of the action
1870 extern (C) Action* function (ActionGroup* action_group, char* action_name) nothrow get_action;
1871 extern (C) void function () nothrow _gtk_reserved1;
1872 extern (C) void function () nothrow _gtk_reserved2;
1873 extern (C) void function () nothrow _gtk_reserved3;
1874 extern (C) void function () nothrow _gtk_reserved4;
1877 struct ActionGroupPrivate {
1880 struct ActionPrivate {
1884 // Activatable widgets can be connected to a #GtkAction and reflects
1885 // the state of its action. A #GtkActivatable can also provide feedback
1886 // through its action, as they are responsible for activating their
1887 // related actions.
1889 // <refsect2>
1890 // <title>Implementing GtkActivatable</title>
1891 // <para>
1892 // When extending a class that is already #GtkActivatable; it is only
1893 // necessary to implement the #GtkActivatable->sync_action_properties()
1894 // and #GtkActivatable->update() methods and chain up to the parent
1895 // implementation, however when introducing
1896 // a new #GtkActivatable class; the #GtkActivatable:related-action and
1897 // #GtkActivatable:use-action-appearance properties need to be handled by
1898 // the implementor. Handling these properties is mostly a matter of installing
1899 // the action pointer and boolean flag on your instance, and calling
1900 // gtk_activatable_do_set_related_action() and
1901 // gtk_activatable_sync_action_properties() at the appropriate times.
1902 // </para>
1903 // <example>
1904 // <title>A class fragment implementing #GtkActivatable</title>
1905 // <programlisting><![CDATA[
1907 // enum {
1908 // ...
1910 // PROP_ACTIVATABLE_RELATED_ACTION,
1911 // PROP_ACTIVATABLE_USE_ACTION_APPEARANCE
1912 // }
1914 // struct _FooBarPrivate
1915 // {
1917 // ...
1919 // GtkAction *action;
1920 // gboolean use_action_appearance;
1921 // };
1923 // ...
1925 // static void foo_bar_activatable_interface_init (GtkActivatableIface *iface);
1926 // static void foo_bar_activatable_update (GtkActivatable *activatable,
1927 // GtkAction *action,
1928 // const gchar *property_name);
1929 // static void foo_bar_activatable_sync_action_properties (GtkActivatable *activatable,
1930 // GtkAction *action);
1931 // ...
1934 // static void
1935 // foo_bar_class_init (FooBarClass *klass)
1936 // {
1938 // ...
1940 // g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action");
1941 // g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE, "use-action-appearance");
1943 // ...
1944 // }
1947 // static void
1948 // foo_bar_activatable_interface_init (GtkActivatableIface *iface)
1949 // {
1950 // iface->update = foo_bar_activatable_update;
1951 // iface->sync_action_properties = foo_bar_activatable_sync_action_properties;
1952 // }
1954 // ... Break the reference using gtk_activatable_do_set_related_action()...
1956 // static void
1957 // foo_bar_dispose (GObject *object)
1958 // {
1959 // FooBar *bar = FOO_BAR (object);
1960 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1962 // ...
1964 // if (priv->action)
1965 // {
1966 // gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), NULL);
1967 // priv->action = NULL;
1968 // }
1969 // G_OBJECT_CLASS (foo_bar_parent_class)->dispose (object);
1970 // }
1972 // ... Handle the "related-action" and "use-action-appearance" properties ...
1974 // static void
1975 // foo_bar_set_property (GObject *object,
1976 // guint prop_id,
1977 // const GValue *value,
1978 // GParamSpec *pspec)
1979 // {
1980 // FooBar *bar = FOO_BAR (object);
1981 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1983 // switch (prop_id)
1984 // {
1986 // ...
1988 // case PROP_ACTIVATABLE_RELATED_ACTION:
1989 // foo_bar_set_related_action (bar, g_value_get_object (value));
1990 // break;
1991 // case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
1992 // foo_bar_set_use_action_appearance (bar, g_value_get_boolean (value));
1993 // break;
1994 // default:
1995 // G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1996 // break;
1997 // }
1998 // }
2000 // static void
2001 // foo_bar_get_property (GObject *object,
2002 // guint prop_id,
2003 // GValue *value,
2004 // GParamSpec *pspec)
2005 // {
2006 // FooBar *bar = FOO_BAR (object);
2007 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
2009 // switch (prop_id)
2010 // {
2012 // ...
2014 // case PROP_ACTIVATABLE_RELATED_ACTION:
2015 // g_value_set_object (value, priv->action);
2016 // break;
2017 // case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
2018 // g_value_set_boolean (value, priv->use_action_appearance);
2019 // break;
2020 // default:
2021 // G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
2022 // break;
2023 // }
2024 // }
2027 // static void
2028 // foo_bar_set_use_action_appearance (FooBar *bar,
2029 // gboolean use_appearance)
2030 // {
2031 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
2033 // if (priv->use_action_appearance != use_appearance)
2034 // {
2035 // priv->use_action_appearance = use_appearance;
2037 // gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (bar), priv->action);
2038 // }
2039 // }
2041 // ... call gtk_activatable_do_set_related_action() and then assign the action pointer,
2042 // no need to reference the action here since gtk_activatable_do_set_related_action() already
2043 // holds a reference here for you...
2044 // static void
2045 // foo_bar_set_related_action (FooBar *bar,
2046 // GtkAction *action)
2047 // {
2048 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
2050 // if (priv->action == action)
2051 // return;
2053 // gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), action);
2055 // priv->action = action;
2056 // }
2058 // ... Selectively reset and update activatable depending on the use-action-appearance property ...
2059 // static void
2060 // gtk_button_activatable_sync_action_properties (GtkActivatable *activatable,
2061 // GtkAction *action)
2062 // {
2063 // GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
2065 // if (!action)
2066 // return;
2068 // if (gtk_action_is_visible (action))
2069 // gtk_widget_show (GTK_WIDGET (activatable));
2070 // else
2071 // gtk_widget_hide (GTK_WIDGET (activatable));
2073 // gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
2075 // ...
2077 // if (priv->use_action_appearance)
2078 // {
2079 // if (gtk_action_get_stock_id (action))
2080 // foo_bar_set_stock (button, gtk_action_get_stock_id (action));
2081 // else if (gtk_action_get_label (action))
2082 // foo_bar_set_label (button, gtk_action_get_label (action));
2084 // ...
2086 // }
2087 // }
2089 // static void
2090 // foo_bar_activatable_update (GtkActivatable *activatable,
2091 // GtkAction *action,
2092 // const gchar *property_name)
2093 // {
2094 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (activatable);
2096 // if (strcmp (property_name, "visible") == 0)
2097 // {
2098 // if (gtk_action_is_visible (action))
2099 // gtk_widget_show (GTK_WIDGET (activatable));
2100 // else
2101 // gtk_widget_hide (GTK_WIDGET (activatable));
2102 // }
2103 // else if (strcmp (property_name, "sensitive") == 0)
2104 // gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
2106 // ...
2108 // if (!priv->use_action_appearance)
2109 // return;
2111 // if (strcmp (property_name, "stock-id") == 0)
2112 // foo_bar_set_stock (button, gtk_action_get_stock_id (action));
2113 // else if (strcmp (property_name, "label") == 0)
2114 // foo_bar_set_label (button, gtk_action_get_label (action));
2116 // ...
2117 // }]]></programlisting>
2118 // </example>
2119 // </refsect2>
2120 struct Activatable /* Interface */ {
2121 mixin template __interface__() {
2122 // VERSION: 2.16
2123 // This is a utility function for #GtkActivatable implementors.
2125 // When implementing #GtkActivatable you must call this when
2126 // handling changes of the #GtkActivatable:related-action, and
2127 // you must also use this to break references in #GObject->dispose().
2129 // This function adds a reference to the currently set related
2130 // action for you, it also makes sure the #GtkActivatable->update()
2131 // method is called when the related #GtkAction properties change
2132 // and registers to the action's proxy list.
2134 // <note><para>Be careful to call this before setting the local
2135 // copy of the #GtkAction property, since this function uses
2136 // gtk_activatable_get_action() to retrieve the previous action</para></note>
2137 // <action>: the #GtkAction to set
2138 void do_set_related_action(AT0)(AT0 /*Action*/ action) nothrow {
2139 gtk_activatable_do_set_related_action(cast(Activatable*)&this, UpCast!(Action*)(action));
2142 // VERSION: 2.16
2143 // Gets the related #GtkAction for @activatable.
2144 // RETURNS: the related #GtkAction if one is set.
2145 Action* get_related_action()() nothrow {
2146 return gtk_activatable_get_related_action(cast(Activatable*)&this);
2149 // VERSION: 2.16
2150 // Gets whether this activatable should reset its layout
2151 // and appearance when setting the related action or when
2152 // the action changes appearance.
2153 // RETURNS: whether @activatable uses its actions appearance.
2154 int get_use_action_appearance()() nothrow {
2155 return gtk_activatable_get_use_action_appearance(cast(Activatable*)&this);
2158 // VERSION: 2.16
2159 // Sets the related action on the @activatable object.
2161 // <note><para>#GtkActivatable implementors need to handle the #GtkActivatable:related-action
2162 // property and call gtk_activatable_do_set_related_action() when it changes.</para></note>
2163 // <action>: the #GtkAction to set
2164 void set_related_action(AT0)(AT0 /*Action*/ action) nothrow {
2165 gtk_activatable_set_related_action(cast(Activatable*)&this, UpCast!(Action*)(action));
2168 // VERSION: 2.16
2169 // Sets whether this activatable should reset its layout and appearance
2170 // when setting the related action or when the action changes appearance
2172 // <note><para>#GtkActivatable implementors need to handle the
2173 // #GtkActivatable:use-action-appearance property and call
2174 // gtk_activatable_sync_action_properties() to update @activatable
2175 // if needed.</para></note>
2176 // <use_appearance>: whether to use the actions appearance
2177 void set_use_action_appearance()(int use_appearance) nothrow {
2178 gtk_activatable_set_use_action_appearance(cast(Activatable*)&this, use_appearance);
2181 // VERSION: 2.16
2182 // This is called to update the activatable completely, this is called
2183 // internally when the #GtkActivatable::related-action property is set
2184 // or unset and by the implementing class when
2185 // #GtkActivatable::use-action-appearance changes.
2186 // <action>: the related #GtkAction or %NULL
2187 void sync_action_properties(AT0)(AT0 /*Action*/ action=null) nothrow {
2188 gtk_activatable_sync_action_properties(cast(Activatable*)&this, UpCast!(Action*)(action));
2191 mixin __interface__;
2194 struct ActivatableIface /* Version 2.16 */ {
2195 GObject2.TypeInterface g_iface;
2196 extern (C) void function (Activatable* activatable, Action* action, char* property_name) nothrow update;
2197 // <action>: the related #GtkAction or %NULL
2198 extern (C) void function (Activatable* activatable, Action* action=null) nothrow sync_action_properties;
2201 struct Adjustment /* : Object */ {
2202 alias parent_instance this;
2203 alias parent_instance super_;
2204 alias parent_instance object;
2205 Object parent_instance;
2206 double lower, upper, value, step_increment, page_increment, page_size;
2208 static Adjustment* new_()(double value, double lower, double upper, double step_increment, double page_increment, double page_size) nothrow {
2209 return gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size);
2211 static auto opCall()(double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
2212 return gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size);
2214 void changed()() nothrow {
2215 gtk_adjustment_changed(&this);
2217 void clamp_page()(double lower, double upper) nothrow {
2218 gtk_adjustment_clamp_page(&this, lower, upper);
2221 // VERSION: 2.14
2222 // Sets all properties of the adjustment at once.
2224 // Use this function to avoid multiple emissions of the "changed"
2225 // signal. See gtk_adjustment_set_lower() for an alternative way
2226 // of compressing multiple emissions of "changed" into one.
2227 // <value>: the new value
2228 // <lower>: the new minimum value
2229 // <upper>: the new maximum value
2230 // <step_increment>: the new step increment
2231 // <page_increment>: the new page increment
2232 // <page_size>: the new page size
2233 void configure()(double value, double lower, double upper, double step_increment, double page_increment, double page_size) nothrow {
2234 gtk_adjustment_configure(&this, value, lower, upper, step_increment, page_increment, page_size);
2237 // VERSION: 2.14
2238 // Retrieves the minimum value of the adjustment.
2239 // RETURNS: The current minimum value of the adjustment.
2240 double get_lower()() nothrow {
2241 return gtk_adjustment_get_lower(&this);
2244 // VERSION: 2.14
2245 // Retrieves the page increment of the adjustment.
2246 // RETURNS: The current page increment of the adjustment.
2247 double get_page_increment()() nothrow {
2248 return gtk_adjustment_get_page_increment(&this);
2251 // VERSION: 2.14
2252 // Retrieves the page size of the adjustment.
2253 // RETURNS: The current page size of the adjustment.
2254 double get_page_size()() nothrow {
2255 return gtk_adjustment_get_page_size(&this);
2258 // VERSION: 2.14
2259 // Retrieves the step increment of the adjustment.
2260 // RETURNS: The current step increment of the adjustment.
2261 double get_step_increment()() nothrow {
2262 return gtk_adjustment_get_step_increment(&this);
2265 // VERSION: 2.14
2266 // Retrieves the maximum value of the adjustment.
2267 // RETURNS: The current maximum value of the adjustment.
2268 double get_upper()() nothrow {
2269 return gtk_adjustment_get_upper(&this);
2272 // Gets the current value of the adjustment. See
2273 // gtk_adjustment_set_value ().
2274 // RETURNS: The current value of the adjustment.
2275 double get_value()() nothrow {
2276 return gtk_adjustment_get_value(&this);
2279 // VERSION: 2.14
2280 // Sets the minimum value of the adjustment.
2282 // When setting multiple adjustment properties via their individual
2283 // setters, multiple "changed" signals will be emitted. However, since
2284 // the emission of the "changed" signal is tied to the emission of the
2285 // "GObject::notify" signals of the changed properties, it's possible
2286 // to compress the "changed" signals into one by calling
2287 // g_object_freeze_notify() and g_object_thaw_notify() around the
2288 // calls to the individual setters.
2290 // Alternatively, using a single g_object_set() for all the properties
2291 // to change, or using gtk_adjustment_configure() has the same effect
2292 // of compressing "changed" emissions.
2293 // <lower>: the new minimum value
2294 void set_lower()(double lower) nothrow {
2295 gtk_adjustment_set_lower(&this, lower);
2298 // VERSION: 2.14
2299 // Sets the page increment of the adjustment.
2301 // See gtk_adjustment_set_lower() about how to compress multiple
2302 // emissions of the "changed" signal when setting multiple adjustment
2303 // properties.
2304 // <page_increment>: the new page increment
2305 void set_page_increment()(double page_increment) nothrow {
2306 gtk_adjustment_set_page_increment(&this, page_increment);
2309 // VERSION: 2.14
2310 // Sets the page size of the adjustment.
2312 // See gtk_adjustment_set_lower() about how to compress multiple
2313 // emissions of the "changed" signal when setting multiple adjustment
2314 // properties.
2315 // <page_size>: the new page size
2316 void set_page_size()(double page_size) nothrow {
2317 gtk_adjustment_set_page_size(&this, page_size);
2320 // VERSION: 2.14
2321 // Sets the step increment of the adjustment.
2323 // See gtk_adjustment_set_lower() about how to compress multiple
2324 // emissions of the "changed" signal when setting multiple adjustment
2325 // properties.
2326 // <step_increment>: the new step increment
2327 void set_step_increment()(double step_increment) nothrow {
2328 gtk_adjustment_set_step_increment(&this, step_increment);
2331 // VERSION: 2.14
2332 // Sets the maximum value of the adjustment.
2334 // Note that values will be restricted by
2335 // <literal>upper - page-size</literal> if the page-size
2336 // property is nonzero.
2338 // See gtk_adjustment_set_lower() about how to compress multiple
2339 // emissions of the "changed" signal when setting multiple adjustment
2340 // properties.
2341 // <upper>: the new maximum value
2342 void set_upper()(double upper) nothrow {
2343 gtk_adjustment_set_upper(&this, upper);
2345 void set_value()(double value) nothrow {
2346 gtk_adjustment_set_value(&this, value);
2348 void value_changed()() nothrow {
2349 gtk_adjustment_value_changed(&this);
2351 extern (C) alias static void function (Adjustment* this_, void* user_data=null) nothrow signal_changed;
2353 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2354 return super_.signal_connect!name(cb, data, cf);
2357 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
2358 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2359 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
2360 return signal_connect_data!()(&this, cast(char*)"changed",
2361 cast(GObject2.Callback)cb, data, null, cf);
2363 extern (C) alias static void function (Adjustment* this_, void* user_data=null) nothrow signal_value_changed;
2364 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)
2365 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2366 if (is(typeof(cb)==signal_value_changed)||_ttmm!(CB, signal_value_changed)()) {
2367 return signal_connect_data!()(&this, cast(char*)"value-changed",
2368 cast(GObject2.Callback)cb, data, null, cf);
2372 struct AdjustmentClass {
2373 ObjectClass parent_class;
2374 extern (C) void function (Adjustment* adjustment) nothrow changed;
2375 extern (C) void function (Adjustment* adjustment) nothrow value_changed;
2376 extern (C) void function () nothrow _gtk_reserved1;
2377 extern (C) void function () nothrow _gtk_reserved2;
2378 extern (C) void function () nothrow _gtk_reserved3;
2379 extern (C) void function () nothrow _gtk_reserved4;
2383 // The #GtkAlignment widget controls the alignment and size of its child widget.
2384 // It has four settings: xscale, yscale, xalign, and yalign.
2386 // The scale settings are used to specify how much the child widget should
2387 // expand to fill the space allocated to the #GtkAlignment.
2388 // The values can range from 0 (meaning the child doesn't expand at all) to
2389 // 1 (meaning the child expands to fill all of the available space).
2391 // The align settings are used to place the child widget within the available
2392 // area. The values range from 0 (top or left) to 1 (bottom or right).
2393 // Of course, if the scale settings are both set to 1, the alignment settings
2394 // have no effect.
2395 struct Alignment /* : Bin */ {
2396 mixin Atk.ImplementorIface.__interface__;
2397 mixin Buildable.__interface__;
2398 alias bin this;
2399 alias bin super_;
2400 Bin bin;
2401 float xalign, yalign, xscale, yscale;
2404 // Creates a new #GtkAlignment.
2405 // RETURNS: the new #GtkAlignment.
2406 // <xalign>: the horizontal alignment of the child widget, from 0 (left) to 1 (right).
2407 // <yalign>: the vertical alignment of the child widget, from 0 (top) to 1 (bottom).
2408 // <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.
2409 // <yscale>: the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to @xscale.
2410 static Alignment* new_()(float xalign, float yalign, float xscale, float yscale) nothrow {
2411 return gtk_alignment_new(xalign, yalign, xscale, yscale);
2413 static auto opCall()(float xalign, float yalign, float xscale, float yscale) {
2414 return gtk_alignment_new(xalign, yalign, xscale, yscale);
2417 // VERSION: 2.4
2418 // Gets the padding on the different sides of the widget.
2419 // See gtk_alignment_set_padding ().
2420 // <padding_top>: location to store the padding for the top of the widget, or %NULL
2421 // <padding_bottom>: location to store the padding for the bottom of the widget, or %NULL
2422 // <padding_left>: location to store the padding for the left of the widget, or %NULL
2423 // <padding_right>: location to store the padding for the right of the widget, or %NULL
2424 void get_padding(AT0, AT1, AT2, AT3)(/*out*/ AT0 /*uint*/ padding_top=null, /*out*/ AT1 /*uint*/ padding_bottom=null, /*out*/ AT2 /*uint*/ padding_left=null, /*out*/ AT3 /*uint*/ padding_right=null) nothrow {
2425 gtk_alignment_get_padding(&this, UpCast!(uint*)(padding_top), UpCast!(uint*)(padding_bottom), UpCast!(uint*)(padding_left), UpCast!(uint*)(padding_right));
2428 // Sets the #GtkAlignment values.
2429 // <xalign>: the horizontal alignment of the child widget, from 0 (left) to 1 (right).
2430 // <yalign>: the vertical alignment of the child widget, from 0 (top) to 1 (bottom).
2431 // <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.
2432 // <yscale>: the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to @xscale.
2433 void set()(float xalign, float yalign, float xscale, float yscale) nothrow {
2434 gtk_alignment_set(&this, xalign, yalign, xscale, yscale);
2437 // VERSION: 2.4
2438 // Sets the padding on the different sides of the widget.
2439 // The padding adds blank space to the sides of the widget. For instance,
2440 // this can be used to indent the child widget towards the right by adding
2441 // padding on the left.
2442 // <padding_top>: the padding at the top of the widget
2443 // <padding_bottom>: the padding at the bottom of the widget
2444 // <padding_left>: the padding at the left of the widget
2445 // <padding_right>: the padding at the right of the widget.
2446 void set_padding()(uint padding_top, uint padding_bottom, uint padding_left, uint padding_right) nothrow {
2447 gtk_alignment_set_padding(&this, padding_top, padding_bottom, padding_left, padding_right);
2451 struct AlignmentClass {
2452 BinClass parent_class;
2455 struct AlignmentPrivate {
2458 enum AnchorType {
2459 CENTER = 0,
2460 NORTH = 1,
2461 NORTH_WEST = 2,
2462 NORTH_EAST = 3,
2463 SOUTH = 4,
2464 SOUTH_WEST = 5,
2465 SOUTH_EAST = 6,
2466 WEST = 7,
2467 EAST = 8,
2468 N = 1,
2469 NW = 2,
2470 NE = 3,
2471 S = 4,
2472 SW = 5,
2473 SE = 6,
2474 W = 7,
2475 E = 8
2477 struct Arg {
2478 Type type;
2479 char* name;
2481 union d {
2482 char char_data;
2483 ubyte uchar_data;
2484 int bool_data;
2485 int int_data;
2486 uint uint_data;
2487 c_long long_data;
2488 c_ulong ulong_data;
2489 float float_data;
2490 double double_data;
2491 char* string_data;
2492 Object* object_data;
2493 void* pointer_data;
2495 struct signal_data {
2496 GObject2.Callback f;
2497 void* d;
2502 enum ArgFlags {
2503 READABLE = 1,
2504 WRITABLE = 2,
2505 CONSTRUCT = 4,
2506 CONSTRUCT_ONLY = 8,
2507 CHILD_ARG = 16
2510 // GtkArrow should be used to draw simple arrows that need to point in
2511 // one of the four cardinal directions (up, down, left, or right). The
2512 // style of the arrow can be one of shadow in, shadow out, etched in, or
2513 // etched out. Note that these directions and style types may be
2514 // ammended in versions of GTK+ to come.
2516 // GtkArrow will fill any space alloted to it, but since it is inherited
2517 // from #GtkMisc, it can be padded and/or aligned, to fill exactly the
2518 // space the programmer desires.
2520 // Arrows are created with a call to gtk_arrow_new(). The direction or
2521 // style of an arrow can be changed after creation by using gtk_arrow_set().
2522 struct Arrow /* : Misc */ {
2523 mixin Atk.ImplementorIface.__interface__;
2524 mixin Buildable.__interface__;
2525 alias misc this;
2526 alias misc super_;
2527 Misc misc;
2528 short arrow_type, shadow_type;
2531 // Creates a new #GtkArrow widget.
2532 // RETURNS: the new #GtkArrow widget.
2533 // <arrow_type>: a valid #GtkArrowType.
2534 // <shadow_type>: a valid #GtkShadowType.
2535 static Arrow* new_()(ArrowType arrow_type, ShadowType shadow_type) nothrow {
2536 return gtk_arrow_new(arrow_type, shadow_type);
2538 static auto opCall()(ArrowType arrow_type, ShadowType shadow_type) {
2539 return gtk_arrow_new(arrow_type, shadow_type);
2542 // Sets the direction and style of the #GtkArrow, @arrow.
2543 // <arrow_type>: a valid #GtkArrowType.
2544 // <shadow_type>: a valid #GtkShadowType.
2545 void set()(ArrowType arrow_type, ShadowType shadow_type) nothrow {
2546 gtk_arrow_set(&this, arrow_type, shadow_type);
2550 struct ArrowClass {
2551 MiscClass parent_class;
2554 enum ArrowPlacement {
2555 BOTH = 0,
2556 START = 1,
2557 END = 2
2559 enum ArrowType {
2560 UP = 0,
2561 DOWN = 1,
2562 LEFT = 2,
2563 RIGHT = 3,
2564 NONE = 4
2567 // The #GtkAspectFrame is useful when you want
2568 // pack a widget so that it can resize but always retains
2569 // the same aspect ratio. For instance, one might be
2570 // drawing a small preview of a larger image. #GtkAspectFrame
2571 // derives from #GtkFrame, so it can draw a label and
2572 // a frame around the child. The frame will be
2573 // "shrink-wrapped" to the size of the child.
2574 struct AspectFrame /* : Frame */ {
2575 mixin Atk.ImplementorIface.__interface__;
2576 mixin Buildable.__interface__;
2577 alias frame this;
2578 alias frame super_;
2579 Frame frame;
2580 float xalign, yalign, ratio;
2581 int obey_child;
2582 Allocation center_allocation;
2585 // Create a new #GtkAspectFrame.
2586 // RETURNS: the new #GtkAspectFrame.
2587 // <label>: Label text.
2588 // <xalign>: Horizontal alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2589 // <yalign>: Vertical alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2590 // <ratio>: The desired aspect ratio.
2591 // <obey_child>: If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requistion of the child.
2592 static AspectFrame* new_(AT0)(AT0 /*char*/ label, float xalign, float yalign, float ratio, int obey_child) nothrow {
2593 return gtk_aspect_frame_new(toCString!(char*)(label), xalign, yalign, ratio, obey_child);
2595 static auto opCall(AT0)(AT0 /*char*/ label, float xalign, float yalign, float ratio, int obey_child) {
2596 return gtk_aspect_frame_new(toCString!(char*)(label), xalign, yalign, ratio, obey_child);
2599 // Set parameters for an existing #GtkAspectFrame.
2600 // <xalign>: Horizontal alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2601 // <yalign>: Vertical alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2602 // <ratio>: The desired aspect ratio.
2603 // <obey_child>: If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requistion of the child.
2604 void set()(float xalign, float yalign, float ratio, int obey_child) nothrow {
2605 gtk_aspect_frame_set(&this, xalign, yalign, ratio, obey_child);
2609 struct AspectFrameClass {
2610 FrameClass parent_class;
2614 // A #GtkAssistant is a widget used to represent a generally complex
2615 // operation splitted in several steps, guiding the user through its pages
2616 // and controlling the page flow to collect the necessary data.
2618 // <refsect2 id="GtkAssistant-BUILDER-UI">
2619 // <title>GtkAssistant as GtkBuildable</title>
2620 // <para>
2621 // The GtkAssistant implementation of the GtkBuildable interface exposes the
2622 // @action_area as internal children with the name "action_area".
2624 // To add pages to an assistant in GtkBuilder, simply add it as a
2625 // &lt;child&gt; to the GtkAssistant object, and set its child properties
2626 // as necessary.
2627 // </para>
2628 // </refsect2>
2629 struct Assistant /* : Window */ {
2630 mixin Atk.ImplementorIface.__interface__;
2631 mixin Buildable.__interface__;
2632 alias parent this;
2633 alias parent super_;
2634 alias parent window;
2635 Window parent;
2636 Widget* cancel_, forward, back, apply_, close_, last;
2637 private AssistantPrivate* priv;
2640 // VERSION: 2.10
2641 // Creates a new #GtkAssistant.
2642 // RETURNS: a newly created #GtkAssistant
2643 static Assistant* new_()() nothrow {
2644 return gtk_assistant_new();
2646 static auto opCall()() {
2647 return gtk_assistant_new();
2650 // VERSION: 2.10
2651 // Adds a widget to the action area of a #GtkAssistant.
2652 // <child>: a #GtkWidget
2653 void add_action_widget(AT0)(AT0 /*Widget*/ child) nothrow {
2654 gtk_assistant_add_action_widget(&this, UpCast!(Widget*)(child));
2657 // VERSION: 2.10
2658 // Appends a page to the @assistant.
2659 // RETURNS: the index (starting at 0) of the inserted page
2660 // <page>: a #GtkWidget
2661 int append_page(AT0)(AT0 /*Widget*/ page) nothrow {
2662 return gtk_assistant_append_page(&this, UpCast!(Widget*)(page));
2665 // VERSION: 2.22
2666 // Erases the visited page history so the back button is not
2667 // shown on the current page, and removes the cancel button
2668 // from subsequent pages.
2670 // Use this when the information provided up to the current
2671 // page is hereafter deemed permanent and cannot be modified
2672 // or undone. For example, showing a progress page to track
2673 // a long-running, unreversible operation after the user has
2674 // clicked apply on a confirmation page.
2675 void commit()() nothrow {
2676 gtk_assistant_commit(&this);
2679 // VERSION: 2.10
2680 // Returns the page number of the current page
2682 // the @assistant, if the @assistant has no pages, -1 will be returned
2683 // RETURNS: The index (starting from 0) of the current page in
2684 int get_current_page()() nothrow {
2685 return gtk_assistant_get_current_page(&this);
2688 // VERSION: 2.10
2689 // Returns the number of pages in the @assistant
2690 // RETURNS: The number of pages in the @assistant.
2691 int get_n_pages()() nothrow {
2692 return gtk_assistant_get_n_pages(&this);
2695 // VERSION: 2.10
2696 // Returns the child widget contained in page number @page_num.
2698 // if @page_num is out of bounds.
2699 // RETURNS: The child widget, or %NULL
2700 // <page_num>: The index of a page in the @assistant, or -1 to get the last page;
2701 Widget* get_nth_page()(int page_num) nothrow {
2702 return gtk_assistant_get_nth_page(&this, page_num);
2705 // VERSION: 2.10
2706 // Gets whether @page is complete.
2707 // RETURNS: %TRUE if @page is complete.
2708 // <page>: a page of @assistant
2709 int get_page_complete(AT0)(AT0 /*Widget*/ page) nothrow {
2710 return gtk_assistant_get_page_complete(&this, UpCast!(Widget*)(page));
2713 // VERSION: 2.10
2714 // Gets the header image for @page.
2716 // if there's no header image for the page.
2717 // RETURNS: the header image for @page, or %NULL
2718 // <page>: a page of @assistant
2719 GdkPixbuf2.Pixbuf* get_page_header_image(AT0)(AT0 /*Widget*/ page) nothrow {
2720 return gtk_assistant_get_page_header_image(&this, UpCast!(Widget*)(page));
2723 // VERSION: 2.10
2724 // Gets the header image for @page.
2726 // if there's no side image for the page.
2727 // RETURNS: the side image for @page, or %NULL
2728 // <page>: a page of @assistant
2729 GdkPixbuf2.Pixbuf* get_page_side_image(AT0)(AT0 /*Widget*/ page) nothrow {
2730 return gtk_assistant_get_page_side_image(&this, UpCast!(Widget*)(page));
2733 // VERSION: 2.10
2734 // Gets the title for @page.
2735 // RETURNS: the title for @page.
2736 // <page>: a page of @assistant
2737 char* get_page_title(AT0)(AT0 /*Widget*/ page) nothrow {
2738 return gtk_assistant_get_page_title(&this, UpCast!(Widget*)(page));
2741 // VERSION: 2.10
2742 // Gets the page type of @page.
2743 // RETURNS: the page type of @page.
2744 // <page>: a page of @assistant
2745 AssistantPageType get_page_type(AT0)(AT0 /*Widget*/ page) nothrow {
2746 return gtk_assistant_get_page_type(&this, UpCast!(Widget*)(page));
2749 // VERSION: 2.10
2750 // Inserts a page in the @assistant at a given position.
2751 // RETURNS: the index (starting from 0) of the inserted page
2752 // <page>: a #GtkWidget
2753 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page to the @assistant
2754 int insert_page(AT0)(AT0 /*Widget*/ page, int position) nothrow {
2755 return gtk_assistant_insert_page(&this, UpCast!(Widget*)(page), position);
2758 // VERSION: 2.10
2759 // Prepends a page to the @assistant.
2760 // RETURNS: the index (starting at 0) of the inserted page
2761 // <page>: a #GtkWidget
2762 int prepend_page(AT0)(AT0 /*Widget*/ page) nothrow {
2763 return gtk_assistant_prepend_page(&this, UpCast!(Widget*)(page));
2766 // VERSION: 2.10
2767 // Removes a widget from the action area of a #GtkAssistant.
2768 // <child>: a #GtkWidget
2769 void remove_action_widget(AT0)(AT0 /*Widget*/ child) nothrow {
2770 gtk_assistant_remove_action_widget(&this, UpCast!(Widget*)(child));
2773 // VERSION: 2.10
2774 // Switches the page to @page_num. Note that this will only be necessary
2775 // in custom buttons, as the @assistant flow can be set with
2776 // gtk_assistant_set_forward_page_func().
2777 // <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.
2778 void set_current_page()(int page_num) nothrow {
2779 gtk_assistant_set_current_page(&this, page_num);
2782 // VERSION: 2.10
2783 // Sets the page forwarding function to be @page_func, this function will
2784 // be used to determine what will be the next page when the user presses
2785 // the forward button. Setting @page_func to %NULL will make the assistant
2786 // to use the default forward function, which just goes to the next visible
2787 // page.
2788 // <page_func>: the #GtkAssistantPageFunc, or %NULL to use the default one
2789 // <data>: user data for @page_func
2790 // <destroy>: destroy notifier for @data
2791 void set_forward_page_func(AT0)(AssistantPageFunc page_func, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
2792 gtk_assistant_set_forward_page_func(&this, page_func, UpCast!(void*)(data), destroy);
2795 // VERSION: 2.10
2796 // Sets whether @page contents are complete. This will make
2797 // @assistant update the buttons state to be able to continue the task.
2798 // <page>: a page of @assistant
2799 // <complete>: the completeness status of the page
2800 void set_page_complete(AT0)(AT0 /*Widget*/ page, int complete) nothrow {
2801 gtk_assistant_set_page_complete(&this, UpCast!(Widget*)(page), complete);
2804 // VERSION: 2.10
2805 // Sets a header image for @page. This image is displayed in the header
2806 // area of the assistant when @page is the current page.
2807 // <page>: a page of @assistant
2808 // <pixbuf>: the new header image @page
2809 void set_page_header_image(AT0, AT1)(AT0 /*Widget*/ page, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) nothrow {
2810 gtk_assistant_set_page_header_image(&this, UpCast!(Widget*)(page), UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
2813 // VERSION: 2.10
2814 // Sets a header image for @page. This image is displayed in the side
2815 // area of the assistant when @page is the current page.
2816 // <page>: a page of @assistant
2817 // <pixbuf>: the new header image @page
2818 void set_page_side_image(AT0, AT1)(AT0 /*Widget*/ page, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) nothrow {
2819 gtk_assistant_set_page_side_image(&this, UpCast!(Widget*)(page), UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
2822 // VERSION: 2.10
2823 // Sets a title for @page. The title is displayed in the header
2824 // area of the assistant when @page is the current page.
2825 // <page>: a page of @assistant
2826 // <title>: the new title for @page
2827 void set_page_title(AT0, AT1)(AT0 /*Widget*/ page, AT1 /*char*/ title) nothrow {
2828 gtk_assistant_set_page_title(&this, UpCast!(Widget*)(page), toCString!(char*)(title));
2831 // VERSION: 2.10
2832 // Sets the page type for @page. The page type determines the page
2833 // behavior in the @assistant.
2834 // <page>: a page of @assistant
2835 // <type>: the new type for @page
2836 void set_page_type(AT0)(AT0 /*Widget*/ page, AssistantPageType type) nothrow {
2837 gtk_assistant_set_page_type(&this, UpCast!(Widget*)(page), type);
2840 // VERSION: 2.10
2841 // Forces @assistant to recompute the buttons state.
2843 // GTK+ automatically takes care of this in most situations,
2844 // e.g. when the user goes to a different page, or when the
2845 // visibility or completeness of a page changes.
2847 // One situation where it can be necessary to call this
2848 // function is when changing a value on the current page
2849 // affects the future page flow of the assistant.
2850 void update_buttons_state()() nothrow {
2851 gtk_assistant_update_buttons_state(&this);
2854 // VERSION: 2.10
2855 // The ::apply signal is emitted when the apply button is clicked. The default
2856 // behavior of the #GtkAssistant is to switch to the page after the current
2857 // page, unless the current page is the last one.
2859 // A handler for the ::apply signal should carry out the actions for which
2860 // the wizard has collected data. If the action takes a long time to complete,
2861 // you might consider putting a page of type %GTK_ASSISTANT_PAGE_PROGRESS
2862 // after the confirmation page and handle this operation within the
2863 // #GtkAssistant::prepare signal of the progress page.
2864 extern (C) alias static void function (Assistant* this_, void* user_data=null) nothrow signal_apply;
2866 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2867 return super_.signal_connect!name(cb, data, cf);
2870 ulong signal_connect(string name:"apply", CB/*:signal_apply*/)
2871 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2872 if (is(typeof(cb)==signal_apply)||_ttmm!(CB, signal_apply)()) {
2873 return signal_connect_data!()(&this, cast(char*)"apply",
2874 cast(GObject2.Callback)cb, data, null, cf);
2877 // VERSION: 2.10
2878 // The ::cancel signal is emitted when then the cancel button is clicked.
2879 extern (C) alias static void function (Assistant* this_, void* user_data=null) nothrow signal_cancel;
2880 ulong signal_connect(string name:"cancel", CB/*:signal_cancel*/)
2881 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2882 if (is(typeof(cb)==signal_cancel)||_ttmm!(CB, signal_cancel)()) {
2883 return signal_connect_data!()(&this, cast(char*)"cancel",
2884 cast(GObject2.Callback)cb, data, null, cf);
2887 // VERSION: 2.10
2888 // The ::close signal is emitted either when the close button of
2889 // a summary page is clicked, or when the apply button in the last
2890 // page in the flow (of type %GTK_ASSISTANT_PAGE_CONFIRM) is clicked.
2891 extern (C) alias static void function (Assistant* this_, void* user_data=null) nothrow signal_close;
2892 ulong signal_connect(string name:"close", CB/*:signal_close*/)
2893 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2894 if (is(typeof(cb)==signal_close)||_ttmm!(CB, signal_close)()) {
2895 return signal_connect_data!()(&this, cast(char*)"close",
2896 cast(GObject2.Callback)cb, data, null, cf);
2899 // VERSION: 2.10
2900 // The ::prepare signal is emitted when a new page is set as the assistant's
2901 // current page, before making the new page visible. A handler for this signal
2902 // can do any preparation which are necessary before showing @page.
2903 // <page>: the current page
2904 extern (C) alias static void function (Assistant* this_, Widget* page, void* user_data=null) nothrow signal_prepare;
2905 ulong signal_connect(string name:"prepare", CB/*:signal_prepare*/)
2906 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
2907 if (is(typeof(cb)==signal_prepare)||_ttmm!(CB, signal_prepare)()) {
2908 return signal_connect_data!()(&this, cast(char*)"prepare",
2909 cast(GObject2.Callback)cb, data, null, cf);
2913 struct AssistantClass {
2914 WindowClass parent_class;
2915 extern (C) void function (Assistant* assistant, Widget* page) nothrow prepare;
2916 extern (C) void function (Assistant* assistant) nothrow apply;
2917 extern (C) void function (Assistant* assistant) nothrow close;
2918 extern (C) void function (Assistant* assistant) nothrow cancel;
2919 extern (C) void function () nothrow _gtk_reserved1;
2920 extern (C) void function () nothrow _gtk_reserved2;
2921 extern (C) void function () nothrow _gtk_reserved3;
2922 extern (C) void function () nothrow _gtk_reserved4;
2923 extern (C) void function () nothrow _gtk_reserved5;
2927 // A function used by gtk_assistant_set_forward_page_func() to know which
2928 // is the next page given a current one. It's called both for computing the
2929 // next page when the user presses the "forward" button and for handling
2930 // the behavior of the "last" button.
2931 // RETURNS: The next page number.
2932 // <current_page>: The page number used to calculate the next page.
2933 // <data>: user data.
2934 extern (C) alias int function (int current_page, void* data) nothrow AssistantPageFunc;
2937 // An enum for determining the page role inside the #GtkAssistant. It's
2938 // used to handle buttons sensitivity and visibility.
2940 // Note that an assistant needs to end its page flow with a page of type
2941 // %GTK_ASSISTANT_PAGE_CONFIRM, %GTK_ASSISTANT_PAGE_SUMMARY or
2942 // %GTK_ASSISTANT_PAGE_PROGRESS to be correct.
2943 enum AssistantPageType {
2944 CONTENT = 0,
2945 INTRO = 1,
2946 CONFIRM = 2,
2947 SUMMARY = 3,
2948 PROGRESS = 4
2950 struct AssistantPrivate {
2953 enum AttachOptions {
2954 EXPAND = 1,
2955 SHRINK = 2,
2956 FILL = 4
2958 enum int BINARY_AGE = 2410;
2959 enum int BUTTONBOX_DEFAULT = -1;
2961 // The #GtkBin widget is a container with just one child.
2962 // It is not very useful itself, but it is useful for deriving subclasses,
2963 // since it provides common code needed for handling a single child widget.
2965 // Many GTK+ widgets are subclasses of #GtkBin, including #GtkWindow,
2966 // #GtkButton, #GtkFrame, #GtkHandleBox or #GtkScrolledWindow.
2967 struct Bin /* : Container */ {
2968 mixin Atk.ImplementorIface.__interface__;
2969 mixin Buildable.__interface__;
2970 alias container this;
2971 alias container super_;
2972 Container container;
2973 Widget* child;
2976 // Gets the child of the #GtkBin, or %NULL if the bin contains
2977 // no child widget. The returned widget does not have a reference
2978 // added, so you do not need to unref it.
2979 // RETURNS: pointer to child of the #GtkBin
2980 Widget* get_child()() nothrow {
2981 return gtk_bin_get_child(&this);
2985 struct BinClass {
2986 ContainerClass parent_class;
2989 struct BindingArg {
2990 Type arg_type;
2992 union d {
2993 c_long long_data;
2994 double double_data;
2995 char* string_data;
2999 struct BindingEntry {
3000 uint keyval;
3001 Gdk2.ModifierType modifiers;
3002 BindingSet* binding_set;
3003 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3004 uint, "destroyed", 1,
3005 uint, "in_emission", 1,
3006 uint, "marks_unbound", 1,
3007 uint, "__dummy32A", 29));
3008 BindingEntry* set_next, hash_next;
3009 BindingSignal* signals;
3012 // Unintrospectable function: add_signal() / gtk_binding_entry_add_signal()
3013 // Override or install a new key binding for @keyval with @modifiers on
3014 // @binding_set. When the binding is activated, @signal_name will be
3015 // emitted on the target widget, with @n_args @Varargs used as
3016 // arguments.
3017 // <binding_set>: a #GtkBindingSet to install an entry for
3018 // <keyval>: key value of binding to install
3019 // <modifiers>: key modifier of binding to install
3020 // <signal_name>: signal to execute upon activation
3021 // <n_args>: number of arguments to @signal_name
3022 alias gtk_binding_entry_add_signal add_signal; // Variadic
3024 // Override or install a new key binding for @keyval with @modifiers on
3025 // @binding_set.
3026 // <binding_set>: a #GtkBindingSet to add a signal to
3027 // <keyval>: key value
3028 // <modifiers>: key modifier
3029 // <signal_name>: signal name to be bound
3030 // <binding_args>: list of #GtkBindingArg signal arguments
3031 static void add_signall(AT0, AT1, AT2)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers, AT1 /*char*/ signal_name, AT2 /*GLib2.SList*/ binding_args) nothrow {
3032 gtk_binding_entry_add_signall(UpCast!(BindingSet*)(binding_set), keyval, modifiers, toCString!(char*)(signal_name), UpCast!(GLib2.SList*)(binding_args));
3035 // DEPRECATED (v2.12) function: clear - Use gtk_binding_entry_remove() instead.
3036 // Clears a binding entry.
3037 // <binding_set>: binding set to clear an entry of
3038 // <keyval>: key value of binding to clear
3039 // <modifiers>: key modifier of binding to clear
3040 static void clear(AT0)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow {
3041 gtk_binding_entry_clear(UpCast!(BindingSet*)(binding_set), keyval, modifiers);
3044 // Remove a binding previously installed via
3045 // gtk_binding_entry_add_signal() on @binding_set.
3046 // <binding_set>: a #GtkBindingSet to remove an entry of
3047 // <keyval>: key value of binding to remove
3048 // <modifiers>: key modifier of binding to remove
3049 static void remove(AT0)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow {
3050 gtk_binding_entry_remove(UpCast!(BindingSet*)(binding_set), keyval, modifiers);
3053 // VERSION: 2.12
3054 // Install a binding on @binding_set which causes key lookups
3055 // to be aborted, to prevent bindings from lower priority sets
3056 // to be activated.
3057 // <binding_set>: a #GtkBindingSet to skip an entry of
3058 // <keyval>: key value of binding to skip
3059 // <modifiers>: key modifier of binding to skip
3060 static void skip(AT0)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow {
3061 gtk_binding_entry_skip(UpCast!(BindingSet*)(binding_set), keyval, modifiers);
3065 struct BindingSet {
3066 char* set_name;
3067 int priority;
3068 GLib2.SList* widget_path_pspecs, widget_class_pspecs, class_branch_pspecs;
3069 BindingEntry* entries, current;
3070 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3071 uint, "parsed", 1,
3072 uint, "__dummy32A", 31));
3075 // Find a key binding matching @keyval and @modifiers within
3076 // @binding_set and activate the binding on @object.
3077 // RETURNS: %TRUE if a binding was found and activated
3078 // <keyval>: key value of the binding
3079 // <modifiers>: key modifier of the binding
3080 // <object>: object to activate when binding found
3081 int activate(AT0)(uint keyval, Gdk2.ModifierType modifiers, AT0 /*Object*/ object) nothrow {
3082 return gtk_binding_set_activate(&this, keyval, modifiers, UpCast!(Object*)(object));
3085 // This function is used internally by the GtkRC parsing mechanism to
3086 // assign match patterns to #GtkBindingSet structures.
3087 // <path_type>: path type the pattern applies to
3088 // <path_pattern>: the actual match pattern
3089 // <priority>: binding priority
3090 void add_path(AT0)(PathType path_type, AT0 /*char*/ path_pattern, PathPriorityType priority) nothrow {
3091 gtk_binding_set_add_path(&this, path_type, toCString!(char*)(path_pattern), priority);
3094 // Unintrospectable function: by_class() / gtk_binding_set_by_class()
3095 // This function returns the binding set named after the type name of
3096 // the passed in class structure. New binding sets are created on
3097 // demand by this function.
3098 // RETURNS: the binding set corresponding to @object_class
3099 // <object_class>: a valid #GtkObject class
3100 static BindingSet* by_class(AT0)(AT0 /*void*/ object_class) nothrow {
3101 return gtk_binding_set_by_class(UpCast!(void*)(object_class));
3104 // Find a binding set by its globally unique name. The @set_name can
3105 // either be a name used for gtk_binding_set_new() or the type name of
3106 // a class used in gtk_binding_set_by_class().
3107 // RETURNS: %NULL or the specified binding set
3108 // <set_name>: unique binding set name
3109 static BindingSet* find(AT0)(AT0 /*char*/ set_name) nothrow {
3110 return gtk_binding_set_find(toCString!(char*)(set_name));
3113 // Unintrospectable function: new() / gtk_binding_set_new()
3114 // GTK+ maintains a global list of binding sets. Each binding set has
3115 // a unique name which needs to be specified upon creation.
3116 // RETURNS: new binding set
3117 // <set_name>: unique name of this binding set
3118 static BindingSet* new_(AT0)(AT0 /*char*/ set_name) nothrow {
3119 return gtk_binding_set_new(toCString!(char*)(set_name));
3123 struct BindingSignal {
3124 BindingSignal* next;
3125 char* signal_name;
3126 uint n_args;
3127 BindingArg* args;
3130 struct Border {
3131 int left, right, top, bottom;
3134 // VERSION: 2.14
3135 // Allocates a new #GtkBorder structure and initializes its elements to zero.
3137 // freed with gtk_border_free()
3138 // RETURNS: a new empty #GtkBorder. The newly allocated #GtkBorder should be
3139 static Border* /*new*/ new_()() nothrow {
3140 return gtk_border_new();
3142 static auto opCall()() {
3143 return gtk_border_new();
3146 // Copies a #GtkBorder structure.
3147 // RETURNS: a copy of @border_.
3148 Border* /*new*/ copy()() nothrow {
3149 return gtk_border_copy(&this);
3151 // Frees a #GtkBorder structure.
3152 void free()() nothrow {
3153 gtk_border_free(&this);
3157 struct Box /* : Container */ {
3158 mixin Atk.ImplementorIface.__interface__;
3159 mixin Buildable.__interface__;
3160 mixin Orientable.__interface__;
3161 alias container this;
3162 alias container super_;
3163 Container container;
3164 GLib2.List* children;
3165 short spacing;
3166 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3167 uint, "homogeneous", 1,
3168 uint, "__dummy32A", 31));
3171 // Returns whether the box is homogeneous (all children are the
3172 // same size). See gtk_box_set_homogeneous().
3173 // RETURNS: %TRUE if the box is homogeneous.
3174 int get_homogeneous()() nothrow {
3175 return gtk_box_get_homogeneous(&this);
3178 // Gets the value set by gtk_box_set_spacing().
3179 // RETURNS: spacing between children
3180 int get_spacing()() nothrow {
3181 return gtk_box_get_spacing(&this);
3184 // Adds @child to @box, packed with reference to the end of @box.
3185 // The @child is packed after (away from end of) any other child
3186 // packed with reference to the end of @box.
3187 // <child>: the #GtkWidget to be added to @box
3188 // <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
3189 // <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
3190 // <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 @child and the reference edge of @box
3191 void pack_end(AT0)(AT0 /*Widget*/ child, int expand, int fill, uint padding) nothrow {
3192 gtk_box_pack_end(&this, UpCast!(Widget*)(child), expand, fill, padding);
3195 // DEPRECATED (v2.14) method: pack_end_defaults - Use gtk_box_pack_end()
3196 // Adds @widget to @box, packed with reference to the end of @box.
3197 // The child is packed after any other child packed with reference
3198 // to the start of @box.
3200 // Parameters for how to pack the child @widget, #GtkBox:expand,
3201 // #GtkBox:fill and #GtkBox:padding, are given their default
3202 // values, %TRUE, %TRUE, and 0, respectively.
3203 // <widget>: the #GtkWidget to be added to @box
3204 void pack_end_defaults(AT0)(AT0 /*Widget*/ widget) nothrow {
3205 gtk_box_pack_end_defaults(&this, UpCast!(Widget*)(widget));
3208 // Adds @child to @box, packed with reference to the start of @box.
3209 // The @child is packed after any other child packed with reference
3210 // to the start of @box.
3211 // <child>: the #GtkWidget to be added to @box
3212 // <expand>: %TRUE if the new child is to be given extra space allocated to
3213 // <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
3214 // <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 @child and the reference edge of @box
3215 void pack_start(AT0)(AT0 /*Widget*/ child, int expand, int fill, uint padding) nothrow {
3216 gtk_box_pack_start(&this, UpCast!(Widget*)(child), expand, fill, padding);
3219 // DEPRECATED (v2.14) method: pack_start_defaults - Use gtk_box_pack_start()
3220 // Adds @widget to @box, packed with reference to the start of @box.
3221 // The child is packed after any other child packed with reference
3222 // to the start of @box.
3224 // Parameters for how to pack the child @widget, #GtkBox:expand,
3225 // #GtkBox:fill and #GtkBox:padding, are given their default
3226 // values, %TRUE, %TRUE, and 0, respectively.
3227 // <widget>: the #GtkWidget to be added to @box
3228 void pack_start_defaults(AT0)(AT0 /*Widget*/ widget) nothrow {
3229 gtk_box_pack_start_defaults(&this, UpCast!(Widget*)(widget));
3232 // Obtains information about how @child is packed into @box.
3233 // <child>: the #GtkWidget of the child to query
3234 // <expand>: pointer to return location for #GtkBox:expand child property
3235 // <fill>: pointer to return location for #GtkBox:fill child property
3236 // <padding>: pointer to return location for #GtkBox:padding child property
3237 // <pack_type>: pointer to return location for #GtkBox:pack-type child property
3238 void query_child_packing(AT0, AT1, AT2)(AT0 /*Widget*/ child, int* expand, int* fill, AT1 /*uint*/ padding, AT2 /*PackType*/ pack_type) nothrow {
3239 gtk_box_query_child_packing(&this, UpCast!(Widget*)(child), expand, fill, UpCast!(uint*)(padding), UpCast!(PackType*)(pack_type));
3242 // Moves @child to a new @position in the list of @box children.
3243 // The list is the <structfield>children</structfield> field of
3244 // #GtkBox-struct, and contains both widgets packed #GTK_PACK_START
3245 // as well as widgets packed #GTK_PACK_END, in the order that these
3246 // widgets were added to @box.
3248 // A widget's position in the @box children list determines where
3249 // the widget is packed into @box. A child widget at some position
3250 // in the list will be packed just after all other widgets of the
3251 // same packing type that appear earlier in the list.
3252 // <child>: the #GtkWidget to move
3253 // <position>: the new position for @child in the list of children of @box, starting from 0. If negative, indicates the end of the list
3254 void reorder_child(AT0)(AT0 /*Widget*/ child, int position) nothrow {
3255 gtk_box_reorder_child(&this, UpCast!(Widget*)(child), position);
3258 // Sets the way @child is packed into @box.
3259 // <child>: the #GtkWidget of the child to set
3260 // <expand>: the new value of the #GtkBox:expand child property
3261 // <fill>: the new value of the #GtkBox:fill child property
3262 // <padding>: the new value of the #GtkBox:padding child property
3263 // <pack_type>: the new value of the #GtkBox:pack-type child property
3264 void set_child_packing(AT0)(AT0 /*Widget*/ child, int expand, int fill, uint padding, PackType pack_type) nothrow {
3265 gtk_box_set_child_packing(&this, UpCast!(Widget*)(child), expand, fill, padding, pack_type);
3268 // Sets the #GtkBox:homogeneous property of @box, controlling
3269 // whether or not all children of @box are given equal space
3270 // in the box.
3271 // <homogeneous>: a boolean value, %TRUE to create equal allotments, %FALSE for variable allotments
3272 void set_homogeneous()(int homogeneous) nothrow {
3273 gtk_box_set_homogeneous(&this, homogeneous);
3276 // Sets the #GtkBox:spacing property of @box, which is the
3277 // number of pixels to place between children of @box.
3278 // <spacing>: the number of pixels to put between children
3279 void set_spacing()(int spacing) nothrow {
3280 gtk_box_set_spacing(&this, spacing);
3285 // The #GtkBoxChild holds a child widget of #GtkBox and describes how the child
3286 // is to be packed into the #GtkBox. All fields of this #GtkBoxChild should be
3287 // considered read-only and they should never be set directly by an application.
3288 // Use gtk_box_query_child_packing() and gtk_box_set_child_packing() to query
3289 // and set the #GtkBoxChild.padding, #GtkBoxChild.expand, #GtkBoxChild.fill and
3290 // #GtkBoxChild.pack fields.
3291 struct BoxChild {
3292 Widget* widget;
3293 ushort padding;
3294 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3295 uint, "expand", 1,
3296 uint, "fill", 1,
3297 uint, "pack", 1,
3298 uint, "is_secondary", 1,
3299 uint, "__dummy32A", 28));
3302 struct BoxClass {
3303 ContainerClass parent_class;
3307 // In order to allow construction from a <link linkend="BUILDER-UI">GtkBuilder
3308 // UI description</link>, an object class must implement the
3309 // GtkBuildable interface. The interface includes methods for setting
3310 // names and properties of objects, parsing custom tags, constructing
3311 // child objects.
3313 // The GtkBuildable interface is implemented by all widgets and
3314 // many of the non-widget objects that are provided by GTK+. The
3315 // main user of this interface is #GtkBuilder, there should be
3316 // very little need for applications to call any
3317 // <function>gtk_buildable_...</function> functions.
3318 struct Buildable /* Interface */ {
3319 mixin template __interface__() {
3320 // VERSION: 2.12
3321 // Adds a child to @buildable. @type is an optional string
3322 // describing how the child should be added.
3323 // <builder>: a #GtkBuilder
3324 // <child>: child to add
3325 // <type>: kind of child or %NULL
3326 void add_child(AT0, AT1, AT2)(AT0 /*Builder*/ builder, AT1 /*GObject2.Object*/ child, AT2 /*char*/ type=null) nothrow {
3327 gtk_buildable_add_child(cast(Buildable*)&this, UpCast!(Builder*)(builder), UpCast!(GObject2.Object*)(child), toCString!(char*)(type));
3330 // VERSION: 2.12
3331 // Constructs a child of @buildable with the name @name.
3333 // #GtkBuilder calls this function if a "constructor" has been
3334 // specified in the UI definition.
3335 // RETURNS: the constructed child
3336 // <builder>: #GtkBuilder used to construct this object
3337 // <name>: name of child to construct
3338 GObject2.Object* /*new*/ construct_child(AT0, AT1)(AT0 /*Builder*/ builder, AT1 /*char*/ name) nothrow {
3339 return gtk_buildable_construct_child(cast(Buildable*)&this, UpCast!(Builder*)(builder), toCString!(char*)(name));
3342 // VERSION: 2.12
3343 // This is similar to gtk_buildable_parser_finished() but is
3344 // called once for each custom tag handled by the @buildable.
3345 // <builder>: a #GtkBuilder
3346 // <child>: child object or %NULL for non-child tags
3347 // <tagname>: the name of the tag
3348 // <data>: user data created in custom_tag_start
3349 void custom_finished(AT0, AT1, AT2, AT3)(AT0 /*Builder*/ builder, AT1 /*GObject2.Object*/ child, AT2 /*char*/ tagname, AT3 /*void*/ data) nothrow {
3350 gtk_buildable_custom_finished(cast(Buildable*)&this, UpCast!(Builder*)(builder), UpCast!(GObject2.Object*)(child), toCString!(char*)(tagname), UpCast!(void*)(data));
3353 // VERSION: 2.12
3354 // This is called at the end of each custom element handled by
3355 // the buildable.
3356 // <builder>: #GtkBuilder used to construct this object
3357 // <child>: child object or %NULL for non-child tags
3358 // <tagname>: name of tag
3359 // <data>: user data that will be passed in to parser functions
3360 void custom_tag_end(AT0, AT1, AT2, AT3)(AT0 /*Builder*/ builder, AT1 /*GObject2.Object*/ child, AT2 /*char*/ tagname, AT3 /*void**/ data) nothrow {
3361 gtk_buildable_custom_tag_end(cast(Buildable*)&this, UpCast!(Builder*)(builder), UpCast!(GObject2.Object*)(child), toCString!(char*)(tagname), UpCast!(void**)(data));
3364 // VERSION: 2.12
3365 // This is called for each unknown element under &lt;child&gt;.
3367 // if it doesn't.
3368 // RETURNS: %TRUE if a object has a custom implementation, %FALSE
3369 // <builder>: a #GtkBuilder used to construct this object
3370 // <child>: child object or %NULL for non-child tags
3371 // <tagname>: name of tag
3372 // <parser>: a #GMarkupParser structure to fill in
3373 // <data>: return location for user data that will be passed in to parser functions
3374 int custom_tag_start(AT0, AT1, AT2, AT3, AT4)(AT0 /*Builder*/ builder, AT1 /*GObject2.Object*/ child, AT2 /*char*/ tagname, /*out*/ AT3 /*GLib2.MarkupParser*/ parser, /*out*/ AT4 /*void**/ data) nothrow {
3375 return gtk_buildable_custom_tag_start(cast(Buildable*)&this, UpCast!(Builder*)(builder), UpCast!(GObject2.Object*)(child), toCString!(char*)(tagname), UpCast!(GLib2.MarkupParser*)(parser), UpCast!(void**)(data));
3378 // VERSION: 2.12
3379 // Get the internal child called @childname of the @buildable object.
3380 // RETURNS: the internal child of the buildable object
3381 // <builder>: a #GtkBuilder
3382 // <childname>: name of child
3383 GObject2.Object* get_internal_child(AT0, AT1)(AT0 /*Builder*/ builder, AT1 /*char*/ childname) nothrow {
3384 return gtk_buildable_get_internal_child(cast(Buildable*)&this, UpCast!(Builder*)(builder), toCString!(char*)(childname));
3387 // VERSION: 2.12
3388 // Gets the name of the @buildable object.
3390 // #GtkBuilder sets the name based on the the
3391 // <link linkend="BUILDER-UI">GtkBuilder UI definition</link>
3392 // used to construct the @buildable.
3393 // RETURNS: the name set with gtk_buildable_set_name()
3394 char* get_name()() nothrow {
3395 return gtk_buildable_get_name(cast(Buildable*)&this);
3398 // VERSION: 2.12
3399 // Called when the builder finishes the parsing of a
3400 // <link linkend="BUILDER-UI">GtkBuilder UI definition</link>.
3401 // Note that this will be called once for each time
3402 // gtk_builder_add_from_file() or gtk_builder_add_from_string()
3403 // is called on a builder.
3404 // <builder>: a #GtkBuilder
3405 void parser_finished(AT0)(AT0 /*Builder*/ builder) nothrow {
3406 gtk_buildable_parser_finished(cast(Buildable*)&this, UpCast!(Builder*)(builder));
3409 // VERSION: 2.12
3410 // Sets the property name @name to @value on the @buildable object.
3411 // <builder>: a #GtkBuilder
3412 // <name>: name of property
3413 // <value>: value of property
3414 void set_buildable_property(AT0, AT1, AT2)(AT0 /*Builder*/ builder, AT1 /*char*/ name, AT2 /*GObject2.Value*/ value) nothrow {
3415 gtk_buildable_set_buildable_property(cast(Buildable*)&this, UpCast!(Builder*)(builder), toCString!(char*)(name), UpCast!(GObject2.Value*)(value));
3418 // VERSION: 2.12
3419 // Sets the name of the @buildable object.
3420 // <name>: name to set
3421 void set_name(AT0)(AT0 /*char*/ name) nothrow {
3422 gtk_buildable_set_name(cast(Buildable*)&this, toCString!(char*)(name));
3425 mixin __interface__;
3429 // The GtkBuildableIface interface contains method that are
3430 // necessary to allow #GtkBuilder to construct an object from
3431 // a GtkBuilder UI definition.
3432 struct BuildableIface {
3433 GObject2.TypeInterface g_iface;
3434 // <name>: name to set
3435 extern (C) void function (Buildable* buildable, char* name) nothrow set_name;
3436 // RETURNS: the name set with gtk_buildable_set_name()
3437 extern (C) char* function (Buildable* buildable) nothrow get_name;
3439 // <builder>: a #GtkBuilder
3440 // <child>: child to add
3441 // <type>: kind of child or %NULL
3442 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* type=null) nothrow add_child;
3444 // <builder>: a #GtkBuilder
3445 // <name>: name of property
3446 // <value>: value of property
3447 extern (C) void function (Buildable* buildable, Builder* builder, char* name, GObject2.Value* value) nothrow set_buildable_property;
3449 // RETURNS: the constructed child
3450 // <builder>: #GtkBuilder used to construct this object
3451 // <name>: name of child to construct
3452 extern (C) GObject2.Object* /*new*/ function (Buildable* buildable, Builder* builder, char* name) nothrow construct_child;
3454 // RETURNS: %TRUE if a object has a custom implementation, %FALSE
3455 // <builder>: a #GtkBuilder used to construct this object
3456 // <child>: child object or %NULL for non-child tags
3457 // <tagname>: name of tag
3458 // <parser>: a #GMarkupParser structure to fill in
3459 // <data>: return location for user data that will be passed in to parser functions
3460 extern (C) int function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data) nothrow custom_tag_start;
3462 // <builder>: #GtkBuilder used to construct this object
3463 // <child>: child object or %NULL for non-child tags
3464 // <tagname>: name of tag
3465 // <data>: user data that will be passed in to parser functions
3466 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, void** data) nothrow custom_tag_end;
3468 // <builder>: a #GtkBuilder
3469 // <child>: child object or %NULL for non-child tags
3470 // <tagname>: the name of the tag
3471 // <data>: user data created in custom_tag_start
3472 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, void* data) nothrow custom_finished;
3473 // <builder>: a #GtkBuilder
3474 extern (C) void function (Buildable* buildable, Builder* builder) nothrow parser_finished;
3476 // RETURNS: the internal child of the buildable object
3477 // <builder>: a #GtkBuilder
3478 // <childname>: name of child
3479 extern (C) GObject2.Object* function (Buildable* buildable, Builder* builder, char* childname) nothrow get_internal_child;
3482 struct Builder /* : GObject.Object */ {
3483 alias parent_instance this;
3484 alias parent_instance super_;
3485 alias parent_instance object;
3486 GObject2.Object parent_instance;
3487 BuilderPrivate* priv;
3490 // VERSION: 2.12
3491 // Creates a new builder object.
3492 // RETURNS: a new #GtkBuilder object
3493 static Builder* /*new*/ new_()() nothrow {
3494 return gtk_builder_new();
3496 static auto opCall()() {
3497 return gtk_builder_new();
3500 // VERSION: 2.12
3501 // Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder
3502 // UI definition</link> and merges it with the current contents of @builder.
3504 // Upon errors 0 will be returned and @error will be assigned a
3505 // #GError from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or #G_FILE_ERROR
3506 // domain.
3507 // RETURNS: A positive value on success, 0 if an error occurred
3508 // <filename>: the name of the file to parse
3509 uint add_from_file(AT0, AT1)(AT0 /*char*/ filename, AT1 /*GLib2.Error**/ error=null) nothrow {
3510 return gtk_builder_add_from_file(&this, toCString!(char*)(filename), UpCast!(GLib2.Error**)(error));
3513 // VERSION: 2.12
3514 // Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder
3515 // UI definition</link> and merges it with the current contents of @builder.
3517 // Upon errors 0 will be returned and @error will be assigned a
3518 // #GError from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.
3519 // RETURNS: A positive value on success, 0 if an error occurred
3520 // <buffer>: the string to parse
3521 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
3522 uint add_from_string(AT0, AT1)(AT0 /*char*/ buffer, size_t length, AT1 /*GLib2.Error**/ error=null) nothrow {
3523 return gtk_builder_add_from_string(&this, toCString!(char*)(buffer), length, UpCast!(GLib2.Error**)(error));
3526 // VERSION: 2.14
3527 // Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder
3528 // UI definition</link> building only the requested objects and merges
3529 // them with the current contents of @builder.
3531 // Upon errors 0 will be returned and @error will be assigned a
3532 // #GError from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or #G_FILE_ERROR
3533 // domain.
3535 // <note><para>
3536 // If you are adding an object that depends on an object that is not
3537 // its child (for instance a #GtkTreeView that depends on its
3538 // #GtkTreeModel), you have to explicitely list all of them in @object_ids.
3539 // </para></note>
3540 // RETURNS: A positive value on success, 0 if an error occurred
3541 // <filename>: the name of the file to parse
3542 // <object_ids>: nul-terminated array of objects to build
3543 uint add_objects_from_file(AT0, AT1, AT2)(AT0 /*char*/ filename, AT1 /*char**/ object_ids, AT2 /*GLib2.Error**/ error=null) nothrow {
3544 return gtk_builder_add_objects_from_file(&this, toCString!(char*)(filename), toCString!(char**)(object_ids), UpCast!(GLib2.Error**)(error));
3547 // VERSION: 2.14
3548 // Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder
3549 // UI definition</link> building only the requested objects and merges
3550 // them with the current contents of @builder.
3552 // Upon errors 0 will be returned and @error will be assigned a
3553 // #GError from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.
3555 // <note><para>
3556 // If you are adding an object that depends on an object that is not
3557 // its child (for instance a #GtkTreeView that depends on its
3558 // #GtkTreeModel), you have to explicitely list all of them in @object_ids.
3559 // </para></note>
3560 // RETURNS: A positive value on success, 0 if an error occurred
3561 // <buffer>: the string to parse
3562 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
3563 // <object_ids>: nul-terminated array of objects to build
3564 uint add_objects_from_string(AT0, AT1, AT2)(AT0 /*char*/ buffer, size_t length, AT1 /*char**/ object_ids, AT2 /*GLib2.Error**/ error=null) nothrow {
3565 return gtk_builder_add_objects_from_string(&this, toCString!(char*)(buffer), length, toCString!(char**)(object_ids), UpCast!(GLib2.Error**)(error));
3568 // VERSION: 2.12
3569 // This method is a simpler variation of gtk_builder_connect_signals_full().
3570 // It uses #GModule's introspective features (by opening the module %NULL)
3571 // to look at the application's symbol table. From here it tries to match
3572 // the signal handler names given in the interface description with
3573 // symbols in the application and connects the signals.
3575 // Note that this function will not work correctly if #GModule is not
3576 // supported on the platform.
3578 // When compiling applications for Windows, you must declare signal callbacks
3579 // with #G_MODULE_EXPORT, or they will not be put in the symbol table.
3580 // On Linux and Unices, this is not necessary; applications should instead
3581 // be compiled with the -Wl,--export-dynamic CFLAGS, and linked against
3582 // gmodule-export-2.0.
3583 // <user_data>: a pointer to a structure sent in as user data to all signals
3584 void connect_signals(AT0)(AT0 /*void*/ user_data) nothrow {
3585 gtk_builder_connect_signals(&this, UpCast!(void*)(user_data));
3588 // VERSION: 2.12
3589 // This function can be thought of the interpreted language binding
3590 // version of gtk_builder_connect_signals(), except that it does not
3591 // require GModule to function correctly.
3592 // <func>: the function used to connect the signals
3593 // <user_data>: arbitrary data that will be passed to the connection function
3594 void connect_signals_full(AT0)(BuilderConnectFunc func, AT0 /*void*/ user_data) nothrow {
3595 gtk_builder_connect_signals_full(&this, func, UpCast!(void*)(user_data));
3598 // VERSION: 2.12
3599 // Gets the object named @name. Note that this function does not
3600 // increment the reference count of the returned object.
3602 // it could not be found in the object tree.
3603 // RETURNS: the object named @name or %NULL if
3604 // <name>: name of object to get
3605 GObject2.Object* get_object(AT0)(AT0 /*char*/ name) nothrow {
3606 return gtk_builder_get_object(&this, toCString!(char*)(name));
3609 // VERSION: 2.12
3610 // Gets all objects that have been constructed by @builder. Note that
3611 // this function does not increment the reference counts of the returned
3612 // objects.
3614 // constructed by the #GtkBuilder instance. It should be freed by
3615 // g_slist_free()
3616 // RETURNS: a newly-allocated #GSList containing all the objects
3617 GLib2.SList* /*new container*/ get_objects()() nothrow {
3618 return gtk_builder_get_objects(&this);
3621 // VERSION: 2.12
3622 // Gets the translation domain of @builder.
3624 // by the builder object and must not be modified or freed.
3625 // RETURNS: the translation domain. This string is owned
3626 char* get_translation_domain()() nothrow {
3627 return gtk_builder_get_translation_domain(&this);
3630 // VERSION: 2.12
3631 // Looks up a type by name, using the virtual function that
3632 // #GtkBuilder has for that purpose. This is mainly used when
3633 // implementing the #GtkBuildable interface on a type.
3635 // if no type was found
3636 // RETURNS: the #GType found for @type_name or #G_TYPE_INVALID
3637 // <type_name>: type name to lookup
3638 Type get_type_from_name(AT0)(AT0 /*char*/ type_name) nothrow {
3639 return gtk_builder_get_type_from_name(&this, toCString!(char*)(type_name));
3642 // VERSION: 2.12
3643 // Sets the translation domain of @builder.
3644 // See #GtkBuilder:translation-domain.
3645 // <domain>: the translation domain or %NULL
3646 void set_translation_domain(AT0)(AT0 /*char*/ domain=null) nothrow {
3647 gtk_builder_set_translation_domain(&this, toCString!(char*)(domain));
3650 // VERSION: 2.12
3651 // This function demarshals a value from a string. This function
3652 // calls g_value_init() on the @value argument, so it need not be
3653 // initialised beforehand.
3655 // This function can handle char, uchar, boolean, int, uint, long,
3656 // ulong, enum, flags, float, double, string, #GdkColor and
3657 // #GtkAdjustment type values. Support for #GtkWidget type values is
3658 // still to come.
3660 // Upon errors %FALSE will be returned and @error will be assigned a
3661 // #GError from the #GTK_BUILDER_ERROR domain.
3662 // RETURNS: %TRUE on success
3663 // <pspec>: the #GParamSpec for the property
3664 // <string>: the string representation of the value
3665 // <value>: the #GValue to store the result in
3666 int value_from_string(AT0, AT1, AT2, AT3)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*char*/ string_, /*out*/ AT2 /*GObject2.Value*/ value, AT3 /*GLib2.Error**/ error=null) nothrow {
3667 return gtk_builder_value_from_string(&this, UpCast!(GObject2.ParamSpec*)(pspec), toCString!(char*)(string_), UpCast!(GObject2.Value*)(value), UpCast!(GLib2.Error**)(error));
3670 // VERSION: 2.12
3671 // Like gtk_builder_value_from_string(), this function demarshals
3672 // a value from a string, but takes a #GType instead of #GParamSpec.
3673 // This function calls g_value_init() on the @value argument, so it
3674 // need not be initialised beforehand.
3676 // Upon errors %FALSE will be returned and @error will be assigned a
3677 // #GError from the #GTK_BUILDER_ERROR domain.
3678 // RETURNS: %TRUE on success
3679 // <type>: the #GType of the value
3680 // <string>: the string representation of the value
3681 // <value>: the #GValue to store the result in
3682 int value_from_string_type(AT0, AT1, AT2)(Type type, AT0 /*char*/ string_, /*out*/ AT1 /*GObject2.Value*/ value, AT2 /*GLib2.Error**/ error=null) nothrow {
3683 return gtk_builder_value_from_string_type(&this, type, toCString!(char*)(string_), UpCast!(GObject2.Value*)(value), UpCast!(GLib2.Error**)(error));
3687 struct BuilderClass {
3688 GObject2.ObjectClass parent_class;
3690 // RETURNS: the #GType found for @type_name or #G_TYPE_INVALID
3691 // <type_name>: type name to lookup
3692 extern (C) Type function (Builder* builder, char* type_name) nothrow get_type_from_name;
3693 extern (C) void function () nothrow _gtk_reserved1;
3694 extern (C) void function () nothrow _gtk_reserved2;
3695 extern (C) void function () nothrow _gtk_reserved3;
3696 extern (C) void function () nothrow _gtk_reserved4;
3697 extern (C) void function () nothrow _gtk_reserved5;
3698 extern (C) void function () nothrow _gtk_reserved6;
3699 extern (C) void function () nothrow _gtk_reserved7;
3700 extern (C) void function () nothrow _gtk_reserved8;
3704 // VERSION: 2.12
3705 // This is the signature of a function used to connect signals. It is used
3706 // by the gtk_builder_connect_signals() and gtk_builder_connect_signals_full()
3707 // methods. It is mainly intended for interpreted language bindings, but
3708 // could be useful where the programmer wants more control over the signal
3709 // connection process.
3710 // <builder>: a #GtkBuilder
3711 // <object>: object to connect a signal to
3712 // <signal_name>: name of the signal
3713 // <handler_name>: name of the handler
3714 // <connect_object>: a #GObject, if non-%NULL, use g_signal_connect_object()
3715 // <flags>: #GConnectFlags to use
3716 // <user_data>: user data
3717 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) nothrow BuilderConnectFunc;
3719 enum BuilderError {
3720 INVALID_TYPE_FUNCTION = 0,
3721 UNHANDLED_TAG = 1,
3722 MISSING_ATTRIBUTE = 2,
3723 INVALID_ATTRIBUTE = 3,
3724 INVALID_TAG = 4,
3725 MISSING_PROPERTY_VALUE = 5,
3726 INVALID_VALUE = 6,
3727 VERSION_MISMATCH = 7,
3728 DUPLICATE_ID = 8
3730 struct BuilderPrivate {
3733 struct Button /* : Bin */ {
3734 mixin Atk.ImplementorIface.__interface__;
3735 mixin Activatable.__interface__;
3736 mixin Buildable.__interface__;
3737 alias bin this;
3738 alias bin super_;
3739 Bin bin;
3740 Gdk2.Window* event_window;
3741 char* label_text;
3742 uint activate_timeout;
3743 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3744 uint, "constructed", 1,
3745 uint, "in_button", 1,
3746 uint, "button_down", 1,
3747 uint, "relief", 2,
3748 uint, "use_underline", 1,
3749 uint, "use_stock", 1,
3750 uint, "depressed", 1,
3751 uint, "depress_on_activate", 1,
3752 uint, "focus_on_click", 1,
3753 uint, "__dummy32A", 22));
3755 static Button* new_()() nothrow {
3756 return gtk_button_new();
3758 static auto opCall()() {
3759 return gtk_button_new();
3762 // Creates a new #GtkButton containing the image and text from a stock item.
3763 // Some stock ids have preprocessor macros like #GTK_STOCK_OK and
3764 // #GTK_STOCK_APPLY.
3766 // If @stock_id is unknown, then it will be treated as a mnemonic
3767 // label (as for gtk_button_new_with_mnemonic()).
3768 // RETURNS: a new #GtkButton
3769 // <stock_id>: the name of the stock item
3770 static Button* new_from_stock(AT0)(AT0 /*char*/ stock_id) nothrow {
3771 return gtk_button_new_from_stock(toCString!(char*)(stock_id));
3773 static auto opCall(AT0)(AT0 /*char*/ stock_id) {
3774 return gtk_button_new_from_stock(toCString!(char*)(stock_id));
3776 static Button* new_with_label(AT0)(AT0 /*char*/ label) nothrow {
3777 return gtk_button_new_with_label(toCString!(char*)(label));
3779 static auto opCall(AT0)(AT0 /*char*/ label) {
3780 return gtk_button_new_with_label(toCString!(char*)(label));
3783 // Creates a new #GtkButton containing a label.
3784 // If characters in @label are preceded by an underscore, they are underlined.
3785 // If you need a literal underscore character in a label, use '__' (two
3786 // underscores). The first underlined character represents a keyboard
3787 // accelerator called a mnemonic.
3788 // Pressing Alt and that key activates the button.
3789 // RETURNS: a new #GtkButton
3790 // <label>: The text of the button, with an underscore in front of the mnemonic character
3791 static Button* new_with_mnemonic(AT0)(AT0 /*char*/ label) nothrow {
3792 return gtk_button_new_with_mnemonic(toCString!(char*)(label));
3794 static auto opCall(AT0)(AT0 /*char*/ label) {
3795 return gtk_button_new_with_mnemonic(toCString!(char*)(label));
3797 void clicked()() nothrow {
3798 gtk_button_clicked(&this);
3800 void enter()() nothrow {
3801 gtk_button_enter(&this);
3804 // VERSION: 2.4
3805 // Gets the alignment of the child in the button.
3806 // <xalign>: return location for horizontal alignment
3807 // <yalign>: return location for vertical alignment
3808 void get_alignment(AT0, AT1)(/*out*/ AT0 /*float*/ xalign, /*out*/ AT1 /*float*/ yalign) nothrow {
3809 gtk_button_get_alignment(&this, UpCast!(float*)(xalign), UpCast!(float*)(yalign));
3812 // VERSION: 2.22
3813 // Returns the button's event window if it is realized, %NULL otherwise.
3814 // This function should be rarely needed.
3815 // RETURNS: @button's event window.
3816 Gdk2.Window* get_event_window()() nothrow {
3817 return gtk_button_get_event_window(&this);
3820 // VERSION: 2.4
3821 // Returns whether the button grabs focus when it is clicked with the mouse.
3822 // See gtk_button_set_focus_on_click().
3824 // the mouse.
3825 // RETURNS: %TRUE if the button grabs focus when it is clicked with
3826 int get_focus_on_click()() nothrow {
3827 return gtk_button_get_focus_on_click(&this);
3830 // VERSION: 2.6
3831 // Gets the widget that is currenty set as the image of @button.
3832 // This may have been explicitly set by gtk_button_set_image()
3833 // or constructed by gtk_button_new_from_stock().
3834 // RETURNS: a #GtkWidget or %NULL in case there is no image
3835 Widget* get_image()() nothrow {
3836 return gtk_button_get_image(&this);
3839 // VERSION: 2.10
3840 // Gets the position of the image relative to the text
3841 // inside the button.
3842 // RETURNS: the position
3843 PositionType get_image_position()() nothrow {
3844 return gtk_button_get_image_position(&this);
3847 // Fetches the text from the label of the button, as set by
3848 // gtk_button_set_label(). If the label text has not
3849 // been set the return value will be %NULL. This will be the
3850 // case if you create an empty button with gtk_button_new() to
3851 // use as a container.
3853 // by the widget and must not be modified or freed.
3854 // RETURNS: The text of the label widget. This string is owned
3855 char* get_label()() nothrow {
3856 return gtk_button_get_label(&this);
3858 ReliefStyle get_relief()() nothrow {
3859 return gtk_button_get_relief(&this);
3862 // Returns whether the button label is a stock item.
3864 // select a stock item instead of being
3865 // used directly as the label text.
3866 // RETURNS: %TRUE if the button label is used to
3867 int get_use_stock()() nothrow {
3868 return gtk_button_get_use_stock(&this);
3871 // Returns whether an embedded underline in the button label indicates a
3872 // mnemonic. See gtk_button_set_use_underline ().
3874 // indicates the mnemonic accelerator keys.
3875 // RETURNS: %TRUE if an embedded underline in the button label
3876 int get_use_underline()() nothrow {
3877 return gtk_button_get_use_underline(&this);
3879 void leave()() nothrow {
3880 gtk_button_leave(&this);
3882 void pressed()() nothrow {
3883 gtk_button_pressed(&this);
3885 void released()() nothrow {
3886 gtk_button_released(&this);
3889 // VERSION: 2.4
3890 // Sets the alignment of the child. This property has no effect unless
3891 // the child is a #GtkMisc or a #GtkAligment.
3892 // <xalign>: the horizontal position of the child, 0.0 is left aligned, 1.0 is right aligned
3893 // <yalign>: the vertical position of the child, 0.0 is top aligned, 1.0 is bottom aligned
3894 void set_alignment()(float xalign, float yalign) nothrow {
3895 gtk_button_set_alignment(&this, xalign, yalign);
3898 // VERSION: 2.4
3899 // Sets whether the button will grab focus when it is clicked with the mouse.
3900 // Making mouse clicks not grab focus is useful in places like toolbars where
3901 // you don't want the keyboard focus removed from the main area of the
3902 // application.
3903 // <focus_on_click>: whether the button grabs focus when clicked with the mouse
3904 void set_focus_on_click()(int focus_on_click) nothrow {
3905 gtk_button_set_focus_on_click(&this, focus_on_click);
3908 // VERSION: 2.6
3909 // Set the image of @button to the given widget. Note that
3910 // it depends on the #GtkSettings:gtk-button-images setting whether the
3911 // image will be displayed or not, you don't have to call
3912 // gtk_widget_show() on @image yourself.
3913 // <image>: a widget to set as the image for the button
3914 void set_image(AT0)(AT0 /*Widget*/ image) nothrow {
3915 gtk_button_set_image(&this, UpCast!(Widget*)(image));
3918 // VERSION: 2.10
3919 // Sets the position of the image relative to the text
3920 // inside the button.
3921 // <position>: the position
3922 void set_image_position()(PositionType position) nothrow {
3923 gtk_button_set_image_position(&this, position);
3926 // Sets the text of the label of the button to @str. This text is
3927 // also used to select the stock item if gtk_button_set_use_stock()
3928 // is used.
3930 // This will also clear any previously set labels.
3931 // <label>: a string
3932 void set_label(AT0)(AT0 /*char*/ label) nothrow {
3933 gtk_button_set_label(&this, toCString!(char*)(label));
3935 void set_relief()(ReliefStyle newstyle) nothrow {
3936 gtk_button_set_relief(&this, newstyle);
3939 // If %TRUE, the label set on the button is used as a
3940 // stock id to select the stock item for the button.
3941 // <use_stock>: %TRUE if the button should use a stock item
3942 void set_use_stock()(int use_stock) nothrow {
3943 gtk_button_set_use_stock(&this, use_stock);
3946 // If true, an underline in the text of the button label indicates
3947 // the next character should be used for the mnemonic accelerator key.
3948 // <use_underline>: %TRUE if underlines in the text indicate mnemonics
3949 void set_use_underline()(int use_underline) nothrow {
3950 gtk_button_set_use_underline(&this, use_underline);
3953 // The ::activate signal on GtkButton is an action signal and
3954 // emitting it causes the button to animate press then release.
3955 // Applications should never connect to this signal, but use the
3956 // #GtkButton::clicked signal.
3957 extern (C) alias static void function (Button* this_, void* user_data=null) nothrow signal_activate;
3959 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3960 return super_.signal_connect!name(cb, data, cf);
3963 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
3964 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
3965 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
3966 return signal_connect_data!()(&this, cast(char*)"activate",
3967 cast(GObject2.Callback)cb, data, null, cf);
3969 // Emitted when the button has been activated (pressed and released).
3970 extern (C) alias static void function (Button* this_, void* user_data=null) nothrow signal_clicked;
3971 ulong signal_connect(string name:"clicked", CB/*:signal_clicked*/)
3972 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
3973 if (is(typeof(cb)==signal_clicked)||_ttmm!(CB, signal_clicked)()) {
3974 return signal_connect_data!()(&this, cast(char*)"clicked",
3975 cast(GObject2.Callback)cb, data, null, cf);
3978 // DEPRECATED (v2.8) glib:signal: enter - Use the #GtkWidget::enter-notify-event signal.
3979 // Emitted when the pointer enters the button.
3980 extern (C) alias static void function (Button* this_, void* user_data=null) nothrow signal_enter;
3981 ulong signal_connect(string name:"enter", CB/*:signal_enter*/)
3982 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
3983 if (is(typeof(cb)==signal_enter)||_ttmm!(CB, signal_enter)()) {
3984 return signal_connect_data!()(&this, cast(char*)"enter",
3985 cast(GObject2.Callback)cb, data, null, cf);
3988 // DEPRECATED (v2.8) glib:signal: leave - Use the #GtkWidget::leave-notify-event signal.
3989 // Emitted when the pointer leaves the button.
3990 extern (C) alias static void function (Button* this_, void* user_data=null) nothrow signal_leave;
3991 ulong signal_connect(string name:"leave", CB/*:signal_leave*/)
3992 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
3993 if (is(typeof(cb)==signal_leave)||_ttmm!(CB, signal_leave)()) {
3994 return signal_connect_data!()(&this, cast(char*)"leave",
3995 cast(GObject2.Callback)cb, data, null, cf);
3998 // DEPRECATED (v2.8) glib:signal: pressed - Use the #GtkWidget::button-press-event signal.
3999 // Emitted when the button is pressed.
4000 extern (C) alias static void function (Button* this_, void* user_data=null) nothrow signal_pressed;
4001 ulong signal_connect(string name:"pressed", CB/*:signal_pressed*/)
4002 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4003 if (is(typeof(cb)==signal_pressed)||_ttmm!(CB, signal_pressed)()) {
4004 return signal_connect_data!()(&this, cast(char*)"pressed",
4005 cast(GObject2.Callback)cb, data, null, cf);
4008 // DEPRECATED (v2.8) glib:signal: released - Use the #GtkWidget::button-release-event signal.
4009 // Emitted when the button is released.
4010 extern (C) alias static void function (Button* this_, void* user_data=null) nothrow signal_released;
4011 ulong signal_connect(string name:"released", CB/*:signal_released*/)
4012 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4013 if (is(typeof(cb)==signal_released)||_ttmm!(CB, signal_released)()) {
4014 return signal_connect_data!()(&this, cast(char*)"released",
4015 cast(GObject2.Callback)cb, data, null, cf);
4019 enum ButtonAction {
4020 IGNORED = 0,
4021 SELECTS = 1,
4022 DRAGS = 2,
4023 EXPANDS = 4
4025 struct ButtonBox /* : Box */ {
4026 mixin Atk.ImplementorIface.__interface__;
4027 mixin Buildable.__interface__;
4028 mixin Orientable.__interface__;
4029 alias box this;
4030 alias box super_;
4031 Box box;
4032 int child_min_width, child_min_height, child_ipad_x, child_ipad_y;
4033 ButtonBoxStyle layout_style;
4035 void get_child_ipadding()(int* ipad_x, int* ipad_y) nothrow {
4036 gtk_button_box_get_child_ipadding(&this, ipad_x, ipad_y);
4039 // VERSION: 2.4
4040 // Returns whether @child should appear in a secondary group of children.
4041 // RETURNS: whether @child should appear in a secondary group of children.
4042 // <child>: a child of @widget
4043 int get_child_secondary(AT0)(AT0 /*Widget*/ child) nothrow {
4044 return gtk_button_box_get_child_secondary(&this, UpCast!(Widget*)(child));
4046 void get_child_size()(int* min_width, int* min_height) nothrow {
4047 gtk_button_box_get_child_size(&this, min_width, min_height);
4049 ButtonBoxStyle get_layout()() nothrow {
4050 return gtk_button_box_get_layout(&this);
4052 void set_child_ipadding()(int ipad_x, int ipad_y) nothrow {
4053 gtk_button_box_set_child_ipadding(&this, ipad_x, ipad_y);
4056 // Sets whether @child should appear in a secondary group of children.
4057 // A typical use of a secondary child is the help button in a dialog.
4059 // This group appears after the other children if the style
4060 // is %GTK_BUTTONBOX_START, %GTK_BUTTONBOX_SPREAD or
4061 // %GTK_BUTTONBOX_EDGE, and before the other children if the style
4062 // is %GTK_BUTTONBOX_END. For horizontal button boxes, the definition
4063 // of before/after depends on direction of the widget (see
4064 // gtk_widget_set_direction()). If the style is %GTK_BUTTONBOX_START
4065 // or %GTK_BUTTONBOX_END, then the secondary children are aligned at
4066 // the other end of the button box from the main children. For the
4067 // other styles, they appear immediately next to the main children.
4068 // <child>: a child of @widget
4069 // <is_secondary>: if %TRUE, the @child appears in a secondary group of the button box.
4070 void set_child_secondary(AT0)(AT0 /*Widget*/ child, int is_secondary) nothrow {
4071 gtk_button_box_set_child_secondary(&this, UpCast!(Widget*)(child), is_secondary);
4073 void set_child_size()(int min_width, int min_height) nothrow {
4074 gtk_button_box_set_child_size(&this, min_width, min_height);
4076 void set_layout()(ButtonBoxStyle layout_style) nothrow {
4077 gtk_button_box_set_layout(&this, layout_style);
4081 struct ButtonBoxClass {
4082 BoxClass parent_class;
4085 enum ButtonBoxStyle {
4086 DEFAULT_STYLE = 0,
4087 SPREAD = 1,
4088 EDGE = 2,
4089 START = 3,
4090 END = 4,
4091 CENTER = 5
4093 struct ButtonClass {
4094 BinClass parent_class;
4095 extern (C) void function (Button* button) nothrow pressed;
4096 extern (C) void function (Button* button) nothrow released;
4097 extern (C) void function (Button* button) nothrow clicked;
4098 extern (C) void function (Button* button) nothrow enter;
4099 extern (C) void function (Button* button) nothrow leave;
4100 extern (C) void function (Button* button) nothrow activate;
4101 extern (C) void function () nothrow _gtk_reserved1;
4102 extern (C) void function () nothrow _gtk_reserved2;
4103 extern (C) void function () nothrow _gtk_reserved3;
4104 extern (C) void function () nothrow _gtk_reserved4;
4108 // Prebuilt sets of buttons for the dialog. If
4109 // none of these choices are appropriate, simply use %GTK_BUTTONS_NONE
4110 // then call gtk_dialog_add_buttons().
4111 // <note>
4112 // Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO
4113 // and %GTK_BUTTONS_OK_CANCEL are discouraged by the
4114 // <ulink url="http://library.gnome.org/devel/hig-book/stable/">GNOME HIG</ulink>.
4115 // </note>
4116 enum ButtonsType {
4117 NONE = 0,
4118 OK = 1,
4119 CLOSE = 2,
4120 CANCEL = 3,
4121 YES_NO = 4,
4122 OK_CANCEL = 5
4124 struct CList /* : Container */ {
4125 mixin Atk.ImplementorIface.__interface__;
4126 mixin Buildable.__interface__;
4127 alias container this;
4128 alias container super_;
4129 Container container;
4130 ushort flags;
4131 void* reserved1, reserved2;
4132 uint freeze_count;
4133 Gdk2.Rectangle internal_allocation;
4134 int rows, row_height;
4135 GLib2.List* row_list, row_list_end;
4136 int columns;
4137 Gdk2.Rectangle column_title_area;
4138 Gdk2.Window* title_window;
4139 CListColumn* column;
4140 Gdk2.Window* clist_window;
4141 int clist_window_width, clist_window_height, hoffset, voffset;
4142 ShadowType shadow_type;
4143 SelectionMode selection_mode;
4144 GLib2.List* selection, selection_end, undo_selection_, undo_unselection;
4145 int undo_anchor;
4146 ubyte[5] button_actions;
4147 ubyte drag_button;
4148 CListCellInfo click_cell;
4149 Adjustment* hadjustment, vadjustment;
4150 Gdk2.GC* xor_gc, fg_gc, bg_gc;
4151 Gdk2.Cursor* cursor_drag;
4152 int x_drag, focus_row, focus_header_column, anchor;
4153 StateType anchor_state;
4154 int drag_pos, htimer, vtimer;
4155 SortType sort_type;
4156 CListCompareFunc compare;
4157 int sort_column, drag_highlight_row;
4158 CListDragPos drag_highlight_pos;
4160 static CList* new_()(int columns) nothrow {
4161 return gtk_clist_new(columns);
4163 static auto opCall()(int columns) {
4164 return gtk_clist_new(columns);
4166 static CList* new_with_titles(AT0)(int columns, AT0 /*char*/ titles) nothrow {
4167 return gtk_clist_new_with_titles(columns, toCString!(char*)(titles));
4169 static auto opCall(AT0)(int columns, AT0 /*char*/ titles) {
4170 return gtk_clist_new_with_titles(columns, toCString!(char*)(titles));
4172 int append(AT0)(AT0 /*char*/ text) nothrow {
4173 return gtk_clist_append(&this, toCString!(char*)(text));
4175 void clear()() nothrow {
4176 gtk_clist_clear(&this);
4178 void column_title_active()(int column) nothrow {
4179 gtk_clist_column_title_active(&this, column);
4181 void column_title_passive()(int column) nothrow {
4182 gtk_clist_column_title_passive(&this, column);
4184 void column_titles_active()() nothrow {
4185 gtk_clist_column_titles_active(&this);
4187 void column_titles_hide()() nothrow {
4188 gtk_clist_column_titles_hide(&this);
4190 void column_titles_passive()() nothrow {
4191 gtk_clist_column_titles_passive(&this);
4193 void column_titles_show()() nothrow {
4194 gtk_clist_column_titles_show(&this);
4196 int columns_autosize()() nothrow {
4197 return gtk_clist_columns_autosize(&this);
4199 int find_row_from_data(AT0)(AT0 /*void*/ data) nothrow {
4200 return gtk_clist_find_row_from_data(&this, UpCast!(void*)(data));
4202 void freeze()() nothrow {
4203 gtk_clist_freeze(&this);
4205 // Unintrospectable method: get_cell_style() / gtk_clist_get_cell_style()
4206 Style* get_cell_style()(int row, int column) nothrow {
4207 return gtk_clist_get_cell_style(&this, row, column);
4209 CellType get_cell_type()(int row, int column) nothrow {
4210 return gtk_clist_get_cell_type(&this, row, column);
4212 char* /*new*/ get_column_title()(int column) nothrow {
4213 return gtk_clist_get_column_title(&this, column);
4215 // Unintrospectable method: get_column_widget() / gtk_clist_get_column_widget()
4216 Widget* get_column_widget()(int column) nothrow {
4217 return gtk_clist_get_column_widget(&this, column);
4219 // Unintrospectable method: get_hadjustment() / gtk_clist_get_hadjustment()
4220 Adjustment* get_hadjustment()() nothrow {
4221 return gtk_clist_get_hadjustment(&this);
4223 int get_pixmap(AT0, AT1)(int row, int column, AT0 /*Gdk2.Pixmap**/ pixmap, AT1 /*Gdk2.Bitmap**/ mask) nothrow {
4224 return gtk_clist_get_pixmap(&this, row, column, UpCast!(Gdk2.Pixmap**)(pixmap), UpCast!(Gdk2.Bitmap**)(mask));
4226 int get_pixtext(AT0, AT1, AT2, AT3)(int row, int column, AT0 /*char**/ text, AT1 /*ubyte*/ spacing, AT2 /*Gdk2.Pixmap**/ pixmap, AT3 /*Gdk2.Bitmap**/ mask) nothrow {
4227 return gtk_clist_get_pixtext(&this, row, column, toCString!(char**)(text), UpCast!(ubyte*)(spacing), UpCast!(Gdk2.Pixmap**)(pixmap), UpCast!(Gdk2.Bitmap**)(mask));
4229 // Unintrospectable method: get_row_data() / gtk_clist_get_row_data()
4230 void* get_row_data()(int row) nothrow {
4231 return gtk_clist_get_row_data(&this, row);
4233 // Unintrospectable method: get_row_style() / gtk_clist_get_row_style()
4234 Style* get_row_style()(int row) nothrow {
4235 return gtk_clist_get_row_style(&this, row);
4237 int get_selectable()(int row) nothrow {
4238 return gtk_clist_get_selectable(&this, row);
4240 int get_selection_info()(int x, int y, int* row, int* column) nothrow {
4241 return gtk_clist_get_selection_info(&this, x, y, row, column);
4243 int get_text(AT0)(int row, int column, AT0 /*char**/ text) nothrow {
4244 return gtk_clist_get_text(&this, row, column, toCString!(char**)(text));
4246 // Unintrospectable method: get_vadjustment() / gtk_clist_get_vadjustment()
4247 Adjustment* get_vadjustment()() nothrow {
4248 return gtk_clist_get_vadjustment(&this);
4250 int insert(AT0)(int row, AT0 /*char*/ text) nothrow {
4251 return gtk_clist_insert(&this, row, toCString!(char*)(text));
4253 void moveto()(int row, int column, float row_align, float col_align) nothrow {
4254 gtk_clist_moveto(&this, row, column, row_align, col_align);
4256 int optimal_column_width()(int column) nothrow {
4257 return gtk_clist_optimal_column_width(&this, column);
4259 int prepend(AT0)(AT0 /*char*/ text) nothrow {
4260 return gtk_clist_prepend(&this, toCString!(char*)(text));
4262 void remove()(int row) nothrow {
4263 gtk_clist_remove(&this, row);
4265 Visibility row_is_visible()(int row) nothrow {
4266 return gtk_clist_row_is_visible(&this, row);
4268 void row_move()(int source_row, int dest_row) nothrow {
4269 gtk_clist_row_move(&this, source_row, dest_row);
4271 void select_all()() nothrow {
4272 gtk_clist_select_all(&this);
4274 void select_row()(int row, int column) nothrow {
4275 gtk_clist_select_row(&this, row, column);
4277 void set_auto_sort()(int auto_sort) nothrow {
4278 gtk_clist_set_auto_sort(&this, auto_sort);
4280 void set_background(AT0)(int row, AT0 /*Gdk2.Color*/ color) nothrow {
4281 gtk_clist_set_background(&this, row, UpCast!(Gdk2.Color*)(color));
4283 void set_button_actions()(uint button, ubyte button_actions) nothrow {
4284 gtk_clist_set_button_actions(&this, button, button_actions);
4286 void set_cell_style(AT0)(int row, int column, AT0 /*Style*/ style) nothrow {
4287 gtk_clist_set_cell_style(&this, row, column, UpCast!(Style*)(style));
4289 void set_column_auto_resize()(int column, int auto_resize) nothrow {
4290 gtk_clist_set_column_auto_resize(&this, column, auto_resize);
4292 void set_column_justification()(int column, Justification justification) nothrow {
4293 gtk_clist_set_column_justification(&this, column, justification);
4295 void set_column_max_width()(int column, int max_width) nothrow {
4296 gtk_clist_set_column_max_width(&this, column, max_width);
4298 void set_column_min_width()(int column, int min_width) nothrow {
4299 gtk_clist_set_column_min_width(&this, column, min_width);
4301 void set_column_resizeable()(int column, int resizeable) nothrow {
4302 gtk_clist_set_column_resizeable(&this, column, resizeable);
4304 void set_column_title(AT0)(int column, AT0 /*char*/ title) nothrow {
4305 gtk_clist_set_column_title(&this, column, toCString!(char*)(title));
4307 void set_column_visibility()(int column, int visible) nothrow {
4308 gtk_clist_set_column_visibility(&this, column, visible);
4310 void set_column_widget(AT0)(int column, AT0 /*Widget*/ widget) nothrow {
4311 gtk_clist_set_column_widget(&this, column, UpCast!(Widget*)(widget));
4313 void set_column_width()(int column, int width) nothrow {
4314 gtk_clist_set_column_width(&this, column, width);
4316 // Unintrospectable method: set_compare_func() / gtk_clist_set_compare_func()
4317 void set_compare_func()(CListCompareFunc cmp_func) nothrow {
4318 gtk_clist_set_compare_func(&this, cmp_func);
4320 void set_foreground(AT0)(int row, AT0 /*Gdk2.Color*/ color) nothrow {
4321 gtk_clist_set_foreground(&this, row, UpCast!(Gdk2.Color*)(color));
4323 void set_hadjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
4324 gtk_clist_set_hadjustment(&this, UpCast!(Adjustment*)(adjustment));
4326 void set_pixmap(AT0, AT1)(int row, int column, AT0 /*Gdk2.Pixmap*/ pixmap, AT1 /*Gdk2.Bitmap*/ mask=null) nothrow {
4327 gtk_clist_set_pixmap(&this, row, column, UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
4329 void set_pixtext(AT0, AT1, AT2)(int row, int column, AT0 /*char*/ text, ubyte spacing, AT1 /*Gdk2.Pixmap*/ pixmap, AT2 /*Gdk2.Bitmap*/ mask) nothrow {
4330 gtk_clist_set_pixtext(&this, row, column, toCString!(char*)(text), spacing, UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
4332 void set_reorderable()(int reorderable) nothrow {
4333 gtk_clist_set_reorderable(&this, reorderable);
4335 void set_row_data(AT0)(int row, AT0 /*void*/ data) nothrow {
4336 gtk_clist_set_row_data(&this, row, UpCast!(void*)(data));
4338 void set_row_data_full(AT0)(int row, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
4339 gtk_clist_set_row_data_full(&this, row, UpCast!(void*)(data), destroy);
4341 void set_row_height()(uint height) nothrow {
4342 gtk_clist_set_row_height(&this, height);
4344 void set_row_style(AT0)(int row, AT0 /*Style*/ style) nothrow {
4345 gtk_clist_set_row_style(&this, row, UpCast!(Style*)(style));
4347 void set_selectable()(int row, int selectable) nothrow {
4348 gtk_clist_set_selectable(&this, row, selectable);
4350 void set_selection_mode()(SelectionMode mode) nothrow {
4351 gtk_clist_set_selection_mode(&this, mode);
4353 void set_shadow_type()(ShadowType type) nothrow {
4354 gtk_clist_set_shadow_type(&this, type);
4356 void set_shift()(int row, int column, int vertical, int horizontal) nothrow {
4357 gtk_clist_set_shift(&this, row, column, vertical, horizontal);
4359 void set_sort_column()(int column) nothrow {
4360 gtk_clist_set_sort_column(&this, column);
4362 void set_sort_type()(SortType sort_type) nothrow {
4363 gtk_clist_set_sort_type(&this, sort_type);
4365 void set_text(AT0)(int row, int column, AT0 /*char*/ text) nothrow {
4366 gtk_clist_set_text(&this, row, column, toCString!(char*)(text));
4368 void set_use_drag_icons()(int use_icons) nothrow {
4369 gtk_clist_set_use_drag_icons(&this, use_icons);
4371 void set_vadjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
4372 gtk_clist_set_vadjustment(&this, UpCast!(Adjustment*)(adjustment));
4374 void sort()() nothrow {
4375 gtk_clist_sort(&this);
4377 void swap_rows()(int row1, int row2) nothrow {
4378 gtk_clist_swap_rows(&this, row1, row2);
4380 void thaw()() nothrow {
4381 gtk_clist_thaw(&this);
4383 void undo_selection()() nothrow {
4384 gtk_clist_undo_selection(&this);
4386 void unselect_all()() nothrow {
4387 gtk_clist_unselect_all(&this);
4389 void unselect_row()(int row, int column) nothrow {
4390 gtk_clist_unselect_row(&this, row, column);
4392 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_abort_column_resize;
4394 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4395 return super_.signal_connect!name(cb, data, cf);
4398 ulong signal_connect(string name:"abort-column-resize", CB/*:signal_abort_column_resize*/)
4399 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4400 if (is(typeof(cb)==signal_abort_column_resize)||_ttmm!(CB, signal_abort_column_resize)()) {
4401 return signal_connect_data!()(&this, cast(char*)"abort-column-resize",
4402 cast(GObject2.Callback)cb, data, null, cf);
4404 extern (C) alias static void function (CList* this_, int object, void* user_data=null) nothrow signal_click_column;
4405 ulong signal_connect(string name:"click-column", CB/*:signal_click_column*/)
4406 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4407 if (is(typeof(cb)==signal_click_column)||_ttmm!(CB, signal_click_column)()) {
4408 return signal_connect_data!()(&this, cast(char*)"click-column",
4409 cast(GObject2.Callback)cb, data, null, cf);
4411 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_end_selection;
4412 ulong signal_connect(string name:"end-selection", CB/*:signal_end_selection*/)
4413 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4414 if (is(typeof(cb)==signal_end_selection)||_ttmm!(CB, signal_end_selection)()) {
4415 return signal_connect_data!()(&this, cast(char*)"end-selection",
4416 cast(GObject2.Callback)cb, data, null, cf);
4418 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, c_int p1, void* user_data=null) nothrow signal_extend_selection;
4419 ulong signal_connect(string name:"extend-selection", CB/*:signal_extend_selection*/)
4420 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4421 if (is(typeof(cb)==signal_extend_selection)||_ttmm!(CB, signal_extend_selection)()) {
4422 return signal_connect_data!()(&this, cast(char*)"extend-selection",
4423 cast(GObject2.Callback)cb, data, null, cf);
4425 extern (C) alias static void function (CList* this_, int object, int p0, void* user_data=null) nothrow signal_resize_column;
4426 ulong signal_connect(string name:"resize-column", CB/*:signal_resize_column*/)
4427 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4428 if (is(typeof(cb)==signal_resize_column)||_ttmm!(CB, signal_resize_column)()) {
4429 return signal_connect_data!()(&this, cast(char*)"resize-column",
4430 cast(GObject2.Callback)cb, data, null, cf);
4432 extern (C) alias static void function (CList* this_, int object, int p0, void* user_data=null) nothrow signal_row_move;
4433 ulong signal_connect(string name:"row-move", CB/*:signal_row_move*/)
4434 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4435 if (is(typeof(cb)==signal_row_move)||_ttmm!(CB, signal_row_move)()) {
4436 return signal_connect_data!()(&this, cast(char*)"row-move",
4437 cast(GObject2.Callback)cb, data, null, cf);
4439 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, void* user_data=null) nothrow signal_scroll_horizontal;
4440 ulong signal_connect(string name:"scroll-horizontal", CB/*:signal_scroll_horizontal*/)
4441 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4442 if (is(typeof(cb)==signal_scroll_horizontal)||_ttmm!(CB, signal_scroll_horizontal)()) {
4443 return signal_connect_data!()(&this, cast(char*)"scroll-horizontal",
4444 cast(GObject2.Callback)cb, data, null, cf);
4446 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, void* user_data=null) nothrow signal_scroll_vertical;
4447 ulong signal_connect(string name:"scroll-vertical", CB/*:signal_scroll_vertical*/)
4448 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4449 if (is(typeof(cb)==signal_scroll_vertical)||_ttmm!(CB, signal_scroll_vertical)()) {
4450 return signal_connect_data!()(&this, cast(char*)"scroll-vertical",
4451 cast(GObject2.Callback)cb, data, null, cf);
4453 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_select_all;
4454 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)
4455 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4456 if (is(typeof(cb)==signal_select_all)||_ttmm!(CB, signal_select_all)()) {
4457 return signal_connect_data!()(&this, cast(char*)"select-all",
4458 cast(GObject2.Callback)cb, data, null, cf);
4460 extern (C) alias static void function (CList* this_, int object, int p0, Gdk2.Event* p1, void* user_data=null) nothrow signal_select_row;
4461 ulong signal_connect(string name:"select-row", CB/*:signal_select_row*/)
4462 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4463 if (is(typeof(cb)==signal_select_row)||_ttmm!(CB, signal_select_row)()) {
4464 return signal_connect_data!()(&this, cast(char*)"select-row",
4465 cast(GObject2.Callback)cb, data, null, cf);
4467 extern (C) alias static void function (CList* this_, Adjustment* object, Adjustment* p0, void* user_data=null) nothrow signal_set_scroll_adjustments;
4468 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)
4469 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4470 if (is(typeof(cb)==signal_set_scroll_adjustments)||_ttmm!(CB, signal_set_scroll_adjustments)()) {
4471 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
4472 cast(GObject2.Callback)cb, data, null, cf);
4474 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_start_selection;
4475 ulong signal_connect(string name:"start-selection", CB/*:signal_start_selection*/)
4476 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4477 if (is(typeof(cb)==signal_start_selection)||_ttmm!(CB, signal_start_selection)()) {
4478 return signal_connect_data!()(&this, cast(char*)"start-selection",
4479 cast(GObject2.Callback)cb, data, null, cf);
4481 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_toggle_add_mode;
4482 ulong signal_connect(string name:"toggle-add-mode", CB/*:signal_toggle_add_mode*/)
4483 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4484 if (is(typeof(cb)==signal_toggle_add_mode)||_ttmm!(CB, signal_toggle_add_mode)()) {
4485 return signal_connect_data!()(&this, cast(char*)"toggle-add-mode",
4486 cast(GObject2.Callback)cb, data, null, cf);
4488 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_toggle_focus_row;
4489 ulong signal_connect(string name:"toggle-focus-row", CB/*:signal_toggle_focus_row*/)
4490 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4491 if (is(typeof(cb)==signal_toggle_focus_row)||_ttmm!(CB, signal_toggle_focus_row)()) {
4492 return signal_connect_data!()(&this, cast(char*)"toggle-focus-row",
4493 cast(GObject2.Callback)cb, data, null, cf);
4495 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_undo_selection;
4496 ulong signal_connect(string name:"undo-selection", CB/*:signal_undo_selection*/)
4497 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4498 if (is(typeof(cb)==signal_undo_selection)||_ttmm!(CB, signal_undo_selection)()) {
4499 return signal_connect_data!()(&this, cast(char*)"undo-selection",
4500 cast(GObject2.Callback)cb, data, null, cf);
4502 extern (C) alias static void function (CList* this_, void* user_data=null) nothrow signal_unselect_all;
4503 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)
4504 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4505 if (is(typeof(cb)==signal_unselect_all)||_ttmm!(CB, signal_unselect_all)()) {
4506 return signal_connect_data!()(&this, cast(char*)"unselect-all",
4507 cast(GObject2.Callback)cb, data, null, cf);
4509 extern (C) alias static void function (CList* this_, int object, int p0, Gdk2.Event* p1, void* user_data=null) nothrow signal_unselect_row;
4510 ulong signal_connect(string name:"unselect-row", CB/*:signal_unselect_row*/)
4511 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4512 if (is(typeof(cb)==signal_unselect_row)||_ttmm!(CB, signal_unselect_row)()) {
4513 return signal_connect_data!()(&this, cast(char*)"unselect-row",
4514 cast(GObject2.Callback)cb, data, null, cf);
4518 struct CListCellInfo {
4519 int row, column;
4522 struct CListClass {
4523 ContainerClass parent_class;
4524 extern (C) void function (CList* clist, Adjustment* hadjustment, Adjustment* vadjustment) nothrow set_scroll_adjustments;
4525 extern (C) void function (CList* clist) nothrow refresh;
4526 extern (C) void function (CList* clist, int row, int column, Gdk2.Event* event) nothrow select_row;
4527 extern (C) void function (CList* clist, int row, int column, Gdk2.Event* event) nothrow unselect_row;
4528 extern (C) void function (CList* clist, int source_row, int dest_row) nothrow row_move;
4529 extern (C) void function (CList* clist, int column) nothrow click_column;
4530 extern (C) void function (CList* clist, int column, int width) nothrow resize_column;
4531 extern (C) void function (CList* clist) nothrow toggle_focus_row;
4532 extern (C) void function (CList* clist) nothrow select_all;
4533 extern (C) void function (CList* clist) nothrow unselect_all;
4534 extern (C) void function (CList* clist) nothrow undo_selection;
4535 extern (C) void function (CList* clist) nothrow start_selection;
4536 extern (C) void function (CList* clist) nothrow end_selection;
4537 extern (C) void function (CList* clist, ScrollType scroll_type, float position, int auto_start_selection) nothrow extend_selection;
4538 extern (C) void function (CList* clist, ScrollType scroll_type, float position) nothrow scroll_horizontal;
4539 extern (C) void function (CList* clist, ScrollType scroll_type, float position) nothrow scroll_vertical;
4540 extern (C) void function (CList* clist) nothrow toggle_add_mode;
4541 extern (C) void function (CList* clist) nothrow abort_column_resize;
4542 extern (C) void function (CList* clist, Gdk2.Event* event) nothrow resync_selection;
4543 // Unintrospectable functionp: selection_find() / ()
4544 extern (C) GLib2.List* function (CList* clist, int row_number, GLib2.List* row_list_element) nothrow selection_find;
4545 extern (C) void function (CList* clist, Gdk2.Rectangle* area, int row, CListRow* clist_row) nothrow draw_row;
4546 extern (C) void function (CList* clist, CListRow* target_row, int target_row_number, CListDragPos drag_pos) nothrow draw_drag_highlight;
4547 extern (C) void function (CList* clist) nothrow clear;
4548 extern (C) void function (CList* clist, int row) nothrow fake_unselect_all;
4549 extern (C) void function (CList* clist) nothrow sort_list;
4550 extern (C) int function (CList* clist, int row, char* text) nothrow insert_row;
4551 extern (C) void function (CList* clist, int row) nothrow remove_row;
4552 extern (C) void function (CList* clist, CListRow* clist_row, int column, CellType type, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask) nothrow set_cell_contents;
4553 extern (C) void function (CList* clist, CListRow* clist_row, int column, Requisition* requisition) nothrow cell_size_request;
4556 struct CListColumn {
4557 char* title;
4558 Gdk2.Rectangle area;
4559 Widget* button;
4560 Gdk2.Window* window;
4561 int width, min_width, max_width;
4562 Justification justification;
4563 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4564 uint, "visible", 1,
4565 uint, "width_set", 1,
4566 uint, "resizeable", 1,
4567 uint, "auto_resize", 1,
4568 uint, "button_passive", 1,
4569 uint, "__dummy32A", 27));
4572 extern (C) alias int function (CList* clist, const(void)* ptr1, const(void)* ptr2) nothrow CListCompareFunc;
4574 struct CListDestInfo {
4575 CListCellInfo cell;
4576 CListDragPos insert_pos;
4579 enum CListDragPos {
4580 NONE = 0,
4581 BEFORE = 1,
4582 INTO = 2,
4583 AFTER = 3
4585 struct CListRow {
4586 Cell* cell;
4587 StateType state;
4588 Gdk2.Color foreground, background;
4589 Style* style;
4590 void* data;
4591 GLib2.DestroyNotify destroy;
4592 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4593 uint, "fg_set", 1,
4594 uint, "bg_set", 1,
4595 uint, "selectable", 1,
4596 uint, "__dummy32A", 29));
4599 struct CTree /* : CList */ {
4600 mixin Atk.ImplementorIface.__interface__;
4601 mixin Buildable.__interface__;
4602 alias clist this;
4603 alias clist super_;
4604 CList clist;
4605 Gdk2.GC* lines_gc;
4606 int tree_indent, tree_spacing, tree_column;
4607 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4608 uint, "line_style", 2,
4609 uint, "expander_style", 2,
4610 uint, "show_stub", 1,
4611 uint, "__dummy32A", 27));
4612 CTreeCompareDragFunc drag_compare;
4614 static CTree* new_()(int columns, int tree_column) nothrow {
4615 return gtk_ctree_new(columns, tree_column);
4617 static auto opCall()(int columns, int tree_column) {
4618 return gtk_ctree_new(columns, tree_column);
4620 static CTree* new_with_titles(AT0)(int columns, int tree_column, AT0 /*char*/ titles) nothrow {
4621 return gtk_ctree_new_with_titles(columns, tree_column, toCString!(char*)(titles));
4623 static auto opCall(AT0)(int columns, int tree_column, AT0 /*char*/ titles) {
4624 return gtk_ctree_new_with_titles(columns, tree_column, toCString!(char*)(titles));
4626 void collapse(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4627 gtk_ctree_collapse(&this, UpCast!(CTreeNode*)(node));
4629 void collapse_recursive(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4630 gtk_ctree_collapse_recursive(&this, UpCast!(CTreeNode*)(node));
4632 void collapse_to_depth(AT0)(AT0 /*CTreeNode*/ node, int depth) nothrow {
4633 gtk_ctree_collapse_to_depth(&this, UpCast!(CTreeNode*)(node), depth);
4635 void expand(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4636 gtk_ctree_expand(&this, UpCast!(CTreeNode*)(node));
4638 void expand_recursive(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4639 gtk_ctree_expand_recursive(&this, UpCast!(CTreeNode*)(node));
4641 void expand_to_depth(AT0)(AT0 /*CTreeNode*/ node, int depth) nothrow {
4642 gtk_ctree_expand_to_depth(&this, UpCast!(CTreeNode*)(node), depth);
4644 // Unintrospectable method: export_to_gnode() / gtk_ctree_export_to_gnode()
4645 GLib2.Node* export_to_gnode(AT0, AT1, AT2, AT3)(AT0 /*GLib2.Node*/ parent, AT1 /*GLib2.Node*/ sibling, AT2 /*CTreeNode*/ node, CTreeGNodeFunc func, AT3 /*void*/ data) nothrow {
4646 return gtk_ctree_export_to_gnode(&this, UpCast!(GLib2.Node*)(parent), UpCast!(GLib2.Node*)(sibling), UpCast!(CTreeNode*)(node), func, UpCast!(void*)(data));
4648 int find(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*CTreeNode*/ child) nothrow {
4649 return gtk_ctree_find(&this, UpCast!(CTreeNode*)(node), UpCast!(CTreeNode*)(child));
4651 // Unintrospectable method: find_all_by_row_data() / gtk_ctree_find_all_by_row_data()
4652 GLib2.List* find_all_by_row_data(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*void*/ data) nothrow {
4653 return gtk_ctree_find_all_by_row_data(&this, UpCast!(CTreeNode*)(node), UpCast!(void*)(data));
4655 // Unintrospectable method: find_all_by_row_data_custom() / gtk_ctree_find_all_by_row_data_custom()
4656 GLib2.List* find_all_by_row_data_custom(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*void*/ data, GLib2.CompareFunc func) nothrow {
4657 return gtk_ctree_find_all_by_row_data_custom(&this, UpCast!(CTreeNode*)(node), UpCast!(void*)(data), func);
4659 // Unintrospectable method: find_by_row_data() / gtk_ctree_find_by_row_data()
4660 CTreeNode* find_by_row_data(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*void*/ data) nothrow {
4661 return gtk_ctree_find_by_row_data(&this, UpCast!(CTreeNode*)(node), UpCast!(void*)(data));
4663 // Unintrospectable method: find_by_row_data_custom() / gtk_ctree_find_by_row_data_custom()
4664 CTreeNode* find_by_row_data_custom(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*void*/ data, GLib2.CompareFunc func) nothrow {
4665 return gtk_ctree_find_by_row_data_custom(&this, UpCast!(CTreeNode*)(node), UpCast!(void*)(data), func);
4667 // Unintrospectable method: find_node_ptr() / gtk_ctree_find_node_ptr()
4668 CTreeNode* find_node_ptr(AT0)(AT0 /*CTreeRow*/ ctree_row) nothrow {
4669 return gtk_ctree_find_node_ptr(&this, UpCast!(CTreeRow*)(ctree_row));
4671 int get_node_info(AT0, AT1, AT2, AT3, AT4, AT5, AT6)(AT0 /*CTreeNode*/ node, AT1 /*char**/ text, AT2 /*ubyte*/ spacing, AT3 /*Gdk2.Pixmap**/ pixmap_closed, AT4 /*Gdk2.Bitmap**/ mask_closed, AT5 /*Gdk2.Pixmap**/ pixmap_opened, AT6 /*Gdk2.Bitmap**/ mask_opened, int* is_leaf, int* expanded) nothrow {
4672 return gtk_ctree_get_node_info(&this, UpCast!(CTreeNode*)(node), toCString!(char**)(text), UpCast!(ubyte*)(spacing), UpCast!(Gdk2.Pixmap**)(pixmap_closed), UpCast!(Gdk2.Bitmap**)(mask_closed), UpCast!(Gdk2.Pixmap**)(pixmap_opened), UpCast!(Gdk2.Bitmap**)(mask_opened), is_leaf, expanded);
4674 // Unintrospectable method: insert_gnode() / gtk_ctree_insert_gnode()
4675 CTreeNode* insert_gnode(AT0, AT1, AT2, AT3)(AT0 /*CTreeNode*/ parent, AT1 /*CTreeNode*/ sibling, AT2 /*GLib2.Node*/ gnode, CTreeGNodeFunc func, AT3 /*void*/ data) nothrow {
4676 return gtk_ctree_insert_gnode(&this, UpCast!(CTreeNode*)(parent), UpCast!(CTreeNode*)(sibling), UpCast!(GLib2.Node*)(gnode), func, UpCast!(void*)(data));
4678 // Unintrospectable method: insert_node() / gtk_ctree_insert_node()
4679 CTreeNode* insert_node(AT0, AT1, AT2, AT3, AT4, AT5, AT6)(AT0 /*CTreeNode*/ parent, AT1 /*CTreeNode*/ sibling, AT2 /*char*/ text, ubyte spacing, AT3 /*Gdk2.Pixmap*/ pixmap_closed, AT4 /*Gdk2.Bitmap*/ mask_closed, AT5 /*Gdk2.Pixmap*/ pixmap_opened, AT6 /*Gdk2.Bitmap*/ mask_opened, int is_leaf, int expanded) nothrow {
4680 return gtk_ctree_insert_node(&this, UpCast!(CTreeNode*)(parent), UpCast!(CTreeNode*)(sibling), toCString!(char*)(text), spacing, UpCast!(Gdk2.Pixmap*)(pixmap_closed), UpCast!(Gdk2.Bitmap*)(mask_closed), UpCast!(Gdk2.Pixmap*)(pixmap_opened), UpCast!(Gdk2.Bitmap*)(mask_opened), is_leaf, expanded);
4682 int is_ancestor(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*CTreeNode*/ child) nothrow {
4683 return gtk_ctree_is_ancestor(&this, UpCast!(CTreeNode*)(node), UpCast!(CTreeNode*)(child));
4685 int is_hot_spot()(int x, int y) nothrow {
4686 return gtk_ctree_is_hot_spot(&this, x, y);
4688 int is_viewable(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4689 return gtk_ctree_is_viewable(&this, UpCast!(CTreeNode*)(node));
4691 // Unintrospectable method: last() / gtk_ctree_last()
4692 CTreeNode* last(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4693 return gtk_ctree_last(&this, UpCast!(CTreeNode*)(node));
4695 void move(AT0, AT1, AT2)(AT0 /*CTreeNode*/ node, AT1 /*CTreeNode*/ new_parent=null, AT2 /*CTreeNode*/ new_sibling=null) nothrow {
4696 gtk_ctree_move(&this, UpCast!(CTreeNode*)(node), UpCast!(CTreeNode*)(new_parent), UpCast!(CTreeNode*)(new_sibling));
4698 // Unintrospectable method: node_get_cell_style() / gtk_ctree_node_get_cell_style()
4699 Style* node_get_cell_style(AT0)(AT0 /*CTreeNode*/ node, int column) nothrow {
4700 return gtk_ctree_node_get_cell_style(&this, UpCast!(CTreeNode*)(node), column);
4702 CellType node_get_cell_type(AT0)(AT0 /*CTreeNode*/ node, int column) nothrow {
4703 return gtk_ctree_node_get_cell_type(&this, UpCast!(CTreeNode*)(node), column);
4705 int node_get_pixmap(AT0, AT1, AT2)(AT0 /*CTreeNode*/ node, int column, AT1 /*Gdk2.Pixmap**/ pixmap, AT2 /*Gdk2.Bitmap**/ mask) nothrow {
4706 return gtk_ctree_node_get_pixmap(&this, UpCast!(CTreeNode*)(node), column, UpCast!(Gdk2.Pixmap**)(pixmap), UpCast!(Gdk2.Bitmap**)(mask));
4708 int node_get_pixtext(AT0, AT1, AT2, AT3, AT4)(AT0 /*CTreeNode*/ node, int column, AT1 /*char**/ text, AT2 /*ubyte*/ spacing, AT3 /*Gdk2.Pixmap**/ pixmap, AT4 /*Gdk2.Bitmap**/ mask) nothrow {
4709 return gtk_ctree_node_get_pixtext(&this, UpCast!(CTreeNode*)(node), column, toCString!(char**)(text), UpCast!(ubyte*)(spacing), UpCast!(Gdk2.Pixmap**)(pixmap), UpCast!(Gdk2.Bitmap**)(mask));
4711 // Unintrospectable method: node_get_row_data() / gtk_ctree_node_get_row_data()
4712 void* node_get_row_data(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4713 return gtk_ctree_node_get_row_data(&this, UpCast!(CTreeNode*)(node));
4715 // Unintrospectable method: node_get_row_style() / gtk_ctree_node_get_row_style()
4716 Style* node_get_row_style(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4717 return gtk_ctree_node_get_row_style(&this, UpCast!(CTreeNode*)(node));
4719 int node_get_selectable(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4720 return gtk_ctree_node_get_selectable(&this, UpCast!(CTreeNode*)(node));
4722 int node_get_text(AT0, AT1)(AT0 /*CTreeNode*/ node, int column, AT1 /*char**/ text) nothrow {
4723 return gtk_ctree_node_get_text(&this, UpCast!(CTreeNode*)(node), column, toCString!(char**)(text));
4725 Visibility node_is_visible(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4726 return gtk_ctree_node_is_visible(&this, UpCast!(CTreeNode*)(node));
4728 void node_moveto(AT0)(AT0 /*CTreeNode*/ node, int column, float row_align, float col_align) nothrow {
4729 gtk_ctree_node_moveto(&this, UpCast!(CTreeNode*)(node), column, row_align, col_align);
4731 // Unintrospectable method: node_nth() / gtk_ctree_node_nth()
4732 CTreeNode* node_nth()(uint row) nothrow {
4733 return gtk_ctree_node_nth(&this, row);
4735 void node_set_background(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*Gdk2.Color*/ color) nothrow {
4736 gtk_ctree_node_set_background(&this, UpCast!(CTreeNode*)(node), UpCast!(Gdk2.Color*)(color));
4738 void node_set_cell_style(AT0, AT1)(AT0 /*CTreeNode*/ node, int column, AT1 /*Style*/ style) nothrow {
4739 gtk_ctree_node_set_cell_style(&this, UpCast!(CTreeNode*)(node), column, UpCast!(Style*)(style));
4741 void node_set_foreground(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*Gdk2.Color*/ color) nothrow {
4742 gtk_ctree_node_set_foreground(&this, UpCast!(CTreeNode*)(node), UpCast!(Gdk2.Color*)(color));
4744 void node_set_pixmap(AT0, AT1, AT2)(AT0 /*CTreeNode*/ node, int column, AT1 /*Gdk2.Pixmap*/ pixmap, AT2 /*Gdk2.Bitmap*/ mask=null) nothrow {
4745 gtk_ctree_node_set_pixmap(&this, UpCast!(CTreeNode*)(node), column, UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
4747 void node_set_pixtext(AT0, AT1, AT2, AT3)(AT0 /*CTreeNode*/ node, int column, AT1 /*char*/ text, ubyte spacing, AT2 /*Gdk2.Pixmap*/ pixmap, AT3 /*Gdk2.Bitmap*/ mask=null) nothrow {
4748 gtk_ctree_node_set_pixtext(&this, UpCast!(CTreeNode*)(node), column, toCString!(char*)(text), spacing, UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
4750 void node_set_row_data(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*void*/ data) nothrow {
4751 gtk_ctree_node_set_row_data(&this, UpCast!(CTreeNode*)(node), UpCast!(void*)(data));
4753 void node_set_row_data_full(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
4754 gtk_ctree_node_set_row_data_full(&this, UpCast!(CTreeNode*)(node), UpCast!(void*)(data), destroy);
4756 void node_set_row_style(AT0, AT1)(AT0 /*CTreeNode*/ node, AT1 /*Style*/ style) nothrow {
4757 gtk_ctree_node_set_row_style(&this, UpCast!(CTreeNode*)(node), UpCast!(Style*)(style));
4759 void node_set_selectable(AT0)(AT0 /*CTreeNode*/ node, int selectable) nothrow {
4760 gtk_ctree_node_set_selectable(&this, UpCast!(CTreeNode*)(node), selectable);
4762 void node_set_shift(AT0)(AT0 /*CTreeNode*/ node, int column, int vertical, int horizontal) nothrow {
4763 gtk_ctree_node_set_shift(&this, UpCast!(CTreeNode*)(node), column, vertical, horizontal);
4765 void node_set_text(AT0, AT1)(AT0 /*CTreeNode*/ node, int column, AT1 /*char*/ text) nothrow {
4766 gtk_ctree_node_set_text(&this, UpCast!(CTreeNode*)(node), column, toCString!(char*)(text));
4768 // Unintrospectable method: post_recursive() / gtk_ctree_post_recursive()
4769 void post_recursive(AT0, AT1)(AT0 /*CTreeNode*/ node, CTreeFunc func, AT1 /*void*/ data) nothrow {
4770 gtk_ctree_post_recursive(&this, UpCast!(CTreeNode*)(node), func, UpCast!(void*)(data));
4772 // Unintrospectable method: post_recursive_to_depth() / gtk_ctree_post_recursive_to_depth()
4773 void post_recursive_to_depth(AT0, AT1)(AT0 /*CTreeNode*/ node, int depth, CTreeFunc func, AT1 /*void*/ data) nothrow {
4774 gtk_ctree_post_recursive_to_depth(&this, UpCast!(CTreeNode*)(node), depth, func, UpCast!(void*)(data));
4776 // Unintrospectable method: pre_recursive() / gtk_ctree_pre_recursive()
4777 void pre_recursive(AT0, AT1)(AT0 /*CTreeNode*/ node, CTreeFunc func, AT1 /*void*/ data) nothrow {
4778 gtk_ctree_pre_recursive(&this, UpCast!(CTreeNode*)(node), func, UpCast!(void*)(data));
4780 // Unintrospectable method: pre_recursive_to_depth() / gtk_ctree_pre_recursive_to_depth()
4781 void pre_recursive_to_depth(AT0, AT1)(AT0 /*CTreeNode*/ node, int depth, CTreeFunc func, AT1 /*void*/ data) nothrow {
4782 gtk_ctree_pre_recursive_to_depth(&this, UpCast!(CTreeNode*)(node), depth, func, UpCast!(void*)(data));
4784 void real_select_recursive(AT0)(AT0 /*CTreeNode*/ node, int state) nothrow {
4785 gtk_ctree_real_select_recursive(&this, UpCast!(CTreeNode*)(node), state);
4787 void remove_node(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4788 gtk_ctree_remove_node(&this, UpCast!(CTreeNode*)(node));
4790 void select(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4791 gtk_ctree_select(&this, UpCast!(CTreeNode*)(node));
4793 void select_recursive(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4794 gtk_ctree_select_recursive(&this, UpCast!(CTreeNode*)(node));
4796 // Unintrospectable method: set_drag_compare_func() / gtk_ctree_set_drag_compare_func()
4797 void set_drag_compare_func()(CTreeCompareDragFunc cmp_func) nothrow {
4798 gtk_ctree_set_drag_compare_func(&this, cmp_func);
4800 void set_expander_style()(CTreeExpanderStyle expander_style) nothrow {
4801 gtk_ctree_set_expander_style(&this, expander_style);
4803 void set_indent()(int indent) nothrow {
4804 gtk_ctree_set_indent(&this, indent);
4806 void set_line_style()(CTreeLineStyle line_style) nothrow {
4807 gtk_ctree_set_line_style(&this, line_style);
4809 void set_node_info(AT0, AT1, AT2, AT3, AT4, AT5)(AT0 /*CTreeNode*/ node, AT1 /*char*/ text, ubyte spacing, AT2 /*Gdk2.Pixmap*/ pixmap_closed, AT3 /*Gdk2.Bitmap*/ mask_closed, AT4 /*Gdk2.Pixmap*/ pixmap_opened, AT5 /*Gdk2.Bitmap*/ mask_opened, int is_leaf, int expanded) nothrow {
4810 gtk_ctree_set_node_info(&this, UpCast!(CTreeNode*)(node), toCString!(char*)(text), spacing, UpCast!(Gdk2.Pixmap*)(pixmap_closed), UpCast!(Gdk2.Bitmap*)(mask_closed), UpCast!(Gdk2.Pixmap*)(pixmap_opened), UpCast!(Gdk2.Bitmap*)(mask_opened), is_leaf, expanded);
4812 void set_show_stub()(int show_stub) nothrow {
4813 gtk_ctree_set_show_stub(&this, show_stub);
4815 void set_spacing()(int spacing) nothrow {
4816 gtk_ctree_set_spacing(&this, spacing);
4818 void sort_node(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4819 gtk_ctree_sort_node(&this, UpCast!(CTreeNode*)(node));
4821 void sort_recursive(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4822 gtk_ctree_sort_recursive(&this, UpCast!(CTreeNode*)(node));
4824 void toggle_expansion(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4825 gtk_ctree_toggle_expansion(&this, UpCast!(CTreeNode*)(node));
4827 void toggle_expansion_recursive(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4828 gtk_ctree_toggle_expansion_recursive(&this, UpCast!(CTreeNode*)(node));
4830 void unselect(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4831 gtk_ctree_unselect(&this, UpCast!(CTreeNode*)(node));
4833 void unselect_recursive(AT0)(AT0 /*CTreeNode*/ node) nothrow {
4834 gtk_ctree_unselect_recursive(&this, UpCast!(CTreeNode*)(node));
4836 extern (C) alias static void function (CTree* this_, CTreeExpansionType* object, void* user_data=null) nothrow signal_change_focus_row_expansion;
4838 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4839 return super_.signal_connect!name(cb, data, cf);
4842 ulong signal_connect(string name:"change-focus-row-expansion", CB/*:signal_change_focus_row_expansion*/)
4843 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4844 if (is(typeof(cb)==signal_change_focus_row_expansion)||_ttmm!(CB, signal_change_focus_row_expansion)()) {
4845 return signal_connect_data!()(&this, cast(char*)"change-focus-row-expansion",
4846 cast(GObject2.Callback)cb, data, null, cf);
4848 // Unintrospectable glib:signal: tree-collapse() / ()
4849 extern (C) alias static void function (CTree* this_, void* object, void* user_data=null) nothrow signal_tree_collapse;
4850 ulong signal_connect(string name:"tree-collapse", CB/*:signal_tree_collapse*/)
4851 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4852 if (is(typeof(cb)==signal_tree_collapse)||_ttmm!(CB, signal_tree_collapse)()) {
4853 return signal_connect_data!()(&this, cast(char*)"tree-collapse",
4854 cast(GObject2.Callback)cb, data, null, cf);
4856 // Unintrospectable glib:signal: tree-expand() / ()
4857 extern (C) alias static void function (CTree* this_, void* object, void* user_data=null) nothrow signal_tree_expand;
4858 ulong signal_connect(string name:"tree-expand", CB/*:signal_tree_expand*/)
4859 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4860 if (is(typeof(cb)==signal_tree_expand)||_ttmm!(CB, signal_tree_expand)()) {
4861 return signal_connect_data!()(&this, cast(char*)"tree-expand",
4862 cast(GObject2.Callback)cb, data, null, cf);
4864 // Unintrospectable glib:signal: tree-move() / ()
4865 extern (C) alias static void function (CTree* this_, void* object, void* p0, void* p1, void* user_data=null) nothrow signal_tree_move;
4866 ulong signal_connect(string name:"tree-move", CB/*:signal_tree_move*/)
4867 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4868 if (is(typeof(cb)==signal_tree_move)||_ttmm!(CB, signal_tree_move)()) {
4869 return signal_connect_data!()(&this, cast(char*)"tree-move",
4870 cast(GObject2.Callback)cb, data, null, cf);
4872 // Unintrospectable glib:signal: tree-select-row() / ()
4873 extern (C) alias static void function (CTree* this_, void* object, int p0, void* user_data=null) nothrow signal_tree_select_row;
4874 ulong signal_connect(string name:"tree-select-row", CB/*:signal_tree_select_row*/)
4875 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4876 if (is(typeof(cb)==signal_tree_select_row)||_ttmm!(CB, signal_tree_select_row)()) {
4877 return signal_connect_data!()(&this, cast(char*)"tree-select-row",
4878 cast(GObject2.Callback)cb, data, null, cf);
4880 // Unintrospectable glib:signal: tree-unselect-row() / ()
4881 extern (C) alias static void function (CTree* this_, void* object, int p0, void* user_data=null) nothrow signal_tree_unselect_row;
4882 ulong signal_connect(string name:"tree-unselect-row", CB/*:signal_tree_unselect_row*/)
4883 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
4884 if (is(typeof(cb)==signal_tree_unselect_row)||_ttmm!(CB, signal_tree_unselect_row)()) {
4885 return signal_connect_data!()(&this, cast(char*)"tree-unselect-row",
4886 cast(GObject2.Callback)cb, data, null, cf);
4890 struct CTreeClass {
4891 CListClass parent_class;
4892 extern (C) void function (CTree* ctree, CTreeNode* row, int column) nothrow tree_select_row;
4893 extern (C) void function (CTree* ctree, CTreeNode* row, int column) nothrow tree_unselect_row;
4894 extern (C) void function (CTree* ctree, CTreeNode* node) nothrow tree_expand;
4895 extern (C) void function (CTree* ctree, CTreeNode* node) nothrow tree_collapse;
4896 extern (C) void function (CTree* ctree, CTreeNode* node, CTreeNode* new_parent, CTreeNode* new_sibling) nothrow tree_move;
4897 extern (C) void function (CTree* ctree, CTreeExpansionType action) nothrow change_focus_row_expansion;
4900 extern (C) alias int function (CTree* ctree, CTreeNode* source_node, CTreeNode* new_parent, CTreeNode* new_sibling) nothrow CTreeCompareDragFunc;
4902 enum CTreeExpanderStyle {
4903 NONE = 0,
4904 SQUARE = 1,
4905 TRIANGLE = 2,
4906 CIRCULAR = 3
4908 enum CTreeExpansionType {
4909 EXPAND = 0,
4910 EXPAND_RECURSIVE = 1,
4911 COLLAPSE = 2,
4912 COLLAPSE_RECURSIVE = 3,
4913 TOGGLE = 4,
4914 TOGGLE_RECURSIVE = 5
4916 extern (C) alias void function (CTree* ctree, CTreeNode* node, void* data) nothrow CTreeFunc;
4918 extern (C) alias int function (CTree* ctree, uint depth, GLib2.Node* gnode, CTreeNode* cnode, void* data) nothrow CTreeGNodeFunc;
4920 enum CTreeLineStyle {
4921 NONE = 0,
4922 SOLID = 1,
4923 DOTTED = 2,
4924 TABBED = 3
4926 struct CTreeNode {
4927 GLib2.List list;
4930 enum CTreePos {
4931 BEFORE = 0,
4932 AS_CHILD = 1,
4933 AFTER = 2
4935 struct CTreeRow {
4936 CListRow row;
4937 CTreeNode* parent, sibling, children;
4938 Gdk2.Pixmap* pixmap_closed;
4939 Gdk2.Bitmap* mask_closed;
4940 Gdk2.Pixmap* pixmap_opened;
4941 Gdk2.Bitmap* mask_opened;
4942 ushort level;
4943 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4944 uint, "is_leaf", 1,
4945 uint, "expanded", 1,
4946 uint, "__dummy32A", 30));
4949 struct Calendar /* : Widget */ {
4950 mixin Atk.ImplementorIface.__interface__;
4951 mixin Buildable.__interface__;
4952 alias widget this;
4953 alias widget super_;
4954 Widget widget;
4955 Style* header_style, label_style;
4956 int month, year, selected_day;
4957 int[6] day_month, day;
4958 int num_marked_dates;
4959 int[31] marked_date;
4960 CalendarDisplayOptions display_flags;
4961 Gdk2.Color[31] marked_date_color;
4962 Gdk2.GC* gc, xor_gc;
4963 int focus_row, focus_col, highlight_row, highlight_col;
4964 CalendarPrivate* priv;
4965 char[32] grow_space;
4966 extern (C) void function () nothrow _gtk_reserved1;
4967 extern (C) void function () nothrow _gtk_reserved2;
4968 extern (C) void function () nothrow _gtk_reserved3;
4969 extern (C) void function () nothrow _gtk_reserved4;
4972 // Creates a new calendar, with the current date being selected.
4973 // RETURNS: a newly #GtkCalendar widget
4974 static Calendar* new_()() nothrow {
4975 return gtk_calendar_new();
4977 static auto opCall()() {
4978 return gtk_calendar_new();
4980 // Remove all visual markers.
4981 void clear_marks()() nothrow {
4982 gtk_calendar_clear_marks(&this);
4985 // DEPRECATED (v2.4) method: display_options - Use gtk_calendar_set_display_options() instead
4986 // Sets display options (whether to display the heading and the month headings).
4987 // <flags>: the display options to set.
4988 void display_options()(CalendarDisplayOptions flags) nothrow {
4989 gtk_calendar_display_options(&this, flags);
4992 // Does nothing. Previously locked the display of the calendar until
4993 // it was thawed with gtk_calendar_thaw().
4994 void freeze()() nothrow {
4995 gtk_calendar_freeze(&this);
4998 // Obtains the selected date from a #GtkCalendar.
4999 // <year>: location to store the year as a decimal number (e.g. 2011), or %NULL
5000 // <month>: location to store the month number (between 0 and 11), or %NULL
5001 // <day>: location to store the day number (between 1 and 31), or %NULL
5002 void get_date(AT0, AT1, AT2)(/*out*/ AT0 /*uint*/ year=null, /*out*/ AT1 /*uint*/ month=null, /*out*/ AT2 /*uint*/ day=null) nothrow {
5003 gtk_calendar_get_date(&this, UpCast!(uint*)(year), UpCast!(uint*)(month), UpCast!(uint*)(day));
5006 // VERSION: 2.14
5007 // Queries the height of detail cells, in rows.
5008 // See #GtkCalendar:detail-width-chars.
5009 // RETURNS: The height of detail cells, in rows.
5010 int get_detail_height_rows()() nothrow {
5011 return gtk_calendar_get_detail_height_rows(&this);
5014 // VERSION: 2.14
5015 // Queries the width of detail cells, in characters.
5016 // See #GtkCalendar:detail-width-chars.
5017 // RETURNS: The width of detail cells, in characters.
5018 int get_detail_width_chars()() nothrow {
5019 return gtk_calendar_get_detail_width_chars(&this);
5022 // VERSION: 2.4
5023 // Returns the current display options of @calendar.
5024 // RETURNS: the display options.
5025 CalendarDisplayOptions get_display_options()() nothrow {
5026 return gtk_calendar_get_display_options(&this);
5029 // Places a visual marker on a particular day.
5031 // Note that this function always returns %TRUE, and you should
5032 // ignore the return value. In GTK+ 3, this function will not
5033 // return a value.
5034 // RETURNS: %TRUE, always
5035 // <day>: the day number to mark between 1 and 31.
5036 int mark_day()(uint day) nothrow {
5037 return gtk_calendar_mark_day(&this, day);
5040 // Selects a day from the current month.
5041 // <day>: the day number between 1 and 31, or 0 to unselect the currently selected day.
5042 void select_day()(uint day) nothrow {
5043 gtk_calendar_select_day(&this, day);
5046 // Shifts the calendar to a different month.
5048 // Note that this function always returns %TRUE, and you should
5049 // ignore the return value. In GTK+ 3, this function will not
5050 // return a value.
5051 // RETURNS: %TRUE, always
5052 // <month>: a month number between 0 and 11.
5053 // <year>: the year the month is in.
5054 int select_month()(uint month, uint year) nothrow {
5055 return gtk_calendar_select_month(&this, month, year);
5058 // VERSION: 2.14
5059 // Installs a function which provides Pango markup with detail information
5060 // for each day. Examples for such details are holidays or appointments. That
5061 // information is shown below each day when #GtkCalendar:show-details is set.
5062 // A tooltip containing with full detail information is provided, if the entire
5063 // text should not fit into the details area, or if #GtkCalendar:show-details
5064 // is not set.
5066 // The size of the details area can be restricted by setting the
5067 // #GtkCalendar:detail-width-chars and #GtkCalendar:detail-height-rows
5068 // properties.
5069 // <func>: a function providing details for each day.
5070 // <data>: data to pass to @func invokations.
5071 // <destroy>: a function for releasing @data.
5072 void set_detail_func(AT0)(CalendarDetailFunc func, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
5073 gtk_calendar_set_detail_func(&this, func, UpCast!(void*)(data), destroy);
5076 // VERSION: 2.14
5077 // Updates the height of detail cells.
5078 // See #GtkCalendar:detail-height-rows.
5079 // <rows>: detail height in rows.
5080 void set_detail_height_rows()(int rows) nothrow {
5081 gtk_calendar_set_detail_height_rows(&this, rows);
5084 // VERSION: 2.14
5085 // Updates the width of detail cells.
5086 // See #GtkCalendar:detail-width-chars.
5087 // <chars>: detail width in characters.
5088 void set_detail_width_chars()(int chars) nothrow {
5089 gtk_calendar_set_detail_width_chars(&this, chars);
5092 // VERSION: 2.4
5093 // Sets display options (whether to display the heading and the month
5094 // headings).
5095 // <flags>: the display options to set
5096 void set_display_options()(CalendarDisplayOptions flags) nothrow {
5097 gtk_calendar_set_display_options(&this, flags);
5100 // Does nothing. Previously defrosted a calendar; all the changes made
5101 // since the last gtk_calendar_freeze() were displayed.
5102 void thaw()() nothrow {
5103 gtk_calendar_thaw(&this);
5106 // Removes the visual marker from a particular day.
5108 // Note that this function always returns %TRUE, and you should
5109 // ignore the return value. In GTK+ 3, this function will not
5110 // return a value.
5111 // RETURNS: %TRUE, always
5112 // <day>: the day number to unmark between 1 and 31.
5113 int unmark_day()(uint day) nothrow {
5114 return gtk_calendar_unmark_day(&this, day);
5116 extern (C) alias static void function (Calendar* this_, void* user_data=null) nothrow signal_day_selected;
5118 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5119 return super_.signal_connect!name(cb, data, cf);
5122 ulong signal_connect(string name:"day-selected", CB/*:signal_day_selected*/)
5123 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5124 if (is(typeof(cb)==signal_day_selected)||_ttmm!(CB, signal_day_selected)()) {
5125 return signal_connect_data!()(&this, cast(char*)"day-selected",
5126 cast(GObject2.Callback)cb, data, null, cf);
5128 extern (C) alias static void function (Calendar* this_, void* user_data=null) nothrow signal_day_selected_double_click;
5129 ulong signal_connect(string name:"day-selected-double-click", CB/*:signal_day_selected_double_click*/)
5130 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5131 if (is(typeof(cb)==signal_day_selected_double_click)||_ttmm!(CB, signal_day_selected_double_click)()) {
5132 return signal_connect_data!()(&this, cast(char*)"day-selected-double-click",
5133 cast(GObject2.Callback)cb, data, null, cf);
5136 // Emitted when the user clicks a button to change the selected month on a
5137 // calendar.
5138 extern (C) alias static void function (Calendar* this_, void* user_data=null) nothrow signal_month_changed;
5139 ulong signal_connect(string name:"month-changed", CB/*:signal_month_changed*/)
5140 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5141 if (is(typeof(cb)==signal_month_changed)||_ttmm!(CB, signal_month_changed)()) {
5142 return signal_connect_data!()(&this, cast(char*)"month-changed",
5143 cast(GObject2.Callback)cb, data, null, cf);
5145 extern (C) alias static void function (Calendar* this_, void* user_data=null) nothrow signal_next_month;
5146 ulong signal_connect(string name:"next-month", CB/*:signal_next_month*/)
5147 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5148 if (is(typeof(cb)==signal_next_month)||_ttmm!(CB, signal_next_month)()) {
5149 return signal_connect_data!()(&this, cast(char*)"next-month",
5150 cast(GObject2.Callback)cb, data, null, cf);
5152 extern (C) alias static void function (Calendar* this_, void* user_data=null) nothrow signal_next_year;
5153 ulong signal_connect(string name:"next-year", CB/*:signal_next_year*/)
5154 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5155 if (is(typeof(cb)==signal_next_year)||_ttmm!(CB, signal_next_year)()) {
5156 return signal_connect_data!()(&this, cast(char*)"next-year",
5157 cast(GObject2.Callback)cb, data, null, cf);
5159 extern (C) alias static void function (Calendar* this_, void* user_data=null) nothrow signal_prev_month;
5160 ulong signal_connect(string name:"prev-month", CB/*:signal_prev_month*/)
5161 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5162 if (is(typeof(cb)==signal_prev_month)||_ttmm!(CB, signal_prev_month)()) {
5163 return signal_connect_data!()(&this, cast(char*)"prev-month",
5164 cast(GObject2.Callback)cb, data, null, cf);
5166 extern (C) alias static void function (Calendar* this_, void* user_data=null) nothrow signal_prev_year;
5167 ulong signal_connect(string name:"prev-year", CB/*:signal_prev_year*/)
5168 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5169 if (is(typeof(cb)==signal_prev_year)||_ttmm!(CB, signal_prev_year)()) {
5170 return signal_connect_data!()(&this, cast(char*)"prev-year",
5171 cast(GObject2.Callback)cb, data, null, cf);
5175 struct CalendarClass {
5176 WidgetClass parent_class;
5177 extern (C) void function (Calendar* calendar) nothrow month_changed;
5178 extern (C) void function (Calendar* calendar) nothrow day_selected;
5179 extern (C) void function (Calendar* calendar) nothrow day_selected_double_click;
5180 extern (C) void function (Calendar* calendar) nothrow prev_month;
5181 extern (C) void function (Calendar* calendar) nothrow next_month;
5182 extern (C) void function (Calendar* calendar) nothrow prev_year;
5183 extern (C) void function (Calendar* calendar) nothrow next_year;
5187 // VERSION: 2.14
5188 // This kind of functions provide Pango markup with detail information for the
5189 // specified day. Examples for such details are holidays or appointments. The
5190 // function returns %NULL when no information is available.
5193 // for the specified day, or %NULL.
5194 // RETURNS: Newly allocated string with Pango markup with details
5195 // <calendar>: a #GtkCalendar.
5196 // <year>: the year for which details are needed.
5197 // <month>: the month for which details are needed.
5198 // <day>: the day of @month for which details are needed.
5199 // <user_data>: the data passed with gtk_calendar_set_detail_func().
5200 extern (C) alias char* /*new*/ function (Calendar* calendar, uint year, uint month, uint day, void* user_data) nothrow CalendarDetailFunc;
5202 // These options can be used to influence the display and behaviour of a #GtkCalendar.
5203 enum CalendarDisplayOptions {
5204 SHOW_HEADING = 1,
5205 SHOW_DAY_NAMES = 2,
5206 NO_MONTH_CHANGE = 4,
5207 SHOW_WEEK_NUMBERS = 8,
5208 WEEK_START_MONDAY = 16,
5209 SHOW_DETAILS = 32
5211 struct CalendarPrivate {
5215 // The type of the callback functions used for e.g. iterating over
5216 // the children of a container, see gtk_container_foreach().
5217 // <widget>: the widget to operate on
5218 // <data>: user-supplied data
5219 extern (C) alias void function (Widget* widget, void* data) nothrow Callback;
5221 extern (C) alias void function (Object* object, void* data, uint n_args, Arg* args) nothrow CallbackMarshal;
5223 struct Cell {
5224 CellType type;
5225 short vertical, horizontal;
5226 Style* style;
5228 union u {
5229 char* text;
5231 struct pm {
5232 Gdk2.Pixmap* pixmap;
5233 Gdk2.Bitmap* mask;
5237 struct pt {
5238 char* text;
5239 ubyte spacing;
5240 Gdk2.Pixmap* pixmap;
5241 Gdk2.Bitmap* mask;
5244 Widget* widget;
5248 struct CellEditable /* Interface */ {
5249 mixin template __interface__() { // Emits the #GtkCellEditable::editing-done signal.
5250 void editing_done()() nothrow {
5251 gtk_cell_editable_editing_done(cast(CellEditable*)&this);
5253 // Emits the #GtkCellEditable::remove-widget signal.
5254 void remove_widget()() nothrow {
5255 gtk_cell_editable_remove_widget(cast(CellEditable*)&this);
5258 // Begins editing on a @cell_editable. @event is the #GdkEvent that began
5259 // the editing process. It may be %NULL, in the instance that editing was
5260 // initiated through programatic means.
5261 // <event>: A #GdkEvent, or %NULL
5262 void start_editing(AT0)(AT0 /*Gdk2.Event*/ event=null) nothrow {
5263 gtk_cell_editable_start_editing(cast(CellEditable*)&this, UpCast!(Gdk2.Event*)(event));
5266 // This signal is a sign for the cell renderer to update its
5267 // value from the @cell_editable.
5269 // Implementations of #GtkCellEditable are responsible for
5270 // emitting this signal when they are done editing, e.g.
5271 // #GtkEntry is emitting it when the user presses Enter.
5273 // gtk_cell_editable_editing_done() is a convenience method
5274 // for emitting GtkCellEditable::editing-done.
5275 extern (C) alias static void function (CellEditable* this_, void* user_data=null) nothrow signal_editing_done;
5277 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5278 return super_.signal_connect!name(cb, data, cf);
5281 ulong signal_connect(string name:"editing-done", CB/*:signal_editing_done*/)
5282 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5283 if (is(typeof(cb)==signal_editing_done)||_ttmm!(CB, signal_editing_done)()) {
5284 return signal_connect_data!()(&this, cast(char*)"editing-done",
5285 cast(GObject2.Callback)cb, data, null, cf);
5288 // This signal is meant to indicate that the cell is finished
5289 // editing, and the widget may now be destroyed.
5291 // Implementations of #GtkCellEditable are responsible for
5292 // emitting this signal when they are done editing. It must
5293 // be emitted after the #GtkCellEditable::editing-done signal,
5294 // to give the cell renderer a chance to update the cell's value
5295 // before the widget is removed.
5297 // gtk_cell_editable_remove_widget() is a convenience method
5298 // for emitting GtkCellEditable::remove-widget.
5299 extern (C) alias static void function (CellEditable* this_, void* user_data=null) nothrow signal_remove_widget;
5300 ulong signal_connect(string name:"remove-widget", CB/*:signal_remove_widget*/)
5301 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5302 if (is(typeof(cb)==signal_remove_widget)||_ttmm!(CB, signal_remove_widget)()) {
5303 return signal_connect_data!()(&this, cast(char*)"remove-widget",
5304 cast(GObject2.Callback)cb, data, null, cf);
5307 mixin __interface__;
5310 struct CellEditableIface {
5311 GObject2.TypeInterface g_iface;
5312 extern (C) void function (CellEditable* cell_editable) nothrow editing_done;
5313 extern (C) void function (CellEditable* cell_editable) nothrow remove_widget;
5314 // <event>: A #GdkEvent, or %NULL
5315 extern (C) void function (CellEditable* cell_editable, Gdk2.Event* event=null) nothrow start_editing;
5318 struct CellLayout /* Interface */ {
5319 mixin template __interface__() {
5320 // VERSION: 2.4
5321 // Adds an attribute mapping to the list in @cell_layout. The @column is the
5322 // column of the model to get a value from, and the @attribute is the
5323 // parameter on @cell to be set from the value. So for example if column 2
5324 // of the model contains strings, you could have the "text" attribute of a
5325 // #GtkCellRendererText get its values from column 2.
5326 // <cell>: A #GtkCellRenderer.
5327 // <attribute>: An attribute on the renderer.
5328 // <column>: The column position on the model to get the attribute from.
5329 void add_attribute(AT0, AT1)(AT0 /*CellRenderer*/ cell, AT1 /*char*/ attribute, int column) nothrow {
5330 gtk_cell_layout_add_attribute(cast(CellLayout*)&this, UpCast!(CellRenderer*)(cell), toCString!(char*)(attribute), column);
5333 // VERSION: 2.4
5334 // Unsets all the mappings on all renderers on @cell_layout and
5335 // removes all renderers from @cell_layout.
5336 void clear()() nothrow {
5337 gtk_cell_layout_clear(cast(CellLayout*)&this);
5340 // VERSION: 2.4
5341 // Clears all existing attributes previously set with
5342 // gtk_cell_layout_set_attributes().
5343 // <cell>: A #GtkCellRenderer to clear the attribute mapping on.
5344 void clear_attributes(AT0)(AT0 /*CellRenderer*/ cell) nothrow {
5345 gtk_cell_layout_clear_attributes(cast(CellLayout*)&this, UpCast!(CellRenderer*)(cell));
5348 // VERSION: 2.12
5349 // Returns the cell renderers which have been added to @cell_layout.
5351 // renderers has been newly allocated and should be freed with
5352 // g_list_free() when no longer needed.
5353 // RETURNS: a list of cell renderers. The list, but not the
5354 GLib2.List* /*new container*/ get_cells()() nothrow {
5355 return gtk_cell_layout_get_cells(cast(CellLayout*)&this);
5358 // VERSION: 2.4
5359 // Adds the @cell to the end of @cell_layout. If @expand is %FALSE, then the
5360 // @cell is allocated no more space than it needs. Any unused space is
5361 // divided evenly between cells for which @expand is %TRUE.
5363 // Note that reusing the same cell renderer is not supported.
5364 // <cell>: A #GtkCellRenderer.
5365 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
5366 void pack_end(AT0)(AT0 /*CellRenderer*/ cell, int expand) nothrow {
5367 gtk_cell_layout_pack_end(cast(CellLayout*)&this, UpCast!(CellRenderer*)(cell), expand);
5370 // VERSION: 2.4
5371 // Packs the @cell into the beginning of @cell_layout. If @expand is %FALSE,
5372 // then the @cell is allocated no more space than it needs. Any unused space
5373 // is divided evenly between cells for which @expand is %TRUE.
5375 // Note that reusing the same cell renderer is not supported.
5376 // <cell>: A #GtkCellRenderer.
5377 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
5378 void pack_start(AT0)(AT0 /*CellRenderer*/ cell, int expand) nothrow {
5379 gtk_cell_layout_pack_start(cast(CellLayout*)&this, UpCast!(CellRenderer*)(cell), expand);
5382 // VERSION: 2.4
5383 // Re-inserts @cell at @position. Note that @cell has already to be packed
5384 // into @cell_layout for this to function properly.
5385 // <cell>: A #GtkCellRenderer to reorder.
5386 // <position>: New position to insert @cell at.
5387 void reorder(AT0)(AT0 /*CellRenderer*/ cell, int position) nothrow {
5388 gtk_cell_layout_reorder(cast(CellLayout*)&this, UpCast!(CellRenderer*)(cell), position);
5391 // Unintrospectable method: set_attributes() / gtk_cell_layout_set_attributes()
5392 // VERSION: 2.4
5393 // Sets the attributes in list as the attributes of @cell_layout. The
5394 // attributes should be in attribute/column order, as in
5395 // gtk_cell_layout_add_attribute(). All existing attributes are removed, and
5396 // replaced with the new attributes.
5397 // <cell>: A #GtkCellRenderer.
5398 /+ Not available -- variadic methods unsupported - use the C function directly.
5399 alias gtk_cell_layout_set_attributes set_attributes; // Variadic
5402 // VERSION: 2.4
5403 // Sets the #GtkCellLayoutDataFunc to use for @cell_layout. This function
5404 // is used instead of the standard attributes mapping for setting the
5405 // column value, and should set the value of @cell_layout's cell renderer(s)
5406 // as appropriate. @func may be %NULL to remove and older one.
5407 // <cell>: A #GtkCellRenderer.
5408 // <func>: The #GtkCellLayoutDataFunc to use.
5409 // <func_data>: The user data for @func.
5410 // <destroy>: The destroy notification for @func_data.
5411 void set_cell_data_func(AT0, AT1)(AT0 /*CellRenderer*/ cell, CellLayoutDataFunc func, AT1 /*void*/ func_data, GLib2.DestroyNotify destroy) nothrow {
5412 gtk_cell_layout_set_cell_data_func(cast(CellLayout*)&this, UpCast!(CellRenderer*)(cell), func, UpCast!(void*)(func_data), destroy);
5415 mixin __interface__;
5418 extern (C) alias void function (CellLayout* cell_layout, CellRenderer* cell, TreeModel* tree_model, TreeIter* iter, void* data) nothrow CellLayoutDataFunc;
5420 struct CellLayoutIface {
5421 GObject2.TypeInterface g_iface;
5423 // <cell>: A #GtkCellRenderer.
5424 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
5425 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int expand) nothrow pack_start;
5427 // <cell>: A #GtkCellRenderer.
5428 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
5429 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int expand) nothrow pack_end;
5430 extern (C) void function (CellLayout* cell_layout) nothrow clear;
5432 // <cell>: A #GtkCellRenderer.
5433 // <attribute>: An attribute on the renderer.
5434 // <column>: The column position on the model to get the attribute from.
5435 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, char* attribute, int column) nothrow add_attribute;
5437 // <cell>: A #GtkCellRenderer.
5438 // <func>: The #GtkCellLayoutDataFunc to use.
5439 // <func_data>: The user data for @func.
5440 // <destroy>: The destroy notification for @func_data.
5441 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy) nothrow set_cell_data_func;
5442 // <cell>: A #GtkCellRenderer to clear the attribute mapping on.
5443 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell) nothrow clear_attributes;
5445 // <cell>: A #GtkCellRenderer to reorder.
5446 // <position>: New position to insert @cell at.
5447 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int position) nothrow reorder;
5448 // RETURNS: a list of cell renderers. The list, but not the
5449 extern (C) GLib2.List* /*new container*/ function (CellLayout* cell_layout) nothrow get_cells;
5452 struct CellPixText {
5453 CellType type;
5454 short vertical, horizontal;
5455 Style* style;
5456 char* text;
5457 ubyte spacing;
5458 Gdk2.Pixmap* pixmap;
5459 Gdk2.Bitmap* mask;
5462 struct CellPixmap {
5463 CellType type;
5464 short vertical, horizontal;
5465 Style* style;
5466 Gdk2.Pixmap* pixmap;
5467 Gdk2.Bitmap* mask;
5470 struct CellRenderer /* : Object */ {
5471 alias parent this;
5472 alias parent super_;
5473 alias parent object;
5474 Object parent;
5475 float xalign, yalign;
5476 int width, height;
5477 ushort xpad, ypad;
5478 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5479 uint, "mode", 2,
5480 uint, "visible", 1,
5481 uint, "is_expander", 1,
5482 uint, "is_expanded", 1,
5483 uint, "cell_background_set", 1,
5484 uint, "sensitive", 1,
5485 uint, "editing", 1,
5486 uint, "__dummy32A", 24));
5489 // Passes an activate event to the cell renderer for possible processing.
5490 // Some cell renderers may use events; for example, #GtkCellRendererToggle
5491 // toggles when it gets a mouse click.
5492 // RETURNS: %TRUE if the event was consumed/handled
5493 // <event>: a #GdkEvent
5494 // <widget>: widget that received the event
5495 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5496 // <background_area>: background area as passed to gtk_cell_renderer_render()
5497 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5498 // <flags>: render flags
5499 int activate(AT0, AT1, AT2, AT3, AT4)(AT0 /*Gdk2.Event*/ event, AT1 /*Widget*/ widget, AT2 /*char*/ path, AT3 /*Gdk2.Rectangle*/ background_area, AT4 /*Gdk2.Rectangle*/ cell_area, CellRendererState flags) nothrow {
5500 return gtk_cell_renderer_activate(&this, UpCast!(Gdk2.Event*)(event), UpCast!(Widget*)(widget), toCString!(char*)(path), UpCast!(Gdk2.Rectangle*)(background_area), UpCast!(Gdk2.Rectangle*)(cell_area), flags);
5503 // VERSION: 2.4
5504 // DEPRECATED (v2.6) method: editing_canceled - Use gtk_cell_renderer_stop_editing() instead
5505 // Causes the cell renderer to emit the #GtkCellRenderer::editing-canceled
5506 // signal.
5508 // This function is for use only by implementations of cell renderers that
5509 // need to notify the client program that an editing process was canceled
5510 // and the changes were not committed.
5511 void editing_canceled()() nothrow {
5512 gtk_cell_renderer_editing_canceled(&this);
5515 // VERSION: 2.18
5516 // Fills in @xalign and @yalign with the appropriate values of @cell.
5517 // <xalign>: location to fill in with the x alignment of the cell, or %NULL
5518 // <yalign>: location to fill in with the y alignment of the cell, or %NULL
5519 void get_alignment(AT0, AT1)(/*out*/ AT0 /*float*/ xalign=null, /*out*/ AT1 /*float*/ yalign=null) nothrow {
5520 gtk_cell_renderer_get_alignment(&this, UpCast!(float*)(xalign), UpCast!(float*)(yalign));
5523 // Fills in @width and @height with the appropriate size of @cell.
5524 // <width>: location to fill in with the fixed width of the cell, or %NULL
5525 // <height>: location to fill in with the fixed height of the cell, or %NULL
5526 void get_fixed_size()(/*out*/ int* width=null, /*out*/ int* height=null) nothrow {
5527 gtk_cell_renderer_get_fixed_size(&this, width, height);
5530 // VERSION: 2.18
5531 // Fills in @xpad and @ypad with the appropriate values of @cell.
5532 // <xpad>: location to fill in with the x padding of the cell, or %NULL
5533 // <ypad>: location to fill in with the y padding of the cell, or %NULL
5534 void get_padding()(/*out*/ int* xpad=null, /*out*/ int* ypad=null) nothrow {
5535 gtk_cell_renderer_get_padding(&this, xpad, ypad);
5538 // VERSION: 2.18
5539 // Returns the cell renderer's sensitivity.
5540 // RETURNS: %TRUE if the cell renderer is sensitive
5541 int get_sensitive()() nothrow {
5542 return gtk_cell_renderer_get_sensitive(&this);
5545 // Obtains the width and height needed to render the cell. Used by view
5546 // widgets to determine the appropriate size for the cell_area passed to
5547 // gtk_cell_renderer_render(). If @cell_area is not %NULL, fills in the
5548 // x and y offsets (if set) of the cell relative to this location.
5550 // Please note that the values set in @width and @height, as well as those
5551 // in @x_offset and @y_offset are inclusive of the xpad and ypad properties.
5552 // <widget>: the widget the renderer is rendering to
5553 // <cell_area>: The area a cell will be allocated, or %NULL
5554 // <x_offset>: location to return x offset of cell relative to @cell_area, or %NULL
5555 // <y_offset>: location to return y offset of cell relative to @cell_area, or %NULL
5556 // <width>: location to return width needed to render a cell, or %NULL
5557 // <height>: location to return height needed to render a cell, or %NULL
5558 void get_size(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*Gdk2.Rectangle*/ cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) nothrow {
5559 gtk_cell_renderer_get_size(&this, UpCast!(Widget*)(widget), UpCast!(Gdk2.Rectangle*)(cell_area), x_offset, y_offset, width, height);
5562 // VERSION: 2.18
5563 // Returns the cell renderer's visibility.
5564 // RETURNS: %TRUE if the cell renderer is visible
5565 int get_visible()() nothrow {
5566 return gtk_cell_renderer_get_visible(&this);
5569 // Invokes the virtual render function of the #GtkCellRenderer. The three
5570 // passed-in rectangles are areas of @window. Most renderers will draw within
5571 // @cell_area; the xalign, yalign, xpad, and ypad fields of the #GtkCellRenderer
5572 // should be honored with respect to @cell_area. @background_area includes the
5573 // blank space around the cell, and also the area containing the tree expander;
5574 // so the @background_area rectangles for all cells tile to cover the entire
5575 // @window. @expose_area is a clip rectangle.
5576 // <window>: a #GdkDrawable to draw to
5577 // <widget>: the widget owning @window
5578 // <background_area>: entire cell area (including tree expanders and maybe padding on the sides)
5579 // <cell_area>: area normally rendered by a cell renderer
5580 // <expose_area>: area that actually needs updating
5581 // <flags>: flags that affect rendering
5582 void render(AT0, AT1, AT2, AT3, AT4)(AT0 /*Gdk2.Window*/ window, AT1 /*Widget*/ widget, AT2 /*Gdk2.Rectangle*/ background_area, AT3 /*Gdk2.Rectangle*/ cell_area, AT4 /*Gdk2.Rectangle*/ expose_area, CellRendererState flags) nothrow {
5583 gtk_cell_renderer_render(&this, UpCast!(Gdk2.Window*)(window), UpCast!(Widget*)(widget), UpCast!(Gdk2.Rectangle*)(background_area), UpCast!(Gdk2.Rectangle*)(cell_area), UpCast!(Gdk2.Rectangle*)(expose_area), flags);
5586 // VERSION: 2.18
5587 // Sets the renderer's alignment within its available space.
5588 // <xalign>: the x alignment of the cell renderer
5589 // <yalign>: the y alignment of the cell renderer
5590 void set_alignment()(float xalign, float yalign) nothrow {
5591 gtk_cell_renderer_set_alignment(&this, xalign, yalign);
5594 // Sets the renderer size to be explicit, independent of the properties set.
5595 // <width>: the width of the cell renderer, or -1
5596 // <height>: the height of the cell renderer, or -1
5597 void set_fixed_size()(int width, int height) nothrow {
5598 gtk_cell_renderer_set_fixed_size(&this, width, height);
5601 // VERSION: 2.18
5602 // Sets the renderer's padding.
5603 // <xpad>: the x padding of the cell renderer
5604 // <ypad>: the y padding of the cell renderer
5605 void set_padding()(int xpad, int ypad) nothrow {
5606 gtk_cell_renderer_set_padding(&this, xpad, ypad);
5609 // VERSION: 2.18
5610 // Sets the cell renderer's sensitivity.
5611 // <sensitive>: the sensitivity of the cell
5612 void set_sensitive()(int sensitive) nothrow {
5613 gtk_cell_renderer_set_sensitive(&this, sensitive);
5616 // VERSION: 2.18
5617 // Sets the cell renderer's visibility.
5618 // <visible>: the visibility of the cell
5619 void set_visible()(int visible) nothrow {
5620 gtk_cell_renderer_set_visible(&this, visible);
5623 // Passes an activate event to the cell renderer for possible processing.
5624 // RETURNS: A new #GtkCellEditable, or %NULL
5625 // <event>: a #GdkEvent
5626 // <widget>: widget that received the event
5627 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5628 // <background_area>: background area as passed to gtk_cell_renderer_render()
5629 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5630 // <flags>: render flags
5631 CellEditable* start_editing(AT0, AT1, AT2, AT3, AT4)(AT0 /*Gdk2.Event*/ event, AT1 /*Widget*/ widget, AT2 /*char*/ path, AT3 /*Gdk2.Rectangle*/ background_area, AT4 /*Gdk2.Rectangle*/ cell_area, CellRendererState flags) nothrow {
5632 return gtk_cell_renderer_start_editing(&this, UpCast!(Gdk2.Event*)(event), UpCast!(Widget*)(widget), toCString!(char*)(path), UpCast!(Gdk2.Rectangle*)(background_area), UpCast!(Gdk2.Rectangle*)(cell_area), flags);
5635 // VERSION: 2.6
5636 // Informs the cell renderer that the editing is stopped.
5637 // If @canceled is %TRUE, the cell renderer will emit the
5638 // #GtkCellRenderer::editing-canceled signal.
5640 // This function should be called by cell renderer implementations
5641 // in response to the #GtkCellEditable::editing-done signal of
5642 // #GtkCellEditable.
5643 // <canceled>: %TRUE if the editing has been canceled
5644 void stop_editing()(int canceled) nothrow {
5645 gtk_cell_renderer_stop_editing(&this, canceled);
5648 // VERSION: 2.4
5649 // This signal gets emitted when the user cancels the process of editing a
5650 // cell. For example, an editable cell renderer could be written to cancel
5651 // editing when the user presses Escape.
5653 // See also: gtk_cell_renderer_stop_editing().
5654 extern (C) alias static void function (CellRenderer* this_, void* user_data=null) nothrow signal_editing_canceled;
5656 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5657 return super_.signal_connect!name(cb, data, cf);
5660 ulong signal_connect(string name:"editing-canceled", CB/*:signal_editing_canceled*/)
5661 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5662 if (is(typeof(cb)==signal_editing_canceled)||_ttmm!(CB, signal_editing_canceled)()) {
5663 return signal_connect_data!()(&this, cast(char*)"editing-canceled",
5664 cast(GObject2.Callback)cb, data, null, cf);
5667 // VERSION: 2.6
5668 // This signal gets emitted when a cell starts to be edited.
5669 // The intended use of this signal is to do special setup
5670 // on @editable, e.g. adding a #GtkEntryCompletion or setting
5671 // up additional columns in a #GtkComboBox.
5673 // Note that GTK+ doesn't guarantee that cell renderers will
5674 // continue to use the same kind of widget for editing in future
5675 // releases, therefore you should check the type of @editable
5676 // before doing any specific setup, as in the following example:
5677 // |[
5678 // static void
5679 // text_editing_started (GtkCellRenderer *cell,
5680 // GtkCellEditable *editable,
5681 // const gchar *path,
5682 // gpointer data)
5683 // {
5684 // if (GTK_IS_ENTRY (editable))
5685 // {
5686 // GtkEntry *entry = GTK_ENTRY (editable);
5688 // /&ast; ... create a GtkEntryCompletion &ast;/
5690 // gtk_entry_set_completion (entry, completion);
5691 // }
5692 // }
5693 // ]|
5694 // <editable>: the #GtkCellEditable
5695 // <path>: the path identifying the edited cell
5696 extern (C) alias static void function (CellRenderer* this_, CellEditable* editable, char* path, void* user_data=null) nothrow signal_editing_started;
5697 ulong signal_connect(string name:"editing-started", CB/*:signal_editing_started*/)
5698 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5699 if (is(typeof(cb)==signal_editing_started)||_ttmm!(CB, signal_editing_started)()) {
5700 return signal_connect_data!()(&this, cast(char*)"editing-started",
5701 cast(GObject2.Callback)cb, data, null, cf);
5705 struct CellRendererAccel /* : CellRendererText */ {
5706 alias parent this;
5707 alias parent super_;
5708 alias parent cellrenderertext;
5709 CellRendererText parent;
5710 private uint accel_key;
5711 private Gdk2.ModifierType accel_mods;
5712 private uint keycode;
5713 private CellRendererAccelMode accel_mode;
5714 private Widget* edit_widget, grab_widget, sizing_label;
5717 // VERSION: 2.10
5718 // Creates a new #GtkCellRendererAccel.
5719 // RETURNS: the new cell renderer
5720 static CellRendererAccel* new_()() nothrow {
5721 return gtk_cell_renderer_accel_new();
5723 static auto opCall()() {
5724 return gtk_cell_renderer_accel_new();
5727 // VERSION: 2.10
5728 // Gets emitted when the user has removed the accelerator.
5729 // <path_string>: the path identifying the row of the edited cell
5730 extern (C) alias static void function (CellRendererAccel* this_, char* path_string, void* user_data=null) nothrow signal_accel_cleared;
5732 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5733 return super_.signal_connect!name(cb, data, cf);
5736 ulong signal_connect(string name:"accel-cleared", CB/*:signal_accel_cleared*/)
5737 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5738 if (is(typeof(cb)==signal_accel_cleared)||_ttmm!(CB, signal_accel_cleared)()) {
5739 return signal_connect_data!()(&this, cast(char*)"accel-cleared",
5740 cast(GObject2.Callback)cb, data, null, cf);
5743 // VERSION: 2.10
5744 // Gets emitted when the user has selected a new accelerator.
5745 // <path_string>: the path identifying the row of the edited cell
5746 // <accel_key>: the new accelerator keyval
5747 // <accel_mods>: the new acclerator modifier mask
5748 // <hardware_keycode>: the keycode of the new accelerator
5749 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) nothrow signal_accel_edited;
5750 ulong signal_connect(string name:"accel-edited", CB/*:signal_accel_edited*/)
5751 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5752 if (is(typeof(cb)==signal_accel_edited)||_ttmm!(CB, signal_accel_edited)()) {
5753 return signal_connect_data!()(&this, cast(char*)"accel-edited",
5754 cast(GObject2.Callback)cb, data, null, cf);
5758 struct CellRendererAccelClass {
5759 CellRendererTextClass parent_class;
5760 extern (C) void function (CellRendererAccel* accel, char* path_string, uint accel_key, Gdk2.ModifierType accel_mods, uint hardware_keycode) nothrow accel_edited;
5761 extern (C) void function (CellRendererAccel* accel, char* path_string) nothrow accel_cleared;
5762 extern (C) void function () nothrow _gtk_reserved0;
5763 extern (C) void function () nothrow _gtk_reserved1;
5764 extern (C) void function () nothrow _gtk_reserved2;
5765 extern (C) void function () nothrow _gtk_reserved3;
5766 extern (C) void function () nothrow _gtk_reserved4;
5769 enum CellRendererAccelMode {
5770 GTK = 0,
5771 OTHER = 1
5773 struct CellRendererClass {
5774 ObjectClass parent_class;
5776 // <widget>: the widget the renderer is rendering to
5777 // <cell_area>: The area a cell will be allocated, or %NULL
5778 // <x_offset>: location to return x offset of cell relative to @cell_area, or %NULL
5779 // <y_offset>: location to return y offset of cell relative to @cell_area, or %NULL
5780 // <width>: location to return width needed to render a cell, or %NULL
5781 // <height>: location to return height needed to render a cell, or %NULL
5782 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) nothrow get_size;
5784 // <window>: a #GdkDrawable to draw to
5785 // <widget>: the widget owning @window
5786 // <background_area>: entire cell area (including tree expanders and maybe padding on the sides)
5787 // <cell_area>: area normally rendered by a cell renderer
5788 // <expose_area>: area that actually needs updating
5789 // <flags>: flags that affect rendering
5790 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) nothrow render;
5792 // RETURNS: %TRUE if the event was consumed/handled
5793 // <event>: a #GdkEvent
5794 // <widget>: widget that received the event
5795 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5796 // <background_area>: background area as passed to gtk_cell_renderer_render()
5797 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5798 // <flags>: render flags
5799 extern (C) int function (CellRenderer* cell, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) nothrow activate;
5801 // RETURNS: A new #GtkCellEditable, or %NULL
5802 // <event>: a #GdkEvent
5803 // <widget>: widget that received the event
5804 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5805 // <background_area>: background area as passed to gtk_cell_renderer_render()
5806 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5807 // <flags>: render flags
5808 extern (C) CellEditable* function (CellRenderer* cell, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) nothrow start_editing;
5809 extern (C) void function (CellRenderer* cell) nothrow editing_canceled;
5810 extern (C) void function (CellRenderer* cell, CellEditable* editable, char* path) nothrow editing_started;
5811 extern (C) void function () nothrow _gtk_reserved1;
5812 extern (C) void function () nothrow _gtk_reserved2;
5815 struct CellRendererCombo /* : CellRendererText */ {
5816 alias parent this;
5817 alias parent super_;
5818 alias parent cellrenderertext;
5819 CellRendererText parent;
5820 TreeModel* model;
5821 int text_column;
5822 int has_entry;
5823 private uint focus_out_id;
5826 // VERSION: 2.6
5827 // Creates a new #GtkCellRendererCombo.
5828 // Adjust how text is drawn using object properties.
5829 // Object properties can be set globally (with g_object_set()).
5830 // Also, with #GtkTreeViewColumn, you can bind a property to a value
5831 // in a #GtkTreeModel. For example, you can bind the "text" property
5832 // on the cell renderer to a string value in the model, thus rendering
5833 // a different string in each row of the #GtkTreeView.
5834 // RETURNS: the new cell renderer
5835 static CellRendererCombo* new_()() nothrow {
5836 return gtk_cell_renderer_combo_new();
5838 static auto opCall()() {
5839 return gtk_cell_renderer_combo_new();
5842 // VERSION: 2.14
5843 // This signal is emitted each time after the user selected an item in
5844 // the combo box, either by using the mouse or the arrow keys. Contrary
5845 // to GtkComboBox, GtkCellRendererCombo::changed is not emitted for
5846 // changes made to a selected item in the entry. The argument @new_iter
5847 // corresponds to the newly selected item in the combo box and it is relative
5848 // to the GtkTreeModel set via the model property on GtkCellRendererCombo.
5850 // Note that as soon as you change the model displayed in the tree view,
5851 // the tree view will immediately cease the editing operating. This
5852 // means that you most probably want to refrain from changing the model
5853 // until the combo cell renderer emits the edited or editing_canceled signal.
5854 // <path_string>: a string of the path identifying the edited cell (relative to the tree view model)
5855 // <new_iter>: the new iter selected in the combo box (relative to the combo box model)
5856 extern (C) alias static void function (CellRendererCombo* this_, char* path_string, TreeIter* new_iter, void* user_data=null) nothrow signal_changed;
5858 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5859 return super_.signal_connect!name(cb, data, cf);
5862 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
5863 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5864 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
5865 return signal_connect_data!()(&this, cast(char*)"changed",
5866 cast(GObject2.Callback)cb, data, null, cf);
5870 struct CellRendererComboClass {
5871 CellRendererTextClass parent;
5874 enum CellRendererMode {
5875 INERT = 0,
5876 ACTIVATABLE = 1,
5877 EDITABLE = 2
5879 struct CellRendererPixbuf /* : CellRenderer */ {
5880 alias parent this;
5881 alias parent super_;
5882 alias parent cellrenderer;
5883 CellRenderer parent;
5884 private GdkPixbuf2.Pixbuf* pixbuf, pixbuf_expander_open, pixbuf_expander_closed;
5887 // Creates a new #GtkCellRendererPixbuf. Adjust rendering
5888 // parameters using object properties. Object properties can be set
5889 // globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
5890 // can bind a property to a value in a #GtkTreeModel. For example, you
5891 // can bind the "pixbuf" property on the cell renderer to a pixbuf value
5892 // in the model, thus rendering a different image in each row of the
5893 // #GtkTreeView.
5894 // RETURNS: the new cell renderer
5895 static CellRendererPixbuf* new_()() nothrow {
5896 return gtk_cell_renderer_pixbuf_new();
5898 static auto opCall()() {
5899 return gtk_cell_renderer_pixbuf_new();
5903 struct CellRendererPixbufClass {
5904 CellRendererClass parent_class;
5905 extern (C) void function () nothrow _gtk_reserved1;
5906 extern (C) void function () nothrow _gtk_reserved2;
5907 extern (C) void function () nothrow _gtk_reserved3;
5908 extern (C) void function () nothrow _gtk_reserved4;
5911 struct CellRendererProgress /* : CellRenderer */ {
5912 alias parent_instance this;
5913 alias parent_instance super_;
5914 alias parent_instance cellrenderer;
5915 CellRenderer parent_instance;
5916 private CellRendererProgressPrivate* priv;
5919 // VERSION: 2.6
5920 // Creates a new #GtkCellRendererProgress.
5921 // RETURNS: the new cell renderer
5922 static CellRendererProgress* new_()() nothrow {
5923 return gtk_cell_renderer_progress_new();
5925 static auto opCall()() {
5926 return gtk_cell_renderer_progress_new();
5930 struct CellRendererProgressClass {
5931 CellRendererClass parent_class;
5932 extern (C) void function () nothrow _gtk_reserved1;
5933 extern (C) void function () nothrow _gtk_reserved2;
5934 extern (C) void function () nothrow _gtk_reserved3;
5935 extern (C) void function () nothrow _gtk_reserved4;
5938 struct CellRendererProgressPrivate {
5941 struct CellRendererSpin /* : CellRendererText */ {
5942 alias parent this;
5943 alias parent super_;
5944 alias parent cellrenderertext;
5945 CellRendererText parent;
5948 // VERSION: 2.10
5949 // Creates a new #GtkCellRendererSpin.
5950 // RETURNS: a new #GtkCellRendererSpin
5951 static CellRendererSpin* new_()() nothrow {
5952 return gtk_cell_renderer_spin_new();
5954 static auto opCall()() {
5955 return gtk_cell_renderer_spin_new();
5959 struct CellRendererSpinClass {
5960 CellRendererTextClass parent;
5963 struct CellRendererSpinPrivate {
5967 // GtkCellRendererSpinner renders a spinning animation in a cell, very
5968 // similar to #GtkSpinner. It can often be used as an alternative
5969 // to a #GtkCellRendererProgress for displaying indefinite activity,
5970 // instead of actual progress.
5972 // To start the animation in a cell, set the #GtkCellRendererSpinner:active
5973 // property to %TRUE and increment the #GtkCellRendererSpinner:pulse property
5974 // at regular intervals. The usual way to set the cell renderer properties
5975 // for each cell is to bind them to columns in your tree model using e.g.
5976 // gtk_tree_view_column_add_attribute().
5977 struct CellRendererSpinner /* : CellRenderer */ {
5978 alias parent this;
5979 alias parent super_;
5980 alias parent cellrenderer;
5981 CellRenderer parent;
5982 CellRendererSpinnerPrivate* priv;
5985 // VERSION: 2.20
5986 // Returns a new cell renderer which will show a spinner to indicate
5987 // activity.
5988 // RETURNS: a new #GtkCellRenderer
5989 static CellRendererSpinner* new_()() nothrow {
5990 return gtk_cell_renderer_spinner_new();
5992 static auto opCall()() {
5993 return gtk_cell_renderer_spinner_new();
5997 struct CellRendererSpinnerClass {
5998 CellRendererClass parent_class;
5999 extern (C) void function () nothrow _gtk_reserved1;
6000 extern (C) void function () nothrow _gtk_reserved2;
6001 extern (C) void function () nothrow _gtk_reserved3;
6002 extern (C) void function () nothrow _gtk_reserved4;
6005 struct CellRendererSpinnerPrivate {
6008 enum CellRendererState {
6009 SELECTED = 1,
6010 PRELIT = 2,
6011 INSENSITIVE = 4,
6012 SORTED = 8,
6013 FOCUSED = 16
6015 struct CellRendererText /* : CellRenderer */ {
6016 alias parent this;
6017 alias parent super_;
6018 alias parent cellrenderer;
6019 CellRenderer parent;
6020 private char* text;
6021 private Pango.FontDescription* font;
6022 private double font_scale;
6023 private Pango.Color foreground, background;
6024 private Pango.AttrList* extra_attrs;
6025 private Pango.Underline underline_style;
6026 private int rise, fixed_height_rows;
6027 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
6028 uint, "strikethrough", 1,
6029 uint, "editable", 1,
6030 uint, "scale_set", 1,
6031 uint, "foreground_set", 1,
6032 uint, "background_set", 1,
6033 uint, "underline_set", 1,
6034 uint, "rise_set", 1,
6035 uint, "strikethrough_set", 1,
6036 uint, "editable_set", 1,
6037 uint, "calc_fixed_height", 1,
6038 uint, "__dummy32A", 22));
6041 // Creates a new #GtkCellRendererText. Adjust how text is drawn using
6042 // object properties. Object properties can be
6043 // set globally (with g_object_set()). Also, with #GtkTreeViewColumn,
6044 // you can bind a property to a value in a #GtkTreeModel. For example,
6045 // you can bind the "text" property on the cell renderer to a string
6046 // value in the model, thus rendering a different string in each row
6047 // of the #GtkTreeView
6048 // RETURNS: the new cell renderer
6049 static CellRendererText* new_()() nothrow {
6050 return gtk_cell_renderer_text_new();
6052 static auto opCall()() {
6053 return gtk_cell_renderer_text_new();
6056 // Sets the height of a renderer to explicitly be determined by the "font" and
6057 // "y_pad" property set on it. Further changes in these properties do not
6058 // affect the height, so they must be accompanied by a subsequent call to this
6059 // function. Using this function is unflexible, and should really only be used
6060 // if calculating the size of a cell is too slow (ie, a massive number of cells
6061 // displayed). If @number_of_rows is -1, then the fixed height is unset, and
6062 // the height is determined by the properties again.
6063 // <number_of_rows>: Number of rows of text each cell renderer is allocated, or -1
6064 void set_fixed_height_from_font()(int number_of_rows) nothrow {
6065 gtk_cell_renderer_text_set_fixed_height_from_font(&this, number_of_rows);
6068 // This signal is emitted after @renderer has been edited.
6070 // It is the responsibility of the application to update the model
6071 // and store @new_text at the position indicated by @path.
6072 // <path>: the path identifying the edited cell
6073 // <new_text>: the new text
6074 extern (C) alias static void function (CellRendererText* this_, char* path, char* new_text, void* user_data=null) nothrow signal_edited;
6076 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6077 return super_.signal_connect!name(cb, data, cf);
6080 ulong signal_connect(string name:"edited", CB/*:signal_edited*/)
6081 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
6082 if (is(typeof(cb)==signal_edited)||_ttmm!(CB, signal_edited)()) {
6083 return signal_connect_data!()(&this, cast(char*)"edited",
6084 cast(GObject2.Callback)cb, data, null, cf);
6088 struct CellRendererTextClass {
6089 CellRendererClass parent_class;
6090 extern (C) void function (CellRendererText* cell_renderer_text, char* path, char* new_text) nothrow edited;
6091 extern (C) void function () nothrow _gtk_reserved1;
6092 extern (C) void function () nothrow _gtk_reserved2;
6093 extern (C) void function () nothrow _gtk_reserved3;
6094 extern (C) void function () nothrow _gtk_reserved4;
6097 struct CellRendererToggle /* : CellRenderer */ {
6098 alias parent this;
6099 alias parent super_;
6100 alias parent cellrenderer;
6101 CellRenderer parent;
6102 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
6103 uint, "active", 1,
6104 uint, "activatable", 1,
6105 uint, "radio", 1,
6106 uint, "__dummy32A", 29));
6109 // Creates a new #GtkCellRendererToggle. Adjust rendering
6110 // parameters using object properties. Object properties can be set
6111 // globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
6112 // can bind a property to a value in a #GtkTreeModel. For example, you
6113 // can bind the "active" property on the cell renderer to a boolean value
6114 // in the model, thus causing the check button to reflect the state of
6115 // the model.
6116 // RETURNS: the new cell renderer
6117 static CellRendererToggle* new_()() nothrow {
6118 return gtk_cell_renderer_toggle_new();
6120 static auto opCall()() {
6121 return gtk_cell_renderer_toggle_new();
6124 // VERSION: 2.18
6125 // Returns whether the cell renderer is activatable. See
6126 // gtk_cell_renderer_toggle_set_activatable().
6127 // RETURNS: %TRUE if the cell renderer is activatable.
6128 int get_activatable()() nothrow {
6129 return gtk_cell_renderer_toggle_get_activatable(&this);
6132 // Returns whether the cell renderer is active. See
6133 // gtk_cell_renderer_toggle_set_active().
6134 // RETURNS: %TRUE if the cell renderer is active.
6135 int get_active()() nothrow {
6136 return gtk_cell_renderer_toggle_get_active(&this);
6139 // Returns whether we're rendering radio toggles rather than checkboxes.
6140 // RETURNS: %TRUE if we're rendering radio toggles rather than checkboxes
6141 int get_radio()() nothrow {
6142 return gtk_cell_renderer_toggle_get_radio(&this);
6145 // VERSION: 2.18
6146 // Makes the cell renderer activatable.
6147 // <setting>: the value to set.
6148 void set_activatable()(int setting) nothrow {
6149 gtk_cell_renderer_toggle_set_activatable(&this, setting);
6152 // Activates or deactivates a cell renderer.
6153 // <setting>: the value to set.
6154 void set_active()(int setting) nothrow {
6155 gtk_cell_renderer_toggle_set_active(&this, setting);
6158 // If @radio is %TRUE, the cell renderer renders a radio toggle
6159 // (i.e. a toggle in a group of mutually-exclusive toggles).
6160 // If %FALSE, it renders a check toggle (a standalone boolean option).
6161 // This can be set globally for the cell renderer, or changed just
6162 // before rendering each cell in the model (for #GtkTreeView, you set
6163 // up a per-row setting using #GtkTreeViewColumn to associate model
6164 // columns with cell renderer properties).
6165 // <radio>: %TRUE to make the toggle look like a radio button
6166 void set_radio()(int radio) nothrow {
6167 gtk_cell_renderer_toggle_set_radio(&this, radio);
6170 // The ::toggled signal is emitted when the cell is toggled.
6171 // <path>: string representation of #GtkTreePath describing the event location
6172 extern (C) alias static void function (CellRendererToggle* this_, char* path, void* user_data=null) nothrow signal_toggled;
6174 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6175 return super_.signal_connect!name(cb, data, cf);
6178 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)
6179 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
6180 if (is(typeof(cb)==signal_toggled)||_ttmm!(CB, signal_toggled)()) {
6181 return signal_connect_data!()(&this, cast(char*)"toggled",
6182 cast(GObject2.Callback)cb, data, null, cf);
6186 struct CellRendererToggleClass {
6187 CellRendererClass parent_class;
6188 extern (C) void function (CellRendererToggle* cell_renderer_toggle, char* path) nothrow toggled;
6189 extern (C) void function () nothrow _gtk_reserved1;
6190 extern (C) void function () nothrow _gtk_reserved2;
6191 extern (C) void function () nothrow _gtk_reserved3;
6192 extern (C) void function () nothrow _gtk_reserved4;
6195 struct CellText {
6196 CellType type;
6197 short vertical, horizontal;
6198 Style* style;
6199 char* text;
6202 enum CellType {
6203 EMPTY = 0,
6204 TEXT = 1,
6205 PIXMAP = 2,
6206 PIXTEXT = 3,
6207 WIDGET = 4
6209 struct CellView /* : Widget */ {
6210 mixin Atk.ImplementorIface.__interface__;
6211 mixin Buildable.__interface__;
6212 mixin CellLayout.__interface__;
6213 alias parent_instance this;
6214 alias parent_instance super_;
6215 alias parent_instance widget;
6216 Widget parent_instance;
6217 private CellViewPrivate* priv;
6220 // VERSION: 2.6
6221 // Creates a new #GtkCellView widget.
6222 // RETURNS: A newly created #GtkCellView widget.
6223 static CellView* new_()() nothrow {
6224 return gtk_cell_view_new();
6226 static auto opCall()() {
6227 return gtk_cell_view_new();
6230 // VERSION: 2.6
6231 // Creates a new #GtkCellView widget, adds a #GtkCellRendererText
6232 // to it, and makes it show @markup. The text can be
6233 // marked up with the <link linkend="PangoMarkupFormat">Pango text
6234 // markup language</link>.
6235 // RETURNS: A newly created #GtkCellView widget.
6236 // <markup>: the text to display in the cell view
6237 static CellView* new_with_markup(AT0)(AT0 /*char*/ markup) nothrow {
6238 return gtk_cell_view_new_with_markup(toCString!(char*)(markup));
6240 static auto opCall(AT0)(AT0 /*char*/ markup) {
6241 return gtk_cell_view_new_with_markup(toCString!(char*)(markup));
6244 // VERSION: 2.6
6245 // Creates a new #GtkCellView widget, adds a #GtkCellRendererPixbuf
6246 // to it, and makes its show @pixbuf.
6247 // RETURNS: A newly created #GtkCellView widget.
6248 // <pixbuf>: the image to display in the cell view
6249 static CellView* new_with_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
6250 return gtk_cell_view_new_with_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
6252 static auto opCall(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) {
6253 return gtk_cell_view_new_with_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
6256 // VERSION: 2.6
6257 // Creates a new #GtkCellView widget, adds a #GtkCellRendererText
6258 // to it, and makes its show @text.
6259 // RETURNS: A newly created #GtkCellView widget.
6260 // <text>: the text to display in the cell view
6261 static CellView* new_with_text(AT0)(AT0 /*char*/ text) nothrow {
6262 return gtk_cell_view_new_with_text(toCString!(char*)(text));
6264 static auto opCall(AT0)(AT0 /*char*/ text) {
6265 return gtk_cell_view_new_with_text(toCString!(char*)(text));
6268 // Unintrospectable method: get_cell_renderers() / gtk_cell_view_get_cell_renderers()
6269 // VERSION: 2.6
6270 // DEPRECATED (v2.18) method: get_cell_renderers - use gtk_cell_layout_get_cells() instead.
6271 // Returns the cell renderers which have been added to @cell_view.
6273 // renderers has been newly allocated and should be freed with
6274 // g_list_free() when no longer needed.
6275 // RETURNS: a list of cell renderers. The list, but not the
6276 GLib2.List* get_cell_renderers()() nothrow {
6277 return gtk_cell_view_get_cell_renderers(&this);
6280 // VERSION: 2.6
6281 // Returns a #GtkTreePath referring to the currently
6282 // displayed row. If no row is currently displayed,
6283 // %NULL is returned.
6284 // RETURNS: the currently displayed row or %NULL
6285 TreePath* /*new*/ get_displayed_row()() nothrow {
6286 return gtk_cell_view_get_displayed_row(&this);
6289 // VERSION: 2.16
6290 // Returns the model for @cell_view. If no model is used %NULL is
6291 // returned.
6292 // RETURNS: a #GtkTreeModel used or %NULL
6293 TreeModel* get_model()() nothrow {
6294 return gtk_cell_view_get_model(&this);
6297 // VERSION: 2.6
6298 // Sets @requisition to the size needed by @cell_view to display
6299 // the model row pointed to by @path.
6300 // RETURNS: %TRUE
6301 // <path>: a #GtkTreePath
6302 // <requisition>: return location for the size
6303 int get_size_of_row(AT0, AT1)(AT0 /*TreePath*/ path, /*out*/ AT1 /*Requisition*/ requisition) nothrow {
6304 return gtk_cell_view_get_size_of_row(&this, UpCast!(TreePath*)(path), UpCast!(Requisition*)(requisition));
6307 // VERSION: 2.6
6308 // Sets the background color of @view.
6309 // <color>: the new background color
6310 void set_background_color(AT0)(AT0 /*Gdk2.Color*/ color) nothrow {
6311 gtk_cell_view_set_background_color(&this, UpCast!(Gdk2.Color*)(color));
6314 // VERSION: 2.6
6315 // Sets the row of the model that is currently displayed
6316 // by the #GtkCellView. If the path is unset, then the
6317 // contents of the cellview "stick" at their last value;
6318 // this is not normally a desired result, but may be
6319 // a needed intermediate state if say, the model for
6320 // the #GtkCellView becomes temporarily empty.
6321 // <path>: a #GtkTreePath or %NULL to unset.
6322 void set_displayed_row(AT0)(AT0 /*TreePath*/ path=null) nothrow {
6323 gtk_cell_view_set_displayed_row(&this, UpCast!(TreePath*)(path));
6326 // VERSION: 2.6
6327 // Sets the model for @cell_view. If @cell_view already has a model
6328 // set, it will remove it before setting the new model. If @model is
6329 // %NULL, then it will unset the old model.
6330 // <model>: a #GtkTreeModel
6331 void set_model(AT0)(AT0 /*TreeModel*/ model=null) nothrow {
6332 gtk_cell_view_set_model(&this, UpCast!(TreeModel*)(model));
6336 struct CellViewClass {
6337 WidgetClass parent_class;
6340 struct CellViewPrivate {
6343 struct CellWidget {
6344 CellType type;
6345 short vertical, horizontal;
6346 Style* style;
6347 Widget* widget;
6350 struct CheckButton /* : ToggleButton */ {
6351 mixin Atk.ImplementorIface.__interface__;
6352 mixin Activatable.__interface__;
6353 mixin Buildable.__interface__;
6354 alias toggle_button this;
6355 alias toggle_button super_;
6356 alias toggle_button togglebutton;
6357 ToggleButton toggle_button;
6359 static CheckButton* new_()() nothrow {
6360 return gtk_check_button_new();
6362 static auto opCall()() {
6363 return gtk_check_button_new();
6365 static CheckButton* new_with_label(AT0)(AT0 /*char*/ label) nothrow {
6366 return gtk_check_button_new_with_label(toCString!(char*)(label));
6368 static auto opCall(AT0)(AT0 /*char*/ label) {
6369 return gtk_check_button_new_with_label(toCString!(char*)(label));
6372 // Creates a new #GtkCheckButton containing a label. The label
6373 // will be created using gtk_label_new_with_mnemonic(), so underscores
6374 // in @label indicate the mnemonic for the check button.
6375 // RETURNS: a new #GtkCheckButton
6376 // <label>: The text of the button, with an underscore in front of the mnemonic character
6377 static CheckButton* new_with_mnemonic(AT0)(AT0 /*char*/ label) nothrow {
6378 return gtk_check_button_new_with_mnemonic(toCString!(char*)(label));
6380 static auto opCall(AT0)(AT0 /*char*/ label) {
6381 return gtk_check_button_new_with_mnemonic(toCString!(char*)(label));
6385 struct CheckButtonClass {
6386 ToggleButtonClass parent_class;
6387 extern (C) void function (CheckButton* check_button, Gdk2.Rectangle* area) nothrow draw_indicator;
6388 extern (C) void function () nothrow _gtk_reserved1;
6389 extern (C) void function () nothrow _gtk_reserved2;
6390 extern (C) void function () nothrow _gtk_reserved3;
6391 extern (C) void function () nothrow _gtk_reserved4;
6394 struct CheckMenuItem /* : MenuItem */ {
6395 mixin Atk.ImplementorIface.__interface__;
6396 mixin Activatable.__interface__;
6397 mixin Buildable.__interface__;
6398 alias menu_item this;
6399 alias menu_item super_;
6400 alias menu_item menuitem;
6401 MenuItem menu_item;
6402 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
6403 uint, "active", 1,
6404 uint, "always_show_toggle", 1,
6405 uint, "inconsistent", 1,
6406 uint, "draw_as_radio", 1,
6407 uint, "__dummy32A", 28));
6409 static CheckMenuItem* new_()() nothrow {
6410 return gtk_check_menu_item_new();
6412 static auto opCall()() {
6413 return gtk_check_menu_item_new();
6415 static CheckMenuItem* new_with_label(AT0)(AT0 /*char*/ label) nothrow {
6416 return gtk_check_menu_item_new_with_label(toCString!(char*)(label));
6418 static auto opCall(AT0)(AT0 /*char*/ label) {
6419 return gtk_check_menu_item_new_with_label(toCString!(char*)(label));
6422 // Creates a new #GtkCheckMenuItem containing a label. The label
6423 // will be created using gtk_label_new_with_mnemonic(), so underscores
6424 // in @label indicate the mnemonic for the menu item.
6425 // RETURNS: a new #GtkCheckMenuItem
6426 // <label>: The text of the button, with an underscore in front of the mnemonic character
6427 static CheckMenuItem* new_with_mnemonic(AT0)(AT0 /*char*/ label) nothrow {
6428 return gtk_check_menu_item_new_with_mnemonic(toCString!(char*)(label));
6430 static auto opCall(AT0)(AT0 /*char*/ label) {
6431 return gtk_check_menu_item_new_with_mnemonic(toCString!(char*)(label));
6434 // Returns whether the check menu item is active. See
6435 // gtk_check_menu_item_set_active ().
6436 // RETURNS: %TRUE if the menu item is checked.
6437 int get_active()() nothrow {
6438 return gtk_check_menu_item_get_active(&this);
6441 // VERSION: 2.4
6442 // Returns whether @check_menu_item looks like a #GtkRadioMenuItem
6443 // RETURNS: Whether @check_menu_item looks like a #GtkRadioMenuItem
6444 int get_draw_as_radio()() nothrow {
6445 return gtk_check_menu_item_get_draw_as_radio(&this);
6448 // Retrieves the value set by gtk_check_menu_item_set_inconsistent().
6449 // RETURNS: %TRUE if inconsistent
6450 int get_inconsistent()() nothrow {
6451 return gtk_check_menu_item_get_inconsistent(&this);
6453 void set_active()(int is_active) nothrow {
6454 gtk_check_menu_item_set_active(&this, is_active);
6457 // VERSION: 2.4
6458 // Sets whether @check_menu_item is drawn like a #GtkRadioMenuItem
6459 // <draw_as_radio>: whether @check_menu_item is drawn like a #GtkRadioMenuItem
6460 void set_draw_as_radio()(int draw_as_radio) nothrow {
6461 gtk_check_menu_item_set_draw_as_radio(&this, draw_as_radio);
6464 // If the user has selected a range of elements (such as some text or
6465 // spreadsheet cells) that are affected by a boolean setting, and the
6466 // current values in that range are inconsistent, you may want to
6467 // display the check in an "in between" state. This function turns on
6468 // "in between" display. Normally you would turn off the inconsistent
6469 // state again if the user explicitly selects a setting. This has to be
6470 // done manually, gtk_check_menu_item_set_inconsistent() only affects
6471 // visual appearance, it doesn't affect the semantics of the widget.
6472 // <setting>: %TRUE to display an "inconsistent" third state check
6473 void set_inconsistent()(int setting) nothrow {
6474 gtk_check_menu_item_set_inconsistent(&this, setting);
6476 void set_show_toggle()(int always) nothrow {
6477 gtk_check_menu_item_set_show_toggle(&this, always);
6479 void toggled()() nothrow {
6480 gtk_check_menu_item_toggled(&this);
6482 extern (C) alias static void function (CheckMenuItem* this_, void* user_data=null) nothrow signal_toggled;
6484 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6485 return super_.signal_connect!name(cb, data, cf);
6488 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)
6489 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
6490 if (is(typeof(cb)==signal_toggled)||_ttmm!(CB, signal_toggled)()) {
6491 return signal_connect_data!()(&this, cast(char*)"toggled",
6492 cast(GObject2.Callback)cb, data, null, cf);
6496 struct CheckMenuItemClass {
6497 MenuItemClass parent_class;
6498 extern (C) void function (CheckMenuItem* check_menu_item) nothrow toggled;
6499 extern (C) void function (CheckMenuItem* check_menu_item, Gdk2.Rectangle* area) nothrow draw_indicator;
6500 extern (C) void function () nothrow _gtk_reserved1;
6501 extern (C) void function () nothrow _gtk_reserved2;
6502 extern (C) void function () nothrow _gtk_reserved3;
6503 extern (C) void function () nothrow _gtk_reserved4;
6506 struct Clipboard /* : GObject.Object */ {
6507 alias method_parent this;
6508 alias method_parent super_;
6509 alias method_parent object;
6510 GObject2.Object method_parent;
6513 // Returns the clipboard object for the given selection.
6514 // See gtk_clipboard_get_for_display() for complete details.
6516 // already exists, a new one will be created. Once a clipboard
6517 // object has been created, it is persistent and, since it is
6518 // owned by GTK+, must not be freed or unreffed.
6519 // RETURNS: the appropriate clipboard object. If no clipboard
6520 // <selection>: a #GdkAtom which identifies the clipboard to use
6521 static Clipboard* get()(Gdk2.Atom selection) nothrow {
6522 return gtk_clipboard_get(selection);
6525 // VERSION: 2.2
6526 // Returns the clipboard object for the given selection.
6527 // Cut/copy/paste menu items and keyboard shortcuts should use
6528 // the default clipboard, returned by passing %GDK_SELECTION_CLIPBOARD for @selection.
6529 // (%GDK_NONE is supported as a synonym for GDK_SELECTION_CLIPBOARD
6530 // for backwards compatibility reasons.)
6531 // The currently-selected object or text should be provided on the clipboard
6532 // identified by #GDK_SELECTION_PRIMARY. Cut/copy/paste menu items
6533 // conceptually copy the contents of the #GDK_SELECTION_PRIMARY clipboard
6534 // to the default clipboard, i.e. they copy the selection to what the
6535 // user sees as the clipboard.
6537 // (Passing #GDK_NONE is the same as using <literal>gdk_atom_intern
6538 // ("CLIPBOARD", FALSE)</literal>. See <ulink
6539 // url="http://www.freedesktop.org/Standards/clipboards-spec">
6540 // http://www.freedesktop.org/Standards/clipboards-spec</ulink>
6541 // for a detailed discussion of the "CLIPBOARD" vs. "PRIMARY"
6542 // selections under the X window system. On Win32 the
6543 // #GDK_SELECTION_PRIMARY clipboard is essentially ignored.)
6545 // It's possible to have arbitrary named clipboards; if you do invent
6546 // new clipboards, you should prefix the selection name with an
6547 // underscore (because the ICCCM requires that nonstandard atoms are
6548 // underscore-prefixed), and namespace it as well. For example,
6549 // if your application called "Foo" has a special-purpose
6550 // clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD".
6552 // clipboard already exists, a new one will
6553 // be created. Once a clipboard object has
6554 // been created, it is persistent and, since
6555 // it is owned by GTK+, must not be freed or
6556 // unrefd.
6557 // RETURNS: the appropriate clipboard object. If no
6558 // <display>: the display for which the clipboard is to be retrieved or created
6559 // <selection>: a #GdkAtom which identifies the clipboard to use.
6560 static Clipboard* get_for_display(AT0)(AT0 /*Gdk2.Display*/ display, Gdk2.Atom selection) nothrow {
6561 return gtk_clipboard_get_for_display(UpCast!(Gdk2.Display*)(display), selection);
6564 // Clears the contents of the clipboard. Generally this should only
6565 // be called between the time you call gtk_clipboard_set_with_owner()
6566 // or gtk_clipboard_set_with_data(),
6567 // and when the @clear_func you supplied is called. Otherwise, the
6568 // clipboard may be owned by someone else.
6569 void clear()() nothrow {
6570 gtk_clipboard_clear(&this);
6573 // VERSION: 2.2
6574 // Gets the #GdkDisplay associated with @clipboard
6575 // RETURNS: the #GdkDisplay associated with @clipboard
6576 Gdk2.Display* get_display()() nothrow {
6577 return gtk_clipboard_get_display(&this);
6580 // If the clipboard contents callbacks were set with
6581 // gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
6582 // gtk_clipboard_clear() has not subsequently called, returns the owner set
6583 // by gtk_clipboard_set_with_owner().
6584 // RETURNS: the owner of the clipboard, if any; otherwise %NULL.
6585 GObject2.Object* get_owner()() nothrow {
6586 return gtk_clipboard_get_owner(&this);
6589 // Unintrospectable method: request_contents() / gtk_clipboard_request_contents()
6590 // Requests the contents of clipboard as the given target.
6591 // When the results of the result are later received the supplied callback
6592 // will be called.
6593 // <target>: an atom representing the form into which the clipboard owner should convert the selection.
6594 // <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.
6595 // <user_data>: user data to pass to @callback
6596 void request_contents(AT0)(Gdk2.Atom target, ClipboardReceivedFunc callback, AT0 /*void*/ user_data) nothrow {
6597 gtk_clipboard_request_contents(&this, target, callback, UpCast!(void*)(user_data));
6600 // Unintrospectable method: request_image() / gtk_clipboard_request_image()
6601 // VERSION: 2.6
6602 // Requests the contents of the clipboard as image. When the image is
6603 // later received, it will be converted to a #GdkPixbuf, and
6604 // @callback will be called.
6606 // The @pixbuf parameter to @callback will contain the resulting
6607 // #GdkPixbuf if the request succeeded, or %NULL if it failed. This
6608 // could happen for various reasons, in particular if the clipboard
6609 // was empty or if the contents of the clipboard could not be
6610 // converted into an image.
6611 // <callback>: a function to call when the image is received, or the retrieval fails. (It will always be called one way or the other.)
6612 // <user_data>: user data to pass to @callback.
6613 void request_image(AT0)(ClipboardImageReceivedFunc callback, AT0 /*void*/ user_data) nothrow {
6614 gtk_clipboard_request_image(&this, callback, UpCast!(void*)(user_data));
6617 // Unintrospectable method: request_rich_text() / gtk_clipboard_request_rich_text()
6618 // VERSION: 2.10
6619 // Requests the contents of the clipboard as rich text. When the rich
6620 // text is later received, @callback will be called.
6622 // The @text parameter to @callback will contain the resulting rich
6623 // text if the request succeeded, or %NULL if it failed. The @length
6624 // parameter will contain @text's length. This function can fail for
6625 // various reasons, in particular if the clipboard was empty or if the
6626 // contents of the clipboard could not be converted into rich text form.
6627 // <buffer>: a #GtkTextBuffer
6628 // <callback>: a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
6629 // <user_data>: user data to pass to @callback.
6630 void request_rich_text(AT0, AT1)(AT0 /*TextBuffer*/ buffer, ClipboardRichTextReceivedFunc callback, AT1 /*void*/ user_data) nothrow {
6631 gtk_clipboard_request_rich_text(&this, UpCast!(TextBuffer*)(buffer), callback, UpCast!(void*)(user_data));
6634 // Unintrospectable method: request_targets() / gtk_clipboard_request_targets()
6635 // VERSION: 2.4
6636 // Requests the contents of the clipboard as list of supported targets.
6637 // When the list is later received, @callback will be called.
6639 // The @targets parameter to @callback will contain the resulting targets if
6640 // the request succeeded, or %NULL if it failed.
6641 // <callback>: a function to call when the targets are received, or the retrieval fails. (It will always be called one way or the other.)
6642 // <user_data>: user data to pass to @callback.
6643 void request_targets(AT0)(ClipboardTargetsReceivedFunc callback, AT0 /*void*/ user_data) nothrow {
6644 gtk_clipboard_request_targets(&this, callback, UpCast!(void*)(user_data));
6647 // Unintrospectable method: request_text() / gtk_clipboard_request_text()
6648 // Requests the contents of the clipboard as text. When the text is
6649 // later received, it will be converted to UTF-8 if necessary, and
6650 // @callback will be called.
6652 // The @text parameter to @callback will contain the resulting text if
6653 // the request succeeded, or %NULL if it failed. This could happen for
6654 // various reasons, in particular if the clipboard was empty or if the
6655 // contents of the clipboard could not be converted into text form.
6656 // <callback>: a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
6657 // <user_data>: user data to pass to @callback.
6658 void request_text(AT0)(ClipboardTextReceivedFunc callback, AT0 /*void*/ user_data) nothrow {
6659 gtk_clipboard_request_text(&this, callback, UpCast!(void*)(user_data));
6662 // Unintrospectable method: request_uris() / gtk_clipboard_request_uris()
6663 // VERSION: 2.14
6664 // Requests the contents of the clipboard as URIs. When the URIs are
6665 // later received @callback will be called.
6667 // The @uris parameter to @callback will contain the resulting array of
6668 // URIs if the request succeeded, or %NULL if it failed. This could happen
6669 // for various reasons, in particular if the clipboard was empty or if the
6670 // contents of the clipboard could not be converted into URI form.
6671 // <callback>: a function to call when the URIs are received, or the retrieval fails. (It will always be called one way or the other.)
6672 // <user_data>: user data to pass to @callback.
6673 void request_uris(AT0)(ClipboardURIReceivedFunc callback, AT0 /*void*/ user_data) nothrow {
6674 gtk_clipboard_request_uris(&this, callback, UpCast!(void*)(user_data));
6677 // VERSION: 2.6
6678 // Hints that the clipboard data should be stored somewhere when the
6679 // application exits or when gtk_clipboard_store () is called.
6681 // This value is reset when the clipboard owner changes.
6682 // Where the clipboard data is stored is platform dependent,
6683 // see gdk_display_store_clipboard () for more information.
6684 // <targets>: array containing information about which forms should be stored or %NULL to indicate that all forms should be stored.
6685 // <n_targets>: number of elements in @targets
6686 void set_can_store(AT0)(AT0 /*TargetEntry*/ targets, int n_targets) nothrow {
6687 gtk_clipboard_set_can_store(&this, UpCast!(TargetEntry*)(targets), n_targets);
6690 // VERSION: 2.6
6691 // Sets the contents of the clipboard to the given #GdkPixbuf.
6692 // GTK+ will take responsibility for responding for requests
6693 // for the image, and for converting the image into the
6694 // requested format.
6695 // <pixbuf>: a #GdkPixbuf
6696 void set_image(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
6697 gtk_clipboard_set_image(&this, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
6700 // Sets the contents of the clipboard to the given UTF-8 string. GTK+ will
6701 // make a copy of the text and take responsibility for responding
6702 // for requests for the text, and for converting the text into
6703 // the requested format.
6704 // <text>: a UTF-8 string.
6705 // <len>: length of @text, in bytes, or -1, in which case the length will be determined with <function>strlen()</function>.
6706 void set_text(AT0)(AT0 /*char*/ text, int len) nothrow {
6707 gtk_clipboard_set_text(&this, toCString!(char*)(text), len);
6710 // Unintrospectable method: set_with_data() / gtk_clipboard_set_with_data()
6711 // Virtually sets the contents of the specified clipboard by providing
6712 // a list of supported formats for the clipboard data and a function
6713 // to call to get the actual data when it is requested.
6715 // the clipboard data failed the provided callback functions
6716 // will be ignored.
6717 // RETURNS: %TRUE if setting the clipboard data succeeded. If setting
6718 // <targets>: array containing information about the available forms for the clipboard data
6719 // <n_targets>: number of elements in @targets
6720 // <get_func>: function to call to get the actual clipboard data
6721 // <clear_func>: when the clipboard contents are set again, this function will be called, and @get_func will not be subsequently called.
6722 // <user_data>: user data to pass to @get_func and @clear_func.
6723 int set_with_data(AT0, AT1)(AT0 /*TargetEntry*/ targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, AT1 /*void*/ user_data) nothrow {
6724 return gtk_clipboard_set_with_data(&this, UpCast!(TargetEntry*)(targets), n_targets, get_func, clear_func, UpCast!(void*)(user_data));
6727 // Unintrospectable method: set_with_owner() / gtk_clipboard_set_with_owner()
6728 // Virtually sets the contents of the specified clipboard by providing
6729 // a list of supported formats for the clipboard data and a function
6730 // to call to get the actual data when it is requested.
6732 // The difference between this function and gtk_clipboard_set_with_data()
6733 // is that instead of an generic @user_data pointer, a #GObject is passed
6734 // in.
6736 // the clipboard data failed the provided callback functions
6737 // will be ignored.
6738 // RETURNS: %TRUE if setting the clipboard data succeeded. If setting
6739 // <targets>: array containing information about the available forms for the clipboard data
6740 // <n_targets>: number of elements in @targets
6741 // <get_func>: function to call to get the actual clipboard data
6742 // <clear_func>: when the clipboard contents are set again, this function will be called, and @get_func will not be subsequently called.
6743 // <owner>: an object that "owns" the data. This object will be passed to the callbacks when called.
6744 int set_with_owner(AT0, AT1)(AT0 /*TargetEntry*/ targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, AT1 /*GObject2.Object*/ owner) nothrow {
6745 return gtk_clipboard_set_with_owner(&this, UpCast!(TargetEntry*)(targets), n_targets, get_func, clear_func, UpCast!(GObject2.Object*)(owner));
6748 // VERSION: 2.6
6749 // Stores the current clipboard data somewhere so that it will stay
6750 // around after the application has quit.
6751 void store()() nothrow {
6752 gtk_clipboard_store(&this);
6755 // Requests the contents of the clipboard using the given target.
6756 // This function waits for the data to be received using the main
6757 // loop, so events, timeouts, etc, may be dispatched during the wait.
6759 // if retrieving the given target failed. If non-%NULL,
6760 // this value must be freed with gtk_selection_data_free()
6761 // when you are finished with it.
6762 // RETURNS: a newly-allocated #GtkSelectionData object or %NULL
6763 // <target>: an atom representing the form into which the clipboard owner should convert the selection.
6764 SelectionData* /*new*/ wait_for_contents()(Gdk2.Atom target) nothrow {
6765 return gtk_clipboard_wait_for_contents(&this, target);
6768 // VERSION: 2.6
6769 // Requests the contents of the clipboard as image and converts
6770 // the result to a #GdkPixbuf. This function waits for
6771 // the data to be received using the main loop, so events,
6772 // timeouts, etc, may be dispatched during the wait.
6774 // be disposed with g_object_unref(), or %NULL if
6775 // retrieving the selection data failed. (This
6776 // could happen for various reasons, in particular
6777 // if the clipboard was empty or if the contents of
6778 // the clipboard could not be converted into an image.)
6779 // RETURNS: a newly-allocated #GdkPixbuf object which must
6780 GdkPixbuf2.Pixbuf* /*new*/ wait_for_image()() nothrow {
6781 return gtk_clipboard_wait_for_image(&this);
6784 // VERSION: 2.10
6785 // Requests the contents of the clipboard as rich text. This function
6786 // waits for the data to be received using the main loop, so events,
6787 // timeouts, etc, may be dispatched during the wait.
6789 // newly-allocated binary block of data which must
6790 // be freed with g_free(), or %NULL if retrieving
6791 // the selection data failed. (This could happen
6792 // for various reasons, in particular if the
6793 // clipboard was empty or if the contents of the
6794 // clipboard could not be converted into text form.)
6795 // RETURNS: a
6796 // <buffer>: a #GtkTextBuffer
6797 // <format>: return location for the format of the returned data
6798 // <length>: return location for the length of the returned data
6799 ubyte* /*new*/ wait_for_rich_text(AT0, AT1, AT2)(AT0 /*TextBuffer*/ buffer, AT1 /*Gdk2.Atom*/ format, /*out*/ AT2 /*size_t*/ length) nothrow {
6800 return gtk_clipboard_wait_for_rich_text(&this, UpCast!(TextBuffer*)(buffer), UpCast!(Gdk2.Atom*)(format), UpCast!(size_t*)(length));
6803 // VERSION: 2.4
6804 // Returns a list of targets that are present on the clipboard, or %NULL
6805 // if there aren't any targets available. The returned list must be
6806 // freed with g_free().
6807 // This function waits for the data to be received using the main
6808 // loop, so events, timeouts, etc, may be dispatched during the wait.
6810 // otherwise %FALSE.
6811 // RETURNS: %TRUE if any targets are present on the clipboard,
6812 // <targets>: location to store an array of targets. The result stored here must be freed with g_free().
6813 // <n_targets>: location to store number of items in @targets.
6814 int wait_for_targets(AT0)(/*out*/ AT0 /*Gdk2.Atom**/ targets, /*out*/ int* n_targets) nothrow {
6815 return gtk_clipboard_wait_for_targets(&this, UpCast!(Gdk2.Atom**)(targets), n_targets);
6818 // Requests the contents of the clipboard as text and converts
6819 // the result to UTF-8 if necessary. This function waits for
6820 // the data to be received using the main loop, so events,
6821 // timeouts, etc, may be dispatched during the wait.
6823 // be freed with g_free(), or %NULL if retrieving
6824 // the selection data failed. (This could happen
6825 // for various reasons, in particular if the
6826 // clipboard was empty or if the contents of the
6827 // clipboard could not be converted into text form.)
6828 // RETURNS: a newly-allocated UTF-8 string which must
6829 char* /*new*/ wait_for_text()() nothrow {
6830 return gtk_clipboard_wait_for_text(&this);
6833 // VERSION: 2.14
6834 // Requests the contents of the clipboard as URIs. This function waits
6835 // for the data to be received using the main loop, so events,
6836 // timeouts, etc, may be dispatched during the wait.
6838 // %NULL-terminated array of strings which must
6839 // be freed with g_strfreev(), or %NULL if
6840 // retrieving the selection data failed. (This
6841 // could happen for various reasons, in particular
6842 // if the clipboard was empty or if the contents of
6843 // the clipboard could not be converted into URI form.)
6844 // RETURNS: a newly-allocated
6845 char** /*new*/ wait_for_uris()() nothrow {
6846 return gtk_clipboard_wait_for_uris(&this);
6849 // VERSION: 2.6
6850 // Test to see if there is an image available to be pasted
6851 // This is done by requesting the TARGETS atom and checking
6852 // if it contains any of the supported image targets. This function
6853 // waits for the data to be received using the main loop, so events,
6854 // timeouts, etc, may be dispatched during the wait.
6856 // This function is a little faster than calling
6857 // gtk_clipboard_wait_for_image() since it doesn't need to retrieve
6858 // the actual image data.
6859 // RETURNS: %TRUE is there is an image available, %FALSE otherwise.
6860 int wait_is_image_available()() nothrow {
6861 return gtk_clipboard_wait_is_image_available(&this);
6864 // VERSION: 2.10
6865 // Test to see if there is rich text available to be pasted
6866 // This is done by requesting the TARGETS atom and checking
6867 // if it contains any of the supported rich text targets. This function
6868 // waits for the data to be received using the main loop, so events,
6869 // timeouts, etc, may be dispatched during the wait.
6871 // This function is a little faster than calling
6872 // gtk_clipboard_wait_for_rich_text() since it doesn't need to retrieve
6873 // the actual text.
6874 // RETURNS: %TRUE is there is rich text available, %FALSE otherwise.
6875 // <buffer>: a #GtkTextBuffer
6876 int wait_is_rich_text_available(AT0)(AT0 /*TextBuffer*/ buffer) nothrow {
6877 return gtk_clipboard_wait_is_rich_text_available(&this, UpCast!(TextBuffer*)(buffer));
6880 // VERSION: 2.6
6881 // Checks if a clipboard supports pasting data of a given type. This
6882 // function can be used to determine if a "Paste" menu item should be
6883 // insensitive or not.
6885 // If you want to see if there's text available on the clipboard, use
6886 // gtk_clipboard_wait_is_text_available () instead.
6887 // RETURNS: %TRUE if the target is available, %FALSE otherwise.
6888 // <target>: A #GdkAtom indicating which target to look for.
6889 int wait_is_target_available()(Gdk2.Atom target) nothrow {
6890 return gtk_clipboard_wait_is_target_available(&this, target);
6893 // Test to see if there is text available to be pasted
6894 // This is done by requesting the TARGETS atom and checking
6895 // if it contains any of the supported text targets. This function
6896 // waits for the data to be received using the main loop, so events,
6897 // timeouts, etc, may be dispatched during the wait.
6899 // This function is a little faster than calling
6900 // gtk_clipboard_wait_for_text() since it doesn't need to retrieve
6901 // the actual text.
6902 // RETURNS: %TRUE is there is text available, %FALSE otherwise.
6903 int wait_is_text_available()() nothrow {
6904 return gtk_clipboard_wait_is_text_available(&this);
6907 // VERSION: 2.14
6908 // Test to see if there is a list of URIs available to be pasted
6909 // This is done by requesting the TARGETS atom and checking
6910 // if it contains the URI targets. This function
6911 // waits for the data to be received using the main loop, so events,
6912 // timeouts, etc, may be dispatched during the wait.
6914 // This function is a little faster than calling
6915 // gtk_clipboard_wait_for_uris() since it doesn't need to retrieve
6916 // the actual URI data.
6917 // RETURNS: %TRUE is there is an URI list available, %FALSE otherwise.
6918 int wait_is_uris_available()() nothrow {
6919 return gtk_clipboard_wait_is_uris_available(&this);
6922 // VERSION: 2.6
6923 // The ::owner-change signal is emitted when GTK+ receives an
6924 // event that indicates that the ownership of the selection
6925 // associated with @clipboard has changed.
6926 // <event>: the @GdkEventOwnerChange event
6927 extern (C) alias static void function (Clipboard* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_owner_change;
6929 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6930 return super_.signal_connect!name(cb, data, cf);
6933 ulong signal_connect(string name:"owner-change", CB/*:signal_owner_change*/)
6934 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
6935 if (is(typeof(cb)==signal_owner_change)||_ttmm!(CB, signal_owner_change)()) {
6936 return signal_connect_data!()(&this, cast(char*)"owner-change",
6937 cast(GObject2.Callback)cb, data, null, cf);
6941 extern (C) alias void function (Clipboard* clipboard, void* user_data_or_owner) nothrow ClipboardClearFunc;
6943 extern (C) alias void function (Clipboard* clipboard, SelectionData* selection_data, uint info, void* user_data_or_owner) nothrow ClipboardGetFunc;
6945 extern (C) alias void function (Clipboard* clipboard, GdkPixbuf2.Pixbuf* pixbuf, void* data) nothrow ClipboardImageReceivedFunc;
6947 extern (C) alias void function (Clipboard* clipboard, SelectionData* selection_data, void* data) nothrow ClipboardReceivedFunc;
6949 extern (C) alias void function (Clipboard* clipboard, Gdk2.Atom format, ubyte* text, size_t length, void* data) nothrow ClipboardRichTextReceivedFunc;
6951 extern (C) alias void function (Clipboard* clipboard, Gdk2.Atom* atoms, int n_atoms, void* data) nothrow ClipboardTargetsReceivedFunc;
6953 extern (C) alias void function (Clipboard* clipboard, char* text, void* data) nothrow ClipboardTextReceivedFunc;
6955 extern (C) alias void function (Clipboard* clipboard, char** uris, void* data) nothrow ClipboardURIReceivedFunc;
6957 struct ColorButton /* : Button */ {
6958 mixin Atk.ImplementorIface.__interface__;
6959 mixin Activatable.__interface__;
6960 mixin Buildable.__interface__;
6961 alias button this;
6962 alias button super_;
6963 Button button;
6964 private ColorButtonPrivate* priv;
6967 // VERSION: 2.4
6968 // Creates a new color button. This returns a widget in the form of
6969 // a small button containing a swatch representing the current selected
6970 // color. When the button is clicked, a color-selection dialog will open,
6971 // allowing the user to select a color. The swatch will be updated to reflect
6972 // the new color when the user finishes.
6973 // RETURNS: a new color button.
6974 static ColorButton* new_()() nothrow {
6975 return gtk_color_button_new();
6977 static auto opCall()() {
6978 return gtk_color_button_new();
6981 // VERSION: 2.4
6982 // Creates a new color button.
6983 // RETURNS: a new color button.
6984 // <color>: A #GdkColor to set the current color with.
6985 static ColorButton* new_with_color(AT0)(AT0 /*Gdk2.Color*/ color) nothrow {
6986 return gtk_color_button_new_with_color(UpCast!(Gdk2.Color*)(color));
6988 static auto opCall(AT0)(AT0 /*Gdk2.Color*/ color) {
6989 return gtk_color_button_new_with_color(UpCast!(Gdk2.Color*)(color));
6992 // VERSION: 2.4
6993 // Returns the current alpha value.
6994 // RETURNS: an integer between 0 and 65535.
6995 ushort get_alpha()() nothrow {
6996 return gtk_color_button_get_alpha(&this);
6999 // VERSION: 2.4
7000 // Sets @color to be the current color in the #GtkColorButton widget.
7001 // <color>: a #GdkColor to fill in with the current color.
7002 void get_color(AT0)(AT0 /*Gdk2.Color*/ color) nothrow {
7003 gtk_color_button_get_color(&this, UpCast!(Gdk2.Color*)(color));
7006 // VERSION: 2.4
7007 // Gets the title of the color selection dialog.
7008 // RETURNS: An internal string, do not free the return value
7009 char* get_title()() nothrow {
7010 return gtk_color_button_get_title(&this);
7013 // VERSION: 2.4
7014 // Does the color selection dialog use the alpha channel?
7015 // RETURNS: %TRUE if the color sample uses alpha channel, %FALSE if not.
7016 int get_use_alpha()() nothrow {
7017 return gtk_color_button_get_use_alpha(&this);
7020 // VERSION: 2.4
7021 // Sets the current opacity to be @alpha.
7022 // <alpha>: an integer between 0 and 65535.
7023 void set_alpha()(ushort alpha) nothrow {
7024 gtk_color_button_set_alpha(&this, alpha);
7027 // VERSION: 2.4
7028 // Sets the current color to be @color.
7029 // <color>: A #GdkColor to set the current color with.
7030 void set_color(AT0)(AT0 /*Gdk2.Color*/ color) nothrow {
7031 gtk_color_button_set_color(&this, UpCast!(Gdk2.Color*)(color));
7034 // VERSION: 2.4
7035 // Sets the title for the color selection dialog.
7036 // <title>: String containing new window title.
7037 void set_title(AT0)(AT0 /*char*/ title) nothrow {
7038 gtk_color_button_set_title(&this, toCString!(char*)(title));
7041 // VERSION: 2.4
7042 // Sets whether or not the color button should use the alpha channel.
7043 // <use_alpha>: %TRUE if color button should use alpha channel, %FALSE if not.
7044 void set_use_alpha()(int use_alpha) nothrow {
7045 gtk_color_button_set_use_alpha(&this, use_alpha);
7048 // VERSION: 2.4
7049 // The ::color-set signal is emitted when the user selects a color.
7050 // When handling this signal, use gtk_color_button_get_color() and
7051 // gtk_color_button_get_alpha() to find out which color was just selected.
7053 // Note that this signal is only emitted when the <emphasis>user</emphasis>
7054 // changes the color. If you need to react to programmatic color changes
7055 // as well, use the notify::color signal.
7056 extern (C) alias static void function (ColorButton* this_, void* user_data=null) nothrow signal_color_set;
7058 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7059 return super_.signal_connect!name(cb, data, cf);
7062 ulong signal_connect(string name:"color-set", CB/*:signal_color_set*/)
7063 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7064 if (is(typeof(cb)==signal_color_set)||_ttmm!(CB, signal_color_set)()) {
7065 return signal_connect_data!()(&this, cast(char*)"color-set",
7066 cast(GObject2.Callback)cb, data, null, cf);
7070 struct ColorButtonClass {
7071 ButtonClass parent_class;
7072 extern (C) void function (ColorButton* cp) nothrow color_set;
7073 extern (C) void function () nothrow _gtk_reserved1;
7074 extern (C) void function () nothrow _gtk_reserved2;
7075 extern (C) void function () nothrow _gtk_reserved3;
7076 extern (C) void function () nothrow _gtk_reserved4;
7079 struct ColorButtonPrivate {
7082 struct ColorSelection /* : VBox */ {
7083 mixin Atk.ImplementorIface.__interface__;
7084 mixin Buildable.__interface__;
7085 mixin Orientable.__interface__;
7086 alias parent_instance this;
7087 alias parent_instance super_;
7088 alias parent_instance vbox;
7089 VBox parent_instance;
7090 void* private_data;
7093 // Creates a new GtkColorSelection.
7094 // RETURNS: a new #GtkColorSelection
7095 static ColorSelection* new_()() nothrow {
7096 return gtk_color_selection_new();
7098 static auto opCall()() {
7099 return gtk_color_selection_new();
7102 // Parses a color palette string; the string is a colon-separated
7103 // list of color names readable by gdk_color_parse().
7104 // RETURNS: %TRUE if a palette was successfully parsed.
7105 // <str>: a string encoding a color palette.
7106 // <colors>: return location for allocated array of #GdkColor.
7107 // <n_colors>: return location for length of array.
7108 static int palette_from_string(AT0, AT1)(AT0 /*char*/ str, /*out*/ AT1 /*Gdk2.Color**/ colors, /*out*/ int* n_colors) nothrow {
7109 return gtk_color_selection_palette_from_string(toCString!(char*)(str), UpCast!(Gdk2.Color**)(colors), n_colors);
7112 // Encodes a palette as a string, useful for persistent storage.
7113 // RETURNS: allocated string encoding the palette.
7114 // <colors>: an array of colors.
7115 // <n_colors>: length of the array.
7116 static char* /*new*/ palette_to_string(AT0)(AT0 /*Gdk2.Color*/ colors, int n_colors) nothrow {
7117 return gtk_color_selection_palette_to_string(UpCast!(Gdk2.Color*)(colors), n_colors);
7120 // Unintrospectable function: set_change_palette_hook() / gtk_color_selection_set_change_palette_hook()
7121 // DEPRECATED (v2.4) function: set_change_palette_hook - This function does not work in multihead environments.
7122 // Installs a global function to be called whenever the user tries to
7123 // modify the palette in a color selection. This function should save
7124 // the new palette contents, and update the GtkSettings property
7125 // "gtk-color-palette" so all GtkColorSelection widgets will be modified.
7128 // Use gtk_color_selection_set_change_palette_with_screen_hook() instead.
7129 // RETURNS: the previous change palette hook (that was replaced).
7130 // <func>: a function to call when the custom palette needs saving.
7131 static ColorSelectionChangePaletteFunc set_change_palette_hook()(ColorSelectionChangePaletteFunc func) nothrow {
7132 return gtk_color_selection_set_change_palette_hook(func);
7135 // Unintrospectable function: set_change_palette_with_screen_hook() / gtk_color_selection_set_change_palette_with_screen_hook()
7136 // VERSION: 2.2
7137 // Installs a global function to be called whenever the user tries to
7138 // modify the palette in a color selection. This function should save
7139 // the new palette contents, and update the GtkSettings property
7140 // "gtk-color-palette" so all GtkColorSelection widgets will be modified.
7141 // RETURNS: the previous change palette hook (that was replaced).
7142 // <func>: a function to call when the custom palette needs saving.
7143 static ColorSelectionChangePaletteWithScreenFunc set_change_palette_with_screen_hook()(ColorSelectionChangePaletteWithScreenFunc func) nothrow {
7144 return gtk_color_selection_set_change_palette_with_screen_hook(func);
7147 // DEPRECATED (v2.0) method: get_color - Use gtk_color_selection_get_current_color() instead.
7148 // Sets @color to be the current color in the GtkColorSelection widget.
7149 // <color>: an array of 4 #gdouble to fill in with the current color.
7150 void get_color(AT0)(AT0 /*double*/ color) nothrow {
7151 gtk_color_selection_get_color(&this, UpCast!(double*)(color));
7154 // Returns the current alpha value.
7155 // RETURNS: an integer between 0 and 65535.
7156 ushort get_current_alpha()() nothrow {
7157 return gtk_color_selection_get_current_alpha(&this);
7160 // Sets @color to be the current color in the GtkColorSelection widget.
7161 // <color>: a #GdkColor to fill in with the current color.
7162 void get_current_color(AT0)(/*out*/ AT0 /*Gdk2.Color*/ color) nothrow {
7163 gtk_color_selection_get_current_color(&this, UpCast!(Gdk2.Color*)(color));
7166 // Determines whether the colorsel has an opacity control.
7167 // RETURNS: %TRUE if the @colorsel has an opacity control. %FALSE if it does't.
7168 int get_has_opacity_control()() nothrow {
7169 return gtk_color_selection_get_has_opacity_control(&this);
7172 // Determines whether the color selector has a color palette.
7173 // RETURNS: %TRUE if the selector has a palette. %FALSE if it hasn't.
7174 int get_has_palette()() nothrow {
7175 return gtk_color_selection_get_has_palette(&this);
7178 // Returns the previous alpha value.
7179 // RETURNS: an integer between 0 and 65535.
7180 ushort get_previous_alpha()() nothrow {
7181 return gtk_color_selection_get_previous_alpha(&this);
7184 // Fills @color in with the original color value.
7185 // <color>: a #GdkColor to fill in with the original color value.
7186 void get_previous_color(AT0)(/*out*/ AT0 /*Gdk2.Color*/ color) nothrow {
7187 gtk_color_selection_get_previous_color(&this, UpCast!(Gdk2.Color*)(color));
7190 // Gets the current state of the @colorsel.
7192 // if the selection has stopped.
7193 // RETURNS: %TRUE if the user is currently dragging a color around, and %FALSE
7194 int is_adjusting()() nothrow {
7195 return gtk_color_selection_is_adjusting(&this);
7198 // DEPRECATED (v2.0) method: set_color - Use gtk_color_selection_set_current_color() instead.
7199 // Sets the current color to be @color. The first time this is called, it will
7200 // also set the original color to be @color too.
7201 // <color>: an array of 4 doubles specifying the red, green, blue and opacity to set the current color to.
7202 void set_color(AT0)(AT0 /*double*/ color) nothrow {
7203 gtk_color_selection_set_color(&this, UpCast!(double*)(color));
7206 // Sets the current opacity to be @alpha. The first time this is called, it will
7207 // also set the original opacity to be @alpha too.
7208 // <alpha>: an integer between 0 and 65535.
7209 void set_current_alpha()(ushort alpha) nothrow {
7210 gtk_color_selection_set_current_alpha(&this, alpha);
7213 // Sets the current color to be @color. The first time this is called, it will
7214 // also set the original color to be @color too.
7215 // <color>: A #GdkColor to set the current color with.
7216 void set_current_color(AT0)(AT0 /*Gdk2.Color*/ color) nothrow {
7217 gtk_color_selection_set_current_color(&this, UpCast!(Gdk2.Color*)(color));
7220 // Sets the @colorsel to use or not use opacity.
7221 // <has_opacity>: %TRUE if @colorsel can set the opacity, %FALSE otherwise.
7222 void set_has_opacity_control()(int has_opacity) nothrow {
7223 gtk_color_selection_set_has_opacity_control(&this, has_opacity);
7226 // Shows and hides the palette based upon the value of @has_palette.
7227 // <has_palette>: %TRUE if palette is to be visible, %FALSE otherwise.
7228 void set_has_palette()(int has_palette) nothrow {
7229 gtk_color_selection_set_has_palette(&this, has_palette);
7232 // Sets the 'previous' alpha to be @alpha. This function should be called with
7233 // some hesitations, as it might seem confusing to have that alpha change.
7234 // <alpha>: an integer between 0 and 65535.
7235 void set_previous_alpha()(ushort alpha) nothrow {
7236 gtk_color_selection_set_previous_alpha(&this, alpha);
7239 // Sets the 'previous' color to be @color. This function should be called with
7240 // some hesitations, as it might seem confusing to have that color change.
7241 // Calling gtk_color_selection_set_current_color() will also set this color the first
7242 // time it is called.
7243 // <color>: a #GdkColor to set the previous color with.
7244 void set_previous_color(AT0)(AT0 /*Gdk2.Color*/ color) nothrow {
7245 gtk_color_selection_set_previous_color(&this, UpCast!(Gdk2.Color*)(color));
7247 void set_update_policy()(UpdateType policy) nothrow {
7248 gtk_color_selection_set_update_policy(&this, policy);
7250 extern (C) alias static void function (ColorSelection* this_, void* user_data=null) nothrow signal_color_changed;
7252 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7253 return super_.signal_connect!name(cb, data, cf);
7256 ulong signal_connect(string name:"color-changed", CB/*:signal_color_changed*/)
7257 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7258 if (is(typeof(cb)==signal_color_changed)||_ttmm!(CB, signal_color_changed)()) {
7259 return signal_connect_data!()(&this, cast(char*)"color-changed",
7260 cast(GObject2.Callback)cb, data, null, cf);
7264 extern (C) alias void function (Gdk2.Color* colors, int n_colors) nothrow ColorSelectionChangePaletteFunc;
7266 extern (C) alias void function (Gdk2.Screen* screen, Gdk2.Color* colors, int n_colors) nothrow ColorSelectionChangePaletteWithScreenFunc;
7268 struct ColorSelectionClass {
7269 VBoxClass parent_class;
7270 extern (C) void function (ColorSelection* color_selection) nothrow color_changed;
7271 extern (C) void function () nothrow _gtk_reserved1;
7272 extern (C) void function () nothrow _gtk_reserved2;
7273 extern (C) void function () nothrow _gtk_reserved3;
7274 extern (C) void function () nothrow _gtk_reserved4;
7277 struct ColorSelectionDialog /* : Dialog */ {
7278 mixin Atk.ImplementorIface.__interface__;
7279 mixin Buildable.__interface__;
7280 alias parent_instance this;
7281 alias parent_instance super_;
7282 alias parent_instance dialog;
7283 Dialog parent_instance;
7284 Widget* colorsel, ok_button, cancel_button, help_button;
7286 static ColorSelectionDialog* new_(AT0)(AT0 /*char*/ title) nothrow {
7287 return gtk_color_selection_dialog_new(toCString!(char*)(title));
7289 static auto opCall(AT0)(AT0 /*char*/ title) {
7290 return gtk_color_selection_dialog_new(toCString!(char*)(title));
7293 // VERSION: 2.14
7294 // Retrieves the #GtkColorSelection widget embedded in the dialog.
7295 // RETURNS: the embedded #GtkColorSelection
7296 Widget* get_color_selection()() nothrow {
7297 return gtk_color_selection_dialog_get_color_selection(&this);
7301 struct ColorSelectionDialogClass {
7302 DialogClass parent_class;
7303 extern (C) void function () nothrow _gtk_reserved1;
7304 extern (C) void function () nothrow _gtk_reserved2;
7305 extern (C) void function () nothrow _gtk_reserved3;
7306 extern (C) void function () nothrow _gtk_reserved4;
7309 struct Combo /* : HBox */ {
7310 mixin Atk.ImplementorIface.__interface__;
7311 mixin Buildable.__interface__;
7312 mixin Orientable.__interface__;
7313 alias hbox this;
7314 alias hbox super_;
7315 HBox hbox;
7316 Widget* entry;
7317 private Widget* button, popup, popwin;
7318 Widget* list;
7319 private uint entry_change_id, list_change_id;
7320 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
7321 uint, "value_in_list", 1,
7322 uint, "ok_if_empty", 1,
7323 uint, "case_sensitive", 1,
7324 uint, "use_arrows", 1,
7325 uint, "use_arrows_always", 1,
7326 uint, "__dummy32A", 27));
7327 private ushort current_button;
7328 private uint activate_id;
7330 static Combo* new_()() nothrow {
7331 return gtk_combo_new();
7333 static auto opCall()() {
7334 return gtk_combo_new();
7336 void disable_activate()() nothrow {
7337 gtk_combo_disable_activate(&this);
7339 void set_case_sensitive()(int val) nothrow {
7340 gtk_combo_set_case_sensitive(&this, val);
7342 void set_item_string(AT0, AT1)(AT0 /*Item*/ item, AT1 /*char*/ item_value) nothrow {
7343 gtk_combo_set_item_string(&this, UpCast!(Item*)(item), toCString!(char*)(item_value));
7345 // Unintrospectable method: set_popdown_strings() / gtk_combo_set_popdown_strings()
7346 void set_popdown_strings(AT0)(AT0 /*GLib2.List*/ strings) nothrow {
7347 gtk_combo_set_popdown_strings(&this, UpCast!(GLib2.List*)(strings));
7349 void set_use_arrows()(int val) nothrow {
7350 gtk_combo_set_use_arrows(&this, val);
7352 void set_use_arrows_always()(int val) nothrow {
7353 gtk_combo_set_use_arrows_always(&this, val);
7355 void set_value_in_list()(int val, int ok_if_empty) nothrow {
7356 gtk_combo_set_value_in_list(&this, val, ok_if_empty);
7361 // A GtkComboBox is a widget that allows the user to choose from a list of
7362 // valid choices. The GtkComboBox displays the selected choice. When
7363 // activated, the GtkComboBox displays a popup which allows the user to
7364 // make a new choice. The style in which the selected value is displayed,
7365 // and the style of the popup is determined by the current theme. It may
7366 // be similar to a Windows-style combo box.
7368 // The GtkComboBox uses the model-view pattern; the list of valid choices
7369 // is specified in the form of a tree model, and the display of the choices
7370 // can be adapted to the data in the model by using cell renderers, as you
7371 // would in a tree view. This is possible since GtkComboBox implements the
7372 // #GtkCellLayout interface. The tree model holding the valid choices is
7373 // not restricted to a flat list, it can be a real tree, and the popup will
7374 // reflect the tree structure.
7376 // To allow the user to enter values not in the model, the 'has-entry'
7377 // property allows the GtkComboBox to contain a #GtkEntry. This entry
7378 // can be accessed by calling gtk_bin_get_child() on the combo box.
7380 // For a simple list of textual choices, the model-view API of GtkComboBox
7381 // can be a bit overwhelming. In this case, #GtkComboBoxText offers a
7382 // simple alternative. Both GtkComboBox and #GtkComboBoxText can contain
7383 // an entry.
7384 struct ComboBox /* : Bin */ {
7385 mixin Atk.ImplementorIface.__interface__;
7386 mixin Buildable.__interface__;
7387 mixin CellEditable.__interface__;
7388 mixin CellLayout.__interface__;
7389 alias parent_instance this;
7390 alias parent_instance super_;
7391 alias parent_instance bin;
7392 Bin parent_instance;
7393 private ComboBoxPrivate* priv;
7396 // VERSION: 2.4
7397 // Creates a new empty #GtkComboBox.
7398 // RETURNS: A new #GtkComboBox.
7399 static ComboBox* new_()() nothrow {
7400 return gtk_combo_box_new();
7402 static auto opCall()() {
7403 return gtk_combo_box_new();
7406 // VERSION: 2.4
7407 // DEPRECATED (v2.24) constructor: new_text - Use #GtkComboBoxText
7408 // Convenience function which constructs a new text combo box, which is a
7409 // #GtkComboBox just displaying strings. If you use this function to create
7410 // a text combo box, you should only manipulate its data source with the
7411 // following convenience functions: gtk_combo_box_append_text(),
7412 // gtk_combo_box_insert_text(), gtk_combo_box_prepend_text() and
7413 // gtk_combo_box_remove_text().
7414 // RETURNS: A new text combo box.
7415 static ComboBox* new_text()() nothrow {
7416 return gtk_combo_box_new_text();
7419 // Creates a new empty #GtkComboBox with an entry.
7420 // RETURNS: A new #GtkComboBox.
7421 static ComboBox* new_with_entry()() nothrow {
7422 return gtk_combo_box_new_with_entry();
7425 // VERSION: 2.4
7426 // Creates a new #GtkComboBox with the model initialized to @model.
7427 // RETURNS: A new #GtkComboBox.
7428 // <model>: A #GtkTreeModel.
7429 static ComboBox* new_with_model(AT0)(AT0 /*TreeModel*/ model) nothrow {
7430 return gtk_combo_box_new_with_model(UpCast!(TreeModel*)(model));
7432 static auto opCall(AT0)(AT0 /*TreeModel*/ model) {
7433 return gtk_combo_box_new_with_model(UpCast!(TreeModel*)(model));
7436 // Creates a new empty #GtkComboBox with an entry
7437 // and with the model initialized to @model.
7438 // RETURNS: A new #GtkComboBox
7439 static ComboBox* new_with_model_and_entry(AT0)(AT0 /*TreeModel*/ model) nothrow {
7440 return gtk_combo_box_new_with_model_and_entry(UpCast!(TreeModel*)(model));
7442 static auto opCall(AT0)(AT0 /*TreeModel*/ model) {
7443 return gtk_combo_box_new_with_model_and_entry(UpCast!(TreeModel*)(model));
7446 // VERSION: 2.4
7447 // DEPRECATED (v2.24) method: append_text - Use #GtkComboBoxText
7448 // Appends @string to the list of strings stored in @combo_box. Note that
7449 // you can only use this function with combo boxes constructed with
7450 // gtk_combo_box_new_text().
7451 // <text>: A string
7452 void append_text(AT0)(AT0 /*char*/ text) nothrow {
7453 gtk_combo_box_append_text(&this, toCString!(char*)(text));
7456 // VERSION: 2.4
7457 // Returns the index of the currently active item, or -1 if there's no
7458 // active item. If the model is a non-flat treemodel, and the active item
7459 // is not an immediate child of the root of the tree, this function returns
7460 // <literal>gtk_tree_path_get_indices (path)[0]</literal>, where
7461 // <literal>path</literal> is the #GtkTreePath of the active item.
7463 // or -1 if there's no active item.
7464 // RETURNS: An integer which is the index of the currently active item,
7465 int get_active()() nothrow {
7466 return gtk_combo_box_get_active(&this);
7469 // VERSION: 2.4
7470 // Sets @iter to point to the current active item, if it exists.
7471 // RETURNS: %TRUE, if @iter was set
7472 // <iter>: The uninitialized #GtkTreeIter
7473 int get_active_iter(AT0)(/*out*/ AT0 /*TreeIter*/ iter) nothrow {
7474 return gtk_combo_box_get_active_iter(&this, UpCast!(TreeIter*)(iter));
7477 // VERSION: 2.6
7478 // DEPRECATED (v2.24) method: get_active_text - If you used this with a #GtkComboBox constructed with
7479 // Returns the currently active string in @combo_box or %NULL if none
7480 // is selected. Note that you can only use this function with combo
7481 // boxes constructed with gtk_combo_box_new_text() and with
7482 // #GtkComboBoxEntry<!-- -->s.
7484 // Must be freed with g_free().
7487 // gtk_combo_box_new_text() then you should now use #GtkComboBoxText and
7488 // gtk_combo_box_text_get_active_text() instead. Or if you used this with a
7489 // #GtkComboBoxEntry then you should now use #GtkComboBox with
7490 // #GtkComboBox:has-entry as %TRUE and use
7491 // gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combobox))).
7492 // RETURNS: a newly allocated string containing the currently active text.
7493 char* /*new*/ get_active_text()() nothrow {
7494 return gtk_combo_box_get_active_text(&this);
7497 // Gets the current value of the :add-tearoffs property.
7498 // RETURNS: the current value of the :add-tearoffs property.
7499 int get_add_tearoffs()() nothrow {
7500 return gtk_combo_box_get_add_tearoffs(&this);
7503 // VERSION: 2.14
7504 // Returns whether the combo box sets the dropdown button
7505 // sensitive or not when there are no items in the model.
7507 // is sensitive when the model is empty, %GTK_SENSITIVITY_OFF
7508 // if the button is always insensitive or
7509 // %GTK_SENSITIVITY_AUTO if it is only sensitive as long as
7510 // the model has one item to be selected.
7511 // RETURNS: %GTK_SENSITIVITY_ON if the dropdown button
7512 SensitivityType get_button_sensitivity()() nothrow {
7513 return gtk_combo_box_get_button_sensitivity(&this);
7516 // VERSION: 2.6
7517 // Returns the column with column span information for @combo_box.
7518 // RETURNS: the column span column.
7519 int get_column_span_column()() nothrow {
7520 return gtk_combo_box_get_column_span_column(&this);
7523 // VERSION: 2.24
7524 // Returns the column which @combo_box is using to get the strings
7525 // from to display in the internal entry.
7526 // RETURNS: A column in the data source model of @combo_box.
7527 int get_entry_text_column()() nothrow {
7528 return gtk_combo_box_get_entry_text_column(&this);
7531 // VERSION: 2.6
7532 // Returns whether the combo box grabs focus when it is clicked
7533 // with the mouse. See gtk_combo_box_set_focus_on_click().
7535 // clicked with the mouse.
7536 // RETURNS: %TRUE if the combo box grabs focus when it is
7537 int get_focus_on_click()() nothrow {
7538 return gtk_combo_box_get_focus_on_click(&this);
7541 // VERSION: 2.24
7542 // Returns whether the combo box has an entry.
7543 // RETURNS: whether there is an entry in @combo_box.
7544 int get_has_entry()() nothrow {
7545 return gtk_combo_box_get_has_entry(&this);
7548 // VERSION: 2.4
7549 // Returns the #GtkTreeModel which is acting as data source for @combo_box.
7551 // during construction.
7552 // RETURNS: A #GtkTreeModel which was passed
7553 TreeModel* get_model()() nothrow {
7554 return gtk_combo_box_get_model(&this);
7557 // VERSION: 2.6
7558 // Gets the accessible object corresponding to the combo box's popup.
7560 // This function is mostly intended for use by accessibility technologies;
7561 // applications should have little use for it.
7563 // to the combo box's popup.
7564 // RETURNS: the accessible object corresponding
7565 Atk.Object* get_popup_accessible()() nothrow {
7566 return gtk_combo_box_get_popup_accessible(&this);
7569 // Unintrospectable method: get_row_separator_func() / gtk_combo_box_get_row_separator_func()
7570 // VERSION: 2.6
7571 // Returns the current row separator function.
7572 // RETURNS: the current row separator function.
7573 TreeViewRowSeparatorFunc get_row_separator_func()() nothrow {
7574 return gtk_combo_box_get_row_separator_func(&this);
7577 // VERSION: 2.6
7578 // Returns the column with row span information for @combo_box.
7579 // RETURNS: the row span column.
7580 int get_row_span_column()() nothrow {
7581 return gtk_combo_box_get_row_span_column(&this);
7584 // VERSION: 2.10
7585 // Gets the current title of the menu in tearoff mode. See
7586 // gtk_combo_box_set_add_tearoffs().
7588 // string which must not be freed.
7589 // RETURNS: the menu's title in tearoff mode. This is an internal copy of the
7590 char* get_title()() nothrow {
7591 return gtk_combo_box_get_title(&this);
7594 // VERSION: 2.6
7595 // Returns the wrap width which is used to determine the number of columns
7596 // for the popup menu. If the wrap width is larger than 1, the combo box
7597 // is in table mode.
7598 // RETURNS: the wrap width.
7599 int get_wrap_width()() nothrow {
7600 return gtk_combo_box_get_wrap_width(&this);
7603 // VERSION: 2.4
7604 // DEPRECATED (v2.24) method: insert_text - Use #GtkComboBoxText
7605 // Inserts @string at @position in the list of strings stored in @combo_box.
7606 // Note that you can only use this function with combo boxes constructed
7607 // with gtk_combo_box_new_text().
7608 // <position>: An index to insert @text
7609 // <text>: A string
7610 void insert_text(AT0)(int position, AT0 /*char*/ text) nothrow {
7611 gtk_combo_box_insert_text(&this, position, toCString!(char*)(text));
7614 // VERSION: 2.4
7615 // Hides the menu or dropdown list of @combo_box.
7617 // This function is mostly intended for use by accessibility technologies;
7618 // applications should have little use for it.
7619 void popdown()() nothrow {
7620 gtk_combo_box_popdown(&this);
7623 // VERSION: 2.4
7624 // Pops up the menu or dropdown list of @combo_box.
7626 // This function is mostly intended for use by accessibility technologies;
7627 // applications should have little use for it.
7628 void popup()() nothrow {
7629 gtk_combo_box_popup(&this);
7632 // VERSION: 2.4
7633 // DEPRECATED (v2.24) method: prepend_text - Use #GtkComboBoxText
7634 // Prepends @string to the list of strings stored in @combo_box. Note that
7635 // you can only use this function with combo boxes constructed with
7636 // gtk_combo_box_new_text().
7637 // <text>: A string
7638 void prepend_text(AT0)(AT0 /*char*/ text) nothrow {
7639 gtk_combo_box_prepend_text(&this, toCString!(char*)(text));
7642 // VERSION: 2.4
7643 // DEPRECATED (v2.24) method: remove_text - Use #GtkComboBoxText
7644 // Removes the string at @position from @combo_box. Note that you can only use
7645 // this function with combo boxes constructed with gtk_combo_box_new_text().
7646 // <position>: Index of the item to remove
7647 void remove_text()(int position) nothrow {
7648 gtk_combo_box_remove_text(&this, position);
7651 // VERSION: 2.4
7652 // Sets the active item of @combo_box to be the item at @index.
7653 // <index_>: An index in the model passed during construction, or -1 to have no active item
7654 void set_active()(int index_) nothrow {
7655 gtk_combo_box_set_active(&this, index_);
7658 // VERSION: 2.4
7659 // Sets the current active item to be the one referenced by @iter, or
7660 // unsets the active item if @iter is %NULL.
7661 // <iter>: The #GtkTreeIter, or %NULL
7662 void set_active_iter(AT0)(AT0 /*TreeIter*/ iter=null) nothrow {
7663 gtk_combo_box_set_active_iter(&this, UpCast!(TreeIter*)(iter));
7666 // VERSION: 2.6
7667 // Sets whether the popup menu should have a tearoff
7668 // menu item.
7669 // <add_tearoffs>: %TRUE to add tearoff menu items
7670 void set_add_tearoffs()(int add_tearoffs) nothrow {
7671 gtk_combo_box_set_add_tearoffs(&this, add_tearoffs);
7674 // VERSION: 2.14
7675 // Sets whether the dropdown button of the combo box should be
7676 // always sensitive (%GTK_SENSITIVITY_ON), never sensitive (%GTK_SENSITIVITY_OFF)
7677 // or only if there is at least one item to display (%GTK_SENSITIVITY_AUTO).
7678 // <sensitivity>: specify the sensitivity of the dropdown button
7679 void set_button_sensitivity()(SensitivityType sensitivity) nothrow {
7680 gtk_combo_box_set_button_sensitivity(&this, sensitivity);
7683 // VERSION: 2.4
7684 // Sets the column with column span information for @combo_box to be
7685 // @column_span. The column span column contains integers which indicate
7686 // how many columns an item should span.
7687 // <column_span>: A column in the model passed during construction
7688 void set_column_span_column()(int column_span) nothrow {
7689 gtk_combo_box_set_column_span_column(&this, column_span);
7692 // VERSION: 2.24
7693 // Sets the model column which @combo_box should use to get strings from
7694 // to be @text_column. The column @text_column in the model of @combo_box
7695 // must be of type %G_TYPE_STRING.
7697 // This is only relevant if @combo_box has been created with
7698 // #GtkComboBox:has-entry as %TRUE.
7699 // <text_column>: A column in @model to get the strings from for the internal entry
7700 void set_entry_text_column()(int text_column) nothrow {
7701 gtk_combo_box_set_entry_text_column(&this, text_column);
7704 // VERSION: 2.6
7705 // Sets whether the combo box will grab focus when it is clicked with
7706 // the mouse. Making mouse clicks not grab focus is useful in places
7707 // like toolbars where you don't want the keyboard focus removed from
7708 // the main area of the application.
7709 // <focus_on_click>: whether the combo box grabs focus when clicked with the mouse
7710 void set_focus_on_click()(int focus_on_click) nothrow {
7711 gtk_combo_box_set_focus_on_click(&this, focus_on_click);
7714 // VERSION: 2.4
7715 // Sets the model used by @combo_box to be @model. Will unset a previously set
7716 // model (if applicable). If model is %NULL, then it will unset the model.
7718 // Note that this function does not clear the cell renderers, you have to
7719 // call gtk_cell_layout_clear() yourself if you need to set up different
7720 // cell renderers for the new model.
7721 // <model>: A #GtkTreeModel
7722 void set_model(AT0)(AT0 /*TreeModel*/ model=null) nothrow {
7723 gtk_combo_box_set_model(&this, UpCast!(TreeModel*)(model));
7726 // VERSION: 2.6
7727 // Sets the row separator function, which is used to determine
7728 // whether a row should be drawn as a separator. If the row separator
7729 // function is %NULL, no separators are drawn. This is the default value.
7730 // <func>: a #GtkTreeViewRowSeparatorFunc
7731 // <data>: user data to pass to @func, or %NULL
7732 // <destroy>: destroy notifier for @data, or %NULL
7733 void set_row_separator_func(AT0)(TreeViewRowSeparatorFunc func, AT0 /*void*/ data=null, GLib2.DestroyNotify destroy=null) nothrow {
7734 gtk_combo_box_set_row_separator_func(&this, func, UpCast!(void*)(data), destroy);
7737 // VERSION: 2.4
7738 // Sets the column with row span information for @combo_box to be @row_span.
7739 // The row span column contains integers which indicate how many rows
7740 // an item should span.
7741 // <row_span>: A column in the model passed during construction.
7742 void set_row_span_column()(int row_span) nothrow {
7743 gtk_combo_box_set_row_span_column(&this, row_span);
7746 // VERSION: 2.10
7747 // Sets the menu's title in tearoff mode.
7748 // <title>: a title for the menu in tearoff mode
7749 void set_title(AT0)(AT0 /*char*/ title) nothrow {
7750 gtk_combo_box_set_title(&this, toCString!(char*)(title));
7753 // VERSION: 2.4
7754 // Sets the wrap width of @combo_box to be @width. The wrap width is basically
7755 // the preferred number of columns when you want the popup to be layed out
7756 // in a table.
7757 // <width>: Preferred number of columns
7758 void set_wrap_width()(int width) nothrow {
7759 gtk_combo_box_set_wrap_width(&this, width);
7762 // VERSION: 2.4
7763 // The changed signal is emitted when the active
7764 // item is changed. The can be due to the user selecting
7765 // a different item from the list, or due to a
7766 // call to gtk_combo_box_set_active_iter().
7767 // It will also be emitted while typing into a GtkComboBoxEntry,
7768 // as well as when selecting an item from the GtkComboBoxEntry's list.
7769 extern (C) alias static void function (ComboBox* this_, void* user_data=null) nothrow signal_changed;
7771 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7772 return super_.signal_connect!name(cb, data, cf);
7775 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
7776 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7777 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
7778 return signal_connect_data!()(&this, cast(char*)"changed",
7779 cast(GObject2.Callback)cb, data, null, cf);
7782 // VERSION: 2.12
7783 // The ::move-active signal is a
7784 // <link linkend="keybinding-signals">keybinding signal</link>
7785 // which gets emitted to move the active selection.
7786 // <scroll_type>: a #GtkScrollType
7787 extern (C) alias static void function (ComboBox* this_, ScrollType* scroll_type, void* user_data=null) nothrow signal_move_active;
7788 ulong signal_connect(string name:"move-active", CB/*:signal_move_active*/)
7789 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7790 if (is(typeof(cb)==signal_move_active)||_ttmm!(CB, signal_move_active)()) {
7791 return signal_connect_data!()(&this, cast(char*)"move-active",
7792 cast(GObject2.Callback)cb, data, null, cf);
7795 // VERSION: 2.12
7796 // The ::popdown signal is a
7797 // <link linkend="keybinding-signals">keybinding signal</link>
7798 // which gets emitted to popdown the combo box list.
7800 // The default bindings for this signal are Alt+Up and Escape.
7801 extern (C) alias static c_int function (ComboBox* this_, void* user_data=null) nothrow signal_popdown;
7802 ulong signal_connect(string name:"popdown", CB/*:signal_popdown*/)
7803 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7804 if (is(typeof(cb)==signal_popdown)||_ttmm!(CB, signal_popdown)()) {
7805 return signal_connect_data!()(&this, cast(char*)"popdown",
7806 cast(GObject2.Callback)cb, data, null, cf);
7809 // VERSION: 2.12
7810 // The ::popup signal is a
7811 // <link linkend="keybinding-signals">keybinding signal</link>
7812 // which gets emitted to popup the combo box list.
7814 // The default binding for this signal is Alt+Down.
7815 extern (C) alias static void function (ComboBox* this_, void* user_data=null) nothrow signal_popup;
7816 ulong signal_connect(string name:"popup", CB/*:signal_popup*/)
7817 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7818 if (is(typeof(cb)==signal_popup)||_ttmm!(CB, signal_popup)()) {
7819 return signal_connect_data!()(&this, cast(char*)"popup",
7820 cast(GObject2.Callback)cb, data, null, cf);
7824 struct ComboBoxClass {
7825 BinClass parent_class;
7826 extern (C) void function (ComboBox* combo_box) nothrow changed;
7827 // RETURNS: a newly allocated string containing the currently active text.
7828 extern (C) char* /*new*/ function (ComboBox* combo_box) nothrow get_active_text;
7829 extern (C) void function () nothrow _gtk_reserved0;
7830 extern (C) void function () nothrow _gtk_reserved1;
7831 extern (C) void function () nothrow _gtk_reserved2;
7834 struct ComboBoxEntry /* : ComboBox */ {
7835 mixin Atk.ImplementorIface.__interface__;
7836 mixin Buildable.__interface__;
7837 mixin CellEditable.__interface__;
7838 mixin CellLayout.__interface__;
7839 alias parent_instance this;
7840 alias parent_instance super_;
7841 alias parent_instance combobox;
7842 ComboBox parent_instance;
7843 private ComboBoxEntryPrivate* priv;
7846 // VERSION: 2.4
7847 // DEPRECATED (v2.24) constructor: new - Use gtk_combo_box_new_with_entry() instead
7848 // Creates a new #GtkComboBoxEntry which has a #GtkEntry as child. After
7849 // construction, you should set a model using gtk_combo_box_set_model() and a
7850 // text column using gtk_combo_box_entry_set_text_column().
7851 // RETURNS: A new #GtkComboBoxEntry.
7852 static ComboBoxEntry* new_()() nothrow {
7853 return gtk_combo_box_entry_new();
7855 static auto opCall()() {
7856 return gtk_combo_box_entry_new();
7859 // VERSION: 2.4
7860 // Convenience function which constructs a new editable text combo box, which
7861 // is a #GtkComboBoxEntry just displaying strings. If you use this function to
7862 // create a text combo box, you should only manipulate its data source with
7863 // the following convenience functions: gtk_combo_box_append_text(),
7864 // gtk_combo_box_insert_text(), gtk_combo_box_prepend_text() and
7865 // gtk_combo_box_remove_text().
7866 // RETURNS: A new text #GtkComboBoxEntry.
7867 static ComboBoxEntry* new_text()() nothrow {
7868 return gtk_combo_box_entry_new_text();
7871 // VERSION: 2.4
7872 // DEPRECATED (v2.24) constructor: new_with_model - Use gtk_combo_box_new_with_model_and_entry() instead
7873 // Creates a new #GtkComboBoxEntry which has a #GtkEntry as child and a list
7874 // of strings as popup. You can get the #GtkEntry from a #GtkComboBoxEntry
7875 // using GTK_ENTRY (GTK_BIN (combo_box_entry)->child). To add and remove
7876 // strings from the list, just modify @model using its data manipulation
7877 // API.
7878 // RETURNS: A new #GtkComboBoxEntry.
7879 // <model>: A #GtkTreeModel.
7880 // <text_column>: A column in @model to get the strings from.
7881 static ComboBoxEntry* new_with_model(AT0)(AT0 /*TreeModel*/ model, int text_column) nothrow {
7882 return gtk_combo_box_entry_new_with_model(UpCast!(TreeModel*)(model), text_column);
7884 static auto opCall(AT0)(AT0 /*TreeModel*/ model, int text_column) {
7885 return gtk_combo_box_entry_new_with_model(UpCast!(TreeModel*)(model), text_column);
7888 // VERSION: 2.4
7889 // DEPRECATED (v2.24) method: get_text_column - Use gtk_combo_box_get_entry_text_column() instead
7890 // Returns the column which @entry_box is using to get the strings from.
7891 // RETURNS: A column in the data source model of @entry_box.
7892 int get_text_column()() nothrow {
7893 return gtk_combo_box_entry_get_text_column(&this);
7896 // VERSION: 2.4
7897 // DEPRECATED (v2.24) method: set_text_column - Use gtk_combo_box_set_entry_text_column() instead
7898 // Sets the model column which @entry_box should use to get strings from
7899 // to be @text_column.
7900 // <text_column>: A column in @model to get the strings from.
7901 void set_text_column()(int text_column) nothrow {
7902 gtk_combo_box_entry_set_text_column(&this, text_column);
7906 struct ComboBoxEntryClass {
7907 ComboBoxClass parent_class;
7908 extern (C) void function () nothrow _gtk_reserved0;
7909 extern (C) void function () nothrow _gtk_reserved1;
7910 extern (C) void function () nothrow _gtk_reserved2;
7911 extern (C) void function () nothrow _gtk_reserved3;
7914 struct ComboBoxEntryPrivate {
7917 struct ComboBoxPrivate {
7921 // A GtkComboBoxText is a simple variant of #GtkComboBox that hides
7922 // the model-view complexity for simple text-only use cases.
7924 // To create a GtkComboBoxText, use gtk_combo_box_text_new() or
7925 // gtk_combo_box_text_new_with_entry().
7927 // You can add items to a GtkComboBoxText with
7928 // gtk_combo_box_text_append_text(), gtk_combo_box_text_insert_text()
7929 // or gtk_combo_box_text_prepend_text() and remove options with
7930 // gtk_combo_box_text_remove().
7932 // If the GtkComboBoxText contains an entry (via the 'has-entry' property),
7933 // its contents can be retrieved using gtk_combo_box_text_get_active_text().
7934 // The entry itself can be accessed by calling gtk_bin_get_child() on the
7935 // combo box.
7937 // <refsect2 id="GtkComboBoxText-BUILDER-UI">
7938 // <title>GtkComboBoxText as GtkBuildable</title>
7939 // <para>
7940 // The GtkComboBoxText implementation of the GtkBuildable interface
7941 // supports adding items directly using the &lt;items&gt element
7942 // and specifying &lt;item&gt; elements for each item. Each &lt;item&gt;
7943 // element supports the regular translation attributes "translatable",
7944 // "context" and "comments".
7945 // </para>
7946 // <example>
7947 // <title>A UI definition fragment specifying GtkComboBoxText items</title>
7948 // <programlisting><![CDATA[
7949 // <object class="GtkComboBoxText">
7950 // <items>
7951 // <item translatable="yes">Factory</item>
7952 // <item translatable="yes">Home</item>
7953 // <item translatable="yes">Subway</item>
7954 // </items>
7955 // </object>
7956 // ]]></programlisting>
7957 // </example>
7958 // </refsect2>
7959 struct ComboBoxText /* : ComboBox */ {
7960 mixin Atk.ImplementorIface.__interface__;
7961 mixin Buildable.__interface__;
7962 mixin CellEditable.__interface__;
7963 mixin CellLayout.__interface__;
7964 alias parent_instance this;
7965 alias parent_instance super_;
7966 alias parent_instance combobox;
7967 ComboBox parent_instance;
7968 private ComboBoxTextPrivate* priv;
7971 // VERSION: 2.24
7972 // Creates a new #GtkComboBoxText, which is a #GtkComboBox just displaying
7973 // strings. See gtk_combo_box_entry_new_with_text().
7974 // RETURNS: A new #GtkComboBoxText
7975 static ComboBoxText* new_()() nothrow {
7976 return gtk_combo_box_text_new();
7978 static auto opCall()() {
7979 return gtk_combo_box_text_new();
7982 // VERSION: 2.24
7983 // Creates a new #GtkComboBoxText, which is a #GtkComboBox just displaying
7984 // strings. The combo box created by this function has an entry.
7985 // RETURNS: a new #GtkComboBoxText
7986 static ComboBoxText* new_with_entry()() nothrow {
7987 return gtk_combo_box_text_new_with_entry();
7990 // VERSION: 2.24
7991 // Appends @string to the list of strings stored in @combo_box.
7992 // <text>: A string
7993 void append_text(AT0)(AT0 /*char*/ text) nothrow {
7994 gtk_combo_box_text_append_text(&this, toCString!(char*)(text));
7997 // VERSION: 2.24
7998 // Returns the currently active string in @combo_box, or %NULL
7999 // if none is selected. If @combo_box contains an entry, this
8000 // function will return its contents (which will not necessarily
8001 // be an item from the list).
8003 // active text. Must be freed with g_free().
8004 // RETURNS: a newly allocated string containing the currently
8005 char* /*new*/ get_active_text()() nothrow {
8006 return gtk_combo_box_text_get_active_text(&this);
8009 // VERSION: 2.24
8010 // Inserts @string at @position in the list of strings stored in @combo_box.
8011 // <position>: An index to insert @text
8012 // <text>: A string
8013 void insert_text(AT0)(int position, AT0 /*char*/ text) nothrow {
8014 gtk_combo_box_text_insert_text(&this, position, toCString!(char*)(text));
8017 // VERSION: 2.24
8018 // Prepends @string to the list of strings stored in @combo_box.
8019 // <text>: A string
8020 void prepend_text(AT0)(AT0 /*char*/ text) nothrow {
8021 gtk_combo_box_text_prepend_text(&this, toCString!(char*)(text));
8024 // VERSION: 2.24
8025 // Removes the string at @position from @combo_box.
8026 // <position>: Index of the item to remove
8027 void remove()(int position) nothrow {
8028 gtk_combo_box_text_remove(&this, position);
8032 struct ComboBoxTextClass {
8033 ComboBoxClass parent_class;
8034 extern (C) void function () nothrow _gtk_reserved1;
8035 extern (C) void function () nothrow _gtk_reserved2;
8036 extern (C) void function () nothrow _gtk_reserved3;
8037 extern (C) void function () nothrow _gtk_reserved4;
8040 struct ComboBoxTextPrivate {
8043 struct ComboClass {
8044 HBoxClass parent_class;
8045 extern (C) void function () nothrow _gtk_reserved1;
8046 extern (C) void function () nothrow _gtk_reserved2;
8047 extern (C) void function () nothrow _gtk_reserved3;
8048 extern (C) void function () nothrow _gtk_reserved4;
8051 struct Container /* : Widget */ {
8052 mixin Atk.ImplementorIface.__interface__;
8053 mixin Buildable.__interface__;
8054 alias widget this;
8055 alias widget super_;
8056 Widget widget;
8057 Widget* focus_child;
8058 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
8059 uint, "border_width", 16,
8060 uint, "need_resize", 1,
8061 uint, "resize_mode", 2,
8062 uint, "reallocate_redraws", 1,
8063 uint, "has_focus_chain", 1,
8064 uint, "__dummy32A", 11));
8067 // Adds @widget to @container. Typically used for simple containers
8068 // such as #GtkWindow, #GtkFrame, or #GtkButton; for more complicated
8069 // layout containers such as #GtkBox or #GtkTable, this function will
8070 // pick default packing parameters that may not be correct. So
8071 // consider functions such as gtk_box_pack_start() and
8072 // gtk_table_attach() as an alternative to gtk_container_add() in
8073 // those cases. A widget may be added to only one container at a time;
8074 // you can't place the same widget inside two different containers.
8075 // <widget>: a widget to be placed inside @container
8076 void add(AT0)(AT0 /*Widget*/ widget) nothrow {
8077 gtk_container_add(&this, UpCast!(Widget*)(widget));
8080 // Unintrospectable method: add_with_properties() / gtk_container_add_with_properties()
8081 // Adds @widget to @container, setting child properties at the same time.
8082 // See gtk_container_add() and gtk_container_child_set() for more details.
8083 // <widget>: a widget to be placed inside @container
8084 // <first_prop_name>: the name of the first child property to set
8085 /+ Not available -- variadic methods unsupported - use the C function directly.
8086 alias gtk_container_add_with_properties add_with_properties; // Variadic
8088 void check_resize()() nothrow {
8089 gtk_container_check_resize(&this);
8092 // Unintrospectable method: child_get() / gtk_container_child_get()
8093 // Gets the values of one or more child properties for @child and @container.
8094 // <child>: a widget which is a child of @container
8095 // <first_prop_name>: the name of the first property to get
8096 /+ Not available -- variadic methods unsupported - use the C function directly.
8097 alias gtk_container_child_get child_get; // Variadic
8100 // Gets the value of a child property for @child and @container.
8101 // <child>: a widget which is a child of @container
8102 // <property_name>: the name of the property to get
8103 // <value>: a location to return the value
8104 void child_get_property(AT0, AT1, AT2)(AT0 /*Widget*/ child, AT1 /*char*/ property_name, AT2 /*GObject2.Value*/ value) nothrow {
8105 gtk_container_child_get_property(&this, UpCast!(Widget*)(child), toCString!(char*)(property_name), UpCast!(GObject2.Value*)(value));
8108 // Unintrospectable method: child_get_valist() / gtk_container_child_get_valist()
8109 // Gets the values of one or more child properties for @child and @container.
8110 // <child>: a widget which is a child of @container
8111 // <first_property_name>: the name of the first property to get
8112 // <var_args>: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
8113 void child_get_valist(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*char*/ first_property_name, va_list var_args) nothrow {
8114 gtk_container_child_get_valist(&this, UpCast!(Widget*)(child), toCString!(char*)(first_property_name), var_args);
8117 // Unintrospectable method: child_set() / gtk_container_child_set()
8118 // Sets one or more child properties for @child and @container.
8119 // <child>: a widget which is a child of @container
8120 // <first_prop_name>: the name of the first property to set
8121 /+ Not available -- variadic methods unsupported - use the C function directly.
8122 alias gtk_container_child_set child_set; // Variadic
8125 // Sets a child property for @child and @container.
8126 // <child>: a widget which is a child of @container
8127 // <property_name>: the name of the property to set
8128 // <value>: the value to set the property to
8129 void child_set_property(AT0, AT1, AT2)(AT0 /*Widget*/ child, AT1 /*char*/ property_name, AT2 /*GObject2.Value*/ value) nothrow {
8130 gtk_container_child_set_property(&this, UpCast!(Widget*)(child), toCString!(char*)(property_name), UpCast!(GObject2.Value*)(value));
8133 // Unintrospectable method: child_set_valist() / gtk_container_child_set_valist()
8134 // Sets one or more child properties for @child and @container.
8135 // <child>: a widget which is a child of @container
8136 // <first_property_name>: the name of the first property to set
8137 // <var_args>: a %NULL-terminated list of property names and values, starting with @first_prop_name
8138 void child_set_valist(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*char*/ first_property_name, va_list var_args) nothrow {
8139 gtk_container_child_set_valist(&this, UpCast!(Widget*)(child), toCString!(char*)(first_property_name), var_args);
8142 // Returns the type of the children supported by the container.
8144 // Note that this may return %G_TYPE_NONE to indicate that no more
8145 // children can be added, e.g. for a #GtkPaned which already has two
8146 // children.
8147 // RETURNS: a #GType.
8148 Type child_type()() nothrow {
8149 return gtk_container_child_type(&this);
8152 // Unintrospectable method: forall() / gtk_container_forall()
8153 // Invokes @callback on each child of @container, including children
8154 // that are considered "internal" (implementation details of the
8155 // container). "Internal" children generally weren't added by the user
8156 // of the container, but were added by the container implementation
8157 // itself. Most applications should use gtk_container_foreach(),
8158 // rather than gtk_container_forall().
8159 // <callback>: a callback
8160 // <callback_data>: callback user data
8161 void forall(AT0)(Callback callback, AT0 /*void*/ callback_data) nothrow {
8162 gtk_container_forall(&this, callback, UpCast!(void*)(callback_data));
8165 // Invokes @callback on each non-internal child of @container. See
8166 // gtk_container_forall() for details on what constitutes an
8167 // "internal" child. Most applications should use
8168 // gtk_container_foreach(), rather than gtk_container_forall().
8169 // <callback>: a callback
8170 // <callback_data>: callback user data
8171 void foreach_(AT0)(Callback callback, AT0 /*void*/ callback_data) nothrow {
8172 gtk_container_foreach(&this, callback, UpCast!(void*)(callback_data));
8174 // Unintrospectable method: foreach_full() / gtk_container_foreach_full()
8175 void foreach_full(AT0)(Callback callback, CallbackMarshal marshal, AT0 /*void*/ callback_data, GLib2.DestroyNotify notify) nothrow {
8176 gtk_container_foreach_full(&this, callback, marshal, UpCast!(void*)(callback_data), notify);
8179 // Retrieves the border width of the container. See
8180 // gtk_container_set_border_width().
8181 // RETURNS: the current border width
8182 uint get_border_width()() nothrow {
8183 return gtk_container_get_border_width(&this);
8186 // Returns the container's non-internal children. See
8187 // gtk_container_forall() for details on what constitutes an "internal" child.
8188 // RETURNS: a newly-allocated list of the container's non-internal children.
8189 GLib2.List* /*new container*/ get_children()() nothrow {
8190 return gtk_container_get_children(&this);
8193 // Retrieves the focus chain of the container, if one has been
8194 // set explicitly. If no focus chain has been explicitly
8195 // set, GTK+ computes the focus chain based on the positions
8196 // of the children. In that case, GTK+ stores %NULL in
8197 // @focusable_widgets and returns %FALSE.
8199 // has been set explicitly.
8200 // RETURNS: %TRUE if the focus chain of the container
8201 // <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.
8202 int get_focus_chain(AT0)(/*out*/ AT0 /*GLib2.List**/ focusable_widgets) nothrow {
8203 return gtk_container_get_focus_chain(&this, UpCast!(GLib2.List**)(focusable_widgets));
8206 // VERSION: 2.14
8207 // Returns the current focus child widget inside @container. This is not the
8208 // currently focused widget. That can be obtained by calling
8209 // gtk_window_get_focus().
8211 // focus inside @container when the @conatiner is focussed,
8212 // or %NULL if none is set.
8213 // RETURNS: The child widget which will receive the
8214 Widget* get_focus_child()() nothrow {
8215 return gtk_container_get_focus_child(&this);
8218 // Retrieves the horizontal focus adjustment for the container. See
8219 // gtk_container_set_focus_hadjustment ().
8221 // none has been set.
8222 // RETURNS: the horizontal focus adjustment, or %NULL if
8223 Adjustment* get_focus_hadjustment()() nothrow {
8224 return gtk_container_get_focus_hadjustment(&this);
8227 // Retrieves the vertical focus adjustment for the container. See
8228 // gtk_container_set_focus_vadjustment().
8230 // none has been set.
8231 // RETURNS: the vertical focus adjustment, or %NULL if
8232 Adjustment* get_focus_vadjustment()() nothrow {
8233 return gtk_container_get_focus_vadjustment(&this);
8236 // Returns the resize mode for the container. See
8237 // gtk_container_set_resize_mode ().
8238 // RETURNS: the current resize mode
8239 ResizeMode get_resize_mode()() nothrow {
8240 return gtk_container_get_resize_mode(&this);
8243 // When a container receives an expose event, it must send synthetic
8244 // expose events to all children that don't have their own #GdkWindows.
8245 // This function provides a convenient way of doing this. A container,
8246 // when it receives an expose event, calls gtk_container_propagate_expose()
8247 // once for each child, passing in the event the container received.
8249 // gtk_container_propagate_expose() takes care of deciding whether
8250 // an expose event needs to be sent to the child, intersecting
8251 // the event's area with the child area, and sending the event.
8253 // In most cases, a container can simply either simply inherit the
8254 // #GtkWidget::expose implementation from #GtkContainer, or, do some drawing
8255 // and then chain to the ::expose implementation from #GtkContainer.
8257 // Note that the ::expose-event signal has been replaced by a ::draw
8258 // signal in GTK+ 3, and consequently, gtk_container_propagate_expose()
8259 // has been replaced by gtk_container_propagate_draw().
8260 // The <link linkend="http://library.gnome.org/devel/gtk3/3.0/gtk-migrating-2-to-3.html">GTK+ 3 migration guide</link>
8261 // for hints on how to port from ::expose-event to ::draw.
8262 // <child>: a child of @container
8263 // <event>: a expose event sent to container
8264 void propagate_expose(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*Gdk2.EventExpose*/ event) nothrow {
8265 gtk_container_propagate_expose(&this, UpCast!(Widget*)(child), UpCast!(Gdk2.EventExpose*)(event));
8268 // Removes @widget from @container. @widget must be inside @container.
8269 // Note that @container will own a reference to @widget, and that this
8270 // may be the last reference held; so removing a widget from its
8271 // container can destroy that widget. If you want to use @widget
8272 // again, you need to add a reference to it while it's not inside
8273 // a container, using g_object_ref(). If you don't want to use @widget
8274 // again it's usually more efficient to simply destroy it directly
8275 // using gtk_widget_destroy() since this will remove it from the
8276 // container and help break any circular reference count cycles.
8277 // <widget>: a current child of @container
8278 void remove(AT0)(AT0 /*Widget*/ widget) nothrow {
8279 gtk_container_remove(&this, UpCast!(Widget*)(widget));
8281 void resize_children()() nothrow {
8282 gtk_container_resize_children(&this);
8285 // Sets the border width of the container.
8287 // The border width of a container is the amount of space to leave
8288 // around the outside of the container. The only exception to this is
8289 // #GtkWindow; because toplevel windows can't leave space outside,
8290 // they leave the space inside. The border is added on all sides of
8291 // the container. To add space to only one side, one approach is to
8292 // create a #GtkAlignment widget, call gtk_widget_set_size_request()
8293 // to give it a size, and place it on the side of the container as
8294 // a spacer.
8295 // <border_width>: amount of blank space to leave <emphasis>outside</emphasis> the container. Valid values are in the range 0-65535 pixels.
8296 void set_border_width()(uint border_width) nothrow {
8297 gtk_container_set_border_width(&this, border_width);
8300 // Sets a focus chain, overriding the one computed automatically by GTK+.
8302 // In principle each widget in the chain should be a descendant of the
8303 // container, but this is not enforced by this method, since it's allowed
8304 // to set the focus chain before you pack the widgets, or have a widget
8305 // in the chain that isn't always packed. The necessary checks are done
8306 // when the focus chain is actually traversed.
8307 // <focusable_widgets>: the new focus chain
8308 void set_focus_chain(AT0)(AT0 /*GLib2.List*/ focusable_widgets) nothrow {
8309 gtk_container_set_focus_chain(&this, UpCast!(GLib2.List*)(focusable_widgets));
8312 // Sets, or unsets if @child is %NULL, the focused child of @container.
8314 // This function emits the GtkContainer::set_focus_child signal of
8315 // @container. Implementations of #GtkContainer can override the
8316 // default behaviour by overriding the class closure of this signal.
8318 // This is function is mostly meant to be used by widgets. Applications can use
8319 // gtk_widget_grab_focus() to manualy set the focus to a specific widget.
8320 // <child>: a #GtkWidget, or %NULL
8321 void set_focus_child(AT0)(AT0 /*Widget*/ child=null) nothrow {
8322 gtk_container_set_focus_child(&this, UpCast!(Widget*)(child));
8325 // Hooks up an adjustment to focus handling in a container, so when a child
8326 // of the container is focused, the adjustment is scrolled to show that
8327 // widget. This function sets the horizontal alignment.
8328 // See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining
8329 // the adjustment and gtk_container_set_focus_vadjustment() for setting
8330 // the vertical adjustment.
8332 // The adjustments have to be in pixel units and in the same coordinate
8333 // system as the allocation for immediate children of the container.
8334 // <adjustment>: an adjustment which should be adjusted when the focus is moved among the descendents of @container
8335 void set_focus_hadjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
8336 gtk_container_set_focus_hadjustment(&this, UpCast!(Adjustment*)(adjustment));
8339 // Hooks up an adjustment to focus handling in a container, so when a
8340 // child of the container is focused, the adjustment is scrolled to
8341 // show that widget. This function sets the vertical alignment. See
8342 // gtk_scrolled_window_get_vadjustment() for a typical way of obtaining
8343 // the adjustment and gtk_container_set_focus_hadjustment() for setting
8344 // the horizontal adjustment.
8346 // The adjustments have to be in pixel units and in the same coordinate
8347 // system as the allocation for immediate children of the container.
8348 // <adjustment>: an adjustment which should be adjusted when the focus is moved among the descendents of @container
8349 void set_focus_vadjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
8350 gtk_container_set_focus_vadjustment(&this, UpCast!(Adjustment*)(adjustment));
8353 // Sets the @reallocate_redraws flag of the container to the given value.
8355 // Containers requesting reallocation redraws get automatically
8356 // redrawn if any of their children changed allocation.
8357 // <needs_redraws>: the new value for the container's @reallocate_redraws flag
8358 void set_reallocate_redraws()(int needs_redraws) nothrow {
8359 gtk_container_set_reallocate_redraws(&this, needs_redraws);
8362 // Sets the resize mode for the container.
8364 // The resize mode of a container determines whether a resize request
8365 // will be passed to the container's parent, queued for later execution
8366 // or executed immediately.
8367 // <resize_mode>: the new resize mode
8368 void set_resize_mode()(ResizeMode resize_mode) nothrow {
8369 gtk_container_set_resize_mode(&this, resize_mode);
8371 // Removes a focus chain explicitly set with gtk_container_set_focus_chain().
8372 void unset_focus_chain()() nothrow {
8373 gtk_container_unset_focus_chain(&this);
8375 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) nothrow signal_add;
8377 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8378 return super_.signal_connect!name(cb, data, cf);
8381 ulong signal_connect(string name:"add", CB/*:signal_add*/)
8382 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
8383 if (is(typeof(cb)==signal_add)||_ttmm!(CB, signal_add)()) {
8384 return signal_connect_data!()(&this, cast(char*)"add",
8385 cast(GObject2.Callback)cb, data, null, cf);
8387 extern (C) alias static void function (Container* this_, void* user_data=null) nothrow signal_check_resize;
8388 ulong signal_connect(string name:"check-resize", CB/*:signal_check_resize*/)
8389 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
8390 if (is(typeof(cb)==signal_check_resize)||_ttmm!(CB, signal_check_resize)()) {
8391 return signal_connect_data!()(&this, cast(char*)"check-resize",
8392 cast(GObject2.Callback)cb, data, null, cf);
8394 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) nothrow signal_remove;
8395 ulong signal_connect(string name:"remove", CB/*:signal_remove*/)
8396 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
8397 if (is(typeof(cb)==signal_remove)||_ttmm!(CB, signal_remove)()) {
8398 return signal_connect_data!()(&this, cast(char*)"remove",
8399 cast(GObject2.Callback)cb, data, null, cf);
8401 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) nothrow signal_set_focus_child;
8402 ulong signal_connect(string name:"set-focus-child", CB/*:signal_set_focus_child*/)
8403 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
8404 if (is(typeof(cb)==signal_set_focus_child)||_ttmm!(CB, signal_set_focus_child)()) {
8405 return signal_connect_data!()(&this, cast(char*)"set-focus-child",
8406 cast(GObject2.Callback)cb, data, null, cf);
8410 struct ContainerClass {
8411 WidgetClass parent_class;
8412 // <widget>: a widget to be placed inside @container
8413 extern (C) void function (Container* container, Widget* widget) nothrow add;
8414 // <widget>: a current child of @container
8415 extern (C) void function (Container* container, Widget* widget) nothrow remove;
8416 extern (C) void function (Container* container) nothrow check_resize;
8417 // Unintrospectable functionp: forall() / ()
8418 extern (C) void function (Container* container, int include_internals, Callback callback, void* callback_data) nothrow forall;
8419 extern (C) void function (Container* container, Widget* widget) nothrow set_focus_child;
8420 // RETURNS: a #GType.
8421 extern (C) Type function (Container* container) nothrow child_type;
8422 extern (C) char* /*new*/ function (Container* container, Widget* child) nothrow composite_name;
8423 extern (C) void function (Container* container, Widget* child, uint property_id, GObject2.Value* value, GObject2.ParamSpec* pspec) nothrow set_child_property;
8424 extern (C) void function (Container* container, Widget* child, uint property_id, GObject2.Value* value, GObject2.ParamSpec* pspec) nothrow get_child_property;
8425 extern (C) void function () nothrow _gtk_reserved1;
8426 extern (C) void function () nothrow _gtk_reserved2;
8427 extern (C) void function () nothrow _gtk_reserved3;
8428 extern (C) void function () nothrow _gtk_reserved4;
8431 // Finds a child property of a container class by name.
8432 // RETURNS: the #GParamSpec of the child property or %NULL if @class has no child property with that name.
8433 // <property_name>: the name of the child property to find
8434 GObject2.ParamSpec* find_child_property(AT0)(AT0 /*char*/ property_name) nothrow {
8435 return gtk_container_class_find_child_property(&this, toCString!(char*)(property_name));
8438 // Installs a child property on a container class.
8439 // <property_id>: the id for the property
8440 // <pspec>: the #GParamSpec for the property
8441 void install_child_property(AT0)(uint property_id, AT0 /*GObject2.ParamSpec*/ pspec) nothrow {
8442 gtk_container_class_install_child_property(&this, property_id, UpCast!(GObject2.ParamSpec*)(pspec));
8445 // Returns all child properties of a container class.
8446 // RETURNS: a newly allocated %NULL-terminated array of #GParamSpec*. The array must be freed with g_free().
8447 // <n_properties>: location to return the number of child properties found
8448 GObject2.ParamSpec** /*new container*/ list_child_properties(AT0)(/*out*/ AT0 /*uint*/ n_properties) nothrow {
8449 return gtk_container_class_list_child_properties(&this, UpCast!(uint*)(n_properties));
8453 enum CornerType {
8454 TOP_LEFT = 0,
8455 BOTTOM_LEFT = 1,
8456 TOP_RIGHT = 2,
8457 BOTTOM_RIGHT = 3
8459 struct Curve /* : DrawingArea */ {
8460 mixin Atk.ImplementorIface.__interface__;
8461 mixin Buildable.__interface__;
8462 alias graph this;
8463 alias graph super_;
8464 alias graph drawingarea;
8465 DrawingArea graph;
8466 int cursor_type;
8467 float min_x, max_x, min_y, max_y;
8468 Gdk2.Pixmap* pixmap;
8469 CurveType curve_type;
8470 int height, grab_point, last, num_points;
8471 Gdk2.Point* point;
8472 int num_ctlpoints;
8473 float* ctlpoint;
8475 static Curve* new_()() nothrow {
8476 return gtk_curve_new();
8478 static auto opCall()() {
8479 return gtk_curve_new();
8481 void get_vector()(int veclen, float vector) nothrow {
8482 gtk_curve_get_vector(&this, veclen, vector);
8484 void reset()() nothrow {
8485 gtk_curve_reset(&this);
8487 void set_curve_type()(CurveType type) nothrow {
8488 gtk_curve_set_curve_type(&this, type);
8490 void set_gamma()(float gamma_) nothrow {
8491 gtk_curve_set_gamma(&this, gamma_);
8493 void set_range()(float min_x, float max_x, float min_y, float max_y) nothrow {
8494 gtk_curve_set_range(&this, min_x, max_x, min_y, max_y);
8496 void set_vector()(int veclen, float vector) nothrow {
8497 gtk_curve_set_vector(&this, veclen, vector);
8499 extern (C) alias static void function (Curve* this_, void* user_data=null) nothrow signal_curve_type_changed;
8501 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8502 return super_.signal_connect!name(cb, data, cf);
8505 ulong signal_connect(string name:"curve-type-changed", CB/*:signal_curve_type_changed*/)
8506 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
8507 if (is(typeof(cb)==signal_curve_type_changed)||_ttmm!(CB, signal_curve_type_changed)()) {
8508 return signal_connect_data!()(&this, cast(char*)"curve-type-changed",
8509 cast(GObject2.Callback)cb, data, null, cf);
8513 struct CurveClass {
8514 DrawingAreaClass parent_class;
8515 extern (C) void function (Curve* curve) nothrow curve_type_changed;
8516 extern (C) void function () nothrow _gtk_reserved1;
8517 extern (C) void function () nothrow _gtk_reserved2;
8518 extern (C) void function () nothrow _gtk_reserved3;
8519 extern (C) void function () nothrow _gtk_reserved4;
8522 enum CurveType {
8523 LINEAR = 0,
8524 SPLINE = 1,
8525 FREE = 2
8527 enum DebugFlag {
8528 MISC = 1,
8529 PLUGSOCKET = 2,
8530 TEXT = 4,
8531 TREE = 8,
8532 UPDATES = 16,
8533 KEYBINDINGS = 32,
8534 MULTIHEAD = 64,
8535 MODULES = 128,
8536 GEOMETRY = 256,
8537 ICONTHEME = 512,
8538 PRINTING = 1024,
8539 BUILDER = 2048
8541 enum DeleteType {
8542 CHARS = 0,
8543 WORD_ENDS = 1,
8544 WORDS = 2,
8545 DISPLAY_LINES = 3,
8546 DISPLAY_LINE_ENDS = 4,
8547 PARAGRAPH_ENDS = 5,
8548 PARAGRAPHS = 6,
8549 WHITESPACE = 7
8551 enum DestDefaults {
8552 MOTION = 1,
8553 HIGHLIGHT = 2,
8554 DROP = 4,
8555 ALL = 7
8557 extern (C) alias void function (void* data) nothrow DestroyNotify;
8559 struct Dialog /* : Window */ {
8560 mixin Atk.ImplementorIface.__interface__;
8561 mixin Buildable.__interface__;
8562 alias window this;
8563 alias window super_;
8564 Window window;
8565 Widget* vbox, action_area;
8566 private Widget* separator;
8568 static Dialog* new_()() nothrow {
8569 return gtk_dialog_new();
8571 static auto opCall()() {
8572 return gtk_dialog_new();
8575 // Unintrospectable constructor: new_with_buttons() / gtk_dialog_new_with_buttons()
8576 // Creates a new #GtkDialog with title @title (or %NULL for the default
8577 // title; see gtk_window_set_title()) and transient parent @parent (or
8578 // %NULL for none; see gtk_window_set_transient_for()). The @flags
8579 // argument can be used to make the dialog modal (#GTK_DIALOG_MODAL)
8580 // and/or to have it destroyed along with its transient parent
8581 // (#GTK_DIALOG_DESTROY_WITH_PARENT). After @flags, button
8582 // text/response ID pairs should be listed, with a %NULL pointer ending
8583 // the list. Button text can be either a stock ID such as
8584 // #GTK_STOCK_OK, or some arbitrary text. A response ID can be
8585 // any positive number, or one of the values in the #GtkResponseType
8586 // enumeration. If the user clicks one of these dialog buttons,
8587 // #GtkDialog will emit the #GtkDialog::response signal with the corresponding
8588 // response ID. If a #GtkDialog receives the #GtkWidget::delete-event signal,
8589 // it will emit ::response with a response ID of #GTK_RESPONSE_DELETE_EVENT.
8590 // However, destroying a dialog does not emit the ::response signal;
8591 // so be careful relying on ::response when using the
8592 // #GTK_DIALOG_DESTROY_WITH_PARENT flag. Buttons are from left to right,
8593 // so the first button in the list will be the leftmost button in the dialog.
8595 // Here's a simple example:
8596 // |[
8597 // GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
8598 // main_app_window,
8599 // GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
8600 // GTK_STOCK_OK,
8601 // GTK_RESPONSE_ACCEPT,
8602 // GTK_STOCK_CANCEL,
8603 // GTK_RESPONSE_REJECT,
8604 // NULL);
8605 // ]|
8606 // RETURNS: a new #GtkDialog
8607 // <title>: Title of the dialog, or %NULL
8608 // <parent>: Transient parent of the dialog, or %NULL
8609 // <flags>: from #GtkDialogFlags
8610 // <first_button_text>: stock ID or text to go in first button, or %NULL
8611 alias gtk_dialog_new_with_buttons new_with_buttons; // Variadic
8613 // Adds an activatable widget to the action area of a #GtkDialog,
8614 // connecting a signal handler that will emit the #GtkDialog::response
8615 // signal on the dialog when the widget is activated. The widget is
8616 // appended to the end of the dialog's action area. If you want to add a
8617 // non-activatable widget, simply pack it into the @action_area field
8618 // of the #GtkDialog struct.
8619 // <child>: an activatable widget
8620 // <response_id>: response ID for @child
8621 void add_action_widget(AT0)(AT0 /*Widget*/ child, int response_id) nothrow {
8622 gtk_dialog_add_action_widget(&this, UpCast!(Widget*)(child), response_id);
8625 // Adds a button with the given text (or a stock button, if @button_text is a
8626 // stock ID) and sets things up so that clicking the button will emit the
8627 // #GtkDialog::response signal with the given @response_id. The button is
8628 // appended to the end of the dialog's action area. The button widget is
8629 // returned, but usually you don't need it.
8630 // RETURNS: the button widget that was added
8631 // <button_text>: text of button, or stock ID
8632 // <response_id>: response ID for the button
8633 Widget* add_button(AT0)(AT0 /*char*/ button_text, int response_id) nothrow {
8634 return gtk_dialog_add_button(&this, toCString!(char*)(button_text), response_id);
8637 // Unintrospectable method: add_buttons() / gtk_dialog_add_buttons()
8638 // Adds more buttons, same as calling gtk_dialog_add_button()
8639 // repeatedly. The variable argument list should be %NULL-terminated
8640 // as with gtk_dialog_new_with_buttons(). Each button must have both
8641 // text and response ID.
8642 // <first_button_text>: button text or stock ID
8643 /+ Not available -- variadic methods unsupported - use the C function directly.
8644 alias gtk_dialog_add_buttons add_buttons; // Variadic
8647 // VERSION: 2.14
8648 // Returns the action area of @dialog.
8649 // RETURNS: the action area.
8650 Widget* get_action_area()() nothrow {
8651 return gtk_dialog_get_action_area(&this);
8654 // VERSION: 2.14
8655 // Returns the content area of @dialog.
8656 // RETURNS: the content area #GtkVBox.
8657 Widget* get_content_area()() nothrow {
8658 return gtk_dialog_get_content_area(&this);
8661 // DEPRECATED (v2.22) method: get_has_separator - This function will be removed in GTK+ 3
8662 // Accessor for whether the dialog has a separator.
8663 // RETURNS: %TRUE if the dialog has a separator
8664 int get_has_separator()() nothrow {
8665 return gtk_dialog_get_has_separator(&this);
8668 // VERSION: 2.8
8669 // Gets the response id of a widget in the action area
8670 // of a dialog.
8672 // if @widget doesn't have a response id set.
8673 // RETURNS: the response id of @widget, or %GTK_RESPONSE_NONE
8674 // <widget>: a widget in the action area of @dialog
8675 int get_response_for_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
8676 return gtk_dialog_get_response_for_widget(&this, UpCast!(Widget*)(widget));
8679 // VERSION: 2.20
8680 // Gets the widget button that uses the given response ID in the action area
8681 // of a dialog.
8682 // RETURNS: the @widget button that uses the given @response_id, or %NULL.
8683 // <response_id>: the response ID used by the @dialog widget
8684 Widget* get_widget_for_response()(int response_id) nothrow {
8685 return gtk_dialog_get_widget_for_response(&this, response_id);
8688 // Emits the #GtkDialog::response signal with the given response ID.
8689 // Used to indicate that the user has responded to the dialog in some way;
8690 // typically either you or gtk_dialog_run() will be monitoring the
8691 // ::response signal and take appropriate action.
8692 // <response_id>: response ID
8693 void response()(int response_id) nothrow {
8694 gtk_dialog_response(&this, response_id);
8697 // Blocks in a recursive main loop until the @dialog either emits the
8698 // #GtkDialog::response signal, or is destroyed. If the dialog is
8699 // destroyed during the call to gtk_dialog_run(), gtk_dialog_run() returns
8700 // #GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the
8701 // ::response signal emission.
8703 // Before entering the recursive main loop, gtk_dialog_run() calls
8704 // gtk_widget_show() on the dialog for you. Note that you still
8705 // need to show any children of the dialog yourself.
8707 // During gtk_dialog_run(), the default behavior of #GtkWidget::delete-event
8708 // is disabled; if the dialog receives ::delete_event, it will not be
8709 // destroyed as windows usually are, and gtk_dialog_run() will return
8710 // #GTK_RESPONSE_DELETE_EVENT. Also, during gtk_dialog_run() the dialog
8711 // will be modal. You can force gtk_dialog_run() to return at any time by
8712 // calling gtk_dialog_response() to emit the ::response signal. Destroying
8713 // the dialog during gtk_dialog_run() is a very bad idea, because your
8714 // post-run code won't know whether the dialog was destroyed or not.
8716 // After gtk_dialog_run() returns, you are responsible for hiding or
8717 // destroying the dialog if you wish to do so.
8719 // Typical usage of this function might be:
8720 // |[
8721 // gint result = gtk_dialog_run (GTK_DIALOG (dialog));
8722 // switch (result)
8723 // {
8724 // case GTK_RESPONSE_ACCEPT:
8725 // do_application_specific_something ();
8726 // break;
8727 // default:
8728 // do_nothing_since_dialog_was_cancelled ();
8729 // break;
8730 // }
8731 // gtk_widget_destroy (dialog);
8732 // ]|
8734 // Note that even though the recursive main loop gives the effect of a
8735 // modal dialog (it prevents the user from interacting with other
8736 // windows in the same window group while the dialog is run), callbacks
8737 // such as timeouts, IO channel watches, DND drops, etc, <emphasis>will</emphasis>
8738 // be triggered during a gtk_dialog_run() call.
8739 // RETURNS: response ID
8740 int run()() nothrow {
8741 return gtk_dialog_run(&this);
8744 // Unintrospectable method: set_alternative_button_order() / gtk_dialog_set_alternative_button_order()
8745 // VERSION: 2.6
8746 // Sets an alternative button order. If the
8747 // #GtkSettings:gtk-alternative-button-order setting is set to %TRUE,
8748 // the dialog buttons are reordered according to the order of the
8749 // response ids passed to this function.
8751 // By default, GTK+ dialogs use the button order advocated by the Gnome
8752 // <ulink url="http://developer.gnome.org/projects/gup/hig/2.0/">Human
8753 // Interface Guidelines</ulink> with the affirmative button at the far
8754 // right, and the cancel button left of it. But the builtin GTK+ dialogs
8755 // and #GtkMessageDialog<!-- -->s do provide an alternative button order,
8756 // which is more suitable on some platforms, e.g. Windows.
8758 // Use this function after adding all the buttons to your dialog, as the
8759 // following example shows:
8760 // |[
8761 // cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
8762 // GTK_STOCK_CANCEL,
8763 // GTK_RESPONSE_CANCEL);
8765 // ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
8766 // GTK_STOCK_OK,
8767 // GTK_RESPONSE_OK);
8769 // gtk_widget_grab_default (ok_button);
8771 // help_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
8772 // GTK_STOCK_HELP,
8773 // GTK_RESPONSE_HELP);
8775 // gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
8776 // GTK_RESPONSE_OK,
8777 // GTK_RESPONSE_CANCEL,
8778 // GTK_RESPONSE_HELP,
8779 // -1);
8780 // ]|
8781 // <first_response_id>: a response id used by one @dialog's buttons
8782 /+ Not available -- variadic methods unsupported - use the C function directly.
8783 alias gtk_dialog_set_alternative_button_order set_alternative_button_order; // Variadic
8786 // VERSION: 2.6
8787 // Sets an alternative button order. If the
8788 // #GtkSettings:gtk-alternative-button-order setting is set to %TRUE,
8789 // the dialog buttons are reordered according to the order of the
8790 // response ids in @new_order.
8792 // See gtk_dialog_set_alternative_button_order() for more information.
8794 // This function is for use by language bindings.
8795 // <n_params>: the number of response ids in @new_order
8796 // <new_order>: an array of response ids of @dialog's buttons
8797 void set_alternative_button_order_from_array()(int n_params, int* new_order) nothrow {
8798 gtk_dialog_set_alternative_button_order_from_array(&this, n_params, new_order);
8801 // Sets the last widget in the dialog's action area with the given @response_id
8802 // as the default widget for the dialog. Pressing "Enter" normally activates
8803 // the default widget.
8804 // <response_id>: a response ID
8805 void set_default_response()(int response_id) nothrow {
8806 gtk_dialog_set_default_response(&this, response_id);
8809 // DEPRECATED (v2.22) method: set_has_separator - This function will be removed in GTK+ 3
8810 // Sets whether the dialog has a separator above the buttons.
8811 // <setting>: %TRUE to have a separator
8812 void set_has_separator()(int setting) nothrow {
8813 gtk_dialog_set_has_separator(&this, setting);
8816 // Calls <literal>gtk_widget_set_sensitive (widget, @setting)</literal>
8817 // for each widget in the dialog's action area with the given @response_id.
8818 // A convenient way to sensitize/desensitize dialog buttons.
8819 // <response_id>: a response ID
8820 // <setting>: %TRUE for sensitive
8821 void set_response_sensitive()(int response_id, int setting) nothrow {
8822 gtk_dialog_set_response_sensitive(&this, response_id, setting);
8825 // The ::close signal is a
8826 // <link linkend="keybinding-signals">keybinding signal</link>
8827 // which gets emitted when the user uses a keybinding to close
8828 // the dialog.
8830 // The default binding for this signal is the Escape key.
8831 extern (C) alias static void function (Dialog* this_, void* user_data=null) nothrow signal_close;
8833 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8834 return super_.signal_connect!name(cb, data, cf);
8837 ulong signal_connect(string name:"close", CB/*:signal_close*/)
8838 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
8839 if (is(typeof(cb)==signal_close)||_ttmm!(CB, signal_close)()) {
8840 return signal_connect_data!()(&this, cast(char*)"close",
8841 cast(GObject2.Callback)cb, data, null, cf);
8844 // Emitted when an action widget is clicked, the dialog receives a
8845 // delete event, or the application programmer calls gtk_dialog_response().
8846 // On a delete event, the response ID is #GTK_RESPONSE_DELETE_EVENT.
8847 // Otherwise, it depends on which action widget was clicked.
8848 // <response_id>: the response ID
8849 extern (C) alias static void function (Dialog* this_, int response_id, void* user_data=null) nothrow signal_response;
8850 ulong signal_connect(string name:"response", CB/*:signal_response*/)
8851 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
8852 if (is(typeof(cb)==signal_response)||_ttmm!(CB, signal_response)()) {
8853 return signal_connect_data!()(&this, cast(char*)"response",
8854 cast(GObject2.Callback)cb, data, null, cf);
8858 struct DialogClass {
8859 WindowClass parent_class;
8860 // <response_id>: response ID
8861 extern (C) void function (Dialog* dialog, int response_id) nothrow response;
8862 extern (C) void function (Dialog* dialog) nothrow close;
8863 extern (C) void function () nothrow _gtk_reserved1;
8864 extern (C) void function () nothrow _gtk_reserved2;
8865 extern (C) void function () nothrow _gtk_reserved3;
8866 extern (C) void function () nothrow _gtk_reserved4;
8869 enum DialogFlags {
8870 MODAL = 1,
8871 DESTROY_WITH_PARENT = 2,
8872 NO_SEPARATOR = 4
8874 enum DirectionType {
8875 TAB_FORWARD = 0,
8876 TAB_BACKWARD = 1,
8877 UP = 2,
8878 DOWN = 3,
8879 LEFT = 4,
8880 RIGHT = 5
8882 union DitherInfo {
8883 ushort[2] s;
8884 ubyte[4] c;
8887 enum DragResult {
8888 SUCCESS = 0,
8889 NO_TARGET = 1,
8890 USER_CANCELLED = 2,
8891 TIMEOUT_EXPIRED = 3,
8892 GRAB_BROKEN = 4,
8893 ERROR = 5
8895 struct DrawingArea /* : Widget */ {
8896 mixin Atk.ImplementorIface.__interface__;
8897 mixin Buildable.__interface__;
8898 alias widget this;
8899 alias widget super_;
8900 Widget widget;
8901 void* draw_data;
8903 static DrawingArea* new_()() nothrow {
8904 return gtk_drawing_area_new();
8906 static auto opCall()() {
8907 return gtk_drawing_area_new();
8909 void size()(int width, int height) nothrow {
8910 gtk_drawing_area_size(&this, width, height);
8914 struct DrawingAreaClass {
8915 WidgetClass parent_class;
8916 extern (C) void function () nothrow _gtk_reserved1;
8917 extern (C) void function () nothrow _gtk_reserved2;
8918 extern (C) void function () nothrow _gtk_reserved3;
8919 extern (C) void function () nothrow _gtk_reserved4;
8922 struct Editable /* Interface */ {
8923 mixin template __interface__() {
8924 // Copies the contents of the currently selected content in the editable and
8925 // puts it on the clipboard.
8926 void copy_clipboard()() nothrow {
8927 gtk_editable_copy_clipboard(cast(Editable*)&this);
8930 // Removes the contents of the currently selected content in the editable and
8931 // puts it on the clipboard.
8932 void cut_clipboard()() nothrow {
8933 gtk_editable_cut_clipboard(cast(Editable*)&this);
8936 // Deletes the currently selected text of the editable.
8937 // This call doesn't do anything if there is no selected text.
8938 void delete_selection()() nothrow {
8939 gtk_editable_delete_selection(cast(Editable*)&this);
8942 // Deletes a sequence of characters. The characters that are deleted are
8943 // those characters at positions from @start_pos up to, but not including
8944 // @end_pos. If @end_pos is negative, then the the characters deleted
8945 // are those from @start_pos to the end of the text.
8947 // Note that the positions are specified in characters, not bytes.
8948 // <start_pos>: start position
8949 // <end_pos>: end position
8950 void delete_text()(int start_pos, int end_pos) nothrow {
8951 gtk_editable_delete_text(cast(Editable*)&this, start_pos, end_pos);
8954 // Retrieves a sequence of characters. The characters that are retrieved
8955 // are those characters at positions from @start_pos up to, but not
8956 // including @end_pos. If @end_pos is negative, then the the characters
8957 // retrieved are those characters from @start_pos to the end of the text.
8959 // Note that positions are specified in characters, not bytes.
8961 // string. This string is allocated by the #GtkEditable
8962 // implementation and should be freed by the caller.
8963 // RETURNS: a pointer to the contents of the widget as a
8964 // <start_pos>: start of text
8965 // <end_pos>: end of text
8966 char* /*new*/ get_chars()(int start_pos, int end_pos) nothrow {
8967 return gtk_editable_get_chars(cast(Editable*)&this, start_pos, end_pos);
8970 // Retrieves whether @editable is editable. See
8971 // gtk_editable_set_editable().
8972 // RETURNS: %TRUE if @editable is editable.
8973 int get_editable()() nothrow {
8974 return gtk_editable_get_editable(cast(Editable*)&this);
8977 // Retrieves the current position of the cursor relative to the start
8978 // of the content of the editable.
8980 // Note that this position is in characters, not in bytes.
8981 // RETURNS: the cursor position
8982 int get_position()() nothrow {
8983 return gtk_editable_get_position(cast(Editable*)&this);
8986 // Retrieves the selection bound of the editable. start_pos will be filled
8987 // with the start of the selection and @end_pos with end. If no text was
8988 // selected both will be identical and %FALSE will be returned.
8990 // Note that positions are specified in characters, not bytes.
8991 // RETURNS: %TRUE if an area is selected, %FALSE otherwise
8992 // <start_pos>: location to store the starting position, or %NULL
8993 // <end_pos>: location to store the end position, or %NULL
8994 int get_selection_bounds()(/*out*/ int* start_pos=null, /*out*/ int* end_pos=null) nothrow {
8995 return gtk_editable_get_selection_bounds(cast(Editable*)&this, start_pos, end_pos);
8998 // Inserts @new_text_length bytes of @new_text into the contents of the
8999 // widget, at position @position.
9001 // Note that the position is in characters, not in bytes.
9002 // The function updates @position to point after the newly inserted text.
9003 // <new_text>: the text to append
9004 // <new_text_length>: the length of the text in bytes, or -1
9005 // <position>: location of the position text will be inserted at
9006 void insert_text(AT0)(AT0 /*char*/ new_text, int new_text_length, /*inout*/ int* position) nothrow {
9007 gtk_editable_insert_text(cast(Editable*)&this, toCString!(char*)(new_text), new_text_length, position);
9010 // Pastes the content of the clipboard to the current position of the
9011 // cursor in the editable.
9012 void paste_clipboard()() nothrow {
9013 gtk_editable_paste_clipboard(cast(Editable*)&this);
9016 // Selects a region of text. The characters that are selected are
9017 // those characters at positions from @start_pos up to, but not
9018 // including @end_pos. If @end_pos is negative, then the the
9019 // characters selected are those characters from @start_pos to
9020 // the end of the text.
9022 // Note that positions are specified in characters, not bytes.
9023 // <start_pos>: start of region
9024 // <end_pos>: end of region
9025 void select_region()(int start_pos, int end_pos) nothrow {
9026 gtk_editable_select_region(cast(Editable*)&this, start_pos, end_pos);
9029 // Determines if the user can edit the text in the editable
9030 // widget or not.
9031 // <is_editable>: %TRUE if the user is allowed to edit the text in the widget
9032 void set_editable()(int is_editable) nothrow {
9033 gtk_editable_set_editable(cast(Editable*)&this, is_editable);
9036 // Sets the cursor position in the editable to the given value.
9038 // The cursor is displayed before the character with the given (base 0)
9039 // index in the contents of the editable. The value must be less than or
9040 // equal to the number of characters in the editable. A value of -1
9041 // indicates that the position should be set after the last character
9042 // of the editable. Note that @position is in characters, not in bytes.
9043 // <position>: the position of the cursor
9044 void set_position()(int position) nothrow {
9045 gtk_editable_set_position(cast(Editable*)&this, position);
9048 // The ::changed signal is emitted at the end of a single
9049 // user-visible operation on the contents of the #GtkEditable.
9051 // E.g., a paste operation that replaces the contents of the
9052 // selection will cause only one signal emission (even though it
9053 // is implemented by first deleting the selection, then inserting
9054 // the new content, and may cause multiple ::notify::text signals
9055 // to be emitted).
9056 extern (C) alias static void function (Editable* this_, void* user_data=null) nothrow signal_changed;
9058 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9059 return super_.signal_connect!name(cb, data, cf);
9062 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
9063 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9064 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
9065 return signal_connect_data!()(&this, cast(char*)"changed",
9066 cast(GObject2.Callback)cb, data, null, cf);
9069 // This signal is emitted when text is deleted from
9070 // the widget by the user. The default handler for
9071 // this signal will normally be responsible for deleting
9072 // the text, so by connecting to this signal and then
9073 // stopping the signal with g_signal_stop_emission(), it
9074 // is possible to modify the range of deleted text, or
9075 // prevent it from being deleted entirely. The @start_pos
9076 // and @end_pos parameters are interpreted as for
9077 // gtk_editable_delete_text().
9078 // <start_pos>: the starting position
9079 // <end_pos>: the end position
9080 extern (C) alias static void function (Editable* this_, int start_pos, int end_pos, void* user_data=null) nothrow signal_delete_text;
9081 ulong signal_connect(string name:"delete-text", CB/*:signal_delete_text*/)
9082 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9083 if (is(typeof(cb)==signal_delete_text)||_ttmm!(CB, signal_delete_text)()) {
9084 return signal_connect_data!()(&this, cast(char*)"delete-text",
9085 cast(GObject2.Callback)cb, data, null, cf);
9088 // This signal is emitted when text is inserted into
9089 // the widget by the user. The default handler for
9090 // this signal will normally be responsible for inserting
9091 // the text, so by connecting to this signal and then
9092 // stopping the signal with g_signal_stop_emission(), it
9093 // is possible to modify the inserted text, or prevent
9094 // it from being inserted entirely.
9095 // <new_text>: the new text to insert
9096 // <new_text_length>: the length of the new text, in bytes, or -1 if new_text is nul-terminated
9097 // <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.
9098 extern (C) alias static void function (Editable* this_, char* new_text, int new_text_length, /*inout*/ int position, void* user_data=null) nothrow signal_insert_text;
9099 ulong signal_connect(string name:"insert-text", CB/*:signal_insert_text*/)
9100 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9101 if (is(typeof(cb)==signal_insert_text)||_ttmm!(CB, signal_insert_text)()) {
9102 return signal_connect_data!()(&this, cast(char*)"insert-text",
9103 cast(GObject2.Callback)cb, data, null, cf);
9106 mixin __interface__;
9109 struct EditableClass {
9110 GObject2.TypeInterface base_iface;
9111 extern (C) void function (Editable* editable, char* text, int length, int* position) nothrow insert_text;
9112 extern (C) void function (Editable* editable, int start_pos, int end_pos) nothrow delete_text;
9113 extern (C) void function (Editable* editable) nothrow changed;
9114 extern (C) void function (Editable* editable, char* text, int length, int* position) nothrow do_insert_text;
9115 extern (C) void function (Editable* editable, int start_pos, int end_pos) nothrow do_delete_text;
9116 extern (C) char* /*new*/ function (Editable* editable, int start_pos, int end_pos) nothrow get_chars;
9117 extern (C) void function (Editable* editable, int start_pos, int end_pos) nothrow set_selection_bounds;
9118 extern (C) int function (Editable* editable, int* start_pos, int* end_pos) nothrow get_selection_bounds;
9119 extern (C) void function (Editable* editable, int position) nothrow set_position;
9120 extern (C) int function (Editable* editable) nothrow get_position;
9123 struct Entry /* : Widget */ {
9124 mixin Atk.ImplementorIface.__interface__;
9125 mixin Buildable.__interface__;
9126 mixin CellEditable.__interface__;
9127 mixin Editable.__interface__;
9128 alias widget this;
9129 alias widget super_;
9130 Widget widget;
9131 char* text;
9132 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
9133 uint, "editable", 1,
9134 uint, "visible", 1,
9135 uint, "overwrite_mode", 1,
9136 uint, "in_drag", 1,
9137 uint, "__dummy32A", 28));
9138 ushort text_length, text_max_length;
9139 private Gdk2.Window* text_area;
9140 private IMContext* im_context;
9141 private Widget* popup_menu;
9142 private int current_pos, selection_bound;
9143 private Pango.Layout* cached_layout;
9144 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
9145 uint, "cache_includes_preedit", 1,
9146 uint, "need_im_reset", 1,
9147 uint, "has_frame", 1,
9148 uint, "activates_default", 1,
9149 uint, "cursor_visible", 1,
9150 uint, "in_click", 1,
9151 uint, "is_cell_renderer", 1,
9152 uint, "editing_canceled", 1,
9153 uint, "mouse_cursor_obscured", 1,
9154 uint, "select_words", 1,
9155 uint, "select_lines", 1,
9156 uint, "resolved_dir", 4,
9157 uint, "truncate_multiline", 1,
9158 uint, "__dummy32B", 16));
9159 private uint button, blink_timeout, recompute_idle;
9160 private int scroll_offset, ascent, descent;
9161 private ushort x_text_size, x_n_bytes, preedit_length, preedit_cursor;
9162 private int dnd_position, drag_start_x, drag_start_y;
9163 private dchar invisible_char;
9164 private int width_chars;
9167 // Creates a new entry.
9168 // RETURNS: a new #GtkEntry.
9169 static Entry* new_()() nothrow {
9170 return gtk_entry_new();
9172 static auto opCall()() {
9173 return gtk_entry_new();
9176 // VERSION: 2.18
9177 // Creates a new entry with the specified text buffer.
9178 // RETURNS: a new #GtkEntry
9179 // <buffer>: The buffer to use for the new #GtkEntry.
9180 static Entry* new_with_buffer(AT0)(AT0 /*EntryBuffer*/ buffer) nothrow {
9181 return gtk_entry_new_with_buffer(UpCast!(EntryBuffer*)(buffer));
9183 static auto opCall(AT0)(AT0 /*EntryBuffer*/ buffer) {
9184 return gtk_entry_new_with_buffer(UpCast!(EntryBuffer*)(buffer));
9187 // DEPRECATED (v2.0) constructor: new_with_max_length - Use gtk_entry_set_max_length() instead.
9188 // Creates a new #GtkEntry widget with the given maximum length.
9189 // RETURNS: a new #GtkEntry
9190 // <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.
9191 static Entry* new_with_max_length()(int max) nothrow {
9192 return gtk_entry_new_with_max_length(max);
9194 static auto opCall()(int max) {
9195 return gtk_entry_new_with_max_length(max);
9198 // DEPRECATED (v2.0) method: append_text - Use gtk_editable_insert_text() instead.
9199 // Appends the given text to the contents of the widget.
9200 // <text>: the text to append
9201 void append_text(AT0)(AT0 /*char*/ text) nothrow {
9202 gtk_entry_append_text(&this, toCString!(char*)(text));
9205 // Retrieves the value set by gtk_entry_set_activates_default().
9206 // RETURNS: %TRUE if the entry will activate the default widget
9207 int get_activates_default()() nothrow {
9208 return gtk_entry_get_activates_default(&this);
9211 // VERSION: 2.4
9212 // Gets the value set by gtk_entry_set_alignment().
9213 // RETURNS: the alignment
9214 float get_alignment()() nothrow {
9215 return gtk_entry_get_alignment(&this);
9218 // VERSION: 2.18
9219 // Get the #GtkEntryBuffer object which holds the text for
9220 // this widget.
9221 // RETURNS: A #GtkEntryBuffer object.
9222 EntryBuffer* get_buffer()() nothrow {
9223 return gtk_entry_get_buffer(&this);
9226 // VERSION: 2.4
9227 // Returns the auxiliary completion object currently in use by @entry.
9229 // in use by @entry.
9230 // RETURNS: The auxiliary completion object currently
9231 EntryCompletion* get_completion()() nothrow {
9232 return gtk_entry_get_completion(&this);
9235 // VERSION: 2.16
9236 // Returns the index of the icon which is the source of the current
9237 // DND operation, or -1.
9239 // This function is meant to be used in a #GtkWidget::drag-data-get
9240 // callback.
9242 // DND operation, or -1.
9243 // RETURNS: index of the icon which is the source of the current
9244 int get_current_icon_drag_source()() nothrow {
9245 return gtk_entry_get_current_icon_drag_source(&this);
9248 // VERSION: 2.12
9249 // Retrieves the horizontal cursor adjustment for the entry.
9250 // See gtk_entry_set_cursor_hadjustment().
9252 // if none has been set.
9253 // RETURNS: the horizontal cursor adjustment, or %NULL
9254 Adjustment* get_cursor_hadjustment()() nothrow {
9255 return gtk_entry_get_cursor_hadjustment(&this);
9258 // Gets the value set by gtk_entry_set_has_frame().
9259 // RETURNS: whether the entry has a beveled frame
9260 int get_has_frame()() nothrow {
9261 return gtk_entry_get_has_frame(&this);
9264 // VERSION: 2.16
9265 // Returns whether the icon is activatable.
9266 // RETURNS: %TRUE if the icon is activatable.
9267 // <icon_pos>: Icon position
9268 int get_icon_activatable()(EntryIconPosition icon_pos) nothrow {
9269 return gtk_entry_get_icon_activatable(&this, icon_pos);
9272 // VERSION: 2.16
9273 // Finds the icon at the given position and return its index.
9274 // If @x, @y doesn't lie inside an icon, -1 is returned.
9275 // This function is intended for use in a #GtkWidget::query-tooltip
9276 // signal handler.
9277 // RETURNS: the index of the icon at the given position, or -1
9278 // <x>: the x coordinate of the position to find
9279 // <y>: the y coordinate of the position to find
9280 int get_icon_at_pos()(int x, int y) nothrow {
9281 return gtk_entry_get_icon_at_pos(&this, x, y);
9284 // VERSION: 2.16
9285 // Retrieves the #GIcon used for the icon, or %NULL if there is
9286 // no icon or if the icon was set by some other method (e.g., by
9287 // stock, pixbuf, or icon name).
9289 // or if the icon is not a #GIcon
9290 // RETURNS: A #GIcon, or %NULL if no icon is set
9291 // <icon_pos>: Icon position
9292 Gio2.Icon* get_icon_gicon()(EntryIconPosition icon_pos) nothrow {
9293 return gtk_entry_get_icon_gicon(&this, icon_pos);
9296 // VERSION: 2.16
9297 // Retrieves the icon name used for the icon, or %NULL if there is
9298 // no icon or if the icon was set by some other method (e.g., by
9299 // pixbuf, stock or gicon).
9301 // wasn't set from an icon name
9302 // RETURNS: An icon name, or %NULL if no icon is set or if the icon
9303 // <icon_pos>: Icon position
9304 char* get_icon_name()(EntryIconPosition icon_pos) nothrow {
9305 return gtk_entry_get_icon_name(&this, icon_pos);
9308 // VERSION: 2.16
9309 // Retrieves the image used for the icon.
9311 // Unlike the other methods of setting and getting icon data, this
9312 // method will work regardless of whether the icon was set using a
9313 // #GdkPixbuf, a #GIcon, a stock item, or an icon name.
9315 // set for this position.
9316 // RETURNS: A #GdkPixbuf, or %NULL if no icon is
9317 // <icon_pos>: Icon position
9318 GdkPixbuf2.Pixbuf* get_icon_pixbuf()(EntryIconPosition icon_pos) nothrow {
9319 return gtk_entry_get_icon_pixbuf(&this, icon_pos);
9322 // VERSION: 2.16
9323 // Returns whether the icon appears sensitive or insensitive.
9324 // RETURNS: %TRUE if the icon is sensitive.
9325 // <icon_pos>: Icon position
9326 int get_icon_sensitive()(EntryIconPosition icon_pos) nothrow {
9327 return gtk_entry_get_icon_sensitive(&this, icon_pos);
9330 // VERSION: 2.16
9331 // Retrieves the stock id used for the icon, or %NULL if there is
9332 // no icon or if the icon was set by some other method (e.g., by
9333 // pixbuf, icon name or gicon).
9335 // wasn't set from a stock id
9336 // RETURNS: A stock id, or %NULL if no icon is set or if the icon
9337 // <icon_pos>: Icon position
9338 char* get_icon_stock()(EntryIconPosition icon_pos) nothrow {
9339 return gtk_entry_get_icon_stock(&this, icon_pos);
9342 // VERSION: 2.16
9343 // Gets the type of representation being used by the icon
9344 // to store image data. If the icon has no image data,
9345 // the return value will be %GTK_IMAGE_EMPTY.
9346 // RETURNS: image representation being used
9347 // <icon_pos>: Icon position
9348 ImageType get_icon_storage_type()(EntryIconPosition icon_pos) nothrow {
9349 return gtk_entry_get_icon_storage_type(&this, icon_pos);
9352 // VERSION: 2.16
9353 // Gets the contents of the tooltip on the icon at the specified
9354 // position in @entry.
9356 // with g_free() when done.
9357 // RETURNS: the tooltip text, or %NULL. Free the returned string
9358 // <icon_pos>: the icon position
9359 char* /*new*/ get_icon_tooltip_markup()(EntryIconPosition icon_pos) nothrow {
9360 return gtk_entry_get_icon_tooltip_markup(&this, icon_pos);
9363 // VERSION: 2.16
9364 // Gets the contents of the tooltip on the icon at the specified
9365 // position in @entry.
9367 // with g_free() when done.
9368 // RETURNS: the tooltip text, or %NULL. Free the returned string
9369 // <icon_pos>: the icon position
9370 char* /*new*/ get_icon_tooltip_text()(EntryIconPosition icon_pos) nothrow {
9371 return gtk_entry_get_icon_tooltip_text(&this, icon_pos);
9374 // VERSION: 2.20
9375 // Returns the #GdkWindow which contains the entry's icon at
9376 // @icon_pos. This function is useful when drawing something to the
9377 // entry in an expose-event callback because it enables the callback
9378 // to distinguish between the text window and entry's icon windows.
9380 // See also gtk_entry_get_text_window().
9382 // Note that GTK+ 3 does not have this function anymore; it has
9383 // been replaced by gtk_entry_get_icon_area().
9384 // RETURNS: the entry's icon window at @icon_pos.
9385 // <icon_pos>: Icon position
9386 Gdk2.Window* get_icon_window()(EntryIconPosition icon_pos) nothrow {
9387 return gtk_entry_get_icon_window(&this, icon_pos);
9390 // VERSION: 2.10
9391 // This function returns the entry's #GtkEntry:inner-border property. See
9392 // gtk_entry_set_inner_border() for more information.
9393 // RETURNS: the entry's #GtkBorder, or %NULL if none was set.
9394 Border* get_inner_border()() nothrow {
9395 return gtk_entry_get_inner_border(&this);
9398 // Retrieves the character displayed in place of the real characters
9399 // for entries with visibility set to false. See gtk_entry_set_invisible_char().
9401 // show invisible text at all.
9402 // RETURNS: the current invisible char, or 0, if the entry does not
9403 dchar get_invisible_char()() nothrow {
9404 return gtk_entry_get_invisible_char(&this);
9407 // Gets the #PangoLayout used to display the entry.
9408 // The layout is useful to e.g. convert text positions to
9409 // pixel positions, in combination with gtk_entry_get_layout_offsets().
9410 // The returned layout is owned by the entry and must not be
9411 // modified or freed by the caller.
9413 // Keep in mind that the layout text may contain a preedit string, so
9414 // gtk_entry_layout_index_to_text_index() and
9415 // gtk_entry_text_index_to_layout_index() are needed to convert byte
9416 // indices in the layout to byte indices in the entry contents.
9417 // RETURNS: the #PangoLayout for this entry
9418 Pango.Layout* get_layout()() nothrow {
9419 return gtk_entry_get_layout(&this);
9422 // Obtains the position of the #PangoLayout used to render text
9423 // in the entry, in widget coordinates. Useful if you want to line
9424 // up the text in an entry with some other text, e.g. when using the
9425 // entry to implement editable cells in a sheet widget.
9427 // Also useful to convert mouse events into coordinates inside the
9428 // #PangoLayout, e.g. to take some action if some part of the entry text
9429 // is clicked.
9431 // Note that as the user scrolls around in the entry the offsets will
9432 // change; you'll need to connect to the "notify::scroll-offset"
9433 // signal to track this. Remember when using the #PangoLayout
9434 // functions you need to convert to and from pixels using
9435 // PANGO_PIXELS() or #PANGO_SCALE.
9437 // Keep in mind that the layout text may contain a preedit string, so
9438 // gtk_entry_layout_index_to_text_index() and
9439 // gtk_entry_text_index_to_layout_index() are needed to convert byte
9440 // indices in the layout to byte indices in the entry contents.
9441 // <x>: location to store X offset of layout, or %NULL
9442 // <y>: location to store Y offset of layout, or %NULL
9443 void get_layout_offsets()(/*out*/ int* x=null, /*out*/ int* y=null) nothrow {
9444 gtk_entry_get_layout_offsets(&this, x, y);
9447 // Retrieves the maximum allowed length of the text in
9448 // @entry. See gtk_entry_set_max_length().
9450 // This is equivalent to:
9452 // <informalexample><programlisting>
9453 // gtk_entry_buffer_get_max_length (gtk_entry_get_buffer (entry));
9454 // </programlisting></informalexample>
9456 // in #GtkEntry, or 0 if there is no maximum.
9457 // RETURNS: the maximum allowed number of characters
9458 int get_max_length()() nothrow {
9459 return gtk_entry_get_max_length(&this);
9462 // VERSION: 2.14
9463 // Gets the value set by gtk_entry_set_overwrite_mode().
9464 // RETURNS: whether the text is overwritten when typing.
9465 int get_overwrite_mode()() nothrow {
9466 return gtk_entry_get_overwrite_mode(&this);
9469 // VERSION: 2.16
9470 // Returns the current fraction of the task that's been completed.
9471 // See gtk_entry_set_progress_fraction().
9472 // RETURNS: a fraction from 0.0 to 1.0
9473 double get_progress_fraction()() nothrow {
9474 return gtk_entry_get_progress_fraction(&this);
9477 // VERSION: 2.16
9478 // Retrieves the pulse step set with gtk_entry_set_progress_pulse_step().
9479 // RETURNS: a fraction from 0.0 to 1.0
9480 double get_progress_pulse_step()() nothrow {
9481 return gtk_entry_get_progress_pulse_step(&this);
9484 // Retrieves the contents of the entry widget.
9485 // See also gtk_editable_get_chars().
9487 // This is equivalent to:
9489 // <informalexample><programlisting>
9490 // gtk_entry_buffer_get_text (gtk_entry_get_buffer (entry));
9491 // </programlisting></informalexample>
9493 // string. This string points to internally allocated
9494 // storage in the widget and must not be freed, modified or
9495 // stored.
9496 // RETURNS: a pointer to the contents of the widget as a
9497 char* get_text()() nothrow {
9498 return gtk_entry_get_text(&this);
9501 // VERSION: 2.14
9502 // Retrieves the current length of the text in
9503 // @entry.
9505 // This is equivalent to:
9507 // <informalexample><programlisting>
9508 // gtk_entry_buffer_get_length (gtk_entry_get_buffer (entry));
9509 // </programlisting></informalexample>
9511 // in #GtkEntry, or 0 if there are none.
9512 // RETURNS: the current number of characters
9513 ushort get_text_length()() nothrow {
9514 return gtk_entry_get_text_length(&this);
9517 // VERSION: 2.20
9518 // Returns the #GdkWindow which contains the text. This function is
9519 // useful when drawing something to the entry in an expose-event
9520 // callback because it enables the callback to distinguish between
9521 // the text window and entry's icon windows.
9523 // See also gtk_entry_get_icon_window().
9525 // Note that GTK+ 3 does not have this function anymore; it has
9526 // been replaced by gtk_entry_get_text_area().
9527 // RETURNS: the entry's text window.
9528 Gdk2.Window* get_text_window()() nothrow {
9529 return gtk_entry_get_text_window(&this);
9532 // Retrieves whether the text in @entry is visible. See
9533 // gtk_entry_set_visibility().
9534 // RETURNS: %TRUE if the text is currently visible
9535 int get_visibility()() nothrow {
9536 return gtk_entry_get_visibility(&this);
9539 // Gets the value set by gtk_entry_set_width_chars().
9540 // RETURNS: number of chars to request space for, or negative if unset
9541 int get_width_chars()() nothrow {
9542 return gtk_entry_get_width_chars(&this);
9545 // VERSION: 2.22
9546 // Allow the #GtkEntry input method to internally handle key press
9547 // and release events. If this function returns %TRUE, then no further
9548 // processing should be done for this key event. See
9549 // gtk_im_context_filter_keypress().
9551 // Note that you are expected to call this function from your handler
9552 // when overriding key event handling. This is needed in the case when
9553 // you need to insert your own key handling between the input method
9554 // and the default key event handling of the #GtkEntry.
9555 // See gtk_text_view_reset_im_context() for an example of use.
9556 // RETURNS: %TRUE if the input method handled the key event.
9557 // <event>: the key event
9558 int im_context_filter_keypress(AT0)(AT0 /*Gdk2.EventKey*/ event) nothrow {
9559 return gtk_entry_im_context_filter_keypress(&this, UpCast!(Gdk2.EventKey*)(event));
9562 // Converts from a position in the entry contents (returned
9563 // by gtk_entry_get_text()) to a position in the
9564 // entry's #PangoLayout (returned by gtk_entry_get_layout(),
9565 // with text retrieved via pango_layout_get_text()).
9566 // RETURNS: byte index into the entry contents
9567 // <layout_index>: byte index into the entry layout text
9568 int layout_index_to_text_index()(int layout_index) nothrow {
9569 return gtk_entry_layout_index_to_text_index(&this, layout_index);
9572 // DEPRECATED (v2.0) method: prepend_text - Use gtk_editable_insert_text() instead.
9573 // Prepends the given text to the contents of the widget.
9574 // <text>: the text to prepend
9575 void prepend_text(AT0)(AT0 /*char*/ text) nothrow {
9576 gtk_entry_prepend_text(&this, toCString!(char*)(text));
9579 // VERSION: 2.16
9580 // Indicates that some progress is made, but you don't know how much.
9581 // Causes the entry's progress indicator to enter "activity mode,"
9582 // where a block bounces back and forth. Each call to
9583 // gtk_entry_progress_pulse() causes the block to move by a little bit
9584 // (the amount of movement per pulse is determined by
9585 // gtk_entry_set_progress_pulse_step()).
9586 void progress_pulse()() nothrow {
9587 gtk_entry_progress_pulse(&this);
9590 // VERSION: 2.22
9591 // Reset the input method context of the entry if needed.
9593 // This can be necessary in the case where modifying the buffer
9594 // would confuse on-going input method behavior.
9595 void reset_im_context()() nothrow {
9596 gtk_entry_reset_im_context(&this);
9599 // DEPRECATED (v2.0) method: select_region - Use gtk_editable_select_region() instead.
9600 // Selects a region of text. The characters that are selected are
9601 // those characters at positions from @start_pos up to, but not
9602 // including @end_pos. If @end_pos is negative, then the the characters
9603 // selected will be those characters from @start_pos to the end of
9604 // the text.
9605 // <start>: the starting position
9606 // <end>: the end position
9607 void select_region()(int start, int end) nothrow {
9608 gtk_entry_select_region(&this, start, end);
9611 // If @setting is %TRUE, pressing Enter in the @entry will activate the default
9612 // widget for the window containing the entry. This usually means that
9613 // the dialog box containing the entry will be closed, since the default
9614 // widget is usually one of the dialog buttons.
9616 // (For experts: if @setting is %TRUE, the entry calls
9617 // gtk_window_activate_default() on the window containing the entry, in
9618 // the default handler for the #GtkWidget::activate signal.)
9619 // <setting>: %TRUE to activate window's default widget on Enter keypress
9620 void set_activates_default()(int setting) nothrow {
9621 gtk_entry_set_activates_default(&this, setting);
9624 // VERSION: 2.4
9625 // Sets the alignment for the contents of the entry. This controls
9626 // the horizontal positioning of the contents when the displayed
9627 // text is shorter than the width of the entry.
9628 // <xalign>: The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts
9629 void set_alignment()(float xalign) nothrow {
9630 gtk_entry_set_alignment(&this, xalign);
9633 // VERSION: 2.18
9634 // Set the #GtkEntryBuffer object which holds the text for
9635 // this widget.
9636 // <buffer>: a #GtkEntryBuffer
9637 void set_buffer(AT0)(AT0 /*EntryBuffer*/ buffer) nothrow {
9638 gtk_entry_set_buffer(&this, UpCast!(EntryBuffer*)(buffer));
9641 // VERSION: 2.4
9642 // Sets @completion to be the auxiliary completion object to use with @entry.
9643 // All further configuration of the completion mechanism is done on
9644 // @completion using the #GtkEntryCompletion API. Completion is disabled if
9645 // @completion is set to %NULL.
9646 // <completion>: The #GtkEntryCompletion or %NULL
9647 void set_completion(AT0)(AT0 /*EntryCompletion*/ completion=null) nothrow {
9648 gtk_entry_set_completion(&this, UpCast!(EntryCompletion*)(completion));
9651 // VERSION: 2.12
9652 // Hooks up an adjustment to the cursor position in an entry, so that when
9653 // the cursor is moved, the adjustment is scrolled to show that position.
9654 // See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining
9655 // the adjustment.
9657 // The adjustment has to be in pixel units and in the same coordinate system
9658 // as the entry.
9659 // <adjustment>: an adjustment which should be adjusted when the cursor is moved, or %NULL
9660 void set_cursor_hadjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
9661 gtk_entry_set_cursor_hadjustment(&this, UpCast!(Adjustment*)(adjustment));
9664 // DEPRECATED (v2.0) method: set_editable - Use gtk_editable_set_editable() instead.
9665 // Determines if the user can edit the text in the editable
9666 // widget or not.
9667 // <editable>: %TRUE if the user is allowed to edit the text in the widget
9668 void set_editable()(int editable) nothrow {
9669 gtk_entry_set_editable(&this, editable);
9672 // Sets whether the entry has a beveled frame around it.
9673 // <setting>: new value
9674 void set_has_frame()(int setting) nothrow {
9675 gtk_entry_set_has_frame(&this, setting);
9678 // VERSION: 2.16
9679 // Sets whether the icon is activatable.
9680 // <icon_pos>: Icon position
9681 // <activatable>: %TRUE if the icon should be activatable
9682 void set_icon_activatable()(EntryIconPosition icon_pos, int activatable) nothrow {
9683 gtk_entry_set_icon_activatable(&this, icon_pos, activatable);
9686 // VERSION: 2.16
9687 // Sets up the icon at the given position so that GTK+ will start a drag
9688 // operation when the user clicks and drags the icon.
9690 // To handle the drag operation, you need to connect to the usual
9691 // #GtkWidget::drag-data-get (or possibly #GtkWidget::drag-data-delete)
9692 // signal, and use gtk_entry_get_current_icon_drag_source() in
9693 // your signal handler to find out if the drag was started from
9694 // an icon.
9696 // By default, GTK+ uses the icon as the drag icon. You can use the
9697 // #GtkWidget::drag-begin signal to set a different icon. Note that you
9698 // have to use g_signal_connect_after() to ensure that your signal handler
9699 // gets executed after the default handler.
9700 // <icon_pos>: icon position
9701 // <target_list>: the targets (data formats) in which the data can be provided
9702 // <actions>: a bitmask of the allowed drag actions
9703 void set_icon_drag_source(AT0)(EntryIconPosition icon_pos, AT0 /*TargetList*/ target_list, Gdk2.DragAction actions) nothrow {
9704 gtk_entry_set_icon_drag_source(&this, icon_pos, UpCast!(TargetList*)(target_list), actions);
9707 // VERSION: 2.16
9708 // Sets the icon shown in the entry at the specified position
9709 // from the current icon theme.
9710 // If the icon isn't known, a "broken image" icon will be displayed
9711 // instead.
9713 // If @icon is %NULL, no icon will be shown in the specified position.
9714 // <icon_pos>: The position at which to set the icon
9715 // <icon>: The icon to set, or %NULL
9716 void set_icon_from_gicon(AT0)(EntryIconPosition icon_pos, AT0 /*Gio2.Icon*/ icon=null) nothrow {
9717 gtk_entry_set_icon_from_gicon(&this, icon_pos, UpCast!(Gio2.Icon*)(icon));
9720 // VERSION: 2.16
9721 // Sets the icon shown in the entry at the specified position
9722 // from the current icon theme.
9724 // If the icon name isn't known, a "broken image" icon will be displayed
9725 // instead.
9727 // If @icon_name is %NULL, no icon will be shown in the specified position.
9728 // <icon_pos>: The position at which to set the icon
9729 // <icon_name>: An icon name, or %NULL
9730 void set_icon_from_icon_name(AT0)(EntryIconPosition icon_pos, AT0 /*char*/ icon_name=null) nothrow {
9731 gtk_entry_set_icon_from_icon_name(&this, icon_pos, toCString!(char*)(icon_name));
9734 // VERSION: 2.16
9735 // Sets the icon shown in the specified position using a pixbuf.
9737 // If @pixbuf is %NULL, no icon will be shown in the specified position.
9738 // <icon_pos>: Icon position
9739 // <pixbuf>: A #GdkPixbuf, or %NULL
9740 void set_icon_from_pixbuf(AT0)(EntryIconPosition icon_pos, AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) nothrow {
9741 gtk_entry_set_icon_from_pixbuf(&this, icon_pos, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
9744 // VERSION: 2.16
9745 // Sets the icon shown in the entry at the specified position from
9746 // a stock image.
9748 // If @stock_id is %NULL, no icon will be shown in the specified position.
9749 // <icon_pos>: Icon position
9750 // <stock_id>: The name of the stock item, or %NULL
9751 void set_icon_from_stock(AT0)(EntryIconPosition icon_pos, AT0 /*char*/ stock_id=null) nothrow {
9752 gtk_entry_set_icon_from_stock(&this, icon_pos, toCString!(char*)(stock_id));
9755 // VERSION: 2.16
9756 // Sets the sensitivity for the specified icon.
9757 // <icon_pos>: Icon position
9758 // <sensitive>: Specifies whether the icon should appear sensitive or insensitive
9759 void set_icon_sensitive()(EntryIconPosition icon_pos, int sensitive) nothrow {
9760 gtk_entry_set_icon_sensitive(&this, icon_pos, sensitive);
9763 // VERSION: 2.16
9764 // Sets @tooltip as the contents of the tooltip for the icon at
9765 // the specified position. @tooltip is assumed to be marked up with
9766 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
9768 // Use %NULL for @tooltip to remove an existing tooltip.
9770 // See also gtk_widget_set_tooltip_markup() and
9771 // gtk_enty_set_icon_tooltip_text().
9772 // <icon_pos>: the icon position
9773 // <tooltip>: the contents of the tooltip for the icon, or %NULL
9774 void set_icon_tooltip_markup(AT0)(EntryIconPosition icon_pos, AT0 /*char*/ tooltip=null) nothrow {
9775 gtk_entry_set_icon_tooltip_markup(&this, icon_pos, toCString!(char*)(tooltip));
9778 // VERSION: 2.16
9779 // Sets @tooltip as the contents of the tooltip for the icon
9780 // at the specified position.
9782 // Use %NULL for @tooltip to remove an existing tooltip.
9784 // See also gtk_widget_set_tooltip_text() and
9785 // gtk_entry_set_icon_tooltip_markup().
9786 // <icon_pos>: the icon position
9787 // <tooltip>: the contents of the tooltip for the icon, or %NULL
9788 void set_icon_tooltip_text(AT0)(EntryIconPosition icon_pos, AT0 /*char*/ tooltip=null) nothrow {
9789 gtk_entry_set_icon_tooltip_text(&this, icon_pos, toCString!(char*)(tooltip));
9792 // VERSION: 2.10
9793 // Sets %entry's inner-border property to %border, or clears it if %NULL
9794 // is passed. The inner-border is the area around the entry's text, but
9795 // inside its frame.
9797 // If set, this property overrides the inner-border style property.
9798 // Overriding the style-provided border is useful when you want to do
9799 // in-place editing of some text in a canvas or list widget, where
9800 // pixel-exact positioning of the entry is important.
9801 // <border>: a #GtkBorder, or %NULL
9802 void set_inner_border(AT0)(AT0 /*Border*/ border=null) nothrow {
9803 gtk_entry_set_inner_border(&this, UpCast!(Border*)(border));
9806 // Sets the character to use in place of the actual text when
9807 // gtk_entry_set_visibility() has been called to set text visibility
9808 // to %FALSE. i.e. this is the character used in "password mode" to
9809 // show the user how many characters have been typed. By default, GTK+
9810 // picks the best invisible char available in the current font. If you
9811 // set the invisible char to 0, then the user will get no feedback
9812 // at all; there will be no text on the screen as they type.
9813 // <ch>: a Unicode character
9814 void set_invisible_char()(dchar ch) nothrow {
9815 gtk_entry_set_invisible_char(&this, ch);
9818 // Sets the maximum allowed length of the contents of the widget. If
9819 // the current contents are longer than the given length, then they
9820 // will be truncated to fit.
9822 // This is equivalent to:
9824 // <informalexample><programlisting>
9825 // gtk_entry_buffer_set_max_length (gtk_entry_get_buffer (entry), max);
9826 // </programlisting></informalexample>
9827 // <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.
9828 void set_max_length()(int max) nothrow {
9829 gtk_entry_set_max_length(&this, max);
9832 // VERSION: 2.14
9833 // Sets whether the text is overwritten when typing in the #GtkEntry.
9834 // <overwrite>: new value
9835 void set_overwrite_mode()(int overwrite) nothrow {
9836 gtk_entry_set_overwrite_mode(&this, overwrite);
9839 // DEPRECATED (v2.0) method: set_position - Use gtk_editable_set_position() instead.
9840 // Sets the cursor position in an entry to the given value.
9841 // <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.
9842 void set_position()(int position) nothrow {
9843 gtk_entry_set_position(&this, position);
9846 // VERSION: 2.16
9847 // Causes the entry's progress indicator to "fill in" the given
9848 // fraction of the bar. The fraction should be between 0.0 and 1.0,
9849 // inclusive.
9850 // <fraction>: fraction of the task that's been completed
9851 void set_progress_fraction()(double fraction) nothrow {
9852 gtk_entry_set_progress_fraction(&this, fraction);
9855 // VERSION: 2.16
9856 // Sets the fraction of total entry width to move the progress
9857 // bouncing block for each call to gtk_entry_progress_pulse().
9858 // <fraction>: fraction between 0.0 and 1.0
9859 void set_progress_pulse_step()(double fraction) nothrow {
9860 gtk_entry_set_progress_pulse_step(&this, fraction);
9863 // Sets the text in the widget to the given
9864 // value, replacing the current contents.
9866 // See gtk_entry_buffer_set_text().
9867 // <text>: the new text
9868 void set_text(AT0)(AT0 /*char*/ text) nothrow {
9869 gtk_entry_set_text(&this, toCString!(char*)(text));
9872 // Sets whether the contents of the entry are visible or not.
9873 // When visibility is set to %FALSE, characters are displayed
9874 // as the invisible char, and will also appear that way when
9875 // the text in the entry widget is copied elsewhere.
9877 // By default, GTK+ picks the best invisible character available
9878 // in the current font, but it can be changed with
9879 // gtk_entry_set_invisible_char().
9880 // <visible>: %TRUE if the contents of the entry are displayed as plaintext
9881 void set_visibility()(int visible) nothrow {
9882 gtk_entry_set_visibility(&this, visible);
9885 // Changes the size request of the entry to be about the right size
9886 // for @n_chars characters. Note that it changes the size
9887 // <emphasis>request</emphasis>, the size can still be affected by
9888 // how you pack the widget into containers. If @n_chars is -1, the
9889 // size reverts to the default entry size.
9890 // <n_chars>: width in chars
9891 void set_width_chars()(int n_chars) nothrow {
9892 gtk_entry_set_width_chars(&this, n_chars);
9895 // Converts from a position in the entry's #PangoLayout (returned by
9896 // gtk_entry_get_layout()) to a position in the entry contents
9897 // (returned by gtk_entry_get_text()).
9898 // RETURNS: byte index into the entry layout text
9899 // <text_index>: byte index into the entry contents
9900 int text_index_to_layout_index()(int text_index) nothrow {
9901 return gtk_entry_text_index_to_layout_index(&this, text_index);
9904 // VERSION: 2.16
9905 // Unsets the invisible char previously set with
9906 // gtk_entry_set_invisible_char(). So that the
9907 // default invisible char is used again.
9908 void unset_invisible_char()() nothrow {
9909 gtk_entry_unset_invisible_char(&this);
9912 // A <link linkend="keybinding-signals">keybinding signal</link>
9913 // which gets emitted when the user activates the entry.
9915 // Applications should not connect to it, but may emit it with
9916 // g_signal_emit_by_name() if they need to control activation
9917 // programmatically.
9919 // The default bindings for this signal are all forms of the Enter key.
9920 extern (C) alias static void function (Entry* this_, void* user_data=null) nothrow signal_activate;
9922 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9923 return super_.signal_connect!name(cb, data, cf);
9926 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
9927 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9928 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
9929 return signal_connect_data!()(&this, cast(char*)"activate",
9930 cast(GObject2.Callback)cb, data, null, cf);
9933 // The ::backspace signal is a
9934 // <link linkend="keybinding-signals">keybinding signal</link>
9935 // which gets emitted when the user asks for it.
9937 // The default bindings for this signal are
9938 // Backspace and Shift-Backspace.
9939 extern (C) alias static void function (Entry* this_, void* user_data=null) nothrow signal_backspace;
9940 ulong signal_connect(string name:"backspace", CB/*:signal_backspace*/)
9941 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9942 if (is(typeof(cb)==signal_backspace)||_ttmm!(CB, signal_backspace)()) {
9943 return signal_connect_data!()(&this, cast(char*)"backspace",
9944 cast(GObject2.Callback)cb, data, null, cf);
9947 // The ::copy-clipboard signal is a
9948 // <link linkend="keybinding-signals">keybinding signal</link>
9949 // which gets emitted to copy the selection to the clipboard.
9951 // The default bindings for this signal are
9952 // Ctrl-c and Ctrl-Insert.
9953 extern (C) alias static void function (Entry* this_, void* user_data=null) nothrow signal_copy_clipboard;
9954 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)
9955 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9956 if (is(typeof(cb)==signal_copy_clipboard)||_ttmm!(CB, signal_copy_clipboard)()) {
9957 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
9958 cast(GObject2.Callback)cb, data, null, cf);
9961 // The ::cut-clipboard signal is a
9962 // <link linkend="keybinding-signals">keybinding signal</link>
9963 // which gets emitted to cut the selection to the clipboard.
9965 // The default bindings for this signal are
9966 // Ctrl-x and Shift-Delete.
9967 extern (C) alias static void function (Entry* this_, void* user_data=null) nothrow signal_cut_clipboard;
9968 ulong signal_connect(string name:"cut-clipboard", CB/*:signal_cut_clipboard*/)
9969 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9970 if (is(typeof(cb)==signal_cut_clipboard)||_ttmm!(CB, signal_cut_clipboard)()) {
9971 return signal_connect_data!()(&this, cast(char*)"cut-clipboard",
9972 cast(GObject2.Callback)cb, data, null, cf);
9975 // The ::delete-from-cursor signal is a
9976 // <link linkend="keybinding-signals">keybinding signal</link>
9977 // which gets emitted when the user initiates a text deletion.
9979 // If the @type is %GTK_DELETE_CHARS, GTK+ deletes the selection
9980 // if there is one, otherwise it deletes the requested number
9981 // of characters.
9983 // The default bindings for this signal are
9984 // Delete for deleting a character and Ctrl-Delete for
9985 // deleting a word.
9986 // <type>: the granularity of the deletion, as a #GtkDeleteType
9987 // <count>: the number of @type units to delete
9988 extern (C) alias static void function (Entry* this_, DeleteType* type, int count, void* user_data=null) nothrow signal_delete_from_cursor;
9989 ulong signal_connect(string name:"delete-from-cursor", CB/*:signal_delete_from_cursor*/)
9990 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
9991 if (is(typeof(cb)==signal_delete_from_cursor)||_ttmm!(CB, signal_delete_from_cursor)()) {
9992 return signal_connect_data!()(&this, cast(char*)"delete-from-cursor",
9993 cast(GObject2.Callback)cb, data, null, cf);
9996 // VERSION: 2.16
9997 // The ::icon-press signal is emitted when an activatable icon
9998 // is clicked.
9999 // <icon_pos>: The position of the clicked icon
10000 // <event>: the button press event
10001 extern (C) alias static void function (Entry* this_, EntryIconPosition* icon_pos, Gdk2.Event* event, void* user_data=null) nothrow signal_icon_press;
10002 ulong signal_connect(string name:"icon-press", CB/*:signal_icon_press*/)
10003 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10004 if (is(typeof(cb)==signal_icon_press)||_ttmm!(CB, signal_icon_press)()) {
10005 return signal_connect_data!()(&this, cast(char*)"icon-press",
10006 cast(GObject2.Callback)cb, data, null, cf);
10009 // VERSION: 2.16
10010 // The ::icon-release signal is emitted on the button release from a
10011 // mouse click over an activatable icon.
10012 // <icon_pos>: The position of the clicked icon
10013 // <event>: the button release event
10014 extern (C) alias static void function (Entry* this_, EntryIconPosition* icon_pos, Gdk2.Event* event, void* user_data=null) nothrow signal_icon_release;
10015 ulong signal_connect(string name:"icon-release", CB/*:signal_icon_release*/)
10016 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10017 if (is(typeof(cb)==signal_icon_release)||_ttmm!(CB, signal_icon_release)()) {
10018 return signal_connect_data!()(&this, cast(char*)"icon-release",
10019 cast(GObject2.Callback)cb, data, null, cf);
10022 // The ::insert-at-cursor signal is a
10023 // <link linkend="keybinding-signals">keybinding signal</link>
10024 // which gets emitted when the user initiates the insertion of a
10025 // fixed string at the cursor.
10027 // This signal has no default bindings.
10028 // <string>: the string to insert
10029 extern (C) alias static void function (Entry* this_, char* string_, void* user_data=null) nothrow signal_insert_at_cursor;
10030 ulong signal_connect(string name:"insert-at-cursor", CB/*:signal_insert_at_cursor*/)
10031 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10032 if (is(typeof(cb)==signal_insert_at_cursor)||_ttmm!(CB, signal_insert_at_cursor)()) {
10033 return signal_connect_data!()(&this, cast(char*)"insert-at-cursor",
10034 cast(GObject2.Callback)cb, data, null, cf);
10037 // The ::move-cursor signal is a
10038 // <link linkend="keybinding-signals">keybinding signal</link>
10039 // which gets emitted when the user initiates a cursor movement.
10040 // If the cursor is not visible in @entry, this signal causes
10041 // the viewport to be moved instead.
10043 // Applications should not connect to it, but may emit it with
10044 // g_signal_emit_by_name() if they need to control the cursor
10045 // programmatically.
10047 // The default bindings for this signal come in two variants,
10048 // the variant with the Shift modifier extends the selection,
10049 // the variant without the Shift modifer does not.
10050 // There are too many key combinations to list them all here.
10051 // <itemizedlist>
10052 // <listitem>Arrow keys move by individual characters/lines</listitem>
10053 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
10054 // <listitem>Home/End keys move to the ends of the buffer</listitem>
10055 // </itemizedlist>
10056 // <step>: the granularity of the move, as a #GtkMovementStep
10057 // <count>: the number of @step units to move
10058 // <extend_selection>: %TRUE if the move should extend the selection
10059 extern (C) alias static void function (Entry* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) nothrow signal_move_cursor;
10060 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)
10061 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10062 if (is(typeof(cb)==signal_move_cursor)||_ttmm!(CB, signal_move_cursor)()) {
10063 return signal_connect_data!()(&this, cast(char*)"move-cursor",
10064 cast(GObject2.Callback)cb, data, null, cf);
10067 // The ::paste-clipboard signal is a
10068 // <link linkend="keybinding-signals">keybinding signal</link>
10069 // which gets emitted to paste the contents of the clipboard
10070 // into the text view.
10072 // The default bindings for this signal are
10073 // Ctrl-v and Shift-Insert.
10074 extern (C) alias static void function (Entry* this_, void* user_data=null) nothrow signal_paste_clipboard;
10075 ulong signal_connect(string name:"paste-clipboard", CB/*:signal_paste_clipboard*/)
10076 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10077 if (is(typeof(cb)==signal_paste_clipboard)||_ttmm!(CB, signal_paste_clipboard)()) {
10078 return signal_connect_data!()(&this, cast(char*)"paste-clipboard",
10079 cast(GObject2.Callback)cb, data, null, cf);
10082 // The ::populate-popup signal gets emitted before showing the
10083 // context menu of the entry.
10085 // If you need to add items to the context menu, connect
10086 // to this signal and append your menuitems to the @menu.
10087 // <menu>: the menu that is being populated
10088 extern (C) alias static void function (Entry* this_, Menu* menu, void* user_data=null) nothrow signal_populate_popup;
10089 ulong signal_connect(string name:"populate-popup", CB/*:signal_populate_popup*/)
10090 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10091 if (is(typeof(cb)==signal_populate_popup)||_ttmm!(CB, signal_populate_popup)()) {
10092 return signal_connect_data!()(&this, cast(char*)"populate-popup",
10093 cast(GObject2.Callback)cb, data, null, cf);
10096 // VERSION: 2.20
10097 // If an input method is used, the typed text will not immediately
10098 // be committed to the buffer. So if you are interested in the text,
10099 // connect to this signal.
10100 // <preedit>: the current preedit string
10101 extern (C) alias static void function (Entry* this_, char* preedit, void* user_data=null) nothrow signal_preedit_changed;
10102 ulong signal_connect(string name:"preedit-changed", CB/*:signal_preedit_changed*/)
10103 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10104 if (is(typeof(cb)==signal_preedit_changed)||_ttmm!(CB, signal_preedit_changed)()) {
10105 return signal_connect_data!()(&this, cast(char*)"preedit-changed",
10106 cast(GObject2.Callback)cb, data, null, cf);
10109 // The ::toggle-overwrite signal is a
10110 // <link linkend="keybinding-signals">keybinding signal</link>
10111 // which gets emitted to toggle the overwrite mode of the entry.
10113 // The default bindings for this signal is Insert.
10114 extern (C) alias static void function (Entry* this_, void* user_data=null) nothrow signal_toggle_overwrite;
10115 ulong signal_connect(string name:"toggle-overwrite", CB/*:signal_toggle_overwrite*/)
10116 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10117 if (is(typeof(cb)==signal_toggle_overwrite)||_ttmm!(CB, signal_toggle_overwrite)()) {
10118 return signal_connect_data!()(&this, cast(char*)"toggle-overwrite",
10119 cast(GObject2.Callback)cb, data, null, cf);
10124 // The #GtkEntryBuffer class contains the actual text displayed in a
10125 // #GtkEntry widget.
10127 // A single #GtkEntryBuffer object can be shared by multiple #GtkEntry
10128 // widgets which will then share the same text content, but not the cursor
10129 // position, visibility attributes, icon etc.
10131 // #GtkEntryBuffer may be derived from. Such a derived class might allow
10132 // text to be stored in an alternate location, such as non-pageable memory,
10133 // useful in the case of important passwords. Or a derived class could
10134 // integrate with an application's concept of undo/redo.
10135 struct EntryBuffer /* : GObject.Object */ {
10136 alias parent_instance this;
10137 alias parent_instance super_;
10138 alias parent_instance object;
10139 GObject2.Object parent_instance;
10140 private EntryBufferPrivate* priv;
10143 // VERSION: 2.18
10144 // Create a new GtkEntryBuffer object.
10146 // Optionally, specify initial text to set in the buffer.
10147 // RETURNS: A new GtkEntryBuffer object.
10148 // <initial_chars>: initial buffer text, or %NULL
10149 // <n_initial_chars>: number of characters in @initial_chars, or -1
10150 static EntryBuffer* /*new*/ new_(AT0)(AT0 /*char*/ initial_chars, int n_initial_chars) nothrow {
10151 return gtk_entry_buffer_new(toCString!(char*)(initial_chars), n_initial_chars);
10153 static auto opCall(AT0)(AT0 /*char*/ initial_chars, int n_initial_chars) {
10154 return gtk_entry_buffer_new(toCString!(char*)(initial_chars), n_initial_chars);
10157 // VERSION: 2.18
10158 // Deletes a sequence of characters from the buffer. @n_chars characters are
10159 // deleted starting at @position. If @n_chars is negative, then all characters
10160 // until the end of the text are deleted.
10162 // If @position or @n_chars are out of bounds, then they are coerced to sane
10163 // values.
10165 // Note that the positions are specified in characters, not bytes.
10166 // RETURNS: The number of characters deleted.
10167 // <position>: position at which to delete text
10168 // <n_chars>: number of characters to delete
10169 uint delete_text()(uint position, int n_chars) nothrow {
10170 return gtk_entry_buffer_delete_text(&this, position, n_chars);
10173 // VERSION: 2.18
10174 // Used when subclassing #GtkEntryBuffer
10175 // <position>: position at which text was deleted
10176 // <n_chars>: number of characters deleted
10177 void emit_deleted_text()(uint position, uint n_chars) nothrow {
10178 gtk_entry_buffer_emit_deleted_text(&this, position, n_chars);
10181 // VERSION: 2.18
10182 // Used when subclassing #GtkEntryBuffer
10183 // <position>: position at which text was inserted
10184 // <chars>: text that was inserted
10185 // <n_chars>: number of characters inserted
10186 void emit_inserted_text(AT0)(uint position, AT0 /*char*/ chars, uint n_chars) nothrow {
10187 gtk_entry_buffer_emit_inserted_text(&this, position, toCString!(char*)(chars), n_chars);
10190 // VERSION: 2.18
10191 // Retrieves the length in bytes of the buffer.
10192 // See gtk_entry_buffer_get_length().
10193 // RETURNS: The byte length of the buffer.
10194 size_t get_bytes()() nothrow {
10195 return gtk_entry_buffer_get_bytes(&this);
10198 // VERSION: 2.18
10199 // Retrieves the length in characters of the buffer.
10200 // RETURNS: The number of characters in the buffer.
10201 uint get_length()() nothrow {
10202 return gtk_entry_buffer_get_length(&this);
10205 // VERSION: 2.18
10206 // Retrieves the maximum allowed length of the text in
10207 // @buffer. See gtk_entry_buffer_set_max_length().
10209 // in #GtkEntryBuffer, or 0 if there is no maximum.
10210 // RETURNS: the maximum allowed number of characters
10211 int get_max_length()() nothrow {
10212 return gtk_entry_buffer_get_max_length(&this);
10215 // VERSION: 2.18
10216 // Retrieves the contents of the buffer.
10218 // The memory pointer returned by this call will not change
10219 // unless this object emits a signal, or is finalized.
10221 // string. This string points to internally allocated
10222 // storage in the buffer and must not be freed, modified or
10223 // stored.
10224 // RETURNS: a pointer to the contents of the widget as a
10225 char* get_text()() nothrow {
10226 return gtk_entry_buffer_get_text(&this);
10229 // VERSION: 2.18
10230 // Inserts @n_chars characters of @chars into the contents of the
10231 // buffer, at position @position.
10233 // If @n_chars is negative, then characters from chars will be inserted
10234 // until a null-terminator is found. If @position or @n_chars are out of
10235 // bounds, or the maximum buffer text length is exceeded, then they are
10236 // coerced to sane values.
10238 // Note that the position and length are in characters, not in bytes.
10239 // RETURNS: The number of characters actually inserted.
10240 // <position>: the position at which to insert text.
10241 // <chars>: the text to insert into the buffer.
10242 // <n_chars>: the length of the text in characters, or -1
10243 uint insert_text(AT0)(uint position, AT0 /*char*/ chars, int n_chars) nothrow {
10244 return gtk_entry_buffer_insert_text(&this, position, toCString!(char*)(chars), n_chars);
10247 // VERSION: 2.18
10248 // Sets the maximum allowed length of the contents of the buffer. If
10249 // the current contents are longer than the given length, then they
10250 // will be truncated to fit.
10251 // <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.
10252 void set_max_length()(int max_length) nothrow {
10253 gtk_entry_buffer_set_max_length(&this, max_length);
10256 // VERSION: 2.18
10257 // Sets the text in the buffer.
10259 // This is roughly equivalent to calling gtk_entry_buffer_delete_text()
10260 // and gtk_entry_buffer_insert_text().
10262 // Note that @n_chars is in characters, not in bytes.
10263 // <chars>: the new text
10264 // <n_chars>: the number of characters in @text, or -1
10265 void set_text(AT0)(AT0 /*char*/ chars, int n_chars) nothrow {
10266 gtk_entry_buffer_set_text(&this, toCString!(char*)(chars), n_chars);
10269 // VERSION: 2.18
10270 // This signal is emitted after text is deleted from the buffer.
10271 // <position>: the position the text was deleted at.
10272 // <n_chars>: The number of characters that were deleted.
10273 extern (C) alias static void function (EntryBuffer* this_, c_uint position, c_uint n_chars, void* user_data=null) nothrow signal_deleted_text;
10275 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10276 return super_.signal_connect!name(cb, data, cf);
10279 ulong signal_connect(string name:"deleted-text", CB/*:signal_deleted_text*/)
10280 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10281 if (is(typeof(cb)==signal_deleted_text)||_ttmm!(CB, signal_deleted_text)()) {
10282 return signal_connect_data!()(&this, cast(char*)"deleted-text",
10283 cast(GObject2.Callback)cb, data, null, cf);
10286 // VERSION: 2.18
10287 // This signal is emitted after text is inserted into the buffer.
10288 // <position>: the position the text was inserted at.
10289 // <chars>: The text that was inserted.
10290 // <n_chars>: The number of characters that were inserted.
10291 extern (C) alias static void function (EntryBuffer* this_, c_uint position, char* chars, c_uint n_chars, void* user_data=null) nothrow signal_inserted_text;
10292 ulong signal_connect(string name:"inserted-text", CB/*:signal_inserted_text*/)
10293 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10294 if (is(typeof(cb)==signal_inserted_text)||_ttmm!(CB, signal_inserted_text)()) {
10295 return signal_connect_data!()(&this, cast(char*)"inserted-text",
10296 cast(GObject2.Callback)cb, data, null, cf);
10300 struct EntryBufferClass {
10301 GObject2.ObjectClass parent_class;
10302 extern (C) void function (EntryBuffer* buffer, uint position, char* chars, uint n_chars) nothrow inserted_text;
10303 extern (C) void function (EntryBuffer* buffer, uint position, uint n_chars) nothrow deleted_text;
10304 extern (C) char* function (EntryBuffer* buffer, size_t* n_bytes) nothrow get_text;
10305 // RETURNS: The number of characters in the buffer.
10306 extern (C) uint function (EntryBuffer* buffer) nothrow get_length;
10308 // RETURNS: The number of characters actually inserted.
10309 // <position>: the position at which to insert text.
10310 // <chars>: the text to insert into the buffer.
10311 // <n_chars>: the length of the text in characters, or -1
10312 extern (C) uint function (EntryBuffer* buffer, uint position, char* chars, uint n_chars) nothrow insert_text;
10314 // RETURNS: The number of characters deleted.
10315 // <position>: position at which to delete text
10316 // <n_chars>: number of characters to delete
10317 extern (C) uint function (EntryBuffer* buffer, uint position, uint n_chars) nothrow delete_text;
10318 extern (C) void function () nothrow _gtk_reserved0;
10319 extern (C) void function () nothrow _gtk_reserved1;
10320 extern (C) void function () nothrow _gtk_reserved2;
10321 extern (C) void function () nothrow _gtk_reserved3;
10322 extern (C) void function () nothrow _gtk_reserved4;
10323 extern (C) void function () nothrow _gtk_reserved5;
10326 struct EntryBufferPrivate {
10329 struct EntryClass {
10330 WidgetClass parent_class;
10331 extern (C) void function (Entry* entry, Menu* menu) nothrow populate_popup;
10332 extern (C) void function (Entry* entry) nothrow activate;
10333 extern (C) void function (Entry* entry, MovementStep step, int count, int extend_selection) nothrow move_cursor;
10334 extern (C) void function (Entry* entry, char* str) nothrow insert_at_cursor;
10335 extern (C) void function (Entry* entry, DeleteType type, int count) nothrow delete_from_cursor;
10336 extern (C) void function (Entry* entry) nothrow backspace;
10337 extern (C) void function (Entry* entry) nothrow cut_clipboard;
10338 extern (C) void function (Entry* entry) nothrow copy_clipboard;
10339 extern (C) void function (Entry* entry) nothrow paste_clipboard;
10340 extern (C) void function (Entry* entry) nothrow toggle_overwrite;
10341 extern (C) void function (Entry* entry, int* x, int* y, int* width, int* height) nothrow get_text_area_size;
10342 extern (C) void function () nothrow _gtk_reserved1;
10343 extern (C) void function () nothrow _gtk_reserved2;
10346 struct EntryCompletion /* : GObject.Object */ {
10347 mixin Buildable.__interface__;
10348 mixin CellLayout.__interface__;
10349 alias parent_instance this;
10350 alias parent_instance super_;
10351 alias parent_instance object;
10352 GObject2.Object parent_instance;
10353 private EntryCompletionPrivate* priv;
10356 // VERSION: 2.4
10357 // Creates a new #GtkEntryCompletion object.
10358 // RETURNS: A newly created #GtkEntryCompletion object.
10359 static EntryCompletion* /*new*/ new_()() nothrow {
10360 return gtk_entry_completion_new();
10362 static auto opCall()() {
10363 return gtk_entry_completion_new();
10366 // VERSION: 2.4
10367 // Requests a completion operation, or in other words a refiltering of the
10368 // current list with completions, using the current key. The completion list
10369 // view will be updated accordingly.
10370 void complete()() nothrow {
10371 gtk_entry_completion_complete(&this);
10374 // VERSION: 2.4
10375 // Deletes the action at @index_ from @completion's action list.
10376 // <index_>: The index of the item to Delete.
10377 void delete_action()(int index_) nothrow {
10378 gtk_entry_completion_delete_action(&this, index_);
10381 // VERSION: 2.12
10382 // Get the original text entered by the user that triggered
10383 // the completion or %NULL if there's no completion ongoing.
10384 // RETURNS: the prefix for the current completion
10385 char* get_completion_prefix()() nothrow {
10386 return gtk_entry_completion_get_completion_prefix(&this);
10389 // VERSION: 2.4
10390 // Gets the entry @completion has been attached to.
10391 // RETURNS: The entry @completion has been attached to.
10392 Widget* get_entry()() nothrow {
10393 return gtk_entry_completion_get_entry(&this);
10396 // VERSION: 2.6
10397 // Returns whether the common prefix of the possible completions should
10398 // be automatically inserted in the entry.
10399 // RETURNS: %TRUE if inline completion is turned on
10400 int get_inline_completion()() nothrow {
10401 return gtk_entry_completion_get_inline_completion(&this);
10404 // VERSION: 2.12
10405 // Returns %TRUE if inline-selection mode is turned on.
10406 // RETURNS: %TRUE if inline-selection mode is on
10407 int get_inline_selection()() nothrow {
10408 return gtk_entry_completion_get_inline_selection(&this);
10411 // VERSION: 2.4
10412 // Returns the minimum key length as set for @completion.
10413 // RETURNS: The currently used minimum key length.
10414 int get_minimum_key_length()() nothrow {
10415 return gtk_entry_completion_get_minimum_key_length(&this);
10418 // VERSION: 2.4
10419 // Returns the model the #GtkEntryCompletion is using as data source.
10420 // Returns %NULL if the model is unset.
10422 // is currently being used.
10423 // RETURNS: A #GtkTreeModel, or %NULL if none
10424 TreeModel* get_model()() nothrow {
10425 return gtk_entry_completion_get_model(&this);
10428 // VERSION: 2.6
10429 // Returns whether the completions should be presented in a popup window.
10430 // RETURNS: %TRUE if popup completion is turned on
10431 int get_popup_completion()() nothrow {
10432 return gtk_entry_completion_get_popup_completion(&this);
10435 // VERSION: 2.8
10436 // Returns whether the completion popup window will be resized to the
10437 // width of the entry.
10439 // the entry
10440 // RETURNS: %TRUE if the popup window will be resized to the width of
10441 int get_popup_set_width()() nothrow {
10442 return gtk_entry_completion_get_popup_set_width(&this);
10445 // VERSION: 2.8
10446 // Returns whether the completion popup window will appear even if there is
10447 // only a single match.
10449 // number of matches.
10450 // RETURNS: %TRUE if the popup window will appear regardless of the
10451 int get_popup_single_match()() nothrow {
10452 return gtk_entry_completion_get_popup_single_match(&this);
10455 // VERSION: 2.6
10456 // Returns the column in the model of @completion to get strings from.
10457 // RETURNS: the column containing the strings
10458 int get_text_column()() nothrow {
10459 return gtk_entry_completion_get_text_column(&this);
10462 // VERSION: 2.4
10463 // Inserts an action in @completion's action item list at position @index_
10464 // with markup @markup.
10465 // <index_>: The index of the item to insert.
10466 // <markup>: Markup of the item to insert.
10467 void insert_action_markup(AT0)(int index_, AT0 /*char*/ markup) nothrow {
10468 gtk_entry_completion_insert_action_markup(&this, index_, toCString!(char*)(markup));
10471 // VERSION: 2.4
10472 // Inserts an action in @completion's action item list at position @index_
10473 // with text @text. If you want the action item to have markup, use
10474 // gtk_entry_completion_insert_action_markup().
10475 // <index_>: The index of the item to insert.
10476 // <text>: Text of the item to insert.
10477 void insert_action_text(AT0)(int index_, AT0 /*char*/ text) nothrow {
10478 gtk_entry_completion_insert_action_text(&this, index_, toCString!(char*)(text));
10481 // VERSION: 2.6
10482 // Requests a prefix insertion.
10483 void insert_prefix()() nothrow {
10484 gtk_entry_completion_insert_prefix(&this);
10487 // VERSION: 2.6
10488 // Sets whether the common prefix of the possible completions should
10489 // be automatically inserted in the entry.
10490 // <inline_completion>: %TRUE to do inline completion
10491 void set_inline_completion()(int inline_completion) nothrow {
10492 gtk_entry_completion_set_inline_completion(&this, inline_completion);
10495 // VERSION: 2.12
10496 // Sets whether it is possible to cycle through the possible completions
10497 // inside the entry.
10498 // <inline_selection>: %TRUE to do inline selection
10499 void set_inline_selection()(int inline_selection) nothrow {
10500 gtk_entry_completion_set_inline_selection(&this, inline_selection);
10503 // VERSION: 2.4
10504 // Sets the match function for @completion to be @func. The match function
10505 // is used to determine if a row should or should not be in the completion
10506 // list.
10507 // <func>: The #GtkEntryCompletionMatchFunc to use.
10508 // <func_data>: The user data for @func.
10509 // <func_notify>: Destroy notifier for @func_data.
10510 void set_match_func(AT0)(EntryCompletionMatchFunc func, AT0 /*void*/ func_data, GLib2.DestroyNotify func_notify) nothrow {
10511 gtk_entry_completion_set_match_func(&this, func, UpCast!(void*)(func_data), func_notify);
10514 // VERSION: 2.4
10515 // Requires the length of the search key for @completion to be at least
10516 // @length. This is useful for long lists, where completing using a small
10517 // key takes a lot of time and will come up with meaningless results anyway
10518 // (ie, a too large dataset).
10519 // <length>: The minimum length of the key in order to start completing.
10520 void set_minimum_key_length()(int length) nothrow {
10521 gtk_entry_completion_set_minimum_key_length(&this, length);
10524 // VERSION: 2.4
10525 // Sets the model for a #GtkEntryCompletion. If @completion already has
10526 // a model set, it will remove it before setting the new model.
10527 // If model is %NULL, then it will unset the model.
10528 // <model>: The #GtkTreeModel.
10529 void set_model(AT0)(AT0 /*TreeModel*/ model=null) nothrow {
10530 gtk_entry_completion_set_model(&this, UpCast!(TreeModel*)(model));
10533 // VERSION: 2.6
10534 // Sets whether the completions should be presented in a popup window.
10535 // <popup_completion>: %TRUE to do popup completion
10536 void set_popup_completion()(int popup_completion) nothrow {
10537 gtk_entry_completion_set_popup_completion(&this, popup_completion);
10540 // VERSION: 2.8
10541 // Sets whether the completion popup window will be resized to be the same
10542 // width as the entry.
10543 // <popup_set_width>: %TRUE to make the width of the popup the same as the entry
10544 void set_popup_set_width()(int popup_set_width) nothrow {
10545 gtk_entry_completion_set_popup_set_width(&this, popup_set_width);
10548 // VERSION: 2.8
10549 // Sets whether the completion popup window will appear even if there is
10550 // only a single match. You may want to set this to %FALSE if you
10551 // are using <link linkend="GtkEntryCompletion--inline-completion">inline
10552 // completion</link>.
10553 // <popup_single_match>: %TRUE if the popup should appear even for a single match
10554 void set_popup_single_match()(int popup_single_match) nothrow {
10555 gtk_entry_completion_set_popup_single_match(&this, popup_single_match);
10558 // VERSION: 2.4
10559 // Convenience function for setting up the most used case of this code: a
10560 // completion list with just strings. This function will set up @completion
10561 // to have a list displaying all (and just) strings in the completion list,
10562 // and to get those strings from @column in the model of @completion.
10564 // This functions creates and adds a #GtkCellRendererText for the selected
10565 // column. If you need to set the text column, but don't want the cell
10566 // renderer, use g_object_set() to set the ::text_column property directly.
10567 // <column>: The column in the model of @completion to get strings from.
10568 void set_text_column()(int column) nothrow {
10569 gtk_entry_completion_set_text_column(&this, column);
10572 // VERSION: 2.4
10573 // Gets emitted when an action is activated.
10574 // <index>: the index of the activated action
10575 extern (C) alias static void function (EntryCompletion* this_, int index, void* user_data=null) nothrow signal_action_activated;
10577 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10578 return super_.signal_connect!name(cb, data, cf);
10581 ulong signal_connect(string name:"action-activated", CB/*:signal_action_activated*/)
10582 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10583 if (is(typeof(cb)==signal_action_activated)||_ttmm!(CB, signal_action_activated)()) {
10584 return signal_connect_data!()(&this, cast(char*)"action-activated",
10585 cast(GObject2.Callback)cb, data, null, cf);
10588 // VERSION: 2.12
10589 // Gets emitted when a match from the cursor is on a match
10590 // of the list.The default behaviour is to replace the contents
10591 // of the entry with the contents of the text column in the row
10592 // pointed to by @iter.
10593 // RETURNS: %TRUE if the signal has been handled
10594 // <model>: the #GtkTreeModel containing the matches
10595 // <iter>: a #GtkTreeIter positioned at the selected match
10596 extern (C) alias static c_int function (EntryCompletion* this_, TreeModel* model, TreeIter* iter, void* user_data=null) nothrow signal_cursor_on_match;
10597 ulong signal_connect(string name:"cursor-on-match", CB/*:signal_cursor_on_match*/)
10598 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10599 if (is(typeof(cb)==signal_cursor_on_match)||_ttmm!(CB, signal_cursor_on_match)()) {
10600 return signal_connect_data!()(&this, cast(char*)"cursor-on-match",
10601 cast(GObject2.Callback)cb, data, null, cf);
10604 // VERSION: 2.6
10605 // Gets emitted when the inline autocompletion is triggered.
10606 // The default behaviour is to make the entry display the
10607 // whole prefix and select the newly inserted part.
10609 // Applications may connect to this signal in order to insert only a
10610 // smaller part of the @prefix into the entry - e.g. the entry used in
10611 // the #GtkFileChooser inserts only the part of the prefix up to the
10612 // next '/'.
10613 // RETURNS: %TRUE if the signal has been handled
10614 // <prefix>: the common prefix of all possible completions
10615 extern (C) alias static c_int function (EntryCompletion* this_, char* prefix, void* user_data=null) nothrow signal_insert_prefix;
10616 ulong signal_connect(string name:"insert-prefix", CB/*:signal_insert_prefix*/)
10617 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10618 if (is(typeof(cb)==signal_insert_prefix)||_ttmm!(CB, signal_insert_prefix)()) {
10619 return signal_connect_data!()(&this, cast(char*)"insert-prefix",
10620 cast(GObject2.Callback)cb, data, null, cf);
10623 // VERSION: 2.4
10624 // Gets emitted when a match from the list is selected.
10625 // The default behaviour is to replace the contents of the
10626 // entry with the contents of the text column in the row
10627 // pointed to by @iter.
10628 // RETURNS: %TRUE if the signal has been handled
10629 // <model>: the #GtkTreeModel containing the matches
10630 // <iter>: a #GtkTreeIter positioned at the selected match
10631 extern (C) alias static c_int function (EntryCompletion* this_, TreeModel* model, TreeIter* iter, void* user_data=null) nothrow signal_match_selected;
10632 ulong signal_connect(string name:"match-selected", CB/*:signal_match_selected*/)
10633 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10634 if (is(typeof(cb)==signal_match_selected)||_ttmm!(CB, signal_match_selected)()) {
10635 return signal_connect_data!()(&this, cast(char*)"match-selected",
10636 cast(GObject2.Callback)cb, data, null, cf);
10640 struct EntryCompletionClass {
10641 GObject2.ObjectClass parent_class;
10642 extern (C) int function (EntryCompletion* completion, TreeModel* model, TreeIter* iter) nothrow match_selected;
10643 extern (C) void function (EntryCompletion* completion, int index_) nothrow action_activated;
10644 extern (C) int function (EntryCompletion* completion, char* prefix) nothrow insert_prefix;
10645 extern (C) int function (EntryCompletion* completion, TreeModel* model, TreeIter* iter) nothrow cursor_on_match;
10646 extern (C) void function () nothrow _gtk_reserved0;
10647 extern (C) void function () nothrow _gtk_reserved1;
10650 extern (C) alias int function (EntryCompletion* completion, char* key, TreeIter* iter, void* user_data) nothrow EntryCompletionMatchFunc;
10652 struct EntryCompletionPrivate {
10655 enum EntryIconPosition {
10656 PRIMARY = 0,
10657 SECONDARY = 1
10659 struct EventBox /* : Bin */ {
10660 mixin Atk.ImplementorIface.__interface__;
10661 mixin Buildable.__interface__;
10662 alias bin this;
10663 alias bin super_;
10664 Bin bin;
10666 static EventBox* new_()() nothrow {
10667 return gtk_event_box_new();
10669 static auto opCall()() {
10670 return gtk_event_box_new();
10673 // VERSION: 2.4
10674 // Returns whether the event box window is above or below the
10675 // windows of its child. See gtk_event_box_set_above_child() for
10676 // details.
10678 // of its child.
10679 // RETURNS: %TRUE if the event box window is above the window
10680 int get_above_child()() nothrow {
10681 return gtk_event_box_get_above_child(&this);
10684 // VERSION: 2.4
10685 // Returns whether the event box has a visible window.
10686 // See gtk_event_box_set_visible_window() for details.
10687 // RETURNS: %TRUE if the event box window is visible
10688 int get_visible_window()() nothrow {
10689 return gtk_event_box_get_visible_window(&this);
10692 // VERSION: 2.4
10693 // Set whether the event box window is positioned above the windows of its child,
10694 // as opposed to below it. If the window is above, all events inside the
10695 // event box will go to the event box. If the window is below, events
10696 // in windows of child widgets will first got to that widget, and then
10697 // to its parents.
10699 // The default is to keep the window below the child.
10700 // <above_child>: %TRUE if the event box window is above the windows of its child
10701 void set_above_child()(int above_child) nothrow {
10702 gtk_event_box_set_above_child(&this, above_child);
10705 // VERSION: 2.4
10706 // Set whether the event box uses a visible or invisible child
10707 // window. The default is to use visible windows.
10709 // In an invisible window event box, the window that the
10710 // event box creates is a %GDK_INPUT_ONLY window, which
10711 // means that it is invisible and only serves to receive
10712 // events.
10714 // A visible window event box creates a visible (%GDK_INPUT_OUTPUT)
10715 // window that acts as the parent window for all the widgets
10716 // contained in the event box.
10718 // You should generally make your event box invisible if
10719 // you just want to trap events. Creating a visible window
10720 // may cause artifacts that are visible to the user, especially
10721 // if the user is using a theme with gradients or pixmaps.
10723 // The main reason to create a non input-only event box is if
10724 // you want to set the background to a different color or
10725 // draw on it.
10727 // <note><para>
10728 // There is one unexpected issue for an invisible event box that has its
10729 // window below the child. (See gtk_event_box_set_above_child().)
10730 // Since the input-only window is not an ancestor window of any windows
10731 // that descendent widgets of the event box create, events on these
10732 // windows aren't propagated up by the windowing system, but only by GTK+.
10733 // The practical effect of this is if an event isn't in the event
10734 // mask for the descendant window (see gtk_widget_add_events()),
10735 // it won't be received by the event box.
10736 // </para><para>
10737 // This problem doesn't occur for visible event boxes, because in
10738 // that case, the event box window is actually the ancestor of the
10739 // descendant windows, not just at the same place on the screen.
10740 // </para></note>
10741 // <visible_window>: boolean value
10742 void set_visible_window()(int visible_window) nothrow {
10743 gtk_event_box_set_visible_window(&this, visible_window);
10747 struct EventBoxClass {
10748 BinClass parent_class;
10751 struct Expander /* : Bin */ {
10752 mixin Atk.ImplementorIface.__interface__;
10753 mixin Buildable.__interface__;
10754 alias bin this;
10755 alias bin super_;
10756 Bin bin;
10757 ExpanderPrivate* priv;
10760 // VERSION: 2.4
10761 // Creates a new expander using @label as the text of the label.
10762 // RETURNS: a new #GtkExpander widget.
10763 // <label>: the text of the label
10764 static Expander* new_(AT0)(AT0 /*char*/ label) nothrow {
10765 return gtk_expander_new(toCString!(char*)(label));
10767 static auto opCall(AT0)(AT0 /*char*/ label) {
10768 return gtk_expander_new(toCString!(char*)(label));
10771 // VERSION: 2.4
10772 // Creates a new expander using @label as the text of the label.
10773 // If characters in @label are preceded by an underscore, they are underlined.
10774 // If you need a literal underscore character in a label, use '__' (two
10775 // underscores). The first underlined character represents a keyboard
10776 // accelerator called a mnemonic.
10777 // Pressing Alt and that key activates the button.
10778 // RETURNS: a new #GtkExpander widget.
10779 // <label>: the text of the label with an underscore in front of the mnemonic character
10780 static Expander* new_with_mnemonic(AT0)(AT0 /*char*/ label=null) nothrow {
10781 return gtk_expander_new_with_mnemonic(toCString!(char*)(label));
10783 static auto opCall(AT0)(AT0 /*char*/ label=null) {
10784 return gtk_expander_new_with_mnemonic(toCString!(char*)(label));
10787 // VERSION: 2.4
10788 // Queries a #GtkExpander and returns its current state. Returns %TRUE
10789 // if the child widget is revealed.
10791 // See gtk_expander_set_expanded().
10792 // RETURNS: the current state of the expander.
10793 int get_expanded()() nothrow {
10794 return gtk_expander_get_expanded(&this);
10797 // VERSION: 2.4
10798 // Fetches the text from a label widget including any embedded
10799 // underlines indicating mnemonics and Pango markup, as set by
10800 // gtk_expander_set_label(). If the label text has not been set the
10801 // return value will be %NULL. This will be the case if you create an
10802 // empty button with gtk_button_new() to use as a container.
10804 // Note that this function behaved differently in versions prior to
10805 // 2.14 and used to return the label text stripped of embedded
10806 // underlines indicating mnemonics and Pango markup. This problem can
10807 // be avoided by fetching the label text directly from the label
10808 // widget.
10810 // by the widget and must not be modified or freed.
10811 // RETURNS: The text of the label widget. This string is owned
10812 char* get_label()() nothrow {
10813 return gtk_expander_get_label(&this);
10816 // VERSION: 2.22
10817 // Returns whether the label widget will fill all available horizontal
10818 // space allocated to @expander.
10820 // space
10821 // RETURNS: %TRUE if the label widget will fill all available horizontal
10822 int get_label_fill()() nothrow {
10823 return gtk_expander_get_label_fill(&this);
10826 // VERSION: 2.4
10827 // Retrieves the label widget for the frame. See
10828 // gtk_expander_set_label_widget().
10830 // or %NULL if there is none.
10831 // RETURNS: the label widget,
10832 Widget* get_label_widget()() nothrow {
10833 return gtk_expander_get_label_widget(&this);
10836 // VERSION: 2.4
10837 // Gets the value set by gtk_expander_set_spacing().
10838 // RETURNS: spacing between the expander and child.
10839 int get_spacing()() nothrow {
10840 return gtk_expander_get_spacing(&this);
10843 // VERSION: 2.4
10844 // Returns whether the label's text is interpreted as marked up with
10845 // the <link linkend="PangoMarkupFormat">Pango text markup
10846 // language</link>. See gtk_expander_set_use_markup ().
10847 // RETURNS: %TRUE if the label's text will be parsed for markup
10848 int get_use_markup()() nothrow {
10849 return gtk_expander_get_use_markup(&this);
10852 // VERSION: 2.4
10853 // Returns whether an embedded underline in the expander label indicates a
10854 // mnemonic. See gtk_expander_set_use_underline().
10856 // indicates the mnemonic accelerator keys.
10857 // RETURNS: %TRUE if an embedded underline in the expander label
10858 int get_use_underline()() nothrow {
10859 return gtk_expander_get_use_underline(&this);
10862 // VERSION: 2.4
10863 // Sets the state of the expander. Set to %TRUE, if you want
10864 // the child widget to be revealed, and %FALSE if you want the
10865 // child widget to be hidden.
10866 // <expanded>: whether the child widget is revealed
10867 void set_expanded()(int expanded) nothrow {
10868 gtk_expander_set_expanded(&this, expanded);
10871 // VERSION: 2.4
10872 // Sets the text of the label of the expander to @label.
10874 // This will also clear any previously set labels.
10875 // <label>: a string
10876 void set_label(AT0)(AT0 /*char*/ label=null) nothrow {
10877 gtk_expander_set_label(&this, toCString!(char*)(label));
10880 // VERSION: 2.22
10881 // Sets whether the label widget should fill all available horizontal space
10882 // allocated to @expander.
10883 // <label_fill>: %TRUE if the label should should fill all available horizontal space
10884 void set_label_fill()(int label_fill) nothrow {
10885 gtk_expander_set_label_fill(&this, label_fill);
10888 // VERSION: 2.4
10889 // Set the label widget for the expander. This is the widget
10890 // that will appear embedded alongside the expander arrow.
10891 // <label_widget>: the new label widget
10892 void set_label_widget(AT0)(AT0 /*Widget*/ label_widget=null) nothrow {
10893 gtk_expander_set_label_widget(&this, UpCast!(Widget*)(label_widget));
10896 // VERSION: 2.4
10897 // Sets the spacing field of @expander, which is the number of pixels to
10898 // place between expander and the child.
10899 // <spacing>: distance between the expander and child in pixels.
10900 void set_spacing()(int spacing) nothrow {
10901 gtk_expander_set_spacing(&this, spacing);
10904 // VERSION: 2.4
10905 // Sets whether the text of the label contains markup in <link
10906 // linkend="PangoMarkupFormat">Pango's text markup
10907 // language</link>. See gtk_label_set_markup().
10908 // <use_markup>: %TRUE if the label's text should be parsed for markup
10909 void set_use_markup()(int use_markup) nothrow {
10910 gtk_expander_set_use_markup(&this, use_markup);
10913 // VERSION: 2.4
10914 // If true, an underline in the text of the expander label indicates
10915 // the next character should be used for the mnemonic accelerator key.
10916 // <use_underline>: %TRUE if underlines in the text indicate mnemonics
10917 void set_use_underline()(int use_underline) nothrow {
10918 gtk_expander_set_use_underline(&this, use_underline);
10920 extern (C) alias static void function (Expander* this_, void* user_data=null) nothrow signal_activate;
10922 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10923 return super_.signal_connect!name(cb, data, cf);
10926 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
10927 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
10928 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
10929 return signal_connect_data!()(&this, cast(char*)"activate",
10930 cast(GObject2.Callback)cb, data, null, cf);
10934 struct ExpanderClass {
10935 BinClass parent_class;
10936 extern (C) void function (Expander* expander) nothrow activate;
10939 struct ExpanderPrivate {
10942 enum ExpanderStyle {
10943 COLLAPSED = 0,
10944 SEMI_COLLAPSED = 1,
10945 SEMI_EXPANDED = 2,
10946 EXPANDED = 3
10949 // #GtkFileChooser is an interface that can be implemented by file
10950 // selection widgets. In GTK+, the main objects that implement this
10951 // interface are #GtkFileChooserWidget, #GtkFileChooserDialog, and
10952 // #GtkFileChooserButton. You do not need to write an object that
10953 // implements the #GtkFileChooser interface unless you are trying to
10954 // adapt an existing file selector to expose a standard programming
10955 // interface.
10957 // #GtkFileChooser allows for shortcuts to various places in the filesystem.
10958 // In the default implementation these are displayed in the left pane. It
10959 // may be a bit confusing at first that these shortcuts come from various
10960 // sources and in various flavours, so lets explain the terminology here:
10961 // <variablelist>
10962 // <varlistentry>
10963 // <term>Bookmarks</term>
10964 // <listitem>
10965 // are created by the user, by dragging folders from the
10966 // right pane to the left pane, or by using the "Add". Bookmarks
10967 // can be renamed and deleted by the user.
10968 // </listitem>
10969 // </varlistentry>
10970 // <varlistentry>
10971 // <term>Shortcuts</term>
10972 // <listitem>
10973 // can be provided by the application or by the underlying filesystem
10974 // abstraction (e.g. both the gnome-vfs and the Windows filesystems
10975 // provide "Desktop" shortcuts). Shortcuts cannot be modified by the
10976 // user.
10977 // </listitem>
10978 // </varlistentry>
10979 // <varlistentry>
10980 // <term>Volumes</term>
10981 // <listitem>
10982 // are provided by the underlying filesystem abstraction. They are
10983 // the "roots" of the filesystem.
10984 // </listitem>
10985 // </varlistentry>
10986 // </variablelist>
10988 // <refsect2 id="gtkfilechooser-encodings">
10989 // <title>File Names and Encodings</title>
10990 // When the user is finished selecting files in a
10991 // #GtkFileChooser, your program can get the selected names
10992 // either as filenames or as URIs. For URIs, the normal escaping
10993 // rules are applied if the URI contains non-ASCII characters.
10994 // However, filenames are <emphasis>always</emphasis> returned in
10995 // the character set specified by the
10996 // <envar>G_FILENAME_ENCODING</envar> environment variable.
10997 // Please see the Glib documentation for more details about this
10998 // variable.
10999 // <note>
11000 // This means that while you can pass the result of
11001 // gtk_file_chooser_get_filename() to
11002 // <function>open(2)</function> or
11003 // <function>fopen(3)</function>, you may not be able to
11004 // directly set it as the text of a #GtkLabel widget unless you
11005 // convert it first to UTF-8, which all GTK+ widgets expect.
11006 // You should use g_filename_to_utf8() to convert filenames
11007 // into strings that can be passed to GTK+ widgets.
11008 // </note>
11009 // </refsect2>
11010 // <refsect2 id="gtkfilechooser-preview">
11011 // <title>Adding a Preview Widget</title>
11012 // <para>
11013 // You can add a custom preview widget to a file chooser and then
11014 // get notification about when the preview needs to be updated.
11015 // To install a preview widget, use
11016 // gtk_file_chooser_set_preview_widget(). Then, connect to the
11017 // #GtkFileChooser::update-preview signal to get notified when
11018 // you need to update the contents of the preview.
11019 // </para>
11020 // <para>
11021 // Your callback should use
11022 // gtk_file_chooser_get_preview_filename() to see what needs
11023 // previewing. Once you have generated the preview for the
11024 // corresponding file, you must call
11025 // gtk_file_chooser_set_preview_widget_active() with a boolean
11026 // flag that indicates whether your callback could successfully
11027 // generate a preview.
11028 // </para>
11029 // <example id="example-gtkfilechooser-preview">
11030 // <title>Sample Usage</title>
11031 // <programlisting>
11032 // {
11033 // GtkImage *preview;
11035 // ...
11037 // preview = gtk_image_new (<!-- -->);
11039 // gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
11040 // g_signal_connect (my_file_chooser, "update-preview",
11041 // G_CALLBACK (update_preview_cb), preview);
11042 // }
11044 // static void
11045 // update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
11046 // {
11047 // GtkWidget *preview;
11048 // char *filename;
11049 // GdkPixbuf *pixbuf;
11050 // gboolean have_preview;
11052 // preview = GTK_WIDGET (data);
11053 // filename = gtk_file_chooser_get_preview_filename (file_chooser);
11055 // pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
11056 // have_preview = (pixbuf != NULL);
11057 // g_free (filename);
11059 // gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
11060 // if (pixbuf)
11061 // g_object_unref (pixbuf);
11063 // gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
11064 // }
11065 // </programlisting>
11066 // </example>
11067 // </refsect2>
11068 // <refsect2 id="gtkfilechooser-extra">
11069 // <title>Adding Extra Widgets</title>
11070 // <para>
11071 // You can add extra widgets to a file chooser to provide options
11072 // that are not present in the default design. For example, you
11073 // can add a toggle button to give the user the option to open a
11074 // file in read-only mode. You can use
11075 // gtk_file_chooser_set_extra_widget() to insert additional
11076 // widgets in a file chooser.
11077 // </para>
11078 // <example id="example-gtkfilechooser-extra">
11079 // <title>Sample Usage</title>
11080 // <programlisting>
11082 // GtkWidget *toggle;
11084 // ...
11086 // toggle = gtk_check_button_new_with_label ("Open file read-only");
11087 // gtk_widget_show (toggle);
11088 // gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
11089 // }
11090 // </programlisting>
11091 // </example>
11092 // <note>
11093 // If you want to set more than one extra widget in the file
11094 // chooser, you can a container such as a #GtkVBox or a #GtkTable
11095 // and include your widgets in it. Then, set the container as
11096 // the whole extra widget.
11097 // </note>
11098 // </refsect2>
11099 // <refsect2 id="gtkfilechooser-key-bindings">
11100 // <title>Key Bindings</title>
11101 // <para>
11102 // Internally, GTK+ implements a file chooser's graphical user
11103 // interface with the private
11104 // <classname>GtkFileChooserDefaultClass</classname>. This
11105 // widget has several <link linkend="gtk-Bindings">key
11106 // bindings</link> and their associated signals. This section
11107 // describes the available key binding signals.
11108 // </para>
11109 // <example id="gtkfilechooser-key-binding-example">
11110 // <title>GtkFileChooser key binding example</title>
11111 // <para>
11112 // The default keys that activate the key-binding signals in
11113 // <classname>GtkFileChooserDefaultClass</classname> are as
11114 // follows:
11115 // </para>
11116 // <informaltable>
11117 // <tgroup cols="2">
11118 // <tbody>
11119 // <row>
11120 // <entry>Signal name</entry>
11121 // <entry>Default key combinations</entry>
11122 // </row>
11123 // <row>
11124 // <entry>location-popup</entry>
11125 // <entry>
11126 // <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo> (empty path);
11127 // <keycap>/</keycap> (path of "/")
11128 // <footnote>
11129 // Both the individual <keycap>/</keycap> key and the
11130 // numeric keypad's "divide" key are supported.
11131 // </footnote>;
11132 // <keycap>~</keycap> (path of "~")
11133 // </entry>
11134 // </row>
11135 // <row>
11136 // <entry>up-folder</entry>
11137 // <entry>
11138 // <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>;
11139 // <keycombo><keycap>Alt</keycap><keycap>Shift</keycap><keycap>Up</keycap></keycombo>
11140 // <footnote>
11141 // Both the individual Up key and the numeric
11142 // keypad's Up key are supported.
11143 // </footnote>;
11144 // <keycap>Backspace</keycap>
11145 // </entry>
11146 // </row>
11147 // <row>
11148 // <entry>down-folder</entry>
11149 // <entry>
11150 // <keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>;
11151 // <keycombo><keycap>Alt</keycap><keycap>Shift</keycap><keycap>Down</keycap></keycombo>
11152 // <footnote>
11153 // Both the individual Down key and the numeric
11154 // keypad's Down key are supported.
11155 // </footnote>
11156 // </entry>
11157 // </row>
11158 // <row>
11159 // <entry>home-folder</entry>
11160 // <entry><keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo></entry>
11161 // </row>
11162 // <row>
11163 // <entry>desktop-folder</entry>
11164 // <entry><keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo></entry>
11165 // </row>
11166 // <row>
11167 // <entry>quick-bookmark</entry>
11168 // <entry><keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> through <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo></entry>
11169 // </row>
11170 // </tbody>
11171 // </tgroup>
11172 // </informaltable>
11173 // <para>
11174 // You can change these defaults to something else. For
11175 // example, to add a <keycap>Shift</keycap> modifier to a few
11176 // of the default bindings, you can include the following
11177 // fragment in your <filename>.gtkrc-3.0</filename> file:
11178 // </para>
11179 // <programlisting>
11180 // binding "my-own-gtkfilechooser-bindings" {
11181 // bind "&lt;Alt&gt;&lt;Shift&gt;Up" {
11182 // "up-folder" ()
11183 // }
11184 // bind "&lt;Alt&gt;&lt;Shift&gt;Down" {
11185 // "down-folder" ()
11186 // }
11187 // bind "&lt;Alt&gt;&lt;Shift&gt;Home" {
11188 // "home-folder" ()
11189 // }
11190 // }
11192 // class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
11193 // </programlisting>
11194 // </example>
11195 // <refsect3 id="GtkFileChooserDefault-location-popup">
11196 // <title>The &quot;GtkFileChooserDefault::location-popup&quot; signal</title>
11197 // <programlisting>
11198 // void user_function (GtkFileChooserDefault *chooser,
11199 // const char *path,
11200 // <link linkend="gpointer">gpointer</link> user_data);
11201 // </programlisting>
11202 // <para>
11203 // This is used to make the file chooser show a "Location"
11204 // dialog which the user can use to manually type the name of
11205 // the file he wishes to select. The
11206 // <parameter>path</parameter> argument is a string that gets
11207 // put in the text entry for the file name. By default this is bound to
11208 // <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>
11209 // with a <parameter>path</parameter> string of "" (the empty
11210 // string). It is also bound to <keycap>/</keycap> with a
11211 // <parameter>path</parameter> string of "<literal>/</literal>"
11212 // (a slash): this lets you type <keycap>/</keycap> and
11213 // immediately type a path name. On Unix systems, this is bound to
11214 // <keycap>~</keycap> (tilde) with a <parameter>path</parameter> string
11215 // of "~" itself for access to home directories.
11216 // </para>
11217 // <variablelist role="params">
11218 // <varlistentry>
11219 // <term><parameter>chooser</parameter>&nbsp;:</term>
11220 // <listitem>
11221 // <simpara>
11222 // the object which received the signal.
11223 // </simpara>
11224 // </listitem>
11225 // </varlistentry>
11226 // <varlistentry>
11227 // <term><parameter>path</parameter>&nbsp;:</term>
11228 // <listitem>
11229 // <simpara>
11230 // default contents for the text entry for the file name
11231 // </simpara>
11232 // </listitem>
11233 // </varlistentry>
11234 // <varlistentry>
11235 // <term><parameter>user_data</parameter>&nbsp;:</term>
11236 // <listitem>
11237 // <simpara>
11238 // user data set when the signal handler was connected.
11239 // </simpara>
11240 // </listitem>
11241 // </varlistentry>
11242 // </variablelist>
11243 // <note>
11244 // You can create your own bindings for the
11245 // #GtkFileChooserDefault::location-popup signal with custom
11246 // <parameter>path</parameter> strings, and have a crude form
11247 // of easily-to-type bookmarks. For example, say you access
11248 // the path <filename>/home/username/misc</filename> very
11249 // frequently. You could then create an <keycombo>
11250 // <keycap>Alt</keycap> <keycap>M</keycap> </keycombo>
11251 // shortcut by including the following in your
11252 // <filename>.gtkrc-3.0</filename>:
11253 // <programlisting>
11254 // binding "misc-shortcut" {
11255 // bind "&lt;Alt&gt;M" {
11256 // "location-popup" ("/home/username/misc")
11257 // }
11258 // }
11260 // class "GtkFileChooserDefault" binding "misc-shortcut"
11261 // </programlisting>
11262 // </note>
11263 // </refsect3>
11264 // <refsect3 id="GtkFileChooserDefault-up-folder">
11265 // <title>The &quot;GtkFileChooserDefault::up-folder&quot; signal</title>
11266 // <programlisting>
11267 // void user_function (GtkFileChooserDefault *chooser,
11268 // <link linkend="gpointer">gpointer</link> user_data);
11269 // </programlisting>
11270 // <para>
11271 // This is used to make the file chooser go to the parent of
11272 // the current folder in the file hierarchy. By default this
11273 // is bound to <keycap>Backspace</keycap> and
11274 // <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>
11275 // (the Up key in the numeric keypad also works).
11276 // </para>
11277 // <variablelist role="params">
11278 // <varlistentry>
11279 // <term><parameter>chooser</parameter>&nbsp;:</term>
11280 // <listitem>
11281 // <simpara>
11282 // the object which received the signal.
11283 // </simpara>
11284 // </listitem>
11285 // </varlistentry>
11286 // <varlistentry>
11287 // <term><parameter>user_data</parameter>&nbsp;:</term>
11288 // <listitem>
11289 // <simpara>
11290 // user data set when the signal handler was connected.
11291 // </simpara>
11292 // </listitem>
11293 // </varlistentry>
11294 // </variablelist>
11295 // </refsect3>
11296 // <refsect3 id="GtkFileChooserDefault-down-folder">
11297 // <title>The &quot;GtkFileChooserDefault::down-folder&quot; signal</title>
11298 // <programlisting>
11299 // void user_function (GtkFileChooserDefault *chooser,
11300 // <link linkend="gpointer">gpointer</link> user_data);
11301 // </programlisting>
11302 // <para>
11303 // This is used to make the file chooser go to a child of the
11304 // current folder in the file hierarchy. The subfolder that
11305 // will be used is displayed in the path bar widget of the file
11306 // chooser. For example, if the path bar is showing
11307 // "/foo/<emphasis>bar/</emphasis>baz", then this will cause
11308 // the file chooser to switch to the "baz" subfolder. By
11309 // default this is bound to
11310 // <keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>
11311 // (the Down key in the numeric keypad also works).
11312 // </para>
11313 // <variablelist role="params">
11314 // <varlistentry>
11315 // <term><parameter>chooser</parameter>&nbsp;:</term>
11316 // <listitem>
11317 // <simpara>
11318 // the object which received the signal.
11319 // </simpara>
11320 // </listitem>
11321 // </varlistentry>
11322 // <varlistentry>
11323 // <term><parameter>user_data</parameter>&nbsp;:</term>
11324 // <listitem>
11325 // <simpara>
11326 // user data set when the signal handler was connected.
11327 // </simpara>
11328 // </listitem>
11329 // </varlistentry>
11330 // </variablelist>
11331 // </refsect3>
11332 // <refsect3 id="GtkFileChooserDefault-home-folder">
11333 // <title>The &quot;GtkFileChooserDefault::home-folder&quot; signal</title>
11334 // <programlisting>
11335 // void user_function (GtkFileChooserDefault *chooser,
11336 // <link linkend="gpointer">gpointer</link> user_data);
11337 // </programlisting>
11338 // <para>
11339 // This is used to make the file chooser show the user's home
11340 // folder in the file list. By default this is bound to
11341 // <keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>
11342 // (the Home key in the numeric keypad also works).
11343 // </para>
11344 // <variablelist role="params">
11345 // <varlistentry>
11346 // <term><parameter>chooser</parameter>&nbsp;:</term>
11347 // <listitem>
11348 // <simpara>
11349 // the object which received the signal.
11350 // </simpara>
11351 // </listitem>
11352 // </varlistentry>
11353 // <varlistentry>
11354 // <term><parameter>user_data</parameter>&nbsp;:</term>
11355 // <listitem>
11356 // <simpara>
11357 // user data set when the signal handler was connected.
11358 // </simpara>
11359 // </listitem>
11360 // </varlistentry>
11361 // </variablelist>
11362 // </refsect3>
11363 // <refsect3 id="GtkFileChooserDefault-desktop-folder">
11364 // <title>The &quot;GtkFileChooserDefault::desktop-folder&quot; signal</title>
11365 // <programlisting>
11366 // void user_function (GtkFileChooserDefault *chooser,
11367 // <link linkend="gpointer">gpointer</link> user_data);
11368 // </programlisting>
11369 // <para>
11370 // This is used to make the file chooser show the user's Desktop
11371 // folder in the file list. By default this is bound to
11372 // <keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo>.
11373 // </para>
11374 // <variablelist role="params">
11375 // <varlistentry>
11376 // <term><parameter>chooser</parameter>&nbsp;:</term>
11377 // <listitem>
11378 // <simpara>
11379 // the object which received the signal.
11380 // </simpara>
11381 // </listitem>
11382 // </varlistentry>
11383 // <varlistentry>
11384 // <term><parameter>user_data</parameter>&nbsp;:</term>
11385 // <listitem>
11386 // <simpara>
11387 // user data set when the signal handler was connected.
11388 // </simpara>
11389 // </listitem>
11390 // </varlistentry>
11391 // </variablelist>
11392 // </refsect3>
11393 // <refsect3 id="GtkFileChooserDefault-quick-bookmark">
11394 // <title>The &quot;GtkFileChooserDefault::quick-bookmark&quot; signal</title>
11395 // <programlisting>
11396 // void user_function (GtkFileChooserDefault *chooser,
11397 // gint bookmark_index,
11398 // <link linkend="gpointer">gpointer</link> user_data);
11399 // </programlisting>
11400 // <para>
11401 // This is used to make the file chooser switch to the bookmark
11402 // specified in the <parameter>bookmark_index</parameter> parameter.
11403 // For example, if you have three bookmarks, you can pass 0, 1, 2 to
11404 // this signal to switch to each of them, respectively. By default this is bound to
11405 // <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo>,
11406 // <keycombo><keycap>Alt</keycap><keycap>2</keycap></keycombo>,
11407 // etc. until
11408 // <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo>. Note
11409 // that in the default binding,
11410 // that <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> is
11411 // actually defined to switch to the bookmark at index 0, and so on
11412 // successively;
11413 // <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo> is
11414 // defined to switch to the bookmark at index 10.
11415 // </para>
11416 // <variablelist role="params">
11417 // <varlistentry>
11418 // <term><parameter>chooser</parameter>&nbsp;:</term>
11419 // <listitem>
11420 // <simpara>
11421 // the object which received the signal.
11422 // </simpara>
11423 // </listitem>
11424 // </varlistentry>
11425 // <varlistentry>
11426 // <term><parameter>bookmark_indes</parameter>&nbsp;:</term>
11427 // <listitem>
11428 // <simpara>
11429 // index of the bookmark to switch to; the indices start at 0.
11430 // </simpara>
11431 // </listitem>
11432 // </varlistentry>
11433 // <varlistentry>
11434 // <term><parameter>user_data</parameter>&nbsp;:</term>
11435 // <listitem>
11436 // <simpara>
11437 // user data set when the signal handler was connected.
11438 // </simpara>
11439 // </listitem>
11440 // </varlistentry>
11441 // </variablelist>
11442 // </refsect3>
11443 // </refsect2>
11444 struct FileChooser /* Interface */ {
11445 mixin template __interface__() {
11446 // VERSION: 2.4
11447 // Adds @filter to the list of filters that the user can select between.
11448 // When a filter is selected, only files that are passed by that
11449 // filter are displayed.
11451 // Note that the @chooser takes ownership of the filter, so you have to
11452 // ref and sink it if you want to keep a reference.
11453 // <filter>: a #GtkFileFilter
11454 void add_filter(AT0)(AT0 /*FileFilter*/ filter) nothrow {
11455 gtk_file_chooser_add_filter(cast(FileChooser*)&this, UpCast!(FileFilter*)(filter));
11458 // VERSION: 2.4
11459 // Adds a folder to be displayed with the shortcut folders in a file chooser.
11460 // Note that shortcut folders do not get saved, as they are provided by the
11461 // application. For example, you can use this to add a
11462 // "/usr/share/mydrawprogram/Clipart" folder to the volume list.
11464 // otherwise. In the latter case, the @error will be set as appropriate.
11465 // RETURNS: %TRUE if the folder could be added successfully, %FALSE
11466 // <folder>: filename of the folder to add
11467 int add_shortcut_folder(AT0, AT1)(AT0 /*char*/ folder, AT1 /*GLib2.Error**/ error=null) nothrow {
11468 return gtk_file_chooser_add_shortcut_folder(cast(FileChooser*)&this, toCString!(char*)(folder), UpCast!(GLib2.Error**)(error));
11471 // VERSION: 2.4
11472 // Adds a folder URI to be displayed with the shortcut folders in a file
11473 // chooser. Note that shortcut folders do not get saved, as they are provided
11474 // by the application. For example, you can use this to add a
11475 // "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.
11477 // otherwise. In the latter case, the @error will be set as appropriate.
11478 // RETURNS: %TRUE if the folder could be added successfully, %FALSE
11479 // <uri>: URI of the folder to add
11480 int add_shortcut_folder_uri(AT0, AT1)(AT0 /*char*/ uri, AT1 /*GLib2.Error**/ error=null) nothrow {
11481 return gtk_file_chooser_add_shortcut_folder_uri(cast(FileChooser*)&this, toCString!(char*)(uri), UpCast!(GLib2.Error**)(error));
11484 // VERSION: 2.4
11485 // Gets the type of operation that the file chooser is performing; see
11486 // gtk_file_chooser_set_action().
11487 // RETURNS: the action that the file selector is performing
11488 FileChooserAction get_action()() nothrow {
11489 return gtk_file_chooser_get_action(cast(FileChooser*)&this);
11492 // VERSION: 2.18
11493 // Gets whether file choser will offer to create new folders.
11494 // See gtk_file_chooser_set_create_folders().
11495 // RETURNS: %TRUE if the New Folder button should be displayed.
11496 int get_create_folders()() nothrow {
11497 return gtk_file_chooser_get_create_folders(cast(FileChooser*)&this);
11500 // VERSION: 2.4
11501 // Gets the current folder of @chooser as a local filename.
11502 // See gtk_file_chooser_set_current_folder().
11504 // Note that this is the folder that the file chooser is currently displaying
11505 // (e.g. "/home/username/Documents"), which is <emphasis>not the same</emphasis>
11506 // as the currently-selected folder if the chooser is in
11507 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode
11508 // (e.g. "/home/username/Documents/selected-folder/". To get the
11509 // currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
11510 // usual way to get the selection.
11512 // or %NULL if the current path cannot be represented as a local
11513 // filename. Free with g_free(). This function will also return
11514 // %NULL if the file chooser was unable to load the last folder that
11515 // was requested from it; for example, as would be for calling
11516 // gtk_file_chooser_set_current_folder() on a nonexistent folder.
11517 // RETURNS: the full path of the current folder,
11518 char* /*new*/ get_current_folder()() nothrow {
11519 return gtk_file_chooser_get_current_folder(cast(FileChooser*)&this);
11522 // VERSION: 2.14
11523 // Gets the current folder of @chooser as #GFile.
11524 // See gtk_file_chooser_get_current_folder_uri().
11525 // RETURNS: the #GFile for the current folder.
11526 Gio2.File* /*new*/ get_current_folder_file()() nothrow {
11527 return gtk_file_chooser_get_current_folder_file(cast(FileChooser*)&this);
11530 // VERSION: 2.4
11531 // Gets the current folder of @chooser as an URI.
11532 // See gtk_file_chooser_set_current_folder_uri().
11534 // Note that this is the folder that the file chooser is currently displaying
11535 // (e.g. "file:///home/username/Documents"), which is <emphasis>not the same</emphasis>
11536 // as the currently-selected folder if the chooser is in
11537 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode
11538 // (e.g. "file:///home/username/Documents/selected-folder/". To get the
11539 // currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
11540 // usual way to get the selection.
11542 // function will also return %NULL if the file chooser was unable to load the
11543 // last folder that was requested from it; for example, as would be for calling
11544 // gtk_file_chooser_set_current_folder_uri() on a nonexistent folder.
11545 // RETURNS: the URI for the current folder. Free with g_free(). This
11546 char* /*new*/ get_current_folder_uri()() nothrow {
11547 return gtk_file_chooser_get_current_folder_uri(cast(FileChooser*)&this);
11550 // VERSION: 2.8
11551 // Queries whether a file chooser is set to confirm for overwriting when the user
11552 // types a file name that already exists.
11554 // %FALSE otherwise.
11555 // RETURNS: %TRUE if the file chooser will present a confirmation dialog;
11556 int get_do_overwrite_confirmation()() nothrow {
11557 return gtk_file_chooser_get_do_overwrite_confirmation(cast(FileChooser*)&this);
11560 // VERSION: 2.4
11561 // Gets the current preview widget; see
11562 // gtk_file_chooser_set_extra_widget().
11563 // RETURNS: the current extra widget, or %NULL
11564 Widget* get_extra_widget()() nothrow {
11565 return gtk_file_chooser_get_extra_widget(cast(FileChooser*)&this);
11568 // VERSION: 2.14
11569 // Gets the #GFile for the currently selected file in
11570 // the file selector. If multiple files are selected,
11571 // one of the files will be returned at random.
11573 // If the file chooser is in folder mode, this function returns the selected
11574 // folder.
11576 // use g_object_unref() to release it.
11577 // RETURNS: a selected #GFile. You own the returned file;
11578 Gio2.File* /*new*/ get_file()() nothrow {
11579 return gtk_file_chooser_get_file(cast(FileChooser*)&this);
11582 // VERSION: 2.4
11583 // Gets the filename for the currently selected file in
11584 // the file selector. If multiple files are selected,
11585 // one of the filenames will be returned at random.
11587 // If the file chooser is in folder mode, this function returns the selected
11588 // folder.
11590 // if no file is selected, or the selected file can't
11591 // be represented with a local filename. Free with g_free().
11592 // RETURNS: The currently selected filename, or %NULL
11593 char* /*new*/ get_filename()() nothrow {
11594 return gtk_file_chooser_get_filename(cast(FileChooser*)&this);
11597 // VERSION: 2.4
11598 // Lists all the selected files and subfolders in the current folder of
11599 // @chooser. The returned names are full absolute paths. If files in the current
11600 // folder cannot be represented as local filenames they will be ignored. (See
11601 // gtk_file_chooser_get_uris())
11603 // containing the filenames of all selected files and subfolders in
11604 // the current folder. Free the returned list with g_slist_free(),
11605 // and the filenames with g_free().
11606 // RETURNS: a #GSList
11607 GLib2.SList* /*new*/ get_filenames()() nothrow {
11608 return gtk_file_chooser_get_filenames(cast(FileChooser*)&this);
11611 // VERSION: 2.14
11612 // Lists all the selected files and subfolders in the current folder of @chooser
11613 // as #GFile. An internal function, see gtk_file_chooser_get_uris().
11615 // containing a #GFile for each selected file and subfolder in the
11616 // current folder. Free the returned list with g_slist_free(), and
11617 // the files with g_object_unref().
11618 // RETURNS: a #GSList
11619 GLib2.SList* /*new*/ get_files()() nothrow {
11620 return gtk_file_chooser_get_files(cast(FileChooser*)&this);
11623 // VERSION: 2.4
11624 // Gets the current filter; see gtk_file_chooser_set_filter().
11625 // RETURNS: the current filter, or %NULL
11626 FileFilter* get_filter()() nothrow {
11627 return gtk_file_chooser_get_filter(cast(FileChooser*)&this);
11630 // VERSION: 2.4
11631 // Gets whether only local files can be selected in the
11632 // file selector. See gtk_file_chooser_set_local_only()
11633 // RETURNS: %TRUE if only local files can be selected.
11634 int get_local_only()() nothrow {
11635 return gtk_file_chooser_get_local_only(cast(FileChooser*)&this);
11638 // VERSION: 2.14
11639 // Gets the #GFile that should be previewed in a custom preview
11640 // Internal function, see gtk_file_chooser_get_preview_uri().
11642 // or %NULL if no file is selected. Free with g_object_unref().
11643 // RETURNS: the #GFile for the file to preview,
11644 Gio2.File* /*new*/ get_preview_file()() nothrow {
11645 return gtk_file_chooser_get_preview_file(cast(FileChooser*)&this);
11648 // VERSION: 2.4
11649 // Gets the filename that should be previewed in a custom preview
11650 // widget. See gtk_file_chooser_set_preview_widget().
11652 // no file is selected, or if the selected file cannot be represented
11653 // as a local filename. Free with g_free()
11654 // RETURNS: the filename to preview, or %NULL if
11655 char* /*new*/ get_preview_filename()() nothrow {
11656 return gtk_file_chooser_get_preview_filename(cast(FileChooser*)&this);
11659 // VERSION: 2.4
11660 // Gets the URI that should be previewed in a custom preview
11661 // widget. See gtk_file_chooser_set_preview_widget().
11663 // selected. Free with g_free().
11664 // RETURNS: the URI for the file to preview, or %NULL if no file is
11665 char* /*new*/ get_preview_uri()() nothrow {
11666 return gtk_file_chooser_get_preview_uri(cast(FileChooser*)&this);
11669 // VERSION: 2.4
11670 // Gets the current preview widget; see
11671 // gtk_file_chooser_set_preview_widget().
11672 // RETURNS: the current preview widget, or %NULL
11673 Widget* get_preview_widget()() nothrow {
11674 return gtk_file_chooser_get_preview_widget(cast(FileChooser*)&this);
11677 // VERSION: 2.4
11678 // Gets whether the preview widget set by gtk_file_chooser_set_preview_widget()
11679 // should be shown for the current filename. See
11680 // gtk_file_chooser_set_preview_widget_active().
11681 // RETURNS: %TRUE if the preview widget is active for the current filename.
11682 int get_preview_widget_active()() nothrow {
11683 return gtk_file_chooser_get_preview_widget_active(cast(FileChooser*)&this);
11686 // VERSION: 2.4
11687 // Gets whether multiple files can be selected in the file
11688 // selector. See gtk_file_chooser_set_select_multiple().
11689 // RETURNS: %TRUE if multiple files can be selected.
11690 int get_select_multiple()() nothrow {
11691 return gtk_file_chooser_get_select_multiple(cast(FileChooser*)&this);
11694 // VERSION: 2.6
11695 // Gets whether hidden files and folders are displayed in the file selector.
11696 // See gtk_file_chooser_set_show_hidden().
11697 // RETURNS: %TRUE if hidden files and folders are displayed.
11698 int get_show_hidden()() nothrow {
11699 return gtk_file_chooser_get_show_hidden(cast(FileChooser*)&this);
11702 // VERSION: 2.4
11703 // Gets the URI for the currently selected file in
11704 // the file selector. If multiple files are selected,
11705 // one of the filenames will be returned at random.
11707 // If the file chooser is in folder mode, this function returns the selected
11708 // folder.
11710 // if no file is selected. Free with g_free()
11711 // RETURNS: The currently selected URI, or %NULL
11712 char* /*new*/ get_uri()() nothrow {
11713 return gtk_file_chooser_get_uri(cast(FileChooser*)&this);
11716 // VERSION: 2.4
11717 // Lists all the selected files and subfolders in the current folder of
11718 // @chooser. The returned names are full absolute URIs.
11720 // files and subfolders in the current folder. Free the returned list
11721 // with g_slist_free(), and the filenames with g_free().
11722 // RETURNS: a #GSList containing the URIs of all selected
11723 GLib2.SList* /*new*/ get_uris()() nothrow {
11724 return gtk_file_chooser_get_uris(cast(FileChooser*)&this);
11727 // Gets whether a stock label should be drawn with the name of the previewed
11728 // file. See gtk_file_chooser_set_use_preview_label().
11730 // name of the previewed file, %FALSE otherwise.
11731 // RETURNS: %TRUE if the file chooser is set to display a label with the
11732 int get_use_preview_label()() nothrow {
11733 return gtk_file_chooser_get_use_preview_label(cast(FileChooser*)&this);
11736 // VERSION: 2.4
11737 // Lists the current set of user-selectable filters; see
11738 // gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().
11740 // #GSList containing the current set of user selectable filters. The
11741 // contents of the list are owned by GTK+, but you must free the list
11742 // itself with g_slist_free() when you are done with it.
11743 // RETURNS: a
11744 GLib2.SList* /*new container*/ list_filters()() nothrow {
11745 return gtk_file_chooser_list_filters(cast(FileChooser*)&this);
11748 // VERSION: 2.4
11749 // Queries the list of shortcut folders in the file chooser, as set by
11750 // gtk_file_chooser_add_shortcut_folder_uri().
11752 // URIs, or %NULL if there are no shortcut folders. Free the returned
11753 // list with g_slist_free(), and the URIs with g_free().
11754 // RETURNS: A list of folder
11755 GLib2.SList* /*new*/ list_shortcut_folder_uris()() nothrow {
11756 return gtk_file_chooser_list_shortcut_folder_uris(cast(FileChooser*)&this);
11759 // VERSION: 2.4
11760 // Queries the list of shortcut folders in the file chooser, as set by
11761 // gtk_file_chooser_add_shortcut_folder().
11763 // folder filenames, or %NULL if there are no shortcut folders. Free
11764 // the returned list with g_slist_free(), and the filenames with
11765 // g_free().
11766 // RETURNS: A list of
11767 GLib2.SList* /*new*/ list_shortcut_folders()() nothrow {
11768 return gtk_file_chooser_list_shortcut_folders(cast(FileChooser*)&this);
11771 // VERSION: 2.4
11772 // Removes @filter from the list of filters that the user can select between.
11773 // <filter>: a #GtkFileFilter
11774 void remove_filter(AT0)(AT0 /*FileFilter*/ filter) nothrow {
11775 gtk_file_chooser_remove_filter(cast(FileChooser*)&this, UpCast!(FileFilter*)(filter));
11778 // VERSION: 2.4
11779 // Removes a folder from a file chooser's list of shortcut folders.
11781 // In the latter case, the @error will be set as appropriate.
11783 // See also: gtk_file_chooser_add_shortcut_folder()
11784 // RETURNS: %TRUE if the operation succeeds, %FALSE otherwise.
11785 // <folder>: filename of the folder to remove
11786 int remove_shortcut_folder(AT0, AT1)(AT0 /*char*/ folder, AT1 /*GLib2.Error**/ error=null) nothrow {
11787 return gtk_file_chooser_remove_shortcut_folder(cast(FileChooser*)&this, toCString!(char*)(folder), UpCast!(GLib2.Error**)(error));
11790 // VERSION: 2.4
11791 // Removes a folder URI from a file chooser's list of shortcut folders.
11793 // In the latter case, the @error will be set as appropriate.
11795 // See also: gtk_file_chooser_add_shortcut_folder_uri()
11796 // RETURNS: %TRUE if the operation succeeds, %FALSE otherwise.
11797 // <uri>: URI of the folder to remove
11798 int remove_shortcut_folder_uri(AT0, AT1)(AT0 /*char*/ uri, AT1 /*GLib2.Error**/ error=null) nothrow {
11799 return gtk_file_chooser_remove_shortcut_folder_uri(cast(FileChooser*)&this, toCString!(char*)(uri), UpCast!(GLib2.Error**)(error));
11802 // VERSION: 2.4
11803 // Selects all the files in the current folder of a file chooser.
11804 void select_all()() nothrow {
11805 gtk_file_chooser_select_all(cast(FileChooser*)&this);
11808 // VERSION: 2.14
11809 // Selects the file referred to by @file. An internal function. See
11810 // _gtk_file_chooser_select_uri().
11812 // selected successfully, %FALSE otherwise.
11813 // RETURNS: %TRUE if both the folder could be changed and the path was
11814 // <file>: the file to select
11815 int select_file(AT0, AT1)(AT0 /*Gio2.File*/ file, AT1 /*GLib2.Error**/ error=null) nothrow {
11816 return gtk_file_chooser_select_file(cast(FileChooser*)&this, UpCast!(Gio2.File*)(file), UpCast!(GLib2.Error**)(error));
11819 // VERSION: 2.4
11820 // Selects a filename. If the file name isn't in the current
11821 // folder of @chooser, then the current folder of @chooser will
11822 // be changed to the folder containing @filename.
11824 // selected successfully, %FALSE otherwise.
11825 // RETURNS: %TRUE if both the folder could be changed and the file was
11826 // <filename>: the filename to select
11827 int select_filename(AT0)(AT0 /*char*/ filename) nothrow {
11828 return gtk_file_chooser_select_filename(cast(FileChooser*)&this, toCString!(char*)(filename));
11831 // VERSION: 2.4
11832 // Selects the file to by @uri. If the URI doesn't refer to a
11833 // file in the current folder of @chooser, then the current folder of
11834 // @chooser will be changed to the folder containing @filename.
11836 // selected successfully, %FALSE otherwise.
11837 // RETURNS: %TRUE if both the folder could be changed and the URI was
11838 // <uri>: the URI to select
11839 int select_uri(AT0)(AT0 /*char*/ uri) nothrow {
11840 return gtk_file_chooser_select_uri(cast(FileChooser*)&this, toCString!(char*)(uri));
11843 // VERSION: 2.4
11844 // Sets the type of operation that the chooser is performing; the
11845 // user interface is adapted to suit the selected action. For example,
11846 // an option to create a new folder might be shown if the action is
11847 // %GTK_FILE_CHOOSER_ACTION_SAVE but not if the action is
11848 // %GTK_FILE_CHOOSER_ACTION_OPEN.
11849 // <action>: the action that the file selector is performing
11850 void set_action()(FileChooserAction action) nothrow {
11851 gtk_file_chooser_set_action(cast(FileChooser*)&this, action);
11854 // VERSION: 2.18
11855 // Sets whether file choser will offer to create new folders.
11856 // This is only relevant if the action is not set to be
11857 // %GTK_FILE_CHOOSER_ACTION_OPEN.
11858 // <create_folders>: %TRUE if the New Folder button should be displayed
11859 void set_create_folders()(int create_folders) nothrow {
11860 gtk_file_chooser_set_create_folders(cast(FileChooser*)&this, create_folders);
11863 // VERSION: 2.4
11864 // Sets the current folder for @chooser from a local filename.
11865 // The user will be shown the full contents of the current folder,
11866 // plus user interface elements for navigating to other folders.
11868 // otherwise.
11869 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
11870 // <filename>: the full path of the new current folder
11871 int set_current_folder(AT0)(AT0 /*char*/ filename) nothrow {
11872 return gtk_file_chooser_set_current_folder(cast(FileChooser*)&this, toCString!(char*)(filename));
11875 // VERSION: 2.14
11876 // Sets the current folder for @chooser from a #GFile.
11877 // Internal function, see gtk_file_chooser_set_current_folder_uri().
11879 // otherwise.
11880 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
11881 // <file>: the #GFile for the new folder
11882 int set_current_folder_file(AT0, AT1)(AT0 /*Gio2.File*/ file, AT1 /*GLib2.Error**/ error=null) nothrow {
11883 return gtk_file_chooser_set_current_folder_file(cast(FileChooser*)&this, UpCast!(Gio2.File*)(file), UpCast!(GLib2.Error**)(error));
11886 // VERSION: 2.4
11887 // Sets the current folder for @chooser from an URI.
11888 // The user will be shown the full contents of the current folder,
11889 // plus user interface elements for navigating to other folders.
11891 // otherwise.
11892 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
11893 // <uri>: the URI for the new current folder
11894 int set_current_folder_uri(AT0)(AT0 /*char*/ uri) nothrow {
11895 return gtk_file_chooser_set_current_folder_uri(cast(FileChooser*)&this, toCString!(char*)(uri));
11898 // VERSION: 2.4
11899 // Sets the current name in the file selector, as if entered
11900 // by the user. Note that the name passed in here is a UTF-8
11901 // string rather than a filename. This function is meant for
11902 // such uses as a suggested name in a "Save As..." dialog.
11904 // If you want to preselect a particular existing file, you should use
11905 // gtk_file_chooser_set_filename() or gtk_file_chooser_set_uri() instead.
11906 // Please see the documentation for those functions for an example of using
11907 // gtk_file_chooser_set_current_name() as well.
11908 // <name>: the filename to use, as a UTF-8 string
11909 void set_current_name(AT0)(AT0 /*char*/ name) nothrow {
11910 gtk_file_chooser_set_current_name(cast(FileChooser*)&this, toCString!(char*)(name));
11913 // VERSION: 2.8
11914 // Sets whether a file chooser in %GTK_FILE_CHOOSER_ACTION_SAVE mode will present
11915 // a confirmation dialog if the user types a file name that already exists. This
11916 // is %FALSE by default.
11918 // Regardless of this setting, the @chooser will emit the
11919 // #GtkFileChooser::confirm-overwrite signal when appropriate.
11921 // If all you need is the stock confirmation dialog, set this property to %TRUE.
11922 // You can override the way confirmation is done by actually handling the
11923 // #GtkFileChooser::confirm-overwrite signal; please refer to its documentation
11924 // for the details.
11925 // <do_overwrite_confirmation>: whether to confirm overwriting in save mode
11926 void set_do_overwrite_confirmation()(int do_overwrite_confirmation) nothrow {
11927 gtk_file_chooser_set_do_overwrite_confirmation(cast(FileChooser*)&this, do_overwrite_confirmation);
11930 // VERSION: 2.4
11931 // Sets an application-supplied widget to provide extra options to the user.
11932 // <extra_widget>: widget for extra options
11933 void set_extra_widget(AT0)(AT0 /*Widget*/ extra_widget) nothrow {
11934 gtk_file_chooser_set_extra_widget(cast(FileChooser*)&this, UpCast!(Widget*)(extra_widget));
11937 // VERSION: 2.14
11938 // Sets @file as the current filename for the file chooser, by changing
11939 // to the file's parent folder and actually selecting the file in list. If
11940 // the @chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name
11941 // will also appear in the dialog's file name entry.
11943 // If the file name isn't in the current folder of @chooser, then the current
11944 // folder of @chooser will be changed to the folder containing @filename. This
11945 // is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by
11946 // gtk_file_chooser_select_filename().
11948 // Note that the file must exist, or nothing will be done except
11949 // for the directory change.
11951 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
11952 // you should use this function if you already have a file name to which the
11953 // user may save; for example, when the user opens an existing file and then
11954 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
11955 // a file name already &mdash; for example, if the user just created a new
11956 // file and is saving it for the first time, do not call this function.
11957 // Instead, use something similar to this:
11958 // |[
11959 // if (document_is_new)
11960 // {
11961 // /&ast; the user just created a new document &ast;/
11962 // gtk_file_chooser_set_current_folder_file (chooser, default_file_for_saving);
11963 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
11964 // }
11965 // else
11966 // {
11967 // /&ast; the user edited an existing document &ast;/
11968 // gtk_file_chooser_set_file (chooser, existing_file);
11969 // }
11970 // ]|
11972 // selected successfully, %FALSE otherwise.
11973 // RETURNS: %TRUE if both the folder could be changed and the file was
11974 // <file>: the #GFile to set as current
11975 int set_file(AT0, AT1)(AT0 /*Gio2.File*/ file, AT1 /*GLib2.Error**/ error=null) nothrow {
11976 return gtk_file_chooser_set_file(cast(FileChooser*)&this, UpCast!(Gio2.File*)(file), UpCast!(GLib2.Error**)(error));
11979 // VERSION: 2.4
11980 // Sets @filename as the current filename for the file chooser, by changing
11981 // to the file's parent folder and actually selecting the file in list. If
11982 // the @chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name
11983 // will also appear in the dialog's file name entry.
11985 // If the file name isn't in the current folder of @chooser, then the current
11986 // folder of @chooser will be changed to the folder containing @filename. This
11987 // is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by
11988 // gtk_file_chooser_select_filename().
11990 // Note that the file must exist, or nothing will be done except
11991 // for the directory change.
11993 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
11994 // you should use this function if you already have a file name to which the
11995 // user may save; for example, when the user opens an existing file and then
11996 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
11997 // a file name already &mdash; for example, if the user just created a new
11998 // file and is saving it for the first time, do not call this function.
11999 // Instead, use something similar to this:
12000 // |[
12001 // if (document_is_new)
12002 // {
12003 // /&ast; the user just created a new document &ast;/
12004 // gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving);
12005 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
12006 // }
12007 // else
12008 // {
12009 // /&ast; the user edited an existing document &ast;/
12010 // gtk_file_chooser_set_filename (chooser, existing_filename);
12011 // }
12012 // ]|
12014 // selected successfully, %FALSE otherwise.
12015 // RETURNS: %TRUE if both the folder could be changed and the file was
12016 // <filename>: the filename to set as current
12017 int set_filename(AT0)(AT0 /*char*/ filename) nothrow {
12018 return gtk_file_chooser_set_filename(cast(FileChooser*)&this, toCString!(char*)(filename));
12021 // VERSION: 2.4
12022 // Sets the current filter; only the files that pass the
12023 // filter will be displayed. If the user-selectable list of filters
12024 // is non-empty, then the filter should be one of the filters
12025 // in that list. Setting the current filter when the list of
12026 // filters is empty is useful if you want to restrict the displayed
12027 // set of files without letting the user change it.
12028 // <filter>: a #GtkFileFilter
12029 void set_filter(AT0)(AT0 /*FileFilter*/ filter) nothrow {
12030 gtk_file_chooser_set_filter(cast(FileChooser*)&this, UpCast!(FileFilter*)(filter));
12033 // VERSION: 2.4
12034 // Sets whether only local files can be selected in the
12035 // file selector. If @local_only is %TRUE (the default),
12036 // then the selected file are files are guaranteed to be
12037 // accessible through the operating systems native file
12038 // file system and therefore the application only
12039 // needs to worry about the filename functions in
12040 // #GtkFileChooser, like gtk_file_chooser_get_filename(),
12041 // rather than the URI functions like
12042 // gtk_file_chooser_get_uri(),
12043 // <local_only>: %TRUE if only local files can be selected
12044 void set_local_only()(int local_only) nothrow {
12045 gtk_file_chooser_set_local_only(cast(FileChooser*)&this, local_only);
12048 // VERSION: 2.4
12049 // Sets an application-supplied widget to use to display a custom preview
12050 // of the currently selected file. To implement a preview, after setting the
12051 // preview widget, you connect to the #GtkFileChooser::update-preview
12052 // signal, and call gtk_file_chooser_get_preview_filename() or
12053 // gtk_file_chooser_get_preview_uri() on each change. If you can
12054 // display a preview of the new file, update your widget and
12055 // set the preview active using gtk_file_chooser_set_preview_widget_active().
12056 // Otherwise, set the preview inactive.
12058 // When there is no application-supplied preview widget, or the
12059 // application-supplied preview widget is not active, the file chooser
12060 // may display an internally generated preview of the current file or
12061 // it may display no preview at all.
12062 // <preview_widget>: widget for displaying preview.
12063 void set_preview_widget(AT0)(AT0 /*Widget*/ preview_widget) nothrow {
12064 gtk_file_chooser_set_preview_widget(cast(FileChooser*)&this, UpCast!(Widget*)(preview_widget));
12067 // VERSION: 2.4
12068 // Sets whether the preview widget set by
12069 // gtk_file_chooser_set_preview_widget() should be shown for the
12070 // current filename. When @active is set to false, the file chooser
12071 // may display an internally generated preview of the current file
12072 // or it may display no preview at all. See
12073 // gtk_file_chooser_set_preview_widget() for more details.
12074 // <active>: whether to display the user-specified preview widget
12075 void set_preview_widget_active()(int active) nothrow {
12076 gtk_file_chooser_set_preview_widget_active(cast(FileChooser*)&this, active);
12079 // VERSION: 2.4
12080 // Sets whether multiple files can be selected in the file selector. This is
12081 // only relevant if the action is set to be %GTK_FILE_CHOOSER_ACTION_OPEN or
12082 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
12083 // <select_multiple>: %TRUE if multiple files can be selected.
12084 void set_select_multiple()(int select_multiple) nothrow {
12085 gtk_file_chooser_set_select_multiple(cast(FileChooser*)&this, select_multiple);
12088 // VERSION: 2.6
12089 // Sets whether hidden files and folders are displayed in the file selector.
12090 // <show_hidden>: %TRUE if hidden files and folders should be displayed.
12091 void set_show_hidden()(int show_hidden) nothrow {
12092 gtk_file_chooser_set_show_hidden(cast(FileChooser*)&this, show_hidden);
12095 // VERSION: 2.4
12096 // Sets the file referred to by @uri as the current file for the file chooser,
12097 // by changing to the URI's parent folder and actually selecting the URI in the
12098 // list. If the @chooser is %GTK_FILE_CHOOSER_ACTION_SAVE mode, the URI's base
12099 // name will also appear in the dialog's file name entry.
12101 // If the URI isn't in the current folder of @chooser, then the current folder
12102 // of @chooser will be changed to the folder containing @uri. This is equivalent
12103 // to a sequence of gtk_file_chooser_unselect_all() followed by
12104 // gtk_file_chooser_select_uri().
12106 // Note that the URI must exist, or nothing will be done except for the
12107 // directory change.
12108 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
12109 // you should use this function if you already have a file name to which the
12110 // user may save; for example, when the user opens an existing file and then
12111 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
12112 // a file name already &mdash; for example, if the user just created a new
12113 // file and is saving it for the first time, do not call this function.
12114 // Instead, use something similar to this:
12115 // |[
12116 // if (document_is_new)
12117 // {
12118 // /&ast; the user just created a new document &ast;/
12119 // gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving);
12120 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
12121 // }
12122 // else
12123 // {
12124 // /&ast; the user edited an existing document &ast;/
12125 // gtk_file_chooser_set_uri (chooser, existing_uri);
12126 // }
12127 // ]|
12129 // selected successfully, %FALSE otherwise.
12130 // RETURNS: %TRUE if both the folder could be changed and the URI was
12131 // <uri>: the URI to set as current
12132 int set_uri(AT0)(AT0 /*char*/ uri) nothrow {
12133 return gtk_file_chooser_set_uri(cast(FileChooser*)&this, toCString!(char*)(uri));
12136 // VERSION: 2.4
12137 // Sets whether the file chooser should display a stock label with the name of
12138 // the file that is being previewed; the default is %TRUE. Applications that
12139 // want to draw the whole preview area themselves should set this to %FALSE and
12140 // display the name themselves in their preview widget.
12142 // See also: gtk_file_chooser_set_preview_widget()
12143 // <use_label>: whether to display a stock label with the name of the previewed file
12144 void set_use_preview_label()(int use_label) nothrow {
12145 gtk_file_chooser_set_use_preview_label(cast(FileChooser*)&this, use_label);
12148 // VERSION: 2.4
12149 // Unselects all the files in the current folder of a file chooser.
12150 void unselect_all()() nothrow {
12151 gtk_file_chooser_unselect_all(cast(FileChooser*)&this);
12154 // VERSION: 2.14
12155 // Unselects the file referred to by @file. If the file is not in the current
12156 // directory, does not exist, or is otherwise not currently selected, does nothing.
12157 // <file>: a #GFile
12158 void unselect_file(AT0)(AT0 /*Gio2.File*/ file) nothrow {
12159 gtk_file_chooser_unselect_file(cast(FileChooser*)&this, UpCast!(Gio2.File*)(file));
12162 // VERSION: 2.4
12163 // Unselects a currently selected filename. If the filename
12164 // is not in the current directory, does not exist, or
12165 // is otherwise not currently selected, does nothing.
12166 // <filename>: the filename to unselect
12167 void unselect_filename(AT0)(AT0 /*char*/ filename) nothrow {
12168 gtk_file_chooser_unselect_filename(cast(FileChooser*)&this, toCString!(char*)(filename));
12171 // VERSION: 2.4
12172 // Unselects the file referred to by @uri. If the file
12173 // is not in the current directory, does not exist, or
12174 // is otherwise not currently selected, does nothing.
12175 // <uri>: the URI to unselect
12176 void unselect_uri(AT0)(AT0 /*char*/ uri) nothrow {
12177 gtk_file_chooser_unselect_uri(cast(FileChooser*)&this, toCString!(char*)(uri));
12180 // VERSION: 2.8
12181 // This signal gets emitted whenever it is appropriate to present a
12182 // confirmation dialog when the user has selected a file name that
12183 // already exists. The signal only gets emitted when the file
12184 // chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode.
12186 // Most applications just need to turn on the
12187 // #GtkFileChooser:do-overwrite-confirmation property (or call the
12188 // gtk_file_chooser_set_do_overwrite_confirmation() function), and
12189 // they will automatically get a stock confirmation dialog.
12190 // Applications which need to customize this behavior should do
12191 // that, and also connect to the #GtkFileChooser::confirm-overwrite
12192 // signal.
12194 // A signal handler for this signal must return a
12195 // #GtkFileChooserConfirmation value, which indicates the action to
12196 // take. If the handler determines that the user wants to select a
12197 // different filename, it should return
12198 // %GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN. If it determines
12199 // that the user is satisfied with his choice of file name, it
12200 // should return %GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME.
12201 // On the other hand, if it determines that the stock confirmation
12202 // dialog should be used, it should return
12203 // %GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM. The following example
12204 // illustrates this.
12205 // <example id="gtkfilechooser-confirmation">
12206 // <title>Custom confirmation</title>
12207 // <programlisting>
12208 // static GtkFileChooserConfirmation
12209 // confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
12210 // {
12211 // char *uri;
12213 // uri = gtk_file_chooser_get_uri (chooser);
12215 // if (is_uri_read_only (uri))
12216 // {
12217 // if (user_wants_to_replace_read_only_file (uri))
12218 // return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME;
12219 // else
12220 // return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN;
12221 // } else
12222 // return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; // fall back to the default dialog
12223 // }
12225 // ...
12227 // chooser = gtk_file_chooser_dialog_new (...);
12229 // gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
12230 // g_signal_connect (chooser, "confirm-overwrite",
12231 // G_CALLBACK (confirm_overwrite_callback), NULL);
12233 // if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT)
12234 // save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
12236 // gtk_widget_destroy (chooser);
12237 // </programlisting>
12238 // </example>
12240 // action to take after emitting the signal.
12241 // RETURNS: a #GtkFileChooserConfirmation value that indicates which
12242 extern (C) alias static FileChooserConfirmation* function (FileChooser* this_, void* user_data=null) nothrow signal_confirm_overwrite;
12244 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12245 return super_.signal_connect!name(cb, data, cf);
12248 ulong signal_connect(string name:"confirm-overwrite", CB/*:signal_confirm_overwrite*/)
12249 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
12250 if (is(typeof(cb)==signal_confirm_overwrite)||_ttmm!(CB, signal_confirm_overwrite)()) {
12251 return signal_connect_data!()(&this, cast(char*)"confirm-overwrite",
12252 cast(GObject2.Callback)cb, data, null, cf);
12255 // This signal is emitted when the current folder in a #GtkFileChooser
12256 // changes. This can happen due to the user performing some action that
12257 // changes folders, such as selecting a bookmark or visiting a folder on the
12258 // file list. It can also happen as a result of calling a function to
12259 // explicitly change the current folder in a file chooser.
12261 // Normally you do not need to connect to this signal, unless you need to keep
12262 // track of which folder a file chooser is showing.
12264 // See also: gtk_file_chooser_set_current_folder(),
12265 // gtk_file_chooser_get_current_folder(),
12266 // gtk_file_chooser_set_current_folder_uri(),
12267 // gtk_file_chooser_get_current_folder_uri().
12268 extern (C) alias static void function (FileChooser* this_, void* user_data=null) nothrow signal_current_folder_changed;
12269 ulong signal_connect(string name:"current-folder-changed", CB/*:signal_current_folder_changed*/)
12270 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
12271 if (is(typeof(cb)==signal_current_folder_changed)||_ttmm!(CB, signal_current_folder_changed)()) {
12272 return signal_connect_data!()(&this, cast(char*)"current-folder-changed",
12273 cast(GObject2.Callback)cb, data, null, cf);
12276 // This signal is emitted when the user "activates" a file in the file
12277 // chooser. This can happen by double-clicking on a file in the file list, or
12278 // by pressing <keycap>Enter</keycap>.
12280 // Normally you do not need to connect to this signal. It is used internally
12281 // by #GtkFileChooserDialog to know when to activate the default button in the
12282 // dialog.
12284 // See also: gtk_file_chooser_get_filename(),
12285 // gtk_file_chooser_get_filenames(), gtk_file_chooser_get_uri(),
12286 // gtk_file_chooser_get_uris().
12287 extern (C) alias static void function (FileChooser* this_, void* user_data=null) nothrow signal_file_activated;
12288 ulong signal_connect(string name:"file-activated", CB/*:signal_file_activated*/)
12289 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
12290 if (is(typeof(cb)==signal_file_activated)||_ttmm!(CB, signal_file_activated)()) {
12291 return signal_connect_data!()(&this, cast(char*)"file-activated",
12292 cast(GObject2.Callback)cb, data, null, cf);
12295 // This signal is emitted when there is a change in the set of selected files
12296 // in a #GtkFileChooser. This can happen when the user modifies the selection
12297 // with the mouse or the keyboard, or when explicitly calling functions to
12298 // change the selection.
12300 // Normally you do not need to connect to this signal, as it is easier to wait
12301 // for the file chooser to finish running, and then to get the list of
12302 // selected files using the functions mentioned below.
12304 // See also: gtk_file_chooser_select_filename(),
12305 // gtk_file_chooser_unselect_filename(), gtk_file_chooser_get_filename(),
12306 // gtk_file_chooser_get_filenames(), gtk_file_chooser_select_uri(),
12307 // gtk_file_chooser_unselect_uri(), gtk_file_chooser_get_uri(),
12308 // gtk_file_chooser_get_uris().
12309 extern (C) alias static void function (FileChooser* this_, void* user_data=null) nothrow signal_selection_changed;
12310 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)
12311 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
12312 if (is(typeof(cb)==signal_selection_changed)||_ttmm!(CB, signal_selection_changed)()) {
12313 return signal_connect_data!()(&this, cast(char*)"selection-changed",
12314 cast(GObject2.Callback)cb, data, null, cf);
12317 // This signal is emitted when the preview in a file chooser should be
12318 // regenerated. For example, this can happen when the currently selected file
12319 // changes. You should use this signal if you want your file chooser to have
12320 // a preview widget.
12322 // Once you have installed a preview widget with
12323 // gtk_file_chooser_set_preview_widget(), you should update it when this
12324 // signal is emitted. You can use the functions
12325 // gtk_file_chooser_get_preview_filename() or
12326 // gtk_file_chooser_get_preview_uri() to get the name of the file to preview.
12327 // Your widget may not be able to preview all kinds of files; your callback
12328 // must call gtk_file_chooser_set_preview_widget_active() to inform the file
12329 // chooser about whether the preview was generated successfully or not.
12331 // Please see the example code in <xref linkend="gtkfilechooser-preview"/>.
12333 // See also: gtk_file_chooser_set_preview_widget(),
12334 // gtk_file_chooser_set_preview_widget_active(),
12335 // gtk_file_chooser_set_use_preview_label(),
12336 // gtk_file_chooser_get_preview_filename(),
12337 // gtk_file_chooser_get_preview_uri().
12338 extern (C) alias static void function (FileChooser* this_, void* user_data=null) nothrow signal_update_preview;
12339 ulong signal_connect(string name:"update-preview", CB/*:signal_update_preview*/)
12340 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
12341 if (is(typeof(cb)==signal_update_preview)||_ttmm!(CB, signal_update_preview)()) {
12342 return signal_connect_data!()(&this, cast(char*)"update-preview",
12343 cast(GObject2.Callback)cb, data, null, cf);
12346 mixin __interface__;
12350 // Describes whether a #GtkFileChooser is being used to open existing files
12351 // or to save to a possibly new file.
12352 enum FileChooserAction {
12353 OPEN = 0,
12354 SAVE = 1,
12355 SELECT_FOLDER = 2,
12356 CREATE_FOLDER = 3
12358 struct FileChooserButton /* : HBox */ {
12359 mixin Atk.ImplementorIface.__interface__;
12360 mixin Buildable.__interface__;
12361 mixin FileChooser.__interface__;
12362 mixin Orientable.__interface__;
12363 alias parent this;
12364 alias parent super_;
12365 alias parent hbox;
12366 HBox parent;
12367 private FileChooserButtonPrivate* priv;
12370 // VERSION: 2.6
12371 // Creates a new file-selecting button widget.
12372 // RETURNS: a new button widget.
12373 // <title>: the title of the browse dialog.
12374 // <action>: the open mode for the widget.
12375 static FileChooserButton* new_(AT0)(AT0 /*char*/ title, FileChooserAction action) nothrow {
12376 return gtk_file_chooser_button_new(toCString!(char*)(title), action);
12378 static auto opCall(AT0)(AT0 /*char*/ title, FileChooserAction action) {
12379 return gtk_file_chooser_button_new(toCString!(char*)(title), action);
12382 // VERSION: 2.6
12383 // DEPRECATED (v2.14) constructor: new_with_backend - Use gtk_file_chooser_button_new() instead.
12384 // Creates a new file-selecting button widget using @backend.
12385 // RETURNS: a new button widget.
12386 // <title>: the title of the browse dialog.
12387 // <action>: the open mode for the widget.
12388 // <backend>: the name of the #GtkFileSystem backend to use.
12389 static FileChooserButton* new_with_backend(AT0, AT1)(AT0 /*char*/ title, FileChooserAction action, AT1 /*char*/ backend) nothrow {
12390 return gtk_file_chooser_button_new_with_backend(toCString!(char*)(title), action, toCString!(char*)(backend));
12392 static auto opCall(AT0, AT1)(AT0 /*char*/ title, FileChooserAction action, AT1 /*char*/ backend) {
12393 return gtk_file_chooser_button_new_with_backend(toCString!(char*)(title), action, toCString!(char*)(backend));
12396 // VERSION: 2.6
12397 // Creates a #GtkFileChooserButton widget which uses @dialog as its
12398 // file-picking window.
12400 // Note that @dialog must be a #GtkDialog (or subclass) which
12401 // implements the #GtkFileChooser interface and must not have
12402 // %GTK_DIALOG_DESTROY_WITH_PARENT set.
12404 // Also note that the dialog needs to have its confirmative button
12405 // added with response %GTK_RESPONSE_ACCEPT or %GTK_RESPONSE_OK in
12406 // order for the button to take over the file selected in the dialog.
12407 // RETURNS: a new button widget.
12408 // <dialog>: the widget to use as dialog
12409 static FileChooserButton* new_with_dialog(AT0)(AT0 /*Widget*/ dialog) nothrow {
12410 return gtk_file_chooser_button_new_with_dialog(UpCast!(Widget*)(dialog));
12412 static auto opCall(AT0)(AT0 /*Widget*/ dialog) {
12413 return gtk_file_chooser_button_new_with_dialog(UpCast!(Widget*)(dialog));
12416 // VERSION: 2.10
12417 // Returns whether the button grabs focus when it is clicked with the mouse.
12418 // See gtk_file_chooser_button_set_focus_on_click().
12420 // the mouse.
12421 // RETURNS: %TRUE if the button grabs focus when it is clicked with
12422 int get_focus_on_click()() nothrow {
12423 return gtk_file_chooser_button_get_focus_on_click(&this);
12426 // VERSION: 2.6
12427 // Retrieves the title of the browse dialog used by @button. The returned value
12428 // should not be modified or freed.
12429 // RETURNS: a pointer to the browse dialog's title.
12430 char* get_title()() nothrow {
12431 return gtk_file_chooser_button_get_title(&this);
12434 // VERSION: 2.6
12435 // Retrieves the width in characters of the @button widget's entry and/or label.
12436 // RETURNS: an integer width (in characters) that the button will use to size itself.
12437 int get_width_chars()() nothrow {
12438 return gtk_file_chooser_button_get_width_chars(&this);
12441 // VERSION: 2.10
12442 // Sets whether the button will grab focus when it is clicked with the mouse.
12443 // Making mouse clicks not grab focus is useful in places like toolbars where
12444 // you don't want the keyboard focus removed from the main area of the
12445 // application.
12446 // <focus_on_click>: whether the button grabs focus when clicked with the mouse
12447 void set_focus_on_click()(int focus_on_click) nothrow {
12448 gtk_file_chooser_button_set_focus_on_click(&this, focus_on_click);
12451 // VERSION: 2.6
12452 // Modifies the @title of the browse dialog used by @button.
12453 // <title>: the new browse dialog title.
12454 void set_title(AT0)(AT0 /*char*/ title) nothrow {
12455 gtk_file_chooser_button_set_title(&this, toCString!(char*)(title));
12458 // VERSION: 2.6
12459 // Sets the width (in characters) that @button will use to @n_chars.
12460 // <n_chars>: the new width, in characters.
12461 void set_width_chars()(int n_chars) nothrow {
12462 gtk_file_chooser_button_set_width_chars(&this, n_chars);
12465 // VERSION: 2.12
12466 // The ::file-set signal is emitted when the user selects a file.
12468 // Note that this signal is only emitted when the <emphasis>user</emphasis>
12469 // changes the file.
12470 extern (C) alias static void function (FileChooserButton* this_, void* user_data=null) nothrow signal_file_set;
12472 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12473 return super_.signal_connect!name(cb, data, cf);
12476 ulong signal_connect(string name:"file-set", CB/*:signal_file_set*/)
12477 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
12478 if (is(typeof(cb)==signal_file_set)||_ttmm!(CB, signal_file_set)()) {
12479 return signal_connect_data!()(&this, cast(char*)"file-set",
12480 cast(GObject2.Callback)cb, data, null, cf);
12484 struct FileChooserButtonClass {
12485 private HBoxClass parent_class;
12486 extern (C) void function (FileChooserButton* fc) nothrow file_set;
12487 private void* __gtk_reserved1, __gtk_reserved2, __gtk_reserved3, __gtk_reserved4, __gtk_reserved5, __gtk_reserved6, __gtk_reserved7;
12490 struct FileChooserButtonPrivate {
12494 // Used as a return value of handlers for the
12495 // #GtkFileChooser::confirm-overwrite signal of a #GtkFileChooser. This
12496 // value determines whether the file chooser will present the stock
12497 // confirmation dialog, accept the user's choice of a filename, or
12498 // let the user choose another filename.
12499 enum FileChooserConfirmation /* Version 2.8 */ {
12500 CONFIRM = 0,
12501 ACCEPT_FILENAME = 1,
12502 SELECT_AGAIN = 2
12504 struct FileChooserDialog /* : Dialog */ {
12505 mixin Atk.ImplementorIface.__interface__;
12506 mixin Buildable.__interface__;
12507 mixin FileChooser.__interface__;
12508 alias parent_instance this;
12509 alias parent_instance super_;
12510 alias parent_instance dialog;
12511 Dialog parent_instance;
12512 FileChooserDialogPrivate* priv;
12515 // Unintrospectable constructor: new() / gtk_file_chooser_dialog_new()
12516 // VERSION: 2.4
12517 // Creates a new #GtkFileChooserDialog. This function is analogous to
12518 // gtk_dialog_new_with_buttons().
12519 // RETURNS: a new #GtkFileChooserDialog
12520 // <title>: Title of the dialog, or %NULL
12521 // <parent>: Transient parent of the dialog, or %NULL
12522 // <action>: Open or save mode for the dialog
12523 // <first_button_text>: stock ID or text to go in the first button, or %NULL
12524 alias gtk_file_chooser_dialog_new new_; // Variadic
12526 // Unintrospectable constructor: new_with_backend() / gtk_file_chooser_dialog_new_with_backend()
12527 // VERSION: 2.4
12528 // DEPRECATED (v2.14) constructor: new_with_backend - Use gtk_file_chooser_dialog_new() instead.
12529 // Creates a new #GtkFileChooserDialog with a specified backend. This is
12530 // especially useful if you use gtk_file_chooser_set_local_only() to allow
12531 // non-local files and you use a more expressive vfs, such as gnome-vfs,
12532 // to load files.
12533 // RETURNS: a new #GtkFileChooserDialog
12534 // <title>: Title of the dialog, or %NULL
12535 // <parent>: Transient parent of the dialog, or %NULL
12536 // <action>: Open or save mode for the dialog
12537 // <backend>: The name of the specific filesystem backend to use.
12538 // <first_button_text>: stock ID or text to go in the first button, or %NULL
12539 alias gtk_file_chooser_dialog_new_with_backend new_with_backend; // Variadic
12542 struct FileChooserDialogClass {
12543 DialogClass parent_class;
12546 struct FileChooserDialogPrivate {
12550 // These identify the various errors that can occur while calling
12551 // #GtkFileChooser functions.
12552 enum FileChooserError {
12553 NONEXISTENT = 0,
12554 BAD_FILENAME = 1,
12555 ALREADY_EXISTS = 2,
12556 INCOMPLETE_HOSTNAME = 3
12558 struct FileChooserWidget /* : VBox */ {
12559 mixin Atk.ImplementorIface.__interface__;
12560 mixin Buildable.__interface__;
12561 mixin FileChooser.__interface__;
12562 mixin Orientable.__interface__;
12563 alias parent_instance this;
12564 alias parent_instance super_;
12565 alias parent_instance vbox;
12566 VBox parent_instance;
12567 FileChooserWidgetPrivate* priv;
12570 // VERSION: 2.4
12571 // Creates a new #GtkFileChooserWidget. This is a file chooser widget that can
12572 // be embedded in custom windows, and it is the same widget that is used by
12573 // #GtkFileChooserDialog.
12574 // RETURNS: a new #GtkFileChooserWidget
12575 // <action>: Open or save mode for the widget
12576 static FileChooserWidget* new_()(FileChooserAction action) nothrow {
12577 return gtk_file_chooser_widget_new(action);
12579 static auto opCall()(FileChooserAction action) {
12580 return gtk_file_chooser_widget_new(action);
12583 // VERSION: 2.4
12584 // DEPRECATED (v2.14) constructor: new_with_backend - Use gtk_file_chooser_widget_new() instead.
12585 // Creates a new #GtkFileChooserWidget with a specified backend. This is
12586 // especially useful if you use gtk_file_chooser_set_local_only() to allow
12587 // non-local files. This is a file chooser widget that can be embedded in
12588 // custom windows and it is the same widget that is used by
12589 // #GtkFileChooserDialog.
12590 // RETURNS: a new #GtkFileChooserWidget
12591 // <action>: Open or save mode for the widget
12592 // <backend>: The name of the specific filesystem backend to use.
12593 static FileChooserWidget* new_with_backend(AT0)(FileChooserAction action, AT0 /*char*/ backend) nothrow {
12594 return gtk_file_chooser_widget_new_with_backend(action, toCString!(char*)(backend));
12596 static auto opCall(AT0)(FileChooserAction action, AT0 /*char*/ backend) {
12597 return gtk_file_chooser_widget_new_with_backend(action, toCString!(char*)(backend));
12601 struct FileChooserWidgetClass {
12602 VBoxClass parent_class;
12605 struct FileChooserWidgetPrivate {
12608 struct FileFilter /* : Object */ {
12609 alias method_parent this;
12610 alias method_parent super_;
12611 alias method_parent object;
12612 Object method_parent;
12615 // VERSION: 2.4
12616 // Creates a new #GtkFileFilter with no rules added to it.
12617 // Such a filter doesn't accept any files, so is not
12618 // particularly useful until you add rules with
12619 // gtk_file_filter_add_mime_type(), gtk_file_filter_add_pattern(),
12620 // or gtk_file_filter_add_custom(). To create a filter
12621 // that accepts any file, use:
12622 // |[
12623 // GtkFileFilter *filter = gtk_file_filter_new ();
12624 // gtk_file_filter_add_pattern (filter, "*");
12625 // ]|
12626 // RETURNS: a new #GtkFileFilter
12627 static FileFilter* new_()() nothrow {
12628 return gtk_file_filter_new();
12630 static auto opCall()() {
12631 return gtk_file_filter_new();
12634 // VERSION: 2.4
12635 // Adds rule to a filter that allows files based on a custom callback
12636 // function. The bitfield @needed which is passed in provides information
12637 // about what sorts of information that the filter function needs;
12638 // this allows GTK+ to avoid retrieving expensive information when
12639 // it isn't needed by the filter.
12640 // <needed>: bitfield of flags indicating the information that the custom filter function needs.
12641 // <func>: callback function; if the function returns %TRUE, then the file will be displayed.
12642 // <data>: data to pass to @func
12643 // <notify>: function to call to free @data when it is no longer needed.
12644 void add_custom(AT0)(FileFilterFlags needed, FileFilterFunc func, AT0 /*void*/ data, GLib2.DestroyNotify notify) nothrow {
12645 gtk_file_filter_add_custom(&this, needed, func, UpCast!(void*)(data), notify);
12648 // VERSION: 2.4
12649 // Adds a rule allowing a given mime type to @filter.
12650 // <mime_type>: name of a MIME type
12651 void add_mime_type(AT0)(AT0 /*char*/ mime_type) nothrow {
12652 gtk_file_filter_add_mime_type(&this, toCString!(char*)(mime_type));
12655 // VERSION: 2.4
12656 // Adds a rule allowing a shell style glob to a filter.
12657 // <pattern>: a shell style glob
12658 void add_pattern(AT0)(AT0 /*char*/ pattern) nothrow {
12659 gtk_file_filter_add_pattern(&this, toCString!(char*)(pattern));
12662 // VERSION: 2.6
12663 // Adds a rule allowing image files in the formats supported
12664 // by GdkPixbuf.
12665 void add_pixbuf_formats()() nothrow {
12666 gtk_file_filter_add_pixbuf_formats(&this);
12669 // VERSION: 2.4
12670 // Tests whether a file should be displayed according to @filter.
12671 // The #GtkFileFilterInfo structure @filter_info should include
12672 // the fields returned from gtk_file_filter_get_needed().
12674 // This function will not typically be used by applications; it
12675 // is intended principally for use in the implementation of
12676 // #GtkFileChooser.
12677 // RETURNS: %TRUE if the file should be displayed
12678 // <filter_info>: a #GtkFileFilterInfo structure containing information about a file.
12679 int filter(AT0)(AT0 /*FileFilterInfo*/ filter_info) nothrow {
12680 return gtk_file_filter_filter(&this, UpCast!(FileFilterInfo*)(filter_info));
12683 // VERSION: 2.4
12684 // Gets the human-readable name for the filter. See gtk_file_filter_set_name().
12686 // or %NULL. This value is owned by GTK+ and must not
12687 // be modified or freed.
12688 // RETURNS: The human-readable name of the filter,
12689 char* get_name()() nothrow {
12690 return gtk_file_filter_get_name(&this);
12693 // VERSION: 2.4
12694 // Gets the fields that need to be filled in for the structure
12695 // passed to gtk_file_filter_filter()
12697 // This function will not typically be used by applications; it
12698 // is intended principally for use in the implementation of
12699 // #GtkFileChooser.
12701 // calling gtk_file_filter_filter()
12702 // RETURNS: bitfield of flags indicating needed fields when
12703 FileFilterFlags get_needed()() nothrow {
12704 return gtk_file_filter_get_needed(&this);
12707 // VERSION: 2.4
12708 // Sets the human-readable name of the filter; this is the string
12709 // that will be displayed in the file selector user interface if
12710 // there is a selectable list of filters.
12711 // <name>: the human-readable-name for the filter, or %NULL to remove any existing name.
12712 void set_name(AT0)(AT0 /*char*/ name=null) nothrow {
12713 gtk_file_filter_set_name(&this, toCString!(char*)(name));
12717 enum FileFilterFlags {
12718 FILENAME = 1,
12719 URI = 2,
12720 DISPLAY_NAME = 4,
12721 MIME_TYPE = 8
12723 extern (C) alias int function (FileFilterInfo* filter_info, void* data) nothrow FileFilterFunc;
12725 struct FileFilterInfo {
12726 FileFilterFlags contains;
12727 char* filename, uri, display_name, mime_type;
12730 struct FileSelection /* : Dialog */ {
12731 mixin Atk.ImplementorIface.__interface__;
12732 mixin Buildable.__interface__;
12733 alias parent_instance this;
12734 alias parent_instance super_;
12735 alias parent_instance dialog;
12736 Dialog parent_instance;
12737 Widget* dir_list, file_list, selection_entry, selection_text, main_vbox, ok_button, cancel_button, help_button, history_pulldown, history_menu;
12738 GLib2.List* history_list;
12739 Widget* fileop_dialog, fileop_entry;
12740 char* fileop_file;
12741 void* cmpl_state;
12742 Widget* fileop_c_dir, fileop_del_file, fileop_ren_file, button_area, action_area;
12743 private void*[0] selected_names;
12744 private char* last_selected;
12746 static FileSelection* new_(AT0)(AT0 /*char*/ title) nothrow {
12747 return gtk_file_selection_new(toCString!(char*)(title));
12749 static auto opCall(AT0)(AT0 /*char*/ title) {
12750 return gtk_file_selection_new(toCString!(char*)(title));
12752 void complete(AT0)(AT0 /*char*/ pattern) nothrow {
12753 gtk_file_selection_complete(&this, toCString!(char*)(pattern));
12756 // This function returns the selected filename in the GLib file name
12757 // encoding. To convert to UTF-8, call g_filename_to_utf8(). The
12758 // returned string points to a statically allocated buffer and should
12759 // be copied if you plan to keep it around.
12761 // If no file is selected then the selected directory path is returned.
12762 // RETURNS: currently-selected filename in the on-disk encoding.
12763 char* get_filename()() nothrow {
12764 return gtk_file_selection_get_filename(&this);
12767 // Determines whether or not the user is allowed to select multiple files in
12768 // the file list. See gtk_file_selection_set_select_multiple().
12770 // file list
12771 // RETURNS: %TRUE if the user is allowed to select multiple files in the
12772 int get_select_multiple()() nothrow {
12773 return gtk_file_selection_get_select_multiple(&this);
12776 // Unintrospectable method: get_selections() / gtk_file_selection_get_selections()
12777 // Retrieves the list of file selections the user has made in the dialog box.
12778 // This function is intended for use when the user can select multiple files
12779 // in the file list.
12781 // The filenames are in the GLib file name encoding. To convert to
12782 // UTF-8, call g_filename_to_utf8() on each string.
12784 // g_strfreev() to free it.
12785 // RETURNS: a newly-allocated %NULL-terminated array of strings. Use
12786 char** get_selections()() nothrow {
12787 return gtk_file_selection_get_selections(&this);
12789 void hide_fileop_buttons()() nothrow {
12790 gtk_file_selection_hide_fileop_buttons(&this);
12793 // Sets a default path for the file requestor. If @filename includes a
12794 // directory path, then the requestor will open with that path as its
12795 // current working directory.
12797 // This has the consequence that in order to open the requestor with a
12798 // working directory and an empty filename, @filename must have a trailing
12799 // directory separator.
12801 // The encoding of @filename is preferred GLib file name encoding, which
12802 // may not be UTF-8. See g_filename_from_utf8().
12803 // <filename>: a string to set as the default file name.
12804 void set_filename(AT0)(AT0 /*char*/ filename) nothrow {
12805 gtk_file_selection_set_filename(&this, toCString!(char*)(filename));
12808 // Sets whether the user is allowed to select multiple files in the file list.
12809 // Use gtk_file_selection_get_selections () to get the list of selected files.
12810 // <select_multiple>: whether or not the user is allowed to select multiple files in the file list.
12811 void set_select_multiple()(int select_multiple) nothrow {
12812 gtk_file_selection_set_select_multiple(&this, select_multiple);
12814 void show_fileop_buttons()() nothrow {
12815 gtk_file_selection_show_fileop_buttons(&this);
12819 struct FileSelectionClass {
12820 DialogClass parent_class;
12821 extern (C) void function () nothrow _gtk_reserved1;
12822 extern (C) void function () nothrow _gtk_reserved2;
12823 extern (C) void function () nothrow _gtk_reserved3;
12824 extern (C) void function () nothrow _gtk_reserved4;
12827 struct Fixed /* : Container */ {
12828 mixin Atk.ImplementorIface.__interface__;
12829 mixin Buildable.__interface__;
12830 alias container this;
12831 alias container super_;
12832 Container container;
12833 GLib2.List* children;
12835 static Fixed* new_()() nothrow {
12836 return gtk_fixed_new();
12838 static auto opCall()() {
12839 return gtk_fixed_new();
12842 // DEPRECATED (v2.20) method: get_has_window - Use gtk_widget_get_has_window() instead.
12843 // Gets whether the #GtkFixed has its own #GdkWindow.
12844 // See gtk_fixed_set_has_window().
12845 // RETURNS: %TRUE if @fixed has its own window.
12846 int get_has_window()() nothrow {
12847 return gtk_fixed_get_has_window(&this);
12849 void move(AT0)(AT0 /*Widget*/ widget, int x, int y) nothrow {
12850 gtk_fixed_move(&this, UpCast!(Widget*)(widget), x, y);
12852 void put(AT0)(AT0 /*Widget*/ widget, int x, int y) nothrow {
12853 gtk_fixed_put(&this, UpCast!(Widget*)(widget), x, y);
12856 // DEPRECATED (v2.20) method: set_has_window - Use gtk_widget_set_has_window() instead.
12857 // Sets whether a #GtkFixed widget is created with a separate
12858 // #GdkWindow for @widget->window or not. (By default, it will be
12859 // created with no separate #GdkWindow). This function must be called
12860 // while the #GtkFixed is not realized, for instance, immediately after the
12861 // window is created.
12863 // This function was added to provide an easy migration path for
12864 // older applications which may expect #GtkFixed to have a separate window.
12865 // <has_window>: %TRUE if a separate window should be created
12866 void set_has_window()(int has_window) nothrow {
12867 gtk_fixed_set_has_window(&this, has_window);
12871 struct FixedChild {
12872 Widget* widget;
12873 int x, y;
12876 struct FixedClass {
12877 ContainerClass parent_class;
12880 struct FontButton /* : Button */ {
12881 mixin Atk.ImplementorIface.__interface__;
12882 mixin Activatable.__interface__;
12883 mixin Buildable.__interface__;
12884 alias button this;
12885 alias button super_;
12886 Button button;
12887 private FontButtonPrivate* priv;
12890 // VERSION: 2.4
12891 // Creates a new font picker widget.
12892 // RETURNS: a new font picker widget.
12893 static FontButton* new_()() nothrow {
12894 return gtk_font_button_new();
12896 static auto opCall()() {
12897 return gtk_font_button_new();
12900 // VERSION: 2.4
12901 // Creates a new font picker widget.
12902 // RETURNS: a new font picker widget.
12903 // <fontname>: Name of font to display in font selection dialog
12904 static FontButton* new_with_font(AT0)(AT0 /*char*/ fontname) nothrow {
12905 return gtk_font_button_new_with_font(toCString!(char*)(fontname));
12907 static auto opCall(AT0)(AT0 /*char*/ fontname) {
12908 return gtk_font_button_new_with_font(toCString!(char*)(fontname));
12911 // VERSION: 2.4
12912 // Retrieves the name of the currently selected font. This name includes
12913 // style and size information as well. If you want to render something
12914 // with the font, use this string with pango_font_description_from_string() .
12915 // If you're interested in peeking certain values (family name,
12916 // style, size, weight) just query these properties from the
12917 // #PangoFontDescription object.
12918 // RETURNS: an internal copy of the font name which must not be freed.
12919 char* get_font_name()() nothrow {
12920 return gtk_font_button_get_font_name(&this);
12923 // VERSION: 2.4
12924 // Returns whether the font size will be shown in the label.
12925 // RETURNS: whether the font size will be shown in the label.
12926 int get_show_size()() nothrow {
12927 return gtk_font_button_get_show_size(&this);
12930 // VERSION: 2.4
12931 // Returns whether the name of the font style will be shown in the label.
12932 // RETURNS: whether the font style will be shown in the label.
12933 int get_show_style()() nothrow {
12934 return gtk_font_button_get_show_style(&this);
12937 // VERSION: 2.4
12938 // Retrieves the title of the font selection dialog.
12939 // RETURNS: an internal copy of the title string which must not be freed.
12940 char* get_title()() nothrow {
12941 return gtk_font_button_get_title(&this);
12944 // VERSION: 2.4
12945 // Returns whether the selected font is used in the label.
12946 // RETURNS: whether the selected font is used in the label.
12947 int get_use_font()() nothrow {
12948 return gtk_font_button_get_use_font(&this);
12951 // VERSION: 2.4
12952 // Returns whether the selected size is used in the label.
12953 // RETURNS: whether the selected size is used in the label.
12954 int get_use_size()() nothrow {
12955 return gtk_font_button_get_use_size(&this);
12958 // VERSION: 2.4
12959 // Sets or updates the currently-displayed font in font picker dialog.
12961 // font selection dialog exists, otherwise %FALSE.
12962 // RETURNS: Return value of gtk_font_selection_dialog_set_font_name() if the
12963 // <fontname>: Name of font to display in font selection dialog
12964 int set_font_name(AT0)(AT0 /*char*/ fontname) nothrow {
12965 return gtk_font_button_set_font_name(&this, toCString!(char*)(fontname));
12968 // VERSION: 2.4
12969 // If @show_size is %TRUE, the font size will be displayed along with the name of the selected font.
12970 // <show_size>: %TRUE if font size should be displayed in dialog.
12971 void set_show_size()(int show_size) nothrow {
12972 gtk_font_button_set_show_size(&this, show_size);
12975 // VERSION: 2.4
12976 // If @show_style is %TRUE, the font style will be displayed along with name of the selected font.
12977 // <show_style>: %TRUE if font style should be displayed in label.
12978 void set_show_style()(int show_style) nothrow {
12979 gtk_font_button_set_show_style(&this, show_style);
12982 // VERSION: 2.4
12983 // Sets the title for the font selection dialog.
12984 // <title>: a string containing the font selection dialog title
12985 void set_title(AT0)(AT0 /*char*/ title) nothrow {
12986 gtk_font_button_set_title(&this, toCString!(char*)(title));
12989 // VERSION: 2.4
12990 // If @use_font is %TRUE, the font name will be written using the selected font.
12991 // <use_font>: If %TRUE, font name will be written using font chosen.
12992 void set_use_font()(int use_font) nothrow {
12993 gtk_font_button_set_use_font(&this, use_font);
12996 // VERSION: 2.4
12997 // If @use_size is %TRUE, the font name will be written using the selected size.
12998 // <use_size>: If %TRUE, font name will be written using the selected size.
12999 void set_use_size()(int use_size) nothrow {
13000 gtk_font_button_set_use_size(&this, use_size);
13003 // VERSION: 2.4
13004 // The ::font-set signal is emitted when the user selects a font.
13005 // When handling this signal, use gtk_font_button_get_font_name()
13006 // to find out which font was just selected.
13008 // Note that this signal is only emitted when the <emphasis>user</emphasis>
13009 // changes the font. If you need to react to programmatic font changes
13010 // as well, use the notify::font-name signal.
13011 extern (C) alias static void function (FontButton* this_, void* user_data=null) nothrow signal_font_set;
13013 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13014 return super_.signal_connect!name(cb, data, cf);
13017 ulong signal_connect(string name:"font-set", CB/*:signal_font_set*/)
13018 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
13019 if (is(typeof(cb)==signal_font_set)||_ttmm!(CB, signal_font_set)()) {
13020 return signal_connect_data!()(&this, cast(char*)"font-set",
13021 cast(GObject2.Callback)cb, data, null, cf);
13025 struct FontButtonClass {
13026 ButtonClass parent_class;
13027 extern (C) void function (FontButton* gfp) nothrow font_set;
13028 extern (C) void function () nothrow _gtk_reserved1;
13029 extern (C) void function () nothrow _gtk_reserved2;
13030 extern (C) void function () nothrow _gtk_reserved3;
13031 extern (C) void function () nothrow _gtk_reserved4;
13034 struct FontButtonPrivate {
13037 struct FontSelection /* : VBox */ {
13038 mixin Atk.ImplementorIface.__interface__;
13039 mixin Buildable.__interface__;
13040 mixin Orientable.__interface__;
13041 alias parent_instance this;
13042 alias parent_instance super_;
13043 alias parent_instance vbox;
13044 VBox parent_instance;
13045 Widget* font_entry, family_list, font_style_entry, face_list, size_entry, size_list, pixels_button, points_button, filter_button, preview_entry;
13046 Pango.FontFamily* family;
13047 Pango.FontFace* face;
13048 int size;
13049 Gdk2.Font* font;
13052 // Creates a new #GtkFontSelection.
13053 // RETURNS: a n ew #GtkFontSelection
13054 static FontSelection* new_()() nothrow {
13055 return gtk_font_selection_new();
13057 static auto opCall()() {
13058 return gtk_font_selection_new();
13061 // VERSION: 2.14
13062 // Gets the #PangoFontFace representing the selected font group
13063 // details (i.e. family, slant, weight, width, etc).
13065 // selected font group details. The returned object is owned by
13066 // @fontsel and must not be modified or freed.
13067 // RETURNS: A #PangoFontFace representing the
13068 Pango.FontFace* get_face()() nothrow {
13069 return gtk_font_selection_get_face(&this);
13072 // VERSION: 2.14
13073 // This returns the #GtkTreeView which lists all styles available for
13074 // the selected font. For example, 'Regular', 'Bold', etc.
13075 // RETURNS: A #GtkWidget that is part of @fontsel
13076 Widget* get_face_list()() nothrow {
13077 return gtk_font_selection_get_face_list(&this);
13080 // VERSION: 2.14
13081 // Gets the #PangoFontFamily representing the selected font family.
13083 // selected font family. Font families are a collection of font
13084 // faces. The returned object is owned by @fontsel and must not
13085 // be modified or freed.
13086 // RETURNS: A #PangoFontFamily representing the
13087 Pango.FontFamily* get_family()() nothrow {
13088 return gtk_font_selection_get_family(&this);
13091 // VERSION: 2.14
13092 // This returns the #GtkTreeView that lists font families, for
13093 // example, 'Sans', 'Serif', etc.
13094 // RETURNS: A #GtkWidget that is part of @fontsel
13095 Widget* get_family_list()() nothrow {
13096 return gtk_font_selection_get_family_list(&this);
13099 // DEPRECATED (v2.0) method: get_font - Use gtk_font_selection_get_font_name() instead.
13100 // Gets the currently-selected font.
13101 // RETURNS: A #GdkFont.
13102 Gdk2.Font* /*new*/ get_font()() nothrow {
13103 return gtk_font_selection_get_font(&this);
13106 // Gets the currently-selected font name.
13108 // Note that this can be a different string than what you set with
13109 // gtk_font_selection_set_font_name(), as the font selection widget may
13110 // normalize font names and thus return a string with a different structure.
13111 // For example, "Helvetica Italic Bold 12" could be normalized to
13112 // "Helvetica Bold Italic 12". Use pango_font_description_equal()
13113 // if you want to compare two font descriptions.
13115 // no font is selected. You must free this string with g_free().
13116 // RETURNS: A string with the name of the current font, or %NULL if
13117 char* /*new*/ get_font_name()() nothrow {
13118 return gtk_font_selection_get_font_name(&this);
13121 // VERSION: 2.14
13122 // This returns the #GtkEntry used to display the font as a preview.
13123 // RETURNS: A #GtkWidget that is part of @fontsel
13124 Widget* get_preview_entry()() nothrow {
13125 return gtk_font_selection_get_preview_entry(&this);
13128 // Gets the text displayed in the preview area.
13130 // This string is owned by the widget and should not be
13131 // modified or freed
13132 // RETURNS: the text displayed in the preview area.
13133 char* get_preview_text()() nothrow {
13134 return gtk_font_selection_get_preview_text(&this);
13137 // VERSION: 2.14
13138 // The selected font size.
13140 // or -1 if no font size is selected.
13141 // RETURNS: A n integer representing the selected font size,
13142 int get_size()() nothrow {
13143 return gtk_font_selection_get_size(&this);
13146 // VERSION: 2.14
13147 // This returns the #GtkEntry used to allow the user to edit the font
13148 // number manually instead of selecting it from the list of font sizes.
13149 // RETURNS: A #GtkWidget that is part of @fontsel
13150 Widget* get_size_entry()() nothrow {
13151 return gtk_font_selection_get_size_entry(&this);
13154 // VERSION: 2.14
13155 // This returns the #GtkTreeeView used to list font sizes.
13156 // RETURNS: A #GtkWidget that is part of @fontsel
13157 Widget* get_size_list()() nothrow {
13158 return gtk_font_selection_get_size_list(&this);
13161 // Sets the currently-selected font.
13163 // Note that the @fontsel needs to know the screen in which it will appear
13164 // for this to work; this can be guaranteed by simply making sure that the
13165 // @fontsel is inserted in a toplevel window before you call this function.
13167 // such font exists or if the @fontsel doesn't belong to a particular
13168 // screen yet.
13169 // RETURNS: %TRUE if the font could be set successfully; %FALSE if no
13170 // <fontname>: a font name like "Helvetica 12" or "Times Bold 18"
13171 int set_font_name(AT0)(AT0 /*char*/ fontname) nothrow {
13172 return gtk_font_selection_set_font_name(&this, toCString!(char*)(fontname));
13175 // Sets the text displayed in the preview area.
13176 // The @text is used to show how the selected font looks.
13177 // <text>: the text to display in the preview area
13178 void set_preview_text(AT0)(AT0 /*char*/ text) nothrow {
13179 gtk_font_selection_set_preview_text(&this, toCString!(char*)(text));
13183 struct FontSelectionClass {
13184 VBoxClass parent_class;
13185 extern (C) void function () nothrow _gtk_reserved1;
13186 extern (C) void function () nothrow _gtk_reserved2;
13187 extern (C) void function () nothrow _gtk_reserved3;
13188 extern (C) void function () nothrow _gtk_reserved4;
13191 struct FontSelectionDialog /* : Dialog */ {
13192 mixin Atk.ImplementorIface.__interface__;
13193 mixin Buildable.__interface__;
13194 alias parent_instance this;
13195 alias parent_instance super_;
13196 alias parent_instance dialog;
13197 Dialog parent_instance;
13198 private Widget* fontsel, main_vbox, action_area;
13199 Widget* ok_button, apply_button, cancel_button;
13200 private int dialog_width;
13201 private int auto_resize;
13204 // Creates a new #GtkFontSelectionDialog.
13205 // RETURNS: a new #GtkFontSelectionDialog
13206 // <title>: the title of the dialog window
13207 static FontSelectionDialog* new_(AT0)(AT0 /*char*/ title) nothrow {
13208 return gtk_font_selection_dialog_new(toCString!(char*)(title));
13210 static auto opCall(AT0)(AT0 /*char*/ title) {
13211 return gtk_font_selection_dialog_new(toCString!(char*)(title));
13214 // Unintrospectable method: get_apply_button() / gtk_font_selection_dialog_get_apply_button()
13215 // VERSION: 2.14
13216 // DEPRECATED (v2.16) method: get_apply_button - Don't use this function.
13217 // Obtains a button. The button doesn't have any function.
13218 // RETURNS: a #GtkWidget
13219 Widget* get_apply_button()() nothrow {
13220 return gtk_font_selection_dialog_get_apply_button(&this);
13223 // VERSION: 2.14
13224 // Gets the 'Cancel' button.
13226 // for the 'Cancel' button.
13227 // RETURNS: the #GtkWidget used in the dialog
13228 Widget* get_cancel_button()() nothrow {
13229 return gtk_font_selection_dialog_get_cancel_button(&this);
13232 // DEPRECATED (v2.0) method: get_font - Use gtk_font_selection_dialog_get_font_name() instead.
13233 // Gets the currently-selected font.
13235 // currently selected font in the dialog, or %NULL if no font is selected
13236 // RETURNS: the #GdkFont from the #GtkFontSelection for the
13237 Gdk2.Font* /*new*/ get_font()() nothrow {
13238 return gtk_font_selection_dialog_get_font(&this);
13241 // Gets the currently-selected font name.
13243 // Note that this can be a different string than what you set with
13244 // gtk_font_selection_dialog_set_font_name(), as the font selection widget
13245 // may normalize font names and thus return a string with a different
13246 // structure. For example, "Helvetica Italic Bold 12" could be normalized
13247 // to "Helvetica Bold Italic 12". Use pango_font_description_equal()
13248 // if you want to compare two font descriptions.
13250 // font is selected. You must free this string with g_free().
13251 // RETURNS: A string with the name of the current font, or %NULL if no
13252 char* /*new*/ get_font_name()() nothrow {
13253 return gtk_font_selection_dialog_get_font_name(&this);
13256 // VERSION: 2.22
13257 // Retrieves the #GtkFontSelection widget embedded in the dialog.
13258 // RETURNS: the embedded #GtkFontSelection
13259 Widget* get_font_selection()() nothrow {
13260 return gtk_font_selection_dialog_get_font_selection(&this);
13263 // VERSION: 2.14
13264 // Gets the 'OK' button.
13266 // for the 'OK' button.
13267 // RETURNS: the #GtkWidget used in the dialog
13268 Widget* get_ok_button()() nothrow {
13269 return gtk_font_selection_dialog_get_ok_button(&this);
13272 // Gets the text displayed in the preview area.
13274 // This string is owned by the widget and should not be
13275 // modified or freed
13276 // RETURNS: the text displayed in the preview area.
13277 char* get_preview_text()() nothrow {
13278 return gtk_font_selection_dialog_get_preview_text(&this);
13281 // Sets the currently selected font.
13283 // @fontname specified, %FALSE otherwise.
13284 // RETURNS: %TRUE if the font selected in @fsd is now the
13285 // <fontname>: a font name like "Helvetica 12" or "Times Bold 18"
13286 int set_font_name(AT0)(AT0 /*char*/ fontname) nothrow {
13287 return gtk_font_selection_dialog_set_font_name(&this, toCString!(char*)(fontname));
13290 // Sets the text displayed in the preview area.
13291 // <text>: the text to display in the preview area
13292 void set_preview_text(AT0)(AT0 /*char*/ text) nothrow {
13293 gtk_font_selection_dialog_set_preview_text(&this, toCString!(char*)(text));
13297 struct FontSelectionDialogClass {
13298 DialogClass parent_class;
13299 extern (C) void function () nothrow _gtk_reserved1;
13300 extern (C) void function () nothrow _gtk_reserved2;
13301 extern (C) void function () nothrow _gtk_reserved3;
13302 extern (C) void function () nothrow _gtk_reserved4;
13305 struct Frame /* : Bin */ {
13306 mixin Atk.ImplementorIface.__interface__;
13307 mixin Buildable.__interface__;
13308 alias bin this;
13309 alias bin super_;
13310 Bin bin;
13311 Widget* label_widget;
13312 short shadow_type;
13313 float label_xalign, label_yalign;
13314 Allocation child_allocation;
13317 // Creates a new #GtkFrame, with optional label @label.
13318 // If @label is %NULL, the label is omitted.
13319 // RETURNS: a new #GtkFrame widget
13320 // <label>: the text to use as the label of the frame
13321 static Frame* new_(AT0)(AT0 /*char*/ label) nothrow {
13322 return gtk_frame_new(toCString!(char*)(label));
13324 static auto opCall(AT0)(AT0 /*char*/ label) {
13325 return gtk_frame_new(toCString!(char*)(label));
13328 // If the frame's label widget is a #GtkLabel, returns the
13329 // text in the label widget. (The frame will have a #GtkLabel
13330 // for the label widget if a non-%NULL argument was passed
13331 // to gtk_frame_new().)
13333 // was no label widget or the lable widget was not
13334 // a #GtkLabel. This string is owned by GTK+ and
13335 // must not be modified or freed.
13336 // RETURNS: the text in the label, or %NULL if there
13337 char* get_label()() nothrow {
13338 return gtk_frame_get_label(&this);
13341 // Retrieves the X and Y alignment of the frame's label. See
13342 // gtk_frame_set_label_align().
13343 // <xalign>: location to store X alignment of frame's label, or %NULL
13344 // <yalign>: location to store X alignment of frame's label, or %NULL
13345 void get_label_align(AT0, AT1)(/*out*/ AT0 /*float*/ xalign=null, /*out*/ AT1 /*float*/ yalign=null) nothrow {
13346 gtk_frame_get_label_align(&this, UpCast!(float*)(xalign), UpCast!(float*)(yalign));
13349 // Retrieves the label widget for the frame. See
13350 // gtk_frame_set_label_widget().
13351 // RETURNS: the label widget, or %NULL if there is none.
13352 Widget* get_label_widget()() nothrow {
13353 return gtk_frame_get_label_widget(&this);
13356 // Retrieves the shadow type of the frame. See
13357 // gtk_frame_set_shadow_type().
13358 // RETURNS: the current shadow type of the frame.
13359 ShadowType get_shadow_type()() nothrow {
13360 return gtk_frame_get_shadow_type(&this);
13363 // Sets the text of the label. If @label is %NULL,
13364 // the current label is removed.
13365 // <label>: the text to use as the label of the frame
13366 void set_label(AT0)(AT0 /*char*/ label=null) nothrow {
13367 gtk_frame_set_label(&this, toCString!(char*)(label));
13370 // Sets the alignment of the frame widget's label. The
13371 // default values for a newly created frame are 0.0 and 0.5.
13372 // <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.
13373 // <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.
13374 void set_label_align()(float xalign, float yalign) nothrow {
13375 gtk_frame_set_label_align(&this, xalign, yalign);
13378 // Sets the label widget for the frame. This is the widget that
13379 // will appear embedded in the top edge of the frame as a
13380 // title.
13381 // <label_widget>: the new label widget
13382 void set_label_widget(AT0)(AT0 /*Widget*/ label_widget) nothrow {
13383 gtk_frame_set_label_widget(&this, UpCast!(Widget*)(label_widget));
13386 // Sets the shadow type for @frame.
13387 // <type>: the new #GtkShadowType
13388 void set_shadow_type()(ShadowType type) nothrow {
13389 gtk_frame_set_shadow_type(&this, type);
13393 struct FrameClass {
13394 BinClass parent_class;
13395 extern (C) void function (Frame* frame, Allocation* allocation) nothrow compute_child_allocation;
13398 extern (C) alias int function (void* data) nothrow Function;
13400 struct GammaCurve /* : VBox */ {
13401 mixin Atk.ImplementorIface.__interface__;
13402 mixin Buildable.__interface__;
13403 mixin Orientable.__interface__;
13404 alias vbox this;
13405 alias vbox super_;
13406 VBox vbox;
13407 Widget* table, curve;
13408 Widget*[5] button;
13409 float gamma;
13410 Widget* gamma_dialog, gamma_text;
13412 static GammaCurve* new_()() nothrow {
13413 return gtk_gamma_curve_new();
13415 static auto opCall()() {
13416 return gtk_gamma_curve_new();
13420 struct GammaCurveClass {
13421 VBoxClass parent_class;
13422 extern (C) void function () nothrow _gtk_reserved1;
13423 extern (C) void function () nothrow _gtk_reserved2;
13424 extern (C) void function () nothrow _gtk_reserved3;
13425 extern (C) void function () nothrow _gtk_reserved4;
13429 // #GtkHBox is a container that organizes child widgets into a single row.
13431 // Use the #GtkBox packing interface to determine the arrangement,
13432 // spacing, width, and alignment of #GtkHBox children.
13434 // All children are allocated the same height.
13435 struct HBox /* : Box */ {
13436 mixin Atk.ImplementorIface.__interface__;
13437 mixin Buildable.__interface__;
13438 mixin Orientable.__interface__;
13439 alias box this;
13440 alias box super_;
13441 Box box;
13444 // Creates a new #GtkHBox.
13445 // RETURNS: a new #GtkHBox.
13446 // <homogeneous>: %TRUE if all children are to be given equal space allotments.
13447 // <spacing>: the number of pixels to place by default between children.
13448 static HBox* new_()(int homogeneous, int spacing) nothrow {
13449 return gtk_hbox_new(homogeneous, spacing);
13451 static auto opCall()(int homogeneous, int spacing) {
13452 return gtk_hbox_new(homogeneous, spacing);
13456 struct HBoxClass {
13457 BoxClass parent_class;
13460 struct HButtonBox /* : ButtonBox */ {
13461 mixin Atk.ImplementorIface.__interface__;
13462 mixin Buildable.__interface__;
13463 mixin Orientable.__interface__;
13464 alias button_box this;
13465 alias button_box super_;
13466 alias button_box buttonbox;
13467 ButtonBox button_box;
13469 static HButtonBox* new_()() nothrow {
13470 return gtk_hbutton_box_new();
13472 static auto opCall()() {
13473 return gtk_hbutton_box_new();
13475 static ButtonBoxStyle get_layout_default()() nothrow {
13476 return gtk_hbutton_box_get_layout_default();
13478 static int get_spacing_default()() nothrow {
13479 return gtk_hbutton_box_get_spacing_default();
13481 static void set_layout_default()(ButtonBoxStyle layout) nothrow {
13482 gtk_hbutton_box_set_layout_default(layout);
13484 static void set_spacing_default()(int spacing) nothrow {
13485 gtk_hbutton_box_set_spacing_default(spacing);
13489 struct HButtonBoxClass {
13490 ButtonBoxClass parent_class;
13493 struct HPaned /* : Paned */ {
13494 mixin Atk.ImplementorIface.__interface__;
13495 mixin Buildable.__interface__;
13496 mixin Orientable.__interface__;
13497 alias paned this;
13498 alias paned super_;
13499 Paned paned;
13501 static HPaned* new_()() nothrow {
13502 return gtk_hpaned_new();
13504 static auto opCall()() {
13505 return gtk_hpaned_new();
13509 struct HPanedClass {
13510 PanedClass parent_class;
13513 struct HRuler /* : Ruler */ {
13514 mixin Atk.ImplementorIface.__interface__;
13515 mixin Buildable.__interface__;
13516 mixin Orientable.__interface__;
13517 alias ruler this;
13518 alias ruler super_;
13519 Ruler ruler;
13521 static HRuler* new_()() nothrow {
13522 return gtk_hruler_new();
13524 static auto opCall()() {
13525 return gtk_hruler_new();
13529 struct HRulerClass {
13530 RulerClass parent_class;
13533 struct HSV /* : Widget */ {
13534 mixin Atk.ImplementorIface.__interface__;
13535 mixin Buildable.__interface__;
13536 alias parent_instance this;
13537 alias parent_instance super_;
13538 alias parent_instance widget;
13539 Widget parent_instance;
13540 void* priv;
13543 // VERSION: 2.14
13544 // Creates a new HSV color selector.
13545 // RETURNS: A newly-created HSV color selector.
13546 static HSV* new_()() nothrow {
13547 return gtk_hsv_new();
13549 static auto opCall()() {
13550 return gtk_hsv_new();
13553 // VERSION: 2.14
13554 // Converts a color from HSV space to RGB.
13555 // Input values must be in the [0.0, 1.0] range;
13556 // output values will be in the same range.
13557 // <h>: Hue
13558 // <s>: Saturation
13559 // <v>: Value
13560 // <r>: Return value for the red component
13561 // <g>: Return value for the green component
13562 // <b>: Return value for the blue component
13563 static void to_rgb(AT0, AT1, AT2)(double h, double s, double v, /*out*/ AT0 /*double*/ r, /*out*/ AT1 /*double*/ g, /*out*/ AT2 /*double*/ b) nothrow {
13564 gtk_hsv_to_rgb(h, s, v, UpCast!(double*)(r), UpCast!(double*)(g), UpCast!(double*)(b));
13567 // VERSION: 2.14
13568 // Queries the current color in an HSV color selector.
13569 // Returned values will be in the [0.0, 1.0] range.
13570 // <h>: Return value for the hue
13571 // <s>: Return value for the saturation
13572 // <v>: Return value for the value
13573 void get_color(AT0, AT1, AT2)(/*out*/ AT0 /*double*/ h, /*out*/ AT1 /*double*/ s, /*out*/ AT2 /*double*/ v) nothrow {
13574 gtk_hsv_get_color(&this, UpCast!(double*)(h), UpCast!(double*)(s), UpCast!(double*)(v));
13577 // VERSION: 2.14
13578 // Queries the size and ring width of an HSV color selector.
13579 // <size>: Return value for the diameter of the hue ring
13580 // <ring_width>: Return value for the width of the hue ring
13581 void get_metrics()(/*out*/ int* size, /*out*/ int* ring_width) nothrow {
13582 gtk_hsv_get_metrics(&this, size, ring_width);
13585 // VERSION: 2.14
13586 // An HSV color selector can be said to be adjusting if multiple rapid
13587 // changes are being made to its value, for example, when the user is
13588 // adjusting the value with the mouse. This function queries whether
13589 // the HSV color selector is being adjusted or not.
13591 // since they may be transitory, or %FALSE if they should consider
13592 // the color value status to be final.
13593 // RETURNS: %TRUE if clients can ignore changes to the color value,
13594 int is_adjusting()() nothrow {
13595 return gtk_hsv_is_adjusting(&this);
13598 // VERSION: 2.14
13599 // Sets the current color in an HSV color selector.
13600 // Color component values must be in the [0.0, 1.0] range.
13601 // <h>: Hue
13602 // <s>: Saturation
13603 // <v>: Value
13604 void set_color()(double h, double s, double v) nothrow {
13605 gtk_hsv_set_color(&this, h, s, v);
13608 // VERSION: 2.14
13609 // Sets the size and ring width of an HSV color selector.
13610 // <size>: Diameter for the hue ring
13611 // <ring_width>: Width of the hue ring
13612 void set_metrics()(int size, int ring_width) nothrow {
13613 gtk_hsv_set_metrics(&this, size, ring_width);
13615 extern (C) alias static void function (HSV* this_, void* user_data=null) nothrow signal_changed;
13617 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13618 return super_.signal_connect!name(cb, data, cf);
13621 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
13622 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
13623 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
13624 return signal_connect_data!()(&this, cast(char*)"changed",
13625 cast(GObject2.Callback)cb, data, null, cf);
13627 extern (C) alias static void function (HSV* this_, DirectionType* object, void* user_data=null) nothrow signal_move;
13628 ulong signal_connect(string name:"move", CB/*:signal_move*/)
13629 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
13630 if (is(typeof(cb)==signal_move)||_ttmm!(CB, signal_move)()) {
13631 return signal_connect_data!()(&this, cast(char*)"move",
13632 cast(GObject2.Callback)cb, data, null, cf);
13636 struct HSVClass {
13637 WidgetClass parent_class;
13638 extern (C) void function (HSV* hsv) nothrow changed;
13639 extern (C) void function (HSV* hsv, DirectionType type) nothrow move;
13640 extern (C) void function () nothrow _gtk_reserved1;
13641 extern (C) void function () nothrow _gtk_reserved2;
13642 extern (C) void function () nothrow _gtk_reserved3;
13643 extern (C) void function () nothrow _gtk_reserved4;
13646 struct HScale /* : Scale */ {
13647 mixin Atk.ImplementorIface.__interface__;
13648 mixin Buildable.__interface__;
13649 mixin Orientable.__interface__;
13650 alias scale this;
13651 alias scale super_;
13652 Scale scale;
13654 static HScale* new_(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
13655 return gtk_hscale_new(UpCast!(Adjustment*)(adjustment));
13657 static auto opCall(AT0)(AT0 /*Adjustment*/ adjustment) {
13658 return gtk_hscale_new(UpCast!(Adjustment*)(adjustment));
13661 // Creates a new horizontal scale widget that lets the user input a
13662 // number between @min and @max (including @min and @max) with the
13663 // increment @step. @step must be nonzero; it's the distance the
13664 // slider moves when using the arrow keys to adjust the scale value.
13666 // Note that the way in which the precision is derived works best if @step
13667 // is a power of ten. If the resulting precision is not suitable for your
13668 // needs, use gtk_scale_set_digits() to correct it.
13669 // RETURNS: a new #GtkHScale
13670 // <min>: minimum value
13671 // <max>: maximum value
13672 // <step>: step increment (tick size) used with keyboard shortcuts
13673 static HScale* new_with_range()(double min, double max, double step) nothrow {
13674 return gtk_hscale_new_with_range(min, max, step);
13676 static auto opCall()(double min, double max, double step) {
13677 return gtk_hscale_new_with_range(min, max, step);
13681 struct HScaleClass {
13682 ScaleClass parent_class;
13685 struct HScrollbar /* : Scrollbar */ {
13686 mixin Atk.ImplementorIface.__interface__;
13687 mixin Buildable.__interface__;
13688 mixin Orientable.__interface__;
13689 alias scrollbar this;
13690 alias scrollbar super_;
13691 Scrollbar scrollbar;
13694 // Creates a new horizontal scrollbar.
13695 // RETURNS: the new #GtkHScrollbar
13696 // <adjustment>: the #GtkAdjustment to use, or %NULL to create a new adjustment
13697 static HScrollbar* new_(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
13698 return gtk_hscrollbar_new(UpCast!(Adjustment*)(adjustment));
13700 static auto opCall(AT0)(AT0 /*Adjustment*/ adjustment=null) {
13701 return gtk_hscrollbar_new(UpCast!(Adjustment*)(adjustment));
13705 struct HScrollbarClass {
13706 ScrollbarClass parent_class;
13709 struct HSeparator /* : Separator */ {
13710 mixin Atk.ImplementorIface.__interface__;
13711 mixin Buildable.__interface__;
13712 mixin Orientable.__interface__;
13713 alias separator this;
13714 alias separator super_;
13715 Separator separator;
13717 static HSeparator* new_()() nothrow {
13718 return gtk_hseparator_new();
13720 static auto opCall()() {
13721 return gtk_hseparator_new();
13725 struct HSeparatorClass {
13726 SeparatorClass parent_class;
13729 struct HandleBox /* : Bin */ {
13730 mixin Atk.ImplementorIface.__interface__;
13731 mixin Buildable.__interface__;
13732 alias bin this;
13733 alias bin super_;
13734 Bin bin;
13735 Gdk2.Window* bin_window, float_window;
13736 ShadowType shadow_type;
13737 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
13738 uint, "handle_position", 2,
13739 uint, "float_window_mapped", 1,
13740 uint, "child_detached", 1,
13741 uint, "in_drag", 1,
13742 uint, "shrink_on_detach", 1,
13743 int, "snap_edge", 3,
13744 uint, "__dummy32A", 23));
13745 int deskoff_x, deskoff_y;
13746 Allocation attach_allocation, float_allocation;
13748 static HandleBox* new_()() nothrow {
13749 return gtk_handle_box_new();
13751 static auto opCall()() {
13752 return gtk_handle_box_new();
13755 // VERSION: 2.14
13756 // Whether the handlebox's child is currently detached.
13757 // RETURNS: %TRUE if the child is currently detached, otherwise %FALSE
13758 int get_child_detached()() nothrow {
13759 return gtk_handle_box_get_child_detached(&this);
13762 // Gets the handle position of the handle box. See
13763 // gtk_handle_box_set_handle_position().
13764 // RETURNS: the current handle position.
13765 PositionType get_handle_position()() nothrow {
13766 return gtk_handle_box_get_handle_position(&this);
13769 // Gets the type of shadow drawn around the handle box. See
13770 // gtk_handle_box_set_shadow_type().
13771 // RETURNS: the type of shadow currently drawn around the handle box.
13772 ShadowType get_shadow_type()() nothrow {
13773 return gtk_handle_box_get_shadow_type(&this);
13776 // Gets the edge used for determining reattachment of the handle box. See
13777 // gtk_handle_box_set_snap_edge().
13779 // is determined (as per default) from the handle position.
13780 // RETURNS: the edge used for determining reattachment, or (GtkPositionType)-1 if this
13781 PositionType get_snap_edge()() nothrow {
13782 return gtk_handle_box_get_snap_edge(&this);
13784 void set_handle_position()(PositionType position) nothrow {
13785 gtk_handle_box_set_handle_position(&this, position);
13787 void set_shadow_type()(ShadowType type) nothrow {
13788 gtk_handle_box_set_shadow_type(&this, type);
13790 void set_snap_edge()(PositionType edge) nothrow {
13791 gtk_handle_box_set_snap_edge(&this, edge);
13793 extern (C) alias static void function (HandleBox* this_, Widget* object, void* user_data=null) nothrow signal_child_attached;
13795 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13796 return super_.signal_connect!name(cb, data, cf);
13799 ulong signal_connect(string name:"child-attached", CB/*:signal_child_attached*/)
13800 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
13801 if (is(typeof(cb)==signal_child_attached)||_ttmm!(CB, signal_child_attached)()) {
13802 return signal_connect_data!()(&this, cast(char*)"child-attached",
13803 cast(GObject2.Callback)cb, data, null, cf);
13805 extern (C) alias static void function (HandleBox* this_, Widget* object, void* user_data=null) nothrow signal_child_detached;
13806 ulong signal_connect(string name:"child-detached", CB/*:signal_child_detached*/)
13807 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
13808 if (is(typeof(cb)==signal_child_detached)||_ttmm!(CB, signal_child_detached)()) {
13809 return signal_connect_data!()(&this, cast(char*)"child-detached",
13810 cast(GObject2.Callback)cb, data, null, cf);
13814 struct HandleBoxClass {
13815 BinClass parent_class;
13816 extern (C) void function (HandleBox* handle_box, Widget* child) nothrow child_attached;
13817 extern (C) void function (HandleBox* handle_box, Widget* child) nothrow child_detached;
13818 extern (C) void function () nothrow _gtk_reserved1;
13819 extern (C) void function () nothrow _gtk_reserved2;
13820 extern (C) void function () nothrow _gtk_reserved3;
13821 extern (C) void function () nothrow _gtk_reserved4;
13825 // #GtkIMContext defines the interface for GTK+ input methods. An input method
13826 // is used by GTK+ text input widgets like #GtkEntry to map from key events to
13827 // Unicode character strings.
13829 // The user may change the current input method via a context menu, unless the
13830 // #GtkSettings:gtk-show-input-method-menu GtkSettings property is set to FALSE.
13831 // The default input method can be set programmatically via the
13832 // #GtkSettings:gtk-im-module GtkSettings property. Alternatively, you may set
13833 // the GTK_IM_MODULE environment variable as documented in #gtk-running.
13835 // The #GtkEntry #GtkEntry:im-module and #GtkTextView #GtkTextView:im-module
13836 // properties may also be used to set input methods for specific widget
13837 // instances. For instance, a certain entry widget might be expected to contain
13838 // certain characters which would be easier to input with a certain input
13839 // method.
13841 // An input method may consume multiple key events in sequence and finally
13842 // output the composed result. This is called preediting, and an input method
13843 // may provide feedback about this process by displaying the intermediate
13844 // composition states as preedit text. For instance, the default GTK+ input
13845 // method implements the input of arbitrary Unicode code points by holding down
13846 // the Control and Shift keys and then typing "U" followed by the hexadecimal
13847 // digits of the code point. When releasing the Control and Shift keys,
13848 // preediting ends and the character is inserted as text. Ctrl+Shift+u20AC for
13849 // example results in the € sign.
13851 // Additional input methods can be made available for use by GTK+ widgets as
13852 // loadable modules. An input method module is a small shared library which
13853 // implements a subclass of #GtkIMContext or #GtkIMContextSimple and exports
13854 // these four functions:
13856 // <informalexample><programlisting>
13857 // void im_module_init(#GTypeModule *module);
13858 // </programlisting></informalexample>
13859 // This function should register the #GType of the #GtkIMContext subclass which
13860 // implements the input method by means of g_type_module_register_type(). Note
13861 // that g_type_register_static() cannot be used as the type needs to be
13862 // registered dynamically.
13864 // <informalexample><programlisting>
13865 // void im_module_exit(void);
13866 // </programlisting></informalexample>
13867 // Here goes any cleanup code your input method might require on module unload.
13869 // <informalexample><programlisting>
13870 // void im_module_list(const #GtkIMContextInfo ***contexts, int *n_contexts)
13871 // {
13872 // *contexts = info_list;
13873 // *n_contexts = G_N_ELEMENTS (info_list);
13874 // }
13875 // </programlisting></informalexample>
13876 // This function returns the list of input methods provided by the module. The
13877 // example implementation above shows a common solution and simply returns a
13878 // pointer to statically defined array of #GtkIMContextInfo items for each
13879 // provided input method.
13881 // <informalexample><programlisting>
13882 // #GtkIMContext * im_module_create(const #gchar *context_id);
13883 // </programlisting></informalexample>
13884 // This function should return a pointer to a newly created instance of the
13885 // #GtkIMContext subclass identified by @context_id. The context ID is the same
13886 // as specified in the #GtkIMContextInfo array returned by im_module_list().
13888 // After a new loadable input method module has been installed on the system,
13889 // the configuration file <filename>gtk.immodules</filename> needs to be
13890 // regenerated by <link linkend="gtk-query-immodules-2.0">gtk-query-immodules-2.0</link>,
13891 // in order for the new input method to become available to GTK+ applications.
13892 struct IMContext /* : GObject.Object */ {
13893 alias parent_instance this;
13894 alias parent_instance super_;
13895 alias parent_instance object;
13896 GObject2.Object parent_instance;
13899 // Asks the widget that the input context is attached to to delete
13900 // characters around the cursor position by emitting the
13901 // GtkIMContext::delete_surrounding signal. Note that @offset and @n_chars
13902 // are in characters not in bytes which differs from the usage other
13903 // places in #GtkIMContext.
13905 // In order to use this function, you should first call
13906 // gtk_im_context_get_surrounding() to get the current context, and
13907 // call this function immediately afterwards to make sure that you
13908 // know what you are deleting. You should also account for the fact
13909 // that even if the signal was handled, the input context might not
13910 // have deleted all the characters that were requested to be deleted.
13912 // This function is used by an input method that wants to make
13913 // subsitutions in the existing text in response to new input. It is
13914 // not useful for applications.
13915 // RETURNS: %TRUE if the signal was handled.
13916 // <offset>: offset from cursor position in chars; a negative value means start before the cursor.
13917 // <n_chars>: number of characters to delete.
13918 int delete_surrounding()(int offset, int n_chars) nothrow {
13919 return gtk_im_context_delete_surrounding(&this, offset, n_chars);
13922 // Allow an input method to internally handle key press and release
13923 // events. If this function returns %TRUE, then no further processing
13924 // should be done for this key event.
13925 // RETURNS: %TRUE if the input method handled the key event.
13926 // <event>: the key event
13927 int filter_keypress(AT0)(AT0 /*Gdk2.EventKey*/ event) nothrow {
13928 return gtk_im_context_filter_keypress(&this, UpCast!(Gdk2.EventKey*)(event));
13931 // Notify the input method that the widget to which this
13932 // input context corresponds has gained focus. The input method
13933 // may, for example, change the displayed feedback to reflect
13934 // this change.
13935 void focus_in()() nothrow {
13936 gtk_im_context_focus_in(&this);
13939 // Notify the input method that the widget to which this
13940 // input context corresponds has lost focus. The input method
13941 // may, for example, change the displayed feedback or reset the contexts
13942 // state to reflect this change.
13943 void focus_out()() nothrow {
13944 gtk_im_context_focus_out(&this);
13947 // Retrieve the current preedit string for the input context,
13948 // and a list of attributes to apply to the string.
13949 // This string should be displayed inserted at the insertion
13950 // point.
13951 // <str>: location to store the retrieved string. The string retrieved must be freed with g_free().
13952 // <attrs>: location to store the retrieved attribute list. When you are done with this list, you must unreference it with pango_attr_list_unref().
13953 // <cursor_pos>: location to store position of cursor (in characters) within the preedit string.
13954 void get_preedit_string(AT0, AT1)(/*out*/ AT0 /*char**/ str, /*out*/ AT1 /*Pango.AttrList**/ attrs, /*out*/ int* cursor_pos) nothrow {
13955 gtk_im_context_get_preedit_string(&this, toCString!(char**)(str), UpCast!(Pango.AttrList**)(attrs), cursor_pos);
13958 // Retrieves context around the insertion point. Input methods
13959 // typically want context in order to constrain input text based on
13960 // existing text; this is important for languages such as Thai where
13961 // only some sequences of characters are allowed.
13963 // This function is implemented by emitting the
13964 // GtkIMContext::retrieve_surrounding signal on the input method; in
13965 // response to this signal, a widget should provide as much context as
13966 // is available, up to an entire paragraph, by calling
13967 // gtk_im_context_set_surrounding(). Note that there is no obligation
13968 // for a widget to respond to the ::retrieve_surrounding signal, so input
13969 // methods must be prepared to function without context.
13971 // you must free the result stored in *text.
13972 // RETURNS: %TRUE if surrounding text was provided; in this case
13973 // <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().
13974 // <cursor_index>: (out) location to store byte index of the insertion cursor within @text.
13975 int get_surrounding(AT0)(/*out*/ AT0 /*char**/ text, int* cursor_index) nothrow {
13976 return gtk_im_context_get_surrounding(&this, toCString!(char**)(text), cursor_index);
13979 // Notify the input method that a change such as a change in cursor
13980 // position has been made. This will typically cause the input
13981 // method to clear the preedit state.
13982 void reset()() nothrow {
13983 gtk_im_context_reset(&this);
13986 // Set the client window for the input context; this is the
13987 // #GdkWindow in which the input appears. This window is
13988 // used in order to correctly position status windows, and may
13989 // also be used for purposes internal to the input method.
13990 // <window>: the client window. This may be %NULL to indicate that the previous client window no longer exists.
13991 void set_client_window(AT0)(AT0 /*Gdk2.Window*/ window=null) nothrow {
13992 gtk_im_context_set_client_window(&this, UpCast!(Gdk2.Window*)(window));
13995 // Notify the input method that a change in cursor
13996 // position has been made. The location is relative to the client
13997 // window.
13998 // <area>: new location
13999 void set_cursor_location(AT0)(AT0 /*Gdk2.Rectangle*/ area) nothrow {
14000 gtk_im_context_set_cursor_location(&this, UpCast!(Gdk2.Rectangle*)(area));
14003 // Sets surrounding context around the insertion point and preedit
14004 // string. This function is expected to be called in response to the
14005 // GtkIMContext::retrieve_surrounding signal, and will likely have no
14006 // effect if called at other times.
14007 // <text>: text surrounding the insertion point, as UTF-8. the preedit string should not be included within @text.
14008 // <len>: the length of @text, or -1 if @text is nul-terminated
14009 // <cursor_index>: the byte index of the insertion cursor within @text.
14010 void set_surrounding(AT0)(AT0 /*char*/ text, int len, int cursor_index) nothrow {
14011 gtk_im_context_set_surrounding(&this, toCString!(char*)(text), len, cursor_index);
14014 // Sets whether the IM context should use the preedit string
14015 // to display feedback. If @use_preedit is FALSE (default
14016 // is TRUE), then the IM context may use some other method to display
14017 // feedback, such as displaying it in a child of the root window.
14018 // <use_preedit>: whether the IM context should use the preedit string.
14019 void set_use_preedit()(int use_preedit) nothrow {
14020 gtk_im_context_set_use_preedit(&this, use_preedit);
14023 // The ::commit signal is emitted when a complete input sequence
14024 // has been entered by the user. This can be a single character
14025 // immediately after a key press or the final result of preediting.
14026 // <str>: the completed character(s) entered by the user
14027 extern (C) alias static void function (IMContext* this_, char* str, void* user_data=null) nothrow signal_commit;
14029 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14030 return super_.signal_connect!name(cb, data, cf);
14033 ulong signal_connect(string name:"commit", CB/*:signal_commit*/)
14034 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
14035 if (is(typeof(cb)==signal_commit)||_ttmm!(CB, signal_commit)()) {
14036 return signal_connect_data!()(&this, cast(char*)"commit",
14037 cast(GObject2.Callback)cb, data, null, cf);
14040 // The ::delete-surrounding signal is emitted when the input method
14041 // needs to delete all or part of the context surrounding the cursor.
14042 // RETURNS: %TRUE if the signal was handled.
14043 // <offset>: the character offset from the cursor position of the text to be deleted. A negative value indicates a position before the cursor.
14044 // <n_chars>: the number of characters to be deleted
14045 extern (C) alias static c_int function (IMContext* this_, int offset, int n_chars, void* user_data=null) nothrow signal_delete_surrounding;
14046 ulong signal_connect(string name:"delete-surrounding", CB/*:signal_delete_surrounding*/)
14047 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
14048 if (is(typeof(cb)==signal_delete_surrounding)||_ttmm!(CB, signal_delete_surrounding)()) {
14049 return signal_connect_data!()(&this, cast(char*)"delete-surrounding",
14050 cast(GObject2.Callback)cb, data, null, cf);
14053 // The ::preedit-changed signal is emitted whenever the preedit sequence
14054 // currently being entered has changed. It is also emitted at the end of
14055 // a preedit sequence, in which case
14056 // gtk_im_context_get_preedit_string() returns the empty string.
14057 extern (C) alias static void function (IMContext* this_, void* user_data=null) nothrow signal_preedit_changed;
14058 ulong signal_connect(string name:"preedit-changed", CB/*:signal_preedit_changed*/)
14059 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
14060 if (is(typeof(cb)==signal_preedit_changed)||_ttmm!(CB, signal_preedit_changed)()) {
14061 return signal_connect_data!()(&this, cast(char*)"preedit-changed",
14062 cast(GObject2.Callback)cb, data, null, cf);
14065 // The ::preedit-end signal is emitted when a preediting sequence
14066 // has been completed or canceled.
14067 extern (C) alias static void function (IMContext* this_, void* user_data=null) nothrow signal_preedit_end;
14068 ulong signal_connect(string name:"preedit-end", CB/*:signal_preedit_end*/)
14069 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
14070 if (is(typeof(cb)==signal_preedit_end)||_ttmm!(CB, signal_preedit_end)()) {
14071 return signal_connect_data!()(&this, cast(char*)"preedit-end",
14072 cast(GObject2.Callback)cb, data, null, cf);
14075 // The ::preedit-start signal is emitted when a new preediting sequence
14076 // starts.
14077 extern (C) alias static void function (IMContext* this_, void* user_data=null) nothrow signal_preedit_start;
14078 ulong signal_connect(string name:"preedit-start", CB/*:signal_preedit_start*/)
14079 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
14080 if (is(typeof(cb)==signal_preedit_start)||_ttmm!(CB, signal_preedit_start)()) {
14081 return signal_connect_data!()(&this, cast(char*)"preedit-start",
14082 cast(GObject2.Callback)cb, data, null, cf);
14085 // The ::retrieve-surrounding signal is emitted when the input method
14086 // requires the context surrounding the cursor. The callback should set
14087 // the input method surrounding context by calling the
14088 // gtk_im_context_set_surrounding() method.
14089 // RETURNS: %TRUE if the signal was handled.
14090 extern (C) alias static c_int function (IMContext* this_, void* user_data=null) nothrow signal_retrieve_surrounding;
14091 ulong signal_connect(string name:"retrieve-surrounding", CB/*:signal_retrieve_surrounding*/)
14092 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
14093 if (is(typeof(cb)==signal_retrieve_surrounding)||_ttmm!(CB, signal_retrieve_surrounding)()) {
14094 return signal_connect_data!()(&this, cast(char*)"retrieve-surrounding",
14095 cast(GObject2.Callback)cb, data, null, cf);
14099 struct IMContextClass {
14100 private ObjectClass parent_class;
14101 extern (C) void function (IMContext* context) nothrow preedit_start;
14102 extern (C) void function (IMContext* context) nothrow preedit_end;
14103 extern (C) void function (IMContext* context) nothrow preedit_changed;
14104 extern (C) void function (IMContext* context, char* str) nothrow commit;
14105 extern (C) int function (IMContext* context) nothrow retrieve_surrounding;
14107 // RETURNS: %TRUE if the signal was handled.
14108 // <offset>: offset from cursor position in chars; a negative value means start before the cursor.
14109 // <n_chars>: number of characters to delete.
14110 extern (C) int function (IMContext* context, int offset, int n_chars) nothrow delete_surrounding;
14111 // <window>: the client window. This may be %NULL to indicate that the previous client window no longer exists.
14112 extern (C) void function (IMContext* context, Gdk2.Window* window=null) nothrow set_client_window;
14114 // <str>: location to store the retrieved string. The string retrieved must be freed with g_free().
14115 // <attrs>: location to store the retrieved attribute list. When you are done with this list, you must unreference it with pango_attr_list_unref().
14116 // <cursor_pos>: location to store position of cursor (in characters) within the preedit string.
14117 extern (C) void function (IMContext* context, /*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos) nothrow get_preedit_string;
14119 // RETURNS: %TRUE if the input method handled the key event.
14120 // <event>: the key event
14121 extern (C) int function (IMContext* context, Gdk2.EventKey* event) nothrow filter_keypress;
14122 extern (C) void function (IMContext* context) nothrow focus_in;
14123 extern (C) void function (IMContext* context) nothrow focus_out;
14124 extern (C) void function (IMContext* context) nothrow reset;
14125 // <area>: new location
14126 extern (C) void function (IMContext* context, Gdk2.Rectangle* area) nothrow set_cursor_location;
14127 // <use_preedit>: whether the IM context should use the preedit string.
14128 extern (C) void function (IMContext* context, int use_preedit) nothrow set_use_preedit;
14130 // <text>: text surrounding the insertion point, as UTF-8. the preedit string should not be included within @text.
14131 // <len>: the length of @text, or -1 if @text is nul-terminated
14132 // <cursor_index>: the byte index of the insertion cursor within @text.
14133 extern (C) void function (IMContext* context, char* text, int len, int cursor_index) nothrow set_surrounding;
14135 // RETURNS: %TRUE if surrounding text was provided; in this case
14136 // <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().
14137 // <cursor_index>: (out) location to store byte index of the insertion cursor within @text.
14138 extern (C) int function (IMContext* context, /*out*/ char** text, int* cursor_index) nothrow get_surrounding;
14139 extern (C) void function () nothrow _gtk_reserved1;
14140 extern (C) void function () nothrow _gtk_reserved2;
14141 extern (C) void function () nothrow _gtk_reserved3;
14142 extern (C) void function () nothrow _gtk_reserved4;
14143 extern (C) void function () nothrow _gtk_reserved5;
14144 extern (C) void function () nothrow _gtk_reserved6;
14147 // Bookkeeping information about a loadable input method.
14148 struct IMContextInfo {
14149 char* context_id, context_name, domain, domain_dirname, default_locales;
14152 struct IMContextSimple /* : IMContext */ {
14153 alias object this;
14154 alias object super_;
14155 alias object imcontext;
14156 IMContext object;
14157 GLib2.SList* tables;
14158 uint[8] compose_buffer;
14159 dchar tentative_match;
14160 int tentative_match_len;
14161 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
14162 uint, "in_hex_sequence", 1,
14163 uint, "modifiers_dropped", 1,
14164 uint, "__dummy32A", 30));
14167 // Creates a new #GtkIMContextSimple.
14168 // RETURNS: a new #GtkIMContextSimple.
14169 static IMContextSimple* /*new*/ new_()() nothrow {
14170 return gtk_im_context_simple_new();
14172 static auto opCall()() {
14173 return gtk_im_context_simple_new();
14176 // Adds an additional table to search to the input context.
14177 // Each row of the table consists of @max_seq_len key symbols
14178 // followed by two #guint16 interpreted as the high and low
14179 // words of a #gunicode value. Tables are searched starting
14180 // from the last added.
14182 // The table must be sorted in dictionary order on the
14183 // numeric value of the key symbol fields. (Values beyond
14184 // the length of the sequence should be zero.)
14185 // <data>: the table
14186 // <max_seq_len>: Maximum length of a sequence in the table (cannot be greater than #GTK_MAX_COMPOSE_LEN)
14187 // <n_seqs>: number of sequences in the table
14188 void add_table(AT0)(AT0 /*ushort*/ data, int max_seq_len, int n_seqs) nothrow {
14189 gtk_im_context_simple_add_table(&this, UpCast!(ushort*)(data), max_seq_len, n_seqs);
14193 struct IMContextSimpleClass {
14194 IMContextClass parent_class;
14197 struct IMMulticontext /* : IMContext */ {
14198 alias object this;
14199 alias object super_;
14200 alias object imcontext;
14201 IMContext object;
14202 IMContext* slave;
14203 IMMulticontextPrivate* priv;
14204 char* context_id;
14207 // Creates a new #GtkIMMulticontext.
14208 // RETURNS: a new #GtkIMMulticontext.
14209 static IMMulticontext* /*new*/ new_()() nothrow {
14210 return gtk_im_multicontext_new();
14212 static auto opCall()() {
14213 return gtk_im_multicontext_new();
14216 // Add menuitems for various available input methods to a menu;
14217 // the menuitems, when selected, will switch the input method
14218 // for the context and the global default input method.
14219 // <menushell>: a #GtkMenuShell
14220 void append_menuitems(AT0)(AT0 /*MenuShell*/ menushell) nothrow {
14221 gtk_im_multicontext_append_menuitems(&this, UpCast!(MenuShell*)(menushell));
14224 // VERSION: 2.16
14225 // Gets the id of the currently active slave of the @context.
14226 // RETURNS: the id of the currently active slave
14227 char* get_context_id()() nothrow {
14228 return gtk_im_multicontext_get_context_id(&this);
14231 // VERSION: 2.16
14232 // Sets the context id for @context.
14234 // This causes the currently active slave of @context to be
14235 // replaced by the slave corresponding to the new context id.
14236 // <context_id>: the id to use
14237 void set_context_id(AT0)(AT0 /*char*/ context_id) nothrow {
14238 gtk_im_multicontext_set_context_id(&this, toCString!(char*)(context_id));
14242 struct IMMulticontextClass {
14243 IMContextClass parent_class;
14244 extern (C) void function () nothrow _gtk_reserved1;
14245 extern (C) void function () nothrow _gtk_reserved2;
14246 extern (C) void function () nothrow _gtk_reserved3;
14247 extern (C) void function () nothrow _gtk_reserved4;
14250 struct IMMulticontextPrivate {
14253 enum IMPreeditStyle {
14254 NOTHING = 0,
14255 CALLBACK = 1,
14256 NONE = 2
14258 enum IMStatusStyle {
14259 NOTHING = 0,
14260 CALLBACK = 1,
14261 NONE = 2
14263 enum int INPUT_ERROR = -1;
14264 enum int INTERFACE_AGE = 10;
14265 struct IconFactory /* : GObject.Object */ {
14266 mixin Buildable.__interface__;
14267 alias parent_instance this;
14268 alias parent_instance super_;
14269 alias parent_instance object;
14270 GObject2.Object parent_instance;
14271 GLib2.HashTable* icons;
14274 // Creates a new #GtkIconFactory. An icon factory manages a collection
14275 // of #GtkIconSet<!-- -->s; a #GtkIconSet manages a set of variants of a
14276 // particular icon (i.e. a #GtkIconSet contains variants for different
14277 // sizes and widget states). Icons in an icon factory are named by a
14278 // stock ID, which is a simple string identifying the icon. Each
14279 // #GtkStyle has a list of #GtkIconFactory<!-- -->s derived from the current
14280 // theme; those icon factories are consulted first when searching for
14281 // an icon. If the theme doesn't set a particular icon, GTK+ looks for
14282 // the icon in a list of default icon factories, maintained by
14283 // gtk_icon_factory_add_default() and
14284 // gtk_icon_factory_remove_default(). Applications with icons should
14285 // add a default icon factory with their icons, which will allow
14286 // themes to override the icons for the application.
14287 // RETURNS: a new #GtkIconFactory
14288 static IconFactory* /*new*/ new_()() nothrow {
14289 return gtk_icon_factory_new();
14291 static auto opCall()() {
14292 return gtk_icon_factory_new();
14295 // Looks for an icon in the list of default icon factories. For
14296 // display to the user, you should use gtk_style_lookup_icon_set() on
14297 // the #GtkStyle for the widget that will display the icon, instead of
14298 // using this function directly, so that themes are taken into
14299 // account.
14300 // RETURNS: a #GtkIconSet, or %NULL
14301 // <stock_id>: an icon name
14302 static IconSet* lookup_default(AT0)(AT0 /*char*/ stock_id) nothrow {
14303 return gtk_icon_factory_lookup_default(toCString!(char*)(stock_id));
14306 // Adds the given @icon_set to the icon factory, under the name
14307 // @stock_id. @stock_id should be namespaced for your application,
14308 // e.g. "myapp-whatever-icon". Normally applications create a
14309 // #GtkIconFactory, then add it to the list of default factories with
14310 // gtk_icon_factory_add_default(). Then they pass the @stock_id to
14311 // widgets such as #GtkImage to display the icon. Themes can provide
14312 // an icon with the same name (such as "myapp-whatever-icon") to
14313 // override your application's default icons. If an icon already
14314 // existed in @factory for @stock_id, it is unreferenced and replaced
14315 // with the new @icon_set.
14316 // <stock_id>: icon name
14317 // <icon_set>: icon set
14318 void add(AT0, AT1)(AT0 /*char*/ stock_id, AT1 /*IconSet*/ icon_set) nothrow {
14319 gtk_icon_factory_add(&this, toCString!(char*)(stock_id), UpCast!(IconSet*)(icon_set));
14322 // Adds an icon factory to the list of icon factories searched by
14323 // gtk_style_lookup_icon_set(). This means that, for example,
14324 // gtk_image_new_from_stock() will be able to find icons in @factory.
14325 // There will normally be an icon factory added for each library or
14326 // application that comes with icons. The default icon factories
14327 // can be overridden by themes.
14328 void add_default()() nothrow {
14329 gtk_icon_factory_add_default(&this);
14332 // Looks up @stock_id in the icon factory, returning an icon set
14333 // if found, otherwise %NULL. For display to the user, you should
14334 // use gtk_style_lookup_icon_set() on the #GtkStyle for the
14335 // widget that will display the icon, instead of using this
14336 // function directly, so that themes are taken into account.
14337 // RETURNS: icon set of @stock_id.
14338 // <stock_id>: an icon name
14339 IconSet* lookup(AT0)(AT0 /*char*/ stock_id) nothrow {
14340 return gtk_icon_factory_lookup(&this, toCString!(char*)(stock_id));
14343 // Removes an icon factory from the list of default icon
14344 // factories. Not normally used; you might use it for a library that
14345 // can be unloaded or shut down.
14346 void remove_default()() nothrow {
14347 gtk_icon_factory_remove_default(&this);
14351 struct IconFactoryClass {
14352 GObject2.ObjectClass parent_class;
14353 extern (C) void function () nothrow _gtk_reserved1;
14354 extern (C) void function () nothrow _gtk_reserved2;
14355 extern (C) void function () nothrow _gtk_reserved3;
14356 extern (C) void function () nothrow _gtk_reserved4;
14359 struct IconInfo {
14361 // VERSION: 2.14
14362 // Creates a #GtkIconInfo for a #GdkPixbuf.
14363 // RETURNS: a #GtkIconInfo
14364 // <icon_theme>: a #GtkIconTheme
14365 // <pixbuf>: the pixbuf to wrap in a #GtkIconInfo
14366 static IconInfo* /*new*/ new_for_pixbuf(AT0, AT1)(AT0 /*IconTheme*/ icon_theme, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
14367 return gtk_icon_info_new_for_pixbuf(UpCast!(IconTheme*)(icon_theme), UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
14369 static auto opCall(AT0, AT1)(AT0 /*IconTheme*/ icon_theme, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf) {
14370 return gtk_icon_info_new_for_pixbuf(UpCast!(IconTheme*)(icon_theme), UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
14373 // VERSION: 2.4
14374 // Make a copy of a #GtkIconInfo.
14375 // RETURNS: the new GtkIconInfo
14376 IconInfo* /*new*/ copy()() nothrow {
14377 return gtk_icon_info_copy(&this);
14380 // VERSION: 2.4
14381 // Free a #GtkIconInfo and associated information
14382 void free()() nothrow {
14383 gtk_icon_info_free(&this);
14386 // VERSION: 2.4
14387 // Fetches the set of attach points for an icon. An attach point
14388 // is a location in the icon that can be used as anchor points for attaching
14389 // emblems or overlays to the icon.
14390 // RETURNS: %TRUE if there are any attach points for the icon.
14391 // <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().
14392 // <n_points>: location to store the number of points in @points, or %NULL
14393 int get_attach_points(AT0)(AT0 /*Gdk2.Point**/ points=null, int* n_points=null) nothrow {
14394 return gtk_icon_info_get_attach_points(&this, UpCast!(Gdk2.Point**)(points), n_points);
14397 // VERSION: 2.4
14398 // Gets the base size for the icon. The base size
14399 // is a size for the icon that was specified by
14400 // the icon theme creator. This may be different
14401 // than the actual size of image; an example of
14402 // this is small emblem icons that can be attached
14403 // to a larger icon. These icons will be given
14404 // the same base size as the larger icons to which
14405 // they are attached.
14407 // size is known for the icon.
14408 // RETURNS: the base size, or 0, if no base
14409 int get_base_size()() nothrow {
14410 return gtk_icon_info_get_base_size(&this);
14413 // VERSION: 2.4
14414 // Gets the built-in image for this icon, if any. To allow
14415 // GTK+ to use built in icon images, you must pass the
14416 // %GTK_ICON_LOOKUP_USE_BUILTIN to
14417 // gtk_icon_theme_lookup_icon().
14419 // extra reference is added to the returned pixbuf, so if
14420 // you want to keep it around, you must use g_object_ref().
14421 // The returned image must not be modified.
14422 // RETURNS: the built-in image pixbuf, or %NULL. No
14423 GdkPixbuf2.Pixbuf* get_builtin_pixbuf()() nothrow {
14424 return gtk_icon_info_get_builtin_pixbuf(&this);
14427 // VERSION: 2.4
14428 // Gets the display name for an icon. A display name is a
14429 // string to be used in place of the icon name in a user
14430 // visible context like a list of icons.
14432 // the icon doesn't have a specified display name. This value
14433 // is owned @icon_info and must not be modified or free.
14434 // RETURNS: the display name for the icon or %NULL, if
14435 char* get_display_name()() nothrow {
14436 return gtk_icon_info_get_display_name(&this);
14439 // VERSION: 2.4
14440 // Gets the coordinates of a rectangle within the icon
14441 // that can be used for display of information such
14442 // as a preview of the contents of a text file.
14443 // See gtk_icon_info_set_raw_coordinates() for further
14444 // information about the coordinate system.
14445 // RETURNS: %TRUE if the icon has an embedded rectangle
14446 // <rectangle>: #GdkRectangle in which to store embedded rectangle coordinates; coordinates are only stored when this function returns %TRUE.
14447 int get_embedded_rect(AT0)(/*out*/ AT0 /*Gdk2.Rectangle*/ rectangle) nothrow {
14448 return gtk_icon_info_get_embedded_rect(&this, UpCast!(Gdk2.Rectangle*)(rectangle));
14451 // VERSION: 2.4
14452 // Gets the filename for the icon. If the
14453 // %GTK_ICON_LOOKUP_USE_BUILTIN flag was passed
14454 // to gtk_icon_theme_lookup_icon(), there may be
14455 // no filename if a builtin icon is returned; in this
14456 // case, you should use gtk_icon_info_get_builtin_pixbuf().
14458 // if gtk_icon_info_get_builtin_pixbuf() should
14459 // be used instead. The return value is owned by
14460 // GTK+ and should not be modified or freed.
14461 // RETURNS: the filename for the icon, or %NULL
14462 char* get_filename()() nothrow {
14463 return gtk_icon_info_get_filename(&this);
14466 // VERSION: 2.4
14467 // Renders an icon previously looked up in an icon theme using
14468 // gtk_icon_theme_lookup_icon(); the size will be based on the size
14469 // passed to gtk_icon_theme_lookup_icon(). Note that the resulting
14470 // pixbuf may not be exactly this size; an icon theme may have icons
14471 // that differ slightly from their nominal sizes, and in addition GTK+
14472 // will avoid scaling icons that it considers sufficiently close to the
14473 // requested size or for which the source image would have to be scaled
14474 // up too far. (This maintains sharpness.). This behaviour can be changed
14475 // by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining
14476 // the #GtkIconInfo. If this flag has been specified, the pixbuf
14477 // returned by this function will be scaled to the exact size.
14479 // created icon or a new reference to an internal icon, so you must
14480 // not modify the icon. Use g_object_unref() to release your reference
14481 // to the icon.
14482 // RETURNS: the rendered icon; this may be a newly
14483 GdkPixbuf2.Pixbuf* /*new*/ load_icon(AT0)(AT0 /*GLib2.Error**/ error=null) nothrow {
14484 return gtk_icon_info_load_icon(&this, UpCast!(GLib2.Error**)(error));
14487 // VERSION: 2.4
14488 // Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect()
14489 // and gtk_icon_info_get_attach_points() should be returned in their
14490 // original form as specified in the icon theme, instead of scaled
14491 // appropriately for the pixbuf returned by gtk_icon_info_load_icon().
14493 // Raw coordinates are somewhat strange; they are specified to be with
14494 // respect to the unscaled pixmap for PNG and XPM icons, but for SVG
14495 // icons, they are in a 1000x1000 coordinate space that is scaled
14496 // to the final size of the icon. You can determine if the icon is an SVG
14497 // icon by using gtk_icon_info_get_filename(), and seeing if it is non-%NULL
14498 // and ends in '.svg'.
14500 // This function is provided primarily to allow compatibility wrappers
14501 // for older API's, and is not expected to be useful for applications.
14502 // <raw_coordinates>: whether the coordinates of embedded rectangles and attached points should be returned in their original (unscaled) form.
14503 void set_raw_coordinates()(int raw_coordinates) nothrow {
14504 gtk_icon_info_set_raw_coordinates(&this, raw_coordinates);
14508 // Used to specify options for gtk_icon_theme_lookup_icon()
14509 enum IconLookupFlags {
14510 NO_SVG = 1,
14511 FORCE_SVG = 2,
14512 USE_BUILTIN = 4,
14513 GENERIC_FALLBACK = 8,
14514 FORCE_SIZE = 16
14516 struct IconSet {
14518 // Creates a new #GtkIconSet. A #GtkIconSet represents a single icon
14519 // in various sizes and widget states. It can provide a #GdkPixbuf
14520 // for a given size and state on request, and automatically caches
14521 // some of the rendered #GdkPixbuf objects.
14523 // Normally you would use gtk_widget_render_icon() instead of
14524 // using #GtkIconSet directly. The one case where you'd use
14525 // #GtkIconSet is to create application-specific icon sets to place in
14526 // a #GtkIconFactory.
14527 // RETURNS: a new #GtkIconSet
14528 static IconSet* /*new*/ new_()() nothrow {
14529 return gtk_icon_set_new();
14531 static auto opCall()() {
14532 return gtk_icon_set_new();
14535 // Creates a new #GtkIconSet with @pixbuf as the default/fallback
14536 // source image. If you don't add any additional #GtkIconSource to the
14537 // icon set, all variants of the icon will be created from @pixbuf,
14538 // using scaling, pixelation, etc. as required to adjust the icon size
14539 // or make the icon look insensitive/prelighted.
14540 // RETURNS: a new #GtkIconSet
14541 // <pixbuf>: a #GdkPixbuf
14542 static IconSet* /*new*/ new_from_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
14543 return gtk_icon_set_new_from_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
14545 static auto opCall(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) {
14546 return gtk_icon_set_new_from_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
14549 // Icon sets have a list of #GtkIconSource, which they use as base
14550 // icons for rendering icons in different states and sizes. Icons are
14551 // scaled, made to look insensitive, etc. in
14552 // gtk_icon_set_render_icon(), but #GtkIconSet needs base images to
14553 // work with. The base images and when to use them are described by
14554 // a #GtkIconSource.
14556 // This function copies @source, so you can reuse the same source immediately
14557 // without affecting the icon set.
14559 // An example of when you'd use this function: a web browser's "Back
14560 // to Previous Page" icon might point in a different direction in
14561 // Hebrew and in English; it might look different when insensitive;
14562 // and it might change size depending on toolbar mode (small/large
14563 // icons). So a single icon set would contain all those variants of
14564 // the icon, and you might add a separate source for each one.
14566 // You should nearly always add a "default" icon source with all
14567 // fields wildcarded, which will be used as a fallback if no more
14568 // specific source matches. #GtkIconSet always prefers more specific
14569 // icon sources to more generic icon sources. The order in which you
14570 // add the sources to the icon set does not matter.
14572 // gtk_icon_set_new_from_pixbuf() creates a new icon set with a
14573 // default icon source based on the given pixbuf.
14574 // <source>: a #GtkIconSource
14575 void add_source(AT0)(AT0 /*IconSource*/ source) nothrow {
14576 gtk_icon_set_add_source(&this, UpCast!(IconSource*)(source));
14579 // Copies @icon_set by value.
14580 // RETURNS: a new #GtkIconSet identical to the first.
14581 IconSet* /*new*/ copy()() nothrow {
14582 return gtk_icon_set_copy(&this);
14585 // Obtains a list of icon sizes this icon set can render. The returned
14586 // array must be freed with g_free().
14587 // <sizes>: return location for array of sizes
14588 // <n_sizes>: location to store number of elements in returned array
14589 void get_sizes(AT0)(/*out*/ AT0 /*IconSize**/ sizes, /*out*/ int* n_sizes) nothrow {
14590 gtk_icon_set_get_sizes(&this, UpCast!(IconSize**)(sizes), n_sizes);
14593 // Increments the reference count on @icon_set.
14594 // RETURNS: @icon_set.
14595 IconSet* /*new*/ ref_()() nothrow {
14596 return gtk_icon_set_ref(&this);
14599 // Renders an icon using gtk_style_render_icon(). In most cases,
14600 // gtk_widget_render_icon() is better, since it automatically provides
14601 // most of the arguments from the current widget settings. This
14602 // function never returns %NULL; if the icon can't be rendered
14603 // (perhaps because an image file fails to load), a default "missing
14604 // image" icon will be returned instead.
14605 // RETURNS: a #GdkPixbuf to be displayed
14606 // <style>: a #GtkStyle associated with @widget, or %NULL
14607 // <direction>: text direction
14608 // <state>: widget state
14609 // <size>: icon size. A size of (GtkIconSize)-1 means render at the size of the source and don't scale.
14610 // <widget>: widget that will display the icon, or %NULL. The only use that is typically made of this is to determine the appropriate #GdkScreen.
14611 // <detail>: detail to pass to the theme engine, or %NULL. Note that passing a detail of anything but %NULL will disable caching.
14612 GdkPixbuf2.Pixbuf* /*new*/ render_icon(AT0, AT1, AT2)(AT0 /*Style*/ style, TextDirection direction, StateType state, IconSize size, AT1 /*Widget*/ widget=null, AT2 /*char*/ detail=null) nothrow {
14613 return gtk_icon_set_render_icon(&this, UpCast!(Style*)(style), direction, state, size, UpCast!(Widget*)(widget), toCString!(char*)(detail));
14616 // Decrements the reference count on @icon_set, and frees memory
14617 // if the reference count reaches 0.
14618 void unref()() nothrow {
14619 gtk_icon_set_unref(&this);
14623 enum IconSize {
14624 INVALID = 0,
14625 MENU = 1,
14626 SMALL_TOOLBAR = 2,
14627 LARGE_TOOLBAR = 3,
14628 BUTTON = 4,
14629 DND = 5,
14630 DIALOG = 6
14632 struct IconSource {
14634 // Creates a new #GtkIconSource. A #GtkIconSource contains a #GdkPixbuf (or
14635 // image filename) that serves as the base image for one or more of the
14636 // icons in a #GtkIconSet, along with a specification for which icons in the
14637 // icon set will be based on that pixbuf or image file. An icon set contains
14638 // a set of icons that represent "the same" logical concept in different states,
14639 // different global text directions, and different sizes.
14641 // So for example a web browser's "Back to Previous Page" icon might
14642 // point in a different direction in Hebrew and in English; it might
14643 // look different when insensitive; and it might change size depending
14644 // on toolbar mode (small/large icons). So a single icon set would
14645 // contain all those variants of the icon. #GtkIconSet contains a list
14646 // of #GtkIconSource from which it can derive specific icon variants in
14647 // the set.
14649 // In the simplest case, #GtkIconSet contains one source pixbuf from
14650 // which it derives all variants. The convenience function
14651 // gtk_icon_set_new_from_pixbuf() handles this case; if you only have
14652 // one source pixbuf, just use that function.
14654 // If you want to use a different base pixbuf for different icon
14655 // variants, you create multiple icon sources, mark which variants
14656 // they'll be used to create, and add them to the icon set with
14657 // gtk_icon_set_add_source().
14659 // By default, the icon source has all parameters wildcarded. That is,
14660 // the icon source will be used as the base icon for any desired text
14661 // direction, widget state, or icon size.
14662 // RETURNS: a new #GtkIconSource
14663 static IconSource* /*new*/ new_()() nothrow {
14664 return gtk_icon_source_new();
14666 static auto opCall()() {
14667 return gtk_icon_source_new();
14670 // Creates a copy of @source; mostly useful for language bindings.
14671 // RETURNS: a new #GtkIconSource
14672 IconSource* /*new*/ copy()() nothrow {
14673 return gtk_icon_source_copy(&this);
14676 // Frees a dynamically-allocated icon source, along with its
14677 // filename, size, and pixbuf fields if those are not %NULL.
14678 void free()() nothrow {
14679 gtk_icon_source_free(&this);
14682 // Obtains the text direction this icon source applies to. The return
14683 // value is only useful/meaningful if the text direction is <emphasis>not</emphasis>
14684 // wildcarded.
14685 // RETURNS: text direction this source matches
14686 TextDirection get_direction()() nothrow {
14687 return gtk_icon_source_get_direction(&this);
14690 // Gets the value set by gtk_icon_source_set_direction_wildcarded().
14691 // RETURNS: %TRUE if this icon source is a base for any text direction variant
14692 int get_direction_wildcarded()() nothrow {
14693 return gtk_icon_source_get_direction_wildcarded(&this);
14696 // Retrieves the source filename, or %NULL if none is set. The
14697 // filename is not a copy, and should not be modified or expected to
14698 // persist beyond the lifetime of the icon source.
14700 // or freed.
14701 // RETURNS: image filename. This string must not be modified
14702 char* get_filename()() nothrow {
14703 return gtk_icon_source_get_filename(&this);
14706 // Retrieves the source icon name, or %NULL if none is set. The
14707 // icon_name is not a copy, and should not be modified or expected to
14708 // persist beyond the lifetime of the icon source.
14709 // RETURNS: icon name. This string must not be modified or freed.
14710 char* get_icon_name()() nothrow {
14711 return gtk_icon_source_get_icon_name(&this);
14714 // Retrieves the source pixbuf, or %NULL if none is set.
14715 // In addition, if a filename source is in use, this
14716 // function in some cases will return the pixbuf from
14717 // loaded from the filename. This is, for example, true
14718 // for the GtkIconSource passed to the GtkStyle::render_icon()
14719 // virtual function. The reference count on the pixbuf is
14720 // not incremented.
14721 // RETURNS: source pixbuf
14722 GdkPixbuf2.Pixbuf* get_pixbuf()() nothrow {
14723 return gtk_icon_source_get_pixbuf(&this);
14726 // Obtains the icon size this source applies to. The return value
14727 // is only useful/meaningful if the icon size is <emphasis>not</emphasis> wildcarded.
14728 // RETURNS: icon size this source matches.
14729 IconSize get_size()() nothrow {
14730 return gtk_icon_source_get_size(&this);
14733 // Gets the value set by gtk_icon_source_set_size_wildcarded().
14734 // RETURNS: %TRUE if this icon source is a base for any icon size variant
14735 int get_size_wildcarded()() nothrow {
14736 return gtk_icon_source_get_size_wildcarded(&this);
14739 // Obtains the widget state this icon source applies to. The return
14740 // value is only useful/meaningful if the widget state is <emphasis>not</emphasis>
14741 // wildcarded.
14742 // RETURNS: widget state this source matches
14743 StateType get_state()() nothrow {
14744 return gtk_icon_source_get_state(&this);
14747 // Gets the value set by gtk_icon_source_set_state_wildcarded().
14748 // RETURNS: %TRUE if this icon source is a base for any widget state variant
14749 int get_state_wildcarded()() nothrow {
14750 return gtk_icon_source_get_state_wildcarded(&this);
14753 // Sets the text direction this icon source is intended to be used
14754 // with.
14756 // Setting the text direction on an icon source makes no difference
14757 // if the text direction is wildcarded. Therefore, you should usually
14758 // call gtk_icon_source_set_direction_wildcarded() to un-wildcard it
14759 // in addition to calling this function.
14760 // <direction>: text direction this source applies to
14761 void set_direction()(TextDirection direction) nothrow {
14762 gtk_icon_source_set_direction(&this, direction);
14765 // If the text direction is wildcarded, this source can be used
14766 // as the base image for an icon in any #GtkTextDirection.
14767 // If the text direction is not wildcarded, then the
14768 // text direction the icon source applies to should be set
14769 // with gtk_icon_source_set_direction(), and the icon source
14770 // will only be used with that text direction.
14772 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
14773 // wildcarded sources, and will use an exact match when possible.
14774 // <setting>: %TRUE to wildcard the text direction
14775 void set_direction_wildcarded()(int setting) nothrow {
14776 gtk_icon_source_set_direction_wildcarded(&this, setting);
14779 // Sets the name of an image file to use as a base image when creating
14780 // icon variants for #GtkIconSet. The filename must be absolute.
14781 // <filename>: image file to use
14782 void set_filename(AT0)(AT0 /*char*/ filename) nothrow {
14783 gtk_icon_source_set_filename(&this, toCString!(char*)(filename));
14786 // Sets the name of an icon to look up in the current icon theme
14787 // to use as a base image when creating icon variants for #GtkIconSet.
14788 // <icon_name>: name of icon to use
14789 void set_icon_name(AT0)(AT0 /*char*/ icon_name=null) nothrow {
14790 gtk_icon_source_set_icon_name(&this, toCString!(char*)(icon_name));
14793 // Sets a pixbuf to use as a base image when creating icon variants
14794 // for #GtkIconSet.
14795 // <pixbuf>: pixbuf to use as a source
14796 void set_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
14797 gtk_icon_source_set_pixbuf(&this, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
14800 // Sets the icon size this icon source is intended to be used
14801 // with.
14803 // Setting the icon size on an icon source makes no difference
14804 // if the size is wildcarded. Therefore, you should usually
14805 // call gtk_icon_source_set_size_wildcarded() to un-wildcard it
14806 // in addition to calling this function.
14807 // <size>: icon size this source applies to
14808 void set_size()(IconSize size) nothrow {
14809 gtk_icon_source_set_size(&this, size);
14812 // If the icon size is wildcarded, this source can be used as the base
14813 // image for an icon of any size. If the size is not wildcarded, then
14814 // the size the source applies to should be set with
14815 // gtk_icon_source_set_size() and the icon source will only be used
14816 // with that specific size.
14818 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
14819 // wildcarded sources, and will use an exact match when possible.
14821 // #GtkIconSet will normally scale wildcarded source images to produce
14822 // an appropriate icon at a given size, but will not change the size
14823 // of source images that match exactly.
14824 // <setting>: %TRUE to wildcard the widget state
14825 void set_size_wildcarded()(int setting) nothrow {
14826 gtk_icon_source_set_size_wildcarded(&this, setting);
14829 // Sets the widget state this icon source is intended to be used
14830 // with.
14832 // Setting the widget state on an icon source makes no difference
14833 // if the state is wildcarded. Therefore, you should usually
14834 // call gtk_icon_source_set_state_wildcarded() to un-wildcard it
14835 // in addition to calling this function.
14836 // <state>: widget state this source applies to
14837 void set_state()(StateType state) nothrow {
14838 gtk_icon_source_set_state(&this, state);
14841 // If the widget state is wildcarded, this source can be used as the
14842 // base image for an icon in any #GtkStateType. If the widget state
14843 // is not wildcarded, then the state the source applies to should be
14844 // set with gtk_icon_source_set_state() and the icon source will
14845 // only be used with that specific state.
14847 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
14848 // wildcarded sources, and will use an exact match when possible.
14850 // #GtkIconSet will normally transform wildcarded source images to
14851 // produce an appropriate icon for a given state, for example
14852 // lightening an image on prelight, but will not modify source images
14853 // that match exactly.
14854 // <setting>: %TRUE to wildcard the widget state
14855 void set_state_wildcarded()(int setting) nothrow {
14856 gtk_icon_source_set_state_wildcarded(&this, setting);
14860 struct IconTheme /* : GObject.Object */ {
14861 alias parent_instance this;
14862 alias parent_instance super_;
14863 alias parent_instance object;
14864 GObject2.Object parent_instance;
14865 private IconThemePrivate* priv;
14868 // VERSION: 2.4
14869 // Creates a new icon theme object. Icon theme objects are used
14870 // to lookup up an icon by name in a particular icon theme.
14871 // Usually, you'll want to use gtk_icon_theme_get_default()
14872 // or gtk_icon_theme_get_for_screen() rather than creating
14873 // a new icon theme object for scratch.
14874 // RETURNS: the newly created #GtkIconTheme object.
14875 static IconTheme* /*new*/ new_()() nothrow {
14876 return gtk_icon_theme_new();
14878 static auto opCall()() {
14879 return gtk_icon_theme_new();
14882 // VERSION: 2.4
14883 // Registers a built-in icon for icon theme lookups. The idea
14884 // of built-in icons is to allow an application or library
14885 // that uses themed icons to function requiring files to
14886 // be present in the file system. For instance, the default
14887 // images for all of GTK+'s stock icons are registered
14888 // as built-icons.
14890 // In general, if you use gtk_icon_theme_add_builtin_icon()
14891 // you should also install the icon in the icon theme, so
14892 // that the icon is generally available.
14894 // This function will generally be used with pixbufs loaded
14895 // via gdk_pixbuf_new_from_inline().
14896 // <icon_name>: the name of the icon to register
14897 // <size>: the size at which to register the icon (different images can be registered for the same icon name at different sizes.)
14898 // <pixbuf>: #GdkPixbuf that contains the image to use for @icon_name.
14899 static void add_builtin_icon(AT0, AT1)(AT0 /*char*/ icon_name, int size, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
14900 gtk_icon_theme_add_builtin_icon(toCString!(char*)(icon_name), size, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
14903 // VERSION: 2.4
14904 // Gets the icon theme for the default screen. See
14905 // gtk_icon_theme_get_for_screen().
14907 // the default screen. This icon theme is associated with
14908 // the screen and can be used as long as the screen
14909 // is open. Do not ref or unref it.
14910 // RETURNS: A unique #GtkIconTheme associated with
14911 static IconTheme* get_default()() nothrow {
14912 return gtk_icon_theme_get_default();
14915 // VERSION: 2.4
14916 // Gets the icon theme object associated with @screen; if this
14917 // function has not previously been called for the given
14918 // screen, a new icon theme object will be created and
14919 // associated with the screen. Icon theme objects are
14920 // fairly expensive to create, so using this function
14921 // is usually a better choice than calling than gtk_icon_theme_new()
14922 // and setting the screen yourself; by using this function
14923 // a single icon theme object will be shared between users.
14925 // the given screen. This icon theme is associated with
14926 // the screen and can be used as long as the screen
14927 // is open. Do not ref or unref it.
14928 // RETURNS: A unique #GtkIconTheme associated with
14929 // <screen>: a #GdkScreen
14930 static IconTheme* get_for_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
14931 return gtk_icon_theme_get_for_screen(UpCast!(Gdk2.Screen*)(screen));
14934 // VERSION: 2.4
14935 // Appends a directory to the search path.
14936 // See gtk_icon_theme_set_search_path().
14937 // <path>: directory name to append to the icon path
14938 void append_search_path(AT0)(AT0 /*char*/ path) nothrow {
14939 gtk_icon_theme_append_search_path(&this, toCString!(char*)(path));
14942 // VERSION: 2.12
14943 // Looks up a named icon and returns a structure containing
14944 // information such as the filename of the icon. The icon
14945 // can then be rendered into a pixbuf using
14946 // gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
14947 // combines these two steps if all you need is the pixbuf.)
14949 // If @icon_names contains more than one name, this function
14950 // tries them all in the given order before falling back to
14951 // inherited icon themes.
14953 // about the icon, or %NULL if the icon wasn't found. Free with
14954 // gtk_icon_info_free()
14955 // RETURNS: a #GtkIconInfo structure containing information
14956 // <icon_names>: %NULL-terminated array of icon names to lookup
14957 // <size>: desired icon size
14958 // <flags>: flags modifying the behavior of the icon lookup
14959 IconInfo* /*new*/ choose_icon(AT0)(AT0 /*char*/ icon_names, int size, IconLookupFlags flags) nothrow {
14960 return gtk_icon_theme_choose_icon(&this, toCString!(char*)(icon_names), size, flags);
14963 // VERSION: 2.4
14964 // Gets the name of an icon that is representative of the
14965 // current theme (for instance, to use when presenting
14966 // a list of themes to the user.)
14968 // Free with g_free().
14969 // RETURNS: the name of an example icon or %NULL.
14970 char* /*new*/ get_example_icon_name()() nothrow {
14971 return gtk_icon_theme_get_example_icon_name(&this);
14974 // VERSION: 2.6
14975 // Returns an array of integers describing the sizes at which
14976 // the icon is available without scaling. A size of -1 means
14977 // that the icon is available in a scalable format. The array
14978 // is zero-terminated.
14980 // describing the sizes at which the icon is available. The array
14981 // should be freed with g_free() when it is no longer needed.
14982 // RETURNS: An newly allocated array
14983 // <icon_name>: the name of an icon
14984 int* get_icon_sizes(AT0)(AT0 /*char*/ icon_name) nothrow {
14985 return gtk_icon_theme_get_icon_sizes(&this, toCString!(char*)(icon_name));
14988 // VERSION: 2.4
14989 // Gets the current search path. See gtk_icon_theme_set_search_path().
14990 // <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().
14991 // <n_elements>: location to store number of elements in @path, or %NULL
14992 void get_search_path(AT0)(AT0 /*char**/ path, int* n_elements) nothrow {
14993 gtk_icon_theme_get_search_path(&this, toCString!(char**)(path), n_elements);
14996 // VERSION: 2.4
14997 // Checks whether an icon theme includes an icon
14998 // for a particular name.
15000 // icon for @icon_name.
15001 // RETURNS: %TRUE if @icon_theme includes an
15002 // <icon_name>: the name of an icon
15003 int has_icon(AT0)(AT0 /*char*/ icon_name) nothrow {
15004 return gtk_icon_theme_has_icon(&this, toCString!(char*)(icon_name));
15007 // VERSION: 2.12
15008 // Gets the list of contexts available within the current
15009 // hierarchy of icon themes
15011 // contexts in the theme. You must first free each element
15012 // in the list with g_free(), then free the list itself
15013 // with g_list_free().
15014 // RETURNS: a #GList list holding the names of all the
15015 GLib2.List* /*new*/ list_contexts()() nothrow {
15016 return gtk_icon_theme_list_contexts(&this);
15019 // VERSION: 2.4
15020 // Lists the icons in the current icon theme. Only a subset
15021 // of the icons can be listed by providing a context string.
15022 // The set of values for the context string is system dependent,
15023 // but will typically include such values as "Applications" and
15024 // "MimeTypes".
15026 // holding the names of all the icons in the theme. You must first
15027 // free each element in the list with g_free(), then free the list
15028 // itself with g_list_free().
15029 // RETURNS: a #GList list
15030 // <context>: a string identifying a particular type of icon, or %NULL to list all icons.
15031 GLib2.List* /*new*/ list_icons(AT0)(AT0 /*char*/ context) nothrow {
15032 return gtk_icon_theme_list_icons(&this, toCString!(char*)(context));
15035 // VERSION: 2.4
15036 // Looks up an icon in an icon theme, scales it to the given size
15037 // and renders it into a pixbuf. This is a convenience function;
15038 // if more details about the icon are needed, use
15039 // gtk_icon_theme_lookup_icon() followed by gtk_icon_info_load_icon().
15041 // Note that you probably want to listen for icon theme changes and
15042 // update the icon. This is usually done by connecting to the
15043 // GtkWidget::style-set signal. If for some reason you do not want to
15044 // update the icon when the icon theme changes, you should consider
15045 // using gdk_pixbuf_copy() to make a private copy of the pixbuf
15046 // returned by this function. Otherwise GTK+ may need to keep the old
15047 // icon theme loaded, which would be a waste of memory.
15049 // created icon or a new reference to an internal icon, so you must not modify
15050 // the icon. Use g_object_unref() to release your reference to the
15051 // icon. %NULL if the icon isn't found.
15052 // RETURNS: the rendered icon; this may be a newly
15053 // <icon_name>: the name of the icon to lookup
15054 // <size>: the desired icon size. The resulting icon may not be exactly this size; see gtk_icon_info_load_icon().
15055 // <flags>: flags modifying the behavior of the icon lookup
15056 GdkPixbuf2.Pixbuf* /*new*/ load_icon(AT0, AT1)(AT0 /*char*/ icon_name, int size, IconLookupFlags flags, AT1 /*GLib2.Error**/ error=null) nothrow {
15057 return gtk_icon_theme_load_icon(&this, toCString!(char*)(icon_name), size, flags, UpCast!(GLib2.Error**)(error));
15060 // VERSION: 2.14
15061 // Looks up an icon and returns a structure containing
15062 // information such as the filename of the icon.
15063 // The icon can then be rendered into a pixbuf using
15064 // gtk_icon_info_load_icon().
15066 // information about the icon, or %NULL if the icon
15067 // wasn't found. Free with gtk_icon_info_free()
15068 // RETURNS: a #GtkIconInfo structure containing
15069 // <icon>: the #GIcon to look up
15070 // <size>: desired icon size
15071 // <flags>: flags modifying the behavior of the icon lookup
15072 IconInfo* /*new*/ lookup_by_gicon(AT0)(AT0 /*Gio2.Icon*/ icon, int size, IconLookupFlags flags) nothrow {
15073 return gtk_icon_theme_lookup_by_gicon(&this, UpCast!(Gio2.Icon*)(icon), size, flags);
15076 // VERSION: 2.4
15077 // Looks up a named icon and returns a structure containing
15078 // information such as the filename of the icon. The icon
15079 // can then be rendered into a pixbuf using
15080 // gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
15081 // combines these two steps if all you need is the pixbuf.)
15083 // about the icon, or %NULL if the icon wasn't found. Free with
15084 // gtk_icon_info_free()
15085 // RETURNS: a #GtkIconInfo structure containing information
15086 // <icon_name>: the name of the icon to lookup
15087 // <size>: desired icon size
15088 // <flags>: flags modifying the behavior of the icon lookup
15089 IconInfo* /*new*/ lookup_icon(AT0)(AT0 /*char*/ icon_name, int size, IconLookupFlags flags) nothrow {
15090 return gtk_icon_theme_lookup_icon(&this, toCString!(char*)(icon_name), size, flags);
15093 // VERSION: 2.4
15094 // Prepends a directory to the search path.
15095 // See gtk_icon_theme_set_search_path().
15096 // <path>: directory name to prepend to the icon path
15097 void prepend_search_path(AT0)(AT0 /*char*/ path) nothrow {
15098 gtk_icon_theme_prepend_search_path(&this, toCString!(char*)(path));
15101 // VERSION: 2.4
15102 // Checks to see if the icon theme has changed; if it has, any
15103 // currently cached information is discarded and will be reloaded
15104 // next time @icon_theme is accessed.
15106 // to be reloaded.
15107 // RETURNS: %TRUE if the icon theme has changed and needed
15108 int rescan_if_needed()() nothrow {
15109 return gtk_icon_theme_rescan_if_needed(&this);
15112 // VERSION: 2.4
15113 // Sets the name of the icon theme that the #GtkIconTheme object uses
15114 // overriding system configuration. This function cannot be called
15115 // on the icon theme objects returned from gtk_icon_theme_get_default()
15116 // and gtk_icon_theme_get_for_screen().
15117 // <theme_name>: name of icon theme to use instead of configured theme, or %NULL to unset a previously set custom theme
15118 void set_custom_theme(AT0)(AT0 /*char*/ theme_name) nothrow {
15119 gtk_icon_theme_set_custom_theme(&this, toCString!(char*)(theme_name));
15122 // VERSION: 2.4
15123 // Sets the screen for an icon theme; the screen is used
15124 // to track the user's currently configured icon theme,
15125 // which might be different for different screens.
15126 // <screen>: a #GdkScreen
15127 void set_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
15128 gtk_icon_theme_set_screen(&this, UpCast!(Gdk2.Screen*)(screen));
15131 // VERSION: 2.4
15132 // Sets the search path for the icon theme object. When looking
15133 // for an icon theme, GTK+ will search for a subdirectory of
15134 // one or more of the directories in @path with the same name
15135 // as the icon theme. (Themes from multiple of the path elements
15136 // are combined to allow themes to be extended by adding icons
15137 // in the user's home directory.)
15139 // In addition if an icon found isn't found either in the current
15140 // icon theme or the default icon theme, and an image file with
15141 // the right name is found directly in one of the elements of
15142 // @path, then that image will be used for the icon name.
15143 // (This is legacy feature, and new icons should be put
15144 // into the default icon theme, which is called DEFAULT_THEME_NAME,
15145 // rather than directly on the icon path.)
15146 // <path>: array of directories that are searched for icon themes
15147 // <n_elements>: number of elements in @path.
15148 void set_search_path(AT0)(AT0 /*char*/ path, int n_elements) nothrow {
15149 gtk_icon_theme_set_search_path(&this, toCString!(char*)(path), n_elements);
15152 // Emitted when the current icon theme is switched or GTK+ detects
15153 // that a change has occurred in the contents of the current
15154 // icon theme.
15155 extern (C) alias static void function (IconTheme* this_, void* user_data=null) nothrow signal_changed;
15157 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15158 return super_.signal_connect!name(cb, data, cf);
15161 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
15162 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15163 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
15164 return signal_connect_data!()(&this, cast(char*)"changed",
15165 cast(GObject2.Callback)cb, data, null, cf);
15169 struct IconThemeClass {
15170 GObject2.ObjectClass parent_class;
15171 extern (C) void function (IconTheme* icon_theme) nothrow changed;
15174 // Error codes for GtkIconTheme operations.
15175 enum IconThemeError {
15176 NOT_FOUND = 0,
15177 FAILED = 1
15179 struct IconThemePrivate {
15182 struct IconView /* : Container */ {
15183 mixin Atk.ImplementorIface.__interface__;
15184 mixin Buildable.__interface__;
15185 mixin CellLayout.__interface__;
15186 alias parent this;
15187 alias parent super_;
15188 alias parent container;
15189 Container parent;
15190 IconViewPrivate* priv;
15193 // VERSION: 2.6
15194 // Creates a new #GtkIconView widget
15195 // RETURNS: A newly created #GtkIconView widget
15196 static IconView* new_()() nothrow {
15197 return gtk_icon_view_new();
15199 static auto opCall()() {
15200 return gtk_icon_view_new();
15203 // VERSION: 2.6
15204 // Creates a new #GtkIconView widget with the model @model.
15205 // RETURNS: A newly created #GtkIconView widget.
15206 // <model>: The model.
15207 static IconView* new_with_model(AT0)(AT0 /*TreeModel*/ model) nothrow {
15208 return gtk_icon_view_new_with_model(UpCast!(TreeModel*)(model));
15210 static auto opCall(AT0)(AT0 /*TreeModel*/ model) {
15211 return gtk_icon_view_new_with_model(UpCast!(TreeModel*)(model));
15214 // VERSION: 2.12
15215 // Converts widget coordinates to coordinates for the bin_window,
15216 // as expected by e.g. gtk_icon_view_get_path_at_pos().
15217 // <wx>: X coordinate relative to the widget
15218 // <wy>: Y coordinate relative to the widget
15219 // <bx>: return location for bin_window X coordinate
15220 // <by>: return location for bin_window Y coordinate
15221 void convert_widget_to_bin_window_coords()(int wx, int wy, /*out*/ int* bx, /*out*/ int* by) nothrow {
15222 gtk_icon_view_convert_widget_to_bin_window_coords(&this, wx, wy, bx, by);
15225 // VERSION: 2.8
15226 // Creates a #GdkPixmap representation of the item at @path.
15227 // This image is used for a drag icon.
15228 // RETURNS: a newly-allocated pixmap of the drag icon.
15229 // <path>: a #GtkTreePath in @icon_view
15230 Gdk2.Pixmap* /*new*/ create_drag_icon(AT0)(AT0 /*TreePath*/ path) nothrow {
15231 return gtk_icon_view_create_drag_icon(&this, UpCast!(TreePath*)(path));
15234 // VERSION: 2.8
15235 // Turns @icon_view into a drop destination for automatic DND. Calling this
15236 // method sets #GtkIconView:reorderable to %FALSE.
15237 // <targets>: the table of targets that the drag will support
15238 // <n_targets>: the number of items in @targets
15239 // <actions>: the bitmask of possible actions for a drag to this widget
15240 void enable_model_drag_dest(AT0)(AT0 /*TargetEntry*/ targets, int n_targets, Gdk2.DragAction actions) nothrow {
15241 gtk_icon_view_enable_model_drag_dest(&this, UpCast!(TargetEntry*)(targets), n_targets, actions);
15244 // VERSION: 2.8
15245 // Turns @icon_view into a drag source for automatic DND. Calling this
15246 // method sets #GtkIconView:reorderable to %FALSE.
15247 // <start_button_mask>: Mask of allowed buttons to start drag
15248 // <targets>: the table of targets that the drag will support
15249 // <n_targets>: the number of items in @targets
15250 // <actions>: the bitmask of possible actions for a drag from this widget
15251 void enable_model_drag_source(AT0)(Gdk2.ModifierType start_button_mask, AT0 /*TargetEntry*/ targets, int n_targets, Gdk2.DragAction actions) nothrow {
15252 gtk_icon_view_enable_model_drag_source(&this, start_button_mask, UpCast!(TargetEntry*)(targets), n_targets, actions);
15255 // VERSION: 2.6
15256 // Returns the value of the ::column-spacing property.
15257 // RETURNS: the space between columns
15258 int get_column_spacing()() nothrow {
15259 return gtk_icon_view_get_column_spacing(&this);
15262 // VERSION: 2.6
15263 // Returns the value of the ::columns property.
15264 // RETURNS: the number of columns, or -1
15265 int get_columns()() nothrow {
15266 return gtk_icon_view_get_columns(&this);
15269 // VERSION: 2.8
15270 // Fills in @path and @cell with the current cursor path and cell.
15271 // If the cursor isn't currently set, then *@path will be %NULL.
15272 // If no cell currently has focus, then *@cell will be %NULL.
15274 // The returned #GtkTreePath must be freed with gtk_tree_path_free().
15275 // RETURNS: %TRUE if the cursor is set.
15276 // <path>: Return location for the current cursor path, or %NULL
15277 // <cell>: Return location the current focus cell, or %NULL
15278 int get_cursor(AT0, AT1)(AT0 /*TreePath**/ path=null, AT1 /*CellRenderer**/ cell=null) nothrow {
15279 return gtk_icon_view_get_cursor(&this, UpCast!(TreePath**)(path), UpCast!(CellRenderer**)(cell));
15282 // VERSION: 2.8
15283 // Determines the destination item for a given position.
15284 // RETURNS: whether there is an item at the given position.
15285 // <drag_x>: the position to determine the destination item for
15286 // <drag_y>: the position to determine the destination item for
15287 // <path>: Return location for the path of the item, or %NULL.
15288 // <pos>: Return location for the drop position, or %NULL
15289 int get_dest_item_at_pos(AT0, AT1)(int drag_x, int drag_y, AT0 /*TreePath**/ path=null, AT1 /*IconViewDropPosition*/ pos=null) nothrow {
15290 return gtk_icon_view_get_dest_item_at_pos(&this, drag_x, drag_y, UpCast!(TreePath**)(path), UpCast!(IconViewDropPosition*)(pos));
15293 // VERSION: 2.8
15294 // Gets information about the item that is highlighted for feedback.
15295 // <path>: Return location for the path of the highlighted item, or %NULL.
15296 // <pos>: Return location for the drop position, or %NULL
15297 void get_drag_dest_item(AT0, AT1)(AT0 /*TreePath**/ path=null, AT1 /*IconViewDropPosition*/ pos=null) nothrow {
15298 gtk_icon_view_get_drag_dest_item(&this, UpCast!(TreePath**)(path), UpCast!(IconViewDropPosition*)(pos));
15301 // VERSION: 2.8
15302 // Finds the path at the point (@x, @y), relative to bin_window coordinates.
15303 // In contrast to gtk_icon_view_get_path_at_pos(), this function also
15304 // obtains the cell at the specified position. The returned path should
15305 // be freed with gtk_tree_path_free().
15306 // See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
15307 // widget coordinates to bin_window coordinates.
15308 // RETURNS: %TRUE if an item exists at the specified position
15309 // <x>: The x position to be identified
15310 // <y>: The y position to be identified
15311 // <path>: Return location for the path, or %NULL
15312 // <cell>: Return location for the renderer responsible for the cell at (@x, @y), or %NULL
15313 int get_item_at_pos(AT0, AT1)(int x, int y, AT0 /*TreePath**/ path, AT1 /*CellRenderer**/ cell) nothrow {
15314 return gtk_icon_view_get_item_at_pos(&this, x, y, UpCast!(TreePath**)(path), UpCast!(CellRenderer**)(cell));
15317 // VERSION: 2.22
15318 // Gets the column in which the item @path is currently
15319 // displayed. Column numbers start at 0.
15320 // RETURNS: The column in which the item is displayed
15321 // <path>: the #GtkTreePath of the item
15322 int get_item_column(AT0)(AT0 /*TreePath*/ path) nothrow {
15323 return gtk_icon_view_get_item_column(&this, UpCast!(TreePath*)(path));
15326 // VERSION: 2.22
15327 // Returns the value of the ::item-orientation property which determines
15328 // whether the labels are drawn beside the icons instead of below.
15329 // RETURNS: the relative position of texts and icons
15330 Orientation get_item_orientation()() nothrow {
15331 return gtk_icon_view_get_item_orientation(&this);
15334 // VERSION: 2.18
15335 // Returns the value of the ::item-padding property.
15336 // RETURNS: the padding around items
15337 int get_item_padding()() nothrow {
15338 return gtk_icon_view_get_item_padding(&this);
15341 // VERSION: 2.22
15342 // Gets the row in which the item @path is currently
15343 // displayed. Row numbers start at 0.
15344 // RETURNS: The row in which the item is displayed
15345 // <path>: the #GtkTreePath of the item
15346 int get_item_row(AT0)(AT0 /*TreePath*/ path) nothrow {
15347 return gtk_icon_view_get_item_row(&this, UpCast!(TreePath*)(path));
15350 // VERSION: 2.6
15351 // Returns the value of the ::item-width property.
15352 // RETURNS: the width of a single item, or -1
15353 int get_item_width()() nothrow {
15354 return gtk_icon_view_get_item_width(&this);
15357 // VERSION: 2.6
15358 // Returns the value of the ::margin property.
15359 // RETURNS: the space at the borders
15360 int get_margin()() nothrow {
15361 return gtk_icon_view_get_margin(&this);
15364 // VERSION: 2.6
15365 // Returns the column with markup text for @icon_view.
15366 // RETURNS: the markup column, or -1 if it's unset.
15367 int get_markup_column()() nothrow {
15368 return gtk_icon_view_get_markup_column(&this);
15371 // VERSION: 2.6
15372 // Returns the model the #GtkIconView is based on. Returns %NULL if the
15373 // model is unset.
15375 // currently being used.
15376 // RETURNS: A #GtkTreeModel, or %NULL if none is
15377 TreeModel* get_model()() nothrow {
15378 return gtk_icon_view_get_model(&this);
15381 // VERSION: 2.6
15382 // DEPRECATED (v2.22) method: get_orientation - Use gtk_icon_view_get_item_orientation()
15383 // Returns the value of the ::orientation property which determines
15384 // whether the labels are drawn beside the icons instead of below.
15385 // RETURNS: the relative position of texts and icons
15386 Orientation get_orientation()() nothrow {
15387 return gtk_icon_view_get_orientation(&this);
15390 // VERSION: 2.6
15391 // Finds the path at the point (@x, @y), relative to bin_window coordinates.
15392 // See gtk_icon_view_get_item_at_pos(), if you are also interested in
15393 // the cell at the specified position.
15394 // See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
15395 // widget coordinates to bin_window coordinates.
15397 // if no icon exists at that position.
15398 // RETURNS: The #GtkTreePath corresponding to the icon or %NULL
15399 // <x>: The x position to be identified
15400 // <y>: The y position to be identified
15401 TreePath* /*new*/ get_path_at_pos()(int x, int y) nothrow {
15402 return gtk_icon_view_get_path_at_pos(&this, x, y);
15405 // VERSION: 2.6
15406 // Returns the column with pixbufs for @icon_view.
15407 // RETURNS: the pixbuf column, or -1 if it's unset.
15408 int get_pixbuf_column()() nothrow {
15409 return gtk_icon_view_get_pixbuf_column(&this);
15412 // VERSION: 2.8
15413 // Retrieves whether the user can reorder the list via drag-and-drop.
15414 // See gtk_icon_view_set_reorderable().
15415 // RETURNS: %TRUE if the list can be reordered.
15416 int get_reorderable()() nothrow {
15417 return gtk_icon_view_get_reorderable(&this);
15420 // VERSION: 2.6
15421 // Returns the value of the ::row-spacing property.
15422 // RETURNS: the space between rows
15423 int get_row_spacing()() nothrow {
15424 return gtk_icon_view_get_row_spacing(&this);
15427 // VERSION: 2.6
15428 // Creates a list of paths of all selected items. Additionally, if you are
15429 // planning on modifying the model after calling this function, you may
15430 // want to convert the returned list into a list of #GtkTreeRowReference<!-- -->s.
15431 // To do this, you can use gtk_tree_row_reference_new().
15433 // To free the return value, use:
15434 // |[
15435 // g_list_foreach (list, (GFunc)gtk_tree_path_free, NULL);
15436 // g_list_free (list);
15437 // ]|
15438 // RETURNS: A #GList containing a #GtkTreePath for each selected row.
15439 GLib2.List* /*new*/ get_selected_items()() nothrow {
15440 return gtk_icon_view_get_selected_items(&this);
15443 // VERSION: 2.6
15444 // Gets the selection mode of the @icon_view.
15445 // RETURNS: the current selection mode
15446 SelectionMode get_selection_mode()() nothrow {
15447 return gtk_icon_view_get_selection_mode(&this);
15450 // VERSION: 2.6
15451 // Returns the value of the ::spacing property.
15452 // RETURNS: the space between cells
15453 int get_spacing()() nothrow {
15454 return gtk_icon_view_get_spacing(&this);
15457 // VERSION: 2.6
15458 // Returns the column with text for @icon_view.
15459 // RETURNS: the text column, or -1 if it's unset.
15460 int get_text_column()() nothrow {
15461 return gtk_icon_view_get_text_column(&this);
15464 // VERSION: 2.12
15465 // Returns the column of @icon_view's model which is being used for
15466 // displaying tooltips on @icon_view's rows.
15468 // used, or -1 if this is disabled.
15469 // RETURNS: the index of the tooltip column that is currently being
15470 int get_tooltip_column()() nothrow {
15471 return gtk_icon_view_get_tooltip_column(&this);
15474 // VERSION: 2.12
15475 // This function is supposed to be used in a #GtkWidget::query-tooltip
15476 // signal handler for #GtkIconView. The @x, @y and @keyboard_tip values
15477 // which are received in the signal handler, should be passed to this
15478 // function without modification.
15480 // The return value indicates whether there is an icon view item at the given
15481 // coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
15482 // tooltips the item returned will be the cursor item. When %TRUE, then any of
15483 // @model, @path and @iter which have been provided will be set to point to
15484 // that row and the corresponding model. @x and @y will always be converted
15485 // to be relative to @icon_view's bin_window if @keyboard_tooltip is %FALSE.
15486 // RETURNS: whether or not the given tooltip context points to a item
15487 // <x>: the x coordinate (relative to widget coordinates)
15488 // <y>: the y coordinate (relative to widget coordinates)
15489 // <keyboard_tip>: whether this is a keyboard tooltip or not
15490 // <model>: a pointer to receive a #GtkTreeModel or %NULL
15491 // <path>: a pointer to receive a #GtkTreePath or %NULL
15492 // <iter>: a pointer to receive a #GtkTreeIter or %NULL
15493 int get_tooltip_context(AT0, AT1, AT2)(/*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ AT0 /*TreeModel**/ model=null, /*out*/ AT1 /*TreePath**/ path=null, /*out*/ AT2 /*TreeIter*/ iter=null) nothrow {
15494 return gtk_icon_view_get_tooltip_context(&this, x, y, keyboard_tip, UpCast!(TreeModel**)(model), UpCast!(TreePath**)(path), UpCast!(TreeIter*)(iter));
15497 // VERSION: 2.8
15498 // Sets @start_path and @end_path to be the first and last visible path.
15499 // Note that there may be invisible paths in between.
15501 // Both paths should be freed with gtk_tree_path_free() after use.
15502 // RETURNS: %TRUE, if valid paths were placed in @start_path and @end_path
15503 // <start_path>: Return location for start of region, or %NULL
15504 // <end_path>: Return location for end of region, or %NULL
15505 int get_visible_range(AT0, AT1)(AT0 /*TreePath**/ start_path=null, AT1 /*TreePath**/ end_path=null) nothrow {
15506 return gtk_icon_view_get_visible_range(&this, UpCast!(TreePath**)(start_path), UpCast!(TreePath**)(end_path));
15509 // VERSION: 2.6
15510 // Activates the item determined by @path.
15511 // <path>: The #GtkTreePath to be activated
15512 void item_activated(AT0)(AT0 /*TreePath*/ path) nothrow {
15513 gtk_icon_view_item_activated(&this, UpCast!(TreePath*)(path));
15516 // VERSION: 2.6
15517 // Returns %TRUE if the icon pointed to by @path is currently
15518 // selected. If @path does not point to a valid location, %FALSE is returned.
15519 // RETURNS: %TRUE if @path is selected.
15520 // <path>: A #GtkTreePath to check selection on.
15521 int path_is_selected(AT0)(AT0 /*TreePath*/ path) nothrow {
15522 return gtk_icon_view_path_is_selected(&this, UpCast!(TreePath*)(path));
15525 // VERSION: 2.8
15526 // Moves the alignments of @icon_view to the position specified by @path.
15527 // @row_align determines where the row is placed, and @col_align determines
15528 // where @column is placed. Both are expected to be between 0.0 and 1.0.
15529 // 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means
15530 // center.
15532 // If @use_align is %FALSE, then the alignment arguments are ignored, and the
15533 // tree does the minimum amount of work to scroll the item onto the screen.
15534 // This means that the item will be scrolled to the edge closest to its current
15535 // position. If the item is currently visible on the screen, nothing is done.
15537 // This function only works if the model is set, and @path is a valid row on
15538 // the model. If the model changes before the @icon_view is realized, the
15539 // centered path will be modified to reflect this change.
15540 // <path>: The path of the item to move to.
15541 // <use_align>: whether to use alignment arguments, or %FALSE.
15542 // <row_align>: The vertical alignment of the item specified by @path.
15543 // <col_align>: The horizontal alignment of the item specified by @path.
15544 void scroll_to_path(AT0)(AT0 /*TreePath*/ path, int use_align, float row_align, float col_align) nothrow {
15545 gtk_icon_view_scroll_to_path(&this, UpCast!(TreePath*)(path), use_align, row_align, col_align);
15548 // VERSION: 2.6
15549 // Selects all the icons. @icon_view must has its selection mode set
15550 // to #GTK_SELECTION_MULTIPLE.
15551 void select_all()() nothrow {
15552 gtk_icon_view_select_all(&this);
15555 // VERSION: 2.6
15556 // Selects the row at @path.
15557 // <path>: The #GtkTreePath to be selected.
15558 void select_path(AT0)(AT0 /*TreePath*/ path) nothrow {
15559 gtk_icon_view_select_path(&this, UpCast!(TreePath*)(path));
15562 // VERSION: 2.6
15563 // Calls a function for each selected icon. Note that the model or
15564 // selection cannot be modified from within this function.
15565 // <func>: The function to call for each selected icon.
15566 // <data>: User data to pass to the function.
15567 void selected_foreach(AT0)(IconViewForeachFunc func, AT0 /*void*/ data) nothrow {
15568 gtk_icon_view_selected_foreach(&this, func, UpCast!(void*)(data));
15571 // VERSION: 2.6
15572 // Sets the ::column-spacing property which specifies the space
15573 // which is inserted between the columns of the icon view.
15574 // <column_spacing>: the column spacing
15575 void set_column_spacing()(int column_spacing) nothrow {
15576 gtk_icon_view_set_column_spacing(&this, column_spacing);
15579 // VERSION: 2.6
15580 // Sets the ::columns property which determines in how
15581 // many columns the icons are arranged. If @columns is
15582 // -1, the number of columns will be chosen automatically
15583 // to fill the available area.
15584 // <columns>: the number of columns
15585 void set_columns()(int columns) nothrow {
15586 gtk_icon_view_set_columns(&this, columns);
15589 // VERSION: 2.8
15590 // Sets the current keyboard focus to be at @path, and selects it. This is
15591 // useful when you want to focus the user's attention on a particular item.
15592 // If @cell is not %NULL, then focus is given to the cell specified by
15593 // it. Additionally, if @start_editing is %TRUE, then editing should be
15594 // started in the specified cell.
15596 // This function is often followed by <literal>gtk_widget_grab_focus
15597 // (icon_view)</literal> in order to give keyboard focus to the widget.
15598 // Please note that editing can only happen when the widget is realized.
15599 // <path>: A #GtkTreePath
15600 // <cell>: One of the cell renderers of @icon_view, or %NULL
15601 // <start_editing>: %TRUE if the specified cell should start being edited.
15602 void set_cursor(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*CellRenderer*/ cell, int start_editing) nothrow {
15603 gtk_icon_view_set_cursor(&this, UpCast!(TreePath*)(path), UpCast!(CellRenderer*)(cell), start_editing);
15606 // VERSION: 2.8
15607 // Sets the item that is highlighted for feedback.
15608 // <path>: The path of the item to highlight, or %NULL.
15609 // <pos>: Specifies where to drop, relative to the item
15610 void set_drag_dest_item(AT0)(AT0 /*TreePath*/ path, IconViewDropPosition pos) nothrow {
15611 gtk_icon_view_set_drag_dest_item(&this, UpCast!(TreePath*)(path), pos);
15614 // VERSION: 2.22
15615 // Sets the ::item-orientation property which determines whether
15616 // the labels are drawn beside the icons instead of below.
15617 // <orientation>: the relative position of texts and icons
15618 void set_item_orientation()(Orientation orientation) nothrow {
15619 gtk_icon_view_set_item_orientation(&this, orientation);
15622 // VERSION: 2.18
15623 // Sets the #GtkIconView:item-padding property which specifies the padding
15624 // around each of the icon view's items.
15625 // <item_padding>: the item padding
15626 void set_item_padding()(int item_padding) nothrow {
15627 gtk_icon_view_set_item_padding(&this, item_padding);
15630 // VERSION: 2.6
15631 // Sets the ::item-width property which specifies the width
15632 // to use for each item. If it is set to -1, the icon view will
15633 // automatically determine a suitable item size.
15634 // <item_width>: the width for each item
15635 void set_item_width()(int item_width) nothrow {
15636 gtk_icon_view_set_item_width(&this, item_width);
15639 // VERSION: 2.6
15640 // Sets the ::margin property which specifies the space
15641 // which is inserted at the top, bottom, left and right
15642 // of the icon view.
15643 // <margin>: the margin
15644 void set_margin()(int margin) nothrow {
15645 gtk_icon_view_set_margin(&this, margin);
15648 // VERSION: 2.6
15649 // Sets the column with markup information for @icon_view to be
15650 // @column. The markup column must be of type #G_TYPE_STRING.
15651 // If the markup column is set to something, it overrides
15652 // the text column set by gtk_icon_view_set_text_column().
15653 // <column>: A column in the currently used model, or -1 to display no text
15654 void set_markup_column()(int column) nothrow {
15655 gtk_icon_view_set_markup_column(&this, column);
15658 // VERSION: 2.6
15659 // Sets the model for a #GtkIconView.
15660 // If the @icon_view already has a model set, it will remove
15661 // it before setting the new model. If @model is %NULL, then
15662 // it will unset the old model.
15663 // <model>: The model.
15664 void set_model(AT0)(AT0 /*TreeModel*/ model=null) nothrow {
15665 gtk_icon_view_set_model(&this, UpCast!(TreeModel*)(model));
15668 // VERSION: 2.6
15669 // DEPRECATED (v2.22) method: set_orientation - Use gtk_icon_view_set_item_orientation()
15670 // Sets the ::orientation property which determines whether the labels
15671 // are drawn beside the icons instead of below.
15672 // <orientation>: the relative position of texts and icons
15673 void set_orientation()(Orientation orientation) nothrow {
15674 gtk_icon_view_set_orientation(&this, orientation);
15677 // VERSION: 2.6
15678 // Sets the column with pixbufs for @icon_view to be @column. The pixbuf
15679 // column must be of type #GDK_TYPE_PIXBUF
15680 // <column>: A column in the currently used model, or -1 to disable
15681 void set_pixbuf_column()(int column) nothrow {
15682 gtk_icon_view_set_pixbuf_column(&this, column);
15685 // VERSION: 2.8
15686 // This function is a convenience function to allow you to reorder models that
15687 // support the #GtkTreeDragSourceIface and the #GtkTreeDragDestIface. Both
15688 // #GtkTreeStore and #GtkListStore support these. If @reorderable is %TRUE, then
15689 // the user can reorder the model by dragging and dropping rows. The
15690 // developer can listen to these changes by connecting to the model's
15691 // row_inserted and row_deleted signals. The reordering is implemented by setting up
15692 // the icon view as a drag source and destination. Therefore, drag and
15693 // drop can not be used in a reorderable view for any other purpose.
15695 // This function does not give you any degree of control over the order -- any
15696 // reordering is allowed. If more control is needed, you should probably
15697 // handle drag and drop manually.
15698 // <reorderable>: %TRUE, if the list of items can be reordered.
15699 void set_reorderable()(int reorderable) nothrow {
15700 gtk_icon_view_set_reorderable(&this, reorderable);
15703 // VERSION: 2.6
15704 // Sets the ::row-spacing property which specifies the space
15705 // which is inserted between the rows of the icon view.
15706 // <row_spacing>: the row spacing
15707 void set_row_spacing()(int row_spacing) nothrow {
15708 gtk_icon_view_set_row_spacing(&this, row_spacing);
15711 // VERSION: 2.6
15712 // Sets the selection mode of the @icon_view.
15713 // <mode>: The selection mode
15714 void set_selection_mode()(SelectionMode mode) nothrow {
15715 gtk_icon_view_set_selection_mode(&this, mode);
15718 // VERSION: 2.6
15719 // Sets the ::spacing property which specifies the space
15720 // which is inserted between the cells (i.e. the icon and
15721 // the text) of an item.
15722 // <spacing>: the spacing
15723 void set_spacing()(int spacing) nothrow {
15724 gtk_icon_view_set_spacing(&this, spacing);
15727 // VERSION: 2.6
15728 // Sets the column with text for @icon_view to be @column. The text
15729 // column must be of type #G_TYPE_STRING.
15730 // <column>: A column in the currently used model, or -1 to display no text
15731 void set_text_column()(int column) nothrow {
15732 gtk_icon_view_set_text_column(&this, column);
15735 // VERSION: 2.12
15736 // Sets the tip area of @tooltip to the area which @cell occupies in
15737 // the item pointed to by @path. See also gtk_tooltip_set_tip_area().
15739 // See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
15740 // <tooltip>: a #GtkTooltip
15741 // <path>: a #GtkTreePath
15742 // <cell>: a #GtkCellRenderer or %NULL
15743 void set_tooltip_cell(AT0, AT1, AT2)(AT0 /*Tooltip*/ tooltip, AT1 /*TreePath*/ path, AT2 /*CellRenderer*/ cell=null) nothrow {
15744 gtk_icon_view_set_tooltip_cell(&this, UpCast!(Tooltip*)(tooltip), UpCast!(TreePath*)(path), UpCast!(CellRenderer*)(cell));
15747 // VERSION: 2.12
15748 // If you only plan to have simple (text-only) tooltips on full items, you
15749 // can use this function to have #GtkIconView handle these automatically
15750 // for you. @column should be set to the column in @icon_view's model
15751 // containing the tooltip texts, or -1 to disable this feature.
15753 // When enabled, #GtkWidget::has-tooltip will be set to %TRUE and
15754 // @icon_view will connect a #GtkWidget::query-tooltip signal handler.
15755 // <column>: an integer, which is a valid column number for @icon_view's model
15756 void set_tooltip_column()(int column) nothrow {
15757 gtk_icon_view_set_tooltip_column(&this, column);
15760 // VERSION: 2.12
15761 // Sets the tip area of @tooltip to be the area covered by the item at @path.
15762 // See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
15763 // See also gtk_tooltip_set_tip_area().
15764 // <tooltip>: a #GtkTooltip
15765 // <path>: a #GtkTreePath
15766 void set_tooltip_item(AT0, AT1)(AT0 /*Tooltip*/ tooltip, AT1 /*TreePath*/ path) nothrow {
15767 gtk_icon_view_set_tooltip_item(&this, UpCast!(Tooltip*)(tooltip), UpCast!(TreePath*)(path));
15770 // VERSION: 2.6
15771 // Unselects all the icons.
15772 void unselect_all()() nothrow {
15773 gtk_icon_view_unselect_all(&this);
15776 // VERSION: 2.6
15777 // Unselects the row at @path.
15778 // <path>: The #GtkTreePath to be unselected.
15779 void unselect_path(AT0)(AT0 /*TreePath*/ path) nothrow {
15780 gtk_icon_view_unselect_path(&this, UpCast!(TreePath*)(path));
15783 // VERSION: 2.8
15784 // Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
15785 // method sets #GtkIconView:reorderable to %FALSE.
15786 void unset_model_drag_dest()() nothrow {
15787 gtk_icon_view_unset_model_drag_dest(&this);
15790 // VERSION: 2.8
15791 // Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
15792 // method sets #GtkIconView:reorderable to %FALSE.
15793 void unset_model_drag_source()() nothrow {
15794 gtk_icon_view_unset_model_drag_source(&this);
15797 // A <link linkend="keybinding-signals">keybinding signal</link>
15798 // which gets emitted when the user activates the currently
15799 // focused item.
15801 // Applications should not connect to it, but may emit it with
15802 // g_signal_emit_by_name() if they need to control activation
15803 // programmatically.
15805 // The default bindings for this signal are Space, Return and Enter.
15806 extern (C) alias static c_int function (IconView* this_, void* user_data=null) nothrow signal_activate_cursor_item;
15808 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15809 return super_.signal_connect!name(cb, data, cf);
15812 ulong signal_connect(string name:"activate-cursor-item", CB/*:signal_activate_cursor_item*/)
15813 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15814 if (is(typeof(cb)==signal_activate_cursor_item)||_ttmm!(CB, signal_activate_cursor_item)()) {
15815 return signal_connect_data!()(&this, cast(char*)"activate-cursor-item",
15816 cast(GObject2.Callback)cb, data, null, cf);
15819 // The ::item-activated signal is emitted when the method
15820 // gtk_icon_view_item_activated() is called or the user double
15821 // clicks an item. It is also emitted when a non-editable item
15822 // is selected and one of the keys: Space, Return or Enter is
15823 // pressed.
15824 // <path>: the #GtkTreePath for the activated item
15825 extern (C) alias static void function (IconView* this_, TreePath* path, void* user_data=null) nothrow signal_item_activated;
15826 ulong signal_connect(string name:"item-activated", CB/*:signal_item_activated*/)
15827 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15828 if (is(typeof(cb)==signal_item_activated)||_ttmm!(CB, signal_item_activated)()) {
15829 return signal_connect_data!()(&this, cast(char*)"item-activated",
15830 cast(GObject2.Callback)cb, data, null, cf);
15833 // The ::move-cursor signal is a
15834 // <link linkend="keybinding-signals">keybinding signal</link>
15835 // which gets emitted when the user initiates a cursor movement.
15837 // Applications should not connect to it, but may emit it with
15838 // g_signal_emit_by_name() if they need to control the cursor
15839 // programmatically.
15841 // The default bindings for this signal include
15842 // <itemizedlist>
15843 // <listitem>Arrow keys which move by individual steps</listitem>
15844 // <listitem>Home/End keys which move to the first/last item</listitem>
15845 // <listitem>PageUp/PageDown which move by "pages"</listitem>
15846 // </itemizedlist>
15848 // All of these will extend the selection when combined with
15849 // the Shift modifier.
15850 // <step>: the granularity of the move, as a #GtkMovementStep
15851 // <count>: the number of @step units to move
15852 extern (C) alias static c_int function (IconView* this_, MovementStep* step, int count, void* user_data=null) nothrow signal_move_cursor;
15853 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)
15854 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15855 if (is(typeof(cb)==signal_move_cursor)||_ttmm!(CB, signal_move_cursor)()) {
15856 return signal_connect_data!()(&this, cast(char*)"move-cursor",
15857 cast(GObject2.Callback)cb, data, null, cf);
15860 // A <link linkend="keybinding-signals">keybinding signal</link>
15861 // which gets emitted when the user selects all items.
15863 // Applications should not connect to it, but may emit it with
15864 // g_signal_emit_by_name() if they need to control selection
15865 // programmatically.
15867 // The default binding for this signal is Ctrl-a.
15868 extern (C) alias static void function (IconView* this_, void* user_data=null) nothrow signal_select_all;
15869 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)
15870 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15871 if (is(typeof(cb)==signal_select_all)||_ttmm!(CB, signal_select_all)()) {
15872 return signal_connect_data!()(&this, cast(char*)"select-all",
15873 cast(GObject2.Callback)cb, data, null, cf);
15876 // A <link linkend="keybinding-signals">keybinding signal</link>
15877 // which gets emitted when the user selects the item that is currently
15878 // focused.
15880 // Applications should not connect to it, but may emit it with
15881 // g_signal_emit_by_name() if they need to control selection
15882 // programmatically.
15884 // There is no default binding for this signal.
15885 extern (C) alias static void function (IconView* this_, void* user_data=null) nothrow signal_select_cursor_item;
15886 ulong signal_connect(string name:"select-cursor-item", CB/*:signal_select_cursor_item*/)
15887 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15888 if (is(typeof(cb)==signal_select_cursor_item)||_ttmm!(CB, signal_select_cursor_item)()) {
15889 return signal_connect_data!()(&this, cast(char*)"select-cursor-item",
15890 cast(GObject2.Callback)cb, data, null, cf);
15893 // The ::selection-changed signal is emitted when the selection
15894 // (i.e. the set of selected items) changes.
15895 extern (C) alias static void function (IconView* this_, void* user_data=null) nothrow signal_selection_changed;
15896 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)
15897 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15898 if (is(typeof(cb)==signal_selection_changed)||_ttmm!(CB, signal_selection_changed)()) {
15899 return signal_connect_data!()(&this, cast(char*)"selection-changed",
15900 cast(GObject2.Callback)cb, data, null, cf);
15903 // Set the scroll adjustments for the icon view. Usually scrolled containers
15904 // like #GtkScrolledWindow will emit this signal to connect two instances
15905 // of #GtkScrollbar to the scroll directions of the #GtkIconView.
15906 extern (C) alias static void function (IconView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) nothrow signal_set_scroll_adjustments;
15907 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)
15908 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15909 if (is(typeof(cb)==signal_set_scroll_adjustments)||_ttmm!(CB, signal_set_scroll_adjustments)()) {
15910 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
15911 cast(GObject2.Callback)cb, data, null, cf);
15914 // A <link linkend="keybinding-signals">keybinding signal</link>
15915 // which gets emitted when the user toggles whether the currently
15916 // focused item is selected or not. The exact effect of this
15917 // depend on the selection mode.
15919 // Applications should not connect to it, but may emit it with
15920 // g_signal_emit_by_name() if they need to control selection
15921 // programmatically.
15923 // There is no default binding for this signal is Ctrl-Space.
15924 extern (C) alias static void function (IconView* this_, void* user_data=null) nothrow signal_toggle_cursor_item;
15925 ulong signal_connect(string name:"toggle-cursor-item", CB/*:signal_toggle_cursor_item*/)
15926 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15927 if (is(typeof(cb)==signal_toggle_cursor_item)||_ttmm!(CB, signal_toggle_cursor_item)()) {
15928 return signal_connect_data!()(&this, cast(char*)"toggle-cursor-item",
15929 cast(GObject2.Callback)cb, data, null, cf);
15932 // A <link linkend="keybinding-signals">keybinding signal</link>
15933 // which gets emitted when the user unselects all items.
15935 // Applications should not connect to it, but may emit it with
15936 // g_signal_emit_by_name() if they need to control selection
15937 // programmatically.
15939 // The default binding for this signal is Ctrl-Shift-a.
15940 extern (C) alias static void function (IconView* this_, void* user_data=null) nothrow signal_unselect_all;
15941 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)
15942 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
15943 if (is(typeof(cb)==signal_unselect_all)||_ttmm!(CB, signal_unselect_all)()) {
15944 return signal_connect_data!()(&this, cast(char*)"unselect-all",
15945 cast(GObject2.Callback)cb, data, null, cf);
15949 struct IconViewClass {
15950 ContainerClass parent_class;
15951 extern (C) void function (IconView* icon_view, Adjustment* hadjustment, Adjustment* vadjustment) nothrow set_scroll_adjustments;
15952 // <path>: The #GtkTreePath to be activated
15953 extern (C) void function (IconView* icon_view, TreePath* path) nothrow item_activated;
15954 extern (C) void function (IconView* icon_view) nothrow selection_changed;
15955 extern (C) void function (IconView* icon_view) nothrow select_all;
15956 extern (C) void function (IconView* icon_view) nothrow unselect_all;
15957 extern (C) void function (IconView* icon_view) nothrow select_cursor_item;
15958 extern (C) void function (IconView* icon_view) nothrow toggle_cursor_item;
15959 extern (C) int function (IconView* icon_view, MovementStep step, int count) nothrow move_cursor;
15960 extern (C) int function (IconView* icon_view) nothrow activate_cursor_item;
15963 enum IconViewDropPosition {
15964 NO_DROP = 0,
15965 DROP_INTO = 1,
15966 DROP_LEFT = 2,
15967 DROP_RIGHT = 3,
15968 DROP_ABOVE = 4,
15969 DROP_BELOW = 5
15971 extern (C) alias void function (IconView* icon_view, TreePath* path, void* data) nothrow IconViewForeachFunc;
15973 struct IconViewPrivate {
15976 struct Identifier {
15980 // The #GtkImage widget displays an image. Various kinds of object
15981 // can be displayed as an image; most typically, you would load a
15982 // #GdkPixbuf ("pixel buffer") from a file, and then display that.
15983 // There's a convenience function to do this, gtk_image_new_from_file(),
15984 // used as follows:
15985 // <informalexample><programlisting>
15986 // GtkWidget *image;
15987 // image = gtk_image_new_from_file ("myfile.png");
15988 // </programlisting></informalexample>
15989 // If the file isn't loaded successfully, the image will contain a
15990 // "broken image" icon similar to that used in many web browsers.
15991 // If you want to handle errors in loading the file yourself,
15992 // for example by displaying an error message, then load the image with
15993 // gdk_pixbuf_new_from_file(), then create the #GtkImage with
15994 // gtk_image_new_from_pixbuf().
15996 // The image file may contain an animation, if so the #GtkImage will
15997 // display an animation (#GdkPixbufAnimation) instead of a static image.
15999 // #GtkImage is a subclass of #GtkMisc, which implies that you can
16000 // align it (center, left, right) and add padding to it, using
16001 // #GtkMisc methods.
16003 // #GtkImage is a "no window" widget (has no #GdkWindow of its own),
16004 // so by default does not receive events. If you want to receive events
16005 // on the image, such as button clicks, place the image inside a
16006 // #GtkEventBox, then connect to the event signals on the event box.
16007 // <example>
16008 // <title>Handling button press events on a
16009 // <structname>GtkImage</structname>.</title>
16010 // <programlisting>
16011 // static gboolean
16012 // button_press_callback (GtkWidget *event_box,
16013 // GdkEventButton *event,
16014 // gpointer data)
16015 // {
16016 // g_print ("Event box clicked at coordinates &percnt;f,&percnt;f\n",
16017 // event->x, event->y);
16019 // /<!---->* Returning TRUE means we handled the event, so the signal
16020 // * emission should be stopped (don't call any further
16021 // * callbacks that may be connected). Return FALSE
16022 // * to continue invoking callbacks.
16023 // *<!---->/
16024 // return TRUE;
16025 // }
16027 // static GtkWidget*
16028 // create_image (void)
16029 // {
16030 // GtkWidget *image;
16031 // GtkWidget *event_box;
16033 // image = gtk_image_new_from_file ("myfile.png");
16035 // event_box = gtk_event_box_new (<!-- -->);
16037 // gtk_container_add (GTK_CONTAINER (event_box), image);
16039 // g_signal_connect (G_OBJECT (event_box),
16040 // "button_press_event",
16041 // G_CALLBACK (button_press_callback),
16042 // image);
16044 // return image;
16045 // }
16046 // </programlisting>
16047 // </example>
16049 // When handling events on the event box, keep in mind that coordinates
16050 // in the image may be different from event box coordinates due to
16051 // the alignment and padding settings on the image (see #GtkMisc).
16052 // The simplest way to solve this is to set the alignment to 0.0
16053 // (left/top), and set the padding to zero. Then the origin of
16054 // the image will be the same as the origin of the event box.
16056 // Sometimes an application will want to avoid depending on external data
16057 // files, such as image files. GTK+ comes with a program to avoid this,
16058 // called <application>gdk-pixbuf-csource</application>. This program
16059 // allows you to convert an image into a C variable declaration, which
16060 // can then be loaded into a #GdkPixbuf using
16061 // gdk_pixbuf_new_from_inline().
16062 struct Image /* : Misc */ {
16063 mixin Atk.ImplementorIface.__interface__;
16064 mixin Buildable.__interface__;
16065 alias misc this;
16066 alias misc super_;
16067 Misc misc;
16068 ImageType storage_type;
16070 union data {
16071 ImagePixmapData pixmap;
16072 ImageImageData image;
16073 ImagePixbufData pixbuf;
16074 ImageStockData stock;
16075 ImageIconSetData icon_set;
16076 ImageAnimationData anim;
16077 ImageIconNameData name;
16078 ImageGIconData gicon;
16081 Gdk2.Bitmap* mask;
16082 IconSize icon_size;
16085 // Creates a new empty #GtkImage widget.
16086 // RETURNS: a newly created #GtkImage widget.
16087 static Image* new_()() nothrow {
16088 return gtk_image_new();
16090 static auto opCall()() {
16091 return gtk_image_new();
16094 // Creates a #GtkImage displaying the given animation.
16095 // The #GtkImage does not assume a reference to the
16096 // animation; you still need to unref it if you own references.
16097 // #GtkImage will add its own reference rather than adopting yours.
16099 // Note that the animation frames are shown using a timeout with
16100 // #G_PRIORITY_DEFAULT. When using animations to indicate busyness,
16101 // keep in mind that the animation will only be shown if the main loop
16102 // is not busy with something that has a higher priority.
16103 // RETURNS: a new #GtkImage widget
16104 // <animation>: an animation
16105 static Image* new_from_animation(AT0)(AT0 /*GdkPixbuf2.PixbufAnimation*/ animation) nothrow {
16106 return gtk_image_new_from_animation(UpCast!(GdkPixbuf2.PixbufAnimation*)(animation));
16108 static auto opCall(AT0)(AT0 /*GdkPixbuf2.PixbufAnimation*/ animation) {
16109 return gtk_image_new_from_animation(UpCast!(GdkPixbuf2.PixbufAnimation*)(animation));
16112 // Creates a new #GtkImage displaying the file @filename. If the file
16113 // isn't found or can't be loaded, the resulting #GtkImage will
16114 // display a "broken image" icon. This function never returns %NULL,
16115 // it always returns a valid #GtkImage widget.
16117 // If the file contains an animation, the image will contain an
16118 // animation.
16120 // If you need to detect failures to load the file, use
16121 // gdk_pixbuf_new_from_file() to load the file yourself, then create
16122 // the #GtkImage from the pixbuf. (Or for animations, use
16123 // gdk_pixbuf_animation_new_from_file()).
16125 // The storage type (gtk_image_get_storage_type()) of the returned
16126 // image is not defined, it will be whatever is appropriate for
16127 // displaying the file.
16128 // RETURNS: a new #GtkImage
16129 // <filename>: a filename
16130 static Image* new_from_file(AT0)(AT0 /*char*/ filename) nothrow {
16131 return gtk_image_new_from_file(toCString!(char*)(filename));
16133 static auto opCall(AT0)(AT0 /*char*/ filename) {
16134 return gtk_image_new_from_file(toCString!(char*)(filename));
16137 // VERSION: 2.14
16138 // Creates a #GtkImage displaying an icon from the current icon theme.
16139 // If the icon name isn't known, a "broken image" icon will be
16140 // displayed instead. If the current icon theme is changed, the icon
16141 // will be updated appropriately.
16142 // RETURNS: a new #GtkImage displaying the themed icon
16143 // <icon>: an icon
16144 // <size>: a stock icon size
16145 static Image* new_from_gicon(AT0)(AT0 /*Gio2.Icon*/ icon, IconSize size) nothrow {
16146 return gtk_image_new_from_gicon(UpCast!(Gio2.Icon*)(icon), size);
16148 static auto opCall(AT0)(AT0 /*Gio2.Icon*/ icon, IconSize size) {
16149 return gtk_image_new_from_gicon(UpCast!(Gio2.Icon*)(icon), size);
16152 // VERSION: 2.6
16153 // Creates a #GtkImage displaying an icon from the current icon theme.
16154 // If the icon name isn't known, a "broken image" icon will be
16155 // displayed instead. If the current icon theme is changed, the icon
16156 // will be updated appropriately.
16157 // RETURNS: a new #GtkImage displaying the themed icon
16158 // <icon_name>: an icon name
16159 // <size>: a stock icon size
16160 static Image* new_from_icon_name(AT0)(AT0 /*char*/ icon_name, IconSize size) nothrow {
16161 return gtk_image_new_from_icon_name(toCString!(char*)(icon_name), size);
16163 static auto opCall(AT0)(AT0 /*char*/ icon_name, IconSize size) {
16164 return gtk_image_new_from_icon_name(toCString!(char*)(icon_name), size);
16167 // Creates a #GtkImage displaying an icon set. Sample stock sizes are
16168 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_SMALL_TOOLBAR. Instead of using
16169 // this function, usually it's better to create a #GtkIconFactory, put
16170 // your icon sets in the icon factory, add the icon factory to the
16171 // list of default factories with gtk_icon_factory_add_default(), and
16172 // then use gtk_image_new_from_stock(). This will allow themes to
16173 // override the icon you ship with your application.
16175 // The #GtkImage does not assume a reference to the
16176 // icon set; you still need to unref it if you own references.
16177 // #GtkImage will add its own reference rather than adopting yours.
16178 // RETURNS: a new #GtkImage
16179 // <icon_set>: a #GtkIconSet
16180 // <size>: a stock icon size
16181 static Image* new_from_icon_set(AT0)(AT0 /*IconSet*/ icon_set, IconSize size) nothrow {
16182 return gtk_image_new_from_icon_set(UpCast!(IconSet*)(icon_set), size);
16184 static auto opCall(AT0)(AT0 /*IconSet*/ icon_set, IconSize size) {
16185 return gtk_image_new_from_icon_set(UpCast!(IconSet*)(icon_set), size);
16188 // Creates a #GtkImage widget displaying a @image with a @mask.
16189 // A #GdkImage is a client-side image buffer in the pixel format of the
16190 // current display. The #GtkImage does not assume a reference to the
16191 // image or mask; you still need to unref them if you own references.
16192 // #GtkImage will add its own reference rather than adopting yours.
16193 // RETURNS: a new #GtkImage
16194 // <image>: a #GdkImage, or %NULL
16195 // <mask>: a #GdkBitmap, or %NULL
16196 static Image* new_from_image(AT0, AT1)(AT0 /*Gdk2.Image*/ image=null, AT1 /*Gdk2.Bitmap*/ mask=null) nothrow {
16197 return gtk_image_new_from_image(UpCast!(Gdk2.Image*)(image), UpCast!(Gdk2.Bitmap*)(mask));
16199 static auto opCall(AT0, AT1)(AT0 /*Gdk2.Image*/ image=null, AT1 /*Gdk2.Bitmap*/ mask=null) {
16200 return gtk_image_new_from_image(UpCast!(Gdk2.Image*)(image), UpCast!(Gdk2.Bitmap*)(mask));
16203 // Creates a new #GtkImage displaying @pixbuf.
16204 // The #GtkImage does not assume a reference to the
16205 // pixbuf; you still need to unref it if you own references.
16206 // #GtkImage will add its own reference rather than adopting yours.
16208 // Note that this function just creates an #GtkImage from the pixbuf. The
16209 // #GtkImage created will not react to state changes. Should you want that,
16210 // you should use gtk_image_new_from_icon_set().
16211 // RETURNS: a new #GtkImage
16212 // <pixbuf>: a #GdkPixbuf, or %NULL
16213 static Image* new_from_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) nothrow {
16214 return gtk_image_new_from_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
16216 static auto opCall(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) {
16217 return gtk_image_new_from_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
16220 // Creates a #GtkImage widget displaying @pixmap with a @mask.
16221 // A #GdkPixmap is a server-side image buffer in the pixel format of the
16222 // current display. The #GtkImage does not assume a reference to the
16223 // pixmap or mask; you still need to unref them if you own references.
16224 // #GtkImage will add its own reference rather than adopting yours.
16225 // RETURNS: a new #GtkImage
16226 // <pixmap>: a #GdkPixmap, or %NULL
16227 // <mask>: a #GdkBitmap, or %NULL
16228 static Image* new_from_pixmap(AT0, AT1)(AT0 /*Gdk2.Pixmap*/ pixmap=null, AT1 /*Gdk2.Bitmap*/ mask=null) nothrow {
16229 return gtk_image_new_from_pixmap(UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
16231 static auto opCall(AT0, AT1)(AT0 /*Gdk2.Pixmap*/ pixmap=null, AT1 /*Gdk2.Bitmap*/ mask=null) {
16232 return gtk_image_new_from_pixmap(UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
16235 // Creates a #GtkImage displaying a stock icon. Sample stock icon
16236 // names are #GTK_STOCK_OPEN, #GTK_STOCK_QUIT. Sample stock sizes
16237 // are #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_SMALL_TOOLBAR. If the stock
16238 // icon name isn't known, the image will be empty.
16239 // You can register your own stock icon names, see
16240 // gtk_icon_factory_add_default() and gtk_icon_factory_add().
16241 // RETURNS: a new #GtkImage displaying the stock icon
16242 // <stock_id>: a stock icon name
16243 // <size>: a stock icon size
16244 static Image* new_from_stock(AT0)(AT0 /*char*/ stock_id, IconSize size) nothrow {
16245 return gtk_image_new_from_stock(toCString!(char*)(stock_id), size);
16247 static auto opCall(AT0)(AT0 /*char*/ stock_id, IconSize size) {
16248 return gtk_image_new_from_stock(toCString!(char*)(stock_id), size);
16251 // VERSION: 2.8
16252 // Resets the image to be empty.
16253 void clear()() nothrow {
16254 gtk_image_clear(&this);
16257 // DEPRECATED (v2.0) method: get - Use gtk_image_get_image() instead.
16258 // Gets the #GtkImage.
16259 // <val>: return location for a #GdkImage
16260 // <mask>: a #GdkBitmap that indicates which parts of the image should be transparent.
16261 void get(AT0, AT1)(AT0 /*Gdk2.Image**/ val, AT1 /*Gdk2.Bitmap**/ mask) nothrow {
16262 gtk_image_get(&this, UpCast!(Gdk2.Image**)(val), UpCast!(Gdk2.Bitmap**)(mask));
16265 // Gets the #GdkPixbufAnimation being displayed by the #GtkImage.
16266 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16267 // %GTK_IMAGE_ANIMATION (see gtk_image_get_storage_type()).
16268 // The caller of this function does not own a reference to the
16269 // returned animation.
16271 // the image is empty
16272 // RETURNS: the displayed animation, or %NULL if
16273 GdkPixbuf2.PixbufAnimation* get_animation()() nothrow {
16274 return gtk_image_get_animation(&this);
16277 // VERSION: 2.14
16278 // Gets the #GIcon and size being displayed by the #GtkImage.
16279 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16280 // %GTK_IMAGE_GICON (see gtk_image_get_storage_type()).
16281 // The caller of this function does not own a reference to the
16282 // returned #GIcon.
16283 // <gicon>: place to store a #GIcon, or %NULL
16284 // <size>: place to store an icon size, or %NULL
16285 void get_gicon(AT0, AT1)(/*out*/ AT0 /*Gio2.Icon**/ gicon=null, /*out*/ AT1 /*IconSize*/ size=null) nothrow {
16286 gtk_image_get_gicon(&this, UpCast!(Gio2.Icon**)(gicon), UpCast!(IconSize*)(size));
16289 // VERSION: 2.6
16290 // Gets the icon name and size being displayed by the #GtkImage.
16291 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16292 // %GTK_IMAGE_ICON_NAME (see gtk_image_get_storage_type()).
16293 // The returned string is owned by the #GtkImage and should not
16294 // be freed.
16295 // <icon_name>: place to store an icon name, or %NULL
16296 // <size>: place to store an icon size, or %NULL
16297 void get_icon_name(AT0, AT1)(/*out*/ AT0 /*char**/ icon_name=null, /*out*/ AT1 /*IconSize*/ size=null) nothrow {
16298 gtk_image_get_icon_name(&this, toCString!(char**)(icon_name), UpCast!(IconSize*)(size));
16301 // Gets the icon set and size being displayed by the #GtkImage.
16302 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16303 // %GTK_IMAGE_ICON_SET (see gtk_image_get_storage_type()).
16304 // <icon_set>: location to store a #GtkIconSet, or %NULL
16305 // <size>: location to store a stock icon size, or %NULL
16306 void get_icon_set(AT0, AT1)(/*out*/ AT0 /*IconSet**/ icon_set=null, /*out*/ AT1 /*IconSize*/ size=null) nothrow {
16307 gtk_image_get_icon_set(&this, UpCast!(IconSet**)(icon_set), UpCast!(IconSize*)(size));
16310 // Gets the #GdkImage and mask being displayed by the #GtkImage.
16311 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16312 // %GTK_IMAGE_IMAGE (see gtk_image_get_storage_type()).
16313 // The caller of this function does not own a reference to the
16314 // returned image and mask.
16315 // <gdk_image>: return location for a #GtkImage, or %NULL
16316 // <mask>: return location for a #GdkBitmap, or %NULL
16317 void get_image(AT0, AT1)(/*out*/ AT0 /*Gdk2.Image**/ gdk_image=null, /*out*/ AT1 /*Gdk2.Bitmap**/ mask=null) nothrow {
16318 gtk_image_get_image(&this, UpCast!(Gdk2.Image**)(gdk_image), UpCast!(Gdk2.Bitmap**)(mask));
16321 // Gets the #GdkPixbuf being displayed by the #GtkImage.
16322 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16323 // %GTK_IMAGE_PIXBUF (see gtk_image_get_storage_type()).
16324 // The caller of this function does not own a reference to the
16325 // returned pixbuf.
16327 // the image is empty
16328 // RETURNS: the displayed pixbuf, or %NULL if
16329 GdkPixbuf2.Pixbuf* get_pixbuf()() nothrow {
16330 return gtk_image_get_pixbuf(&this);
16333 // VERSION: 2.6
16334 // Gets the pixel size used for named icons.
16335 // RETURNS: the pixel size used for named icons.
16336 int get_pixel_size()() nothrow {
16337 return gtk_image_get_pixel_size(&this);
16340 // Gets the pixmap and mask being displayed by the #GtkImage.
16341 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16342 // %GTK_IMAGE_PIXMAP (see gtk_image_get_storage_type()).
16343 // The caller of this function does not own a reference to the
16344 // returned pixmap and mask.
16345 // <pixmap>: location to store the pixmap, or %NULL
16346 // <mask>: location to store the mask, or %NULL
16347 void get_pixmap(AT0, AT1)(/*out*/ AT0 /*Gdk2.Pixmap**/ pixmap=null, /*out*/ AT1 /*Gdk2.Bitmap**/ mask=null) nothrow {
16348 gtk_image_get_pixmap(&this, UpCast!(Gdk2.Pixmap**)(pixmap), UpCast!(Gdk2.Bitmap**)(mask));
16351 // Gets the stock icon name and size being displayed by the #GtkImage.
16352 // The storage type of the image must be %GTK_IMAGE_EMPTY or
16353 // %GTK_IMAGE_STOCK (see gtk_image_get_storage_type()).
16354 // The returned string is owned by the #GtkImage and should not
16355 // be freed.
16356 // <stock_id>: place to store a stock icon name, or %NULL
16357 // <size>: place to store a stock icon size, or %NULL
16358 void get_stock(AT0, AT1)(/*out*/ AT0 /*char**/ stock_id=null, /*out*/ AT1 /*IconSize*/ size=null) nothrow {
16359 gtk_image_get_stock(&this, toCString!(char**)(stock_id), UpCast!(IconSize*)(size));
16362 // Gets the type of representation being used by the #GtkImage
16363 // to store image data. If the #GtkImage has no image data,
16364 // the return value will be %GTK_IMAGE_EMPTY.
16365 // RETURNS: image representation being used
16366 ImageType get_storage_type()() nothrow {
16367 return gtk_image_get_storage_type(&this);
16370 // DEPRECATED (v2.0) method: set - Use gtk_image_set_from_image() instead.
16371 // Sets the #GtkImage.
16372 // <val>: a #GdkImage
16373 // <mask>: a #GdkBitmap that indicates which parts of the image should be transparent.
16374 void set(AT0, AT1)(AT0 /*Gdk2.Image*/ val, AT1 /*Gdk2.Bitmap*/ mask) nothrow {
16375 gtk_image_set(&this, UpCast!(Gdk2.Image*)(val), UpCast!(Gdk2.Bitmap*)(mask));
16378 // Causes the #GtkImage to display the given animation (or display
16379 // nothing, if you set the animation to %NULL).
16380 // <animation>: the #GdkPixbufAnimation
16381 void set_from_animation(AT0)(AT0 /*GdkPixbuf2.PixbufAnimation*/ animation) nothrow {
16382 gtk_image_set_from_animation(&this, UpCast!(GdkPixbuf2.PixbufAnimation*)(animation));
16385 // See gtk_image_new_from_file() for details.
16386 // <filename>: a filename or %NULL
16387 void set_from_file(AT0)(AT0 /*char*/ filename=null) nothrow {
16388 gtk_image_set_from_file(&this, toCString!(char*)(filename));
16391 // VERSION: 2.14
16392 // See gtk_image_new_from_gicon() for details.
16393 // <icon>: an icon
16394 // <size>: an icon size
16395 void set_from_gicon(AT0)(AT0 /*Gio2.Icon*/ icon, IconSize size) nothrow {
16396 gtk_image_set_from_gicon(&this, UpCast!(Gio2.Icon*)(icon), size);
16399 // VERSION: 2.6
16400 // See gtk_image_new_from_icon_name() for details.
16401 // <icon_name>: an icon name
16402 // <size>: an icon size
16403 void set_from_icon_name(AT0)(AT0 /*char*/ icon_name, IconSize size) nothrow {
16404 gtk_image_set_from_icon_name(&this, toCString!(char*)(icon_name), size);
16407 // See gtk_image_new_from_icon_set() for details.
16408 // <icon_set>: a #GtkIconSet
16409 // <size>: a stock icon size
16410 void set_from_icon_set(AT0)(AT0 /*IconSet*/ icon_set, IconSize size) nothrow {
16411 gtk_image_set_from_icon_set(&this, UpCast!(IconSet*)(icon_set), size);
16414 // See gtk_image_new_from_image() for details.
16415 // <gdk_image>: a #GdkImage or %NULL
16416 // <mask>: a #GdkBitmap or %NULL
16417 void set_from_image(AT0, AT1)(AT0 /*Gdk2.Image*/ gdk_image=null, AT1 /*Gdk2.Bitmap*/ mask=null) nothrow {
16418 gtk_image_set_from_image(&this, UpCast!(Gdk2.Image*)(gdk_image), UpCast!(Gdk2.Bitmap*)(mask));
16421 // See gtk_image_new_from_pixbuf() for details.
16422 // <pixbuf>: a #GdkPixbuf or %NULL
16423 void set_from_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) nothrow {
16424 gtk_image_set_from_pixbuf(&this, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
16427 // See gtk_image_new_from_pixmap() for details.
16428 // <pixmap>: a #GdkPixmap or %NULL
16429 // <mask>: a #GdkBitmap or %NULL
16430 void set_from_pixmap(AT0, AT1)(AT0 /*Gdk2.Pixmap*/ pixmap=null, AT1 /*Gdk2.Bitmap*/ mask=null) nothrow {
16431 gtk_image_set_from_pixmap(&this, UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
16434 // See gtk_image_new_from_stock() for details.
16435 // <stock_id>: a stock icon name
16436 // <size>: a stock icon size
16437 void set_from_stock(AT0)(AT0 /*char*/ stock_id, IconSize size) nothrow {
16438 gtk_image_set_from_stock(&this, toCString!(char*)(stock_id), size);
16441 // VERSION: 2.6
16442 // Sets the pixel size to use for named icons. If the pixel size is set
16443 // to a value != -1, it is used instead of the icon size set by
16444 // gtk_image_set_from_icon_name().
16445 // <pixel_size>: the new pixel size
16446 void set_pixel_size()(int pixel_size) nothrow {
16447 gtk_image_set_pixel_size(&this, pixel_size);
16451 struct ImageAnimationData {
16452 GdkPixbuf2.PixbufAnimation* anim;
16453 GdkPixbuf2.PixbufAnimationIter* iter;
16454 uint frame_timeout;
16457 struct ImageClass {
16458 MiscClass parent_class;
16459 extern (C) void function () nothrow _gtk_reserved1;
16460 extern (C) void function () nothrow _gtk_reserved2;
16461 extern (C) void function () nothrow _gtk_reserved3;
16462 extern (C) void function () nothrow _gtk_reserved4;
16465 struct ImageGIconData {
16466 Gio2.Icon* icon;
16467 GdkPixbuf2.Pixbuf* pixbuf;
16468 uint theme_change_id;
16471 struct ImageIconNameData {
16472 char* icon_name;
16473 GdkPixbuf2.Pixbuf* pixbuf;
16474 uint theme_change_id;
16477 struct ImageIconSetData {
16478 IconSet* icon_set;
16481 struct ImageImageData {
16482 Gdk2.Image* image;
16485 struct ImageMenuItem /* : MenuItem */ {
16486 mixin Atk.ImplementorIface.__interface__;
16487 mixin Activatable.__interface__;
16488 mixin Buildable.__interface__;
16489 alias menu_item this;
16490 alias menu_item super_;
16491 alias menu_item menuitem;
16492 MenuItem menu_item;
16493 private Widget* image;
16496 // Creates a new #GtkImageMenuItem with an empty label.
16497 // RETURNS: a new #GtkImageMenuItem.
16498 static ImageMenuItem* new_()() nothrow {
16499 return gtk_image_menu_item_new();
16501 static auto opCall()() {
16502 return gtk_image_menu_item_new();
16505 // Creates a new #GtkImageMenuItem containing the image and text from a
16506 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
16507 // and #GTK_STOCK_APPLY.
16509 // If you want this menu item to have changeable accelerators, then pass in
16510 // %NULL for accel_group. Next call gtk_menu_item_set_accel_path() with an
16511 // appropriate path for the menu item, use gtk_stock_lookup() to look up the
16512 // standard accelerator for the stock item, and if one is found, call
16513 // gtk_accel_map_add_entry() to register it.
16514 // RETURNS: a new #GtkImageMenuItem.
16515 // <stock_id>: the name of the stock item.
16516 // <accel_group>: the #GtkAccelGroup to add the menu items accelerator to, or %NULL.
16517 static ImageMenuItem* new_from_stock(AT0, AT1)(AT0 /*char*/ stock_id, AT1 /*AccelGroup*/ accel_group=null) nothrow {
16518 return gtk_image_menu_item_new_from_stock(toCString!(char*)(stock_id), UpCast!(AccelGroup*)(accel_group));
16520 static auto opCall(AT0, AT1)(AT0 /*char*/ stock_id, AT1 /*AccelGroup*/ accel_group=null) {
16521 return gtk_image_menu_item_new_from_stock(toCString!(char*)(stock_id), UpCast!(AccelGroup*)(accel_group));
16524 // Creates a new #GtkImageMenuItem containing a label.
16525 // RETURNS: a new #GtkImageMenuItem.
16526 // <label>: the text of the menu item.
16527 static ImageMenuItem* new_with_label(AT0)(AT0 /*char*/ label) nothrow {
16528 return gtk_image_menu_item_new_with_label(toCString!(char*)(label));
16530 static auto opCall(AT0)(AT0 /*char*/ label) {
16531 return gtk_image_menu_item_new_with_label(toCString!(char*)(label));
16534 // Creates a new #GtkImageMenuItem containing a label. The label
16535 // will be created using gtk_label_new_with_mnemonic(), so underscores
16536 // in @label indicate the mnemonic for the menu item.
16537 // RETURNS: a new #GtkImageMenuItem
16538 // <label>: the text of the menu item, with an underscore in front of the mnemonic character
16539 static ImageMenuItem* new_with_mnemonic(AT0)(AT0 /*char*/ label) nothrow {
16540 return gtk_image_menu_item_new_with_mnemonic(toCString!(char*)(label));
16542 static auto opCall(AT0)(AT0 /*char*/ label) {
16543 return gtk_image_menu_item_new_with_mnemonic(toCString!(char*)(label));
16546 // VERSION: 2.16
16547 // Returns whether the menu item will ignore the #GtkSettings:gtk-menu-images
16548 // setting and always show the image, if available.
16549 // RETURNS: %TRUE if the menu item will always show the image
16550 int get_always_show_image()() nothrow {
16551 return gtk_image_menu_item_get_always_show_image(&this);
16554 // Gets the widget that is currently set as the image of @image_menu_item.
16555 // See gtk_image_menu_item_set_image().
16556 // RETURNS: the widget set as image of @image_menu_item
16557 Widget* get_image()() nothrow {
16558 return gtk_image_menu_item_get_image(&this);
16561 // VERSION: 2.16
16562 // Checks whether the label set in the menuitem is used as a
16563 // stock id to select the stock item for the item.
16565 // stock id to select the stock item for the item
16566 // RETURNS: %TRUE if the label set in the menuitem is used as a
16567 int get_use_stock()() nothrow {
16568 return gtk_image_menu_item_get_use_stock(&this);
16571 // VERSION: 2.16
16572 // Specifies an @accel_group to add the menu items accelerator to
16573 // (this only applies to stock items so a stock item must already
16574 // be set, make sure to call gtk_image_menu_item_set_use_stock()
16575 // and gtk_menu_item_set_label() with a valid stock item first).
16577 // If you want this menu item to have changeable accelerators then
16578 // you shouldnt need this (see gtk_image_menu_item_new_from_stock()).
16579 // <accel_group>: the #GtkAccelGroup
16580 void set_accel_group(AT0)(AT0 /*AccelGroup*/ accel_group) nothrow {
16581 gtk_image_menu_item_set_accel_group(&this, UpCast!(AccelGroup*)(accel_group));
16584 // VERSION: 2.16
16585 // If %TRUE, the menu item will ignore the #GtkSettings:gtk-menu-images
16586 // setting and always show the image, if available.
16588 // Use this property if the menuitem would be useless or hard to use
16589 // without the image.
16590 // <always_show>: %TRUE if the menuitem should always show the image
16591 void set_always_show_image()(int always_show) nothrow {
16592 gtk_image_menu_item_set_always_show_image(&this, always_show);
16595 // Sets the image of @image_menu_item to the given widget.
16596 // Note that it depends on the show-menu-images setting whether
16597 // the image will be displayed or not.
16598 // <image>: a widget to set as the image for the menu item.
16599 void set_image(AT0)(AT0 /*Widget*/ image=null) nothrow {
16600 gtk_image_menu_item_set_image(&this, UpCast!(Widget*)(image));
16603 // VERSION: 2.16
16604 // If %TRUE, the label set in the menuitem is used as a
16605 // stock id to select the stock item for the item.
16606 // <use_stock>: %TRUE if the menuitem should use a stock item
16607 void set_use_stock()(int use_stock) nothrow {
16608 gtk_image_menu_item_set_use_stock(&this, use_stock);
16612 struct ImageMenuItemClass {
16613 MenuItemClass parent_class;
16616 struct ImagePixbufData {
16617 GdkPixbuf2.Pixbuf* pixbuf;
16620 struct ImagePixmapData {
16621 Gdk2.Pixmap* pixmap;
16624 struct ImageStockData {
16625 char* stock_id;
16629 // Describes the image data representation used by a #GtkImage. If you
16630 // want to get the image from the widget, you can only get the
16631 // currently-stored representation. e.g. if the
16632 // gtk_image_get_storage_type() returns #GTK_IMAGE_PIXBUF, then you can
16633 // call gtk_image_get_pixbuf() but not gtk_image_get_stock(). For empty
16634 // images, you can request any storage type (call any of the "get"
16635 // functions), but they will all return %NULL values.
16636 enum ImageType {
16637 EMPTY = 0,
16638 PIXMAP = 1,
16639 IMAGE = 2,
16640 PIXBUF = 3,
16641 STOCK = 4,
16642 ICON_SET = 5,
16643 ANIMATION = 6,
16644 ICON_NAME = 7,
16645 GICON = 8
16648 // #GtkInfoBar is a widget that can be used to show messages to
16649 // the user without showing a dialog. It is often temporarily shown
16650 // at the top or bottom of a document. In contrast to #GtkDialog, which
16651 // has a horizontal action area at the bottom, #GtkInfoBar has a
16652 // vertical action area at the side.
16654 // The API of #GtkInfoBar is very similar to #GtkDialog, allowing you
16655 // to add buttons to the action area with gtk_info_bar_add_button() or
16656 // gtk_info_bar_new_with_buttons(). The sensitivity of action widgets
16657 // can be controlled with gtk_info_bar_set_response_sensitive().
16658 // To add widgets to the main content area of a #GtkInfoBar, use
16659 // gtk_info_bar_get_content_area() and add your widgets to the container.
16661 // Similar to #GtkMessageDialog, the contents of a #GtkInfoBar can by
16662 // classified as error message, warning, informational message, etc,
16663 // by using gtk_info_bar_set_message_type(). GTK+ uses the message type
16664 // to determine the background color of the message area.
16666 // <example>
16667 // <title>Simple GtkInfoBar usage.</title>
16668 // <programlisting>
16669 // /&ast; set up info bar &ast;/
16670 // info_bar = gtk_info_bar_new ();
16671 // gtk_widget_set_no_show_all (info_bar, TRUE);
16672 // message_label = gtk_label_new ("");
16673 // gtk_widget_show (message_label);
16674 // content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
16675 // gtk_container_add (GTK_CONTAINER (content_area), message_label);
16676 // gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
16677 // GTK_STOCK_OK, GTK_RESPONSE_OK);
16678 // g_signal_connect (info_bar, "response",
16679 // G_CALLBACK (gtk_widget_hide), NULL);
16680 // gtk_table_attach (GTK_TABLE (table),
16681 // info_bar,
16682 // 0, 1, 2, 3,
16683 // GTK_EXPAND | GTK_FILL, 0,
16684 // 0, 0);
16686 // /&ast; ... &ast;/
16688 // /&ast; show an error message &ast;/
16689 // gtk_label_set_text (GTK_LABEL (message_label), error_message);
16690 // gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
16691 // GTK_MESSAGE_ERROR);
16692 // gtk_widget_show (info_bar);
16693 // </programlisting>
16694 // </example>
16696 // <refsect2 id="GtkInfoBar-BUILDER-UI">
16697 // <title>GtkInfoBar as GtkBuildable</title>
16698 // <para>
16699 // The GtkInfoBar implementation of the GtkBuildable interface exposes
16700 // the content area and action area as internal children with the names
16701 // "content_area" and "action_area".
16702 // </para>
16703 // <para>
16704 // GtkInfoBar supports a custom &lt;action-widgets&gt; element, which
16705 // can contain multiple &lt;action-widget&gt; elements. The "response"
16706 // attribute specifies a numeric response, and the content of the element
16707 // is the id of widget (which should be a child of the dialogs @action_area).
16708 // </para>
16709 // </refsect2>
16710 struct InfoBar /* : HBox */ {
16711 mixin Atk.ImplementorIface.__interface__;
16712 mixin Buildable.__interface__;
16713 mixin Orientable.__interface__;
16714 alias parent this;
16715 alias parent super_;
16716 alias parent hbox;
16717 HBox parent;
16718 private InfoBarPrivate* priv;
16721 // VERSION: 2.18
16722 // Creates a new #GtkInfoBar object.
16723 // RETURNS: a new #GtkInfoBar object
16724 static InfoBar* new_()() nothrow {
16725 return gtk_info_bar_new();
16727 static auto opCall()() {
16728 return gtk_info_bar_new();
16731 // Unintrospectable constructor: new_with_buttons() / gtk_info_bar_new_with_buttons()
16732 // Creates a new #GtkInfoBar with buttons. Button text/response ID
16733 // pairs should be listed, with a %NULL pointer ending the list.
16734 // Button text can be either a stock ID such as %GTK_STOCK_OK, or
16735 // some arbitrary text. A response ID can be any positive number,
16736 // or one of the values in the #GtkResponseType enumeration. If the
16737 // user clicks one of these dialog buttons, GtkInfoBar will emit
16738 // the "response" signal with the corresponding response ID.
16739 // RETURNS: a new #GtkInfoBar
16740 // <first_button_text>: stock ID or text to go in first button, or %NULL
16741 alias gtk_info_bar_new_with_buttons new_with_buttons; // Variadic
16743 // VERSION: 2.18
16744 // Add an activatable widget to the action area of a #GtkInfoBar,
16745 // connecting a signal handler that will emit the #GtkInfoBar::response
16746 // signal on the message area when the widget is activated. The widget
16747 // is appended to the end of the message areas action area.
16748 // <child>: an activatable widget
16749 // <response_id>: response ID for @child
16750 void add_action_widget(AT0)(AT0 /*Widget*/ child, int response_id) nothrow {
16751 gtk_info_bar_add_action_widget(&this, UpCast!(Widget*)(child), response_id);
16754 // VERSION: 2.18
16755 // Adds a button with the given text (or a stock button, if button_text
16756 // is a stock ID) and sets things up so that clicking the button will emit
16757 // the "response" signal with the given response_id. The button is appended
16758 // to the end of the info bars's action area. The button widget is
16759 // returned, but usually you don't need it.
16760 // RETURNS: the button widget that was added
16761 // <button_text>: text of button, or stock ID
16762 // <response_id>: response ID for the button
16763 Widget* add_button(AT0)(AT0 /*char*/ button_text, int response_id) nothrow {
16764 return gtk_info_bar_add_button(&this, toCString!(char*)(button_text), response_id);
16767 // Unintrospectable method: add_buttons() / gtk_info_bar_add_buttons()
16768 // VERSION: 2.18
16769 // Adds more buttons, same as calling gtk_info_bar_add_button()
16770 // repeatedly. The variable argument list should be %NULL-terminated
16771 // as with gtk_info_bar_new_with_buttons(). Each button must have both
16772 // text and response ID.
16773 // <first_button_text>: button text or stock ID
16774 /+ Not available -- variadic methods unsupported - use the C function directly.
16775 alias gtk_info_bar_add_buttons add_buttons; // Variadic
16778 // VERSION: 2.18
16779 // Returns the action area of @info_bar.
16780 // RETURNS: the action area
16781 Widget* get_action_area()() nothrow {
16782 return gtk_info_bar_get_action_area(&this);
16785 // VERSION: 2.18
16786 // Returns the content area of @info_bar.
16787 // RETURNS: the content area
16788 Widget* get_content_area()() nothrow {
16789 return gtk_info_bar_get_content_area(&this);
16792 // VERSION: 2.18
16793 // Returns the message type of the message area.
16794 // RETURNS: the message type of the message area.
16795 MessageType get_message_type()() nothrow {
16796 return gtk_info_bar_get_message_type(&this);
16799 // VERSION: 2.18
16800 // Emits the 'response' signal with the given @response_id.
16801 // <response_id>: a response ID
16802 void response()(int response_id) nothrow {
16803 gtk_info_bar_response(&this, response_id);
16806 // VERSION: 2.18
16807 // Sets the last widget in the info bar's action area with
16808 // the given response_id as the default widget for the dialog.
16809 // Pressing "Enter" normally activates the default widget.
16811 // Note that this function currently requires @info_bar to
16812 // be added to a widget hierarchy.
16813 // <response_id>: a response ID
16814 void set_default_response()(int response_id) nothrow {
16815 gtk_info_bar_set_default_response(&this, response_id);
16818 // VERSION: 2.18
16819 // Sets the message type of the message area.
16820 // GTK+ uses this type to determine what color to use
16821 // when drawing the message area.
16822 // <message_type>: a #GtkMessageType
16823 void set_message_type()(MessageType message_type) nothrow {
16824 gtk_info_bar_set_message_type(&this, message_type);
16827 // VERSION: 2.18
16828 // Calls gtk_widget_set_sensitive (widget, setting) for each
16829 // widget in the info bars's action area with the given response_id.
16830 // A convenient way to sensitize/desensitize dialog buttons.
16831 // <response_id>: a response ID
16832 // <setting>: TRUE for sensitive
16833 void set_response_sensitive()(int response_id, int setting) nothrow {
16834 gtk_info_bar_set_response_sensitive(&this, response_id, setting);
16837 // VERSION: 2.18
16838 // The ::close signal is a
16839 // <link linkend="keybinding-signals">keybinding signal</link>
16840 // which gets emitted when the user uses a keybinding to dismiss
16841 // the info bar.
16843 // The default binding for this signal is the Escape key.
16844 extern (C) alias static void function (InfoBar* this_, void* user_data=null) nothrow signal_close;
16846 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16847 return super_.signal_connect!name(cb, data, cf);
16850 ulong signal_connect(string name:"close", CB/*:signal_close*/)
16851 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
16852 if (is(typeof(cb)==signal_close)||_ttmm!(CB, signal_close)()) {
16853 return signal_connect_data!()(&this, cast(char*)"close",
16854 cast(GObject2.Callback)cb, data, null, cf);
16857 // VERSION: 2.18
16858 // Emitted when an action widget is clicked or the application programmer
16859 // calls gtk_dialog_response(). The @response_id depends on which action
16860 // widget was clicked.
16861 // <response_id>: the response ID
16862 extern (C) alias static void function (InfoBar* this_, int response_id, void* user_data=null) nothrow signal_response;
16863 ulong signal_connect(string name:"response", CB/*:signal_response*/)
16864 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
16865 if (is(typeof(cb)==signal_response)||_ttmm!(CB, signal_response)()) {
16866 return signal_connect_data!()(&this, cast(char*)"response",
16867 cast(GObject2.Callback)cb, data, null, cf);
16871 struct InfoBarClass {
16872 HBoxClass parent_class;
16873 // <response_id>: a response ID
16874 extern (C) void function (InfoBar* info_bar, int response_id) nothrow response;
16875 extern (C) void function (InfoBar* info_bar) nothrow close;
16876 extern (C) void function () nothrow _gtk_reserved1;
16877 extern (C) void function () nothrow _gtk_reserved2;
16878 extern (C) void function () nothrow _gtk_reserved3;
16879 extern (C) void function () nothrow _gtk_reserved4;
16880 extern (C) void function () nothrow _gtk_reserved5;
16881 extern (C) void function () nothrow _gtk_reserved6;
16884 struct InfoBarPrivate {
16887 struct InputDialog /* : Dialog */ {
16888 mixin Atk.ImplementorIface.__interface__;
16889 mixin Buildable.__interface__;
16890 alias dialog this;
16891 alias dialog super_;
16892 Dialog dialog;
16893 Widget* axis_list, axis_listbox, mode_optionmenu, close_button, save_button;
16894 Widget*[666] axis_items;
16895 Gdk2.Device* current_device;
16896 Widget* keys_list, keys_listbox;
16898 static InputDialog* new_()() nothrow {
16899 return gtk_input_dialog_new();
16901 static auto opCall()() {
16902 return gtk_input_dialog_new();
16904 extern (C) alias static void function (InputDialog* this_, Gdk2.Device* object, void* user_data=null) nothrow signal_disable_device;
16906 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16907 return super_.signal_connect!name(cb, data, cf);
16910 ulong signal_connect(string name:"disable-device", CB/*:signal_disable_device*/)
16911 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
16912 if (is(typeof(cb)==signal_disable_device)||_ttmm!(CB, signal_disable_device)()) {
16913 return signal_connect_data!()(&this, cast(char*)"disable-device",
16914 cast(GObject2.Callback)cb, data, null, cf);
16916 extern (C) alias static void function (InputDialog* this_, Gdk2.Device* object, void* user_data=null) nothrow signal_enable_device;
16917 ulong signal_connect(string name:"enable-device", CB/*:signal_enable_device*/)
16918 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
16919 if (is(typeof(cb)==signal_enable_device)||_ttmm!(CB, signal_enable_device)()) {
16920 return signal_connect_data!()(&this, cast(char*)"enable-device",
16921 cast(GObject2.Callback)cb, data, null, cf);
16925 struct InputDialogClass {
16926 DialogClass parent_class;
16927 extern (C) void function (InputDialog* inputd, Gdk2.Device* device) nothrow enable_device;
16928 extern (C) void function (InputDialog* inputd, Gdk2.Device* device) nothrow disable_device;
16929 extern (C) void function () nothrow _gtk_reserved1;
16930 extern (C) void function () nothrow _gtk_reserved2;
16931 extern (C) void function () nothrow _gtk_reserved3;
16932 extern (C) void function () nothrow _gtk_reserved4;
16935 struct Invisible /* : Widget */ {
16936 mixin Atk.ImplementorIface.__interface__;
16937 mixin Buildable.__interface__;
16938 alias widget this;
16939 alias widget super_;
16940 Widget widget;
16941 int has_user_ref_count;
16942 Gdk2.Screen* screen;
16945 // Creates a new #GtkInvisible.
16946 // RETURNS: a new #GtkInvisible.
16947 static Invisible* new_()() nothrow {
16948 return gtk_invisible_new();
16950 static auto opCall()() {
16951 return gtk_invisible_new();
16954 // VERSION: 2.2
16955 // Creates a new #GtkInvisible object for a specified screen
16956 // RETURNS: a newly created #GtkInvisible object
16957 // <screen>: a #GdkScreen which identifies on which the new #GtkInvisible will be created.
16958 static Invisible* new_for_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
16959 return gtk_invisible_new_for_screen(UpCast!(Gdk2.Screen*)(screen));
16961 static auto opCall(AT0)(AT0 /*Gdk2.Screen*/ screen) {
16962 return gtk_invisible_new_for_screen(UpCast!(Gdk2.Screen*)(screen));
16965 // VERSION: 2.2
16966 // Returns the #GdkScreen object associated with @invisible
16967 // RETURNS: the associated #GdkScreen.
16968 Gdk2.Screen* get_screen()() nothrow {
16969 return gtk_invisible_get_screen(&this);
16972 // VERSION: 2.2
16973 // Sets the #GdkScreen where the #GtkInvisible object will be displayed.
16974 // <screen>: a #GdkScreen.
16975 void set_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
16976 gtk_invisible_set_screen(&this, UpCast!(Gdk2.Screen*)(screen));
16980 struct InvisibleClass {
16981 WidgetClass parent_class;
16982 extern (C) void function () nothrow _gtk_reserved1;
16983 extern (C) void function () nothrow _gtk_reserved2;
16984 extern (C) void function () nothrow _gtk_reserved3;
16985 extern (C) void function () nothrow _gtk_reserved4;
16988 struct Item /* : Bin */ {
16989 mixin Atk.ImplementorIface.__interface__;
16990 mixin Buildable.__interface__;
16991 alias bin this;
16992 alias bin super_;
16993 Bin bin;
16996 // DEPRECATED (v2.4) function: factories_path_delete - Use #GtkUIManager instead.
16997 // Deletes all widgets constructed from the specified path.
16998 // <ifactory_path>: a factory path to prepend to @path. May be %NULL if @path starts with a factory path
16999 // <path>: a path
17000 static void factories_path_delete(AT0, AT1)(AT0 /*char*/ ifactory_path, AT1 /*char*/ path) nothrow {
17001 gtk_item_factories_path_delete(toCString!(char*)(ifactory_path), toCString!(char*)(path));
17003 void deselect()() nothrow {
17004 gtk_item_deselect(&this);
17006 void select()() nothrow {
17007 gtk_item_select(&this);
17009 void toggle()() nothrow {
17010 gtk_item_toggle(&this);
17012 extern (C) alias static void function (Item* this_, void* user_data=null) nothrow signal_deselect;
17014 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17015 return super_.signal_connect!name(cb, data, cf);
17018 ulong signal_connect(string name:"deselect", CB/*:signal_deselect*/)
17019 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17020 if (is(typeof(cb)==signal_deselect)||_ttmm!(CB, signal_deselect)()) {
17021 return signal_connect_data!()(&this, cast(char*)"deselect",
17022 cast(GObject2.Callback)cb, data, null, cf);
17024 extern (C) alias static void function (Item* this_, void* user_data=null) nothrow signal_select;
17025 ulong signal_connect(string name:"select", CB/*:signal_select*/)
17026 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17027 if (is(typeof(cb)==signal_select)||_ttmm!(CB, signal_select)()) {
17028 return signal_connect_data!()(&this, cast(char*)"select",
17029 cast(GObject2.Callback)cb, data, null, cf);
17031 extern (C) alias static void function (Item* this_, void* user_data=null) nothrow signal_toggle;
17032 ulong signal_connect(string name:"toggle", CB/*:signal_toggle*/)
17033 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17034 if (is(typeof(cb)==signal_toggle)||_ttmm!(CB, signal_toggle)()) {
17035 return signal_connect_data!()(&this, cast(char*)"toggle",
17036 cast(GObject2.Callback)cb, data, null, cf);
17040 struct ItemClass {
17041 BinClass parent_class;
17042 extern (C) void function (Item* item) nothrow select;
17043 extern (C) void function (Item* item) nothrow deselect;
17044 extern (C) void function (Item* item) nothrow toggle;
17045 extern (C) void function () nothrow _gtk_reserved1;
17046 extern (C) void function () nothrow _gtk_reserved2;
17047 extern (C) void function () nothrow _gtk_reserved3;
17048 extern (C) void function () nothrow _gtk_reserved4;
17051 struct ItemFactory /* : Object */ {
17052 alias object this;
17053 alias object super_;
17054 Object object;
17055 char* path;
17056 AccelGroup* accel_group;
17057 Widget* widget;
17058 GLib2.SList* items;
17059 TranslateFunc translate_func;
17060 void* translate_data;
17061 GLib2.DestroyNotify translate_notify;
17064 // DEPRECATED (v2.4) constructor: new - Use #GtkUIManager instead.
17065 // Creates a new #GtkItemFactory.
17067 // Beware that the returned object does not have a floating reference.
17068 // RETURNS: a new #GtkItemFactory
17069 // <container_type>: the kind of menu to create; can be #GTK_TYPE_MENU_BAR, #GTK_TYPE_MENU or #GTK_TYPE_OPTION_MENU
17070 // <path>: the factory path of the new item factory, a string of the form <literal>"&lt;name&gt;"</literal>
17071 // <accel_group>: a #GtkAccelGroup to which the accelerators for the menu items will be added, or %NULL to create a new one
17072 static ItemFactory* new_(AT0, AT1)(Type container_type, AT0 /*char*/ path, AT1 /*AccelGroup*/ accel_group=null) nothrow {
17073 return gtk_item_factory_new(container_type, toCString!(char*)(path), UpCast!(AccelGroup*)(accel_group));
17075 static auto opCall(AT0, AT1)(Type container_type, AT0 /*char*/ path, AT1 /*AccelGroup*/ accel_group=null) {
17076 return gtk_item_factory_new(container_type, toCString!(char*)(path), UpCast!(AccelGroup*)(accel_group));
17079 // DEPRECATED (v2.4) function: add_foreign - The recommended API for this purpose are the functions
17080 // Installs an accelerator for @accel_widget in @accel_group, that causes
17081 // the ::activate signal to be emitted if the accelerator is activated.
17083 // This function can be used to make widgets participate in the accel
17084 // saving/restoring functionality provided by gtk_accel_map_save() and
17085 // gtk_accel_map_load(), even if they haven't been created by an item
17086 // factory.
17088 // gtk_menu_item_set_accel_path() and gtk_widget_set_accel_path(); don't
17089 // use gtk_item_factory_add_foreign() in new code, since it is likely to
17090 // be removed in the future.
17091 // <accel_widget>: widget to install an accelerator on
17092 // <accel_group>: the accelerator group to install the accelerator in
17093 // <keyval>: key value of the accelerator
17094 // <modifiers>: modifier combination of the accelerator
17095 static void add_foreign(AT0, AT1, AT2)(AT0 /*Widget*/ accel_widget, AT1 /*char*/ full_path, AT2 /*AccelGroup*/ accel_group, uint keyval, Gdk2.ModifierType modifiers) nothrow {
17096 gtk_item_factory_add_foreign(UpCast!(Widget*)(accel_widget), toCString!(char*)(full_path), UpCast!(AccelGroup*)(accel_group), keyval, modifiers);
17099 // DEPRECATED (v2.4) function: create_menu_entries - Use #GtkUIManager instead.
17100 // Creates the menu items from the @entries.
17101 // <n_entries>: the length of @entries
17102 // <entries>: an array of #GtkMenuEntry<!-- -->s
17103 static void create_menu_entries(AT0)(uint n_entries, AT0 /*MenuEntry*/ entries) nothrow {
17104 gtk_item_factory_create_menu_entries(n_entries, UpCast!(MenuEntry*)(entries));
17107 // Unintrospectable function: from_path() / gtk_item_factory_from_path()
17108 // DEPRECATED (v2.4) function: from_path - Use #GtkUIManager instead.
17109 // Finds an item factory which has been constructed using the
17110 // <literal>"&lt;name&gt;"</literal> prefix of @path as the @path argument
17111 // for gtk_item_factory_new().
17112 // RETURNS: the #GtkItemFactory created for the given factory path, or %NULL
17113 // <path>: a string starting with a factory path of the form <literal>"&lt;name&gt;"</literal>
17114 static ItemFactory* from_path(AT0)(AT0 /*char*/ path) nothrow {
17115 return gtk_item_factory_from_path(toCString!(char*)(path));
17118 // Unintrospectable function: from_widget() / gtk_item_factory_from_widget()
17119 // DEPRECATED (v2.4) function: from_widget - Use #GtkUIManager instead.
17120 // Obtains the item factory from which a widget was created.
17121 // RETURNS: the item factory from which @widget was created, or %NULL
17122 // <widget>: a widget
17123 static ItemFactory* from_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
17124 return gtk_item_factory_from_widget(UpCast!(Widget*)(widget));
17127 // DEPRECATED (v2.4) function: path_from_widget - Use #GtkUIManager instead.
17128 // If @widget has been created by an item factory, returns the full path
17129 // to it. (The full path of a widget is the concatenation of the factory
17130 // path specified in gtk_item_factory_new() with the path specified in the
17131 // #GtkItemFactoryEntry from which the widget was created.)
17132 // 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.
17133 // <widget>: a widget
17134 static char* path_from_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
17135 return gtk_item_factory_path_from_widget(UpCast!(Widget*)(widget));
17138 // Unintrospectable function: popup_data_from_widget() / gtk_item_factory_popup_data_from_widget()
17139 // DEPRECATED (v2.4) function: popup_data_from_widget - Use #GtkUIManager instead.
17140 // Obtains the @popup_data which was passed to
17141 // gtk_item_factory_popup_with_data(). This data is available until the menu
17142 // is popped down again.
17143 // RETURNS: @popup_data associated with the item factory from which @widget was created, or %NULL if @widget wasn't created by an item factory
17144 // <widget>: a widget
17145 static void* popup_data_from_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
17146 return gtk_item_factory_popup_data_from_widget(UpCast!(Widget*)(widget));
17149 // DEPRECATED (v2.4) method: construct - Use #GtkUIManager instead.
17150 // Initializes an item factory.
17151 // <container_type>: the kind of menu to create; can be #GTK_TYPE_MENU_BAR, #GTK_TYPE_MENU or #GTK_TYPE_OPTION_MENU
17152 // <path>: the factory path of @ifactory, a string of the form <literal>"&lt;name&gt;"</literal>
17153 // <accel_group>: a #GtkAccelGroup to which the accelerators for the menu items will be added, or %NULL to create a new one
17154 void construct(AT0, AT1)(Type container_type, AT0 /*char*/ path, AT1 /*AccelGroup*/ accel_group) nothrow {
17155 gtk_item_factory_construct(&this, container_type, toCString!(char*)(path), UpCast!(AccelGroup*)(accel_group));
17158 // DEPRECATED (v2.4) method: create_item - Use #GtkUIManager instead.
17159 // Creates an item for @entry.
17160 // <entry>: the #GtkItemFactoryEntry to create an item for
17161 // <callback_data>: data passed to the callback function of @entry
17162 // <callback_type>: 1 if the callback function of @entry is of type #GtkItemFactoryCallback1, 2 if it is of type #GtkItemFactoryCallback2
17163 void create_item(AT0, AT1)(AT0 /*ItemFactoryEntry*/ entry, AT1 /*void*/ callback_data, uint callback_type) nothrow {
17164 gtk_item_factory_create_item(&this, UpCast!(ItemFactoryEntry*)(entry), UpCast!(void*)(callback_data), callback_type);
17167 // DEPRECATED (v2.4) method: create_items - Use #GtkUIManager instead.
17168 // Creates the menu items from the @entries.
17169 // <n_entries>: the length of @entries
17170 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s whose @callback members must by of type #GtkItemFactoryCallback1
17171 // <callback_data>: data passed to the callback functions of all entries
17172 void create_items(AT0, AT1)(uint n_entries, AT0 /*ItemFactoryEntry*/ entries, AT1 /*void*/ callback_data) nothrow {
17173 gtk_item_factory_create_items(&this, n_entries, UpCast!(ItemFactoryEntry*)(entries), UpCast!(void*)(callback_data));
17176 // DEPRECATED (v2.4) method: create_items_ac - Use #GtkUIManager instead.
17177 // Creates the menu items from the @entries.
17178 // <n_entries>: the length of @entries
17179 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s
17180 // <callback_data>: data passed to the callback functions of all entries
17181 // <callback_type>: 1 if the callback functions in @entries are of type #GtkItemFactoryCallback1, 2 if they are of type #GtkItemFactoryCallback2
17182 void create_items_ac(AT0, AT1)(uint n_entries, AT0 /*ItemFactoryEntry*/ entries, AT1 /*void*/ callback_data, uint callback_type) nothrow {
17183 gtk_item_factory_create_items_ac(&this, n_entries, UpCast!(ItemFactoryEntry*)(entries), UpCast!(void*)(callback_data), callback_type);
17186 // DEPRECATED (v2.4) method: delete_entries - Use #GtkUIManager instead.
17187 // Deletes the menu items which were created from the @entries by the given
17188 // item factory.
17189 // <n_entries>: the length of @entries
17190 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s
17191 void delete_entries(AT0)(uint n_entries, AT0 /*ItemFactoryEntry*/ entries) nothrow {
17192 gtk_item_factory_delete_entries(&this, n_entries, UpCast!(ItemFactoryEntry*)(entries));
17195 // DEPRECATED (v2.4) method: delete_entry - Use #GtkUIManager instead.
17196 // Deletes the menu item which was created from @entry by the given
17197 // item factory.
17198 // <entry>: a #GtkItemFactoryEntry
17199 void delete_entry(AT0)(AT0 /*ItemFactoryEntry*/ entry) nothrow {
17200 gtk_item_factory_delete_entry(&this, UpCast!(ItemFactoryEntry*)(entry));
17203 // DEPRECATED (v2.4) method: delete_item - Use #GtkUIManager instead.
17204 // Deletes the menu item which was created for @path by the given
17205 // item factory.
17206 // <path>: a path
17207 void delete_item(AT0)(AT0 /*char*/ path) nothrow {
17208 gtk_item_factory_delete_item(&this, toCString!(char*)(path));
17211 // Unintrospectable method: get_item() / gtk_item_factory_get_item()
17212 // DEPRECATED (v2.4) method: get_item - Use #GtkUIManager instead.
17213 // Obtains the menu item which corresponds to @path.
17215 // If the widget corresponding to @path is a menu item which opens a
17216 // submenu, then the item is returned. If you are interested in the submenu,
17217 // use gtk_item_factory_get_widget() instead.
17218 // RETURNS: the menu item for the given path, or %NULL if @path doesn't lead to a menu item
17219 // <path>: the path to the menu item
17220 Widget* get_item(AT0)(AT0 /*char*/ path) nothrow {
17221 return gtk_item_factory_get_item(&this, toCString!(char*)(path));
17224 // Unintrospectable method: get_item_by_action() / gtk_item_factory_get_item_by_action()
17225 // DEPRECATED (v2.4) method: get_item_by_action - Use #GtkUIManager instead.
17226 // Obtains the menu item which was constructed from the first
17227 // #GtkItemFactoryEntry with the given @action.
17228 // RETURNS: the menu item which corresponds to the given action, or %NULL if no menu item was found
17229 // <action>: an action as specified in the @callback_action field of #GtkItemFactoryEntry
17230 Widget* get_item_by_action()(uint action) nothrow {
17231 return gtk_item_factory_get_item_by_action(&this, action);
17234 // Unintrospectable method: get_widget() / gtk_item_factory_get_widget()
17235 // DEPRECATED (v2.4) method: get_widget - Use #GtkUIManager instead.
17236 // Obtains the widget which corresponds to @path.
17238 // If the widget corresponding to @path is a menu item which opens a
17239 // submenu, then the submenu is returned. If you are interested in the menu
17240 // item, use gtk_item_factory_get_item() instead.
17241 // RETURNS: the widget for the given path, or %NULL if @path doesn't lead to a widget
17242 // <path>: the path to the widget
17243 Widget* get_widget(AT0)(AT0 /*char*/ path) nothrow {
17244 return gtk_item_factory_get_widget(&this, toCString!(char*)(path));
17247 // Unintrospectable method: get_widget_by_action() / gtk_item_factory_get_widget_by_action()
17248 // DEPRECATED (v2.4) method: get_widget_by_action - Use #GtkUIManager instead.
17249 // Obtains the widget which was constructed from the #GtkItemFactoryEntry
17250 // with the given @action.
17252 // If there are multiple items with the same action, the result is
17253 // undefined.
17254 // RETURNS: the widget which corresponds to the given action, or %NULL if no widget was found
17255 // <action>: an action as specified in the @callback_action field of #GtkItemFactoryEntry
17256 Widget* get_widget_by_action()(uint action) nothrow {
17257 return gtk_item_factory_get_widget_by_action(&this, action);
17260 // DEPRECATED (v2.4) method: popup - Use #GtkUIManager instead.
17261 // Pops up the menu constructed from the item factory at (@x, @y).
17263 // The @mouse_button parameter should be the mouse button pressed to initiate
17264 // the menu popup. If the menu popup was initiated by something other than
17265 // a mouse button press, such as a mouse button release or a keypress,
17266 // @mouse_button should be 0.
17268 // The @time_ parameter should be the time stamp of the event that
17269 // initiated the popup. If such an event is not available, use
17270 // gtk_get_current_event_time() instead.
17272 // The operation of the @mouse_button and the @time_ parameter is the same
17273 // as the @button and @activation_time parameters for gtk_menu_popup().
17274 // <x>: the x position
17275 // <y>: the y position
17276 // <mouse_button>: the mouse button which was pressed to initiate the popup
17277 // <time_>: the time at which the activation event occurred
17278 void popup()(uint x, uint y, uint mouse_button, uint time_) nothrow {
17279 gtk_item_factory_popup(&this, x, y, mouse_button, time_);
17282 // Unintrospectable method: popup_data() / gtk_item_factory_popup_data()
17283 // DEPRECATED (v2.4) method: popup_data - Use #GtkUIManager instead.
17284 // Obtains the @popup_data which was passed to
17285 // gtk_item_factory_popup_with_data(). This data is available until the menu
17286 // is popped down again.
17287 // RETURNS: @popup_data associated with @ifactory
17288 void* popup_data()() nothrow {
17289 return gtk_item_factory_popup_data(&this);
17292 // DEPRECATED (v2.4) method: popup_with_data - Use #GtkUIManager instead.
17293 // Pops up the menu constructed from the item factory at (@x, @y). Callbacks
17294 // can access the @popup_data while the menu is posted via
17295 // gtk_item_factory_popup_data() and gtk_item_factory_popup_data_from_widget().
17297 // The @mouse_button parameter should be the mouse button pressed to initiate
17298 // the menu popup. If the menu popup was initiated by something other than
17299 // a mouse button press, such as a mouse button release or a keypress,
17300 // @mouse_button should be 0.
17302 // The @time_ parameter should be the time stamp of the event that
17303 // initiated the popup. If such an event is not available, use
17304 // gtk_get_current_event_time() instead.
17306 // The operation of the @mouse_button and the @time_ parameters is the same
17307 // as the @button and @activation_time parameters for gtk_menu_popup().
17308 // <popup_data>: data available for callbacks while the menu is posted
17309 // <destroy>: a #GDestroyNotify function to be called on @popup_data when the menu is unposted
17310 // <x>: the x position
17311 // <y>: the y position
17312 // <mouse_button>: the mouse button which was pressed to initiate the popup
17313 // <time_>: the time at which the activation event occurred
17314 void popup_with_data(AT0)(AT0 /*void*/ popup_data, GLib2.DestroyNotify destroy, uint x, uint y, uint mouse_button, uint time_) nothrow {
17315 gtk_item_factory_popup_with_data(&this, UpCast!(void*)(popup_data), destroy, x, y, mouse_button, time_);
17318 // DEPRECATED (v2.4) method: set_translate_func - Use #GtkUIManager instead.
17319 // Sets a function to be used for translating the path elements before they
17320 // are displayed.
17321 // <func>: the #GtkTranslateFunc function to be used to translate path elements
17322 // <data>: data to pass to @func and @notify
17323 // <notify>: a #GDestroyNotify function to be called when @ifactory is destroyed and when the translation function is changed again
17324 void set_translate_func(AT0)(TranslateFunc func, AT0 /*void*/ data, GLib2.DestroyNotify notify) nothrow {
17325 gtk_item_factory_set_translate_func(&this, func, UpCast!(void*)(data), notify);
17329 extern (C) alias void function () nothrow ItemFactoryCallback;
17331 extern (C) alias void function (void* callback_data, uint callback_action, Widget* widget) nothrow ItemFactoryCallback1;
17333 extern (C) alias void function (Widget* widget, void* callback_data, uint callback_action) nothrow ItemFactoryCallback2;
17335 struct ItemFactoryClass {
17336 ObjectClass object_class;
17337 GLib2.HashTable* item_ht;
17338 extern (C) void function () nothrow _gtk_reserved1;
17339 extern (C) void function () nothrow _gtk_reserved2;
17340 extern (C) void function () nothrow _gtk_reserved3;
17341 extern (C) void function () nothrow _gtk_reserved4;
17344 struct ItemFactoryEntry {
17345 char* path, accelerator;
17346 ItemFactoryCallback callback;
17347 uint callback_action;
17348 char* item_type;
17349 const(void)* extra_data;
17352 struct ItemFactoryItem {
17353 char* path;
17354 GLib2.SList* widgets;
17357 enum Justification {
17358 LEFT = 0,
17359 RIGHT = 1,
17360 CENTER = 2,
17361 FILL = 3
17363 extern (C) alias int function (Widget* grab_widget, Gdk2.EventKey* event, void* func_data) nothrow KeySnoopFunc;
17365 struct Label /* : Misc */ {
17366 mixin Atk.ImplementorIface.__interface__;
17367 mixin Buildable.__interface__;
17368 alias misc this;
17369 alias misc super_;
17370 Misc misc;
17371 private char* label;
17372 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
17373 uint, "jtype", 2,
17374 uint, "wrap", 1,
17375 uint, "use_underline", 1,
17376 uint, "use_markup", 1,
17377 uint, "ellipsize", 3,
17378 uint, "single_line_mode", 1,
17379 uint, "have_transform", 1,
17380 uint, "in_click", 1,
17381 uint, "wrap_mode", 3,
17382 uint, "pattern_set", 1,
17383 uint, "track_links", 1,
17384 uint, "__dummy32A", 16));
17385 private uint mnemonic_keyval;
17386 private char* text;
17387 private Pango.AttrList* attrs, effective_attrs;
17388 private Pango.Layout* layout;
17389 private Widget* mnemonic_widget;
17390 private Window* mnemonic_window;
17391 private LabelSelectionInfo* select_info;
17394 // Creates a new label with the given text inside it. You can
17395 // pass %NULL to get an empty label widget.
17396 // RETURNS: the new #GtkLabel
17397 // <str>: The text of the label
17398 static Label* new_(AT0)(AT0 /*char*/ str) nothrow {
17399 return gtk_label_new(toCString!(char*)(str));
17401 static auto opCall(AT0)(AT0 /*char*/ str) {
17402 return gtk_label_new(toCString!(char*)(str));
17405 // Creates a new #GtkLabel, containing the text in @str.
17407 // If characters in @str are preceded by an underscore, they are
17408 // underlined. If you need a literal underscore character in a label, use
17409 // '__' (two underscores). The first underlined character represents a
17410 // keyboard accelerator called a mnemonic. The mnemonic key can be used
17411 // to activate another widget, chosen automatically, or explicitly using
17412 // gtk_label_set_mnemonic_widget().
17414 // If gtk_label_set_mnemonic_widget() is not called, then the first
17415 // activatable ancestor of the #GtkLabel will be chosen as the mnemonic
17416 // widget. For instance, if the label is inside a button or menu item,
17417 // the button or menu item will automatically become the mnemonic widget
17418 // and be activated by the mnemonic.
17419 // RETURNS: the new #GtkLabel
17420 // <str>: The text of the label, with an underscore in front of the mnemonic character
17421 static Label* new_with_mnemonic(AT0)(AT0 /*char*/ str) nothrow {
17422 return gtk_label_new_with_mnemonic(toCString!(char*)(str));
17424 static auto opCall(AT0)(AT0 /*char*/ str) {
17425 return gtk_label_new_with_mnemonic(toCString!(char*)(str));
17427 void get(AT0)(AT0 /*char**/ str) nothrow {
17428 gtk_label_get(&this, toCString!(char**)(str));
17431 // VERSION: 2.6
17432 // Gets the angle of rotation for the label. See
17433 // gtk_label_set_angle().
17434 // RETURNS: the angle of rotation for the label
17435 double get_angle()() nothrow {
17436 return gtk_label_get_angle(&this);
17439 // Gets the attribute list that was set on the label using
17440 // gtk_label_set_attributes(), if any. This function does
17441 // not reflect attributes that come from the labels markup
17442 // (see gtk_label_set_markup()). If you want to get the
17443 // effective attributes for the label, use
17444 // pango_layout_get_attribute (gtk_label_get_layout (label)).
17446 // if none was set.
17447 // RETURNS: the attribute list, or %NULL
17448 Pango.AttrList* get_attributes()() nothrow {
17449 return gtk_label_get_attributes(&this);
17452 // VERSION: 2.18
17453 // Returns the URI for the currently active link in the label.
17454 // The active link is the one under the mouse pointer or, in a
17455 // selectable label, the link in which the text cursor is currently
17456 // positioned.
17458 // This function is intended for use in a #GtkLabel::activate-link handler
17459 // or for use in a #GtkWidget::query-tooltip handler.
17461 // not be freed or modified.
17462 // RETURNS: the currently active URI. The string is owned by GTK+ and must
17463 char* get_current_uri()() nothrow {
17464 return gtk_label_get_current_uri(&this);
17467 // VERSION: 2.6
17468 // Returns the ellipsizing position of the label. See gtk_label_set_ellipsize().
17469 // RETURNS: #PangoEllipsizeMode
17470 Pango.EllipsizeMode get_ellipsize()() nothrow {
17471 return gtk_label_get_ellipsize(&this);
17474 // Returns the justification of the label. See gtk_label_set_justify().
17475 // RETURNS: #GtkJustification
17476 Justification get_justify()() nothrow {
17477 return gtk_label_get_justify(&this);
17480 // Fetches the text from a label widget including any embedded
17481 // underlines indicating mnemonics and Pango markup. (See
17482 // gtk_label_get_text()).
17484 // owned by the widget and must not be modified or freed.
17485 // RETURNS: the text of the label widget. This string is
17486 char* get_label()() nothrow {
17487 return gtk_label_get_label(&this);
17490 // Gets the #PangoLayout used to display the label.
17491 // The layout is useful to e.g. convert text positions to
17492 // pixel positions, in combination with gtk_label_get_layout_offsets().
17493 // The returned layout is owned by the label so need not be
17494 // freed by the caller.
17495 // RETURNS: the #PangoLayout for this label
17496 Pango.Layout* get_layout()() nothrow {
17497 return gtk_label_get_layout(&this);
17500 // Obtains the coordinates where the label will draw the #PangoLayout
17501 // representing the text in the label; useful to convert mouse events
17502 // into coordinates inside the #PangoLayout, e.g. to take some action
17503 // if some part of the label is clicked. Of course you will need to
17504 // create a #GtkEventBox to receive the events, and pack the label
17505 // inside it, since labels are a #GTK_NO_WINDOW widget. Remember
17506 // when using the #PangoLayout functions you need to convert to
17507 // and from pixels using PANGO_PIXELS() or #PANGO_SCALE.
17508 // <x>: location to store X offset of layout, or %NULL
17509 // <y>: location to store Y offset of layout, or %NULL
17510 void get_layout_offsets()(/*out*/ int* x=null, /*out*/ int* y=null) nothrow {
17511 gtk_label_get_layout_offsets(&this, x, y);
17514 // Returns whether lines in the label are automatically wrapped.
17515 // See gtk_label_set_line_wrap().
17516 // RETURNS: %TRUE if the lines of the label are automatically wrapped.
17517 int get_line_wrap()() nothrow {
17518 return gtk_label_get_line_wrap(&this);
17521 // VERSION: 2.10
17522 // Returns line wrap mode used by the label. See gtk_label_set_line_wrap_mode().
17523 // RETURNS: %TRUE if the lines of the label are automatically wrapped.
17524 Pango.WrapMode get_line_wrap_mode()() nothrow {
17525 return gtk_label_get_line_wrap_mode(&this);
17528 // VERSION: 2.6
17529 // Retrieves the desired maximum width of @label, in characters. See
17530 // gtk_label_set_width_chars().
17531 // RETURNS: the maximum width of the label in characters.
17532 int get_max_width_chars()() nothrow {
17533 return gtk_label_get_max_width_chars(&this);
17536 // If the label has been set so that it has an mnemonic key this function
17537 // returns the keyval used for the mnemonic accelerator. If there is no
17538 // mnemonic set up it returns #GDK_VoidSymbol.
17539 // RETURNS: GDK keyval usable for accelerators, or #GDK_VoidSymbol
17540 uint get_mnemonic_keyval()() nothrow {
17541 return gtk_label_get_mnemonic_keyval(&this);
17544 // Retrieves the target of the mnemonic (keyboard shortcut) of this
17545 // label. See gtk_label_set_mnemonic_widget().
17547 // or %NULL if none has been set and the default algorithm will be used.
17548 // RETURNS: the target of the label's mnemonic,
17549 Widget* get_mnemonic_widget()() nothrow {
17550 return gtk_label_get_mnemonic_widget(&this);
17553 // Gets the value set by gtk_label_set_selectable().
17554 // RETURNS: %TRUE if the user can copy text from the label
17555 int get_selectable()() nothrow {
17556 return gtk_label_get_selectable(&this);
17559 // Gets the selected range of characters in the label, returning %TRUE
17560 // if there's a selection.
17561 // RETURNS: %TRUE if selection is non-empty
17562 // <start>: return location for start of selection, as a character offset
17563 // <end>: return location for end of selection, as a character offset
17564 int get_selection_bounds()(/*out*/ int* start, /*out*/ int* end) nothrow {
17565 return gtk_label_get_selection_bounds(&this, start, end);
17568 // VERSION: 2.6
17569 // Returns whether the label is in single line mode.
17570 // RETURNS: %TRUE when the label is in single line mode.
17571 int get_single_line_mode()() nothrow {
17572 return gtk_label_get_single_line_mode(&this);
17575 // Fetches the text from a label widget, as displayed on the
17576 // screen. This does not include any embedded underlines
17577 // indicating mnemonics or Pango markup. (See gtk_label_get_label())
17579 // string used by the label, and must not be modified.
17580 // RETURNS: the text in the label widget. This is the internal
17581 char* get_text()() nothrow {
17582 return gtk_label_get_text(&this);
17585 // VERSION: 2.18
17586 // Returns whether the label is currently keeping track
17587 // of clicked links.
17588 // RETURNS: %TRUE if clicked links are remembered
17589 int get_track_visited_links()() nothrow {
17590 return gtk_label_get_track_visited_links(&this);
17593 // Returns whether the label's text is interpreted as marked up with
17594 // the <link linkend="PangoMarkupFormat">Pango text markup
17595 // language</link>. See gtk_label_set_use_markup ().
17596 // RETURNS: %TRUE if the label's text will be parsed for markup.
17597 int get_use_markup()() nothrow {
17598 return gtk_label_get_use_markup(&this);
17601 // Returns whether an embedded underline in the label indicates a
17602 // mnemonic. See gtk_label_set_use_underline().
17604 // the mnemonic accelerator keys.
17605 // RETURNS: %TRUE whether an embedded underline in the label indicates
17606 int get_use_underline()() nothrow {
17607 return gtk_label_get_use_underline(&this);
17610 // VERSION: 2.6
17611 // Retrieves the desired width of @label, in characters. See
17612 // gtk_label_set_width_chars().
17613 // RETURNS: the width of the label in characters.
17614 int get_width_chars()() nothrow {
17615 return gtk_label_get_width_chars(&this);
17617 uint parse_uline(AT0)(AT0 /*char*/ string_) nothrow {
17618 return gtk_label_parse_uline(&this, toCString!(char*)(string_));
17621 // Selects a range of characters in the label, if the label is selectable.
17622 // See gtk_label_set_selectable(). If the label is not selectable,
17623 // this function has no effect. If @start_offset or
17624 // @end_offset are -1, then the end of the label will be substituted.
17625 // <start_offset>: start offset (in characters not bytes)
17626 // <end_offset>: end offset (in characters not bytes)
17627 void select_region()(int start_offset, int end_offset) nothrow {
17628 gtk_label_select_region(&this, start_offset, end_offset);
17631 // VERSION: 2.6
17632 // Sets the angle of rotation for the label. An angle of 90 reads from
17633 // from bottom to top, an angle of 270, from top to bottom. The angle
17634 // setting for the label is ignored if the label is selectable,
17635 // wrapped, or ellipsized.
17636 // <angle>: the angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise
17637 void set_angle()(double angle) nothrow {
17638 gtk_label_set_angle(&this, angle);
17641 // Sets a #PangoAttrList; the attributes in the list are applied to the
17642 // label text.
17644 // <note><para>The attributes set with this function will be applied
17645 // and merged with any other attributes previously effected by way
17646 // of the #GtkLabel:use-underline or #GtkLabel:use-markup properties.
17647 // While it is not recommended to mix markup strings with manually set
17648 // attributes, if you must; know that the attributes will be applied
17649 // to the label after the markup string is parsed.</para></note>
17650 // <attrs>: a #PangoAttrList
17651 void set_attributes(AT0)(AT0 /*Pango.AttrList*/ attrs) nothrow {
17652 gtk_label_set_attributes(&this, UpCast!(Pango.AttrList*)(attrs));
17655 // VERSION: 2.6
17656 // Sets the mode used to ellipsize (add an ellipsis: "...") to the text
17657 // if there is not enough space to render the entire string.
17658 // <mode>: a #PangoEllipsizeMode
17659 void set_ellipsize()(Pango.EllipsizeMode mode) nothrow {
17660 gtk_label_set_ellipsize(&this, mode);
17663 // Sets the alignment of the lines in the text of the label relative to
17664 // each other. %GTK_JUSTIFY_LEFT is the default value when the
17665 // widget is first created with gtk_label_new(). If you instead want
17666 // to set the alignment of the label as a whole, use
17667 // gtk_misc_set_alignment() instead. gtk_label_set_justify() has no
17668 // effect on labels containing only a single line.
17669 // <jtype>: a #GtkJustification
17670 void set_justify()(Justification jtype) nothrow {
17671 gtk_label_set_justify(&this, jtype);
17674 // Sets the text of the label. The label is interpreted as
17675 // including embedded underlines and/or Pango markup depending
17676 // on the values of the #GtkLabel:use-underline" and
17677 // #GtkLabel:use-markup properties.
17678 // <str>: the new text to set for the label
17679 void set_label(AT0)(AT0 /*char*/ str) nothrow {
17680 gtk_label_set_label(&this, toCString!(char*)(str));
17683 // Toggles line wrapping within the #GtkLabel widget. %TRUE makes it break
17684 // lines if text exceeds the widget's size. %FALSE lets the text get cut off
17685 // by the edge of the widget if it exceeds the widget size.
17687 // Note that setting line wrapping to %TRUE does not make the label
17688 // wrap at its parent container's width, because GTK+ widgets
17689 // conceptually can't make their requisition depend on the parent
17690 // container's size. For a label that wraps at a specific position,
17691 // set the label's width using gtk_widget_set_size_request().
17692 // <wrap>: the setting
17693 void set_line_wrap()(int wrap) nothrow {
17694 gtk_label_set_line_wrap(&this, wrap);
17697 // VERSION: 2.10
17698 // If line wrapping is on (see gtk_label_set_line_wrap()) this controls how
17699 // the line wrapping is done. The default is %PANGO_WRAP_WORD which means
17700 // wrap on word boundaries.
17701 // <wrap_mode>: the line wrapping mode
17702 void set_line_wrap_mode()(Pango.WrapMode wrap_mode) nothrow {
17703 gtk_label_set_line_wrap_mode(&this, wrap_mode);
17706 // Parses @str which is marked up with the <link
17707 // linkend="PangoMarkupFormat">Pango text markup language</link>, setting the
17708 // label's text and attribute list based on the parse results. If the @str is
17709 // external data, you may need to escape it with g_markup_escape_text() or
17710 // g_markup_printf_escaped()<!-- -->:
17711 // |[
17712 // char *markup;
17714 // markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;&percnt;s&lt;/span&gt;", str);
17715 // gtk_label_set_markup (GTK_LABEL (label), markup);
17716 // g_free (markup);
17717 // ]|
17718 // <str>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
17719 void set_markup(AT0)(AT0 /*char*/ str) nothrow {
17720 gtk_label_set_markup(&this, toCString!(char*)(str));
17723 // Parses @str which is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>,
17724 // setting the label's text and attribute list based on the parse results.
17725 // If characters in @str are preceded by an underscore, they are underlined
17726 // indicating that they represent a keyboard accelerator called a mnemonic.
17728 // The mnemonic key can be used to activate another widget, chosen
17729 // automatically, or explicitly using gtk_label_set_mnemonic_widget().
17730 // <str>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
17731 void set_markup_with_mnemonic(AT0)(AT0 /*char*/ str) nothrow {
17732 gtk_label_set_markup_with_mnemonic(&this, toCString!(char*)(str));
17735 // VERSION: 2.6
17736 // Sets the desired maximum width in characters of @label to @n_chars.
17737 // <n_chars>: the new desired maximum width, in characters.
17738 void set_max_width_chars()(int n_chars) nothrow {
17739 gtk_label_set_max_width_chars(&this, n_chars);
17742 // If the label has been set so that it has an mnemonic key (using
17743 // i.e. gtk_label_set_markup_with_mnemonic(),
17744 // gtk_label_set_text_with_mnemonic(), gtk_label_new_with_mnemonic()
17745 // or the "use_underline" property) the label can be associated with a
17746 // widget that is the target of the mnemonic. When the label is inside
17747 // a widget (like a #GtkButton or a #GtkNotebook tab) it is
17748 // automatically associated with the correct widget, but sometimes
17749 // (i.e. when the target is a #GtkEntry next to the label) you need to
17750 // set it explicitly using this function.
17752 // The target widget will be accelerated by emitting the
17753 // GtkWidget::mnemonic-activate signal on it. The default handler for
17754 // this signal will activate the widget if there are no mnemonic collisions
17755 // and toggle focus between the colliding widgets otherwise.
17756 // <widget>: the target #GtkWidget
17757 void set_mnemonic_widget(AT0)(AT0 /*Widget*/ widget=null) nothrow {
17758 gtk_label_set_mnemonic_widget(&this, UpCast!(Widget*)(widget));
17760 void set_pattern(AT0)(AT0 /*char*/ pattern) nothrow {
17761 gtk_label_set_pattern(&this, toCString!(char*)(pattern));
17764 // Selectable labels allow the user to select text from the label, for
17765 // copy-and-paste.
17766 // <setting>: %TRUE to allow selecting text in the label
17767 void set_selectable()(int setting) nothrow {
17768 gtk_label_set_selectable(&this, setting);
17771 // VERSION: 2.6
17772 // Sets whether the label is in single line mode.
17773 // <single_line_mode>: %TRUE if the label should be in single line mode
17774 void set_single_line_mode()(int single_line_mode) nothrow {
17775 gtk_label_set_single_line_mode(&this, single_line_mode);
17778 // Sets the text within the #GtkLabel widget. It overwrites any text that
17779 // was there before.
17781 // This will also clear any previously set mnemonic accelerators.
17782 // <str>: The text you want to set
17783 void set_text(AT0)(AT0 /*char*/ str) nothrow {
17784 gtk_label_set_text(&this, toCString!(char*)(str));
17787 // Sets the label's text from the string @str.
17788 // If characters in @str are preceded by an underscore, they are underlined
17789 // indicating that they represent a keyboard accelerator called a mnemonic.
17790 // The mnemonic key can be used to activate another widget, chosen
17791 // automatically, or explicitly using gtk_label_set_mnemonic_widget().
17792 // <str>: a string
17793 void set_text_with_mnemonic(AT0)(AT0 /*char*/ str) nothrow {
17794 gtk_label_set_text_with_mnemonic(&this, toCString!(char*)(str));
17797 // VERSION: 2.18
17798 // Sets whether the label should keep track of clicked
17799 // links (and use a different color for them).
17800 // <track_links>: %TRUE to track visited links
17801 void set_track_visited_links()(int track_links) nothrow {
17802 gtk_label_set_track_visited_links(&this, track_links);
17805 // Sets whether the text of the label contains markup in <link
17806 // linkend="PangoMarkupFormat">Pango's text markup
17807 // language</link>. See gtk_label_set_markup().
17808 // <setting>: %TRUE if the label's text should be parsed for markup.
17809 void set_use_markup()(int setting) nothrow {
17810 gtk_label_set_use_markup(&this, setting);
17813 // If true, an underline in the text indicates the next character should be
17814 // used for the mnemonic accelerator key.
17815 // <setting>: %TRUE if underlines in the text indicate mnemonics
17816 void set_use_underline()(int setting) nothrow {
17817 gtk_label_set_use_underline(&this, setting);
17820 // VERSION: 2.6
17821 // Sets the desired width in characters of @label to @n_chars.
17822 // <n_chars>: the new desired width, in characters.
17823 void set_width_chars()(int n_chars) nothrow {
17824 gtk_label_set_width_chars(&this, n_chars);
17827 // VERSION: 2.18
17828 // A <link linkend="keybinding-signals">keybinding signal</link>
17829 // which gets emitted when the user activates a link in the label.
17831 // Applications may also emit the signal with g_signal_emit_by_name()
17832 // if they need to control activation of URIs programmatically.
17834 // The default bindings for this signal are all forms of the Enter key.
17835 extern (C) alias static void function (Label* this_, void* user_data=null) nothrow signal_activate_current_link;
17837 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17838 return super_.signal_connect!name(cb, data, cf);
17841 ulong signal_connect(string name:"activate-current-link", CB/*:signal_activate_current_link*/)
17842 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17843 if (is(typeof(cb)==signal_activate_current_link)||_ttmm!(CB, signal_activate_current_link)()) {
17844 return signal_connect_data!()(&this, cast(char*)"activate-current-link",
17845 cast(GObject2.Callback)cb, data, null, cf);
17848 // VERSION: 2.18
17849 // The signal which gets emitted to activate a URI.
17850 // Applications may connect to it to override the default behaviour,
17851 // which is to call gtk_show_uri().
17852 // RETURNS: %TRUE if the link has been activated
17853 // <uri>: the URI that is activated
17854 extern (C) alias static c_int function (Label* this_, char* uri, void* user_data=null) nothrow signal_activate_link;
17855 ulong signal_connect(string name:"activate-link", CB/*:signal_activate_link*/)
17856 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17857 if (is(typeof(cb)==signal_activate_link)||_ttmm!(CB, signal_activate_link)()) {
17858 return signal_connect_data!()(&this, cast(char*)"activate-link",
17859 cast(GObject2.Callback)cb, data, null, cf);
17862 // The ::copy-clipboard signal is a
17863 // <link linkend="keybinding-signals">keybinding signal</link>
17864 // which gets emitted to copy the selection to the clipboard.
17866 // The default binding for this signal is Ctrl-c.
17867 extern (C) alias static void function (Label* this_, void* user_data=null) nothrow signal_copy_clipboard;
17868 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)
17869 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17870 if (is(typeof(cb)==signal_copy_clipboard)||_ttmm!(CB, signal_copy_clipboard)()) {
17871 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
17872 cast(GObject2.Callback)cb, data, null, cf);
17875 // The ::move-cursor signal is a
17876 // <link linkend="keybinding-signals">keybinding signal</link>
17877 // which gets emitted when the user initiates a cursor movement.
17878 // If the cursor is not visible in @entry, this signal causes
17879 // the viewport to be moved instead.
17881 // Applications should not connect to it, but may emit it with
17882 // g_signal_emit_by_name() if they need to control the cursor
17883 // programmatically.
17885 // The default bindings for this signal come in two variants,
17886 // the variant with the Shift modifier extends the selection,
17887 // the variant without the Shift modifer does not.
17888 // There are too many key combinations to list them all here.
17889 // <itemizedlist>
17890 // <listitem>Arrow keys move by individual characters/lines</listitem>
17891 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
17892 // <listitem>Home/End keys move to the ends of the buffer</listitem>
17893 // </itemizedlist>
17894 // <step>: the granularity of the move, as a #GtkMovementStep
17895 // <count>: the number of @step units to move
17896 // <extend_selection>: %TRUE if the move should extend the selection
17897 extern (C) alias static void function (Label* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) nothrow signal_move_cursor;
17898 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)
17899 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17900 if (is(typeof(cb)==signal_move_cursor)||_ttmm!(CB, signal_move_cursor)()) {
17901 return signal_connect_data!()(&this, cast(char*)"move-cursor",
17902 cast(GObject2.Callback)cb, data, null, cf);
17905 // The ::populate-popup signal gets emitted before showing the
17906 // context menu of the label. Note that only selectable labels
17907 // have context menus.
17909 // If you need to add items to the context menu, connect
17910 // to this signal and append your menuitems to the @menu.
17911 // <menu>: the menu that is being populated
17912 extern (C) alias static void function (Label* this_, Menu* menu, void* user_data=null) nothrow signal_populate_popup;
17913 ulong signal_connect(string name:"populate-popup", CB/*:signal_populate_popup*/)
17914 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
17915 if (is(typeof(cb)==signal_populate_popup)||_ttmm!(CB, signal_populate_popup)()) {
17916 return signal_connect_data!()(&this, cast(char*)"populate-popup",
17917 cast(GObject2.Callback)cb, data, null, cf);
17921 struct LabelClass {
17922 MiscClass parent_class;
17923 extern (C) void function (Label* label, MovementStep step, int count, int extend_selection) nothrow move_cursor;
17924 extern (C) void function (Label* label) nothrow copy_clipboard;
17925 extern (C) void function (Label* label, Menu* menu) nothrow populate_popup;
17926 extern (C) int function (Label* label, char* uri) nothrow activate_link;
17927 extern (C) void function () nothrow _gtk_reserved1;
17928 extern (C) void function () nothrow _gtk_reserved2;
17929 extern (C) void function () nothrow _gtk_reserved3;
17932 struct LabelSelectionInfo {
17935 struct Layout /* : Container */ {
17936 mixin Atk.ImplementorIface.__interface__;
17937 mixin Buildable.__interface__;
17938 alias container this;
17939 alias container super_;
17940 Container container;
17941 GLib2.List* children;
17942 uint width, height;
17943 Adjustment* hadjustment, vadjustment;
17944 Gdk2.Window* bin_window;
17945 private Gdk2.VisibilityState visibility;
17946 private int scroll_x, scroll_y;
17947 private uint freeze_count;
17950 // Creates a new #GtkLayout. Unless you have a specific adjustment
17951 // you'd like the layout to use for scrolling, pass %NULL for
17952 // @hadjustment and @vadjustment.
17953 // RETURNS: a new #GtkLayout
17954 // <hadjustment>: horizontal scroll adjustment, or %NULL
17955 // <vadjustment>: vertical scroll adjustment, or %NULL
17956 static Layout* new_(AT0, AT1)(AT0 /*Adjustment*/ hadjustment=null, AT1 /*Adjustment*/ vadjustment=null) nothrow {
17957 return gtk_layout_new(UpCast!(Adjustment*)(hadjustment), UpCast!(Adjustment*)(vadjustment));
17959 static auto opCall(AT0, AT1)(AT0 /*Adjustment*/ hadjustment=null, AT1 /*Adjustment*/ vadjustment=null) {
17960 return gtk_layout_new(UpCast!(Adjustment*)(hadjustment), UpCast!(Adjustment*)(vadjustment));
17962 // This is a deprecated function, it doesn't do anything useful.
17963 void freeze()() nothrow {
17964 gtk_layout_freeze(&this);
17967 // VERSION: 2.14
17968 // Retrieve the bin window of the layout used for drawing operations.
17969 // RETURNS: a #GdkWindow
17970 Gdk2.Window* get_bin_window()() nothrow {
17971 return gtk_layout_get_bin_window(&this);
17974 // This function should only be called after the layout has been
17975 // placed in a #GtkScrolledWindow or otherwise configured for
17976 // scrolling. It returns the #GtkAdjustment used for communication
17977 // between the horizontal scrollbar and @layout.
17979 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
17980 // RETURNS: horizontal scroll adjustment
17981 Adjustment* get_hadjustment()() nothrow {
17982 return gtk_layout_get_hadjustment(&this);
17985 // Gets the size that has been set on the layout, and that determines
17986 // the total extents of the layout's scrollbar area. See
17987 // gtk_layout_set_size ().
17988 // <width>: location to store the width set on @layout, or %NULL
17989 // <height>: location to store the height set on @layout, or %NULL
17990 void get_size(AT0, AT1)(/*out*/ AT0 /*uint*/ width=null, /*out*/ AT1 /*uint*/ height=null) nothrow {
17991 gtk_layout_get_size(&this, UpCast!(uint*)(width), UpCast!(uint*)(height));
17994 // This function should only be called after the layout has been
17995 // placed in a #GtkScrolledWindow or otherwise configured for
17996 // scrolling. It returns the #GtkAdjustment used for communication
17997 // between the vertical scrollbar and @layout.
17999 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
18000 // RETURNS: vertical scroll adjustment
18001 Adjustment* get_vadjustment()() nothrow {
18002 return gtk_layout_get_vadjustment(&this);
18005 // Moves a current child of @layout to a new position.
18006 // <child_widget>: a current child of @layout
18007 // <x>: X position to move to
18008 // <y>: Y position to move to
18009 void move(AT0)(AT0 /*Widget*/ child_widget, int x, int y) nothrow {
18010 gtk_layout_move(&this, UpCast!(Widget*)(child_widget), x, y);
18013 // Adds @child_widget to @layout, at position (@x,@y).
18014 // @layout becomes the new parent container of @child_widget.
18015 // <child_widget>: child widget
18016 // <x>: X position of child widget
18017 // <y>: Y position of child widget
18018 void put(AT0)(AT0 /*Widget*/ child_widget, int x, int y) nothrow {
18019 gtk_layout_put(&this, UpCast!(Widget*)(child_widget), x, y);
18022 // Sets the horizontal scroll adjustment for the layout.
18024 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
18025 // <adjustment>: new scroll adjustment
18026 void set_hadjustment(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
18027 gtk_layout_set_hadjustment(&this, UpCast!(Adjustment*)(adjustment));
18030 // Sets the size of the scrollable area of the layout.
18031 // <width>: width of entire scrollable area
18032 // <height>: height of entire scrollable area
18033 void set_size()(uint width, uint height) nothrow {
18034 gtk_layout_set_size(&this, width, height);
18037 // Sets the vertical scroll adjustment for the layout.
18039 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
18040 // <adjustment>: new scroll adjustment
18041 void set_vadjustment(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
18042 gtk_layout_set_vadjustment(&this, UpCast!(Adjustment*)(adjustment));
18044 // This is a deprecated function, it doesn't do anything useful.
18045 void thaw()() nothrow {
18046 gtk_layout_thaw(&this);
18049 // Set the scroll adjustments for the layout. Usually scrolled containers
18050 // like #GtkScrolledWindow will emit this signal to connect two instances
18051 // of #GtkScrollbar to the scroll directions of the #GtkLayout.
18052 extern (C) alias static void function (Layout* this_, Adjustment* object, Adjustment* p0, void* user_data=null) nothrow signal_set_scroll_adjustments;
18054 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18055 return super_.signal_connect!name(cb, data, cf);
18058 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)
18059 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18060 if (is(typeof(cb)==signal_set_scroll_adjustments)||_ttmm!(CB, signal_set_scroll_adjustments)()) {
18061 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
18062 cast(GObject2.Callback)cb, data, null, cf);
18066 struct LayoutClass {
18067 ContainerClass parent_class;
18068 extern (C) void function (Layout* layout, Adjustment* hadjustment, Adjustment* vadjustment) nothrow set_scroll_adjustments;
18069 extern (C) void function () nothrow _gtk_reserved1;
18070 extern (C) void function () nothrow _gtk_reserved2;
18071 extern (C) void function () nothrow _gtk_reserved3;
18072 extern (C) void function () nothrow _gtk_reserved4;
18075 struct LinkButton /* : Button */ {
18076 mixin Atk.ImplementorIface.__interface__;
18077 mixin Activatable.__interface__;
18078 mixin Buildable.__interface__;
18079 alias parent_instance this;
18080 alias parent_instance super_;
18081 alias parent_instance button;
18082 Button parent_instance;
18083 LinkButtonPrivate* priv;
18086 // VERSION: 2.10
18087 // Creates a new #GtkLinkButton with the URI as its text.
18088 // RETURNS: a new link button widget.
18089 // <uri>: a valid URI
18090 static LinkButton* new_(AT0)(AT0 /*char*/ uri) nothrow {
18091 return gtk_link_button_new(toCString!(char*)(uri));
18093 static auto opCall(AT0)(AT0 /*char*/ uri) {
18094 return gtk_link_button_new(toCString!(char*)(uri));
18097 // VERSION: 2.10
18098 // Creates a new #GtkLinkButton containing a label.
18099 // RETURNS: a new link button widget.
18100 // <uri>: a valid URI
18101 // <label>: the text of the button
18102 static LinkButton* new_with_label(AT0, AT1)(AT0 /*char*/ uri, AT1 /*char*/ label=null) nothrow {
18103 return gtk_link_button_new_with_label(toCString!(char*)(uri), toCString!(char*)(label));
18105 static auto opCall(AT0, AT1)(AT0 /*char*/ uri, AT1 /*char*/ label=null) {
18106 return gtk_link_button_new_with_label(toCString!(char*)(uri), toCString!(char*)(label));
18109 // Unintrospectable function: set_uri_hook() / gtk_link_button_set_uri_hook()
18110 // VERSION: 2.10
18111 // DEPRECATED (v2.24) function: set_uri_hook - Use the #GtkButton::clicked signal instead
18112 // Sets @func as the function that should be invoked every time a user clicks
18113 // a #GtkLinkButton. This function is called before every callback registered
18114 // for the "clicked" signal.
18116 // If no uri hook has been set, GTK+ defaults to calling gtk_show_uri().
18117 // RETURNS: the previously set hook function.
18118 // <func>: a function called each time a #GtkLinkButton is clicked, or %NULL
18119 // <data>: user data to be passed to @func, or %NULL
18120 // <destroy>: a #GDestroyNotify that gets called when @data is no longer needed, or %NULL
18121 static LinkButtonUriFunc set_uri_hook(AT0)(LinkButtonUriFunc func=null, AT0 /*void*/ data=null, GLib2.DestroyNotify destroy=null) nothrow {
18122 return gtk_link_button_set_uri_hook(func, UpCast!(void*)(data), destroy);
18125 // VERSION: 2.10
18126 // Retrieves the URI set using gtk_link_button_set_uri().
18128 // and should not be modified or freed.
18129 // RETURNS: a valid URI. The returned string is owned by the link button
18130 char* get_uri()() nothrow {
18131 return gtk_link_button_get_uri(&this);
18134 // VERSION: 2.14
18135 // Retrieves the 'visited' state of the URI where the #GtkLinkButton
18136 // points. The button becomes visited when it is clicked. If the URI
18137 // is changed on the button, the 'visited' state is unset again.
18139 // The state may also be changed using gtk_link_button_set_visited().
18140 // RETURNS: %TRUE if the link has been visited, %FALSE otherwise
18141 int get_visited()() nothrow {
18142 return gtk_link_button_get_visited(&this);
18145 // VERSION: 2.10
18146 // Sets @uri as the URI where the #GtkLinkButton points. As a side-effect
18147 // this unsets the 'visited' state of the button.
18148 // <uri>: a valid URI
18149 void set_uri(AT0)(AT0 /*char*/ uri) nothrow {
18150 gtk_link_button_set_uri(&this, toCString!(char*)(uri));
18153 // VERSION: 2.14
18154 // Sets the 'visited' state of the URI where the #GtkLinkButton
18155 // points. See gtk_link_button_get_visited() for more details.
18156 // <visited>: the new 'visited' state
18157 void set_visited()(int visited) nothrow {
18158 gtk_link_button_set_visited(&this, visited);
18162 struct LinkButtonClass {
18163 ButtonClass parent_class;
18164 extern (C) void function () nothrow _gtk_padding1;
18165 extern (C) void function () nothrow _gtk_padding2;
18166 extern (C) void function () nothrow _gtk_padding3;
18167 extern (C) void function () nothrow _gtk_padding4;
18170 struct LinkButtonPrivate {
18173 extern (C) alias void function (LinkButton* button, char* link_, void* user_data) nothrow LinkButtonUriFunc;
18175 struct List /* : Container */ {
18176 mixin Atk.ImplementorIface.__interface__;
18177 mixin Buildable.__interface__;
18178 alias container this;
18179 alias container super_;
18180 Container container;
18181 GLib2.List* children, selection, undo_selection_, undo_unselection;
18182 Widget* last_focus_child, undo_focus_child;
18183 uint htimer, vtimer;
18184 int anchor, drag_pos;
18185 StateType anchor_state;
18186 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18187 uint, "selection_mode", 2,
18188 uint, "drag_selection", 1,
18189 uint, "add_mode", 1,
18190 uint, "__dummy32A", 28));
18192 static List* new_()() nothrow {
18193 return gtk_list_new();
18195 static auto opCall()() {
18196 return gtk_list_new();
18198 // Unintrospectable method: append_items() / gtk_list_append_items()
18199 void append_items(AT0)(AT0 /*GLib2.List*/ items) nothrow {
18200 gtk_list_append_items(&this, UpCast!(GLib2.List*)(items));
18202 int child_position(AT0)(AT0 /*Widget*/ child) nothrow {
18203 return gtk_list_child_position(&this, UpCast!(Widget*)(child));
18205 void clear_items()(int start, int end) nothrow {
18206 gtk_list_clear_items(&this, start, end);
18208 void end_drag_selection()() nothrow {
18209 gtk_list_end_drag_selection(&this);
18211 void end_selection()() nothrow {
18212 gtk_list_end_selection(&this);
18214 void extend_selection()(ScrollType scroll_type, float position, int auto_start_selection) nothrow {
18215 gtk_list_extend_selection(&this, scroll_type, position, auto_start_selection);
18217 // Unintrospectable method: insert_items() / gtk_list_insert_items()
18218 void insert_items(AT0)(AT0 /*GLib2.List*/ items, int position) nothrow {
18219 gtk_list_insert_items(&this, UpCast!(GLib2.List*)(items), position);
18221 // Unintrospectable method: prepend_items() / gtk_list_prepend_items()
18222 void prepend_items(AT0)(AT0 /*GLib2.List*/ items) nothrow {
18223 gtk_list_prepend_items(&this, UpCast!(GLib2.List*)(items));
18225 // Unintrospectable method: remove_items() / gtk_list_remove_items()
18226 void remove_items(AT0)(AT0 /*GLib2.List*/ items) nothrow {
18227 gtk_list_remove_items(&this, UpCast!(GLib2.List*)(items));
18229 // Unintrospectable method: remove_items_no_unref() / gtk_list_remove_items_no_unref()
18230 void remove_items_no_unref(AT0)(AT0 /*GLib2.List*/ items) nothrow {
18231 gtk_list_remove_items_no_unref(&this, UpCast!(GLib2.List*)(items));
18233 void scroll_horizontal()(ScrollType scroll_type, float position) nothrow {
18234 gtk_list_scroll_horizontal(&this, scroll_type, position);
18236 void scroll_vertical()(ScrollType scroll_type, float position) nothrow {
18237 gtk_list_scroll_vertical(&this, scroll_type, position);
18239 void select_all()() nothrow {
18240 gtk_list_select_all(&this);
18242 void select_child(AT0)(AT0 /*Widget*/ child) nothrow {
18243 gtk_list_select_child(&this, UpCast!(Widget*)(child));
18245 void select_item()(int item) nothrow {
18246 gtk_list_select_item(&this, item);
18248 void set_selection_mode()(SelectionMode mode) nothrow {
18249 gtk_list_set_selection_mode(&this, mode);
18251 void start_selection()() nothrow {
18252 gtk_list_start_selection(&this);
18254 void toggle_add_mode()() nothrow {
18255 gtk_list_toggle_add_mode(&this);
18257 void toggle_focus_row()() nothrow {
18258 gtk_list_toggle_focus_row(&this);
18260 void toggle_row(AT0)(AT0 /*Widget*/ item) nothrow {
18261 gtk_list_toggle_row(&this, UpCast!(Widget*)(item));
18263 void undo_selection()() nothrow {
18264 gtk_list_undo_selection(&this);
18266 void unselect_all()() nothrow {
18267 gtk_list_unselect_all(&this);
18269 void unselect_child(AT0)(AT0 /*Widget*/ child) nothrow {
18270 gtk_list_unselect_child(&this, UpCast!(Widget*)(child));
18272 void unselect_item()(int item) nothrow {
18273 gtk_list_unselect_item(&this, item);
18275 extern (C) alias static void function (List* this_, Widget* object, void* user_data=null) nothrow signal_select_child;
18277 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18278 return super_.signal_connect!name(cb, data, cf);
18281 ulong signal_connect(string name:"select-child", CB/*:signal_select_child*/)
18282 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18283 if (is(typeof(cb)==signal_select_child)||_ttmm!(CB, signal_select_child)()) {
18284 return signal_connect_data!()(&this, cast(char*)"select-child",
18285 cast(GObject2.Callback)cb, data, null, cf);
18287 extern (C) alias static void function (List* this_, void* user_data=null) nothrow signal_selection_changed;
18288 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)
18289 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18290 if (is(typeof(cb)==signal_selection_changed)||_ttmm!(CB, signal_selection_changed)()) {
18291 return signal_connect_data!()(&this, cast(char*)"selection-changed",
18292 cast(GObject2.Callback)cb, data, null, cf);
18294 extern (C) alias static void function (List* this_, Widget* object, void* user_data=null) nothrow signal_unselect_child;
18295 ulong signal_connect(string name:"unselect-child", CB/*:signal_unselect_child*/)
18296 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18297 if (is(typeof(cb)==signal_unselect_child)||_ttmm!(CB, signal_unselect_child)()) {
18298 return signal_connect_data!()(&this, cast(char*)"unselect-child",
18299 cast(GObject2.Callback)cb, data, null, cf);
18303 struct ListClass {
18304 ContainerClass parent_class;
18305 extern (C) void function (List* list) nothrow selection_changed;
18306 extern (C) void function (List* list, Widget* child) nothrow select_child;
18307 extern (C) void function (List* list, Widget* child) nothrow unselect_child;
18310 struct ListItem /* : Item */ {
18311 mixin Atk.ImplementorIface.__interface__;
18312 mixin Buildable.__interface__;
18313 alias item this;
18314 alias item super_;
18315 Item item;
18317 static ListItem* new_()() nothrow {
18318 return gtk_list_item_new();
18320 static auto opCall()() {
18321 return gtk_list_item_new();
18323 static ListItem* new_with_label(AT0)(AT0 /*char*/ label) nothrow {
18324 return gtk_list_item_new_with_label(toCString!(char*)(label));
18326 static auto opCall(AT0)(AT0 /*char*/ label) {
18327 return gtk_list_item_new_with_label(toCString!(char*)(label));
18329 void deselect()() nothrow {
18330 gtk_list_item_deselect(&this);
18332 void select()() nothrow {
18333 gtk_list_item_select(&this);
18335 extern (C) alias static void function (ListItem* this_, void* user_data=null) nothrow signal_end_selection;
18337 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18338 return super_.signal_connect!name(cb, data, cf);
18341 ulong signal_connect(string name:"end-selection", CB/*:signal_end_selection*/)
18342 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18343 if (is(typeof(cb)==signal_end_selection)||_ttmm!(CB, signal_end_selection)()) {
18344 return signal_connect_data!()(&this, cast(char*)"end-selection",
18345 cast(GObject2.Callback)cb, data, null, cf);
18347 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, c_int p1, void* user_data=null) nothrow signal_extend_selection;
18348 ulong signal_connect(string name:"extend-selection", CB/*:signal_extend_selection*/)
18349 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18350 if (is(typeof(cb)==signal_extend_selection)||_ttmm!(CB, signal_extend_selection)()) {
18351 return signal_connect_data!()(&this, cast(char*)"extend-selection",
18352 cast(GObject2.Callback)cb, data, null, cf);
18354 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, void* user_data=null) nothrow signal_scroll_horizontal;
18355 ulong signal_connect(string name:"scroll-horizontal", CB/*:signal_scroll_horizontal*/)
18356 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18357 if (is(typeof(cb)==signal_scroll_horizontal)||_ttmm!(CB, signal_scroll_horizontal)()) {
18358 return signal_connect_data!()(&this, cast(char*)"scroll-horizontal",
18359 cast(GObject2.Callback)cb, data, null, cf);
18361 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, void* user_data=null) nothrow signal_scroll_vertical;
18362 ulong signal_connect(string name:"scroll-vertical", CB/*:signal_scroll_vertical*/)
18363 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18364 if (is(typeof(cb)==signal_scroll_vertical)||_ttmm!(CB, signal_scroll_vertical)()) {
18365 return signal_connect_data!()(&this, cast(char*)"scroll-vertical",
18366 cast(GObject2.Callback)cb, data, null, cf);
18368 extern (C) alias static void function (ListItem* this_, void* user_data=null) nothrow signal_select_all;
18369 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)
18370 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18371 if (is(typeof(cb)==signal_select_all)||_ttmm!(CB, signal_select_all)()) {
18372 return signal_connect_data!()(&this, cast(char*)"select-all",
18373 cast(GObject2.Callback)cb, data, null, cf);
18375 extern (C) alias static void function (ListItem* this_, void* user_data=null) nothrow signal_start_selection;
18376 ulong signal_connect(string name:"start-selection", CB/*:signal_start_selection*/)
18377 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18378 if (is(typeof(cb)==signal_start_selection)||_ttmm!(CB, signal_start_selection)()) {
18379 return signal_connect_data!()(&this, cast(char*)"start-selection",
18380 cast(GObject2.Callback)cb, data, null, cf);
18382 extern (C) alias static void function (ListItem* this_, void* user_data=null) nothrow signal_toggle_add_mode;
18383 ulong signal_connect(string name:"toggle-add-mode", CB/*:signal_toggle_add_mode*/)
18384 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18385 if (is(typeof(cb)==signal_toggle_add_mode)||_ttmm!(CB, signal_toggle_add_mode)()) {
18386 return signal_connect_data!()(&this, cast(char*)"toggle-add-mode",
18387 cast(GObject2.Callback)cb, data, null, cf);
18389 extern (C) alias static void function (ListItem* this_, void* user_data=null) nothrow signal_toggle_focus_row;
18390 ulong signal_connect(string name:"toggle-focus-row", CB/*:signal_toggle_focus_row*/)
18391 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18392 if (is(typeof(cb)==signal_toggle_focus_row)||_ttmm!(CB, signal_toggle_focus_row)()) {
18393 return signal_connect_data!()(&this, cast(char*)"toggle-focus-row",
18394 cast(GObject2.Callback)cb, data, null, cf);
18396 extern (C) alias static void function (ListItem* this_, void* user_data=null) nothrow signal_undo_selection;
18397 ulong signal_connect(string name:"undo-selection", CB/*:signal_undo_selection*/)
18398 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18399 if (is(typeof(cb)==signal_undo_selection)||_ttmm!(CB, signal_undo_selection)()) {
18400 return signal_connect_data!()(&this, cast(char*)"undo-selection",
18401 cast(GObject2.Callback)cb, data, null, cf);
18403 extern (C) alias static void function (ListItem* this_, void* user_data=null) nothrow signal_unselect_all;
18404 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)
18405 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18406 if (is(typeof(cb)==signal_unselect_all)||_ttmm!(CB, signal_unselect_all)()) {
18407 return signal_connect_data!()(&this, cast(char*)"unselect-all",
18408 cast(GObject2.Callback)cb, data, null, cf);
18412 struct ListItemClass {
18413 ItemClass parent_class;
18414 extern (C) void function (ListItem* list_item) nothrow toggle_focus_row;
18415 extern (C) void function (ListItem* list_item) nothrow select_all;
18416 extern (C) void function (ListItem* list_item) nothrow unselect_all;
18417 extern (C) void function (ListItem* list_item) nothrow undo_selection;
18418 extern (C) void function (ListItem* list_item) nothrow start_selection;
18419 extern (C) void function (ListItem* list_item) nothrow end_selection;
18420 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position, int auto_start_selection) nothrow extend_selection;
18421 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position) nothrow scroll_horizontal;
18422 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position) nothrow scroll_vertical;
18423 extern (C) void function (ListItem* list_item) nothrow toggle_add_mode;
18426 struct ListStore /* : GObject.Object */ {
18427 mixin Buildable.__interface__;
18428 mixin TreeDragDest.__interface__;
18429 mixin TreeDragSource.__interface__;
18430 mixin TreeModel.__interface__;
18431 mixin TreeSortable.__interface__;
18432 alias parent this;
18433 alias parent super_;
18434 alias parent object;
18435 GObject2.Object parent;
18436 private int stamp;
18437 private void* seq, _gtk_reserved1;
18438 private GLib2.List* sort_list;
18439 private int n_columns, sort_column_id;
18440 private SortType order;
18441 private Type* column_headers;
18442 private int length;
18443 private TreeIterCompareFunc default_sort_func;
18444 private void* default_sort_data;
18445 private GLib2.DestroyNotify default_sort_destroy;
18446 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18447 uint, "columns_dirty", 1,
18448 uint, "__dummy32A", 31));
18451 // Unintrospectable constructor: new() / gtk_list_store_new()
18452 // Creates a new list store as with @n_columns columns each of the types passed
18453 // in. Note that only types derived from standard GObject fundamental types
18454 // are supported.
18456 // As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
18457 // GDK_TYPE_PIXBUF);</literal> will create a new #GtkListStore with three columns, of type
18458 // int, string and #GdkPixbuf respectively.
18459 // RETURNS: a new #GtkListStore
18460 // <n_columns>: number of columns in the list store
18461 alias gtk_list_store_new new_; // Variadic
18463 // Non-vararg creation function. Used primarily by language bindings.
18464 // RETURNS: a new #GtkListStore
18465 // <n_columns>: number of columns in the list store
18466 // <types>: an array of #GType types for the columns, from first to last
18467 static ListStore* newv(AT0)(int n_columns, AT0 /*Type*/ types) nothrow {
18468 return gtk_list_store_newv(n_columns, UpCast!(Type*)(types));
18470 static auto opCall(AT0)(int n_columns, AT0 /*Type*/ types) {
18471 return gtk_list_store_newv(n_columns, UpCast!(Type*)(types));
18474 // Appends a new row to @list_store. @iter will be changed to point to this new
18475 // row. The row will be empty after this function is called. To fill in
18476 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
18477 // <iter>: An unset #GtkTreeIter to set to the appended row
18478 void append(AT0)(/*out*/ AT0 /*TreeIter*/ iter) nothrow {
18479 gtk_list_store_append(&this, UpCast!(TreeIter*)(iter));
18481 // Removes all rows from the list store.
18482 void clear()() nothrow {
18483 gtk_list_store_clear(&this);
18486 // Creates a new row at @position. @iter will be changed to point to this new
18487 // row. If @position is larger than the number of rows on the list, then the
18488 // new row will be appended to the list. The row will be empty after this
18489 // function is called. To fill in values, you need to call
18490 // gtk_list_store_set() or gtk_list_store_set_value().
18491 // <iter>: An unset #GtkTreeIter to set to the new row
18492 // <position>: position to insert the new row
18493 void insert(AT0)(/*out*/ AT0 /*TreeIter*/ iter, int position) nothrow {
18494 gtk_list_store_insert(&this, UpCast!(TreeIter*)(iter), position);
18497 // Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
18498 // prepended to the beginning of the list. @iter will be changed to point to
18499 // this new row. The row will be empty after this function is called. To fill
18500 // in values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
18501 // <iter>: An unset #GtkTreeIter to set to the new row
18502 // <sibling>: A valid #GtkTreeIter, or %NULL
18503 void insert_after(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ sibling=null) nothrow {
18504 gtk_list_store_insert_after(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(sibling));
18507 // Inserts a new row before @sibling. If @sibling is %NULL, then the row will
18508 // be appended to the end of the list. @iter will be changed to point to this
18509 // new row. The row will be empty after this function is called. To fill in
18510 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
18511 // <iter>: An unset #GtkTreeIter to set to the new row
18512 // <sibling>: A valid #GtkTreeIter, or %NULL
18513 void insert_before(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ sibling=null) nothrow {
18514 gtk_list_store_insert_before(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(sibling));
18517 // Unintrospectable method: insert_with_values() / gtk_list_store_insert_with_values()
18518 // VERSION: 2.6
18519 // Creates a new row at @position. @iter will be changed to point to this new
18520 // row. If @position is larger than the number of rows on the list, then the
18521 // new row will be appended to the list. The row will be filled with the
18522 // values given to this function.
18524 // Calling
18525 // <literal>gtk_list_store_insert_with_values(list_store, iter, position...)</literal>
18526 // has the same effect as calling
18527 // |[
18528 // gtk_list_store_insert (list_store, iter, position);
18529 // gtk_list_store_set (list_store, iter, ...);
18530 // ]|
18531 // with the difference that the former will only emit a row_inserted signal,
18532 // while the latter will emit row_inserted, row_changed and, if the list store
18533 // is sorted, rows_reordered. Since emitting the rows_reordered signal
18534 // repeatedly can affect the performance of the program,
18535 // gtk_list_store_insert_with_values() should generally be preferred when
18536 // inserting rows in a sorted list store.
18537 // <iter>: An unset #GtkTreeIter to set to the new row, or %NULL.
18538 // <position>: position to insert the new row
18539 /+ Not available -- variadic methods unsupported - use the C function directly.
18540 alias gtk_list_store_insert_with_values insert_with_values; // Variadic
18543 // VERSION: 2.6
18544 // A variant of gtk_list_store_insert_with_values() which
18545 // takes the columns and values as two arrays, instead of
18546 // varargs. This function is mainly intended for
18547 // language-bindings.
18548 // <iter>: An unset #GtkTreeIter to set to the new row, or %NULL.
18549 // <position>: position to insert the new row
18550 // <columns>: an array of column numbers
18551 // <values>: an array of GValues
18552 // <n_values>: the length of the @columns and @values arrays
18553 void insert_with_valuesv(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, int position, int* columns, AT1 /*GObject2.Value*/ values, int n_values) nothrow {
18554 gtk_list_store_insert_with_valuesv(&this, UpCast!(TreeIter*)(iter), position, columns, UpCast!(GObject2.Value*)(values), n_values);
18557 // VERSION: 2.2
18558 // <warning>This function is slow. Only use it for debugging and/or testing
18559 // purposes.</warning>
18561 // Checks if the given iter is a valid iter for this #GtkListStore.
18562 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
18563 // <iter>: A #GtkTreeIter.
18564 int iter_is_valid(AT0)(AT0 /*TreeIter*/ iter) nothrow {
18565 return gtk_list_store_iter_is_valid(&this, UpCast!(TreeIter*)(iter));
18568 // VERSION: 2.2
18569 // Moves @iter in @store to the position after @position. Note that this
18570 // function only works with unsorted stores. If @position is %NULL, @iter
18571 // will be moved to the start of the list.
18572 // <iter>: A #GtkTreeIter.
18573 // <position>: A #GtkTreeIter or %NULL.
18574 void move_after(AT0, AT1)(AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ position=null) nothrow {
18575 gtk_list_store_move_after(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(position));
18578 // VERSION: 2.2
18579 // Moves @iter in @store to the position before @position. Note that this
18580 // function only works with unsorted stores. If @position is %NULL, @iter
18581 // will be moved to the end of the list.
18582 // <iter>: A #GtkTreeIter.
18583 // <position>: A #GtkTreeIter, or %NULL.
18584 void move_before(AT0, AT1)(AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ position=null) nothrow {
18585 gtk_list_store_move_before(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(position));
18588 // Prepends a new row to @list_store. @iter will be changed to point to this new
18589 // row. The row will be empty after this function is called. To fill in
18590 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
18591 // <iter>: An unset #GtkTreeIter to set to the prepend row
18592 void prepend(AT0)(/*out*/ AT0 /*TreeIter*/ iter) nothrow {
18593 gtk_list_store_prepend(&this, UpCast!(TreeIter*)(iter));
18596 // Removes the given row from the list store. After being removed,
18597 // @iter is set to be the next valid row, or invalidated if it pointed
18598 // to the last row in @list_store.
18599 // RETURNS: %TRUE if @iter is valid, %FALSE if not.
18600 // <iter>: A valid #GtkTreeIter
18601 int remove(AT0)(AT0 /*TreeIter*/ iter) nothrow {
18602 return gtk_list_store_remove(&this, UpCast!(TreeIter*)(iter));
18605 // VERSION: 2.2
18606 // Reorders @store to follow the order indicated by @new_order. Note that
18607 // this function only works with unsorted stores.
18608 // <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>.
18609 void reorder()(int* new_order) nothrow {
18610 gtk_list_store_reorder(&this, new_order);
18613 // Unintrospectable method: set() / gtk_list_store_set()
18614 // Sets the value of one or more cells in the row referenced by @iter.
18615 // The variable argument list should contain integer column numbers,
18616 // each column number followed by the value to be set.
18617 // The list is terminated by a -1. For example, to set column 0 with type
18618 // %G_TYPE_STRING to "Foo", you would write <literal>gtk_list_store_set (store, iter,
18619 // 0, "Foo", -1)</literal>.
18621 // The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
18622 // will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
18623 // <iter>: row iterator
18624 /+ Not available -- variadic methods unsupported - use the C function directly.
18625 alias gtk_list_store_set set; // Variadic
18628 // This function is meant primarily for #GObjects that inherit from #GtkListStore,
18629 // and should only be used when constructing a new #GtkListStore. It will not
18630 // function after a row has been added, or a method on the #GtkTreeModel
18631 // interface is called.
18632 // <n_columns>: Number of columns for the list store
18633 // <types>: An array length n of #GTypes
18634 void set_column_types(AT0)(int n_columns, AT0 /*Type*/ types) nothrow {
18635 gtk_list_store_set_column_types(&this, n_columns, UpCast!(Type*)(types));
18638 // Unintrospectable method: set_valist() / gtk_list_store_set_valist()
18639 // See gtk_list_store_set(); this version takes a va_list for use by language
18640 // bindings.
18641 // <iter>: A valid #GtkTreeIter for the row being modified
18642 // <var_args>: va_list of column/value pairs
18643 void set_valist(AT0)(AT0 /*TreeIter*/ iter, va_list var_args) nothrow {
18644 gtk_list_store_set_valist(&this, UpCast!(TreeIter*)(iter), var_args);
18647 // Sets the data in the cell specified by @iter and @column.
18648 // The type of @value must be convertible to the type of the
18649 // column.
18650 // <iter>: A valid #GtkTreeIter for the row being modified
18651 // <column>: column number to modify
18652 // <value>: new value for the cell
18653 void set_value(AT0, AT1)(AT0 /*TreeIter*/ iter, int column, AT1 /*GObject2.Value*/ value) nothrow {
18654 gtk_list_store_set_value(&this, UpCast!(TreeIter*)(iter), column, UpCast!(GObject2.Value*)(value));
18657 // VERSION: 2.12
18658 // A variant of gtk_list_store_set_valist() which
18659 // takes the columns and values as two arrays, instead of
18660 // varargs. This function is mainly intended for
18661 // language-bindings and in case the number of columns to
18662 // change is not known until run-time.
18663 // <iter>: A valid #GtkTreeIter for the row being modified
18664 // <columns>: an array of column numbers
18665 // <values>: an array of GValues
18666 // <n_values>: the length of the @columns and @values arrays
18667 void set_valuesv(AT0, AT1)(AT0 /*TreeIter*/ iter, int* columns, AT1 /*GObject2.Value*/ values, int n_values) nothrow {
18668 gtk_list_store_set_valuesv(&this, UpCast!(TreeIter*)(iter), columns, UpCast!(GObject2.Value*)(values), n_values);
18671 // VERSION: 2.2
18672 // Swaps @a and @b in @store. Note that this function only works with
18673 // unsorted stores.
18674 // <a>: A #GtkTreeIter.
18675 // <b>: Another #GtkTreeIter.
18676 void swap(AT0, AT1)(AT0 /*TreeIter*/ a, AT1 /*TreeIter*/ b) nothrow {
18677 gtk_list_store_swap(&this, UpCast!(TreeIter*)(a), UpCast!(TreeIter*)(b));
18681 struct ListStoreClass {
18682 GObject2.ObjectClass parent_class;
18683 extern (C) void function () nothrow _gtk_reserved1;
18684 extern (C) void function () nothrow _gtk_reserved2;
18685 extern (C) void function () nothrow _gtk_reserved3;
18686 extern (C) void function () nothrow _gtk_reserved4;
18689 enum int MAJOR_VERSION = 2;
18690 enum int MAX_COMPOSE_LEN = 7;
18691 enum int MICRO_VERSION = 10;
18692 enum int MINOR_VERSION = 24;
18693 enum MatchType {
18694 ALL = 0,
18695 ALL_TAIL = 1,
18696 HEAD = 2,
18697 TAIL = 3,
18698 EXACT = 4,
18699 LAST = 5
18701 struct Menu /* : MenuShell */ {
18702 mixin Atk.ImplementorIface.__interface__;
18703 mixin Buildable.__interface__;
18704 alias menu_shell this;
18705 alias menu_shell super_;
18706 alias menu_shell menushell;
18707 MenuShell menu_shell;
18708 Widget* parent_menu_item, old_active_menu_item;
18709 AccelGroup* accel_group;
18710 char* accel_path;
18711 MenuPositionFunc position_func;
18712 void* position_func_data;
18713 uint toggle_size;
18714 Widget* toplevel, tearoff_window, tearoff_hbox, tearoff_scrollbar;
18715 Adjustment* tearoff_adjustment;
18716 Gdk2.Window* view_window, bin_window;
18717 int scroll_offset, saved_scroll_offset, scroll_step;
18718 uint timeout_id;
18719 Gdk2.Region* navigation_region;
18720 uint navigation_timeout;
18721 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18722 uint, "needs_destruction_ref_count", 1,
18723 uint, "torn_off", 1,
18724 uint, "tearoff_active", 1,
18725 uint, "scroll_fast", 1,
18726 uint, "upper_arrow_visible", 1,
18727 uint, "lower_arrow_visible", 1,
18728 uint, "upper_arrow_prelight", 1,
18729 uint, "lower_arrow_prelight", 1,
18730 uint, "__dummy32A", 24));
18732 static Menu* new_()() nothrow {
18733 return gtk_menu_new();
18735 static auto opCall()() {
18736 return gtk_menu_new();
18739 // VERSION: 2.6
18740 // Returns a list of the menus which are attached to this widget.
18741 // This list is owned by GTK+ and must not be modified.
18742 // RETURNS: the list of menus attached to his widget.
18743 // <widget>: a #GtkWidget
18744 static GLib2.List* get_for_attach_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
18745 return gtk_menu_get_for_attach_widget(UpCast!(Widget*)(widget));
18748 // VERSION: 2.4
18749 // Adds a new #GtkMenuItem to a (table) menu. The number of 'cells' that
18750 // an item will occupy is specified by @left_attach, @right_attach,
18751 // @top_attach and @bottom_attach. These each represent the leftmost,
18752 // rightmost, uppermost and lower column and row numbers of the table.
18753 // (Columns and rows are indexed from zero).
18755 // Note that this function is not related to gtk_menu_detach().
18756 // <child>: a #GtkMenuItem.
18757 // <left_attach>: The column number to attach the left side of the item to.
18758 // <right_attach>: The column number to attach the right side of the item to.
18759 // <top_attach>: The row number to attach the top of the item to.
18760 // <bottom_attach>: The row number to attach the bottom of the item to.
18761 void attach(AT0)(AT0 /*Widget*/ child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) nothrow {
18762 gtk_menu_attach(&this, UpCast!(Widget*)(child), left_attach, right_attach, top_attach, bottom_attach);
18764 // Unintrospectable method: attach_to_widget() / gtk_menu_attach_to_widget()
18765 void attach_to_widget(AT0)(AT0 /*Widget*/ attach_widget, MenuDetachFunc detacher) nothrow {
18766 gtk_menu_attach_to_widget(&this, UpCast!(Widget*)(attach_widget), detacher);
18768 void detach()() nothrow {
18769 gtk_menu_detach(&this);
18772 // Gets the #GtkAccelGroup which holds global accelerators for the
18773 // menu. See gtk_menu_set_accel_group().
18774 // RETURNS: the #GtkAccelGroup associated with the menu.
18775 AccelGroup* get_accel_group()() nothrow {
18776 return gtk_menu_get_accel_group(&this);
18779 // VERSION: 2.14
18780 // Retrieves the accelerator path set on the menu.
18781 // RETURNS: the accelerator path set on the menu.
18782 char* get_accel_path()() nothrow {
18783 return gtk_menu_get_accel_path(&this);
18786 // Returns the selected menu item from the menu. This is used by the
18787 // #GtkOptionMenu.
18789 // in the menu. If a selection has not yet been made, the
18790 // first menu item is selected.
18791 // RETURNS: the #GtkMenuItem that was last selected
18792 Widget* get_active()() nothrow {
18793 return gtk_menu_get_active(&this);
18796 // Returns the #GtkWidget that the menu is attached to.
18797 // RETURNS: the #GtkWidget that the menu is attached to
18798 Widget* get_attach_widget()() nothrow {
18799 return gtk_menu_get_attach_widget(&this);
18802 // VERSION: 2.14
18803 // Retrieves the number of the monitor on which to show the menu.
18805 // be popped up or -1, if no monitor has been set
18806 // RETURNS: the number of the monitor on which the menu should
18807 int get_monitor()() nothrow {
18808 return gtk_menu_get_monitor(&this);
18811 // VERSION: 2.18
18812 // Returns whether the menu reserves space for toggles and
18813 // icons, regardless of their actual presence.
18814 // RETURNS: Whether the menu reserves toggle space
18815 int get_reserve_toggle_size()() nothrow {
18816 return gtk_menu_get_reserve_toggle_size(&this);
18819 // Returns whether the menu is torn off. See
18820 // gtk_menu_set_tearoff_state ().
18821 // RETURNS: %TRUE if the menu is currently torn off.
18822 int get_tearoff_state()() nothrow {
18823 return gtk_menu_get_tearoff_state(&this);
18826 // Returns the title of the menu. See gtk_menu_set_title().
18828 // title set on it. This string is owned by the widget and should
18829 // not be modified or freed.
18830 // RETURNS: the title of the menu, or %NULL if the menu has no
18831 char* get_title()() nothrow {
18832 return gtk_menu_get_title(&this);
18834 void popdown()() nothrow {
18835 gtk_menu_popdown(&this);
18838 // Unintrospectable method: popup() / gtk_menu_popup()
18839 // Displays a menu and makes it available for selection. Applications can use
18840 // this function to display context-sensitive menus, and will typically supply
18841 // %NULL for the @parent_menu_shell, @parent_menu_item, @func and @data
18842 // parameters. The default menu positioning function will position the menu
18843 // at the current mouse cursor position.
18845 // The @button parameter should be the mouse button pressed to initiate
18846 // the menu popup. If the menu popup was initiated by something other than
18847 // a mouse button press, such as a mouse button release or a keypress,
18848 // @button should be 0.
18850 // The @activate_time parameter is used to conflict-resolve initiation of
18851 // concurrent requests for mouse/keyboard grab requests. To function
18852 // properly, this needs to be the time stamp of the user event (such as
18853 // a mouse click or key press) that caused the initiation of the popup.
18854 // Only if no such event is available, gtk_get_current_event_time() can
18855 // be used instead.
18856 // <parent_menu_shell>: the menu shell containing the triggering menu item, or %NULL
18857 // <parent_menu_item>: the menu item whose activation triggered the popup, or %NULL
18858 // <func>: a user supplied function used to position the menu, or %NULL
18859 // <data>: user supplied data to be passed to @func.
18860 // <button>: the mouse button which was pressed to initiate the event.
18861 // <activate_time>: the time at which the activation event occurred.
18862 void popup(AT0, AT1, AT2)(AT0 /*Widget*/ parent_menu_shell, AT1 /*Widget*/ parent_menu_item, MenuPositionFunc func, AT2 /*void*/ data, uint button, uint activate_time) nothrow {
18863 gtk_menu_popup(&this, UpCast!(Widget*)(parent_menu_shell), UpCast!(Widget*)(parent_menu_item), func, UpCast!(void*)(data), button, activate_time);
18865 void reorder_child(AT0)(AT0 /*Widget*/ child, int position) nothrow {
18866 gtk_menu_reorder_child(&this, UpCast!(Widget*)(child), position);
18868 void reposition()() nothrow {
18869 gtk_menu_reposition(&this);
18871 void set_accel_group(AT0)(AT0 /*AccelGroup*/ accel_group=null) nothrow {
18872 gtk_menu_set_accel_group(&this, UpCast!(AccelGroup*)(accel_group));
18875 // Sets an accelerator path for this menu from which accelerator paths
18876 // for its immediate children, its menu items, can be constructed.
18877 // The main purpose of this function is to spare the programmer the
18878 // inconvenience of having to call gtk_menu_item_set_accel_path() on
18879 // each menu item that should support runtime user changable accelerators.
18880 // Instead, by just calling gtk_menu_set_accel_path() on their parent,
18881 // each menu item of this menu, that contains a label describing its purpose,
18882 // automatically gets an accel path assigned. For example, a menu containing
18883 // menu items "New" and "Exit", will, after
18884 // <literal>gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</literal>
18885 // has been called, assign its items the accel paths:
18886 // <literal>"&lt;Gnumeric-Sheet&gt;/File/New"</literal> and <literal>"&lt;Gnumeric-Sheet&gt;/File/Exit"</literal>.
18887 // Assigning accel paths to menu items then enables the user to change
18888 // their accelerators at runtime. More details about accelerator paths
18889 // and their default setups can be found at gtk_accel_map_add_entry().
18891 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
18892 // pass a static string, you can save some memory by interning it first with
18893 // g_intern_static_string().
18894 // <accel_path>: a valid accelerator path
18895 void set_accel_path(AT0)(AT0 /*char*/ accel_path=null) nothrow {
18896 gtk_menu_set_accel_path(&this, toCString!(char*)(accel_path));
18898 void set_active()(uint index_) nothrow {
18899 gtk_menu_set_active(&this, index_);
18902 // VERSION: 2.4
18903 // Informs GTK+ on which monitor a menu should be popped up.
18904 // See gdk_screen_get_monitor_geometry().
18906 // This function should be called from a #GtkMenuPositionFunc if the
18907 // menu should not appear on the same monitor as the pointer. This
18908 // information can't be reliably inferred from the coordinates returned
18909 // by a #GtkMenuPositionFunc, since, for very long menus, these coordinates
18910 // may extend beyond the monitor boundaries or even the screen boundaries.
18911 // <monitor_num>: the number of the monitor on which the menu should be popped up
18912 void set_monitor()(int monitor_num) nothrow {
18913 gtk_menu_set_monitor(&this, monitor_num);
18916 // VERSION: 2.18
18917 // Sets whether the menu should reserve space for drawing toggles
18918 // or icons, regardless of their actual presence.
18919 // <reserve_toggle_size>: whether to reserve size for toggles
18920 void set_reserve_toggle_size()(int reserve_toggle_size) nothrow {
18921 gtk_menu_set_reserve_toggle_size(&this, reserve_toggle_size);
18924 // VERSION: 2.2
18925 // Sets the #GdkScreen on which the menu will be displayed.
18926 // <screen>: a #GdkScreen, or %NULL if the screen should be determined by the widget the menu is attached to.
18927 void set_screen(AT0)(AT0 /*Gdk2.Screen*/ screen=null) nothrow {
18928 gtk_menu_set_screen(&this, UpCast!(Gdk2.Screen*)(screen));
18930 void set_tearoff_state()(int torn_off) nothrow {
18931 gtk_menu_set_tearoff_state(&this, torn_off);
18934 // Sets the title string for the menu. The title is displayed when the menu
18935 // is shown as a tearoff menu. If @title is %NULL, the menu will see if it is
18936 // attached to a parent menu item, and if so it will try to use the same text as
18937 // that menu item's label.
18938 // <title>: a string containing the title for the menu.
18939 void set_title(AT0)(AT0 /*char*/ title) nothrow {
18940 gtk_menu_set_title(&this, toCString!(char*)(title));
18942 extern (C) alias static void function (Menu* this_, ScrollType* object, void* user_data=null) nothrow signal_move_scroll;
18944 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18945 return super_.signal_connect!name(cb, data, cf);
18948 ulong signal_connect(string name:"move-scroll", CB/*:signal_move_scroll*/)
18949 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
18950 if (is(typeof(cb)==signal_move_scroll)||_ttmm!(CB, signal_move_scroll)()) {
18951 return signal_connect_data!()(&this, cast(char*)"move-scroll",
18952 cast(GObject2.Callback)cb, data, null, cf);
18956 struct MenuBar /* : MenuShell */ {
18957 mixin Atk.ImplementorIface.__interface__;
18958 mixin Buildable.__interface__;
18959 alias menu_shell this;
18960 alias menu_shell super_;
18961 alias menu_shell menushell;
18962 MenuShell menu_shell;
18964 static MenuBar* new_()() nothrow {
18965 return gtk_menu_bar_new();
18967 static auto opCall()() {
18968 return gtk_menu_bar_new();
18971 // VERSION: 2.8
18972 // Retrieves the current child pack direction of the menubar.
18973 // See gtk_menu_bar_set_child_pack_direction().
18974 // RETURNS: the child pack direction
18975 PackDirection get_child_pack_direction()() nothrow {
18976 return gtk_menu_bar_get_child_pack_direction(&this);
18979 // VERSION: 2.8
18980 // Retrieves the current pack direction of the menubar.
18981 // See gtk_menu_bar_set_pack_direction().
18982 // RETURNS: the pack direction
18983 PackDirection get_pack_direction()() nothrow {
18984 return gtk_menu_bar_get_pack_direction(&this);
18987 // VERSION: 2.8
18988 // Sets how widgets should be packed inside the children of a menubar.
18989 // <child_pack_dir>: a new #GtkPackDirection
18990 void set_child_pack_direction()(PackDirection child_pack_dir) nothrow {
18991 gtk_menu_bar_set_child_pack_direction(&this, child_pack_dir);
18994 // VERSION: 2.8
18995 // Sets how items should be packed inside a menubar.
18996 // <pack_dir>: a new #GtkPackDirection
18997 void set_pack_direction()(PackDirection pack_dir) nothrow {
18998 gtk_menu_bar_set_pack_direction(&this, pack_dir);
19002 struct MenuBarClass {
19003 MenuShellClass parent_class;
19004 extern (C) void function () nothrow _gtk_reserved1;
19005 extern (C) void function () nothrow _gtk_reserved2;
19006 extern (C) void function () nothrow _gtk_reserved3;
19007 extern (C) void function () nothrow _gtk_reserved4;
19010 extern (C) alias void function (Widget* widget, void* user_data) nothrow MenuCallback;
19012 struct MenuClass {
19013 MenuShellClass parent_class;
19014 extern (C) void function () nothrow _gtk_reserved1;
19015 extern (C) void function () nothrow _gtk_reserved2;
19016 extern (C) void function () nothrow _gtk_reserved3;
19017 extern (C) void function () nothrow _gtk_reserved4;
19020 extern (C) alias void function (Widget* attach_widget, Menu* menu) nothrow MenuDetachFunc;
19022 enum MenuDirectionType {
19023 PARENT = 0,
19024 CHILD = 1,
19025 NEXT = 2,
19026 PREV = 3
19028 struct MenuEntry {
19029 char* path, accelerator;
19030 MenuCallback callback;
19031 void* callback_data;
19032 Widget* widget;
19035 struct MenuItem /* : Item */ {
19036 mixin Atk.ImplementorIface.__interface__;
19037 mixin Activatable.__interface__;
19038 mixin Buildable.__interface__;
19039 alias item this;
19040 alias item super_;
19041 Item item;
19042 Widget* submenu;
19043 Gdk2.Window* event_window;
19044 ushort toggle_size, accelerator_width;
19045 char* accel_path;
19046 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19047 uint, "show_submenu_indicator", 1,
19048 uint, "submenu_placement", 1,
19049 uint, "submenu_direction", 1,
19050 uint, "right_justify", 1,
19051 uint, "timer_from_keypress", 1,
19052 uint, "from_menubar", 1,
19053 uint, "__dummy32A", 26));
19054 uint timer;
19056 static MenuItem* new_()() nothrow {
19057 return gtk_menu_item_new();
19059 static auto opCall()() {
19060 return gtk_menu_item_new();
19062 static MenuItem* new_with_label(AT0)(AT0 /*char*/ label) nothrow {
19063 return gtk_menu_item_new_with_label(toCString!(char*)(label));
19065 static auto opCall(AT0)(AT0 /*char*/ label) {
19066 return gtk_menu_item_new_with_label(toCString!(char*)(label));
19069 // Creates a new #GtkMenuItem containing a label. The label
19070 // will be created using gtk_label_new_with_mnemonic(), so underscores
19071 // in @label indicate the mnemonic for the menu item.
19072 // RETURNS: a new #GtkMenuItem
19073 // <label>: The text of the button, with an underscore in front of the mnemonic character
19074 static MenuItem* new_with_mnemonic(AT0)(AT0 /*char*/ label) nothrow {
19075 return gtk_menu_item_new_with_mnemonic(toCString!(char*)(label));
19077 static auto opCall(AT0)(AT0 /*char*/ label) {
19078 return gtk_menu_item_new_with_mnemonic(toCString!(char*)(label));
19080 void activate()() nothrow {
19081 gtk_menu_item_activate(&this);
19083 void deselect()() nothrow {
19084 gtk_menu_item_deselect(&this);
19087 // VERSION: 2.14
19088 // Retrieve the accelerator path that was previously set on @menu_item.
19090 // See gtk_menu_item_set_accel_path() for details.
19092 // functionality, or %NULL if not set
19093 // RETURNS: the accelerator path corresponding to this menu item's
19094 char* get_accel_path()() nothrow {
19095 return gtk_menu_item_get_accel_path(&this);
19098 // VERSION: 2.16
19099 // Sets @text on the @menu_item label
19101 // string used by the label, and must not be modified.
19102 // RETURNS: The text in the @menu_item label. This is the internal
19103 char* get_label()() nothrow {
19104 return gtk_menu_item_get_label(&this);
19107 // Gets whether the menu item appears justified at the right
19108 // side of the menu bar.
19110 // far right if added to a menu bar.
19111 // RETURNS: %TRUE if the menu item will appear at the
19112 int get_right_justified()() nothrow {
19113 return gtk_menu_item_get_right_justified(&this);
19116 // Gets the submenu underneath this menu item, if any.
19117 // See gtk_menu_item_set_submenu().
19118 // RETURNS: submenu for this menu item, or %NULL if none.
19119 Widget* get_submenu()() nothrow {
19120 return gtk_menu_item_get_submenu(&this);
19123 // VERSION: 2.16
19124 // Checks if an underline in the text indicates the next character should be
19125 // used for the mnemonic accelerator key.
19127 // the mnemonic accelerator key.
19128 // RETURNS: %TRUE if an embedded underline in the label indicates
19129 int get_use_underline()() nothrow {
19130 return gtk_menu_item_get_use_underline(&this);
19133 // DEPRECATED (v2.12) method: remove_submenu - gtk_menu_item_remove_submenu() is deprecated and
19134 // Removes the widget's submenu.
19136 // should not be used in newly written code. Use
19137 // gtk_menu_item_set_submenu() instead.
19138 void remove_submenu()() nothrow {
19139 gtk_menu_item_remove_submenu(&this);
19141 void select()() nothrow {
19142 gtk_menu_item_select(&this);
19145 // Set the accelerator path on @menu_item, through which runtime changes of the
19146 // menu item's accelerator caused by the user can be identified and saved to
19147 // persistant storage (see gtk_accel_map_save() on this).
19148 // To setup a default accelerator for this menu item, call
19149 // gtk_accel_map_add_entry() with the same @accel_path.
19150 // See also gtk_accel_map_add_entry() on the specifics of accelerator paths,
19151 // and gtk_menu_set_accel_path() for a more convenient variant of this function.
19153 // This function is basically a convenience wrapper that handles calling
19154 // gtk_widget_set_accel_path() with the appropriate accelerator group for
19155 // the menu item.
19157 // Note that you do need to set an accelerator on the parent menu with
19158 // gtk_menu_set_accel_group() for this to work.
19160 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
19161 // pass a static string, you can save some memory by interning it first with
19162 // g_intern_static_string().
19163 // <accel_path>: accelerator path, corresponding to this menu item's functionality, or %NULL to unset the current path.
19164 void set_accel_path(AT0)(AT0 /*char*/ accel_path=null) nothrow {
19165 gtk_menu_item_set_accel_path(&this, toCString!(char*)(accel_path));
19168 // VERSION: 2.16
19169 // Sets @text on the @menu_item label
19170 // <label>: the text you want to set
19171 void set_label(AT0)(AT0 /*char*/ label) nothrow {
19172 gtk_menu_item_set_label(&this, toCString!(char*)(label));
19175 // Sets whether the menu item appears justified at the right
19176 // side of a menu bar. This was traditionally done for "Help" menu
19177 // items, but is now considered a bad idea. (If the widget
19178 // layout is reversed for a right-to-left language like Hebrew
19179 // or Arabic, right-justified-menu-items appear at the left.)
19180 // <right_justified>: if %TRUE the menu item will appear at the far right if added to a menu bar.
19181 void set_right_justified()(int right_justified) nothrow {
19182 gtk_menu_item_set_right_justified(&this, right_justified);
19185 // Sets or replaces the menu item's submenu, or removes it when a %NULL
19186 // submenu is passed.
19187 // <submenu>: the submenu, or %NULL
19188 void set_submenu(AT0)(AT0 /*Widget*/ submenu=null) nothrow {
19189 gtk_menu_item_set_submenu(&this, UpCast!(Widget*)(submenu));
19192 // VERSION: 2.16
19193 // If true, an underline in the text indicates the next character should be
19194 // used for the mnemonic accelerator key.
19195 // <setting>: %TRUE if underlines in the text indicate mnemonics
19196 void set_use_underline()(int setting) nothrow {
19197 gtk_menu_item_set_use_underline(&this, setting);
19199 void toggle_size_allocate()(int allocation) nothrow {
19200 gtk_menu_item_toggle_size_allocate(&this, allocation);
19202 void toggle_size_request()(int* requisition) nothrow {
19203 gtk_menu_item_toggle_size_request(&this, requisition);
19205 extern (C) alias static void function (MenuItem* this_, void* user_data=null) nothrow signal_activate;
19207 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19208 return super_.signal_connect!name(cb, data, cf);
19211 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
19212 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19213 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
19214 return signal_connect_data!()(&this, cast(char*)"activate",
19215 cast(GObject2.Callback)cb, data, null, cf);
19217 extern (C) alias static void function (MenuItem* this_, void* user_data=null) nothrow signal_activate_item;
19218 ulong signal_connect(string name:"activate-item", CB/*:signal_activate_item*/)
19219 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19220 if (is(typeof(cb)==signal_activate_item)||_ttmm!(CB, signal_activate_item)()) {
19221 return signal_connect_data!()(&this, cast(char*)"activate-item",
19222 cast(GObject2.Callback)cb, data, null, cf);
19224 extern (C) alias static void function (MenuItem* this_, int object, void* user_data=null) nothrow signal_toggle_size_allocate;
19225 ulong signal_connect(string name:"toggle-size-allocate", CB/*:signal_toggle_size_allocate*/)
19226 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19227 if (is(typeof(cb)==signal_toggle_size_allocate)||_ttmm!(CB, signal_toggle_size_allocate)()) {
19228 return signal_connect_data!()(&this, cast(char*)"toggle-size-allocate",
19229 cast(GObject2.Callback)cb, data, null, cf);
19231 extern (C) alias static void function (MenuItem* this_, void* object, void* user_data=null) nothrow signal_toggle_size_request;
19232 ulong signal_connect(string name:"toggle-size-request", CB/*:signal_toggle_size_request*/)
19233 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19234 if (is(typeof(cb)==signal_toggle_size_request)||_ttmm!(CB, signal_toggle_size_request)()) {
19235 return signal_connect_data!()(&this, cast(char*)"toggle-size-request",
19236 cast(GObject2.Callback)cb, data, null, cf);
19240 struct MenuItemClass {
19241 ItemClass parent_class;
19242 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19243 uint, "hide_on_activate", 1,
19244 uint, "__dummy32A", 31));
19245 extern (C) void function (MenuItem* menu_item) nothrow activate;
19246 extern (C) void function (MenuItem* menu_item) nothrow activate_item;
19247 extern (C) void function (MenuItem* menu_item, int* requisition) nothrow toggle_size_request;
19248 extern (C) void function (MenuItem* menu_item, int allocation) nothrow toggle_size_allocate;
19249 // <label>: the text you want to set
19250 extern (C) void function (MenuItem* menu_item, char* label) nothrow set_label;
19251 // RETURNS: The text in the @menu_item label. This is the internal
19252 extern (C) char* function (MenuItem* menu_item) nothrow get_label;
19253 extern (C) void function () nothrow _gtk_reserved1;
19254 extern (C) void function () nothrow _gtk_reserved2;
19257 extern (C) alias void function (Menu* menu, int* x, int* y, int* push_in, void* user_data) nothrow MenuPositionFunc;
19259 struct MenuShell /* : Container */ {
19260 mixin Atk.ImplementorIface.__interface__;
19261 mixin Buildable.__interface__;
19262 alias container this;
19263 alias container super_;
19264 Container container;
19265 GLib2.List* children;
19266 Widget* active_menu_item, parent_menu_shell;
19267 uint button;
19268 uint activate_time;
19269 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19270 uint, "active", 1,
19271 uint, "have_grab", 1,
19272 uint, "have_xgrab", 1,
19273 uint, "ignore_leave", 1,
19274 uint, "menu_flag", 1,
19275 uint, "ignore_enter", 1,
19276 uint, "keyboard_mode", 1,
19277 uint, "__dummy32A", 25));
19279 void activate_item(AT0)(AT0 /*Widget*/ menu_item, int force_deactivate) nothrow {
19280 gtk_menu_shell_activate_item(&this, UpCast!(Widget*)(menu_item), force_deactivate);
19282 void append(AT0)(AT0 /*Widget*/ child) nothrow {
19283 gtk_menu_shell_append(&this, UpCast!(Widget*)(child));
19286 // VERSION: 2.4
19287 // Cancels the selection within the menu shell.
19288 void cancel()() nothrow {
19289 gtk_menu_shell_cancel(&this);
19291 void deactivate()() nothrow {
19292 gtk_menu_shell_deactivate(&this);
19294 void deselect()() nothrow {
19295 gtk_menu_shell_deselect(&this);
19298 // VERSION: 2.8
19299 // Returns %TRUE if the menu shell will take the keyboard focus on popup.
19300 // RETURNS: %TRUE if the menu shell will take the keyboard focus on popup.
19301 int get_take_focus()() nothrow {
19302 return gtk_menu_shell_get_take_focus(&this);
19304 void insert(AT0)(AT0 /*Widget*/ child, int position) nothrow {
19305 gtk_menu_shell_insert(&this, UpCast!(Widget*)(child), position);
19307 void prepend(AT0)(AT0 /*Widget*/ child) nothrow {
19308 gtk_menu_shell_prepend(&this, UpCast!(Widget*)(child));
19311 // VERSION: 2.2
19312 // Select the first visible or selectable child of the menu shell;
19313 // don't select tearoff items unless the only item is a tearoff
19314 // item.
19315 // <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.
19316 void select_first()(int search_sensitive) nothrow {
19317 gtk_menu_shell_select_first(&this, search_sensitive);
19319 void select_item(AT0)(AT0 /*Widget*/ menu_item) nothrow {
19320 gtk_menu_shell_select_item(&this, UpCast!(Widget*)(menu_item));
19323 // VERSION: 2.8
19324 // If @take_focus is %TRUE (the default) the menu shell will take the keyboard
19325 // focus so that it will receive all keyboard events which is needed to enable
19326 // keyboard navigation in menus.
19328 // Setting @take_focus to %FALSE is useful only for special applications
19329 // like virtual keyboard implementations which should not take keyboard
19330 // focus.
19332 // The @take_focus state of a menu or menu bar is automatically propagated
19333 // to submenus whenever a submenu is popped up, so you don't have to worry
19334 // about recursively setting it for your entire menu hierarchy. Only when
19335 // programmatically picking a submenu and popping it up manually, the
19336 // @take_focus property of the submenu needs to be set explicitely.
19338 // Note that setting it to %FALSE has side-effects:
19340 // If the focus is in some other app, it keeps the focus and keynav in
19341 // the menu doesn't work. Consequently, keynav on the menu will only
19342 // work if the focus is on some toplevel owned by the onscreen keyboard.
19344 // To avoid confusing the user, menus with @take_focus set to %FALSE
19345 // should not display mnemonics or accelerators, since it cannot be
19346 // guaranteed that they will work.
19348 // See also gdk_keyboard_grab()
19349 // <take_focus>: %TRUE if the menu shell should take the keyboard focus on popup.
19350 void set_take_focus()(int take_focus) nothrow {
19351 gtk_menu_shell_set_take_focus(&this, take_focus);
19353 extern (C) alias static void function (MenuShell* this_, c_int object, void* user_data=null) nothrow signal_activate_current;
19355 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19356 return super_.signal_connect!name(cb, data, cf);
19359 ulong signal_connect(string name:"activate-current", CB/*:signal_activate_current*/)
19360 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19361 if (is(typeof(cb)==signal_activate_current)||_ttmm!(CB, signal_activate_current)()) {
19362 return signal_connect_data!()(&this, cast(char*)"activate-current",
19363 cast(GObject2.Callback)cb, data, null, cf);
19365 extern (C) alias static void function (MenuShell* this_, void* user_data=null) nothrow signal_cancel;
19366 ulong signal_connect(string name:"cancel", CB/*:signal_cancel*/)
19367 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19368 if (is(typeof(cb)==signal_cancel)||_ttmm!(CB, signal_cancel)()) {
19369 return signal_connect_data!()(&this, cast(char*)"cancel",
19370 cast(GObject2.Callback)cb, data, null, cf);
19372 extern (C) alias static void function (MenuShell* this_, DirectionType* object, void* user_data=null) nothrow signal_cycle_focus;
19373 ulong signal_connect(string name:"cycle-focus", CB/*:signal_cycle_focus*/)
19374 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19375 if (is(typeof(cb)==signal_cycle_focus)||_ttmm!(CB, signal_cycle_focus)()) {
19376 return signal_connect_data!()(&this, cast(char*)"cycle-focus",
19377 cast(GObject2.Callback)cb, data, null, cf);
19379 extern (C) alias static void function (MenuShell* this_, void* user_data=null) nothrow signal_deactivate;
19380 ulong signal_connect(string name:"deactivate", CB/*:signal_deactivate*/)
19381 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19382 if (is(typeof(cb)==signal_deactivate)||_ttmm!(CB, signal_deactivate)()) {
19383 return signal_connect_data!()(&this, cast(char*)"deactivate",
19384 cast(GObject2.Callback)cb, data, null, cf);
19386 extern (C) alias static void function (MenuShell* this_, MenuDirectionType* object, void* user_data=null) nothrow signal_move_current;
19387 ulong signal_connect(string name:"move-current", CB/*:signal_move_current*/)
19388 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19389 if (is(typeof(cb)==signal_move_current)||_ttmm!(CB, signal_move_current)()) {
19390 return signal_connect_data!()(&this, cast(char*)"move-current",
19391 cast(GObject2.Callback)cb, data, null, cf);
19394 // VERSION: 2.12
19395 // The ::move-selected signal is emitted to move the selection to
19396 // another item.
19397 // RETURNS: %TRUE to stop the signal emission, %FALSE to continue
19398 // <distance>: +1 to move to the next item, -1 to move to the previous
19399 extern (C) alias static c_int function (MenuShell* this_, int distance, void* user_data=null) nothrow signal_move_selected;
19400 ulong signal_connect(string name:"move-selected", CB/*:signal_move_selected*/)
19401 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19402 if (is(typeof(cb)==signal_move_selected)||_ttmm!(CB, signal_move_selected)()) {
19403 return signal_connect_data!()(&this, cast(char*)"move-selected",
19404 cast(GObject2.Callback)cb, data, null, cf);
19406 extern (C) alias static void function (MenuShell* this_, void* user_data=null) nothrow signal_selection_done;
19407 ulong signal_connect(string name:"selection-done", CB/*:signal_selection_done*/)
19408 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19409 if (is(typeof(cb)==signal_selection_done)||_ttmm!(CB, signal_selection_done)()) {
19410 return signal_connect_data!()(&this, cast(char*)"selection-done",
19411 cast(GObject2.Callback)cb, data, null, cf);
19415 struct MenuShellClass {
19416 ContainerClass parent_class;
19417 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19418 uint, "submenu_placement", 1,
19419 uint, "__dummy32A", 31));
19420 extern (C) void function (MenuShell* menu_shell) nothrow deactivate;
19421 extern (C) void function (MenuShell* menu_shell) nothrow selection_done;
19422 extern (C) void function (MenuShell* menu_shell, MenuDirectionType direction) nothrow move_current;
19423 extern (C) void function (MenuShell* menu_shell, int force_hide) nothrow activate_current;
19424 extern (C) void function (MenuShell* menu_shell) nothrow cancel;
19425 extern (C) void function (MenuShell* menu_shell, Widget* menu_item) nothrow select_item;
19426 extern (C) void function (MenuShell* menu_shell, Widget* child, int position) nothrow insert;
19427 extern (C) int function (MenuShell* menu_shell) nothrow get_popup_delay;
19428 extern (C) int function (MenuShell* menu_shell, int distance) nothrow move_selected;
19429 extern (C) void function () nothrow _gtk_reserved1;
19430 extern (C) void function () nothrow _gtk_reserved2;
19433 struct MenuToolButton /* : ToolButton */ {
19434 mixin Atk.ImplementorIface.__interface__;
19435 mixin Activatable.__interface__;
19436 mixin Buildable.__interface__;
19437 alias parent this;
19438 alias parent super_;
19439 alias parent toolbutton;
19440 ToolButton parent;
19441 private MenuToolButtonPrivate* priv;
19444 // VERSION: 2.6
19445 // Creates a new #GtkMenuToolButton using @icon_widget as icon and
19446 // @label as label.
19447 // RETURNS: the new #GtkMenuToolButton
19448 // <icon_widget>: a widget that will be used as icon widget, or %NULL
19449 // <label>: a string that will be used as label, or %NULL
19450 static MenuToolButton* new_(AT0, AT1)(AT0 /*Widget*/ icon_widget=null, AT1 /*char*/ label=null) nothrow {
19451 return gtk_menu_tool_button_new(UpCast!(Widget*)(icon_widget), toCString!(char*)(label));
19453 static auto opCall(AT0, AT1)(AT0 /*Widget*/ icon_widget=null, AT1 /*char*/ label=null) {
19454 return gtk_menu_tool_button_new(UpCast!(Widget*)(icon_widget), toCString!(char*)(label));
19457 // VERSION: 2.6
19458 // Creates a new #GtkMenuToolButton.
19459 // The new #GtkMenuToolButton will contain an icon and label from
19460 // the stock item indicated by @stock_id.
19461 // RETURNS: the new #GtkMenuToolButton
19462 // <stock_id>: the name of a stock item
19463 static MenuToolButton* new_from_stock(AT0)(AT0 /*char*/ stock_id) nothrow {
19464 return gtk_menu_tool_button_new_from_stock(toCString!(char*)(stock_id));
19466 static auto opCall(AT0)(AT0 /*char*/ stock_id) {
19467 return gtk_menu_tool_button_new_from_stock(toCString!(char*)(stock_id));
19470 // VERSION: 2.6
19471 // Gets the #GtkMenu associated with #GtkMenuToolButton.
19473 // with #GtkMenuToolButton
19474 // RETURNS: the #GtkMenu associated
19475 Widget* get_menu()() nothrow {
19476 return gtk_menu_tool_button_get_menu(&this);
19479 // VERSION: 2.6
19480 // DEPRECATED (v2.12) method: set_arrow_tooltip - Use gtk_menu_tool_button_set_arrow_tooltip_text()
19481 // Sets the #GtkTooltips object to be used for arrow button which
19482 // pops up the menu. See gtk_tool_item_set_tooltip() for setting
19483 // a tooltip on the whole #GtkMenuToolButton.
19486 // instead.
19487 // <tooltips>: the #GtkTooltips object to be used
19488 // <tip_text>: text to be used as tooltip text for tool_item
19489 // <tip_private>: text to be used as private tooltip text
19490 void set_arrow_tooltip(AT0, AT1, AT2)(AT0 /*Tooltips*/ tooltips, AT1 /*char*/ tip_text=null, AT2 /*char*/ tip_private=null) nothrow {
19491 gtk_menu_tool_button_set_arrow_tooltip(&this, UpCast!(Tooltips*)(tooltips), toCString!(char*)(tip_text), toCString!(char*)(tip_private));
19494 // VERSION: 2.12
19495 // Sets the tooltip markup text to be used as tooltip for the arrow button
19496 // which pops up the menu. See gtk_tool_item_set_tooltip() for setting a
19497 // tooltip on the whole #GtkMenuToolButton.
19498 // <markup>: markup text to be used as tooltip text for button's arrow button
19499 void set_arrow_tooltip_markup(AT0)(AT0 /*char*/ markup) nothrow {
19500 gtk_menu_tool_button_set_arrow_tooltip_markup(&this, toCString!(char*)(markup));
19503 // VERSION: 2.12
19504 // Sets the tooltip text to be used as tooltip for the arrow button which
19505 // pops up the menu. See gtk_tool_item_set_tooltip() for setting a tooltip
19506 // on the whole #GtkMenuToolButton.
19507 // <text>: text to be used as tooltip text for button's arrow button
19508 void set_arrow_tooltip_text(AT0)(AT0 /*char*/ text) nothrow {
19509 gtk_menu_tool_button_set_arrow_tooltip_text(&this, toCString!(char*)(text));
19512 // VERSION: 2.6
19513 // Sets the #GtkMenu that is popped up when the user clicks on the arrow.
19514 // If @menu is NULL, the arrow button becomes insensitive.
19515 // <menu>: the #GtkMenu associated with #GtkMenuToolButton
19516 void set_menu(AT0)(AT0 /*Widget*/ menu) nothrow {
19517 gtk_menu_tool_button_set_menu(&this, UpCast!(Widget*)(menu));
19520 // The ::show-menu signal is emitted before the menu is shown.
19522 // It can be used to populate the menu on demand, using
19523 // gtk_menu_tool_button_get_menu().
19524 // Note that even if you populate the menu dynamically in this way,
19525 // you must set an empty menu on the #GtkMenuToolButton beforehand,
19526 // since the arrow is made insensitive if the menu is not set.
19527 extern (C) alias static void function (MenuToolButton* this_, void* user_data=null) nothrow signal_show_menu;
19529 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19530 return super_.signal_connect!name(cb, data, cf);
19533 ulong signal_connect(string name:"show-menu", CB/*:signal_show_menu*/)
19534 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
19535 if (is(typeof(cb)==signal_show_menu)||_ttmm!(CB, signal_show_menu)()) {
19536 return signal_connect_data!()(&this, cast(char*)"show-menu",
19537 cast(GObject2.Callback)cb, data, null, cf);
19541 struct MenuToolButtonClass {
19542 ToolButtonClass parent_class;
19543 extern (C) void function (MenuToolButton* button) nothrow show_menu;
19544 extern (C) void function () nothrow _gtk_reserved1;
19545 extern (C) void function () nothrow _gtk_reserved2;
19546 extern (C) void function () nothrow _gtk_reserved3;
19547 extern (C) void function () nothrow _gtk_reserved4;
19550 struct MenuToolButtonPrivate {
19554 // #GtkMessageDialog presents a dialog with an image representing the type of
19555 // message (Error, Question, etc.) alongside some message text. It's simply a
19556 // convenience widget; you could construct the equivalent of #GtkMessageDialog
19557 // from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
19559 // The easiest way to do a modal message dialog is to use gtk_dialog_run(), though
19560 // you can also pass in the %GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically
19561 // makes the dialog modal and waits for the user to respond to it. gtk_dialog_run()
19562 // returns when any dialog button is clicked.
19563 // <example>
19564 // <title>A modal dialog.</title>
19565 // <programlisting>
19566 // dialog = gtk_message_dialog_new (main_application_window,
19567 // GTK_DIALOG_DESTROY_WITH_PARENT,
19568 // GTK_MESSAGE_ERROR,
19569 // GTK_BUTTONS_CLOSE,
19570 // "Error loading file '&percnt;s': &percnt;s",
19571 // filename, g_strerror (errno));
19572 // gtk_dialog_run (GTK_DIALOG (dialog));
19573 // gtk_widget_destroy (dialog);
19574 // </programlisting>
19575 // </example>
19576 // You might do a non-modal #GtkMessageDialog as follows:
19577 // <example>
19578 // <title>A non-modal dialog.</title>
19579 // <programlisting>
19580 // dialog = gtk_message_dialog_new (main_application_window,
19581 // GTK_DIALOG_DESTROY_WITH_PARENT,
19582 // GTK_MESSAGE_ERROR,
19583 // GTK_BUTTONS_CLOSE,
19584 // "Error loading file '&percnt;s': &percnt;s",
19585 // filename, g_strerror (errno));
19587 // /&ast; Destroy the dialog when the user responds to it (e.g. clicks a button) &ast;/
19588 // g_signal_connect_swapped (dialog, "response",
19589 // G_CALLBACK (gtk_widget_destroy),
19590 // dialog);
19591 // </programlisting>
19592 // </example>
19594 // <refsect2 id="GtkMessageDialog-BUILDER-UI">
19595 // <title>GtkMessageDialog as GtkBuildable</title>
19596 // <para>
19597 // The GtkMessageDialog implementation of the GtkBuildable interface exposes
19598 // the message area as an internal child with the name "message_area".
19599 // </para>
19600 // </refsect2>
19601 struct MessageDialog /* : Dialog */ {
19602 mixin Atk.ImplementorIface.__interface__;
19603 mixin Buildable.__interface__;
19604 alias parent_instance this;
19605 alias parent_instance super_;
19606 alias parent_instance dialog;
19607 Dialog parent_instance;
19608 private Widget* image, label;
19611 // Unintrospectable constructor: new() / gtk_message_dialog_new()
19612 // Creates a new message dialog, which is a simple dialog with an icon
19613 // indicating the dialog type (error, warning, etc.) and some text the
19614 // user may want to see. When the user clicks a button a "response"
19615 // signal is emitted with response IDs from #GtkResponseType. See
19616 // #GtkDialog for more details.
19617 // RETURNS: a new #GtkMessageDialog
19618 // <parent>: transient parent, or %NULL for none
19619 // <flags>: flags
19620 // <type>: type of message
19621 // <buttons>: set of buttons to use
19622 // <message_format>: printf()-style format string, or %NULL
19623 alias gtk_message_dialog_new new_; // Variadic
19625 // Unintrospectable constructor: new_with_markup() / gtk_message_dialog_new_with_markup()
19626 // VERSION: 2.4
19627 // Creates a new message dialog, which is a simple dialog with an icon
19628 // indicating the dialog type (error, warning, etc.) and some text which
19629 // is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
19630 // When the user clicks a button a "response" signal is emitted with
19631 // response IDs from #GtkResponseType. See #GtkDialog for more details.
19633 // Special XML characters in the printf() arguments passed to this
19634 // function will automatically be escaped as necessary.
19635 // (See g_markup_printf_escaped() for how this is implemented.)
19636 // Usually this is what you want, but if you have an existing
19637 // Pango markup string that you want to use literally as the
19638 // label, then you need to use gtk_message_dialog_set_markup()
19639 // instead, since you can't pass the markup string either
19640 // as the format (it might contain '%' characters) or as a string
19641 // argument.
19642 // |[
19643 // GtkWidget *dialog;
19644 // dialog = gtk_message_dialog_new (main_application_window,
19645 // GTK_DIALOG_DESTROY_WITH_PARENT,
19646 // GTK_MESSAGE_ERROR,
19647 // GTK_BUTTONS_CLOSE,
19648 // NULL);
19649 // gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
19650 // markup);
19651 // ]|
19652 // RETURNS: a new #GtkMessageDialog
19653 // <parent>: transient parent, or %NULL for none
19654 // <flags>: flags
19655 // <type>: type of message
19656 // <buttons>: set of buttons to use
19657 // <message_format>: printf()-style format string, or %NULL
19658 alias gtk_message_dialog_new_with_markup new_with_markup; // Variadic
19660 // Unintrospectable method: format_secondary_markup() / gtk_message_dialog_format_secondary_markup()
19661 // VERSION: 2.6
19662 // Sets the secondary text of the message dialog to be @message_format (with
19663 // printf()-style), which is marked up with the
19664 // <link linkend="PangoMarkupFormat">Pango text markup language</link>.
19666 // Note that setting a secondary text makes the primary text become
19667 // bold, unless you have provided explicit markup.
19669 // Due to an oversight, this function does not escape special XML characters
19670 // like gtk_message_dialog_new_with_markup() does. Thus, if the arguments
19671 // may contain special XML characters, you should use g_markup_printf_escaped()
19672 // to escape it.
19673 // <informalexample><programlisting>
19674 // gchar *msg;
19676 // msg = g_markup_printf_escaped (message_format, ...);
19677 // gtk_message_dialog_format_secondary_markup (message_dialog, "&percnt;s", msg);
19678 // g_free (msg);
19679 // </programlisting></informalexample>
19680 // <message_format>: printf()-style markup string (see
19681 /+ Not available -- variadic methods unsupported - use the C function directly.
19682 alias gtk_message_dialog_format_secondary_markup format_secondary_markup; // Variadic
19685 // Unintrospectable method: format_secondary_text() / gtk_message_dialog_format_secondary_text()
19686 // VERSION: 2.6
19687 // Sets the secondary text of the message dialog to be @message_format
19688 // (with printf()-style).
19690 // Note that setting a secondary text makes the primary text become
19691 // bold, unless you have provided explicit markup.
19692 // <message_format>: printf()-style format string, or %NULL
19693 /+ Not available -- variadic methods unsupported - use the C function directly.
19694 alias gtk_message_dialog_format_secondary_text format_secondary_text; // Variadic
19697 // VERSION: 2.14
19698 // Gets the dialog's image.
19699 // RETURNS: the dialog's image
19700 Widget* get_image()() nothrow {
19701 return gtk_message_dialog_get_image(&this);
19704 // VERSION: 2.22
19705 // Returns the message area of the dialog. This is the box where the
19706 // dialog's primary and secondary labels are packed. You can add your
19707 // own extra content to that box and it will appear below those labels,
19708 // on the right side of the dialog's image (or on the left for right-to-left
19709 // languages). See gtk_dialog_get_content_area() for the corresponding
19710 // function in the parent #GtkDialog.
19712 // "message area" in the @message_dialog.
19713 // RETURNS: A #GtkVBox corresponding to the
19714 Widget* get_message_area()() nothrow {
19715 return gtk_message_dialog_get_message_area(&this);
19718 // VERSION: 2.10
19719 // Sets the dialog's image to @image.
19720 // <image>: the image
19721 void set_image(AT0)(AT0 /*Widget*/ image) nothrow {
19722 gtk_message_dialog_set_image(&this, UpCast!(Widget*)(image));
19725 // VERSION: 2.4
19726 // Sets the text of the message dialog to be @str, which is marked
19727 // up with the <link linkend="PangoMarkupFormat">Pango text markup
19728 // language</link>.
19729 // <str>: markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
19730 void set_markup(AT0)(AT0 /*char*/ str) nothrow {
19731 gtk_message_dialog_set_markup(&this, toCString!(char*)(str));
19735 struct MessageDialogClass {
19736 DialogClass parent_class;
19737 extern (C) void function () nothrow _gtk_reserved1;
19738 extern (C) void function () nothrow _gtk_reserved2;
19739 extern (C) void function () nothrow _gtk_reserved3;
19740 extern (C) void function () nothrow _gtk_reserved4;
19743 // The type of message being displayed in the dialog.
19744 enum MessageType {
19745 INFO = 0,
19746 WARNING = 1,
19747 QUESTION = 2,
19748 ERROR = 3,
19749 OTHER = 4
19751 enum MetricType {
19752 PIXELS = 0,
19753 INCHES = 1,
19754 CENTIMETERS = 2
19756 struct Misc /* : Widget */ {
19757 mixin Atk.ImplementorIface.__interface__;
19758 mixin Buildable.__interface__;
19759 alias widget this;
19760 alias widget super_;
19761 Widget widget;
19762 float xalign, yalign;
19763 ushort xpad, ypad;
19766 // Gets the X and Y alignment of the widget within its allocation.
19767 // See gtk_misc_set_alignment().
19768 // <xalign>: location to store X alignment of @misc, or %NULL
19769 // <yalign>: location to store Y alignment of @misc, or %NULL
19770 void get_alignment(AT0, AT1)(/*out*/ AT0 /*float*/ xalign=null, /*out*/ AT1 /*float*/ yalign=null) nothrow {
19771 gtk_misc_get_alignment(&this, UpCast!(float*)(xalign), UpCast!(float*)(yalign));
19774 // Gets the padding in the X and Y directions of the widget.
19775 // See gtk_misc_set_padding().
19776 // <xpad>: location to store padding in the X direction, or %NULL
19777 // <ypad>: location to store padding in the Y direction, or %NULL
19778 void get_padding()(/*out*/ int* xpad=null, /*out*/ int* ypad=null) nothrow {
19779 gtk_misc_get_padding(&this, xpad, ypad);
19781 void set_alignment()(float xalign, float yalign) nothrow {
19782 gtk_misc_set_alignment(&this, xalign, yalign);
19784 void set_padding()(int xpad, int ypad) nothrow {
19785 gtk_misc_set_padding(&this, xpad, ypad);
19789 struct MiscClass {
19790 WidgetClass parent_class;
19793 extern (C) alias void function (Gdk2.Display* display) nothrow ModuleDisplayInitFunc;
19795 extern (C) alias void function (int* argc, char*** argv) nothrow ModuleInitFunc;
19797 // This should not be accessed directly. Use the accessor functions below.
19798 struct MountOperation /* : Gio.MountOperation */ {
19799 alias parent_instance this;
19800 alias parent_instance super_;
19801 alias parent_instance mountoperation;
19802 Gio2.MountOperation parent_instance;
19803 MountOperationPrivate* priv;
19806 // VERSION: 2.14
19807 // Creates a new #GtkMountOperation
19808 // RETURNS: a new #GtkMountOperation
19809 // <parent>: transient parent of the window, or %NULL
19810 static MountOperation* /*new*/ new_(AT0)(AT0 /*Window*/ parent=null) nothrow {
19811 return gtk_mount_operation_new(UpCast!(Window*)(parent));
19813 static auto opCall(AT0)(AT0 /*Window*/ parent=null) {
19814 return gtk_mount_operation_new(UpCast!(Window*)(parent));
19817 // VERSION: 2.14
19818 // Gets the transient parent used by the #GtkMountOperation
19819 // RETURNS: the transient parent for windows shown by @op
19820 Window* get_parent()() nothrow {
19821 return gtk_mount_operation_get_parent(&this);
19824 // VERSION: 2.14
19825 // Gets the screen on which windows of the #GtkMountOperation
19826 // will be shown.
19827 // RETURNS: the screen on which windows of @op are shown
19828 Gdk2.Screen* get_screen()() nothrow {
19829 return gtk_mount_operation_get_screen(&this);
19832 // VERSION: 2.14
19833 // Returns whether the #GtkMountOperation is currently displaying
19834 // a window.
19835 // RETURNS: %TRUE if @op is currently displaying a window
19836 int is_showing()() nothrow {
19837 return gtk_mount_operation_is_showing(&this);
19840 // VERSION: 2.14
19841 // Sets the transient parent for windows shown by the
19842 // #GtkMountOperation.
19843 // <parent>: transient parent of the window, or %NULL
19844 void set_parent(AT0)(AT0 /*Window*/ parent=null) nothrow {
19845 gtk_mount_operation_set_parent(&this, UpCast!(Window*)(parent));
19848 // VERSION: 2.14
19849 // Sets the screen to show windows of the #GtkMountOperation on.
19850 // <screen>: a #GdkScreen
19851 void set_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
19852 gtk_mount_operation_set_screen(&this, UpCast!(Gdk2.Screen*)(screen));
19856 struct MountOperationClass {
19857 Gio2.MountOperationClass parent_class;
19858 extern (C) void function () nothrow _gtk_reserved1;
19859 extern (C) void function () nothrow _gtk_reserved2;
19860 extern (C) void function () nothrow _gtk_reserved3;
19861 extern (C) void function () nothrow _gtk_reserved4;
19864 struct MountOperationPrivate {
19867 enum MovementStep {
19868 LOGICAL_POSITIONS = 0,
19869 VISUAL_POSITIONS = 1,
19870 WORDS = 2,
19871 DISPLAY_LINES = 3,
19872 DISPLAY_LINE_ENDS = 4,
19873 PARAGRAPHS = 5,
19874 PARAGRAPH_ENDS = 6,
19875 PAGES = 7,
19876 BUFFER_ENDS = 8,
19877 HORIZONTAL_PAGES = 9
19879 enum int NO_TEXT_INPUT_MOD_MASK = 0;
19880 struct Notebook /* : Container */ {
19881 mixin Atk.ImplementorIface.__interface__;
19882 mixin Buildable.__interface__;
19883 alias container this;
19884 alias container super_;
19885 Container container;
19886 NotebookPage* cur_page;
19887 GLib2.List* children, first_tab, focus_tab;
19888 Widget* menu;
19889 Gdk2.Window* event_window;
19890 uint timer;
19891 ushort tab_hborder, tab_vborder;
19892 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19893 uint, "show_tabs", 1,
19894 uint, "homogeneous", 1,
19895 uint, "show_border", 1,
19896 uint, "tab_pos", 2,
19897 uint, "scrollable", 1,
19898 uint, "in_child", 3,
19899 uint, "click_child", 3,
19900 uint, "button", 2,
19901 uint, "need_timer", 1,
19902 uint, "child_has_focus", 1,
19903 uint, "have_visible_child", 1,
19904 uint, "focus_out", 1,
19905 uint, "has_before_previous", 1,
19906 uint, "has_before_next", 1,
19907 uint, "has_after_previous", 1,
19908 uint, "has_after_next", 1,
19909 uint, "__dummy32A", 10));
19912 // Creates a new #GtkNotebook widget with no pages.
19913 // RETURNS: the newly created #GtkNotebook
19914 static Notebook* new_()() nothrow {
19915 return gtk_notebook_new();
19917 static auto opCall()() {
19918 return gtk_notebook_new();
19921 // Unintrospectable function: set_window_creation_hook() / gtk_notebook_set_window_creation_hook()
19922 // VERSION: 2.10
19923 // DEPRECATED (v2.24) function: set_window_creation_hook - Use the #GtkNotebook::create-window signal instead
19924 // Installs a global function used to create a window
19925 // when a detached tab is dropped in an empty area.
19926 // <func>: the #GtkNotebookWindowCreationFunc, or %NULL
19927 // <data>: user data for @func
19928 // <destroy>: Destroy notifier for @data, or %NULL
19929 static void set_window_creation_hook(AT0)(NotebookWindowCreationFunc func, AT0 /*void*/ data, GLib2.DestroyNotify destroy=null) nothrow {
19930 gtk_notebook_set_window_creation_hook(func, UpCast!(void*)(data), destroy);
19933 // Appends a page to @notebook.
19935 // page in the notebook, or -1 if function fails
19936 // RETURNS: the index (starting from 0) of the appended
19937 // <child>: the #GtkWidget to use as the contents of the page.
19938 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
19939 int append_page(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*Widget*/ tab_label=null) nothrow {
19940 return gtk_notebook_append_page(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(tab_label));
19943 // Appends a page to @notebook, specifying the widget to use as the
19944 // label in the popup menu.
19946 // page in the notebook, or -1 if function fails
19947 // RETURNS: the index (starting from 0) of the appended
19948 // <child>: the #GtkWidget to use as the contents of the page.
19949 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
19950 // <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.
19951 int append_page_menu(AT0, AT1, AT2)(AT0 /*Widget*/ child, AT1 /*Widget*/ tab_label=null, AT2 /*Widget*/ menu_label=null) nothrow {
19952 return gtk_notebook_append_page_menu(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(tab_label), UpCast!(Widget*)(menu_label));
19955 // VERSION: 2.20
19956 // Gets one of the action widgets. See gtk_notebook_set_action_widget().
19958 // or %NULL when this action widget has not been set
19959 // RETURNS: The action widget with the given @pack_type
19960 // <pack_type>: pack type of the action widget to receive
19961 Widget* get_action_widget()(PackType pack_type) nothrow {
19962 return gtk_notebook_get_action_widget(&this, pack_type);
19965 // Returns the page number of the current page.
19967 // page in the notebook. If the notebook has no pages, then
19968 // -1 will be returned.
19969 // RETURNS: the index (starting from 0) of the current
19970 int get_current_page()() nothrow {
19971 return gtk_notebook_get_current_page(&this);
19974 // VERSION: 2.12
19975 // DEPRECATED (v2.24) method: get_group - Use gtk_notebook_get_group_name() instead
19976 // Gets the current group identificator pointer for @notebook.
19978 // or %NULL if none is set.
19979 // RETURNS: the group identificator,
19980 void* get_group()() nothrow {
19981 return gtk_notebook_get_group(&this);
19984 // VERSION: 2.10
19985 // DEPRECATED (v2.12) method: get_group_id - use gtk_notebook_get_group_name() instead.
19986 // Gets the current group identificator for @notebook.
19987 // RETURNS: the group identificator, or -1 if none is set.
19988 int get_group_id()() nothrow {
19989 return gtk_notebook_get_group_id(&this);
19992 // VERSION: 2.24
19993 // Gets the current group name for @notebook.
19995 // Note that this funtion can emphasis not be used
19996 // together with gtk_notebook_set_group() or
19997 // gtk_notebook_set_group_id().
19999 // or %NULL if none is set.
20000 char* get_group_name()() nothrow {
20001 return gtk_notebook_get_group_name(&this);
20004 // Retrieves the menu label widget of the page containing @child.
20006 // notebook page does not have a menu label other than the
20007 // default (the tab label).
20008 // RETURNS: the menu label, or %NULL if the
20009 // <child>: a widget contained in a page of @notebook
20010 Widget* get_menu_label(AT0)(AT0 /*Widget*/ child) nothrow {
20011 return gtk_notebook_get_menu_label(&this, UpCast!(Widget*)(child));
20014 // Retrieves the text of the menu label for the page containing
20015 // @child.
20017 // widget does not have a menu label other than
20018 // the default menu label, or the menu label widget
20019 // is not a #GtkLabel. The string is owned by
20020 // the widget and must not be freed.
20021 // RETURNS: the text of the tab label, or %NULL if the
20022 // <child>: the child widget of a page of the notebook.
20023 char* get_menu_label_text(AT0)(AT0 /*Widget*/ child) nothrow {
20024 return gtk_notebook_get_menu_label_text(&this, UpCast!(Widget*)(child));
20027 // VERSION: 2.2
20028 // Gets the number of pages in a notebook.
20029 // RETURNS: the number of pages in the notebook.
20030 int get_n_pages()() nothrow {
20031 return gtk_notebook_get_n_pages(&this);
20034 // Returns the child widget contained in page number @page_num.
20036 // out of bounds.
20037 // RETURNS: the child widget, or %NULL if @page_num is
20038 // <page_num>: the index of a page in the notebook, or -1 to get the last page.
20039 Widget* get_nth_page()(int page_num) nothrow {
20040 return gtk_notebook_get_nth_page(&this, page_num);
20043 // Returns whether the tab label area has arrows for scrolling. See
20044 // gtk_notebook_set_scrollable().
20045 // RETURNS: %TRUE if arrows for scrolling are present
20046 int get_scrollable()() nothrow {
20047 return gtk_notebook_get_scrollable(&this);
20050 // Returns whether a bevel will be drawn around the notebook pages. See
20051 // gtk_notebook_set_show_border().
20052 // RETURNS: %TRUE if the bevel is drawn
20053 int get_show_border()() nothrow {
20054 return gtk_notebook_get_show_border(&this);
20057 // Returns whether the tabs of the notebook are shown. See
20058 // gtk_notebook_set_show_tabs().
20059 // RETURNS: %TRUE if the tabs are shown
20060 int get_show_tabs()() nothrow {
20061 return gtk_notebook_get_show_tabs(&this);
20064 // VERSION: 2.10
20065 // Returns whether the tab contents can be detached from @notebook.
20066 // RETURNS: TRUE if the tab is detachable.
20067 // <child>: a child #GtkWidget
20068 int get_tab_detachable(AT0)(AT0 /*Widget*/ child) nothrow {
20069 return gtk_notebook_get_tab_detachable(&this, UpCast!(Widget*)(child));
20072 // VERSION: 2.22
20073 // Returns the horizontal width of a tab border.
20074 // RETURNS: horizontal width of a tab border
20075 ushort get_tab_hborder()() nothrow {
20076 return gtk_notebook_get_tab_hborder(&this);
20079 // Returns the tab label widget for the page @child. %NULL is returned
20080 // if @child is not in @notebook or if no tab label has specifically
20081 // been set for @child.
20082 // RETURNS: the tab label
20083 // <child>: the page
20084 Widget* get_tab_label(AT0)(AT0 /*Widget*/ child) nothrow {
20085 return gtk_notebook_get_tab_label(&this, UpCast!(Widget*)(child));
20088 // Retrieves the text of the tab label for the page containing
20089 // @child.
20091 // tab label widget is not a #GtkLabel. The
20092 // string is owned by the widget and must not
20093 // be freed.
20094 // RETURNS: the text of the tab label, or %NULL if the
20095 // <child>: a widget contained in a page of @notebook
20096 char* get_tab_label_text(AT0)(AT0 /*Widget*/ child) nothrow {
20097 return gtk_notebook_get_tab_label_text(&this, UpCast!(Widget*)(child));
20100 // Gets the edge at which the tabs for switching pages in the
20101 // notebook are drawn.
20102 // RETURNS: the edge at which the tabs are drawn
20103 PositionType get_tab_pos()() nothrow {
20104 return gtk_notebook_get_tab_pos(&this);
20107 // VERSION: 2.10
20108 // Gets whether the tab can be reordered via drag and drop or not.
20109 // RETURNS: %TRUE if the tab is reorderable.
20110 // <child>: a child #GtkWidget
20111 int get_tab_reorderable(AT0)(AT0 /*Widget*/ child) nothrow {
20112 return gtk_notebook_get_tab_reorderable(&this, UpCast!(Widget*)(child));
20115 // VERSION: 2.22
20116 // Returns the vertical width of a tab border.
20117 // RETURNS: vertical width of a tab border
20118 ushort get_tab_vborder()() nothrow {
20119 return gtk_notebook_get_tab_vborder(&this);
20122 // Insert a page into @notebook at the given position.
20124 // page in the notebook, or -1 if function fails
20125 // RETURNS: the index (starting from 0) of the inserted
20126 // <child>: the #GtkWidget to use as the contents of the page.
20127 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
20128 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
20129 int insert_page(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*Widget*/ tab_label, int position) nothrow {
20130 return gtk_notebook_insert_page(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(tab_label), position);
20133 // Insert a page into @notebook at the given position, specifying
20134 // the widget to use as the label in the popup menu.
20136 // page in the notebook
20137 // RETURNS: the index (starting from 0) of the inserted
20138 // <child>: the #GtkWidget to use as the contents of the page.
20139 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
20140 // <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.
20141 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
20142 int insert_page_menu(AT0, AT1, AT2)(AT0 /*Widget*/ child, AT1 /*Widget*/ tab_label, AT2 /*Widget*/ menu_label, int position) nothrow {
20143 return gtk_notebook_insert_page_menu(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(tab_label), UpCast!(Widget*)(menu_label), position);
20146 // Switches to the next page. Nothing happens if the current page is
20147 // the last page.
20148 void next_page()() nothrow {
20149 gtk_notebook_next_page(&this);
20152 // Finds the index of the page which contains the given child
20153 // widget.
20155 // -1 if @child is not in the notebook.
20156 // RETURNS: the index of the page containing @child, or
20157 // <child>: a #GtkWidget
20158 int page_num(AT0)(AT0 /*Widget*/ child) nothrow {
20159 return gtk_notebook_page_num(&this, UpCast!(Widget*)(child));
20161 // Disables the popup menu.
20162 void popup_disable()() nothrow {
20163 gtk_notebook_popup_disable(&this);
20166 // Enables the popup menu: if the user clicks with the right mouse button on
20167 // the tab labels, a menu with all the pages will be popped up.
20168 void popup_enable()() nothrow {
20169 gtk_notebook_popup_enable(&this);
20172 // Prepends a page to @notebook.
20174 // page in the notebook, or -1 if function fails
20175 // RETURNS: the index (starting from 0) of the prepended
20176 // <child>: the #GtkWidget to use as the contents of the page.
20177 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
20178 int prepend_page(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*Widget*/ tab_label=null) nothrow {
20179 return gtk_notebook_prepend_page(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(tab_label));
20182 // Prepends a page to @notebook, specifying the widget to use as the
20183 // label in the popup menu.
20185 // page in the notebook, or -1 if function fails
20186 // RETURNS: the index (starting from 0) of the prepended
20187 // <child>: the #GtkWidget to use as the contents of the page.
20188 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
20189 // <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.
20190 int prepend_page_menu(AT0, AT1, AT2)(AT0 /*Widget*/ child, AT1 /*Widget*/ tab_label=null, AT2 /*Widget*/ menu_label=null) nothrow {
20191 return gtk_notebook_prepend_page_menu(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(tab_label), UpCast!(Widget*)(menu_label));
20194 // Switches to the previous page. Nothing happens if the current page
20195 // is the first page.
20196 void prev_page()() nothrow {
20197 gtk_notebook_prev_page(&this);
20200 // DEPRECATED (v2.20) method: query_tab_label_packing - Modify the #GtkNotebook:tab-expand and
20201 // Query the packing attributes for the tab label of the page
20202 // containing @child.
20204 // #GtkNotebook:tab-fill child properties instead.
20205 // <child>: the page
20206 // <expand>: location to store the expand value (or NULL)
20207 // <fill>: location to store the fill value (or NULL)
20208 // <pack_type>: location to store the pack_type (or NULL)
20209 void query_tab_label_packing(AT0, AT1)(AT0 /*Widget*/ child, int* expand, int* fill, AT1 /*PackType*/ pack_type) nothrow {
20210 gtk_notebook_query_tab_label_packing(&this, UpCast!(Widget*)(child), expand, fill, UpCast!(PackType*)(pack_type));
20213 // Removes a page from the notebook given its index
20214 // in the notebook.
20215 // <page_num>: the index of a notebook page, starting from 0. If -1, the last page will be removed.
20216 void remove_page()(int page_num) nothrow {
20217 gtk_notebook_remove_page(&this, page_num);
20220 // Reorders the page containing @child, so that it appears in position
20221 // @position. If @position is greater than or equal to the number of
20222 // children in the list or negative, @child will be moved to the end
20223 // of the list.
20224 // <child>: the child to move
20225 // <position>: the new position, or -1 to move to the end
20226 void reorder_child(AT0)(AT0 /*Widget*/ child, int position) nothrow {
20227 gtk_notebook_reorder_child(&this, UpCast!(Widget*)(child), position);
20230 // VERSION: 2.20
20231 // Sets @widget as one of the action widgets. Depending on the pack type
20232 // the widget will be placed before or after the tabs. You can use
20233 // a #GtkBox if you need to pack more than one widget on the same side.
20235 // Note that action widgets are "internal" children of the notebook and thus
20236 // not included in the list returned from gtk_container_foreach().
20237 // <widget>: a #GtkWidget
20238 // <pack_type>: pack type of the action widget
20239 void set_action_widget(AT0)(AT0 /*Widget*/ widget, PackType pack_type) nothrow {
20240 gtk_notebook_set_action_widget(&this, UpCast!(Widget*)(widget), pack_type);
20243 // Switches to the page number @page_num.
20245 // Note that due to historical reasons, GtkNotebook refuses
20246 // to switch to a page unless the child widget is visible.
20247 // Therefore, it is recommended to show child widgets before
20248 // adding them to a notebook.
20249 // <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.
20250 void set_current_page()(int page_num) nothrow {
20251 gtk_notebook_set_current_page(&this, page_num);
20254 // VERSION: 2.12
20255 // DEPRECATED (v2.24) method: set_group - Use gtk_notebook_set_group_name() instead
20256 // Sets a group identificator pointer for @notebook, notebooks sharing
20257 // the same group identificator pointer will be able to exchange tabs
20258 // via drag and drop. A notebook with a %NULL group identificator will
20259 // not be able to exchange tabs with any other notebook.
20260 // <group>: a pointer to identify the notebook group, or %NULL to unset it
20261 void set_group(AT0)(AT0 /*void*/ group=null) nothrow {
20262 gtk_notebook_set_group(&this, UpCast!(void*)(group));
20265 // VERSION: 2.10
20266 // DEPRECATED (v2.12) method: set_group_id - use gtk_notebook_set_group_name() instead.
20267 // Sets an group identificator for @notebook, notebooks sharing
20268 // the same group identificator will be able to exchange tabs
20269 // via drag and drop. A notebook with group identificator -1 will
20270 // not be able to exchange tabs with any other notebook.
20271 // <group_id>: a group identificator, or -1 to unset it
20272 void set_group_id()(int group_id) nothrow {
20273 gtk_notebook_set_group_id(&this, group_id);
20276 // VERSION: 2.24
20277 // Sets a group name for @notebook.
20279 // Notebooks with the same name will be able to exchange tabs
20280 // via drag and drop. A notebook with a %NULL group name will
20281 // not be able to exchange tabs with any other notebook.
20282 void set_group_name(AT0)(AT0 /*char*/ group_name) nothrow {
20283 gtk_notebook_set_group_name(&this, toCString!(char*)(group_name));
20286 // Sets whether the tabs must have all the same size or not.
20287 // <homogeneous>: %TRUE if all tabs should be the same size.
20288 void set_homogeneous_tabs()(int homogeneous) nothrow {
20289 gtk_notebook_set_homogeneous_tabs(&this, homogeneous);
20292 // Changes the menu label for the page containing @child.
20293 // <child>: the child widget
20294 // <menu_label>: the menu label, or NULL for default
20295 void set_menu_label(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*Widget*/ menu_label=null) nothrow {
20296 gtk_notebook_set_menu_label(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(menu_label));
20299 // Creates a new label and sets it as the menu label of @child.
20300 // <child>: the child widget
20301 // <menu_text>: the label text
20302 void set_menu_label_text(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*char*/ menu_text) nothrow {
20303 gtk_notebook_set_menu_label_text(&this, UpCast!(Widget*)(child), toCString!(char*)(menu_text));
20306 // Sets whether the tab label area will have arrows for scrolling if
20307 // there are too many tabs to fit in the area.
20308 // <scrollable>: %TRUE if scroll arrows should be added
20309 void set_scrollable()(int scrollable) nothrow {
20310 gtk_notebook_set_scrollable(&this, scrollable);
20313 // Sets whether a bevel will be drawn around the notebook pages.
20314 // This only has a visual effect when the tabs are not shown.
20315 // See gtk_notebook_set_show_tabs().
20316 // <show_border>: %TRUE if a bevel should be drawn around the notebook.
20317 void set_show_border()(int show_border) nothrow {
20318 gtk_notebook_set_show_border(&this, show_border);
20321 // Sets whether to show the tabs for the notebook or not.
20322 // <show_tabs>: %TRUE if the tabs should be shown.
20323 void set_show_tabs()(int show_tabs) nothrow {
20324 gtk_notebook_set_show_tabs(&this, show_tabs);
20327 // Sets the width the border around the tab labels
20328 // in a notebook. This is equivalent to calling
20329 // gtk_notebook_set_tab_hborder (@notebook, @border_width) followed
20330 // by gtk_notebook_set_tab_vborder (@notebook, @border_width).
20331 // <border_width>: width of the border around the tab labels.
20332 void set_tab_border()(uint border_width) nothrow {
20333 gtk_notebook_set_tab_border(&this, border_width);
20336 // VERSION: 2.10
20337 // Sets whether the tab can be detached from @notebook to another
20338 // notebook or widget.
20340 // Note that 2 notebooks must share a common group identificator
20341 // (see gtk_notebook_set_group_id ()) to allow automatic tabs
20342 // interchange between them.
20344 // If you want a widget to interact with a notebook through DnD
20345 // (i.e.: accept dragged tabs from it) it must be set as a drop
20346 // destination and accept the target "GTK_NOTEBOOK_TAB". The notebook
20347 // will fill the selection with a GtkWidget** pointing to the child
20348 // widget that corresponds to the dropped tab.
20349 // |[
20350 // static void
20351 // on_drop_zone_drag_data_received (GtkWidget *widget,
20352 // GdkDragContext *context,
20353 // gint x,
20354 // gint y,
20355 // GtkSelectionData *selection_data,
20356 // guint info,
20357 // guint time,
20358 // gpointer user_data)
20359 // {
20360 // GtkWidget *notebook;
20361 // GtkWidget **child;
20363 // notebook = gtk_drag_get_source_widget (context);
20364 // child = (void*) selection_data->data;
20366 // process_widget (*child);
20367 // gtk_container_remove (GTK_CONTAINER (notebook), *child);
20368 // }
20369 // ]|
20371 // If you want a notebook to accept drags from other widgets,
20372 // you will have to set your own DnD code to do it.
20373 // <child>: a child #GtkWidget
20374 // <detachable>: whether the tab is detachable or not
20375 void set_tab_detachable(AT0)(AT0 /*Widget*/ child, int detachable) nothrow {
20376 gtk_notebook_set_tab_detachable(&this, UpCast!(Widget*)(child), detachable);
20379 // Sets the width of the horizontal border of tab labels.
20380 // <tab_hborder>: width of the horizontal border of tab labels.
20381 void set_tab_hborder()(uint tab_hborder) nothrow {
20382 gtk_notebook_set_tab_hborder(&this, tab_hborder);
20385 // Changes the tab label for @child. If %NULL is specified
20386 // for @tab_label, then the page will have the label 'page N'.
20387 // <child>: the page
20388 // <tab_label>: the tab label widget to use, or %NULL for default tab label.
20389 void set_tab_label(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*Widget*/ tab_label=null) nothrow {
20390 gtk_notebook_set_tab_label(&this, UpCast!(Widget*)(child), UpCast!(Widget*)(tab_label));
20393 // DEPRECATED (v2.20) method: set_tab_label_packing - Modify the #GtkNotebook:tab-expand and
20394 // Sets the packing parameters for the tab label of the page
20395 // containing @child. See gtk_box_pack_start() for the exact meaning
20396 // of the parameters.
20398 // #GtkNotebook:tab-fill child properties instead.
20399 // Modifying the packing of the tab label is a deprecated feature and
20400 // shouldn't be done anymore.
20401 // <child>: the child widget
20402 // <expand>: whether to expand the tab label or not
20403 // <fill>: whether the tab label should fill the allocated area or not
20404 // <pack_type>: the position of the tab label
20405 void set_tab_label_packing(AT0)(AT0 /*Widget*/ child, int expand, int fill, PackType pack_type) nothrow {
20406 gtk_notebook_set_tab_label_packing(&this, UpCast!(Widget*)(child), expand, fill, pack_type);
20409 // Creates a new label and sets it as the tab label for the page
20410 // containing @child.
20411 // <child>: the page
20412 // <tab_text>: the label text
20413 void set_tab_label_text(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*char*/ tab_text) nothrow {
20414 gtk_notebook_set_tab_label_text(&this, UpCast!(Widget*)(child), toCString!(char*)(tab_text));
20417 // Sets the edge at which the tabs for switching pages in the
20418 // notebook are drawn.
20419 // <pos>: the edge to draw the tabs at.
20420 void set_tab_pos()(PositionType pos) nothrow {
20421 gtk_notebook_set_tab_pos(&this, pos);
20424 // VERSION: 2.10
20425 // Sets whether the notebook tab can be reordered
20426 // via drag and drop or not.
20427 // <child>: a child #GtkWidget
20428 // <reorderable>: whether the tab is reorderable or not.
20429 void set_tab_reorderable(AT0)(AT0 /*Widget*/ child, int reorderable) nothrow {
20430 gtk_notebook_set_tab_reorderable(&this, UpCast!(Widget*)(child), reorderable);
20433 // Sets the width of the vertical border of tab labels.
20434 // <tab_vborder>: width of the vertical border of tab labels.
20435 void set_tab_vborder()(uint tab_vborder) nothrow {
20436 gtk_notebook_set_tab_vborder(&this, tab_vborder);
20438 extern (C) alias static c_int function (Notebook* this_, int object, void* user_data=null) nothrow signal_change_current_page;
20440 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20441 return super_.signal_connect!name(cb, data, cf);
20444 ulong signal_connect(string name:"change-current-page", CB/*:signal_change_current_page*/)
20445 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20446 if (is(typeof(cb)==signal_change_current_page)||_ttmm!(CB, signal_change_current_page)()) {
20447 return signal_connect_data!()(&this, cast(char*)"change-current-page",
20448 cast(GObject2.Callback)cb, data, null, cf);
20451 // VERSION: 2.12
20452 // The ::create-window signal is emitted when a detachable
20453 // tab is dropped on the root window.
20455 // A handler for this signal can create a window containing
20456 // a notebook where the tab will be attached. It is also
20457 // responsible for moving/resizing the window and adding the
20458 // necessary properties to the notebook (e.g. the
20459 // #GtkNotebook:group ).
20461 // The default handler uses the global window creation hook,
20462 // if one has been set with gtk_notebook_set_window_creation_hook().
20464 // added to, or %NULL.
20465 // RETURNS: a #GtkNotebook that @page should be
20466 // <page>: the tab of @notebook that is being detached
20467 // <x>: the X coordinate where the drop happens
20468 // <y>: the Y coordinate where the drop happens
20469 extern (C) alias static Notebook* function (Notebook* this_, Widget* page, int x, int y, void* user_data=null) nothrow signal_create_window;
20470 ulong signal_connect(string name:"create-window", CB/*:signal_create_window*/)
20471 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20472 if (is(typeof(cb)==signal_create_window)||_ttmm!(CB, signal_create_window)()) {
20473 return signal_connect_data!()(&this, cast(char*)"create-window",
20474 cast(GObject2.Callback)cb, data, null, cf);
20476 extern (C) alias static c_int function (Notebook* this_, NotebookTab* object, void* user_data=null) nothrow signal_focus_tab;
20477 ulong signal_connect(string name:"focus-tab", CB/*:signal_focus_tab*/)
20478 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20479 if (is(typeof(cb)==signal_focus_tab)||_ttmm!(CB, signal_focus_tab)()) {
20480 return signal_connect_data!()(&this, cast(char*)"focus-tab",
20481 cast(GObject2.Callback)cb, data, null, cf);
20483 extern (C) alias static void function (Notebook* this_, DirectionType* object, void* user_data=null) nothrow signal_move_focus_out;
20484 ulong signal_connect(string name:"move-focus-out", CB/*:signal_move_focus_out*/)
20485 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20486 if (is(typeof(cb)==signal_move_focus_out)||_ttmm!(CB, signal_move_focus_out)()) {
20487 return signal_connect_data!()(&this, cast(char*)"move-focus-out",
20488 cast(GObject2.Callback)cb, data, null, cf);
20491 // VERSION: 2.10
20492 // the ::page-added signal is emitted in the notebook
20493 // right after a page is added to the notebook.
20494 // <child>: the child #GtkWidget affected
20495 // <page_num>: the new page number for @child
20496 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) nothrow signal_page_added;
20497 ulong signal_connect(string name:"page-added", CB/*:signal_page_added*/)
20498 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20499 if (is(typeof(cb)==signal_page_added)||_ttmm!(CB, signal_page_added)()) {
20500 return signal_connect_data!()(&this, cast(char*)"page-added",
20501 cast(GObject2.Callback)cb, data, null, cf);
20504 // VERSION: 2.10
20505 // the ::page-removed signal is emitted in the notebook
20506 // right after a page is removed from the notebook.
20507 // <child>: the child #GtkWidget affected
20508 // <page_num>: the @child page number
20509 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) nothrow signal_page_removed;
20510 ulong signal_connect(string name:"page-removed", CB/*:signal_page_removed*/)
20511 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20512 if (is(typeof(cb)==signal_page_removed)||_ttmm!(CB, signal_page_removed)()) {
20513 return signal_connect_data!()(&this, cast(char*)"page-removed",
20514 cast(GObject2.Callback)cb, data, null, cf);
20517 // VERSION: 2.10
20518 // the ::page-reordered signal is emitted in the notebook
20519 // right after a page has been reordered.
20520 // <child>: the child #GtkWidget affected
20521 // <page_num>: the new page number for @child
20522 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) nothrow signal_page_reordered;
20523 ulong signal_connect(string name:"page-reordered", CB/*:signal_page_reordered*/)
20524 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20525 if (is(typeof(cb)==signal_page_reordered)||_ttmm!(CB, signal_page_reordered)()) {
20526 return signal_connect_data!()(&this, cast(char*)"page-reordered",
20527 cast(GObject2.Callback)cb, data, null, cf);
20529 extern (C) alias static c_int function (Notebook* this_, DirectionType* object, c_int p0, void* user_data=null) nothrow signal_reorder_tab;
20530 ulong signal_connect(string name:"reorder-tab", CB/*:signal_reorder_tab*/)
20531 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20532 if (is(typeof(cb)==signal_reorder_tab)||_ttmm!(CB, signal_reorder_tab)()) {
20533 return signal_connect_data!()(&this, cast(char*)"reorder-tab",
20534 cast(GObject2.Callback)cb, data, null, cf);
20536 extern (C) alias static c_int function (Notebook* this_, c_int object, void* user_data=null) nothrow signal_select_page;
20537 ulong signal_connect(string name:"select-page", CB/*:signal_select_page*/)
20538 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20539 if (is(typeof(cb)==signal_select_page)||_ttmm!(CB, signal_select_page)()) {
20540 return signal_connect_data!()(&this, cast(char*)"select-page",
20541 cast(GObject2.Callback)cb, data, null, cf);
20543 extern (C) alias static void function (Notebook* this_, void* object, c_uint p0, void* user_data=null) nothrow signal_switch_page;
20544 ulong signal_connect(string name:"switch-page", CB/*:signal_switch_page*/)
20545 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20546 if (is(typeof(cb)==signal_switch_page)||_ttmm!(CB, signal_switch_page)()) {
20547 return signal_connect_data!()(&this, cast(char*)"switch-page",
20548 cast(GObject2.Callback)cb, data, null, cf);
20552 struct NotebookClass {
20553 ContainerClass parent_class;
20554 extern (C) void function (Notebook* notebook, NotebookPage* page, uint page_num) nothrow switch_page;
20555 extern (C) int function (Notebook* notebook, int move_focus) nothrow select_page;
20556 extern (C) int function (Notebook* notebook, NotebookTab type) nothrow focus_tab;
20557 extern (C) int function (Notebook* notebook, int offset) nothrow change_current_page;
20558 extern (C) void function (Notebook* notebook, DirectionType direction) nothrow move_focus_out;
20559 extern (C) int function (Notebook* notebook, DirectionType direction, int move_to_last) nothrow reorder_tab;
20560 extern (C) int function (Notebook* notebook, Widget* child, Widget* tab_label, Widget* menu_label, int position) nothrow insert_page;
20561 // Unintrospectable functionp: create_window() / ()
20562 extern (C) Notebook* function (Notebook* notebook, Widget* page, int x, int y) nothrow create_window;
20563 extern (C) void function () nothrow _gtk_reserved1;
20566 struct NotebookPage {
20569 enum NotebookTab {
20570 FIRST = 0,
20571 LAST = 1
20573 // Unintrospectable callback: NotebookWindowCreationFunc() / ()
20574 extern (C) alias Notebook* function (Notebook* source, Widget* page, int x, int y, void* data) nothrow NotebookWindowCreationFunc;
20576 enum NumberUpLayout {
20577 GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM = 0,
20578 GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP = 1,
20579 GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM = 2,
20580 GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP = 3,
20581 GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT = 4,
20582 GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT = 5,
20583 GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT = 6,
20584 GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT = 7
20586 struct Object /* : GObject.InitiallyUnowned */ {
20587 alias parent_instance this;
20588 alias parent_instance super_;
20589 alias parent_instance initiallyunowned;
20590 GObject2.InitiallyUnowned parent_instance;
20591 uint flags;
20593 // Unintrospectable constructor: new() / gtk_object_new()
20594 alias gtk_object_new new_; // Variadic
20595 static void add_arg_type(AT0)(AT0 /*char*/ arg_name, Type arg_type, uint arg_flags, uint arg_id) nothrow {
20596 gtk_object_add_arg_type(toCString!(char*)(arg_name), arg_type, arg_flags, arg_id);
20598 void destroy()() nothrow {
20599 gtk_object_destroy(&this);
20601 // Unintrospectable method: get() / gtk_object_get()
20602 /+ Not available -- variadic methods unsupported - use the C function directly.
20603 alias gtk_object_get get; // Variadic
20605 // Unintrospectable method: get_data() / gtk_object_get_data()
20606 void* get_data(AT0)(AT0 /*char*/ key) nothrow {
20607 return gtk_object_get_data(&this, toCString!(char*)(key));
20609 // Unintrospectable method: get_data_by_id() / gtk_object_get_data_by_id()
20610 void* get_data_by_id()(GLib2.Quark data_id) nothrow {
20611 return gtk_object_get_data_by_id(&this, data_id);
20613 // Unintrospectable method: get_user_data() / gtk_object_get_user_data()
20614 void* get_user_data()() nothrow {
20615 return gtk_object_get_user_data(&this);
20617 // Unintrospectable method: ref() / gtk_object_ref()
20618 Object* ref_()() nothrow {
20619 return gtk_object_ref(&this);
20621 void remove_data(AT0)(AT0 /*char*/ key) nothrow {
20622 gtk_object_remove_data(&this, toCString!(char*)(key));
20624 void remove_data_by_id()(GLib2.Quark data_id) nothrow {
20625 gtk_object_remove_data_by_id(&this, data_id);
20627 void remove_no_notify(AT0)(AT0 /*char*/ key) nothrow {
20628 gtk_object_remove_no_notify(&this, toCString!(char*)(key));
20630 void remove_no_notify_by_id()(GLib2.Quark key_id) nothrow {
20631 gtk_object_remove_no_notify_by_id(&this, key_id);
20633 // Unintrospectable method: set() / gtk_object_set()
20634 /+ Not available -- variadic methods unsupported - use the C function directly.
20635 alias gtk_object_set set; // Variadic
20637 void set_data(AT0, AT1)(AT0 /*char*/ key, AT1 /*void*/ data) nothrow {
20638 gtk_object_set_data(&this, toCString!(char*)(key), UpCast!(void*)(data));
20640 void set_data_by_id(AT0)(GLib2.Quark data_id, AT0 /*void*/ data) nothrow {
20641 gtk_object_set_data_by_id(&this, data_id, UpCast!(void*)(data));
20643 void set_data_by_id_full(AT0)(GLib2.Quark data_id, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
20644 gtk_object_set_data_by_id_full(&this, data_id, UpCast!(void*)(data), destroy);
20646 void set_data_full(AT0, AT1)(AT0 /*char*/ key, AT1 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
20647 gtk_object_set_data_full(&this, toCString!(char*)(key), UpCast!(void*)(data), destroy);
20649 void set_user_data(AT0)(AT0 /*void*/ data) nothrow {
20650 gtk_object_set_user_data(&this, UpCast!(void*)(data));
20652 void sink()() nothrow {
20653 gtk_object_sink(&this);
20655 void unref()() nothrow {
20656 gtk_object_unref(&this);
20658 void weakref(AT0)(GLib2.DestroyNotify notify, AT0 /*void*/ data) nothrow {
20659 gtk_object_weakref(&this, notify, UpCast!(void*)(data));
20661 void weakunref(AT0)(GLib2.DestroyNotify notify, AT0 /*void*/ data) nothrow {
20662 gtk_object_weakunref(&this, notify, UpCast!(void*)(data));
20664 extern (C) alias static void function (Object* this_, void* user_data=null) nothrow signal_destroy;
20666 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20667 return super_.signal_connect!name(cb, data, cf);
20670 ulong signal_connect(string name:"destroy", CB/*:signal_destroy*/)
20671 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20672 if (is(typeof(cb)==signal_destroy)||_ttmm!(CB, signal_destroy)()) {
20673 return signal_connect_data!()(&this, cast(char*)"destroy",
20674 cast(GObject2.Callback)cb, data, null, cf);
20678 struct ObjectClass {
20679 GObject2.InitiallyUnownedClass parent_class;
20680 extern (C) void function (Object* object, Arg* arg, uint arg_id) nothrow set_arg;
20681 extern (C) void function (Object* object, Arg* arg, uint arg_id) nothrow get_arg;
20682 extern (C) void function (Object* object) nothrow destroy;
20685 enum ObjectFlags {
20686 IN_DESTRUCTION = 1,
20687 FLOATING = 2,
20688 RESERVED_1 = 4,
20689 RESERVED_2 = 8
20692 // #GtkOffscreenWindow is strictly intended to be used for obtaining
20693 // snapshots of widgets that are not part of a normal widget hierarchy.
20694 // It differs from gtk_widget_get_snapshot() in that the widget you
20695 // want to get a snapshot of need not be displayed on the user's screen
20696 // as a part of a widget hierarchy. However, since #GtkOffscreenWindow
20697 // is a toplevel widget you cannot obtain snapshots of a full window
20698 // with it since you cannot pack a toplevel widget in another toplevel.
20700 // The idea is to take a widget and manually set the state of it,
20701 // add it to a #GtkOffscreenWindow and then retrieve the snapshot
20702 // as a #GdkPixmap or #GdkPixbuf.
20704 // #GtkOffscreenWindow derives from #GtkWindow only as an implementation
20705 // detail. Applications should not use any API specific to #GtkWindow
20706 // to operate on this object. It should be treated as a #GtkBin that
20707 // has no parent widget.
20709 // When contained offscreen widgets are redrawn, #GtkOffscreenWindow
20710 // will emit a #GtkWidget::damage-event signal.
20711 struct OffscreenWindow /* : Window */ {
20712 mixin Atk.ImplementorIface.__interface__;
20713 mixin Buildable.__interface__;
20714 alias parent_object this;
20715 alias parent_object super_;
20716 alias parent_object window;
20717 Window parent_object;
20720 // VERSION: 2.20
20721 // Creates a toplevel container widget that is used to retrieve
20722 // snapshots of widgets without showing them on the screen. For
20723 // widgets that are on the screen and part of a normal widget
20724 // hierarchy, gtk_widget_get_snapshot() can be used instead.
20725 // RETURNS: A pointer to a #GtkWidget
20726 static OffscreenWindow* new_()() nothrow {
20727 return gtk_offscreen_window_new();
20729 static auto opCall()() {
20730 return gtk_offscreen_window_new();
20733 // VERSION: 2.20
20734 // Retrieves a snapshot of the contained widget in the form of
20735 // a #GdkPixbuf. This is a new pixbuf with a reference count of 1,
20736 // and the application should unreference it once it is no longer
20737 // needed.
20738 // RETURNS: A #GdkPixbuf pointer, or %NULL.
20739 GdkPixbuf2.Pixbuf* /*new*/ get_pixbuf()() nothrow {
20740 return gtk_offscreen_window_get_pixbuf(&this);
20743 // VERSION: 2.20
20744 // Retrieves a snapshot of the contained widget in the form of
20745 // a #GdkPixmap. If you need to keep this around over window
20746 // resizes then you should add a reference to it.
20748 // or %NULL.
20749 // RETURNS: A #GdkPixmap pointer to the offscreen pixmap,
20750 Gdk2.Pixmap* get_pixmap()() nothrow {
20751 return gtk_offscreen_window_get_pixmap(&this);
20755 struct OffscreenWindowClass {
20756 WindowClass parent_class;
20759 struct OldEditable /* : Widget */ {
20760 mixin Atk.ImplementorIface.__interface__;
20761 mixin Buildable.__interface__;
20762 mixin Editable.__interface__;
20763 alias widget this;
20764 alias widget super_;
20765 Widget widget;
20766 uint current_pos, selection_start_pos, selection_end_pos;
20767 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
20768 uint, "has_selection", 1,
20769 uint, "editable", 1,
20770 uint, "visible", 1,
20771 uint, "__dummy32A", 29));
20772 private char* clipboard_text;
20774 // Emits the ::changed signal on @old_editable.
20775 void changed()() nothrow {
20776 gtk_old_editable_changed(&this);
20779 // Claims or gives up ownership of the selection.
20780 // <claim>: if %TRUE, claim ownership of the selection, if %FALSE, give up ownership
20781 // <time_>: timestamp for this operation
20782 void claim_selection()(int claim, uint time_) nothrow {
20783 gtk_old_editable_claim_selection(&this, claim, time_);
20785 extern (C) alias static void function (OldEditable* this_, void* user_data=null) nothrow signal_activate;
20787 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20788 return super_.signal_connect!name(cb, data, cf);
20791 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
20792 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20793 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
20794 return signal_connect_data!()(&this, cast(char*)"activate",
20795 cast(GObject2.Callback)cb, data, null, cf);
20797 extern (C) alias static void function (OldEditable* this_, void* user_data=null) nothrow signal_copy_clipboard;
20798 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)
20799 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20800 if (is(typeof(cb)==signal_copy_clipboard)||_ttmm!(CB, signal_copy_clipboard)()) {
20801 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
20802 cast(GObject2.Callback)cb, data, null, cf);
20804 extern (C) alias static void function (OldEditable* this_, void* user_data=null) nothrow signal_cut_clipboard;
20805 ulong signal_connect(string name:"cut-clipboard", CB/*:signal_cut_clipboard*/)
20806 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20807 if (is(typeof(cb)==signal_cut_clipboard)||_ttmm!(CB, signal_cut_clipboard)()) {
20808 return signal_connect_data!()(&this, cast(char*)"cut-clipboard",
20809 cast(GObject2.Callback)cb, data, null, cf);
20811 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) nothrow signal_kill_char;
20812 ulong signal_connect(string name:"kill-char", CB/*:signal_kill_char*/)
20813 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20814 if (is(typeof(cb)==signal_kill_char)||_ttmm!(CB, signal_kill_char)()) {
20815 return signal_connect_data!()(&this, cast(char*)"kill-char",
20816 cast(GObject2.Callback)cb, data, null, cf);
20818 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) nothrow signal_kill_line;
20819 ulong signal_connect(string name:"kill-line", CB/*:signal_kill_line*/)
20820 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20821 if (is(typeof(cb)==signal_kill_line)||_ttmm!(CB, signal_kill_line)()) {
20822 return signal_connect_data!()(&this, cast(char*)"kill-line",
20823 cast(GObject2.Callback)cb, data, null, cf);
20825 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) nothrow signal_kill_word;
20826 ulong signal_connect(string name:"kill-word", CB/*:signal_kill_word*/)
20827 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20828 if (is(typeof(cb)==signal_kill_word)||_ttmm!(CB, signal_kill_word)()) {
20829 return signal_connect_data!()(&this, cast(char*)"kill-word",
20830 cast(GObject2.Callback)cb, data, null, cf);
20832 extern (C) alias static void function (OldEditable* this_, int object, int p0, void* user_data=null) nothrow signal_move_cursor;
20833 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)
20834 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20835 if (is(typeof(cb)==signal_move_cursor)||_ttmm!(CB, signal_move_cursor)()) {
20836 return signal_connect_data!()(&this, cast(char*)"move-cursor",
20837 cast(GObject2.Callback)cb, data, null, cf);
20839 extern (C) alias static void function (OldEditable* this_, int object, int p0, void* user_data=null) nothrow signal_move_page;
20840 ulong signal_connect(string name:"move-page", CB/*:signal_move_page*/)
20841 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20842 if (is(typeof(cb)==signal_move_page)||_ttmm!(CB, signal_move_page)()) {
20843 return signal_connect_data!()(&this, cast(char*)"move-page",
20844 cast(GObject2.Callback)cb, data, null, cf);
20846 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) nothrow signal_move_to_column;
20847 ulong signal_connect(string name:"move-to-column", CB/*:signal_move_to_column*/)
20848 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20849 if (is(typeof(cb)==signal_move_to_column)||_ttmm!(CB, signal_move_to_column)()) {
20850 return signal_connect_data!()(&this, cast(char*)"move-to-column",
20851 cast(GObject2.Callback)cb, data, null, cf);
20853 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) nothrow signal_move_to_row;
20854 ulong signal_connect(string name:"move-to-row", CB/*:signal_move_to_row*/)
20855 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20856 if (is(typeof(cb)==signal_move_to_row)||_ttmm!(CB, signal_move_to_row)()) {
20857 return signal_connect_data!()(&this, cast(char*)"move-to-row",
20858 cast(GObject2.Callback)cb, data, null, cf);
20860 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) nothrow signal_move_word;
20861 ulong signal_connect(string name:"move-word", CB/*:signal_move_word*/)
20862 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20863 if (is(typeof(cb)==signal_move_word)||_ttmm!(CB, signal_move_word)()) {
20864 return signal_connect_data!()(&this, cast(char*)"move-word",
20865 cast(GObject2.Callback)cb, data, null, cf);
20867 extern (C) alias static void function (OldEditable* this_, void* user_data=null) nothrow signal_paste_clipboard;
20868 ulong signal_connect(string name:"paste-clipboard", CB/*:signal_paste_clipboard*/)
20869 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20870 if (is(typeof(cb)==signal_paste_clipboard)||_ttmm!(CB, signal_paste_clipboard)()) {
20871 return signal_connect_data!()(&this, cast(char*)"paste-clipboard",
20872 cast(GObject2.Callback)cb, data, null, cf);
20874 extern (C) alias static void function (OldEditable* this_, c_int object, void* user_data=null) nothrow signal_set_editable;
20875 ulong signal_connect(string name:"set-editable", CB/*:signal_set_editable*/)
20876 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20877 if (is(typeof(cb)==signal_set_editable)||_ttmm!(CB, signal_set_editable)()) {
20878 return signal_connect_data!()(&this, cast(char*)"set-editable",
20879 cast(GObject2.Callback)cb, data, null, cf);
20883 struct OldEditableClass {
20884 WidgetClass parent_class;
20885 extern (C) void function (OldEditable* editable) nothrow activate;
20886 extern (C) void function (OldEditable* editable, int is_editable) nothrow set_editable;
20887 extern (C) void function (OldEditable* editable, int x, int y) nothrow move_cursor;
20888 extern (C) void function (OldEditable* editable, int n) nothrow move_word;
20889 extern (C) void function (OldEditable* editable, int x, int y) nothrow move_page;
20890 extern (C) void function (OldEditable* editable, int row) nothrow move_to_row;
20891 extern (C) void function (OldEditable* editable, int row) nothrow move_to_column;
20892 extern (C) void function (OldEditable* editable, int direction) nothrow kill_char;
20893 extern (C) void function (OldEditable* editable, int direction) nothrow kill_word;
20894 extern (C) void function (OldEditable* editable, int direction) nothrow kill_line;
20895 extern (C) void function (OldEditable* editable) nothrow cut_clipboard;
20896 extern (C) void function (OldEditable* editable) nothrow copy_clipboard;
20897 extern (C) void function (OldEditable* editable) nothrow paste_clipboard;
20898 extern (C) void function (OldEditable* editable, int start_pos, int end_pos) nothrow update_text;
20899 extern (C) char* /*new*/ function (OldEditable* editable, int start_pos, int end_pos) nothrow get_chars;
20900 extern (C) void function (OldEditable* editable, int start_pos, int end_pos) nothrow set_selection;
20901 extern (C) void function (OldEditable* editable, int position) nothrow set_position;
20904 struct OptionMenu /* : Button */ {
20905 mixin Atk.ImplementorIface.__interface__;
20906 mixin Activatable.__interface__;
20907 mixin Buildable.__interface__;
20908 alias button this;
20909 alias button super_;
20910 Button button;
20911 Widget* menu, menu_item;
20912 ushort width, height;
20914 static OptionMenu* new_()() nothrow {
20915 return gtk_option_menu_new();
20917 static auto opCall()() {
20918 return gtk_option_menu_new();
20921 // DEPRECATED (v2.4) method: get_history - Use #GtkComboBox instead.
20922 // Retrieves the index of the currently selected menu item. The menu
20923 // items are numbered from top to bottom, starting with 0.
20924 // RETURNS: index of the selected menu item, or -1 if there are no menu items
20925 int get_history()() nothrow {
20926 return gtk_option_menu_get_history(&this);
20928 // Unintrospectable method: get_menu() / gtk_option_menu_get_menu()
20929 Widget* get_menu()() nothrow {
20930 return gtk_option_menu_get_menu(&this);
20932 void remove_menu()() nothrow {
20933 gtk_option_menu_remove_menu(&this);
20935 void set_history()(uint index_) nothrow {
20936 gtk_option_menu_set_history(&this, index_);
20938 void set_menu(AT0)(AT0 /*Widget*/ menu) nothrow {
20939 gtk_option_menu_set_menu(&this, UpCast!(Widget*)(menu));
20941 extern (C) alias static void function (OptionMenu* this_, void* user_data=null) nothrow signal_changed;
20943 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20944 return super_.signal_connect!name(cb, data, cf);
20947 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
20948 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
20949 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
20950 return signal_connect_data!()(&this, cast(char*)"changed",
20951 cast(GObject2.Callback)cb, data, null, cf);
20955 struct OptionMenuClass {
20956 ButtonClass parent_class;
20957 extern (C) void function (OptionMenu* option_menu) nothrow changed;
20958 extern (C) void function () nothrow _gtk_reserved1;
20959 extern (C) void function () nothrow _gtk_reserved2;
20960 extern (C) void function () nothrow _gtk_reserved3;
20961 extern (C) void function () nothrow _gtk_reserved4;
20964 struct Orientable /* Interface */ {
20965 mixin template __interface__() {
20966 // VERSION: 2.16
20967 // Retrieves the orientation of the @orientable.
20968 // RETURNS: the orientation of the @orientable.
20969 Orientation get_orientation()() nothrow {
20970 return gtk_orientable_get_orientation(cast(Orientable*)&this);
20973 // VERSION: 2.16
20974 // Sets the orientation of the @orientable.
20975 // <orientation>: the orientable's new orientation.
20976 void set_orientation()(Orientation orientation) nothrow {
20977 gtk_orientable_set_orientation(cast(Orientable*)&this, orientation);
20980 mixin __interface__;
20983 struct OrientableIface {
20984 GObject2.TypeInterface base_iface;
20987 enum Orientation {
20988 HORIZONTAL = 0,
20989 VERTICAL = 1
20991 enum PAPER_NAME_A3 = "iso_a3";
20992 enum PAPER_NAME_A4 = "iso_a4";
20993 enum PAPER_NAME_A5 = "iso_a5";
20994 enum PAPER_NAME_B5 = "iso_b5";
20995 enum PAPER_NAME_EXECUTIVE = "na_executive";
20996 enum PAPER_NAME_LEGAL = "na_legal";
20997 enum PAPER_NAME_LETTER = "na_letter";
20998 enum int PARAM_READABLE = 0;
20999 enum int PARAM_READWRITE = 0;
21000 enum int PARAM_WRITABLE = 0;
21001 enum int PATH_PRIO_MASK = 15;
21002 enum PRINT_SETTINGS_COLLATE = "collate";
21003 enum PRINT_SETTINGS_DEFAULT_SOURCE = "default-source";
21004 enum PRINT_SETTINGS_DITHER = "dither";
21005 enum PRINT_SETTINGS_DUPLEX = "duplex";
21006 enum PRINT_SETTINGS_FINISHINGS = "finishings";
21007 enum PRINT_SETTINGS_MEDIA_TYPE = "media-type";
21008 enum PRINT_SETTINGS_NUMBER_UP = "number-up";
21009 enum PRINT_SETTINGS_NUMBER_UP_LAYOUT = "number-up-layout";
21010 enum PRINT_SETTINGS_N_COPIES = "n-copies";
21011 enum PRINT_SETTINGS_ORIENTATION = "orientation";
21012 enum PRINT_SETTINGS_OUTPUT_BIN = "output-bin";
21013 enum PRINT_SETTINGS_OUTPUT_FILE_FORMAT = "output-file-format";
21014 enum PRINT_SETTINGS_OUTPUT_URI = "output-uri";
21015 enum PRINT_SETTINGS_PAGE_RANGES = "page-ranges";
21016 enum PRINT_SETTINGS_PAGE_SET = "page-set";
21017 enum PRINT_SETTINGS_PAPER_FORMAT = "paper-format";
21018 enum PRINT_SETTINGS_PAPER_HEIGHT = "paper-height";
21019 enum PRINT_SETTINGS_PAPER_WIDTH = "paper-width";
21020 enum PRINT_SETTINGS_PRINTER = "printer";
21021 enum PRINT_SETTINGS_PRINTER_LPI = "printer-lpi";
21022 enum PRINT_SETTINGS_PRINT_PAGES = "print-pages";
21023 enum PRINT_SETTINGS_QUALITY = "quality";
21024 enum PRINT_SETTINGS_RESOLUTION = "resolution";
21025 enum PRINT_SETTINGS_RESOLUTION_X = "resolution-x";
21026 enum PRINT_SETTINGS_RESOLUTION_Y = "resolution-y";
21027 enum PRINT_SETTINGS_REVERSE = "reverse";
21028 enum PRINT_SETTINGS_SCALE = "scale";
21029 enum PRINT_SETTINGS_USE_COLOR = "use-color";
21030 enum PRINT_SETTINGS_WIN32_DRIVER_EXTRA = "win32-driver-extra";
21031 enum PRINT_SETTINGS_WIN32_DRIVER_VERSION = "win32-driver-version";
21032 enum int PRIORITY_REDRAW = 20;
21033 enum int PRIORITY_RESIZE = 10;
21034 enum PackDirection {
21035 LTR = 0,
21036 RTL = 1,
21037 TTB = 2,
21038 BTT = 3
21040 enum PackType {
21041 START = 0,
21042 END = 1
21044 enum PageOrientation {
21045 PORTRAIT = 0,
21046 LANDSCAPE = 1,
21047 REVERSE_PORTRAIT = 2,
21048 REVERSE_LANDSCAPE = 3
21050 struct PageRange {
21051 int start, end;
21054 enum PageSet {
21055 ALL = 0,
21056 EVEN = 1,
21057 ODD = 2
21059 struct PageSetup /* : GObject.Object */ {
21060 alias method_parent this;
21061 alias method_parent super_;
21062 alias method_parent object;
21063 GObject2.Object method_parent;
21066 // VERSION: 2.10
21067 // Creates a new #GtkPageSetup.
21068 // RETURNS: a new #GtkPageSetup.
21069 static PageSetup* /*new*/ new_()() nothrow {
21070 return gtk_page_setup_new();
21072 static auto opCall()() {
21073 return gtk_page_setup_new();
21076 // VERSION: 2.12
21077 // Reads the page setup from the file @file_name. Returns a
21078 // new #GtkPageSetup object with the restored page setup,
21079 // or %NULL if an error occurred. See gtk_page_setup_to_file().
21080 // RETURNS: the restored #GtkPageSetup
21081 // <file_name>: the filename to read the page setup from
21082 static PageSetup* /*new*/ new_from_file(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) nothrow {
21083 return gtk_page_setup_new_from_file(toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
21085 static auto opCall(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) {
21086 return gtk_page_setup_new_from_file(toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
21089 // VERSION: 2.12
21090 // Reads the page setup from the group @group_name in the key file
21091 // @key_file. Returns a new #GtkPageSetup object with the restored
21092 // page setup, or %NULL if an error occurred.
21093 // RETURNS: the restored #GtkPageSetup
21094 // <key_file>: the #GKeyFile to retrieve the page_setup from
21095 // <group_name>: the name of the group in the key_file to read, or %NULL to use the default name "Page Setup"
21096 static PageSetup* /*new*/ new_from_key_file(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) nothrow {
21097 return gtk_page_setup_new_from_key_file(UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
21099 static auto opCall(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) {
21100 return gtk_page_setup_new_from_key_file(UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
21103 // VERSION: 2.10
21104 // Copies a #GtkPageSetup.
21105 // RETURNS: a copy of @other
21106 PageSetup* /*new*/ copy()() nothrow {
21107 return gtk_page_setup_copy(&this);
21110 // VERSION: 2.10
21111 // Gets the bottom margin in units of @unit.
21112 // RETURNS: the bottom margin
21113 // <unit>: the unit for the return value
21114 double get_bottom_margin()(Unit unit) nothrow {
21115 return gtk_page_setup_get_bottom_margin(&this, unit);
21118 // VERSION: 2.10
21119 // Gets the left margin in units of @unit.
21120 // RETURNS: the left margin
21121 // <unit>: the unit for the return value
21122 double get_left_margin()(Unit unit) nothrow {
21123 return gtk_page_setup_get_left_margin(&this, unit);
21126 // VERSION: 2.10
21127 // Gets the page orientation of the #GtkPageSetup.
21128 // RETURNS: the page orientation
21129 PageOrientation get_orientation()() nothrow {
21130 return gtk_page_setup_get_orientation(&this);
21133 // VERSION: 2.10
21134 // Returns the page height in units of @unit.
21136 // Note that this function takes orientation and
21137 // margins into consideration.
21138 // See gtk_page_setup_get_paper_height().
21139 // RETURNS: the page height.
21140 // <unit>: the unit for the return value
21141 double get_page_height()(Unit unit) nothrow {
21142 return gtk_page_setup_get_page_height(&this, unit);
21145 // VERSION: 2.10
21146 // Returns the page width in units of @unit.
21148 // Note that this function takes orientation and
21149 // margins into consideration.
21150 // See gtk_page_setup_get_paper_width().
21151 // RETURNS: the page width.
21152 // <unit>: the unit for the return value
21153 double get_page_width()(Unit unit) nothrow {
21154 return gtk_page_setup_get_page_width(&this, unit);
21157 // VERSION: 2.10
21158 // Returns the paper height in units of @unit.
21160 // Note that this function takes orientation, but
21161 // not margins into consideration.
21162 // See gtk_page_setup_get_page_height().
21163 // RETURNS: the paper height.
21164 // <unit>: the unit for the return value
21165 double get_paper_height()(Unit unit) nothrow {
21166 return gtk_page_setup_get_paper_height(&this, unit);
21169 // VERSION: 2.10
21170 // Gets the paper size of the #GtkPageSetup.
21171 // RETURNS: the paper size
21172 PaperSize* /*new*/ get_paper_size()() nothrow {
21173 return gtk_page_setup_get_paper_size(&this);
21176 // VERSION: 2.10
21177 // Returns the paper width in units of @unit.
21179 // Note that this function takes orientation, but
21180 // not margins into consideration.
21181 // See gtk_page_setup_get_page_width().
21182 // RETURNS: the paper width.
21183 // <unit>: the unit for the return value
21184 double get_paper_width()(Unit unit) nothrow {
21185 return gtk_page_setup_get_paper_width(&this, unit);
21188 // VERSION: 2.10
21189 // Gets the right margin in units of @unit.
21190 // RETURNS: the right margin
21191 // <unit>: the unit for the return value
21192 double get_right_margin()(Unit unit) nothrow {
21193 return gtk_page_setup_get_right_margin(&this, unit);
21196 // VERSION: 2.10
21197 // Gets the top margin in units of @unit.
21198 // RETURNS: the top margin
21199 // <unit>: the unit for the return value
21200 double get_top_margin()(Unit unit) nothrow {
21201 return gtk_page_setup_get_top_margin(&this, unit);
21204 // VERSION: 2.14
21205 // Reads the page setup from the file @file_name.
21206 // See gtk_page_setup_to_file().
21207 // RETURNS: %TRUE on success
21208 // <file_name>: the filename to read the page setup from
21209 int load_file(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) nothrow {
21210 return gtk_page_setup_load_file(&this, toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
21213 // VERSION: 2.14
21214 // Reads the page setup from the group @group_name in the key file
21215 // @key_file.
21216 // RETURNS: %TRUE on success
21217 // <key_file>: the #GKeyFile to retrieve the page_setup from
21218 // <group_name>: the name of the group in the key_file to read, or %NULL to use the default name "Page Setup"
21219 int load_key_file(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) nothrow {
21220 return gtk_page_setup_load_key_file(&this, UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
21223 // VERSION: 2.10
21224 // Sets the bottom margin of the #GtkPageSetup.
21225 // <margin>: the new bottom margin in units of @unit
21226 // <unit>: the units for @margin
21227 void set_bottom_margin()(double margin, Unit unit) nothrow {
21228 gtk_page_setup_set_bottom_margin(&this, margin, unit);
21231 // VERSION: 2.10
21232 // Sets the left margin of the #GtkPageSetup.
21233 // <margin>: the new left margin in units of @unit
21234 // <unit>: the units for @margin
21235 void set_left_margin()(double margin, Unit unit) nothrow {
21236 gtk_page_setup_set_left_margin(&this, margin, unit);
21239 // VERSION: 2.10
21240 // Sets the page orientation of the #GtkPageSetup.
21241 // <orientation>: a #GtkPageOrientation value
21242 void set_orientation()(PageOrientation orientation) nothrow {
21243 gtk_page_setup_set_orientation(&this, orientation);
21246 // VERSION: 2.10
21247 // Sets the paper size of the #GtkPageSetup without
21248 // changing the margins. See
21249 // gtk_page_setup_set_paper_size_and_default_margins().
21250 // <size>: a #GtkPaperSize
21251 void set_paper_size(AT0)(AT0 /*PaperSize*/ size) nothrow {
21252 gtk_page_setup_set_paper_size(&this, UpCast!(PaperSize*)(size));
21255 // VERSION: 2.10
21256 // Sets the paper size of the #GtkPageSetup and modifies
21257 // the margins according to the new paper size.
21258 // <size>: a #GtkPaperSize
21259 void set_paper_size_and_default_margins(AT0)(AT0 /*PaperSize*/ size) nothrow {
21260 gtk_page_setup_set_paper_size_and_default_margins(&this, UpCast!(PaperSize*)(size));
21263 // VERSION: 2.10
21264 // Sets the right margin of the #GtkPageSetup.
21265 // <margin>: the new right margin in units of @unit
21266 // <unit>: the units for @margin
21267 void set_right_margin()(double margin, Unit unit) nothrow {
21268 gtk_page_setup_set_right_margin(&this, margin, unit);
21271 // VERSION: 2.10
21272 // Sets the top margin of the #GtkPageSetup.
21273 // <margin>: the new top margin in units of @unit
21274 // <unit>: the units for @margin
21275 void set_top_margin()(double margin, Unit unit) nothrow {
21276 gtk_page_setup_set_top_margin(&this, margin, unit);
21279 // VERSION: 2.12
21280 // This function saves the information from @setup to @file_name.
21281 // RETURNS: %TRUE on success
21282 // <file_name>: the file to save to
21283 int to_file(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) nothrow {
21284 return gtk_page_setup_to_file(&this, toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
21287 // VERSION: 2.12
21288 // This function adds the page setup from @setup to @key_file.
21289 // <key_file>: the #GKeyFile to save the page setup to
21290 // <group_name>: the group to add the settings to in @key_file, or %NULL to use the default name "Page Setup"
21291 void to_key_file(AT0, AT1)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name) nothrow {
21292 gtk_page_setup_to_key_file(&this, UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name));
21296 extern (C) alias void function (PageSetup* page_setup, void* data) nothrow PageSetupDoneFunc;
21298 struct Paned /* : Container */ {
21299 mixin Atk.ImplementorIface.__interface__;
21300 mixin Buildable.__interface__;
21301 mixin Orientable.__interface__;
21302 alias container this;
21303 alias container super_;
21304 Container container;
21305 Widget* child1, child2;
21306 Gdk2.Window* handle;
21307 Gdk2.GC* xor_gc;
21308 Gdk2.CursorType cursor_type;
21309 private Gdk2.Rectangle handle_pos;
21310 private int child1_size, last_allocation, min_position, max_position;
21311 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
21312 uint, "position_set", 1,
21313 uint, "in_drag", 1,
21314 uint, "child1_shrink", 1,
21315 uint, "child1_resize", 1,
21316 uint, "child2_shrink", 1,
21317 uint, "child2_resize", 1,
21318 uint, "orientation", 1,
21319 uint, "in_recursion", 1,
21320 uint, "handle_prelit", 1,
21321 uint, "__dummy32A", 23));
21322 private Widget* last_child1_focus, last_child2_focus;
21323 private PanedPrivate* priv;
21324 private int drag_pos, original_position;
21326 void add1(AT0)(AT0 /*Widget*/ child) nothrow {
21327 gtk_paned_add1(&this, UpCast!(Widget*)(child));
21329 void add2(AT0)(AT0 /*Widget*/ child) nothrow {
21330 gtk_paned_add2(&this, UpCast!(Widget*)(child));
21332 void compute_position()(int allocation, int child1_req, int child2_req) nothrow {
21333 gtk_paned_compute_position(&this, allocation, child1_req, child2_req);
21336 // VERSION: 2.4
21337 // Obtains the first child of the paned widget.
21338 // RETURNS: first child, or %NULL if it is not set.
21339 Widget* get_child1()() nothrow {
21340 return gtk_paned_get_child1(&this);
21343 // VERSION: 2.4
21344 // Obtains the second child of the paned widget.
21345 // RETURNS: second child, or %NULL if it is not set.
21346 Widget* get_child2()() nothrow {
21347 return gtk_paned_get_child2(&this);
21350 // VERSION: 2.20
21351 // Returns the #GdkWindow of the handle. This function is
21352 // useful when handling button or motion events because it
21353 // enables the callback to distinguish between the window
21354 // of the paned, a child and the handle.
21355 // RETURNS: the paned's handle window.
21356 Gdk2.Window* get_handle_window()() nothrow {
21357 return gtk_paned_get_handle_window(&this);
21360 // Obtains the position of the divider between the two panes.
21361 // RETURNS: position of the divider
21362 int get_position()() nothrow {
21363 return gtk_paned_get_position(&this);
21365 void pack1(AT0)(AT0 /*Widget*/ child, int resize, int shrink) nothrow {
21366 gtk_paned_pack1(&this, UpCast!(Widget*)(child), resize, shrink);
21368 void pack2(AT0)(AT0 /*Widget*/ child, int resize, int shrink) nothrow {
21369 gtk_paned_pack2(&this, UpCast!(Widget*)(child), resize, shrink);
21372 // Sets the position of the divider between the two panes.
21373 // <position>: pixel position of divider, a negative value means that the position is unset.
21374 void set_position()(int position) nothrow {
21375 gtk_paned_set_position(&this, position);
21378 // VERSION: 2.0
21379 // The ::accept-position signal is a
21380 // <link linkend="keybinding-signals">keybinding signal</link>
21381 // which gets emitted to accept the current position of the handle when
21382 // moving it using key bindings.
21384 // The default binding for this signal is Return or Space.
21385 extern (C) alias static c_int function (Paned* this_, void* user_data=null) nothrow signal_accept_position;
21387 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21388 return super_.signal_connect!name(cb, data, cf);
21391 ulong signal_connect(string name:"accept-position", CB/*:signal_accept_position*/)
21392 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
21393 if (is(typeof(cb)==signal_accept_position)||_ttmm!(CB, signal_accept_position)()) {
21394 return signal_connect_data!()(&this, cast(char*)"accept-position",
21395 cast(GObject2.Callback)cb, data, null, cf);
21398 // VERSION: 2.0
21399 // The ::cancel-position signal is a
21400 // <link linkend="keybinding-signals">keybinding signal</link>
21401 // which gets emitted to cancel moving the position of the handle using key
21402 // bindings. The position of the handle will be reset to the value prior to
21403 // moving it.
21405 // The default binding for this signal is Escape.
21406 extern (C) alias static c_int function (Paned* this_, void* user_data=null) nothrow signal_cancel_position;
21407 ulong signal_connect(string name:"cancel-position", CB/*:signal_cancel_position*/)
21408 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
21409 if (is(typeof(cb)==signal_cancel_position)||_ttmm!(CB, signal_cancel_position)()) {
21410 return signal_connect_data!()(&this, cast(char*)"cancel-position",
21411 cast(GObject2.Callback)cb, data, null, cf);
21414 // VERSION: 2.0
21415 // The ::cycle-child-focus signal is a
21416 // <link linkend="keybinding-signals">keybinding signal</link>
21417 // which gets emitted to cycle the focus between the children of the paned.
21419 // The default binding is f6.
21420 // <reversed>: whether cycling backward or forward
21421 extern (C) alias static c_int function (Paned* this_, c_int reversed, void* user_data=null) nothrow signal_cycle_child_focus;
21422 ulong signal_connect(string name:"cycle-child-focus", CB/*:signal_cycle_child_focus*/)
21423 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
21424 if (is(typeof(cb)==signal_cycle_child_focus)||_ttmm!(CB, signal_cycle_child_focus)()) {
21425 return signal_connect_data!()(&this, cast(char*)"cycle-child-focus",
21426 cast(GObject2.Callback)cb, data, null, cf);
21429 // VERSION: 2.0
21430 // The ::cycle-handle-focus signal is a
21431 // <link linkend="keybinding-signals">keybinding signal</link>
21432 // which gets emitted to cycle whether the paned should grab focus to allow
21433 // the user to change position of the handle by using key bindings.
21435 // The default binding for this signal is f8.
21436 // <reversed>: whether cycling backward or forward
21437 extern (C) alias static c_int function (Paned* this_, c_int reversed, void* user_data=null) nothrow signal_cycle_handle_focus;
21438 ulong signal_connect(string name:"cycle-handle-focus", CB/*:signal_cycle_handle_focus*/)
21439 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
21440 if (is(typeof(cb)==signal_cycle_handle_focus)||_ttmm!(CB, signal_cycle_handle_focus)()) {
21441 return signal_connect_data!()(&this, cast(char*)"cycle-handle-focus",
21442 cast(GObject2.Callback)cb, data, null, cf);
21445 // VERSION: 2.0
21446 // The ::move-handle signal is a
21447 // <link linkend="keybinding-signals">keybinding signal</link>
21448 // which gets emitted to move the handle when the user is using key bindings
21449 // to move it.
21450 // <scroll_type>: a #GtkScrollType
21451 extern (C) alias static c_int function (Paned* this_, ScrollType* scroll_type, void* user_data=null) nothrow signal_move_handle;
21452 ulong signal_connect(string name:"move-handle", CB/*:signal_move_handle*/)
21453 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
21454 if (is(typeof(cb)==signal_move_handle)||_ttmm!(CB, signal_move_handle)()) {
21455 return signal_connect_data!()(&this, cast(char*)"move-handle",
21456 cast(GObject2.Callback)cb, data, null, cf);
21459 // VERSION: 2.0
21460 // The ::toggle-handle-focus is a
21461 // <link linkend="keybinding-signals">keybinding signal</link>
21462 // which gets emitted to accept the current position of the handle and then
21463 // move focus to the next widget in the focus chain.
21465 // The default binding is Tab.
21466 extern (C) alias static c_int function (Paned* this_, void* user_data=null) nothrow signal_toggle_handle_focus;
21467 ulong signal_connect(string name:"toggle-handle-focus", CB/*:signal_toggle_handle_focus*/)
21468 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
21469 if (is(typeof(cb)==signal_toggle_handle_focus)||_ttmm!(CB, signal_toggle_handle_focus)()) {
21470 return signal_connect_data!()(&this, cast(char*)"toggle-handle-focus",
21471 cast(GObject2.Callback)cb, data, null, cf);
21475 struct PanedClass {
21476 ContainerClass parent_class;
21477 extern (C) int function (Paned* paned, int reverse) nothrow cycle_child_focus;
21478 extern (C) int function (Paned* paned) nothrow toggle_handle_focus;
21479 extern (C) int function (Paned* paned, ScrollType scroll) nothrow move_handle;
21480 extern (C) int function (Paned* paned, int reverse) nothrow cycle_handle_focus;
21481 extern (C) int function (Paned* paned) nothrow accept_position;
21482 extern (C) int function (Paned* paned) nothrow cancel_position;
21483 extern (C) void function () nothrow _gtk_reserved1;
21484 extern (C) void function () nothrow _gtk_reserved2;
21485 extern (C) void function () nothrow _gtk_reserved3;
21486 extern (C) void function () nothrow _gtk_reserved4;
21489 struct PanedPrivate {
21492 struct PaperSize {
21494 // VERSION: 2.10
21495 // Creates a new #GtkPaperSize object by parsing a
21496 // <ulink url="ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf">PWG 5101.1-2002</ulink>
21497 // paper name.
21499 // If @name is %NULL, the default paper size is returned,
21500 // see gtk_paper_size_get_default().
21502 // to free it
21503 // RETURNS: a new #GtkPaperSize, use gtk_paper_size_free()
21504 // <name>: a paper size name, or %NULL
21505 static PaperSize* /*new*/ new_(AT0)(AT0 /*char*/ name=null) nothrow {
21506 return gtk_paper_size_new(toCString!(char*)(name));
21508 static auto opCall(AT0)(AT0 /*char*/ name=null) {
21509 return gtk_paper_size_new(toCString!(char*)(name));
21512 // VERSION: 2.10
21513 // Creates a new #GtkPaperSize object with the
21514 // given parameters.
21516 // to free it
21517 // RETURNS: a new #GtkPaperSize object, use gtk_paper_size_free()
21518 // <name>: the paper name
21519 // <display_name>: the human-readable name
21520 // <width>: the paper width, in units of @unit
21521 // <height>: the paper height, in units of @unit
21522 // <unit>: the unit for @width and @height
21523 static PaperSize* /*new*/ new_custom(AT0, AT1)(AT0 /*char*/ name, AT1 /*char*/ display_name, double width, double height, Unit unit) nothrow {
21524 return gtk_paper_size_new_custom(toCString!(char*)(name), toCString!(char*)(display_name), width, height, unit);
21526 static auto opCall(AT0, AT1)(AT0 /*char*/ name, AT1 /*char*/ display_name, double width, double height, Unit unit) {
21527 return gtk_paper_size_new_custom(toCString!(char*)(name), toCString!(char*)(display_name), width, height, unit);
21530 // VERSION: 2.12
21531 // Reads a paper size from the group @group_name in the key file
21532 // @key_file.
21534 // paper size, or %NULL if an error occurred.
21535 // RETURNS: a new #GtkPaperSize object with the restored
21536 // <key_file>: the #GKeyFile to retrieve the papersize from
21537 // <group_name>: the name ofthe group in the key file to read, or %NULL to read the first group
21538 static PaperSize* /*new*/ new_from_key_file(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) nothrow {
21539 return gtk_paper_size_new_from_key_file(UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
21541 static auto opCall(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) {
21542 return gtk_paper_size_new_from_key_file(UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
21545 // VERSION: 2.10
21546 // Creates a new #GtkPaperSize object by using
21547 // PPD information.
21549 // If @ppd_name is not a recognized PPD paper name,
21550 // @ppd_display_name, @width and @height are used to
21551 // construct a custom #GtkPaperSize object.
21553 // to free it
21554 // RETURNS: a new #GtkPaperSize, use gtk_paper_size_free()
21555 // <ppd_name>: a PPD paper name
21556 // <ppd_display_name>: the corresponding human-readable name
21557 // <width>: the paper width, in points
21558 // <height>: the paper height in points
21559 static PaperSize* /*new*/ new_from_ppd(AT0, AT1)(AT0 /*char*/ ppd_name, AT1 /*char*/ ppd_display_name, double width, double height) nothrow {
21560 return gtk_paper_size_new_from_ppd(toCString!(char*)(ppd_name), toCString!(char*)(ppd_display_name), width, height);
21562 static auto opCall(AT0, AT1)(AT0 /*char*/ ppd_name, AT1 /*char*/ ppd_display_name, double width, double height) {
21563 return gtk_paper_size_new_from_ppd(toCString!(char*)(ppd_name), toCString!(char*)(ppd_display_name), width, height);
21566 // VERSION: 2.10
21567 // Copies an existing #GtkPaperSize.
21568 // RETURNS: a copy of @other
21569 PaperSize* /*new*/ copy()() nothrow {
21570 return gtk_paper_size_copy(&this);
21573 // VERSION: 2.10
21574 // Free the given #GtkPaperSize object.
21575 void free()() nothrow {
21576 gtk_paper_size_free(&this);
21579 // VERSION: 2.10
21580 // Gets the default bottom margin for the #GtkPaperSize.
21581 // RETURNS: the default bottom margin
21582 // <unit>: the unit for the return value
21583 double get_default_bottom_margin()(Unit unit) nothrow {
21584 return gtk_paper_size_get_default_bottom_margin(&this, unit);
21587 // VERSION: 2.10
21588 // Gets the default left margin for the #GtkPaperSize.
21589 // RETURNS: the default left margin
21590 // <unit>: the unit for the return value
21591 double get_default_left_margin()(Unit unit) nothrow {
21592 return gtk_paper_size_get_default_left_margin(&this, unit);
21595 // VERSION: 2.10
21596 // Gets the default right margin for the #GtkPaperSize.
21597 // RETURNS: the default right margin
21598 // <unit>: the unit for the return value
21599 double get_default_right_margin()(Unit unit) nothrow {
21600 return gtk_paper_size_get_default_right_margin(&this, unit);
21603 // VERSION: 2.10
21604 // Gets the default top margin for the #GtkPaperSize.
21605 // RETURNS: the default top margin
21606 // <unit>: the unit for the return value
21607 double get_default_top_margin()(Unit unit) nothrow {
21608 return gtk_paper_size_get_default_top_margin(&this, unit);
21611 // VERSION: 2.10
21612 // Gets the human-readable name of the #GtkPaperSize.
21613 // RETURNS: the human-readable name of @size
21614 char* get_display_name()() nothrow {
21615 return gtk_paper_size_get_display_name(&this);
21618 // VERSION: 2.10
21619 // Gets the paper height of the #GtkPaperSize, in
21620 // units of @unit.
21621 // RETURNS: the paper height
21622 // <unit>: the unit for the return value
21623 double get_height()(Unit unit) nothrow {
21624 return gtk_paper_size_get_height(&this, unit);
21627 // VERSION: 2.10
21628 // Gets the name of the #GtkPaperSize.
21629 // RETURNS: the name of @size
21630 char* get_name()() nothrow {
21631 return gtk_paper_size_get_name(&this);
21634 // VERSION: 2.10
21635 // Gets the PPD name of the #GtkPaperSize, which
21636 // may be %NULL.
21637 // RETURNS: the PPD name of @size
21638 char* get_ppd_name()() nothrow {
21639 return gtk_paper_size_get_ppd_name(&this);
21642 // VERSION: 2.10
21643 // Gets the paper width of the #GtkPaperSize, in
21644 // units of @unit.
21645 // RETURNS: the paper width
21646 // <unit>: the unit for the return value
21647 double get_width()(Unit unit) nothrow {
21648 return gtk_paper_size_get_width(&this, unit);
21651 // Returns %TRUE if @size is not a standard paper size.
21652 // RETURNS: whether @size is a custom paper size.
21653 int is_custom()() nothrow {
21654 return gtk_paper_size_is_custom(&this);
21657 // VERSION: 2.10
21658 // Compares two #GtkPaperSize objects.
21660 // represent the same paper size
21661 // RETURNS: %TRUE, if @size1 and @size2
21662 // <size2>: another #GtkPaperSize object
21663 int is_equal(AT0)(AT0 /*PaperSize*/ size2) nothrow {
21664 return gtk_paper_size_is_equal(&this, UpCast!(PaperSize*)(size2));
21667 // VERSION: 2.10
21668 // Changes the dimensions of a @size to @width x @height.
21669 // <width>: the new width in units of @unit
21670 // <height>: the new height in units of @unit
21671 // <unit>: the unit for @width and @height
21672 void set_size()(double width, double height, Unit unit) nothrow {
21673 gtk_paper_size_set_size(&this, width, height, unit);
21676 // VERSION: 2.12
21677 // This function adds the paper size from @size to @key_file.
21678 // <key_file>: the #GKeyFile to save the paper size to
21679 // <group_name>: the group to add the settings to in @key_file
21680 void to_key_file(AT0, AT1)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name) nothrow {
21681 gtk_paper_size_to_key_file(&this, UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name));
21684 // VERSION: 2.10
21685 // Returns the name of the default paper size, which
21686 // depends on the current locale.
21688 // is owned by GTK+ and should not be modified.
21689 // RETURNS: the name of the default paper size. The string
21690 static char* get_default()() nothrow {
21691 return gtk_paper_size_get_default();
21694 // VERSION: 2.12
21695 // Creates a list of known paper sizes.
21697 // allocated #GtkPaperSize objects
21698 // RETURNS: a newly allocated list of newly
21699 // <include_custom>: whether to include custom paper sizes as defined in the page setup dialog
21700 static GLib2.List* /*new*/ get_paper_sizes()(int include_custom) nothrow {
21701 return gtk_paper_size_get_paper_sizes(include_custom);
21705 enum PathPriorityType {
21706 LOWEST = 0,
21707 GTK = 4,
21708 APPLICATION = 8,
21709 THEME = 10,
21710 RC = 12,
21711 HIGHEST = 15
21713 enum PathType {
21714 WIDGET = 0,
21715 WIDGET_CLASS = 1,
21716 CLASS = 2
21718 struct Pixmap /* : Misc */ {
21719 mixin Atk.ImplementorIface.__interface__;
21720 mixin Buildable.__interface__;
21721 alias misc this;
21722 alias misc super_;
21723 Misc misc;
21724 Gdk2.Pixmap* pixmap;
21725 Gdk2.Bitmap* mask;
21726 Gdk2.Pixmap* pixmap_insensitive;
21727 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
21728 uint, "build_insensitive", 1,
21729 uint, "__dummy32A", 31));
21731 static Pixmap* new_(AT0, AT1)(AT0 /*Gdk2.Pixmap*/ pixmap, AT1 /*Gdk2.Bitmap*/ mask=null) nothrow {
21732 return gtk_pixmap_new(UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
21734 static auto opCall(AT0, AT1)(AT0 /*Gdk2.Pixmap*/ pixmap, AT1 /*Gdk2.Bitmap*/ mask=null) {
21735 return gtk_pixmap_new(UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
21737 void get(AT0, AT1)(AT0 /*Gdk2.Pixmap**/ val, AT1 /*Gdk2.Bitmap**/ mask) nothrow {
21738 gtk_pixmap_get(&this, UpCast!(Gdk2.Pixmap**)(val), UpCast!(Gdk2.Bitmap**)(mask));
21740 void set(AT0, AT1)(AT0 /*Gdk2.Pixmap*/ val, AT1 /*Gdk2.Bitmap*/ mask) nothrow {
21741 gtk_pixmap_set(&this, UpCast!(Gdk2.Pixmap*)(val), UpCast!(Gdk2.Bitmap*)(mask));
21743 void set_build_insensitive()(int build) nothrow {
21744 gtk_pixmap_set_build_insensitive(&this, build);
21748 struct PixmapClass {
21749 MiscClass parent_class;
21753 // Together with #GtkSocket, #GtkPlug provides the ability
21754 // to embed widgets from one process into another process
21755 // in a fashion that is transparent to the user. One
21756 // process creates a #GtkSocket widget and passes the
21757 // ID of that widget's window to the other process,
21758 // which then creates a #GtkPlug with that window ID.
21759 // Any widgets contained in the #GtkPlug then will appear
21760 // inside the first application's window.
21762 // <note>
21763 // The #GtkPlug and #GtkSocket widgets are currently not available
21764 // on all platforms supported by GTK+.
21765 // </note>
21766 struct Plug /* : Window */ {
21767 mixin Atk.ImplementorIface.__interface__;
21768 mixin Buildable.__interface__;
21769 alias window this;
21770 alias window super_;
21771 Window window;
21772 Gdk2.Window* socket_window;
21773 Widget* modality_window;
21774 WindowGroup* modality_group;
21775 GLib2.HashTable* grabbed_keys;
21776 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
21777 uint, "same_app", 1,
21778 uint, "__dummy32A", 31));
21781 // Creates a new plug widget inside the #GtkSocket identified
21782 // by @socket_id. If @socket_id is 0, the plug is left "unplugged" and
21783 // can later be plugged into a #GtkSocket by gtk_socket_add_id().
21784 // RETURNS: the new #GtkPlug widget.
21785 // <socket_id>: the window ID of the socket, or 0.
21786 static Plug* new_()(Gdk2.NativeWindow socket_id) nothrow {
21787 return gtk_plug_new(socket_id);
21789 static auto opCall()(Gdk2.NativeWindow socket_id) {
21790 return gtk_plug_new(socket_id);
21793 // VERSION: 2.2
21794 // Create a new plug widget inside the #GtkSocket identified by socket_id.
21795 // RETURNS: the new #GtkPlug widget.
21796 // <display>: the #GdkDisplay on which @socket_id is displayed
21797 // <socket_id>: the XID of the socket's window.
21798 static Plug* new_for_display(AT0)(AT0 /*Gdk2.Display*/ display, Gdk2.NativeWindow socket_id) nothrow {
21799 return gtk_plug_new_for_display(UpCast!(Gdk2.Display*)(display), socket_id);
21801 static auto opCall(AT0)(AT0 /*Gdk2.Display*/ display, Gdk2.NativeWindow socket_id) {
21802 return gtk_plug_new_for_display(UpCast!(Gdk2.Display*)(display), socket_id);
21805 // Finish the initialization of @plug for a given #GtkSocket identified by
21806 // @socket_id. This function will generally only be used by classes deriving from #GtkPlug.
21807 // <socket_id>: the XID of the socket's window.
21808 void construct()(Gdk2.NativeWindow socket_id) nothrow {
21809 gtk_plug_construct(&this, socket_id);
21812 // VERSION: 2.2
21813 // Finish the initialization of @plug for a given #GtkSocket identified by
21814 // @socket_id which is currently displayed on @display.
21815 // This function will generally only be used by classes deriving from #GtkPlug.
21816 // <display>: the #GdkDisplay associated with @socket_id's #GtkSocket.
21817 // <socket_id>: the XID of the socket's window.
21818 void construct_for_display(AT0)(AT0 /*Gdk2.Display*/ display, Gdk2.NativeWindow socket_id) nothrow {
21819 gtk_plug_construct_for_display(&this, UpCast!(Gdk2.Display*)(display), socket_id);
21822 // VERSION: 2.14
21823 // Determines whether the plug is embedded in a socket.
21824 // RETURNS: %TRUE if the plug is embedded in a socket
21825 int get_embedded()() nothrow {
21826 return gtk_plug_get_embedded(&this);
21829 // Gets the window ID of a #GtkPlug widget, which can then
21830 // be used to embed this window inside another window, for
21831 // instance with gtk_socket_add_id().
21832 // RETURNS: the window ID for the plug
21833 Gdk2.NativeWindow get_id()() nothrow {
21834 return gtk_plug_get_id(&this);
21837 // VERSION: 2.14
21838 // Retrieves the socket the plug is embedded in.
21839 // RETURNS: the window of the socket, or %NULL
21840 Gdk2.Window* get_socket_window()() nothrow {
21841 return gtk_plug_get_socket_window(&this);
21843 // Gets emitted when the plug becomes embedded in a socket.
21844 extern (C) alias static void function (Plug* this_, void* user_data=null) nothrow signal_embedded;
21846 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21847 return super_.signal_connect!name(cb, data, cf);
21850 ulong signal_connect(string name:"embedded", CB/*:signal_embedded*/)
21851 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
21852 if (is(typeof(cb)==signal_embedded)||_ttmm!(CB, signal_embedded)()) {
21853 return signal_connect_data!()(&this, cast(char*)"embedded",
21854 cast(GObject2.Callback)cb, data, null, cf);
21858 struct PlugClass {
21859 WindowClass parent_class;
21860 extern (C) void function (Plug* plug) nothrow embedded;
21861 extern (C) void function () nothrow _gtk_reserved1;
21862 extern (C) void function () nothrow _gtk_reserved2;
21863 extern (C) void function () nothrow _gtk_reserved3;
21864 extern (C) void function () nothrow _gtk_reserved4;
21867 enum PolicyType {
21868 ALWAYS = 0,
21869 AUTOMATIC = 1,
21870 NEVER = 2
21872 enum PositionType {
21873 LEFT = 0,
21874 RIGHT = 1,
21875 TOP = 2,
21876 BOTTOM = 3
21878 struct Preview /* : Widget */ {
21879 mixin Atk.ImplementorIface.__interface__;
21880 mixin Buildable.__interface__;
21881 alias widget this;
21882 alias widget super_;
21883 Widget widget;
21884 ubyte* buffer;
21885 ushort buffer_width, buffer_height, bpp, rowstride;
21886 Gdk2.RgbDither dither;
21887 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
21888 uint, "type", 1,
21889 uint, "expand", 1,
21890 uint, "__dummy32A", 30));
21892 static Preview* new_()(PreviewType type) nothrow {
21893 return gtk_preview_new(type);
21895 static auto opCall()(PreviewType type) {
21896 return gtk_preview_new(type);
21898 // Unintrospectable function: get_cmap() / gtk_preview_get_cmap()
21899 static Gdk2.Colormap* get_cmap()() nothrow {
21900 return gtk_preview_get_cmap();
21902 // Unintrospectable function: get_info() / gtk_preview_get_info()
21903 static PreviewInfo* get_info()() nothrow {
21904 return gtk_preview_get_info();
21906 // Unintrospectable function: get_visual() / gtk_preview_get_visual()
21907 static Gdk2.Visual* get_visual()() nothrow {
21908 return gtk_preview_get_visual();
21910 static void reset()() nothrow {
21911 gtk_preview_reset();
21913 static void set_color_cube()(uint nred_shades, uint ngreen_shades, uint nblue_shades, uint ngray_shades) nothrow {
21914 gtk_preview_set_color_cube(nred_shades, ngreen_shades, nblue_shades, ngray_shades);
21916 static void set_gamma()(double gamma_) nothrow {
21917 gtk_preview_set_gamma(gamma_);
21919 static void set_install_cmap()(int install_cmap) nothrow {
21920 gtk_preview_set_install_cmap(install_cmap);
21922 static void set_reserved()(int nreserved) nothrow {
21923 gtk_preview_set_reserved(nreserved);
21925 static void uninit()() nothrow {
21926 gtk_preview_uninit();
21928 void draw_row(AT0)(AT0 /*ubyte*/ data, int x, int y, int w) nothrow {
21929 gtk_preview_draw_row(&this, UpCast!(ubyte*)(data), x, y, w);
21931 void put(AT0, AT1)(AT0 /*Gdk2.Window*/ window, AT1 /*Gdk2.GC*/ gc, int srcx, int srcy, int destx, int desty, int width, int height) nothrow {
21932 gtk_preview_put(&this, UpCast!(Gdk2.Window*)(window), UpCast!(Gdk2.GC*)(gc), srcx, srcy, destx, desty, width, height);
21934 void set_dither()(Gdk2.RgbDither dither) nothrow {
21935 gtk_preview_set_dither(&this, dither);
21937 void set_expand()(int expand) nothrow {
21938 gtk_preview_set_expand(&this, expand);
21940 void size()(int width, int height) nothrow {
21941 gtk_preview_size(&this, width, height);
21945 struct PreviewClass {
21946 WidgetClass parent_class;
21947 PreviewInfo info;
21950 struct PreviewInfo {
21951 ubyte* lookup;
21952 double gamma;
21955 enum PreviewType {
21956 COLOR = 0,
21957 GRAYSCALE = 1
21959 struct PrintContext /* : GObject.Object */ {
21960 alias method_parent this;
21961 alias method_parent super_;
21962 alias method_parent object;
21963 GObject2.Object method_parent;
21966 // VERSION: 2.10
21967 // Creates a new #PangoContext that can be used with the
21968 // #GtkPrintContext.
21969 // RETURNS: a new Pango context for @context
21970 Pango.Context* /*new*/ create_pango_context()() nothrow {
21971 return gtk_print_context_create_pango_context(&this);
21974 // VERSION: 2.10
21975 // Creates a new #PangoLayout that is suitable for use
21976 // with the #GtkPrintContext.
21977 // RETURNS: a new Pango layout for @context
21978 Pango.Layout* /*new*/ create_pango_layout()() nothrow {
21979 return gtk_print_context_create_pango_layout(&this);
21982 // VERSION: 2.10
21983 // Obtains the cairo context that is associated with the
21984 // #GtkPrintContext.
21985 // RETURNS: the cairo context of @context
21986 cairo.Context* get_cairo_context()() nothrow {
21987 return gtk_print_context_get_cairo_context(&this);
21990 // VERSION: 2.10
21991 // Obtains the horizontal resolution of the #GtkPrintContext,
21992 // in dots per inch.
21993 // RETURNS: the horizontal resolution of @context
21994 double get_dpi_x()() nothrow {
21995 return gtk_print_context_get_dpi_x(&this);
21998 // VERSION: 2.10
21999 // Obtains the vertical resolution of the #GtkPrintContext,
22000 // in dots per inch.
22001 // RETURNS: the vertical resolution of @context
22002 double get_dpi_y()() nothrow {
22003 return gtk_print_context_get_dpi_y(&this);
22006 // VERSION: 2.20
22007 // Obtains the hardware printer margins of the #GtkPrintContext, in units.
22008 // RETURNS: %TRUE if the hard margins were retrieved
22009 // <top>: top hardware printer margin
22010 // <bottom>: bottom hardware printer margin
22011 // <left>: left hardware printer margin
22012 // <right>: right hardware printer margin
22013 int get_hard_margins(AT0, AT1, AT2, AT3)(/*out*/ AT0 /*double*/ top, /*out*/ AT1 /*double*/ bottom, /*out*/ AT2 /*double*/ left, /*out*/ AT3 /*double*/ right) nothrow {
22014 return gtk_print_context_get_hard_margins(&this, UpCast!(double*)(top), UpCast!(double*)(bottom), UpCast!(double*)(left), UpCast!(double*)(right));
22017 // VERSION: 2.10
22018 // Obtains the height of the #GtkPrintContext, in pixels.
22019 // RETURNS: the height of @context
22020 double get_height()() nothrow {
22021 return gtk_print_context_get_height(&this);
22024 // VERSION: 2.10
22025 // Obtains the #GtkPageSetup that determines the page
22026 // dimensions of the #GtkPrintContext.
22027 // RETURNS: the page setup of @context
22028 PageSetup* get_page_setup()() nothrow {
22029 return gtk_print_context_get_page_setup(&this);
22032 // VERSION: 2.10
22033 // Returns a #PangoFontMap that is suitable for use
22034 // with the #GtkPrintContext.
22035 // RETURNS: the font map of @context
22036 Pango.FontMap* get_pango_fontmap()() nothrow {
22037 return gtk_print_context_get_pango_fontmap(&this);
22040 // VERSION: 2.10
22041 // Obtains the width of the #GtkPrintContext, in pixels.
22042 // RETURNS: the width of @context
22043 double get_width()() nothrow {
22044 return gtk_print_context_get_width(&this);
22047 // VERSION: 2.10
22048 // Sets a new cairo context on a print context.
22050 // This function is intended to be used when implementing
22051 // an internal print preview, it is not needed for printing,
22052 // since GTK+ itself creates a suitable cairo context in that
22053 // case.
22054 // <cr>: the cairo context
22055 // <dpi_x>: the horizontal resolution to use with @cr
22056 // <dpi_y>: the vertical resolution to use with @cr
22057 void set_cairo_context(AT0)(AT0 /*cairo.Context*/ cr, double dpi_x, double dpi_y) nothrow {
22058 gtk_print_context_set_cairo_context(&this, UpCast!(cairo.Context*)(cr), dpi_x, dpi_y);
22062 enum PrintDuplex {
22063 SIMPLEX = 0,
22064 HORIZONTAL = 1,
22065 VERTICAL = 2
22067 enum PrintError {
22068 GENERAL = 0,
22069 INTERNAL_ERROR = 1,
22070 NOMEM = 2,
22071 INVALID_FILE = 3
22073 extern (C) alias void function (void* func_data, char* str) nothrow PrintFunc;
22075 struct PrintOperation /* : GObject.Object */ {
22076 mixin PrintOperationPreview.__interface__;
22077 alias parent_instance this;
22078 alias parent_instance super_;
22079 alias parent_instance object;
22080 GObject2.Object parent_instance;
22081 PrintOperationPrivate* priv;
22084 // VERSION: 2.10
22085 // Creates a new #GtkPrintOperation.
22086 // RETURNS: a new #GtkPrintOperation
22087 static PrintOperation* /*new*/ new_()() nothrow {
22088 return gtk_print_operation_new();
22090 static auto opCall()() {
22091 return gtk_print_operation_new();
22094 // VERSION: 2.10
22095 // Cancels a running print operation. This function may
22096 // be called from a #GtkPrintOperation::begin-print,
22097 // #GtkPrintOperation::paginate or #GtkPrintOperation::draw-page
22098 // signal handler to stop the currently running print
22099 // operation.
22100 void cancel()() nothrow {
22101 gtk_print_operation_cancel(&this);
22104 // VERSION: 2.16
22105 // Signalize that drawing of particular page is complete.
22107 // It is called after completion of page drawing (e.g. drawing in another
22108 // thread).
22109 // If gtk_print_operation_set_defer_drawing() was called before, then this function
22110 // has to be called by application. In another case it is called by the library
22111 // itself.
22112 void draw_page_finish()() nothrow {
22113 gtk_print_operation_draw_page_finish(&this);
22116 // VERSION: 2.10
22117 // Returns the default page setup, see
22118 // gtk_print_operation_set_default_page_setup().
22119 // RETURNS: the default page setup
22120 PageSetup* get_default_page_setup()() nothrow {
22121 return gtk_print_operation_get_default_page_setup(&this);
22124 // VERSION: 2.18
22125 // Gets the value of #GtkPrintOperation::embed-page-setup property.
22126 // RETURNS: whether page setup selection combos are embedded
22127 int get_embed_page_setup()() nothrow {
22128 return gtk_print_operation_get_embed_page_setup(&this);
22131 // VERSION: 2.10
22132 // Call this when the result of a print operation is
22133 // %GTK_PRINT_OPERATION_RESULT_ERROR, either as returned by
22134 // gtk_print_operation_run(), or in the #GtkPrintOperation::done signal
22135 // handler. The returned #GError will contain more details on what went wrong.
22136 void get_error(AT0)(AT0 /*GLib2.Error**/ error=null) nothrow {
22137 gtk_print_operation_get_error(&this, UpCast!(GLib2.Error**)(error));
22140 // VERSION: 2.18
22141 // Gets the value of #GtkPrintOperation::has-selection property.
22142 // RETURNS: whether there is a selection
22143 int get_has_selection()() nothrow {
22144 return gtk_print_operation_get_has_selection(&this);
22147 // VERSION: 2.18
22148 // Returns the number of pages that will be printed.
22150 // Note that this value is set during print preparation phase
22151 // (%GTK_PRINT_STATUS_PREPARING), so this function should never be
22152 // called before the data generation phase (%GTK_PRINT_STATUS_GENERATING_DATA).
22153 // You can connect to the #GtkPrintOperation::status-changed signal
22154 // and call gtk_print_operation_get_n_pages_to_print() when
22155 // print status is %GTK_PRINT_STATUS_GENERATING_DATA.
22156 // This is typically used to track the progress of print operation.
22157 // RETURNS: the number of pages that will be printed
22158 int get_n_pages_to_print()() nothrow {
22159 return gtk_print_operation_get_n_pages_to_print(&this);
22162 // VERSION: 2.10
22163 // Returns the current print settings.
22165 // Note that the return value is %NULL until either
22166 // gtk_print_operation_set_print_settings() or
22167 // gtk_print_operation_run() have been called.
22168 // RETURNS: the current print settings of @op.
22169 PrintSettings* get_print_settings()() nothrow {
22170 return gtk_print_operation_get_print_settings(&this);
22173 // VERSION: 2.10
22174 // Returns the status of the print operation.
22175 // Also see gtk_print_operation_get_status_string().
22176 // RETURNS: the status of the print operation
22177 PrintStatus get_status()() nothrow {
22178 return gtk_print_operation_get_status(&this);
22181 // VERSION: 2.10
22182 // Returns a string representation of the status of the
22183 // print operation. The string is translated and suitable
22184 // for displaying the print status e.g. in a #GtkStatusbar.
22186 // Use gtk_print_operation_get_status() to obtain a status
22187 // value that is suitable for programmatic use.
22189 // of the print operation
22190 // RETURNS: a string representation of the status
22191 char* get_status_string()() nothrow {
22192 return gtk_print_operation_get_status_string(&this);
22195 // VERSION: 2.18
22196 // Gets the value of #GtkPrintOperation::support-selection property.
22197 // RETURNS: whether the application supports print of selection
22198 int get_support_selection()() nothrow {
22199 return gtk_print_operation_get_support_selection(&this);
22202 // VERSION: 2.10
22203 // A convenience function to find out if the print operation
22204 // is finished, either successfully (%GTK_PRINT_STATUS_FINISHED)
22205 // or unsuccessfully (%GTK_PRINT_STATUS_FINISHED_ABORTED).
22207 // Note: when you enable print status tracking the print operation
22208 // can be in a non-finished state even after done has been called, as
22209 // the operation status then tracks the print job status on the printer.
22210 // RETURNS: %TRUE, if the print operation is finished.
22211 int is_finished()() nothrow {
22212 return gtk_print_operation_is_finished(&this);
22215 // VERSION: 2.10
22216 // Runs the print operation, by first letting the user modify
22217 // print settings in the print dialog, and then print the document.
22219 // Normally that this function does not return until the rendering of all
22220 // pages is complete. You can connect to the
22221 // #GtkPrintOperation::status-changed signal on @op to obtain some
22222 // information about the progress of the print operation.
22223 // Furthermore, it may use a recursive mainloop to show the print dialog.
22225 // If you call gtk_print_operation_set_allow_async() or set the
22226 // #GtkPrintOperation:allow-async property the operation will run
22227 // asynchronously if this is supported on the platform. The
22228 // #GtkPrintOperation::done signal will be emitted with the result of the
22229 // operation when the it is done (i.e. when the dialog is canceled, or when
22230 // the print succeeds or fails).
22231 // |[
22232 // if (settings != NULL)
22233 // gtk_print_operation_set_print_settings (print, settings);
22235 // if (page_setup != NULL)
22236 // gtk_print_operation_set_default_page_setup (print, page_setup);
22238 // g_signal_connect (print, "begin-print",
22239 // G_CALLBACK (begin_print), &data);
22240 // g_signal_connect (print, "draw-page",
22241 // G_CALLBACK (draw_page), &data);
22243 // res = gtk_print_operation_run (print,
22244 // GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
22245 // parent,
22246 // &error);
22248 // if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
22249 // {
22250 // error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
22251 // GTK_DIALOG_DESTROY_WITH_PARENT,
22252 // GTK_MESSAGE_ERROR,
22253 // GTK_BUTTONS_CLOSE,
22254 // "Error printing file:\n%s",
22255 // error->message);
22256 // g_signal_connect (error_dialog, "response",
22257 // G_CALLBACK (gtk_widget_destroy), NULL);
22258 // gtk_widget_show (error_dialog);
22259 // g_error_free (error);
22260 // }
22261 // else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
22262 // {
22263 // if (settings != NULL)
22264 // g_object_unref (settings);
22265 // settings = g_object_ref (gtk_print_operation_get_print_settings (print));
22266 // }
22267 // ]|
22269 // Note that gtk_print_operation_run() can only be called once on a
22270 // given #GtkPrintOperation.
22272 // %GTK_PRINT_OPERATION_RESULT_APPLY indicates that the printing was
22273 // completed successfully. In this case, it is a good idea to obtain
22274 // the used print settings with gtk_print_operation_get_print_settings()
22275 // and store them for reuse with the next print operation. A value of
22276 // %GTK_PRINT_OPERATION_RESULT_IN_PROGRESS means the operation is running
22277 // asynchronously, and will emit the #GtkPrintOperation::done signal when
22278 // done.
22279 // RETURNS: the result of the print operation. A return value of
22280 // <action>: the action to start
22281 // <parent>: Transient parent of the dialog
22282 PrintOperationResult run(AT0, AT1)(PrintOperationAction action, AT0 /*Window*/ parent, AT1 /*GLib2.Error**/ error=null) nothrow {
22283 return gtk_print_operation_run(&this, action, UpCast!(Window*)(parent), UpCast!(GLib2.Error**)(error));
22286 // VERSION: 2.10
22287 // Sets whether the gtk_print_operation_run() may return
22288 // before the print operation is completed. Note that
22289 // some platforms may not allow asynchronous operation.
22290 // <allow_async>: %TRUE to allow asynchronous operation
22291 void set_allow_async()(int allow_async) nothrow {
22292 gtk_print_operation_set_allow_async(&this, allow_async);
22295 // VERSION: 2.10
22296 // Sets the current page.
22298 // If this is called before gtk_print_operation_run(),
22299 // the user will be able to select to print only the current page.
22301 // Note that this only makes sense for pre-paginated documents.
22302 // <current_page>: the current page, 0-based
22303 void set_current_page()(int current_page) nothrow {
22304 gtk_print_operation_set_current_page(&this, current_page);
22307 // VERSION: 2.10
22308 // Sets the label for the tab holding custom widgets.
22309 // <label>: the label to use, or %NULL to use the default label
22310 void set_custom_tab_label(AT0)(AT0 /*char*/ label=null) nothrow {
22311 gtk_print_operation_set_custom_tab_label(&this, toCString!(char*)(label));
22314 // VERSION: 2.10
22315 // Makes @default_page_setup the default page setup for @op.
22317 // This page setup will be used by gtk_print_operation_run(),
22318 // but it can be overridden on a per-page basis by connecting
22319 // to the #GtkPrintOperation::request-page-setup signal.
22320 // <default_page_setup>: a #GtkPageSetup, or %NULL
22321 void set_default_page_setup(AT0)(AT0 /*PageSetup*/ default_page_setup=null) nothrow {
22322 gtk_print_operation_set_default_page_setup(&this, UpCast!(PageSetup*)(default_page_setup));
22325 // VERSION: 2.16
22326 // Sets up the #GtkPrintOperation to wait for calling of
22327 // gtk_print_operation_draw_page_finish() from application. It can
22328 // be used for drawing page in another thread.
22330 // This function must be called in the callback of "draw-page" signal.
22331 void set_defer_drawing()() nothrow {
22332 gtk_print_operation_set_defer_drawing(&this);
22335 // VERSION: 2.18
22336 // Embed page size combo box and orientation combo box into page setup page.
22337 // Selected page setup is stored as default page setup in #GtkPrintOperation.
22338 // <embed>: %TRUE to embed page setup selection in the #GtkPrintDialog
22339 void set_embed_page_setup()(int embed) nothrow {
22340 gtk_print_operation_set_embed_page_setup(&this, embed);
22343 // VERSION: 2.10
22344 // Sets up the #GtkPrintOperation to generate a file instead
22345 // of showing the print dialog. The indended use of this function
22346 // is for implementing "Export to PDF" actions. Currently, PDF
22347 // is the only supported format.
22349 // "Print to PDF" support is independent of this and is done
22350 // by letting the user pick the "Print to PDF" item from the list
22351 // of printers in the print dialog.
22352 // <filename>: the filename for the exported file
22353 void set_export_filename(AT0)(AT0 /*char*/ filename) nothrow {
22354 gtk_print_operation_set_export_filename(&this, toCString!(char*)(filename));
22357 // VERSION: 2.18
22358 // Sets whether there is a selection to print.
22360 // Application has to set number of pages to which the selection
22361 // will draw by gtk_print_operation_set_n_pages() in a callback of
22362 // #GtkPrintOperation::begin-print.
22363 // <has_selection>: %TRUE indicates that a selection exists
22364 void set_has_selection()(int has_selection) nothrow {
22365 gtk_print_operation_set_has_selection(&this, has_selection);
22368 // VERSION: 2.10
22369 // Sets the name of the print job. The name is used to identify
22370 // the job (e.g. in monitoring applications like eggcups).
22372 // If you don't set a job name, GTK+ picks a default one by
22373 // numbering successive print jobs.
22374 // <job_name>: a string that identifies the print job
22375 void set_job_name(AT0)(AT0 /*char*/ job_name) nothrow {
22376 gtk_print_operation_set_job_name(&this, toCString!(char*)(job_name));
22379 // VERSION: 2.10
22380 // Sets the number of pages in the document.
22382 // This <emphasis>must</emphasis> be set to a positive number
22383 // before the rendering starts. It may be set in a
22384 // #GtkPrintOperation::begin-print signal hander.
22386 // Note that the page numbers passed to the
22387 // #GtkPrintOperation::request-page-setup
22388 // and #GtkPrintOperation::draw-page signals are 0-based, i.e. if
22389 // the user chooses to print all pages, the last ::draw-page signal
22390 // will be for page @n_pages - 1.
22391 // <n_pages>: the number of pages
22392 void set_n_pages()(int n_pages) nothrow {
22393 gtk_print_operation_set_n_pages(&this, n_pages);
22396 // VERSION: 2.10
22397 // Sets the print settings for @op. This is typically used to
22398 // re-establish print settings from a previous print operation,
22399 // see gtk_print_operation_run().
22400 // <print_settings>: #GtkPrintSettings
22401 void set_print_settings(AT0)(AT0 /*PrintSettings*/ print_settings=null) nothrow {
22402 gtk_print_operation_set_print_settings(&this, UpCast!(PrintSettings*)(print_settings));
22405 // VERSION: 2.10
22406 // If @show_progress is %TRUE, the print operation will show a
22407 // progress dialog during the print operation.
22408 // <show_progress>: %TRUE to show a progress dialog
22409 void set_show_progress()(int show_progress) nothrow {
22410 gtk_print_operation_set_show_progress(&this, show_progress);
22413 // VERSION: 2.18
22414 // Sets whether selection is supported by #GtkPrintOperation.
22415 // <support_selection>: %TRUE to support selection
22416 void set_support_selection()(int support_selection) nothrow {
22417 gtk_print_operation_set_support_selection(&this, support_selection);
22420 // VERSION: 2.10
22421 // If track_status is %TRUE, the print operation will try to continue report
22422 // on the status of the print job in the printer queues and printer. This
22423 // can allow your application to show things like "out of paper" issues,
22424 // and when the print job actually reaches the printer.
22426 // This function is often implemented using some form of polling, so it should
22427 // not be enabled unless needed.
22428 // <track_status>: %TRUE to track status after printing
22429 void set_track_print_status()(int track_status) nothrow {
22430 gtk_print_operation_set_track_print_status(&this, track_status);
22433 // VERSION: 2.10
22434 // Sets up the transformation for the cairo context obtained from
22435 // #GtkPrintContext in such a way that distances are measured in
22436 // units of @unit.
22437 // <unit>: the unit to use
22438 void set_unit()(Unit unit) nothrow {
22439 gtk_print_operation_set_unit(&this, unit);
22442 // VERSION: 2.10
22443 // If @full_page is %TRUE, the transformation for the cairo context
22444 // obtained from #GtkPrintContext puts the origin at the top left
22445 // corner of the page (which may not be the top left corner of the
22446 // sheet, depending on page orientation and the number of pages per
22447 // sheet). Otherwise, the origin is at the top left corner of the
22448 // imageable area (i.e. inside the margins).
22449 // <full_page>: %TRUE to set up the #GtkPrintContext for the full page
22450 void set_use_full_page()(int full_page) nothrow {
22451 gtk_print_operation_set_use_full_page(&this, full_page);
22454 // VERSION: 2.10
22455 // Emitted after the user has finished changing print settings
22456 // in the dialog, before the actual rendering starts.
22458 // A typical use for ::begin-print is to use the parameters from the
22459 // #GtkPrintContext and paginate the document accordingly, and then
22460 // set the number of pages with gtk_print_operation_set_n_pages().
22461 // <context>: the #GtkPrintContext for the current operation
22462 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, void* user_data=null) nothrow signal_begin_print;
22464 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22465 return super_.signal_connect!name(cb, data, cf);
22468 ulong signal_connect(string name:"begin-print", CB/*:signal_begin_print*/)
22469 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22470 if (is(typeof(cb)==signal_begin_print)||_ttmm!(CB, signal_begin_print)()) {
22471 return signal_connect_data!()(&this, cast(char*)"begin-print",
22472 cast(GObject2.Callback)cb, data, null, cf);
22475 // VERSION: 2.10
22476 // Emitted when displaying the print dialog. If you return a
22477 // widget in a handler for this signal it will be added to a custom
22478 // tab in the print dialog. You typically return a container widget
22479 // with multiple widgets in it.
22481 // The print dialog owns the returned widget, and its lifetime is not
22482 // controlled by the application. However, the widget is guaranteed
22483 // to stay around until the #GtkPrintOperation::custom-widget-apply
22484 // signal is emitted on the operation. Then you can read out any
22485 // information you need from the widgets.
22487 // the print dialog, or %NULL
22488 // RETURNS: A custom widget that gets embedded in
22489 extern (C) alias static GObject2.Object* function (PrintOperation* this_, void* user_data=null) nothrow signal_create_custom_widget;
22490 ulong signal_connect(string name:"create-custom-widget", CB/*:signal_create_custom_widget*/)
22491 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22492 if (is(typeof(cb)==signal_create_custom_widget)||_ttmm!(CB, signal_create_custom_widget)()) {
22493 return signal_connect_data!()(&this, cast(char*)"create-custom-widget",
22494 cast(GObject2.Callback)cb, data, null, cf);
22497 // VERSION: 2.10
22498 // Emitted right before #GtkPrintOperation::begin-print if you added
22499 // a custom widget in the #GtkPrintOperation::create-custom-widget handler.
22500 // When you get this signal you should read the information from the
22501 // custom widgets, as the widgets are not guaraneed to be around at a
22502 // later time.
22503 // <widget>: the custom widget added in create-custom-widget
22504 extern (C) alias static void function (PrintOperation* this_, Widget* widget, void* user_data=null) nothrow signal_custom_widget_apply;
22505 ulong signal_connect(string name:"custom-widget-apply", CB/*:signal_custom_widget_apply*/)
22506 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22507 if (is(typeof(cb)==signal_custom_widget_apply)||_ttmm!(CB, signal_custom_widget_apply)()) {
22508 return signal_connect_data!()(&this, cast(char*)"custom-widget-apply",
22509 cast(GObject2.Callback)cb, data, null, cf);
22512 // VERSION: 2.10
22513 // Emitted when the print operation run has finished doing
22514 // everything required for printing.
22516 // @result gives you information about what happened during the run.
22517 // If @result is %GTK_PRINT_OPERATION_RESULT_ERROR then you can call
22518 // gtk_print_operation_get_error() for more information.
22520 // If you enabled print status tracking then
22521 // gtk_print_operation_is_finished() may still return %FALSE
22522 // after #GtkPrintOperation::done was emitted.
22523 // <result>: the result of the print operation
22524 extern (C) alias static void function (PrintOperation* this_, PrintOperationResult* result, void* user_data=null) nothrow signal_done;
22525 ulong signal_connect(string name:"done", CB/*:signal_done*/)
22526 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22527 if (is(typeof(cb)==signal_done)||_ttmm!(CB, signal_done)()) {
22528 return signal_connect_data!()(&this, cast(char*)"done",
22529 cast(GObject2.Callback)cb, data, null, cf);
22532 // VERSION: 2.10
22533 // Emitted for every page that is printed. The signal handler
22534 // must render the @page_nr's page onto the cairo context obtained
22535 // from @context using gtk_print_context_get_cairo_context().
22536 // |[
22537 // static void
22538 // draw_page (GtkPrintOperation *operation,
22539 // GtkPrintContext *context,
22540 // gint page_nr,
22541 // gpointer user_data)
22542 // {
22543 // cairo_t *cr;
22544 // PangoLayout *layout;
22545 // gdouble width, text_height;
22546 // gint layout_height;
22547 // PangoFontDescription *desc;
22549 // cr = gtk_print_context_get_cairo_context (context);
22550 // width = gtk_print_context_get_width (context);
22552 // cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
22554 // cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
22555 // cairo_fill (cr);
22557 // layout = gtk_print_context_create_pango_layout (context);
22559 // desc = pango_font_description_from_string ("sans 14");
22560 // pango_layout_set_font_description (layout, desc);
22561 // pango_font_description_free (desc);
22563 // pango_layout_set_text (layout, "some text", -1);
22564 // pango_layout_set_width (layout, width * PANGO_SCALE);
22565 // pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
22567 // pango_layout_get_size (layout, NULL, &layout_height);
22568 // text_height = (gdouble)layout_height / PANGO_SCALE;
22570 // cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2);
22571 // pango_cairo_show_layout (cr, layout);
22573 // g_object_unref (layout);
22574 // }
22575 // ]|
22577 // Use gtk_print_operation_set_use_full_page() and
22578 // gtk_print_operation_set_unit() before starting the print operation
22579 // to set up the transformation of the cairo context according to your
22580 // needs.
22581 // <context>: the #GtkPrintContext for the current operation
22582 // <page_nr>: the number of the currently printed page (0-based)
22583 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, int page_nr, void* user_data=null) nothrow signal_draw_page;
22584 ulong signal_connect(string name:"draw-page", CB/*:signal_draw_page*/)
22585 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22586 if (is(typeof(cb)==signal_draw_page)||_ttmm!(CB, signal_draw_page)()) {
22587 return signal_connect_data!()(&this, cast(char*)"draw-page",
22588 cast(GObject2.Callback)cb, data, null, cf);
22591 // VERSION: 2.10
22592 // Emitted after all pages have been rendered.
22593 // A handler for this signal can clean up any resources that have
22594 // been allocated in the #GtkPrintOperation::begin-print handler.
22595 // <context>: the #GtkPrintContext for the current operation
22596 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, void* user_data=null) nothrow signal_end_print;
22597 ulong signal_connect(string name:"end-print", CB/*:signal_end_print*/)
22598 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22599 if (is(typeof(cb)==signal_end_print)||_ttmm!(CB, signal_end_print)()) {
22600 return signal_connect_data!()(&this, cast(char*)"end-print",
22601 cast(GObject2.Callback)cb, data, null, cf);
22604 // VERSION: 2.10
22605 // Emitted after the #GtkPrintOperation::begin-print signal, but before
22606 // the actual rendering starts. It keeps getting emitted until a connected
22607 // signal handler returns %TRUE.
22609 // The ::paginate signal is intended to be used for paginating a document
22610 // in small chunks, to avoid blocking the user interface for a long
22611 // time. The signal handler should update the number of pages using
22612 // gtk_print_operation_set_n_pages(), and return %TRUE if the document
22613 // has been completely paginated.
22615 // If you don't need to do pagination in chunks, you can simply do
22616 // it all in the ::begin-print handler, and set the number of pages
22617 // from there.
22618 // RETURNS: %TRUE if pagination is complete
22619 // <context>: the #GtkPrintContext for the current operation
22620 extern (C) alias static c_int function (PrintOperation* this_, PrintContext* context, void* user_data=null) nothrow signal_paginate;
22621 ulong signal_connect(string name:"paginate", CB/*:signal_paginate*/)
22622 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22623 if (is(typeof(cb)==signal_paginate)||_ttmm!(CB, signal_paginate)()) {
22624 return signal_connect_data!()(&this, cast(char*)"paginate",
22625 cast(GObject2.Callback)cb, data, null, cf);
22628 // VERSION: 2.10
22629 // Gets emitted when a preview is requested from the native dialog.
22631 // The default handler for this signal uses an external viewer
22632 // application to preview.
22634 // To implement a custom print preview, an application must return
22635 // %TRUE from its handler for this signal. In order to use the
22636 // provided @context for the preview implementation, it must be
22637 // given a suitable cairo context with gtk_print_context_set_cairo_context().
22639 // The custom preview implementation can use
22640 // gtk_print_operation_preview_is_selected() and
22641 // gtk_print_operation_preview_render_page() to find pages which
22642 // are selected for print and render them. The preview must be
22643 // finished by calling gtk_print_operation_preview_end_preview()
22644 // (typically in response to the user clicking a close button).
22645 // RETURNS: %TRUE if the listener wants to take over control of the preview
22646 // <preview>: the #GtkPrintPreviewOperation for the current operation
22647 // <context>: the #GtkPrintContext that will be used
22648 // <parent>: the #GtkWindow to use as window parent, or %NULL
22649 extern (C) alias static c_int function (PrintOperation* this_, PrintOperationPreview* preview, PrintContext* context, Window* parent=null, void* user_data=null) nothrow signal_preview;
22650 ulong signal_connect(string name:"preview", CB/*:signal_preview*/)
22651 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22652 if (is(typeof(cb)==signal_preview)||_ttmm!(CB, signal_preview)()) {
22653 return signal_connect_data!()(&this, cast(char*)"preview",
22654 cast(GObject2.Callback)cb, data, null, cf);
22657 // VERSION: 2.10
22658 // Emitted once for every page that is printed, to give
22659 // the application a chance to modify the page setup. Any changes
22660 // done to @setup will be in force only for printing this page.
22661 // <context>: the #GtkPrintContext for the current operation
22662 // <page_nr>: the number of the currently printed page (0-based)
22663 // <setup>: the #GtkPageSetup
22664 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, int page_nr, PageSetup* setup, void* user_data=null) nothrow signal_request_page_setup;
22665 ulong signal_connect(string name:"request-page-setup", CB/*:signal_request_page_setup*/)
22666 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22667 if (is(typeof(cb)==signal_request_page_setup)||_ttmm!(CB, signal_request_page_setup)()) {
22668 return signal_connect_data!()(&this, cast(char*)"request-page-setup",
22669 cast(GObject2.Callback)cb, data, null, cf);
22672 // VERSION: 2.10
22673 // Emitted at between the various phases of the print operation.
22674 // See #GtkPrintStatus for the phases that are being discriminated.
22675 // Use gtk_print_operation_get_status() to find out the current
22676 // status.
22677 extern (C) alias static void function (PrintOperation* this_, void* user_data=null) nothrow signal_status_changed;
22678 ulong signal_connect(string name:"status-changed", CB/*:signal_status_changed*/)
22679 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22680 if (is(typeof(cb)==signal_status_changed)||_ttmm!(CB, signal_status_changed)()) {
22681 return signal_connect_data!()(&this, cast(char*)"status-changed",
22682 cast(GObject2.Callback)cb, data, null, cf);
22685 // VERSION: 2.18
22686 // Emitted after change of selected printer. The actual page setup and
22687 // print settings are passed to the custom widget, which can actualize
22688 // itself according to this change.
22689 // <widget>: the custom widget added in create-custom-widget
22690 // <setup>: actual page setup
22691 // <settings>: actual print settings
22692 extern (C) alias static void function (PrintOperation* this_, Widget* widget, PageSetup* setup, PrintSettings* settings, void* user_data=null) nothrow signal_update_custom_widget;
22693 ulong signal_connect(string name:"update-custom-widget", CB/*:signal_update_custom_widget*/)
22694 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22695 if (is(typeof(cb)==signal_update_custom_widget)||_ttmm!(CB, signal_update_custom_widget)()) {
22696 return signal_connect_data!()(&this, cast(char*)"update-custom-widget",
22697 cast(GObject2.Callback)cb, data, null, cf);
22701 enum PrintOperationAction {
22702 PRINT_DIALOG = 0,
22703 PRINT = 1,
22704 PREVIEW = 2,
22705 EXPORT = 3
22707 struct PrintOperationClass {
22708 GObject2.ObjectClass parent_class;
22709 extern (C) void function (PrintOperation* operation, PrintOperationResult result) nothrow done;
22710 extern (C) void function (PrintOperation* operation, PrintContext* context) nothrow begin_print;
22711 extern (C) int function (PrintOperation* operation, PrintContext* context) nothrow paginate;
22712 extern (C) void function (PrintOperation* operation, PrintContext* context, int page_nr, PageSetup* setup) nothrow request_page_setup;
22713 extern (C) void function (PrintOperation* operation, PrintContext* context, int page_nr) nothrow draw_page;
22714 extern (C) void function (PrintOperation* operation, PrintContext* context) nothrow end_print;
22715 extern (C) void function (PrintOperation* operation) nothrow status_changed;
22716 // Unintrospectable functionp: create_custom_widget() / ()
22717 extern (C) Widget* function (PrintOperation* operation) nothrow create_custom_widget;
22718 extern (C) void function (PrintOperation* operation, Widget* widget) nothrow custom_widget_apply;
22719 extern (C) int function (PrintOperation* operation, PrintOperationPreview* preview, PrintContext* context, Window* parent) nothrow preview;
22720 extern (C) void function (PrintOperation* operation, Widget* widget, PageSetup* setup, PrintSettings* settings) nothrow update_custom_widget;
22721 extern (C) void function () nothrow _gtk_reserved1;
22722 extern (C) void function () nothrow _gtk_reserved2;
22723 extern (C) void function () nothrow _gtk_reserved3;
22724 extern (C) void function () nothrow _gtk_reserved4;
22725 extern (C) void function () nothrow _gtk_reserved5;
22726 extern (C) void function () nothrow _gtk_reserved6;
22729 struct PrintOperationPreview /* Interface */ {
22730 mixin template __interface__() {
22731 // VERSION: 2.10
22732 // Ends a preview.
22734 // This function must be called to finish a custom print preview.
22735 void end_preview()() nothrow {
22736 gtk_print_operation_preview_end_preview(cast(PrintOperationPreview*)&this);
22739 // VERSION: 2.10
22740 // Returns whether the given page is included in the set of pages that
22741 // have been selected for printing.
22742 // RETURNS: %TRUE if the page has been selected for printing
22743 // <page_nr>: a page number
22744 int is_selected()(int page_nr) nothrow {
22745 return gtk_print_operation_preview_is_selected(cast(PrintOperationPreview*)&this, page_nr);
22748 // VERSION: 2.10
22749 // Renders a page to the preview, using the print context that
22750 // was passed to the #GtkPrintOperation::preview handler together
22751 // with @preview.
22753 // A custom iprint preview should use this function in its ::expose
22754 // handler to render the currently selected page.
22756 // Note that this function requires a suitable cairo context to
22757 // be associated with the print context.
22758 // <page_nr>: the page to render
22759 void render_page()(int page_nr) nothrow {
22760 gtk_print_operation_preview_render_page(cast(PrintOperationPreview*)&this, page_nr);
22763 // The ::got-page-size signal is emitted once for each page
22764 // that gets rendered to the preview.
22766 // A handler for this signal should update the @context
22767 // according to @page_setup and set up a suitable cairo
22768 // context, using gtk_print_context_set_cairo_context().
22769 // <context>: the current #GtkPrintContext
22770 // <page_setup>: the #GtkPageSetup for the current page
22771 extern (C) alias static void function (PrintOperationPreview* this_, PrintContext* context, PageSetup* page_setup, void* user_data=null) nothrow signal_got_page_size;
22773 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22774 return super_.signal_connect!name(cb, data, cf);
22777 ulong signal_connect(string name:"got-page-size", CB/*:signal_got_page_size*/)
22778 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22779 if (is(typeof(cb)==signal_got_page_size)||_ttmm!(CB, signal_got_page_size)()) {
22780 return signal_connect_data!()(&this, cast(char*)"got-page-size",
22781 cast(GObject2.Callback)cb, data, null, cf);
22784 // The ::ready signal gets emitted once per preview operation,
22785 // before the first page is rendered.
22787 // A handler for this signal can be used for setup tasks.
22788 // <context>: the current #GtkPrintContext
22789 extern (C) alias static void function (PrintOperationPreview* this_, PrintContext* context, void* user_data=null) nothrow signal_ready;
22790 ulong signal_connect(string name:"ready", CB/*:signal_ready*/)
22791 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
22792 if (is(typeof(cb)==signal_ready)||_ttmm!(CB, signal_ready)()) {
22793 return signal_connect_data!()(&this, cast(char*)"ready",
22794 cast(GObject2.Callback)cb, data, null, cf);
22797 mixin __interface__;
22800 struct PrintOperationPreviewIface {
22801 GObject2.TypeInterface g_iface;
22802 extern (C) void function (PrintOperationPreview* preview, PrintContext* context) nothrow ready;
22803 extern (C) void function (PrintOperationPreview* preview, PrintContext* context, PageSetup* page_setup) nothrow got_page_size;
22804 // <page_nr>: the page to render
22805 extern (C) void function (PrintOperationPreview* preview, int page_nr) nothrow render_page;
22807 // RETURNS: %TRUE if the page has been selected for printing
22808 // <page_nr>: a page number
22809 extern (C) int function (PrintOperationPreview* preview, int page_nr) nothrow is_selected;
22810 extern (C) void function (PrintOperationPreview* preview) nothrow end_preview;
22811 extern (C) void function () nothrow _gtk_reserved1;
22812 extern (C) void function () nothrow _gtk_reserved2;
22813 extern (C) void function () nothrow _gtk_reserved3;
22814 extern (C) void function () nothrow _gtk_reserved4;
22815 extern (C) void function () nothrow _gtk_reserved5;
22816 extern (C) void function () nothrow _gtk_reserved6;
22817 extern (C) void function () nothrow _gtk_reserved7;
22820 struct PrintOperationPrivate {
22823 enum PrintOperationResult {
22824 ERROR = 0,
22825 APPLY = 1,
22826 CANCEL = 2,
22827 IN_PROGRESS = 3
22829 enum PrintPages {
22830 ALL = 0,
22831 CURRENT = 1,
22832 RANGES = 2,
22833 SELECTION = 3
22835 enum PrintQuality {
22836 LOW = 0,
22837 NORMAL = 1,
22838 HIGH = 2,
22839 DRAFT = 3
22841 struct PrintSettings /* : GObject.Object */ {
22842 alias method_parent this;
22843 alias method_parent super_;
22844 alias method_parent object;
22845 GObject2.Object method_parent;
22848 // VERSION: 2.10
22849 // Creates a new #GtkPrintSettings object.
22850 // RETURNS: a new #GtkPrintSettings object
22851 static PrintSettings* /*new*/ new_()() nothrow {
22852 return gtk_print_settings_new();
22854 static auto opCall()() {
22855 return gtk_print_settings_new();
22858 // VERSION: 2.12
22859 // Reads the print settings from @file_name. Returns a new #GtkPrintSettings
22860 // object with the restored settings, or %NULL if an error occurred. If the
22861 // file could not be loaded then error is set to either a #GFileError or
22862 // #GKeyFileError. See gtk_print_settings_to_file().
22863 // RETURNS: the restored #GtkPrintSettings
22864 // <file_name>: the filename to read the settings from
22865 static PrintSettings* /*new*/ new_from_file(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) nothrow {
22866 return gtk_print_settings_new_from_file(toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
22868 static auto opCall(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) {
22869 return gtk_print_settings_new_from_file(toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
22872 // VERSION: 2.12
22873 // Reads the print settings from the group @group_name in @key_file. Returns a
22874 // new #GtkPrintSettings object with the restored settings, or %NULL if an
22875 // error occurred. If the file could not be loaded then error is set to either
22876 // a #GFileError or #GKeyFileError.
22877 // RETURNS: the restored #GtkPrintSettings
22878 // <key_file>: the #GKeyFile to retrieve the settings from
22879 // <group_name>: the name of the group to use, or %NULL to use the default "Print Settings"
22880 static PrintSettings* /*new*/ new_from_key_file(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) nothrow {
22881 return gtk_print_settings_new_from_key_file(UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
22883 static auto opCall(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) {
22884 return gtk_print_settings_new_from_key_file(UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
22887 // VERSION: 2.10
22888 // Copies a #GtkPrintSettings object.
22889 // RETURNS: a newly allocated copy of @other
22890 PrintSettings* /*new*/ copy()() nothrow {
22891 return gtk_print_settings_copy(&this);
22894 // VERSION: 2.10
22895 // Calls @func for each key-value pair of @settings.
22896 // <func>: the function to call
22897 // <user_data>: user data for @func
22898 void foreach_(AT0)(PrintSettingsFunc func, AT0 /*void*/ user_data) nothrow {
22899 gtk_print_settings_foreach(&this, func, UpCast!(void*)(user_data));
22902 // VERSION: 2.10
22903 // Looks up the string value associated with @key.
22904 // RETURNS: the string value for @key
22905 // <key>: a key
22906 char* get(AT0)(AT0 /*char*/ key) nothrow {
22907 return gtk_print_settings_get(&this, toCString!(char*)(key));
22910 // VERSION: 2.10
22911 // Returns the boolean represented by the value
22912 // that is associated with @key.
22914 // The string "true" represents %TRUE, any other
22915 // string %FALSE.
22916 // RETURNS: %TRUE, if @key maps to a true value.
22917 // <key>: a key
22918 int get_bool(AT0)(AT0 /*char*/ key) nothrow {
22919 return gtk_print_settings_get_bool(&this, toCString!(char*)(key));
22922 // VERSION: 2.10
22923 // Gets the value of %GTK_PRINT_SETTINGS_COLLATE.
22924 // RETURNS: whether to collate the printed pages
22925 int get_collate()() nothrow {
22926 return gtk_print_settings_get_collate(&this);
22929 // VERSION: 2.10
22930 // Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
22931 // RETURNS: the default source
22932 char* get_default_source()() nothrow {
22933 return gtk_print_settings_get_default_source(&this);
22936 // VERSION: 2.10
22937 // Gets the value of %GTK_PRINT_SETTINGS_DITHER.
22938 // RETURNS: the dithering that is used
22939 char* get_dither()() nothrow {
22940 return gtk_print_settings_get_dither(&this);
22943 // VERSION: 2.10
22944 // Returns the double value associated with @key, or 0.
22945 // RETURNS: the double value of @key
22946 // <key>: a key
22947 double get_double(AT0)(AT0 /*char*/ key) nothrow {
22948 return gtk_print_settings_get_double(&this, toCString!(char*)(key));
22951 // VERSION: 2.10
22952 // Returns the floating point number represented by
22953 // the value that is associated with @key, or @default_val
22954 // if the value does not represent a floating point number.
22956 // Floating point numbers are parsed with g_ascii_strtod().
22957 // RETURNS: the floating point number associated with @key
22958 // <key>: a key
22959 // <def>: the default value
22960 double get_double_with_default(AT0)(AT0 /*char*/ key, double def) nothrow {
22961 return gtk_print_settings_get_double_with_default(&this, toCString!(char*)(key), def);
22964 // VERSION: 2.10
22965 // Gets the value of %GTK_PRINT_SETTINGS_DUPLEX.
22966 // RETURNS: whether to print the output in duplex.
22967 PrintDuplex get_duplex()() nothrow {
22968 return gtk_print_settings_get_duplex(&this);
22971 // VERSION: 2.10
22972 // Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
22973 // RETURNS: the finishings
22974 char* get_finishings()() nothrow {
22975 return gtk_print_settings_get_finishings(&this);
22978 // VERSION: 2.10
22979 // Returns the integer value of @key, or 0.
22980 // RETURNS: the integer value of @key
22981 // <key>: a key
22982 int get_int(AT0)(AT0 /*char*/ key) nothrow {
22983 return gtk_print_settings_get_int(&this, toCString!(char*)(key));
22986 // VERSION: 2.10
22987 // Returns the value of @key, interpreted as
22988 // an integer, or the default value.
22989 // RETURNS: the integer value of @key
22990 // <key>: a key
22991 // <def>: the default value
22992 int get_int_with_default(AT0)(AT0 /*char*/ key, int def) nothrow {
22993 return gtk_print_settings_get_int_with_default(&this, toCString!(char*)(key), def);
22996 // VERSION: 2.10
22997 // Returns the value associated with @key, interpreted
22998 // as a length. The returned value is converted to @units.
22999 // RETURNS: the length value of @key, converted to @unit
23000 // <key>: a key
23001 // <unit>: the unit of the return value
23002 double get_length(AT0)(AT0 /*char*/ key, Unit unit) nothrow {
23003 return gtk_print_settings_get_length(&this, toCString!(char*)(key), unit);
23006 // VERSION: 2.10
23007 // Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
23009 // The set of media types is defined in PWG 5101.1-2002 PWG.
23010 // <!-- FIXME link here -->
23011 // RETURNS: the media type
23012 char* get_media_type()() nothrow {
23013 return gtk_print_settings_get_media_type(&this);
23016 // VERSION: 2.10
23017 // Gets the value of %GTK_PRINT_SETTINGS_N_COPIES.
23018 // RETURNS: the number of copies to print
23019 int get_n_copies()() nothrow {
23020 return gtk_print_settings_get_n_copies(&this);
23023 // VERSION: 2.10
23024 // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
23025 // RETURNS: the number of pages per sheet
23026 int get_number_up()() nothrow {
23027 return gtk_print_settings_get_number_up(&this);
23030 // VERSION: 2.14
23031 // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
23032 // RETURNS: layout of page in number-up mode
23033 NumberUpLayout get_number_up_layout()() nothrow {
23034 return gtk_print_settings_get_number_up_layout(&this);
23037 // VERSION: 2.10
23038 // Get the value of %GTK_PRINT_SETTINGS_ORIENTATION,
23039 // converted to a #GtkPageOrientation.
23040 // RETURNS: the orientation
23041 PageOrientation get_orientation()() nothrow {
23042 return gtk_print_settings_get_orientation(&this);
23045 // VERSION: 2.10
23046 // Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
23047 // RETURNS: the output bin
23048 char* get_output_bin()() nothrow {
23049 return gtk_print_settings_get_output_bin(&this);
23052 // VERSION: 2.10
23053 // Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
23055 // of #GtkPageRange<!-- -->s. Use g_free() to free the array when
23056 // it is no longer needed.
23057 // RETURNS: an array
23058 // <num_ranges>: return location for the length of the returned array
23059 PageRange* /*new*/ get_page_ranges()(/*out*/ int* num_ranges) nothrow {
23060 return gtk_print_settings_get_page_ranges(&this, num_ranges);
23063 // VERSION: 2.10
23064 // Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
23065 // RETURNS: the set of pages to print
23066 PageSet get_page_set()() nothrow {
23067 return gtk_print_settings_get_page_set(&this);
23070 // VERSION: 2.10
23071 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT,
23072 // converted to @unit.
23073 // RETURNS: the paper height, in units of @unit
23074 // <unit>: the unit for the return value
23075 double get_paper_height()(Unit unit) nothrow {
23076 return gtk_print_settings_get_paper_height(&this, unit);
23079 // VERSION: 2.10
23080 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
23081 // converted to a #GtkPaperSize.
23082 // RETURNS: the paper size
23083 PaperSize* /*new*/ get_paper_size()() nothrow {
23084 return gtk_print_settings_get_paper_size(&this);
23087 // VERSION: 2.10
23088 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH,
23089 // converted to @unit.
23090 // RETURNS: the paper width, in units of @unit
23091 // <unit>: the unit for the return value
23092 double get_paper_width()(Unit unit) nothrow {
23093 return gtk_print_settings_get_paper_width(&this, unit);
23096 // VERSION: 2.10
23097 // Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
23098 // RETURNS: which pages to print
23099 PrintPages get_print_pages()() nothrow {
23100 return gtk_print_settings_get_print_pages(&this);
23103 // VERSION: 2.10
23104 // Convenience function to obtain the value of
23105 // %GTK_PRINT_SETTINGS_PRINTER.
23106 // RETURNS: the printer name
23107 char* get_printer()() nothrow {
23108 return gtk_print_settings_get_printer(&this);
23111 // VERSION: 2.16
23112 // Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
23113 // RETURNS: the resolution in lpi (lines per inch)
23114 double get_printer_lpi()() nothrow {
23115 return gtk_print_settings_get_printer_lpi(&this);
23118 // VERSION: 2.10
23119 // Gets the value of %GTK_PRINT_SETTINGS_QUALITY.
23120 // RETURNS: the print quality
23121 PrintQuality get_quality()() nothrow {
23122 return gtk_print_settings_get_quality(&this);
23125 // VERSION: 2.10
23126 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION.
23127 // RETURNS: the resolution in dpi
23128 int get_resolution()() nothrow {
23129 return gtk_print_settings_get_resolution(&this);
23132 // VERSION: 2.16
23133 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X.
23134 // RETURNS: the horizontal resolution in dpi
23135 int get_resolution_x()() nothrow {
23136 return gtk_print_settings_get_resolution_x(&this);
23139 // VERSION: 2.16
23140 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y.
23141 // RETURNS: the vertical resolution in dpi
23142 int get_resolution_y()() nothrow {
23143 return gtk_print_settings_get_resolution_y(&this);
23146 // VERSION: 2.10
23147 // Gets the value of %GTK_PRINT_SETTINGS_REVERSE.
23148 // RETURNS: whether to reverse the order of the printed pages
23149 int get_reverse()() nothrow {
23150 return gtk_print_settings_get_reverse(&this);
23153 // VERSION: 2.10
23154 // Gets the value of %GTK_PRINT_SETTINGS_SCALE.
23155 // RETURNS: the scale in percent
23156 double get_scale()() nothrow {
23157 return gtk_print_settings_get_scale(&this);
23160 // VERSION: 2.10
23161 // Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
23162 // RETURNS: whether to use color
23163 int get_use_color()() nothrow {
23164 return gtk_print_settings_get_use_color(&this);
23167 // VERSION: 2.10
23168 // Returns %TRUE, if a value is associated with @key.
23169 // RETURNS: %TRUE, if @key has a value
23170 // <key>: a key
23171 int has_key(AT0)(AT0 /*char*/ key) nothrow {
23172 return gtk_print_settings_has_key(&this, toCString!(char*)(key));
23175 // VERSION: 2.14
23176 // Reads the print settings from @file_name. If the file could not be loaded
23177 // then error is set to either a #GFileError or #GKeyFileError.
23178 // See gtk_print_settings_to_file().
23179 // RETURNS: %TRUE on success
23180 // <file_name>: the filename to read the settings from
23181 int load_file(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) nothrow {
23182 return gtk_print_settings_load_file(&this, toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
23185 // VERSION: 2.14
23186 // Reads the print settings from the group @group_name in @key_file. If the
23187 // file could not be loaded then error is set to either a #GFileError or
23188 // #GKeyFileError.
23189 // RETURNS: %TRUE on success
23190 // <key_file>: the #GKeyFile to retrieve the settings from
23191 // <group_name>: the name of the group to use, or %NULL to use the default "Print Settings"
23192 int load_key_file(AT0, AT1, AT2)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name, AT2 /*GLib2.Error**/ error=null) nothrow {
23193 return gtk_print_settings_load_key_file(&this, UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name), UpCast!(GLib2.Error**)(error));
23196 // VERSION: 2.10
23197 // Associates @value with @key.
23198 // <key>: a key
23199 // <value>: a string value, or %NULL
23200 void set(AT0, AT1)(AT0 /*char*/ key, AT1 /*char*/ value=null) nothrow {
23201 gtk_print_settings_set(&this, toCString!(char*)(key), toCString!(char*)(value));
23204 // VERSION: 2.10
23205 // Sets @key to a boolean value.
23206 // <key>: a key
23207 // <value>: a boolean
23208 void set_bool(AT0)(AT0 /*char*/ key, int value) nothrow {
23209 gtk_print_settings_set_bool(&this, toCString!(char*)(key), value);
23212 // VERSION: 2.10
23213 // Sets the value of %GTK_PRINT_SETTINGS_COLLATE.
23214 // <collate>: whether to collate the output
23215 void set_collate()(int collate) nothrow {
23216 gtk_print_settings_set_collate(&this, collate);
23219 // VERSION: 2.10
23220 // Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
23221 // <default_source>: the default source
23222 void set_default_source(AT0)(AT0 /*char*/ default_source) nothrow {
23223 gtk_print_settings_set_default_source(&this, toCString!(char*)(default_source));
23226 // VERSION: 2.10
23227 // Sets the value of %GTK_PRINT_SETTINGS_DITHER.
23228 // <dither>: the dithering that is used
23229 void set_dither(AT0)(AT0 /*char*/ dither) nothrow {
23230 gtk_print_settings_set_dither(&this, toCString!(char*)(dither));
23233 // VERSION: 2.10
23234 // Sets @key to a double value.
23235 // <key>: a key
23236 // <value>: a double value
23237 void set_double(AT0)(AT0 /*char*/ key, double value) nothrow {
23238 gtk_print_settings_set_double(&this, toCString!(char*)(key), value);
23241 // VERSION: 2.10
23242 // Sets the value of %GTK_PRINT_SETTINGS_DUPLEX.
23243 // <duplex>: a #GtkPrintDuplex value
23244 void set_duplex()(PrintDuplex duplex) nothrow {
23245 gtk_print_settings_set_duplex(&this, duplex);
23248 // VERSION: 2.10
23249 // Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
23250 // <finishings>: the finishings
23251 void set_finishings(AT0)(AT0 /*char*/ finishings) nothrow {
23252 gtk_print_settings_set_finishings(&this, toCString!(char*)(finishings));
23255 // VERSION: 2.10
23256 // Sets @key to an integer value.
23257 // <key>: a key
23258 // <value>: an integer
23259 void set_int(AT0)(AT0 /*char*/ key, int value) nothrow {
23260 gtk_print_settings_set_int(&this, toCString!(char*)(key), value);
23263 // VERSION: 2.10
23264 // Associates a length in units of @unit with @key.
23265 // <key>: a key
23266 // <value>: a length
23267 // <unit>: the unit of @length
23268 void set_length(AT0)(AT0 /*char*/ key, double value, Unit unit) nothrow {
23269 gtk_print_settings_set_length(&this, toCString!(char*)(key), value, unit);
23272 // VERSION: 2.10
23273 // Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
23275 // The set of media types is defined in PWG 5101.1-2002 PWG.
23276 // <!-- FIXME link here -->
23277 // <media_type>: the media type
23278 void set_media_type(AT0)(AT0 /*char*/ media_type) nothrow {
23279 gtk_print_settings_set_media_type(&this, toCString!(char*)(media_type));
23282 // VERSION: 2.10
23283 // Sets the value of %GTK_PRINT_SETTINGS_N_COPIES.
23284 // <num_copies>: the number of copies
23285 void set_n_copies()(int num_copies) nothrow {
23286 gtk_print_settings_set_n_copies(&this, num_copies);
23289 // VERSION: 2.10
23290 // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
23291 // <number_up>: the number of pages per sheet
23292 void set_number_up()(int number_up) nothrow {
23293 gtk_print_settings_set_number_up(&this, number_up);
23296 // VERSION: 2.14
23297 // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
23298 // <number_up_layout>: a #GtkNumberUpLayout value
23299 void set_number_up_layout()(NumberUpLayout number_up_layout) nothrow {
23300 gtk_print_settings_set_number_up_layout(&this, number_up_layout);
23303 // VERSION: 2.10
23304 // Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION.
23305 // <orientation>: a page orientation
23306 void set_orientation()(PageOrientation orientation) nothrow {
23307 gtk_print_settings_set_orientation(&this, orientation);
23310 // VERSION: 2.10
23311 // Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
23312 // <output_bin>: the output bin
23313 void set_output_bin(AT0)(AT0 /*char*/ output_bin) nothrow {
23314 gtk_print_settings_set_output_bin(&this, toCString!(char*)(output_bin));
23317 // VERSION: 2.10
23318 // Sets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
23319 // <page_ranges>: an array of #GtkPageRange<!-- -->s
23320 // <num_ranges>: the length of @page_ranges
23321 void set_page_ranges(AT0)(AT0 /*PageRange*/ page_ranges, int num_ranges) nothrow {
23322 gtk_print_settings_set_page_ranges(&this, UpCast!(PageRange*)(page_ranges), num_ranges);
23325 // VERSION: 2.10
23326 // Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
23327 // <page_set>: a #GtkPageSet value
23328 void set_page_set()(PageSet page_set) nothrow {
23329 gtk_print_settings_set_page_set(&this, page_set);
23332 // VERSION: 2.10
23333 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
23334 // <height>: the paper height
23335 // <unit>: the units of @height
23336 void set_paper_height()(double height, Unit unit) nothrow {
23337 gtk_print_settings_set_paper_height(&this, height, unit);
23340 // VERSION: 2.10
23341 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
23342 // %GTK_PRINT_SETTINGS_PAPER_WIDTH and
23343 // %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
23344 // <paper_size>: a paper size
23345 void set_paper_size(AT0)(AT0 /*PaperSize*/ paper_size) nothrow {
23346 gtk_print_settings_set_paper_size(&this, UpCast!(PaperSize*)(paper_size));
23349 // VERSION: 2.10
23350 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH.
23351 // <width>: the paper width
23352 // <unit>: the units of @width
23353 void set_paper_width()(double width, Unit unit) nothrow {
23354 gtk_print_settings_set_paper_width(&this, width, unit);
23357 // VERSION: 2.10
23358 // Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
23359 // <pages>: a #GtkPrintPages value
23360 void set_print_pages()(PrintPages pages) nothrow {
23361 gtk_print_settings_set_print_pages(&this, pages);
23364 // VERSION: 2.10
23365 // Convenience function to set %GTK_PRINT_SETTINGS_PRINTER
23366 // to @printer.
23367 // <printer>: the printer name
23368 void set_printer(AT0)(AT0 /*char*/ printer) nothrow {
23369 gtk_print_settings_set_printer(&this, toCString!(char*)(printer));
23372 // VERSION: 2.16
23373 // Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
23374 // <lpi>: the resolution in lpi (lines per inch)
23375 void set_printer_lpi()(double lpi) nothrow {
23376 gtk_print_settings_set_printer_lpi(&this, lpi);
23379 // VERSION: 2.10
23380 // Sets the value of %GTK_PRINT_SETTINGS_QUALITY.
23381 // <quality>: a #GtkPrintQuality value
23382 void set_quality()(PrintQuality quality) nothrow {
23383 gtk_print_settings_set_quality(&this, quality);
23386 // VERSION: 2.10
23387 // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
23388 // %GTK_PRINT_SETTINGS_RESOLUTION_X and
23389 // %GTK_PRINT_SETTINGS_RESOLUTION_Y.
23390 // <resolution>: the resolution in dpi
23391 void set_resolution()(int resolution) nothrow {
23392 gtk_print_settings_set_resolution(&this, resolution);
23395 // VERSION: 2.16
23396 // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
23397 // %GTK_PRINT_SETTINGS_RESOLUTION_X and
23398 // %GTK_PRINT_SETTINGS_RESOLUTION_Y.
23399 // <resolution_x>: the horizontal resolution in dpi
23400 // <resolution_y>: the vertical resolution in dpi
23401 void set_resolution_xy()(int resolution_x, int resolution_y) nothrow {
23402 gtk_print_settings_set_resolution_xy(&this, resolution_x, resolution_y);
23405 // VERSION: 2.10
23406 // Sets the value of %GTK_PRINT_SETTINGS_REVERSE.
23407 // <reverse>: whether to reverse the output
23408 void set_reverse()(int reverse) nothrow {
23409 gtk_print_settings_set_reverse(&this, reverse);
23412 // VERSION: 2.10
23413 // Sets the value of %GTK_PRINT_SETTINGS_SCALE.
23414 // <scale>: the scale in percent
23415 void set_scale()(double scale) nothrow {
23416 gtk_print_settings_set_scale(&this, scale);
23419 // VERSION: 2.10
23420 // Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
23421 // <use_color>: whether to use color
23422 void set_use_color()(int use_color) nothrow {
23423 gtk_print_settings_set_use_color(&this, use_color);
23426 // VERSION: 2.12
23427 // This function saves the print settings from @settings to @file_name. If the
23428 // file could not be loaded then error is set to either a #GFileError or
23429 // #GKeyFileError.
23430 // RETURNS: %TRUE on success
23431 // <file_name>: the file to save to
23432 int to_file(AT0, AT1)(AT0 /*char*/ file_name, AT1 /*GLib2.Error**/ error=null) nothrow {
23433 return gtk_print_settings_to_file(&this, toCString!(char*)(file_name), UpCast!(GLib2.Error**)(error));
23436 // VERSION: 2.12
23437 // This function adds the print settings from @settings to @key_file.
23438 // <key_file>: the #GKeyFile to save the print settings to
23439 // <group_name>: the group to add the settings to in @key_file, or %NULL to use the default "Print Settings"
23440 void to_key_file(AT0, AT1)(AT0 /*GLib2.KeyFile*/ key_file, AT1 /*char*/ group_name) nothrow {
23441 gtk_print_settings_to_key_file(&this, UpCast!(GLib2.KeyFile*)(key_file), toCString!(char*)(group_name));
23444 // VERSION: 2.10
23445 // Removes any value associated with @key.
23446 // This has the same effect as setting the value to %NULL.
23447 // <key>: a key
23448 void unset(AT0)(AT0 /*char*/ key) nothrow {
23449 gtk_print_settings_unset(&this, toCString!(char*)(key));
23453 extern (C) alias void function (char* key, char* value, void* user_data) nothrow PrintSettingsFunc;
23455 enum PrintStatus {
23456 INITIAL = 0,
23457 PREPARING = 1,
23458 GENERATING_DATA = 2,
23459 SENDING_DATA = 3,
23460 PENDING = 4,
23461 PENDING_ISSUE = 5,
23462 PRINTING = 6,
23463 FINISHED = 7,
23464 FINISHED_ABORTED = 8
23466 enum PrivateFlags {
23467 USER_STYLE = 1,
23468 RESIZE_PENDING = 4,
23469 HAS_POINTER = 8,
23470 SHADOWED = 16,
23471 HAS_SHAPE_MASK = 32,
23472 IN_REPARENT = 64,
23473 DIRECTION_SET = 128,
23474 DIRECTION_LTR = 256,
23475 ANCHORED = 512,
23476 CHILD_VISIBLE = 1024,
23477 REDRAW_ON_ALLOC = 2048,
23478 ALLOC_NEEDED = 4096,
23479 REQUEST_NEEDED = 8192
23481 struct Progress /* : Widget */ {
23482 mixin Atk.ImplementorIface.__interface__;
23483 mixin Buildable.__interface__;
23484 alias widget this;
23485 alias widget super_;
23486 Widget widget;
23487 Adjustment* adjustment;
23488 Gdk2.Pixmap* offscreen_pixmap;
23489 char* format;
23490 float x_align, y_align;
23491 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
23492 uint, "show_text", 1,
23493 uint, "activity_mode", 1,
23494 uint, "use_text_format", 1,
23495 uint, "__dummy32A", 29));
23497 void configure()(double value, double min, double max) nothrow {
23498 gtk_progress_configure(&this, value, min, max);
23500 double get_current_percentage()() nothrow {
23501 return gtk_progress_get_current_percentage(&this);
23503 char* /*new*/ get_current_text()() nothrow {
23504 return gtk_progress_get_current_text(&this);
23506 double get_percentage_from_value()(double value) nothrow {
23507 return gtk_progress_get_percentage_from_value(&this, value);
23509 char* /*new*/ get_text_from_value()(double value) nothrow {
23510 return gtk_progress_get_text_from_value(&this, value);
23512 double get_value()() nothrow {
23513 return gtk_progress_get_value(&this);
23515 void set_activity_mode()(int activity_mode) nothrow {
23516 gtk_progress_set_activity_mode(&this, activity_mode);
23518 void set_adjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
23519 gtk_progress_set_adjustment(&this, UpCast!(Adjustment*)(adjustment));
23521 void set_format_string(AT0)(AT0 /*char*/ format) nothrow {
23522 gtk_progress_set_format_string(&this, toCString!(char*)(format));
23524 void set_percentage()(double percentage) nothrow {
23525 gtk_progress_set_percentage(&this, percentage);
23527 void set_show_text()(int show_text) nothrow {
23528 gtk_progress_set_show_text(&this, show_text);
23530 void set_text_alignment()(float x_align, float y_align) nothrow {
23531 gtk_progress_set_text_alignment(&this, x_align, y_align);
23533 void set_value()(double value) nothrow {
23534 gtk_progress_set_value(&this, value);
23538 struct ProgressBar /* : Progress */ {
23539 mixin Atk.ImplementorIface.__interface__;
23540 mixin Buildable.__interface__;
23541 alias progress this;
23542 alias progress super_;
23543 Progress progress;
23544 ProgressBarStyle bar_style;
23545 ProgressBarOrientation orientation;
23546 uint blocks;
23547 int in_block, activity_pos;
23548 uint activity_step, activity_blocks;
23549 double pulse_fraction;
23550 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
23551 uint, "activity_dir", 1,
23552 uint, "ellipsize", 3,
23553 uint, "dirty", 1,
23554 uint, "__dummy32A", 27));
23557 // Creates a new #GtkProgressBar.
23558 // RETURNS: a #GtkProgressBar.
23559 static ProgressBar* new_()() nothrow {
23560 return gtk_progress_bar_new();
23562 static auto opCall()() {
23563 return gtk_progress_bar_new();
23566 // Creates a new #GtkProgressBar with an associated #GtkAdjustment.
23567 // RETURNS: a #GtkProgressBar.
23568 static ProgressBar* new_with_adjustment(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
23569 return gtk_progress_bar_new_with_adjustment(UpCast!(Adjustment*)(adjustment));
23571 static auto opCall(AT0)(AT0 /*Adjustment*/ adjustment=null) {
23572 return gtk_progress_bar_new_with_adjustment(UpCast!(Adjustment*)(adjustment));
23575 // VERSION: 2.6
23576 // Returns the ellipsizing position of the progressbar.
23577 // See gtk_progress_bar_set_ellipsize().
23578 // RETURNS: #PangoEllipsizeMode
23579 Pango.EllipsizeMode get_ellipsize()() nothrow {
23580 return gtk_progress_bar_get_ellipsize(&this);
23583 // Returns the current fraction of the task that's been completed.
23584 // RETURNS: a fraction from 0.0 to 1.0
23585 double get_fraction()() nothrow {
23586 return gtk_progress_bar_get_fraction(&this);
23589 // Retrieves the current progress bar orientation.
23590 // RETURNS: orientation of the progress bar
23591 ProgressBarOrientation get_orientation()() nothrow {
23592 return gtk_progress_bar_get_orientation(&this);
23595 // Retrieves the pulse step set with gtk_progress_bar_set_pulse_step()
23596 // RETURNS: a fraction from 0.0 to 1.0
23597 double get_pulse_step()() nothrow {
23598 return gtk_progress_bar_get_pulse_step(&this);
23601 // Retrieves the text displayed superimposed on the progress bar,
23602 // if any, otherwise %NULL. The return value is a reference
23603 // to the text, not a copy of it, so will become invalid
23604 // if you change the text in the progress bar.
23606 // and should not be modified or freed.
23607 // RETURNS: text, or %NULL; this string is owned by the widget
23608 char* get_text()() nothrow {
23609 return gtk_progress_bar_get_text(&this);
23612 // Indicates that some progress is made, but you don't know how much.
23613 // Causes the progress bar to enter "activity mode," where a block
23614 // bounces back and forth. Each call to gtk_progress_bar_pulse()
23615 // causes the block to move by a little bit (the amount of movement
23616 // per pulse is determined by gtk_progress_bar_set_pulse_step()).
23617 void pulse()() nothrow {
23618 gtk_progress_bar_pulse(&this);
23620 void set_activity_blocks()(uint blocks) nothrow {
23621 gtk_progress_bar_set_activity_blocks(&this, blocks);
23623 void set_activity_step()(uint step) nothrow {
23624 gtk_progress_bar_set_activity_step(&this, step);
23626 void set_bar_style()(ProgressBarStyle style) nothrow {
23627 gtk_progress_bar_set_bar_style(&this, style);
23629 void set_discrete_blocks()(uint blocks) nothrow {
23630 gtk_progress_bar_set_discrete_blocks(&this, blocks);
23633 // VERSION: 2.6
23634 // Sets the mode used to ellipsize (add an ellipsis: "...") the text
23635 // if there is not enough space to render the entire string.
23636 // <mode>: a #PangoEllipsizeMode
23637 void set_ellipsize()(Pango.EllipsizeMode mode) nothrow {
23638 gtk_progress_bar_set_ellipsize(&this, mode);
23641 // Causes the progress bar to "fill in" the given fraction
23642 // of the bar. The fraction should be between 0.0 and 1.0,
23643 // inclusive.
23644 // <fraction>: fraction of the task that's been completed
23645 void set_fraction()(double fraction) nothrow {
23646 gtk_progress_bar_set_fraction(&this, fraction);
23649 // Causes the progress bar to switch to a different orientation
23650 // (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
23651 // <orientation>: orientation of the progress bar
23652 void set_orientation()(ProgressBarOrientation orientation) nothrow {
23653 gtk_progress_bar_set_orientation(&this, orientation);
23656 // Sets the fraction of total progress bar length to move the
23657 // bouncing block for each call to gtk_progress_bar_pulse().
23658 // <fraction>: fraction between 0.0 and 1.0
23659 void set_pulse_step()(double fraction) nothrow {
23660 gtk_progress_bar_set_pulse_step(&this, fraction);
23663 // Causes the given @text to appear superimposed on the progress bar.
23664 // <text>: a UTF-8 string, or %NULL
23665 void set_text(AT0)(AT0 /*char*/ text=null) nothrow {
23666 gtk_progress_bar_set_text(&this, toCString!(char*)(text));
23668 void update()(double percentage) nothrow {
23669 gtk_progress_bar_update(&this, percentage);
23673 struct ProgressBarClass {
23674 ProgressClass parent_class;
23675 extern (C) void function () nothrow _gtk_reserved1;
23676 extern (C) void function () nothrow _gtk_reserved2;
23677 extern (C) void function () nothrow _gtk_reserved3;
23678 extern (C) void function () nothrow _gtk_reserved4;
23681 enum ProgressBarOrientation {
23682 LEFT_TO_RIGHT = 0,
23683 RIGHT_TO_LEFT = 1,
23684 BOTTOM_TO_TOP = 2,
23685 TOP_TO_BOTTOM = 3
23687 enum ProgressBarStyle {
23688 CONTINUOUS = 0,
23689 DISCRETE = 1
23691 struct ProgressClass {
23692 WidgetClass parent_class;
23693 extern (C) void function (Progress* progress) nothrow paint;
23694 extern (C) void function (Progress* progress) nothrow update;
23695 extern (C) void function (Progress* progress) nothrow act_mode_enter;
23696 extern (C) void function () nothrow _gtk_reserved1;
23697 extern (C) void function () nothrow _gtk_reserved2;
23698 extern (C) void function () nothrow _gtk_reserved3;
23699 extern (C) void function () nothrow _gtk_reserved4;
23702 struct RadioAction /* : ToggleAction */ {
23703 mixin Buildable.__interface__;
23704 alias parent this;
23705 alias parent super_;
23706 alias parent toggleaction;
23707 ToggleAction parent;
23708 private RadioActionPrivate* private_data;
23711 // VERSION: 2.4
23712 // Creates a new #GtkRadioAction object. To add the action to
23713 // a #GtkActionGroup and set the accelerator for the action,
23714 // call gtk_action_group_add_action_with_accel().
23715 // RETURNS: a new #GtkRadioAction
23716 // <name>: A unique name for the action
23717 // <label>: The label displayed in menu items and on buttons, or %NULL
23718 // <tooltip>: A tooltip for this action, or %NULL
23719 // <stock_id>: The stock icon to display in widgets representing this action, or %NULL
23720 // <value>: The value which gtk_radio_action_get_current_value() should return if this action is selected.
23721 static RadioAction* /*new*/ new_(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id, int value) nothrow {
23722 return gtk_radio_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id), value);
23724 static auto opCall(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id, int value) {
23725 return gtk_radio_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id), value);
23728 // VERSION: 2.4
23729 // Obtains the value property of the currently active member of
23730 // the group to which @action belongs.
23731 // RETURNS: The value of the currently active group member
23732 int get_current_value()() nothrow {
23733 return gtk_radio_action_get_current_value(&this);
23736 // VERSION: 2.4
23737 // Returns the list representing the radio group for this object.
23738 // Note that the returned list is only valid until the next change
23739 // to the group.
23741 // A common way to set up a group of radio group is the following:
23742 // |[
23743 // GSList *group = NULL;
23744 // GtkRadioAction *action;
23746 // while (/&ast; more actions to add &ast;/)
23747 // {
23748 // action = gtk_radio_action_new (...);
23750 // gtk_radio_action_set_group (action, group);
23751 // group = gtk_radio_action_get_group (action);
23752 // }
23753 // ]|
23754 // RETURNS: the list representing the radio group for this object
23755 GLib2.SList* get_group()() nothrow {
23756 return gtk_radio_action_get_group(&this);
23759 // VERSION: 2.10
23760 // Sets the currently active group member to the member with value
23761 // property @current_value.
23762 // <current_value>: the new value
23763 void set_current_value()(int current_value) nothrow {
23764 gtk_radio_action_set_current_value(&this, current_value);
23767 // Unintrospectable method: set_group() / gtk_radio_action_set_group()
23768 // VERSION: 2.4
23769 // Sets the radio group for the radio action object.
23770 // <group>: a list representing a radio group
23771 void set_group(AT0)(AT0 /*GLib2.SList*/ group) nothrow {
23772 gtk_radio_action_set_group(&this, UpCast!(GLib2.SList*)(group));
23775 // VERSION: 2.4
23776 // The ::changed signal is emitted on every member of a radio group when the
23777 // active member is changed. The signal gets emitted after the ::activate signals
23778 // for the previous and current active members.
23779 // <current>: the member of @action<!-- -->s group which has just been activated
23780 extern (C) alias static void function (RadioAction* this_, RadioAction* current, void* user_data=null) nothrow signal_changed;
23782 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23783 return super_.signal_connect!name(cb, data, cf);
23786 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
23787 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
23788 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
23789 return signal_connect_data!()(&this, cast(char*)"changed",
23790 cast(GObject2.Callback)cb, data, null, cf);
23794 struct RadioActionClass {
23795 ToggleActionClass parent_class;
23796 extern (C) void function (RadioAction* action, RadioAction* current) nothrow changed;
23797 extern (C) void function () nothrow _gtk_reserved1;
23798 extern (C) void function () nothrow _gtk_reserved2;
23799 extern (C) void function () nothrow _gtk_reserved3;
23800 extern (C) void function () nothrow _gtk_reserved4;
23803 struct RadioActionEntry {
23804 char* name, stock_id, label, accelerator, tooltip;
23805 int value;
23808 struct RadioActionPrivate {
23811 struct RadioButton /* : CheckButton */ {
23812 mixin Atk.ImplementorIface.__interface__;
23813 mixin Activatable.__interface__;
23814 mixin Buildable.__interface__;
23815 alias check_button this;
23816 alias check_button super_;
23817 alias check_button checkbutton;
23818 CheckButton check_button;
23819 GLib2.SList* group;
23822 // Unintrospectable constructor: new() / gtk_radio_button_new()
23823 // Creates a new #GtkRadioButton. To be of any practical value, a widget should
23824 // then be packed into the radio button.
23825 // RETURNS: a new radio button
23826 // <group>: an existing radio button group, or %NULL if you are creating a new group.
23827 static RadioButton* new_(AT0)(AT0 /*GLib2.SList*/ group=null) nothrow {
23828 return gtk_radio_button_new(UpCast!(GLib2.SList*)(group));
23830 static auto opCall(AT0)(AT0 /*GLib2.SList*/ group=null) {
23831 return gtk_radio_button_new(UpCast!(GLib2.SList*)(group));
23834 // Unintrospectable constructor: new_with_label() / gtk_radio_button_new_with_label()
23835 // Creates a new #GtkRadioButton with a text label.
23836 // RETURNS: a new radio button.
23837 // <group>: an existing radio button group, or %NULL if you are creating a new group.
23838 // <label>: the text label to display next to the radio button.
23839 static RadioButton* new_with_label(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) nothrow {
23840 return gtk_radio_button_new_with_label(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23842 static auto opCall(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) {
23843 return gtk_radio_button_new_with_label(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23846 // Creates a new #GtkRadioButton with a text label, adding it to
23847 // the same group as @radio_group_member.
23848 // RETURNS: a new radio button.
23849 // <radio_group_member>: widget to get radio group from or %NULL
23850 // <label>: a text string to display next to the radio button.
23851 static RadioButton* new_with_label_from_widget(AT0, AT1)(AT0 /*RadioButton*/ radio_group_member, AT1 /*char*/ label) nothrow {
23852 return gtk_radio_button_new_with_label_from_widget(UpCast!(RadioButton*)(radio_group_member), toCString!(char*)(label));
23854 static auto opCall(AT0, AT1)(AT0 /*RadioButton*/ radio_group_member, AT1 /*char*/ label) {
23855 return gtk_radio_button_new_with_label_from_widget(UpCast!(RadioButton*)(radio_group_member), toCString!(char*)(label));
23858 // Unintrospectable constructor: new_with_mnemonic() / gtk_radio_button_new_with_mnemonic()
23859 // Creates a new #GtkRadioButton containing a label, adding it to the same
23860 // group as @group. The label will be created using
23861 // gtk_label_new_with_mnemonic(), so underscores in @label indicate the
23862 // mnemonic for the button.
23863 // RETURNS: a new #GtkRadioButton
23864 // <group>: the radio button group
23865 // <label>: the text of the button, with an underscore in front of the mnemonic character
23866 static RadioButton* new_with_mnemonic(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) nothrow {
23867 return gtk_radio_button_new_with_mnemonic(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23869 static auto opCall(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) {
23870 return gtk_radio_button_new_with_mnemonic(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23873 // Creates a new #GtkRadioButton containing a label. The label
23874 // will be created using gtk_label_new_with_mnemonic(), so underscores
23875 // in @label indicate the mnemonic for the button.
23876 // RETURNS: a new #GtkRadioButton
23877 // <radio_group_member>: widget to get radio group from or %NULL
23878 // <label>: the text of the button, with an underscore in front of the mnemonic character
23879 static RadioButton* new_with_mnemonic_from_widget(AT0, AT1)(AT0 /*RadioButton*/ radio_group_member, AT1 /*char*/ label) nothrow {
23880 return gtk_radio_button_new_with_mnemonic_from_widget(UpCast!(RadioButton*)(radio_group_member), toCString!(char*)(label));
23882 static auto opCall(AT0, AT1)(AT0 /*RadioButton*/ radio_group_member, AT1 /*char*/ label) {
23883 return gtk_radio_button_new_with_mnemonic_from_widget(UpCast!(RadioButton*)(radio_group_member), toCString!(char*)(label));
23886 // Retrieves the group assigned to a radio button.
23888 // containing all the radio buttons in the same group
23889 // as @radio_button. The returned list is owned by the radio button
23890 // and must not be modified or freed.
23891 // RETURNS: a linked list
23892 GLib2.SList* get_group()() nothrow {
23893 return gtk_radio_button_get_group(&this);
23896 // Creates a new #GtkRadioButton, adding it to the same group as
23897 // @radio_group_member. As with gtk_radio_button_new(), a widget
23898 // should be packed into the radio button.
23899 // RETURNS: a new radio button.
23900 Widget* new_from_widget()() nothrow {
23901 return gtk_radio_button_new_from_widget(&this);
23904 // Sets a #GtkRadioButton's group. It should be noted that this does not change
23905 // the layout of your interface in any way, so if you are changing the group,
23906 // it is likely you will need to re-arrange the user interface to reflect these
23907 // changes.
23908 // <group>: an existing radio button group, such as one returned from gtk_radio_button_get_group().
23909 void set_group(AT0)(AT0 /*GLib2.SList*/ group) nothrow {
23910 gtk_radio_button_set_group(&this, UpCast!(GLib2.SList*)(group));
23913 // VERSION: 2.4
23914 // Emitted when the group of radio buttons that a radio button belongs
23915 // to changes. This is emitted when a radio button switches from
23916 // being alone to being part of a group of 2 or more buttons, or
23917 // vice-versa, and when a button is moved from one group of 2 or
23918 // more buttons to a different one, but not when the composition
23919 // of the group that a button belongs to changes.
23920 extern (C) alias static void function (RadioButton* this_, void* user_data=null) nothrow signal_group_changed;
23922 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23923 return super_.signal_connect!name(cb, data, cf);
23926 ulong signal_connect(string name:"group-changed", CB/*:signal_group_changed*/)
23927 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
23928 if (is(typeof(cb)==signal_group_changed)||_ttmm!(CB, signal_group_changed)()) {
23929 return signal_connect_data!()(&this, cast(char*)"group-changed",
23930 cast(GObject2.Callback)cb, data, null, cf);
23934 struct RadioButtonClass {
23935 CheckButtonClass parent_class;
23936 extern (C) void function (RadioButton* radio_button) nothrow group_changed;
23937 extern (C) void function () nothrow _gtk_reserved2;
23938 extern (C) void function () nothrow _gtk_reserved3;
23939 extern (C) void function () nothrow _gtk_reserved4;
23942 struct RadioMenuItem /* : CheckMenuItem */ {
23943 mixin Atk.ImplementorIface.__interface__;
23944 mixin Activatable.__interface__;
23945 mixin Buildable.__interface__;
23946 alias check_menu_item this;
23947 alias check_menu_item super_;
23948 alias check_menu_item checkmenuitem;
23949 CheckMenuItem check_menu_item;
23950 GLib2.SList* group;
23952 // Unintrospectable constructor: new() / gtk_radio_menu_item_new()
23953 static RadioMenuItem* new_(AT0)(AT0 /*GLib2.SList*/ group) nothrow {
23954 return gtk_radio_menu_item_new(UpCast!(GLib2.SList*)(group));
23956 static auto opCall(AT0)(AT0 /*GLib2.SList*/ group) {
23957 return gtk_radio_menu_item_new(UpCast!(GLib2.SList*)(group));
23960 // Creates a new #GtkRadioMenuItem whose child is a simple #GtkLabel.
23961 // RETURNS: A new #GtkRadioMenuItem
23962 // <label>: the text for the label
23963 static RadioMenuItem* new_with_label(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) nothrow {
23964 return gtk_radio_menu_item_new_with_label(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23966 static auto opCall(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) {
23967 return gtk_radio_menu_item_new_with_label(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23970 // Unintrospectable constructor: new_with_mnemonic() / gtk_radio_menu_item_new_with_mnemonic()
23971 // Creates a new #GtkRadioMenuItem containing a label. The label
23972 // will be created using gtk_label_new_with_mnemonic(), so underscores
23973 // in @label indicate the mnemonic for the menu item.
23974 // RETURNS: a new #GtkRadioMenuItem
23975 // <group>: group the radio menu item is inside
23976 // <label>: the text of the button, with an underscore in front of the mnemonic character
23977 static RadioMenuItem* new_with_mnemonic(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) nothrow {
23978 return gtk_radio_menu_item_new_with_mnemonic(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23980 static auto opCall(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ label) {
23981 return gtk_radio_menu_item_new_with_mnemonic(UpCast!(GLib2.SList*)(group), toCString!(char*)(label));
23984 // Unintrospectable method: get_group() / gtk_radio_menu_item_get_group()
23985 // Returns the group to which the radio menu item belongs, as a #GList of
23986 // #GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
23987 // RETURNS: the group of @radio_menu_item
23988 GLib2.SList* get_group()() nothrow {
23989 return gtk_radio_menu_item_get_group(&this);
23992 // VERSION: 2.4
23993 // Creates a new #GtkRadioMenuItem adding it to the same group as @group.
23994 // RETURNS: The new #GtkRadioMenuItem
23995 Widget* new_from_widget()() nothrow {
23996 return gtk_radio_menu_item_new_from_widget(&this);
23999 // VERSION: 2.4
24000 // Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
24001 // The new #GtkRadioMenuItem is added to the same group as @group.
24002 // RETURNS: The new #GtkRadioMenuItem
24003 // <label>: the text for the label
24004 Widget* new_with_label_from_widget(AT0)(AT0 /*char*/ label) nothrow {
24005 return gtk_radio_menu_item_new_with_label_from_widget(&this, toCString!(char*)(label));
24008 // VERSION: 2.4
24009 // Creates a new GtkRadioMenuItem containing a label. The label will be
24010 // created using gtk_label_new_with_mnemonic(), so underscores in label
24011 // indicate the mnemonic for the menu item.
24013 // The new #GtkRadioMenuItem is added to the same group as @group.
24014 // RETURNS: The new #GtkRadioMenuItem
24015 // <label>: the text of the button, with an underscore in front of the mnemonic character
24016 Widget* new_with_mnemonic_from_widget(AT0)(AT0 /*char*/ label) nothrow {
24017 return gtk_radio_menu_item_new_with_mnemonic_from_widget(&this, toCString!(char*)(label));
24019 // Unintrospectable method: set_group() / gtk_radio_menu_item_set_group()
24020 void set_group(AT0)(AT0 /*GLib2.SList*/ group) nothrow {
24021 gtk_radio_menu_item_set_group(&this, UpCast!(GLib2.SList*)(group));
24023 extern (C) alias static void function (RadioMenuItem* this_, void* user_data=null) nothrow signal_group_changed;
24025 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24026 return super_.signal_connect!name(cb, data, cf);
24029 ulong signal_connect(string name:"group-changed", CB/*:signal_group_changed*/)
24030 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
24031 if (is(typeof(cb)==signal_group_changed)||_ttmm!(CB, signal_group_changed)()) {
24032 return signal_connect_data!()(&this, cast(char*)"group-changed",
24033 cast(GObject2.Callback)cb, data, null, cf);
24037 struct RadioMenuItemClass {
24038 CheckMenuItemClass parent_class;
24039 extern (C) void function (RadioMenuItem* radio_menu_item) nothrow group_changed;
24040 extern (C) void function () nothrow _gtk_reserved2;
24041 extern (C) void function () nothrow _gtk_reserved3;
24042 extern (C) void function () nothrow _gtk_reserved4;
24045 struct RadioToolButton /* : ToggleToolButton */ {
24046 mixin Atk.ImplementorIface.__interface__;
24047 mixin Activatable.__interface__;
24048 mixin Buildable.__interface__;
24049 alias parent this;
24050 alias parent super_;
24051 alias parent toggletoolbutton;
24052 ToggleToolButton parent;
24055 // Unintrospectable constructor: new() / gtk_radio_tool_button_new()
24056 // VERSION: 2.4
24057 // Creates a new #GtkRadioToolButton, adding it to @group.
24058 // RETURNS: The new #GtkRadioToolButton
24059 // <group>: An existing radio button group, or %NULL if you are creating a new group
24060 static RadioToolButton* new_(AT0)(AT0 /*GLib2.SList*/ group=null) nothrow {
24061 return gtk_radio_tool_button_new(UpCast!(GLib2.SList*)(group));
24063 static auto opCall(AT0)(AT0 /*GLib2.SList*/ group=null) {
24064 return gtk_radio_tool_button_new(UpCast!(GLib2.SList*)(group));
24067 // Unintrospectable constructor: new_from_stock() / gtk_radio_tool_button_new_from_stock()
24068 // VERSION: 2.4
24069 // Creates a new #GtkRadioToolButton, adding it to @group.
24070 // The new #GtkRadioToolButton will contain an icon and label from the
24071 // stock item indicated by @stock_id.
24072 // RETURNS: The new #GtkRadioToolItem
24073 // <group>: an existing radio button group, or %NULL if you are creating a new group
24074 // <stock_id>: the name of a stock item
24075 static RadioToolButton* new_from_stock(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ stock_id) nothrow {
24076 return gtk_radio_tool_button_new_from_stock(UpCast!(GLib2.SList*)(group), toCString!(char*)(stock_id));
24078 static auto opCall(AT0, AT1)(AT0 /*GLib2.SList*/ group, AT1 /*char*/ stock_id) {
24079 return gtk_radio_tool_button_new_from_stock(UpCast!(GLib2.SList*)(group), toCString!(char*)(stock_id));
24082 // Unintrospectable method: get_group() / gtk_radio_tool_button_get_group()
24083 // VERSION: 2.4
24084 // Returns the radio button group @button belongs to.
24085 // RETURNS: The group @button belongs to.
24086 GLib2.SList* get_group()() nothrow {
24087 return gtk_radio_tool_button_get_group(&this);
24090 // VERSION: 2.4
24091 // Creates a new #GtkRadioToolButton adding it to the same group as @gruup
24092 // RETURNS: The new #GtkRadioToolButton
24093 ToolItem* new_from_widget()() nothrow {
24094 return gtk_radio_tool_button_new_from_widget(&this);
24097 // VERSION: 2.4
24098 // Creates a new #GtkRadioToolButton adding it to the same group as @group.
24099 // The new #GtkRadioToolButton will contain an icon and label from the
24100 // stock item indicated by @stock_id.
24101 // RETURNS: A new #GtkRadioToolButton
24102 // <stock_id>: the name of a stock item
24103 ToolItem* new_with_stock_from_widget(AT0)(AT0 /*char*/ stock_id) nothrow {
24104 return gtk_radio_tool_button_new_with_stock_from_widget(&this, toCString!(char*)(stock_id));
24107 // Unintrospectable method: set_group() / gtk_radio_tool_button_set_group()
24108 // VERSION: 2.4
24109 // Adds @button to @group, removing it from the group it belonged to before.
24110 // <group>: an existing radio button group
24111 void set_group(AT0)(AT0 /*GLib2.SList*/ group) nothrow {
24112 gtk_radio_tool_button_set_group(&this, UpCast!(GLib2.SList*)(group));
24116 struct RadioToolButtonClass {
24117 ToggleToolButtonClass parent_class;
24118 extern (C) void function () nothrow _gtk_reserved1;
24119 extern (C) void function () nothrow _gtk_reserved2;
24120 extern (C) void function () nothrow _gtk_reserved3;
24121 extern (C) void function () nothrow _gtk_reserved4;
24124 struct Range /* : Widget */ {
24125 mixin Atk.ImplementorIface.__interface__;
24126 mixin Buildable.__interface__;
24127 mixin Orientable.__interface__;
24128 alias widget this;
24129 alias widget super_;
24130 Widget widget;
24131 Adjustment* adjustment;
24132 UpdateType update_policy;
24133 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24134 uint, "inverted", 1,
24135 uint, "flippable", 1,
24136 uint, "has_stepper_a", 1,
24137 uint, "has_stepper_b", 1,
24138 uint, "has_stepper_c", 1,
24139 uint, "has_stepper_d", 1,
24140 uint, "need_recalc", 1,
24141 uint, "slider_size_fixed", 1,
24142 uint, "__dummy32A", 24));
24143 int min_slider_size;
24144 Orientation orientation;
24145 Gdk2.Rectangle range_rect;
24146 int slider_start, slider_end, round_digits;
24147 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24148 uint, "trough_click_forward", 1,
24149 uint, "update_pending", 1,
24150 uint, "__dummy32B", 30));
24151 private RangeLayout* layout;
24152 private RangeStepTimer* timer;
24153 private int slide_initial_slider_position, slide_initial_coordinate;
24154 private uint update_timeout_id;
24155 private Gdk2.Window* event_window;
24158 // Get the #GtkAdjustment which is the "model" object for #GtkRange.
24159 // See gtk_range_set_adjustment() for details.
24160 // The return value does not have a reference added, so should not
24161 // be unreferenced.
24162 // RETURNS: a #GtkAdjustment
24163 Adjustment* get_adjustment()() nothrow {
24164 return gtk_range_get_adjustment(&this);
24167 // VERSION: 2.12
24168 // Gets the current position of the fill level indicator.
24169 // RETURNS: The current fill level
24170 double get_fill_level()() nothrow {
24171 return gtk_range_get_fill_level(&this);
24174 // VERSION: 2.18
24175 // Gets the value set by gtk_range_set_flippable().
24176 // RETURNS: %TRUE if the range is flippable
24177 int get_flippable()() nothrow {
24178 return gtk_range_get_flippable(&this);
24181 // Gets the value set by gtk_range_set_inverted().
24182 // RETURNS: %TRUE if the range is inverted
24183 int get_inverted()() nothrow {
24184 return gtk_range_get_inverted(&this);
24187 // VERSION: 2.10
24188 // Gets the sensitivity policy for the stepper that points to the
24189 // 'lower' end of the GtkRange's adjustment.
24190 // RETURNS: The lower stepper's sensitivity policy.
24191 SensitivityType get_lower_stepper_sensitivity()() nothrow {
24192 return gtk_range_get_lower_stepper_sensitivity(&this);
24195 // VERSION: 2.20
24196 // This function is useful mainly for #GtkRange subclasses.
24198 // See gtk_range_set_min_slider_size().
24199 // RETURNS: The minimum size of the range's slider.
24200 int get_min_slider_size()() nothrow {
24201 return gtk_range_get_min_slider_size(&this);
24204 // VERSION: 2.20
24205 // This function returns the area that contains the range's trough
24206 // and its steppers, in widget->window coordinates.
24208 // This function is useful mainly for #GtkRange subclasses.
24209 // <range_rect>: return location for the range rectangle
24210 void get_range_rect(AT0)(/*out*/ AT0 /*Gdk2.Rectangle*/ range_rect) nothrow {
24211 gtk_range_get_range_rect(&this, UpCast!(Gdk2.Rectangle*)(range_rect));
24214 // VERSION: 2.12
24215 // Gets whether the range is restricted to the fill level.
24216 // RETURNS: %TRUE if @range is restricted to the fill level.
24217 int get_restrict_to_fill_level()() nothrow {
24218 return gtk_range_get_restrict_to_fill_level(&this);
24221 // VERSION: 2.24
24222 // Gets the number of digits to round the value to when
24223 // it changes. See #GtkRange::change-value.
24224 // RETURNS: the number of digits to round to
24225 int get_round_digits()() nothrow {
24226 return gtk_range_get_round_digits(&this);
24229 // VERSION: 2.12
24230 // Gets whether the range displays the fill level graphically.
24231 // RETURNS: %TRUE if @range shows the fill level.
24232 int get_show_fill_level()() nothrow {
24233 return gtk_range_get_show_fill_level(&this);
24236 // VERSION: 2.20
24237 // This function returns sliders range along the long dimension,
24238 // in widget->window coordinates.
24240 // This function is useful mainly for #GtkRange subclasses.
24241 // <slider_start>: return location for the slider's start, or %NULL
24242 // <slider_end>: return location for the slider's end, or %NULL
24243 void get_slider_range()(/*out*/ int* slider_start=null, /*out*/ int* slider_end=null) nothrow {
24244 gtk_range_get_slider_range(&this, slider_start, slider_end);
24247 // VERSION: 2.20
24248 // This function is useful mainly for #GtkRange subclasses.
24250 // See gtk_range_set_slider_size_fixed().
24251 // RETURNS: whether the range's slider has a fixed size.
24252 int get_slider_size_fixed()() nothrow {
24253 return gtk_range_get_slider_size_fixed(&this);
24256 // DEPRECATED (v2.24) method: get_update_policy - There is no replacement. If you require delayed
24257 // Gets the update policy of @range. See gtk_range_set_update_policy().
24260 // updates, you need to code it yourself.
24261 // RETURNS: the current update policy
24262 UpdateType get_update_policy()() nothrow {
24263 return gtk_range_get_update_policy(&this);
24266 // VERSION: 2.10
24267 // Gets the sensitivity policy for the stepper that points to the
24268 // 'upper' end of the GtkRange's adjustment.
24269 // RETURNS: The upper stepper's sensitivity policy.
24270 SensitivityType get_upper_stepper_sensitivity()() nothrow {
24271 return gtk_range_get_upper_stepper_sensitivity(&this);
24274 // Gets the current value of the range.
24275 // RETURNS: current value of the range.
24276 double get_value()() nothrow {
24277 return gtk_range_get_value(&this);
24280 // Sets the adjustment to be used as the "model" object for this range
24281 // widget. The adjustment indicates the current range value, the
24282 // minimum and maximum range values, the step/page increments used
24283 // for keybindings and scrolling, and the page size. The page size
24284 // is normally 0 for #GtkScale and nonzero for #GtkScrollbar, and
24285 // indicates the size of the visible area of the widget being scrolled.
24286 // The page size affects the size of the scrollbar slider.
24287 // <adjustment>: a #GtkAdjustment
24288 void set_adjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
24289 gtk_range_set_adjustment(&this, UpCast!(Adjustment*)(adjustment));
24292 // VERSION: 2.12
24293 // Set the new position of the fill level indicator.
24295 // The "fill level" is probably best described by its most prominent
24296 // use case, which is an indicator for the amount of pre-buffering in
24297 // a streaming media player. In that use case, the value of the range
24298 // would indicate the current play position, and the fill level would
24299 // be the position up to which the file/stream has been downloaded.
24301 // This amount of prebuffering can be displayed on the range's trough
24302 // and is themeable separately from the trough. To enable fill level
24303 // display, use gtk_range_set_show_fill_level(). The range defaults
24304 // to not showing the fill level.
24306 // Additionally, it's possible to restrict the range's slider position
24307 // to values which are smaller than the fill level. This is controller
24308 // by gtk_range_set_restrict_to_fill_level() and is by default
24309 // enabled.
24310 // <fill_level>: the new position of the fill level indicator
24311 void set_fill_level()(double fill_level) nothrow {
24312 gtk_range_set_fill_level(&this, fill_level);
24315 // VERSION: 2.18
24316 // If a range is flippable, it will switch its direction if it is
24317 // horizontal and its direction is %GTK_TEXT_DIR_RTL.
24319 // See gtk_widget_get_direction().
24320 // <flippable>: %TRUE to make the range flippable
24321 void set_flippable()(int flippable) nothrow {
24322 gtk_range_set_flippable(&this, flippable);
24325 // Sets the step and page sizes for the range.
24326 // The step size is used when the user clicks the #GtkScrollbar
24327 // arrows or moves #GtkScale via arrow keys. The page size
24328 // is used for example when moving via Page Up or Page Down keys.
24329 // <step>: step size
24330 // <page>: page size
24331 void set_increments()(double step, double page) nothrow {
24332 gtk_range_set_increments(&this, step, page);
24335 // Ranges normally move from lower to higher values as the
24336 // slider moves from top to bottom or left to right. Inverted
24337 // ranges have higher values at the top or on the right rather than
24338 // on the bottom or left.
24339 // <setting>: %TRUE to invert the range
24340 void set_inverted()(int setting) nothrow {
24341 gtk_range_set_inverted(&this, setting);
24344 // VERSION: 2.10
24345 // Sets the sensitivity policy for the stepper that points to the
24346 // 'lower' end of the GtkRange's adjustment.
24347 // <sensitivity>: the lower stepper's sensitivity policy.
24348 void set_lower_stepper_sensitivity()(SensitivityType sensitivity) nothrow {
24349 gtk_range_set_lower_stepper_sensitivity(&this, sensitivity);
24352 // VERSION: 2.20
24353 // Sets the minimum size of the range's slider.
24355 // This function is useful mainly for #GtkRange subclasses.
24356 // <min_size>: The slider's minimum size
24357 void set_min_slider_size()(int min_size) nothrow {
24358 gtk_range_set_min_slider_size(&this, min_size);
24361 // Sets the allowable values in the #GtkRange, and clamps the range
24362 // value to be between @min and @max. (If the range has a non-zero
24363 // page size, it is clamped between @min and @max - page-size.)
24364 // <min>: minimum range value
24365 // <max>: maximum range value
24366 void set_range()(double min, double max) nothrow {
24367 gtk_range_set_range(&this, min, max);
24370 // VERSION: 2.12
24371 // Sets whether the slider is restricted to the fill level. See
24372 // gtk_range_set_fill_level() for a general description of the fill
24373 // level concept.
24374 // <restrict_to_fill_level>: Whether the fill level restricts slider movement.
24375 void set_restrict_to_fill_level()(int restrict_to_fill_level) nothrow {
24376 gtk_range_set_restrict_to_fill_level(&this, restrict_to_fill_level);
24379 // VERSION: 2.24
24380 // Sets the number of digits to round the value to when
24381 // it changes. See #GtkRange::change-value.
24382 // <round_digits>: the precision in digits, or -1
24383 void set_round_digits()(int round_digits) nothrow {
24384 gtk_range_set_round_digits(&this, round_digits);
24387 // VERSION: 2.12
24388 // Sets whether a graphical fill level is show on the trough. See
24389 // gtk_range_set_fill_level() for a general description of the fill
24390 // level concept.
24391 // <show_fill_level>: Whether a fill level indicator graphics is shown.
24392 void set_show_fill_level()(int show_fill_level) nothrow {
24393 gtk_range_set_show_fill_level(&this, show_fill_level);
24396 // VERSION: 2.20
24397 // Sets whether the range's slider has a fixed size, or a size that
24398 // depends on it's adjustment's page size.
24400 // This function is useful mainly for #GtkRange subclasses.
24401 // <size_fixed>: %TRUE to make the slider size constant
24402 void set_slider_size_fixed()(int size_fixed) nothrow {
24403 gtk_range_set_slider_size_fixed(&this, size_fixed);
24406 // DEPRECATED (v2.24) method: set_update_policy - There is no replacement. If you require delayed
24407 // Sets the update policy for the range. #GTK_UPDATE_CONTINUOUS means that
24408 // anytime the range slider is moved, the range value will change and the
24409 // value_changed signal will be emitted. #GTK_UPDATE_DELAYED means that
24410 // the value will be updated after a brief timeout where no slider motion
24411 // occurs, so updates are spaced by a short time rather than
24412 // continuous. #GTK_UPDATE_DISCONTINUOUS means that the value will only
24413 // be updated when the user releases the button and ends the slider
24414 // drag operation.
24416 // updates, you need to code it yourself.
24417 // <policy>: update policy
24418 void set_update_policy()(UpdateType policy) nothrow {
24419 gtk_range_set_update_policy(&this, policy);
24422 // VERSION: 2.10
24423 // Sets the sensitivity policy for the stepper that points to the
24424 // 'upper' end of the GtkRange's adjustment.
24425 // <sensitivity>: the upper stepper's sensitivity policy.
24426 void set_upper_stepper_sensitivity()(SensitivityType sensitivity) nothrow {
24427 gtk_range_set_upper_stepper_sensitivity(&this, sensitivity);
24430 // Sets the current value of the range; if the value is outside the
24431 // minimum or maximum range values, it will be clamped to fit inside
24432 // them. The range emits the #GtkRange::value-changed signal if the
24433 // value changes.
24434 // <value>: new value of the range
24435 void set_value()(double value) nothrow {
24436 gtk_range_set_value(&this, value);
24438 extern (C) alias static void function (Range* this_, double object, void* user_data=null) nothrow signal_adjust_bounds;
24440 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24441 return super_.signal_connect!name(cb, data, cf);
24444 ulong signal_connect(string name:"adjust-bounds", CB/*:signal_adjust_bounds*/)
24445 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
24446 if (is(typeof(cb)==signal_adjust_bounds)||_ttmm!(CB, signal_adjust_bounds)()) {
24447 return signal_connect_data!()(&this, cast(char*)"adjust-bounds",
24448 cast(GObject2.Callback)cb, data, null, cf);
24451 // VERSION: 2.6
24452 // The ::change-value signal is emitted when a scroll action is
24453 // performed on a range. It allows an application to determine the
24454 // type of scroll event that occurred and the resultant new value.
24455 // The application can handle the event itself and return %TRUE to
24456 // prevent further processing. Or, by returning %FALSE, it can pass
24457 // the event to other handlers until the default GTK+ handler is
24458 // reached.
24460 // The value parameter is unrounded. An application that overrides
24461 // the ::change-value signal is responsible for clamping the value to
24462 // the desired number of decimal digits; the default GTK+ handler
24463 // clamps the value based on #GtkRange:round_digits.
24465 // It is not possible to use delayed update policies in an overridden
24466 // ::change-value handler.
24467 // RETURNS: %TRUE to prevent other handlers from being invoked for the signal, %FALSE to propagate the signal further
24468 // <scroll>: the type of scroll action that was performed
24469 // <value>: the new value resulting from the scroll action
24470 extern (C) alias static c_int function (Range* this_, ScrollType* scroll, double value, void* user_data=null) nothrow signal_change_value;
24471 ulong signal_connect(string name:"change-value", CB/*:signal_change_value*/)
24472 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
24473 if (is(typeof(cb)==signal_change_value)||_ttmm!(CB, signal_change_value)()) {
24474 return signal_connect_data!()(&this, cast(char*)"change-value",
24475 cast(GObject2.Callback)cb, data, null, cf);
24478 // Virtual function that moves the slider. Used for keybindings.
24479 // <step>: how to move the slider
24480 extern (C) alias static void function (Range* this_, ScrollType* step, void* user_data=null) nothrow signal_move_slider;
24481 ulong signal_connect(string name:"move-slider", CB/*:signal_move_slider*/)
24482 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
24483 if (is(typeof(cb)==signal_move_slider)||_ttmm!(CB, signal_move_slider)()) {
24484 return signal_connect_data!()(&this, cast(char*)"move-slider",
24485 cast(GObject2.Callback)cb, data, null, cf);
24487 // Emitted when the range value changes.
24488 extern (C) alias static void function (Range* this_, void* user_data=null) nothrow signal_value_changed;
24489 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)
24490 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
24491 if (is(typeof(cb)==signal_value_changed)||_ttmm!(CB, signal_value_changed)()) {
24492 return signal_connect_data!()(&this, cast(char*)"value-changed",
24493 cast(GObject2.Callback)cb, data, null, cf);
24497 struct RangeClass {
24498 WidgetClass parent_class;
24499 char* slider_detail, stepper_detail;
24500 extern (C) void function (Range* range) nothrow value_changed;
24501 extern (C) void function (Range* range, double new_value) nothrow adjust_bounds;
24502 extern (C) void function (Range* range, ScrollType scroll) nothrow move_slider;
24503 extern (C) void function (Range* range, Border* border_) nothrow get_range_border;
24504 extern (C) int function (Range* range, ScrollType scroll, double new_value) nothrow change_value;
24505 extern (C) void function () nothrow _gtk_reserved1;
24506 extern (C) void function () nothrow _gtk_reserved2;
24507 extern (C) void function () nothrow _gtk_reserved3;
24510 struct RangeLayout {
24513 struct RangeStepTimer {
24516 struct RcContext {
24519 enum RcFlags {
24520 FG = 1,
24521 BG = 2,
24522 TEXT = 4,
24523 BASE = 8
24525 struct RcProperty {
24526 GLib2.Quark type_name, property_name;
24527 char* origin;
24528 GObject2.Value value;
24531 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
24532 // or gtk_widget_class_install_style_property_parser() which parses
24533 // borders in the form
24534 // <literal>"{ left, right, top, bottom }"</literal> for integers
24535 // %left, %right, %top and %bottom.
24537 // has been set to the resulting #GtkBorder.
24538 // RETURNS: %TRUE if @gstring could be parsed and @property_value
24539 // <pspec>: a #GParamSpec
24540 // <gstring>: the #GString to be parsed
24541 // <property_value>: a #GValue which must hold boxed values.
24542 static int parse_border(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
24543 return gtk_rc_property_parse_border(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
24546 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
24547 // or gtk_widget_class_install_style_property_parser() which parses a
24548 // color given either by its name or in the form
24549 // <literal>{ red, green, blue }</literal> where %red, %green and
24550 // %blue are integers between 0 and 65535 or floating-point numbers
24551 // between 0 and 1.
24553 // has been set to the resulting #GdkColor.
24554 // RETURNS: %TRUE if @gstring could be parsed and @property_value
24555 // <pspec>: a #GParamSpec
24556 // <gstring>: the #GString to be parsed
24557 // <property_value>: a #GValue which must hold #GdkColor values.
24558 static int parse_color(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
24559 return gtk_rc_property_parse_color(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
24562 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
24563 // or gtk_widget_class_install_style_property_parser() which parses a single
24564 // enumeration value.
24566 // The enumeration value can be specified by its name, its nickname or
24567 // its numeric value. For consistency with flags parsing, the value
24568 // may be surrounded by parentheses.
24570 // has been set to the resulting #GEnumValue.
24571 // RETURNS: %TRUE if @gstring could be parsed and @property_value
24572 // <pspec>: a #GParamSpec
24573 // <gstring>: the #GString to be parsed
24574 // <property_value>: a #GValue which must hold enum values.
24575 static int parse_enum(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
24576 return gtk_rc_property_parse_enum(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
24579 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
24580 // or gtk_widget_class_install_style_property_parser() which parses flags.
24582 // Flags can be specified by their name, their nickname or
24583 // numerically. Multiple flags can be specified in the form
24584 // <literal>"( flag1 | flag2 | ... )"</literal>.
24586 // has been set to the resulting flags value.
24587 // RETURNS: %TRUE if @gstring could be parsed and @property_value
24588 // <pspec>: a #GParamSpec
24589 // <gstring>: the #GString to be parsed
24590 // <property_value>: a #GValue which must hold flags values.
24591 static int parse_flags(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
24592 return gtk_rc_property_parse_flags(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
24595 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
24596 // or gtk_widget_class_install_style_property_parser() which parses a
24597 // requisition in the form
24598 // <literal>"{ width, height }"</literal> for integers %width and %height.
24600 // has been set to the resulting #GtkRequisition.
24601 // RETURNS: %TRUE if @gstring could be parsed and @property_value
24602 // <pspec>: a #GParamSpec
24603 // <gstring>: the #GString to be parsed
24604 // <property_value>: a #GValue which must hold boxed values.
24605 static int parse_requisition(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
24606 return gtk_rc_property_parse_requisition(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
24610 extern (C) alias int function (GObject2.ParamSpec* pspec, GLib2.String* rc_string, GObject2.Value* property_value) nothrow RcPropertyParser;
24612 struct RcStyle /* : GObject.Object */ {
24613 alias parent_instance this;
24614 alias parent_instance super_;
24615 alias parent_instance object;
24616 GObject2.Object parent_instance;
24617 char* name;
24618 char*[5] bg_pixmap_name;
24619 Pango.FontDescription* font_desc;
24620 RcFlags[5] color_flags;
24621 Gdk2.Color[5] fg, bg, text, base;
24622 int xthickness, ythickness;
24623 private void*[0] rc_properties;
24624 private GLib2.SList* rc_style_lists, icon_factories;
24625 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24626 uint, "engine_specified", 1,
24627 uint, "__dummy32A", 31));
24629 static RcStyle* /*new*/ new_()() nothrow {
24630 return gtk_rc_style_new();
24632 static auto opCall()() {
24633 return gtk_rc_style_new();
24636 // Makes a copy of the specified #GtkRcStyle. This function
24637 // will correctly copy an RC style that is a member of a class
24638 // derived from #GtkRcStyle.
24639 // RETURNS: the resulting #GtkRcStyle
24640 RcStyle* /*new*/ copy()() nothrow {
24641 return gtk_rc_style_copy(&this);
24643 void ref_()() nothrow {
24644 gtk_rc_style_ref(&this);
24646 void unref()() nothrow {
24647 gtk_rc_style_unref(&this);
24651 struct RcStyleClass {
24652 GObject2.ObjectClass parent_class;
24653 // Unintrospectable functionp: create_rc_style() / ()
24654 extern (C) RcStyle* function (RcStyle* rc_style) nothrow create_rc_style;
24655 extern (C) uint function (RcStyle* rc_style, Settings* settings, GLib2.Scanner* scanner) nothrow parse;
24656 extern (C) void function (RcStyle* dest, RcStyle* src) nothrow merge;
24657 // Unintrospectable functionp: create_style() / ()
24658 extern (C) Style* function (RcStyle* rc_style) nothrow create_style;
24659 extern (C) void function () nothrow _gtk_reserved1;
24660 extern (C) void function () nothrow _gtk_reserved2;
24661 extern (C) void function () nothrow _gtk_reserved3;
24662 extern (C) void function () nothrow _gtk_reserved4;
24665 enum RcTokenType {
24666 INVALID = 270,
24667 INCLUDE = 271,
24668 NORMAL = 272,
24669 ACTIVE = 273,
24670 PRELIGHT = 274,
24671 SELECTED = 275,
24672 INSENSITIVE = 276,
24673 FG = 277,
24674 BG = 278,
24675 TEXT = 279,
24676 BASE = 280,
24677 XTHICKNESS = 281,
24678 YTHICKNESS = 282,
24679 FONT = 283,
24680 FONTSET = 284,
24681 FONT_NAME = 285,
24682 BG_PIXMAP = 286,
24683 PIXMAP_PATH = 287,
24684 STYLE = 288,
24685 BINDING = 289,
24686 BIND = 290,
24687 WIDGET = 291,
24688 WIDGET_CLASS = 292,
24689 CLASS = 293,
24690 LOWEST = 294,
24691 GTK = 295,
24692 APPLICATION = 296,
24693 THEME = 297,
24694 RC = 298,
24695 HIGHEST = 299,
24696 ENGINE = 300,
24697 MODULE_PATH = 301,
24698 IM_MODULE_PATH = 302,
24699 IM_MODULE_FILE = 303,
24700 STOCK = 304,
24701 LTR = 305,
24702 RTL = 306,
24703 COLOR = 307,
24704 UNBIND = 308,
24705 LAST = 309
24707 struct RecentAction /* : Action */ {
24708 mixin Buildable.__interface__;
24709 mixin RecentChooser.__interface__;
24710 alias parent_instance this;
24711 alias parent_instance super_;
24712 alias parent_instance action;
24713 Action parent_instance;
24714 private RecentActionPrivate* priv;
24717 // VERSION: 2.12
24718 // Creates a new #GtkRecentAction object. To add the action to
24719 // a #GtkActionGroup and set the accelerator for the action,
24720 // call gtk_action_group_add_action_with_accel().
24721 // RETURNS: the newly created #GtkRecentAction.
24722 // <name>: a unique name for the action
24723 // <label>: the label displayed in menu items and on buttons, or %NULL
24724 // <tooltip>: a tooltip for the action, or %NULL
24725 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
24726 static RecentAction* /*new*/ new_(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id) nothrow {
24727 return gtk_recent_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id));
24729 static auto opCall(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id) {
24730 return gtk_recent_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id));
24733 // VERSION: 2.12
24734 // Creates a new #GtkRecentAction object. To add the action to
24735 // a #GtkActionGroup and set the accelerator for the action,
24736 // call gtk_action_group_add_action_with_accel().
24737 // RETURNS: the newly created #GtkRecentAction
24738 // <name>: a unique name for the action
24739 // <label>: the label displayed in menu items and on buttons, or %NULL
24740 // <tooltip>: a tooltip for the action, or %NULL
24741 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
24742 // <manager>: a #GtkRecentManager, or %NULL for using the default #GtkRecentManager
24743 static RecentAction* /*new*/ new_for_manager(AT0, AT1, AT2, AT3, AT4)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id, AT4 /*RecentManager*/ manager=null) nothrow {
24744 return gtk_recent_action_new_for_manager(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id), UpCast!(RecentManager*)(manager));
24746 static auto opCall(AT0, AT1, AT2, AT3, AT4)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id, AT4 /*RecentManager*/ manager=null) {
24747 return gtk_recent_action_new_for_manager(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id), UpCast!(RecentManager*)(manager));
24750 // VERSION: 2.12
24751 // Returns the value set by gtk_recent_chooser_menu_set_show_numbers().
24752 // RETURNS: %TRUE if numbers should be shown.
24753 int get_show_numbers()() nothrow {
24754 return gtk_recent_action_get_show_numbers(&this);
24757 // VERSION: 2.12
24758 // Sets whether a number should be added to the items shown by the
24759 // widgets representing @action. The numbers are shown to provide
24760 // a unique character for a mnemonic to be used inside the menu item's
24761 // label. Only the first ten items get a number to avoid clashes.
24762 // <show_numbers>: %TRUE if the shown items should be numbered
24763 void set_show_numbers()(int show_numbers) nothrow {
24764 gtk_recent_action_set_show_numbers(&this, show_numbers);
24768 struct RecentActionClass {
24769 ActionClass parent_class;
24772 struct RecentActionPrivate {
24775 struct RecentChooser /* Interface */ {
24776 mixin template __interface__() {
24777 // VERSION: 2.10
24778 // Adds @filter to the list of #GtkRecentFilter objects held by @chooser.
24780 // If no previous filter objects were defined, this function will call
24781 // gtk_recent_chooser_set_filter().
24782 // <filter>: a #GtkRecentFilter
24783 void add_filter(AT0)(AT0 /*RecentFilter*/ filter) nothrow {
24784 gtk_recent_chooser_add_filter(cast(RecentChooser*)&this, UpCast!(RecentFilter*)(filter));
24787 // VERSION: 2.10
24788 // Gets the #GtkRecentInfo currently selected by @chooser.
24790 // when you have finished using it.
24791 // RETURNS: a #GtkRecentInfo. Use gtk_recent_info_unref() when
24792 RecentInfo* /*new*/ get_current_item()() nothrow {
24793 return gtk_recent_chooser_get_current_item(cast(RecentChooser*)&this);
24796 // VERSION: 2.10
24797 // Gets the URI currently selected by @chooser.
24798 // RETURNS: a newly allocated string holding a URI.
24799 char* /*new*/ get_current_uri()() nothrow {
24800 return gtk_recent_chooser_get_current_uri(cast(RecentChooser*)&this);
24803 // VERSION: 2.10
24804 // Gets the #GtkRecentFilter object currently used by @chooser to affect
24805 // the display of the recently used resources.
24806 // RETURNS: a #GtkRecentFilter object.
24807 RecentFilter* get_filter()() nothrow {
24808 return gtk_recent_chooser_get_filter(cast(RecentChooser*)&this);
24811 // VERSION: 2.10
24812 // Gets the list of recently used resources in form of #GtkRecentInfo objects.
24814 // The return value of this function is affected by the "sort-type" and
24815 // "limit" properties of @chooser.
24817 // list of #GtkRecentInfo objects. You should
24818 // use gtk_recent_info_unref() on every item of the list, and then free
24819 // the list itself using g_list_free().
24820 // RETURNS: A newly allocated
24821 GLib2.List* /*new*/ get_items()() nothrow {
24822 return gtk_recent_chooser_get_items(cast(RecentChooser*)&this);
24825 // VERSION: 2.10
24826 // Gets the number of items returned by gtk_recent_chooser_get_items()
24827 // and gtk_recent_chooser_get_uris().
24829 // returned.
24830 // RETURNS: A positive integer, or -1 meaning that all items are
24831 int get_limit()() nothrow {
24832 return gtk_recent_chooser_get_limit(cast(RecentChooser*)&this);
24835 // VERSION: 2.10
24836 // Gets whether only local resources should be shown in the recently used
24837 // resources selector. See gtk_recent_chooser_set_local_only()
24838 // RETURNS: %TRUE if only local resources should be shown.
24839 int get_local_only()() nothrow {
24840 return gtk_recent_chooser_get_local_only(cast(RecentChooser*)&this);
24843 // VERSION: 2.10
24844 // Gets whether @chooser can select multiple items.
24845 // RETURNS: %TRUE if @chooser can select more than one item.
24846 int get_select_multiple()() nothrow {
24847 return gtk_recent_chooser_get_select_multiple(cast(RecentChooser*)&this);
24850 // VERSION: 2.10
24851 // Retrieves whether @chooser should show an icon near the resource.
24852 // RETURNS: %TRUE if the icons should be displayed, %FALSE otherwise.
24853 int get_show_icons()() nothrow {
24854 return gtk_recent_chooser_get_show_icons(cast(RecentChooser*)&this);
24857 // VERSION: 2.10
24858 // Retrieves whether @chooser should show the recently used resources that
24859 // were not found.
24861 // %FALSE otheriwse.
24862 // RETURNS: %TRUE if the resources not found should be displayed, and
24863 int get_show_not_found()() nothrow {
24864 return gtk_recent_chooser_get_show_not_found(cast(RecentChooser*)&this);
24867 // VERSION: 2.10
24868 // DEPRECATED (v2.12) method: get_show_numbers - use gtk_recent_chooser_menu_get_show_numbers() instead.
24869 // Returns whether @chooser should display recently used resources
24870 // prepended by a unique number.
24873 // %FALSE otherwise.
24874 // RETURNS: %TRUE if the recent chooser should show display numbers,
24875 int get_show_numbers()() nothrow {
24876 return gtk_recent_chooser_get_show_numbers(cast(RecentChooser*)&this);
24879 // VERSION: 2.10
24880 // Returns whether @chooser should display recently used resources
24881 // registered as private.
24883 // %FALSE otherwise.
24884 // RETURNS: %TRUE if the recent chooser should show private items,
24885 int get_show_private()() nothrow {
24886 return gtk_recent_chooser_get_show_private(cast(RecentChooser*)&this);
24889 // VERSION: 2.10
24890 // Gets whether @chooser should display tooltips containing the full path
24891 // of a recently user resource.
24893 // %FALSE otherwise.
24894 // RETURNS: %TRUE if the recent chooser should show tooltips,
24895 int get_show_tips()() nothrow {
24896 return gtk_recent_chooser_get_show_tips(cast(RecentChooser*)&this);
24899 // VERSION: 2.10
24900 // Gets the value set by gtk_recent_chooser_set_sort_type().
24901 // RETURNS: the sorting order of the @chooser.
24902 RecentSortType get_sort_type()() nothrow {
24903 return gtk_recent_chooser_get_sort_type(cast(RecentChooser*)&this);
24906 // VERSION: 2.10
24907 // Gets the URI of the recently used resources.
24909 // The return value of this function is affected by the "sort-type" and "limit"
24910 // properties of @chooser.
24912 // Since the returned array is %NULL terminated, @length may be %NULL.
24914 // A newly allocated, %NULL-terminated array of strings. Use
24915 // g_strfreev() to free it.
24916 // <length>: return location for a the length of the URI list, or %NULL
24917 char** /*new*/ get_uris(AT0)(/*out*/ AT0 /*size_t*/ length=null) nothrow {
24918 return gtk_recent_chooser_get_uris(cast(RecentChooser*)&this, UpCast!(size_t*)(length));
24921 // VERSION: 2.10
24922 // Gets the #GtkRecentFilter objects held by @chooser.
24924 // of #GtkRecentFilter objects. You
24925 // should just free the returned list using g_slist_free().
24926 // RETURNS: A singly linked list
24927 GLib2.SList* /*new container*/ list_filters()() nothrow {
24928 return gtk_recent_chooser_list_filters(cast(RecentChooser*)&this);
24931 // VERSION: 2.10
24932 // Removes @filter from the list of #GtkRecentFilter objects held by @chooser.
24933 // <filter>: a #GtkRecentFilter
24934 void remove_filter(AT0)(AT0 /*RecentFilter*/ filter) nothrow {
24935 gtk_recent_chooser_remove_filter(cast(RecentChooser*)&this, UpCast!(RecentFilter*)(filter));
24938 // VERSION: 2.10
24939 // Selects all the items inside @chooser, if the @chooser supports
24940 // multiple selection.
24941 void select_all()() nothrow {
24942 gtk_recent_chooser_select_all(cast(RecentChooser*)&this);
24945 // VERSION: 2.10
24946 // Selects @uri inside @chooser.
24947 // RETURNS: %TRUE if @uri was found.
24948 // <uri>: a URI
24949 int select_uri(AT0, AT1)(AT0 /*char*/ uri, AT1 /*GLib2.Error**/ error=null) nothrow {
24950 return gtk_recent_chooser_select_uri(cast(RecentChooser*)&this, toCString!(char*)(uri), UpCast!(GLib2.Error**)(error));
24953 // VERSION: 2.10
24954 // Sets @uri as the current URI for @chooser.
24955 // RETURNS: %TRUE if the URI was found.
24956 // <uri>: a URI
24957 int set_current_uri(AT0, AT1)(AT0 /*char*/ uri, AT1 /*GLib2.Error**/ error=null) nothrow {
24958 return gtk_recent_chooser_set_current_uri(cast(RecentChooser*)&this, toCString!(char*)(uri), UpCast!(GLib2.Error**)(error));
24961 // VERSION: 2.10
24962 // Sets @filter as the current #GtkRecentFilter object used by @chooser
24963 // to affect the displayed recently used resources.
24964 // <filter>: a #GtkRecentFilter
24965 void set_filter(AT0)(AT0 /*RecentFilter*/ filter) nothrow {
24966 gtk_recent_chooser_set_filter(cast(RecentChooser*)&this, UpCast!(RecentFilter*)(filter));
24969 // VERSION: 2.10
24970 // Sets the number of items that should be returned by
24971 // gtk_recent_chooser_get_items() and gtk_recent_chooser_get_uris().
24972 // <limit>: a positive integer, or -1 for all items
24973 void set_limit()(int limit) nothrow {
24974 gtk_recent_chooser_set_limit(cast(RecentChooser*)&this, limit);
24977 // VERSION: 2.10
24978 // Sets whether only local resources, that is resources using the file:// URI
24979 // scheme, should be shown in the recently used resources selector. If
24980 // @local_only is %TRUE (the default) then the shown resources are guaranteed
24981 // to be accessible through the operating system native file system.
24982 // <local_only>: %TRUE if only local files can be shown
24983 void set_local_only()(int local_only) nothrow {
24984 gtk_recent_chooser_set_local_only(cast(RecentChooser*)&this, local_only);
24987 // VERSION: 2.10
24988 // Sets whether @chooser can select multiple items.
24989 // <select_multiple>: %TRUE if @chooser can select more than one item
24990 void set_select_multiple()(int select_multiple) nothrow {
24991 gtk_recent_chooser_set_select_multiple(cast(RecentChooser*)&this, select_multiple);
24994 // VERSION: 2.10
24995 // Sets whether @chooser should show an icon near the resource when
24996 // displaying it.
24997 // <show_icons>: whether to show an icon near the resource
24998 void set_show_icons()(int show_icons) nothrow {
24999 gtk_recent_chooser_set_show_icons(cast(RecentChooser*)&this, show_icons);
25002 // VERSION: 2.10
25003 // Sets whether @chooser should display the recently used resources that
25004 // it didn't find. This only applies to local resources.
25005 // <show_not_found>: whether to show the local items we didn't find
25006 void set_show_not_found()(int show_not_found) nothrow {
25007 gtk_recent_chooser_set_show_not_found(cast(RecentChooser*)&this, show_not_found);
25010 // VERSION: 2.10
25011 // DEPRECATED (v2.12) method: set_show_numbers - Use gtk_recent_chooser_menu_set_show_numbers() instead.
25012 // Whether to show recently used resources prepended by a unique number.
25013 // <show_numbers>: %TRUE to show numbers, %FALSE otherwise
25014 void set_show_numbers()(int show_numbers) nothrow {
25015 gtk_recent_chooser_set_show_numbers(cast(RecentChooser*)&this, show_numbers);
25018 // VERSION: 2.10
25019 // Whether to show recently used resources marked registered as private.
25020 // <show_private>: %TRUE to show private items, %FALSE otherwise
25021 void set_show_private()(int show_private) nothrow {
25022 gtk_recent_chooser_set_show_private(cast(RecentChooser*)&this, show_private);
25025 // VERSION: 2.10
25026 // Sets whether to show a tooltips containing the full path of each
25027 // recently used resource in a #GtkRecentChooser widget.
25028 // <show_tips>: %TRUE if tooltips should be shown
25029 void set_show_tips()(int show_tips) nothrow {
25030 gtk_recent_chooser_set_show_tips(cast(RecentChooser*)&this, show_tips);
25033 // VERSION: 2.10
25034 // Sets the comparison function used when sorting to be @sort_func. If
25035 // the @chooser has the sort type set to #GTK_RECENT_SORT_CUSTOM then
25036 // the chooser will sort using this function.
25038 // To the comparison function will be passed two #GtkRecentInfo structs and
25039 // @sort_data; @sort_func should return a positive integer if the first
25040 // item comes before the second, zero if the two items are equal and
25041 // a negative integer if the first item comes after the second.
25042 // <sort_func>: the comparison function
25043 // <sort_data>: user data to pass to @sort_func, or %NULL
25044 // <data_destroy>: destroy notifier for @sort_data, or %NULL
25045 void set_sort_func(AT0)(RecentSortFunc sort_func, AT0 /*void*/ sort_data=null, GLib2.DestroyNotify data_destroy=null) nothrow {
25046 gtk_recent_chooser_set_sort_func(cast(RecentChooser*)&this, sort_func, UpCast!(void*)(sort_data), data_destroy);
25049 // VERSION: 2.10
25050 // Changes the sorting order of the recently used resources list displayed by
25051 // @chooser.
25052 // <sort_type>: sort order that the chooser should use
25053 void set_sort_type()(RecentSortType sort_type) nothrow {
25054 gtk_recent_chooser_set_sort_type(cast(RecentChooser*)&this, sort_type);
25057 // VERSION: 2.10
25058 // Unselects all the items inside @chooser.
25059 void unselect_all()() nothrow {
25060 gtk_recent_chooser_unselect_all(cast(RecentChooser*)&this);
25063 // VERSION: 2.10
25064 // Unselects @uri inside @chooser.
25065 // <uri>: a URI
25066 void unselect_uri(AT0)(AT0 /*char*/ uri) nothrow {
25067 gtk_recent_chooser_unselect_uri(cast(RecentChooser*)&this, toCString!(char*)(uri));
25070 // VERSION: 2.10
25071 // This signal is emitted when the user "activates" a recent item
25072 // in the recent chooser. This can happen by double-clicking on an item
25073 // in the recently used resources list, or by pressing
25074 // <keycap>Enter</keycap>.
25075 extern (C) alias static void function (RecentChooser* this_, void* user_data=null) nothrow signal_item_activated;
25077 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25078 return super_.signal_connect!name(cb, data, cf);
25081 ulong signal_connect(string name:"item-activated", CB/*:signal_item_activated*/)
25082 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
25083 if (is(typeof(cb)==signal_item_activated)||_ttmm!(CB, signal_item_activated)()) {
25084 return signal_connect_data!()(&this, cast(char*)"item-activated",
25085 cast(GObject2.Callback)cb, data, null, cf);
25088 // VERSION: 2.10
25089 // This signal is emitted when there is a change in the set of
25090 // selected recently used resources. This can happen when a user
25091 // modifies the selection with the mouse or the keyboard, or when
25092 // explicitely calling functions to change the selection.
25093 extern (C) alias static void function (RecentChooser* this_, void* user_data=null) nothrow signal_selection_changed;
25094 ulong signal_connect(string name:"selection-changed", CB/*:signal_selection_changed*/)
25095 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
25096 if (is(typeof(cb)==signal_selection_changed)||_ttmm!(CB, signal_selection_changed)()) {
25097 return signal_connect_data!()(&this, cast(char*)"selection-changed",
25098 cast(GObject2.Callback)cb, data, null, cf);
25101 mixin __interface__;
25104 struct RecentChooserDialog /* : Dialog */ {
25105 mixin Atk.ImplementorIface.__interface__;
25106 mixin Buildable.__interface__;
25107 mixin RecentChooser.__interface__;
25108 alias parent_instance this;
25109 alias parent_instance super_;
25110 alias parent_instance dialog;
25111 Dialog parent_instance;
25112 private RecentChooserDialogPrivate* priv;
25115 // Unintrospectable constructor: new() / gtk_recent_chooser_dialog_new()
25116 // VERSION: 2.10
25117 // Creates a new #GtkRecentChooserDialog. This function is analogous to
25118 // gtk_dialog_new_with_buttons().
25119 // RETURNS: a new #GtkRecentChooserDialog
25120 // <title>: Title of the dialog, or %NULL
25121 // <parent>: Transient parent of the dialog, or %NULL,
25122 // <first_button_text>: stock ID or text to go in the first button, or %NULL
25123 alias gtk_recent_chooser_dialog_new new_; // Variadic
25125 // Unintrospectable constructor: new_for_manager() / gtk_recent_chooser_dialog_new_for_manager()
25126 // VERSION: 2.10
25127 // Creates a new #GtkRecentChooserDialog with a specified recent manager.
25129 // This is useful if you have implemented your own recent manager, or if you
25130 // have a customized instance of a #GtkRecentManager object.
25131 // RETURNS: a new #GtkRecentChooserDialog
25132 // <title>: Title of the dialog, or %NULL
25133 // <parent>: Transient parent of the dialog, or %NULL,
25134 // <manager>: a #GtkRecentManager
25135 // <first_button_text>: stock ID or text to go in the first button, or %NULL
25136 alias gtk_recent_chooser_dialog_new_for_manager new_for_manager; // Variadic
25139 struct RecentChooserDialogClass {
25140 DialogClass parent_class;
25143 struct RecentChooserDialogPrivate {
25146 enum RecentChooserError {
25147 NOT_FOUND = 0,
25148 INVALID_URI = 1
25150 struct RecentChooserIface {
25151 GObject2.TypeInterface base_iface;
25153 // RETURNS: %TRUE if the URI was found.
25154 // <uri>: a URI
25155 extern (C) int function (RecentChooser* chooser, char* uri, GLib2.Error** error=null) nothrow set_current_uri;
25156 // RETURNS: a newly allocated string holding a URI.
25157 extern (C) char* /*new*/ function (RecentChooser* chooser) nothrow get_current_uri;
25159 // RETURNS: %TRUE if @uri was found.
25160 // <uri>: a URI
25161 extern (C) int function (RecentChooser* chooser, char* uri, GLib2.Error** error=null) nothrow select_uri;
25162 // <uri>: a URI
25163 extern (C) void function (RecentChooser* chooser, char* uri) nothrow unselect_uri;
25164 extern (C) void function (RecentChooser* chooser) nothrow select_all;
25165 extern (C) void function (RecentChooser* chooser) nothrow unselect_all;
25166 // RETURNS: A newly allocated
25167 extern (C) GLib2.List* /*new*/ function (RecentChooser* chooser) nothrow get_items;
25168 // Unintrospectable functionp: get_recent_manager() / ()
25169 extern (C) RecentManager* function (RecentChooser* chooser) nothrow get_recent_manager;
25170 // <filter>: a #GtkRecentFilter
25171 extern (C) void function (RecentChooser* chooser, RecentFilter* filter) nothrow add_filter;
25172 // <filter>: a #GtkRecentFilter
25173 extern (C) void function (RecentChooser* chooser, RecentFilter* filter) nothrow remove_filter;
25174 // RETURNS: A singly linked list
25175 extern (C) GLib2.SList* /*new container*/ function (RecentChooser* chooser) nothrow list_filters;
25176 // <sort_func>: the comparison function
25177 extern (C) void function (RecentChooser* chooser, RecentSortFunc sort_func, void* data, GLib2.DestroyNotify destroy) nothrow set_sort_func;
25178 extern (C) void function (RecentChooser* chooser) nothrow item_activated;
25179 extern (C) void function (RecentChooser* chooser) nothrow selection_changed;
25182 struct RecentChooserMenu /* : Menu */ {
25183 mixin Atk.ImplementorIface.__interface__;
25184 mixin Activatable.__interface__;
25185 mixin Buildable.__interface__;
25186 mixin RecentChooser.__interface__;
25187 alias parent_instance this;
25188 alias parent_instance super_;
25189 alias parent_instance menu;
25190 Menu parent_instance;
25191 private RecentChooserMenuPrivate* priv;
25194 // VERSION: 2.10
25195 // Creates a new #GtkRecentChooserMenu widget.
25197 // This kind of widget shows the list of recently used resources as
25198 // a menu, each item as a menu item. Each item inside the menu might
25199 // have an icon, representing its MIME type, and a number, for mnemonic
25200 // access.
25202 // This widget implements the #GtkRecentChooser interface.
25204 // This widget creates its own #GtkRecentManager object. See the
25205 // gtk_recent_chooser_menu_new_for_manager() function to know how to create
25206 // a #GtkRecentChooserMenu widget bound to another #GtkRecentManager object.
25207 // RETURNS: a new #GtkRecentChooserMenu
25208 static RecentChooserMenu* new_()() nothrow {
25209 return gtk_recent_chooser_menu_new();
25211 static auto opCall()() {
25212 return gtk_recent_chooser_menu_new();
25215 // VERSION: 2.10
25216 // Creates a new #GtkRecentChooserMenu widget using @manager as
25217 // the underlying recently used resources manager.
25219 // This is useful if you have implemented your own recent manager,
25220 // or if you have a customized instance of a #GtkRecentManager
25221 // object or if you wish to share a common #GtkRecentManager object
25222 // among multiple #GtkRecentChooser widgets.
25223 // RETURNS: a new #GtkRecentChooserMenu, bound to @manager.
25224 // <manager>: a #GtkRecentManager
25225 static RecentChooserMenu* new_for_manager(AT0)(AT0 /*RecentManager*/ manager) nothrow {
25226 return gtk_recent_chooser_menu_new_for_manager(UpCast!(RecentManager*)(manager));
25228 static auto opCall(AT0)(AT0 /*RecentManager*/ manager) {
25229 return gtk_recent_chooser_menu_new_for_manager(UpCast!(RecentManager*)(manager));
25232 // VERSION: 2.10
25233 // Returns the value set by gtk_recent_chooser_menu_set_show_numbers().
25234 // RETURNS: %TRUE if numbers should be shown.
25235 int get_show_numbers()() nothrow {
25236 return gtk_recent_chooser_menu_get_show_numbers(&this);
25239 // VERSION: 2.10
25240 // Sets whether a number should be added to the items of @menu. The
25241 // numbers are shown to provide a unique character for a mnemonic to
25242 // be used inside ten menu item's label. Only the first the items
25243 // get a number to avoid clashes.
25244 // <show_numbers>: whether to show numbers
25245 void set_show_numbers()(int show_numbers) nothrow {
25246 gtk_recent_chooser_menu_set_show_numbers(&this, show_numbers);
25250 struct RecentChooserMenuClass {
25251 MenuClass parent_class;
25252 extern (C) void function () nothrow gtk_recent1;
25253 extern (C) void function () nothrow gtk_recent2;
25254 extern (C) void function () nothrow gtk_recent3;
25255 extern (C) void function () nothrow gtk_recent4;
25258 struct RecentChooserMenuPrivate {
25261 struct RecentChooserWidget /* : VBox */ {
25262 mixin Atk.ImplementorIface.__interface__;
25263 mixin Buildable.__interface__;
25264 mixin Orientable.__interface__;
25265 mixin RecentChooser.__interface__;
25266 alias parent_instance this;
25267 alias parent_instance super_;
25268 alias parent_instance vbox;
25269 VBox parent_instance;
25270 private RecentChooserWidgetPrivate* priv;
25273 // VERSION: 2.10
25274 // Creates a new #GtkRecentChooserWidget object. This is an embeddable widget
25275 // used to access the recently used resources list.
25276 // RETURNS: a new #GtkRecentChooserWidget
25277 static RecentChooserWidget* new_()() nothrow {
25278 return gtk_recent_chooser_widget_new();
25280 static auto opCall()() {
25281 return gtk_recent_chooser_widget_new();
25284 // VERSION: 2.10
25285 // Creates a new #GtkRecentChooserWidget with a specified recent manager.
25287 // This is useful if you have implemented your own recent manager, or if you
25288 // have a customized instance of a #GtkRecentManager object.
25289 // RETURNS: a new #GtkRecentChooserWidget
25290 // <manager>: a #GtkRecentManager
25291 static RecentChooserWidget* new_for_manager(AT0)(AT0 /*RecentManager*/ manager) nothrow {
25292 return gtk_recent_chooser_widget_new_for_manager(UpCast!(RecentManager*)(manager));
25294 static auto opCall(AT0)(AT0 /*RecentManager*/ manager) {
25295 return gtk_recent_chooser_widget_new_for_manager(UpCast!(RecentManager*)(manager));
25299 struct RecentChooserWidgetClass {
25300 VBoxClass parent_class;
25303 struct RecentChooserWidgetPrivate {
25307 // Meta-data to be passed to gtk_recent_manager_add_full() when
25308 // registering a recently used resource.
25309 struct RecentData {
25310 char* display_name, description, mime_type, app_name, app_exec;
25311 char** groups;
25312 int is_private;
25315 struct RecentFilter /* : Object */ {
25316 alias method_parent this;
25317 alias method_parent super_;
25318 alias method_parent object;
25319 Object method_parent;
25322 // VERSION: 2.10
25323 // Creates a new #GtkRecentFilter with no rules added to it.
25324 // Such filter does not accept any recently used resources, so is not
25325 // particularly useful until you add rules with
25326 // gtk_recent_filter_add_pattern(), gtk_recent_filter_add_mime_type(),
25327 // gtk_recent_filter_add_application(), gtk_recent_filter_add_age().
25328 // To create a filter that accepts any recently used resource, use:
25329 // |[
25330 // GtkRecentFilter *filter = gtk_recent_filter_new ();
25331 // gtk_recent_filter_add_pattern (filter, "*");
25332 // ]|
25333 // RETURNS: a new #GtkRecentFilter
25334 static RecentFilter* new_()() nothrow {
25335 return gtk_recent_filter_new();
25337 static auto opCall()() {
25338 return gtk_recent_filter_new();
25341 // VERSION: 2.10
25342 // Adds a rule that allows resources based on their age - that is, the number
25343 // of days elapsed since they were last modified.
25344 // <days>: number of days
25345 void add_age()(int days) nothrow {
25346 gtk_recent_filter_add_age(&this, days);
25349 // VERSION: 2.10
25350 // Adds a rule that allows resources based on the name of the application
25351 // that has registered them.
25352 // <application>: an application name
25353 void add_application(AT0)(AT0 /*char*/ application) nothrow {
25354 gtk_recent_filter_add_application(&this, toCString!(char*)(application));
25357 // VERSION: 2.10
25358 // Adds a rule to a filter that allows resources based on a custom callback
25359 // function. The bitfield @needed which is passed in provides information
25360 // about what sorts of information that the filter function needs;
25361 // this allows GTK+ to avoid retrieving expensive information when
25362 // it isn't needed by the filter.
25363 // <needed>: bitfield of flags indicating the information that the custom filter function needs.
25364 // <func>: callback function; if the function returns %TRUE, then the file will be displayed.
25365 // <data>: data to pass to @func
25366 // <data_destroy>: function to call to free @data when it is no longer needed.
25367 void add_custom(AT0)(RecentFilterFlags needed, RecentFilterFunc func, AT0 /*void*/ data, GLib2.DestroyNotify data_destroy) nothrow {
25368 gtk_recent_filter_add_custom(&this, needed, func, UpCast!(void*)(data), data_destroy);
25371 // VERSION: 2.10
25372 // Adds a rule that allows resources based on the name of the group
25373 // to which they belong
25374 // <group>: a group name
25375 void add_group(AT0)(AT0 /*char*/ group) nothrow {
25376 gtk_recent_filter_add_group(&this, toCString!(char*)(group));
25379 // VERSION: 2.10
25380 // Adds a rule that allows resources based on their registered MIME type.
25381 // <mime_type>: a MIME type
25382 void add_mime_type(AT0)(AT0 /*char*/ mime_type) nothrow {
25383 gtk_recent_filter_add_mime_type(&this, toCString!(char*)(mime_type));
25386 // VERSION: 2.10
25387 // Adds a rule that allows resources based on a pattern matching their
25388 // display name.
25389 // <pattern>: a file pattern
25390 void add_pattern(AT0)(AT0 /*char*/ pattern) nothrow {
25391 gtk_recent_filter_add_pattern(&this, toCString!(char*)(pattern));
25394 // VERSION: 2.10
25395 // Adds a rule allowing image files in the formats supported
25396 // by GdkPixbuf.
25397 void add_pixbuf_formats()() nothrow {
25398 gtk_recent_filter_add_pixbuf_formats(&this);
25401 // VERSION: 2.10
25402 // Tests whether a file should be displayed according to @filter.
25403 // The #GtkRecentFilterInfo structure @filter_info should include
25404 // the fields returned from gtk_recent_filter_get_needed().
25406 // This function will not typically be used by applications; it
25407 // is intended principally for use in the implementation of
25408 // #GtkRecentChooser.
25409 // RETURNS: %TRUE if the file should be displayed
25410 // <filter_info>: a #GtkRecentFilterInfo structure containing information about a recently used resource
25411 int filter(AT0)(AT0 /*RecentFilterInfo*/ filter_info) nothrow {
25412 return gtk_recent_filter_filter(&this, UpCast!(RecentFilterInfo*)(filter_info));
25415 // VERSION: 2.10
25416 // Gets the human-readable name for the filter.
25417 // See gtk_recent_filter_set_name().
25419 // is owned by the filter object and should not be freed.
25420 // RETURNS: the name of the filter, or %NULL. The returned string
25421 char* get_name()() nothrow {
25422 return gtk_recent_filter_get_name(&this);
25425 // VERSION: 2.10
25426 // Gets the fields that need to be filled in for the structure
25427 // passed to gtk_recent_filter_filter()
25429 // This function will not typically be used by applications; it
25430 // is intended principally for use in the implementation of
25431 // #GtkRecentChooser.
25433 // calling gtk_recent_filter_filter()
25434 // RETURNS: bitfield of flags indicating needed fields when
25435 RecentFilterFlags get_needed()() nothrow {
25436 return gtk_recent_filter_get_needed(&this);
25439 // VERSION: 2.10
25440 // Sets the human-readable name of the filter; this is the string
25441 // that will be displayed in the recently used resources selector
25442 // user interface if there is a selectable list of filters.
25443 // <name>: then human readable name of @filter
25444 void set_name(AT0)(AT0 /*char*/ name) nothrow {
25445 gtk_recent_filter_set_name(&this, toCString!(char*)(name));
25449 enum RecentFilterFlags {
25450 URI = 1,
25451 DISPLAY_NAME = 2,
25452 MIME_TYPE = 4,
25453 APPLICATION = 8,
25454 GROUP = 16,
25455 AGE = 32
25457 extern (C) alias int function (RecentFilterInfo* filter_info, void* user_data) nothrow RecentFilterFunc;
25459 struct RecentFilterInfo {
25460 RecentFilterFlags contains;
25461 char* uri, display_name, mime_type;
25462 char** applications, groups;
25463 int age;
25466 struct RecentInfo {
25468 // VERSION: 2.10
25469 // Checks whether the resource pointed by @info still exists. At
25470 // the moment this check is done only on resources pointing to local files.
25471 // RETURNS: %TRUE if the resource exists
25472 int exists()() nothrow {
25473 return gtk_recent_info_exists(&this);
25476 // VERSION: 2.10
25477 // Gets the timestamp (seconds from system's Epoch) when the resource
25478 // was added to the recently used resources list.
25480 // the resource was added to the list, or -1 on failure.
25481 // RETURNS: the number of seconds elapsed from system's Epoch when
25482 time_t get_added()() nothrow {
25483 return gtk_recent_info_get_added(&this);
25486 // VERSION: 2.10
25487 // Gets the number of days elapsed since the last update of the resource
25488 // pointed by @info.
25490 // since the time this resource was last modified.
25491 // RETURNS: a positive integer containing the number of days elapsed
25492 int get_age()() nothrow {
25493 return gtk_recent_info_get_age(&this);
25496 // VERSION: 2.10
25497 // Gets the data regarding the application that has registered the resource
25498 // pointed by @info.
25500 // If the command line contains any escape characters defined inside the
25501 // storage specification, they will be expanded.
25503 // resource inside the recently used list, or %FALSE otherwise. The
25504 // @app_exec string is owned by the #GtkRecentInfo and should not be
25505 // modified or freed
25506 // RETURNS: %TRUE if an application with @app_name has registered this
25507 // <app_name>: the name of the application that has registered this item
25508 // <app_exec>: return location for the string containing the command line
25509 // <count>: return location for the number of times this item was registered
25510 // <time_>: return location for the timestamp this item was last registered for this application
25511 int get_application_info(AT0, AT1, AT2, AT3)(AT0 /*char*/ app_name, /*out*/ AT1 /*char**/ app_exec, /*out*/ AT2 /*uint*/ count, /*out*/ AT3 /*time_t*/ time_) nothrow {
25512 return gtk_recent_info_get_application_info(&this, toCString!(char*)(app_name), toCString!(char**)(app_exec), UpCast!(uint*)(count), UpCast!(time_t*)(time_));
25515 // VERSION: 2.10
25516 // Retrieves the list of applications that have registered this resource.
25518 // a newly allocated %NULL-terminated array of strings.
25519 // Use g_strfreev() to free it.
25520 // <length>: return location for the length of the returned list
25521 char** /*new*/ get_applications(AT0)(/*out*/ AT0 /*size_t*/ length=null) nothrow {
25522 return gtk_recent_info_get_applications(&this, UpCast!(size_t*)(length));
25525 // VERSION: 2.10
25526 // Gets the (short) description of the resource.
25528 // is owned by the recent manager, and should not be freed.
25529 // RETURNS: the description of the resource. The returned string
25530 char* get_description()() nothrow {
25531 return gtk_recent_info_get_description(&this);
25534 // VERSION: 2.10
25535 // Gets the name of the resource. If none has been defined, the basename
25536 // of the resource is obtained.
25538 // is owned by the recent manager, and should not be freed.
25539 // RETURNS: the display name of the resource. The returned string
25540 char* get_display_name()() nothrow {
25541 return gtk_recent_info_get_display_name(&this);
25544 // VERSION: 2.10
25545 // Returns all groups registered for the recently used item @info. The
25546 // array of returned group names will be %NULL terminated, so length might
25547 // optionally be %NULL.
25549 // a newly allocated %NULL terminated array of strings.
25550 // Use g_strfreev() to free it.
25551 // <length>: return location for the number of groups returned
25552 char** /*new*/ get_groups(AT0)(/*out*/ AT0 /*size_t*/ length=null) nothrow {
25553 return gtk_recent_info_get_groups(&this, UpCast!(size_t*)(length));
25556 // VERSION: 2.10
25557 // Retrieves the icon of size @size associated to the resource MIME type.
25559 // or %NULL. Use g_object_unref() when finished using the icon.
25560 // RETURNS: a #GdkPixbuf containing the icon,
25561 // <size>: the size of the icon in pixels
25562 GdkPixbuf2.Pixbuf* /*new*/ get_icon()(int size) nothrow {
25563 return gtk_recent_info_get_icon(&this, size);
25566 // VERSION: 2.10
25567 // Gets the MIME type of the resource.
25569 // is owned by the recent manager, and should not be freed.
25570 // RETURNS: the MIME type of the resource. The returned string
25571 char* get_mime_type()() nothrow {
25572 return gtk_recent_info_get_mime_type(&this);
25575 // VERSION: 2.10
25576 // Gets the timestamp (seconds from system's Epoch) when the resource
25577 // was last modified.
25579 // the resource was last modified, or -1 on failure.
25580 // RETURNS: the number of seconds elapsed from system's Epoch when
25581 time_t get_modified()() nothrow {
25582 return gtk_recent_info_get_modified(&this);
25585 // VERSION: 2.10
25586 // Gets the value of the "private" flag. Resources in the recently used
25587 // list that have this flag set to %TRUE should only be displayed by the
25588 // applications that have registered them.
25589 // RETURNS: %TRUE if the private flag was found, %FALSE otherwise.
25590 int get_private_hint()() nothrow {
25591 return gtk_recent_info_get_private_hint(&this);
25594 // VERSION: 2.10
25595 // Computes a valid UTF-8 string that can be used as the name of the item in a
25596 // menu or list. For example, calling this function on an item that refers to
25597 // "file:///foo/bar.txt" will yield "bar.txt".
25599 // g_free().
25600 // RETURNS: A newly-allocated string in UTF-8 encoding; free it with
25601 char* /*new*/ get_short_name()() nothrow {
25602 return gtk_recent_info_get_short_name(&this);
25605 // VERSION: 2.10
25606 // Gets the URI of the resource.
25608 // owned by the recent manager, and should not be freed.
25609 // RETURNS: the URI of the resource. The returned string is
25610 char* get_uri()() nothrow {
25611 return gtk_recent_info_get_uri(&this);
25614 // VERSION: 2.10
25615 // Gets a displayable version of the resource's URI. If the resource
25616 // is local, it returns a local path; if the resource is not local,
25617 // it returns the UTF-8 encoded content of gtk_recent_info_get_uri().
25619 // resource's URI or %NULL. Use g_free() when done using it.
25620 // RETURNS: a newly allocated UTF-8 string containing the
25621 char* /*new*/ get_uri_display()() nothrow {
25622 return gtk_recent_info_get_uri_display(&this);
25625 // VERSION: 2.10
25626 // Gets the timestamp (seconds from system's Epoch) when the resource
25627 // was last visited.
25629 // the resource was last visited, or -1 on failure.
25630 // RETURNS: the number of seconds elapsed from system's Epoch when
25631 time_t get_visited()() nothrow {
25632 return gtk_recent_info_get_visited(&this);
25635 // VERSION: 2.10
25636 // Checks whether an application registered this resource using @app_name.
25638 // %FALSE otherwise.
25639 // RETURNS: %TRUE if an application with name @app_name was found,
25640 // <app_name>: a string containing an application name
25641 int has_application(AT0)(AT0 /*char*/ app_name) nothrow {
25642 return gtk_recent_info_has_application(&this, toCString!(char*)(app_name));
25645 // VERSION: 2.10
25646 // Checks whether @group_name appears inside the groups registered for the
25647 // recently used item @info.
25648 // RETURNS: %TRUE if the group was found.
25649 // <group_name>: name of a group
25650 int has_group(AT0)(AT0 /*char*/ group_name) nothrow {
25651 return gtk_recent_info_has_group(&this, toCString!(char*)(group_name));
25654 // VERSION: 2.10
25655 // Checks whether the resource is local or not by looking at the
25656 // scheme of its URI.
25657 // RETURNS: %TRUE if the resource is local.
25658 int is_local()() nothrow {
25659 return gtk_recent_info_is_local(&this);
25662 // VERSION: 2.10
25663 // Gets the name of the last application that have registered the
25664 // recently used resource represented by @info.
25665 // RETURNS: an application name. Use g_free() to free it.
25666 char* /*new*/ last_application()() nothrow {
25667 return gtk_recent_info_last_application(&this);
25670 // VERSION: 2.10
25671 // Checks whether two #GtkRecentInfo structures point to the same
25672 // resource.
25674 // resource, %FALSE otherwise.
25675 // RETURNS: %TRUE if both #GtkRecentInfo structures point to se same
25676 // <info_b>: a #GtkRecentInfo
25677 int match(AT0)(AT0 /*RecentInfo*/ info_b) nothrow {
25678 return gtk_recent_info_match(&this, UpCast!(RecentInfo*)(info_b));
25681 // VERSION: 2.10
25682 // Increases the reference count of @recent_info by one.
25684 // by one.
25685 // RETURNS: the recent info object with its reference count increased
25686 RecentInfo* /*new*/ ref_()() nothrow {
25687 return gtk_recent_info_ref(&this);
25690 // VERSION: 2.10
25691 // Decreases the reference count of @info by one. If the reference
25692 // count reaches zero, @info is deallocated, and the memory freed.
25693 void unref()() nothrow {
25694 gtk_recent_info_unref(&this);
25698 struct RecentManager /* : GObject.Object */ {
25699 alias parent_instance this;
25700 alias parent_instance super_;
25701 alias parent_instance object;
25702 GObject2.Object parent_instance;
25703 private RecentManagerPrivate* priv;
25706 // VERSION: 2.10
25707 // Creates a new recent manager object. Recent manager objects are used to
25708 // handle the list of recently used resources. A #GtkRecentManager object
25709 // monitors the recently used resources list, and emits the "changed" signal
25710 // each time something inside the list changes.
25712 // #GtkRecentManager objects are expensive: be sure to create them only when
25713 // needed. You should use gtk_recent_manager_get_default() instead.
25714 // RETURNS: A newly created #GtkRecentManager object.
25715 static RecentManager* /*new*/ new_()() nothrow {
25716 return gtk_recent_manager_new();
25718 static auto opCall()() {
25719 return gtk_recent_manager_new();
25722 // VERSION: 2.10
25723 // Gets a unique instance of #GtkRecentManager, that you can share
25724 // in your application without caring about memory management. The
25725 // returned instance will be freed when you application terminates.
25726 // RETURNS: A unique #GtkRecentManager. Do not ref or unref it.
25727 static RecentManager* get_default()() nothrow {
25728 return gtk_recent_manager_get_default();
25731 // Unintrospectable function: get_for_screen() / gtk_recent_manager_get_for_screen()
25732 // VERSION: 2.10
25733 // DEPRECATED (v2.12) function: get_for_screen - This function has been deprecated and should
25734 // Gets the recent manager object associated with @screen; if this
25735 // function has not previously been called for the given screen,
25736 // a new recent manager object will be created and associated with
25737 // the screen. Recent manager objects are fairly expensive to create,
25738 // so using this function is usually a better choice than calling
25739 // gtk_recent_manager_new() and setting the screen yourself; by using
25740 // this function a single recent manager object will be shared between
25741 // users.
25743 // screen. This recent manager is associated to the with the screen
25744 // and can be used as long as the screen is open. Do not ref or
25745 // unref it.
25747 // not be used in newly written code. Calling this function is
25748 // equivalent to calling gtk_recent_manager_get_default().
25749 // RETURNS: A unique #GtkRecentManager associated with the given
25750 // <screen>: a #GdkScreen
25751 static RecentManager* get_for_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
25752 return gtk_recent_manager_get_for_screen(UpCast!(Gdk2.Screen*)(screen));
25755 // VERSION: 2.10
25756 // Adds a new resource, pointed by @uri, into the recently used
25757 // resources list, using the metadata specified inside the #GtkRecentData
25758 // structure passed in @recent_data.
25760 // The passed URI will be used to identify this resource inside the
25761 // list.
25763 // In order to register the new recently used resource, metadata about
25764 // the resource must be passed as well as the URI; the metadata is
25765 // stored in a #GtkRecentData structure, which must contain the MIME
25766 // type of the resource pointed by the URI; the name of the application
25767 // that is registering the item, and a command line to be used when
25768 // launching the item.
25770 // Optionally, a #GtkRecentData structure might contain a UTF-8 string
25771 // to be used when viewing the item instead of the last component of the
25772 // URI; a short description of the item; whether the item should be
25773 // considered private - that is, should be displayed only by the
25774 // applications that have registered it.
25776 // recently used resources list, %FALSE otherwise.
25777 // RETURNS: %TRUE if the new item was successfully added to the
25778 // <uri>: a valid URI
25779 // <recent_data>: metadata of the resource
25780 int add_full(AT0, AT1)(AT0 /*char*/ uri, AT1 /*RecentData*/ recent_data) nothrow {
25781 return gtk_recent_manager_add_full(&this, toCString!(char*)(uri), UpCast!(RecentData*)(recent_data));
25784 // VERSION: 2.10
25785 // Adds a new resource, pointed by @uri, into the recently used
25786 // resources list.
25788 // This function automatically retrieves some of the needed
25789 // metadata and setting other metadata to common default values; it
25790 // then feeds the data to gtk_recent_manager_add_full().
25792 // See gtk_recent_manager_add_full() if you want to explicitly
25793 // define the metadata for the resource pointed by @uri.
25795 // to the recently used resources list
25796 // RETURNS: %TRUE if the new item was successfully added
25797 // <uri>: a valid URI
25798 int add_item(AT0)(AT0 /*char*/ uri) nothrow {
25799 return gtk_recent_manager_add_item(&this, toCString!(char*)(uri));
25802 // VERSION: 2.10
25803 // Gets the list of recently used resources.
25805 // newly allocated #GtkRecentInfo objects. Use
25806 // gtk_recent_info_unref() on each item inside the list, and then
25807 // free the list itself using g_list_free().
25808 // RETURNS: a list of
25809 GLib2.List* /*new*/ get_items()() nothrow {
25810 return gtk_recent_manager_get_items(&this);
25813 // VERSION: 2.10
25814 // DEPRECATED (v2.22) method: get_limit - The length of the list should be managed by the
25815 // Gets the maximum number of items that the gtk_recent_manager_get_items()
25816 // function should return.
25820 // view (implementing #GtkRecentChooser), and not by the model (the
25821 // #GtkRecentManager). See #GtkRecentChooser:limit.
25822 // RETURNS: the number of items to return, or -1 for every item.
25823 int get_limit()() nothrow {
25824 return gtk_recent_manager_get_limit(&this);
25827 // VERSION: 2.10
25828 // Checks whether there is a recently used resource registered
25829 // with @uri inside the recent manager.
25830 // RETURNS: %TRUE if the resource was found, %FALSE otherwise.
25831 // <uri>: a URI
25832 int has_item(AT0)(AT0 /*char*/ uri) nothrow {
25833 return gtk_recent_manager_has_item(&this, toCString!(char*)(uri));
25836 // VERSION: 2.10
25837 // Searches for a URI inside the recently used resources list, and
25838 // returns a structure containing informations about the resource
25839 // like its MIME type, or its display name.
25841 // about the resource pointed by @uri, or %NULL if the URI was
25842 // not registered in the recently used resources list. Free with
25843 // gtk_recent_info_unref().
25844 // RETURNS: a #GtkRecentInfo structure containing information
25845 // <uri>: a URI
25846 RecentInfo* /*new*/ lookup_item(AT0, AT1)(AT0 /*char*/ uri, AT1 /*GLib2.Error**/ error=null) nothrow {
25847 return gtk_recent_manager_lookup_item(&this, toCString!(char*)(uri), UpCast!(GLib2.Error**)(error));
25850 // VERSION: 2.10
25851 // Changes the location of a recently used resource from @uri to @new_uri.
25853 // Please note that this function will not affect the resource pointed
25854 // by the URIs, but only the URI used in the recently used resources list.
25855 // RETURNS: %TRUE on success.
25856 // <uri>: the URI of a recently used resource
25857 // <new_uri>: the new URI of the recently used resource, or %NULL to remove the item pointed by @uri in the list
25858 int move_item(AT0, AT1, AT2)(AT0 /*char*/ uri, AT1 /*char*/ new_uri, AT2 /*GLib2.Error**/ error=null) nothrow {
25859 return gtk_recent_manager_move_item(&this, toCString!(char*)(uri), toCString!(char*)(new_uri), UpCast!(GLib2.Error**)(error));
25862 // VERSION: 2.10
25863 // Purges every item from the recently used resources list.
25865 // recently used resources list.
25866 // RETURNS: the number of items that have been removed from the
25867 int purge_items(AT0)(AT0 /*GLib2.Error**/ error=null) nothrow {
25868 return gtk_recent_manager_purge_items(&this, UpCast!(GLib2.Error**)(error));
25871 // VERSION: 2.10
25872 // Removes a resource pointed by @uri from the recently used resources
25873 // list handled by a recent manager.
25875 // removed by the recently used resources list, and %FALSE otherwise.
25876 // RETURNS: %TRUE if the item pointed by @uri has been successfully
25877 // <uri>: the URI of the item you wish to remove
25878 int remove_item(AT0, AT1)(AT0 /*char*/ uri, AT1 /*GLib2.Error**/ error=null) nothrow {
25879 return gtk_recent_manager_remove_item(&this, toCString!(char*)(uri), UpCast!(GLib2.Error**)(error));
25882 // VERSION: 2.10
25883 // DEPRECATED (v2.22) method: set_limit - The length of the list should be managed by the
25884 // Sets the maximum number of item that the gtk_recent_manager_get_items()
25885 // function should return. If @limit is set to -1, then return all the
25886 // items.
25889 // view (implementing #GtkRecentChooser), and not by the model (the
25890 // #GtkRecentManager). See #GtkRecentChooser:limit.
25891 // <limit>: the maximum number of items to return, or -1.
25892 void set_limit()(int limit) nothrow {
25893 gtk_recent_manager_set_limit(&this, limit);
25896 // VERSION: 2.10
25897 // DEPRECATED (v2.12) method: set_screen - This function has been deprecated and should
25898 // Sets the screen for a recent manager; the screen is used to
25899 // track the user's currently configured recently used documents
25900 // storage.
25903 // not be used in newly written code. Calling this function has
25904 // no effect.
25905 // <screen>: a #GdkScreen
25906 void set_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
25907 gtk_recent_manager_set_screen(&this, UpCast!(Gdk2.Screen*)(screen));
25910 // VERSION: 2.10
25911 // Emitted when the current recently used resources manager changes its
25912 // contents.
25913 extern (C) alias static void function (RecentManager* this_, void* user_data=null) nothrow signal_changed;
25915 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25916 return super_.signal_connect!name(cb, data, cf);
25919 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
25920 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
25921 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
25922 return signal_connect_data!()(&this, cast(char*)"changed",
25923 cast(GObject2.Callback)cb, data, null, cf);
25927 struct RecentManagerClass {
25928 private GObject2.ObjectClass parent_class;
25929 extern (C) void function (RecentManager* manager) nothrow changed;
25930 extern (C) void function () nothrow _gtk_recent1;
25931 extern (C) void function () nothrow _gtk_recent2;
25932 extern (C) void function () nothrow _gtk_recent3;
25933 extern (C) void function () nothrow _gtk_recent4;
25936 // Error codes for GtkRecentManager operations
25937 enum RecentManagerError {
25938 NOT_FOUND = 0,
25939 INVALID_URI = 1,
25940 INVALID_ENCODING = 2,
25941 NOT_REGISTERED = 3,
25942 READ = 4,
25943 WRITE = 5,
25944 UNKNOWN = 6
25946 struct RecentManagerPrivate {
25949 extern (C) alias int function (RecentInfo* a, RecentInfo* b, void* user_data) nothrow RecentSortFunc;
25952 // Used to specify the sorting method to be applyed to the recently
25953 // used resource list.
25954 enum RecentSortType {
25955 NONE = 0,
25956 MRU = 1,
25957 LRU = 2,
25958 CUSTOM = 3
25960 enum ReliefStyle {
25961 NORMAL = 0,
25962 HALF = 1,
25963 NONE = 2
25966 // A <structname>GtkRequisition</structname> represents the desired size of a widget. See
25967 // <xref linkend="size-requisition"/> for more information.
25968 struct Requisition {
25969 int width, height;
25972 // Copies a #GtkRequisition.
25973 // RETURNS: a copy of @requisition
25974 Requisition* /*new*/ copy()() nothrow {
25975 return gtk_requisition_copy(&this);
25977 // Frees a #GtkRequisition.
25978 void free()() nothrow {
25979 gtk_requisition_free(&this);
25983 enum ResizeMode {
25984 PARENT = 0,
25985 QUEUE = 1,
25986 IMMEDIATE = 2
25988 enum ResponseType {
25989 NONE = -1,
25990 REJECT = -2,
25991 ACCEPT = -3,
25992 DELETE_EVENT = -4,
25993 OK = -5,
25994 CANCEL = -6,
25995 CLOSE = -7,
25996 YES = -8,
25997 NO = -9,
25998 APPLY = -10,
25999 HELP = -11
26001 struct Ruler /* : Widget */ {
26002 mixin Atk.ImplementorIface.__interface__;
26003 mixin Buildable.__interface__;
26004 mixin Orientable.__interface__;
26005 alias widget this;
26006 alias widget super_;
26007 Widget widget;
26008 Gdk2.Pixmap* backing_store;
26009 Gdk2.GC* non_gr_exp_gc;
26010 RulerMetric* metric;
26011 int xsrc, ysrc, slider_size;
26012 double lower, upper, position, max_size;
26014 void draw_pos()() nothrow {
26015 gtk_ruler_draw_pos(&this);
26017 void draw_ticks()() nothrow {
26018 gtk_ruler_draw_ticks(&this);
26021 // Gets the units used for a #GtkRuler. See gtk_ruler_set_metric().
26024 // unmaintained and too specialized. There is no replacement.
26025 // RETURNS: the units currently used for @ruler
26026 MetricType get_metric()() nothrow {
26027 return gtk_ruler_get_metric(&this);
26030 // Retrieves values indicating the range and current position of a #GtkRuler.
26031 // See gtk_ruler_set_range().
26033 // unmaintained and too specialized. There is no replacement.
26034 // <lower>: location to store lower limit of the ruler, or %NULL
26035 // <upper>: location to store upper limit of the ruler, or %NULL
26036 // <position>: location to store the current position of the mark on the ruler, or %NULL
26037 // <max_size>: location to store the maximum size of the ruler used when calculating the space to leave for the text, or %NULL.
26038 void get_range(AT0, AT1, AT2, AT3)(AT0 /*double*/ lower, AT1 /*double*/ upper, AT2 /*double*/ position, AT3 /*double*/ max_size) nothrow {
26039 gtk_ruler_get_range(&this, UpCast!(double*)(lower), UpCast!(double*)(upper), UpCast!(double*)(position), UpCast!(double*)(max_size));
26041 void set_metric()(MetricType metric) nothrow {
26042 gtk_ruler_set_metric(&this, metric);
26045 // This sets the range of the ruler.
26047 // unmaintained and too specialized. There is no replacement.
26048 // <lower>: the lower limit of the ruler
26049 // <upper>: the upper limit of the ruler
26050 // <position>: the mark on the ruler
26051 // <max_size>: the maximum size of the ruler used when calculating the space to leave for the text
26052 void set_range()(double lower, double upper, double position, double max_size) nothrow {
26053 gtk_ruler_set_range(&this, lower, upper, position, max_size);
26057 struct RulerClass {
26058 WidgetClass parent_class;
26059 extern (C) void function (Ruler* ruler) nothrow draw_ticks;
26060 extern (C) void function (Ruler* ruler) nothrow draw_pos;
26061 extern (C) void function () nothrow _gtk_reserved1;
26062 extern (C) void function () nothrow _gtk_reserved2;
26063 extern (C) void function () nothrow _gtk_reserved3;
26064 extern (C) void function () nothrow _gtk_reserved4;
26067 struct RulerMetric {
26068 char* metric_name, abbrev;
26069 double pixels_per_unit;
26070 double[10] ruler_scale;
26071 int[5] subdivide;
26074 enum STOCK_ABOUT = "gtk-about";
26075 enum STOCK_ADD = "gtk-add";
26076 enum STOCK_APPLY = "gtk-apply";
26077 enum STOCK_BOLD = "gtk-bold";
26078 enum STOCK_CANCEL = "gtk-cancel";
26079 enum STOCK_CAPS_LOCK_WARNING = "gtk-caps-lock-warning";
26080 enum STOCK_CDROM = "gtk-cdrom";
26081 enum STOCK_CLEAR = "gtk-clear";
26082 enum STOCK_CLOSE = "gtk-close";
26083 enum STOCK_COLOR_PICKER = "gtk-color-picker";
26084 enum STOCK_CONNECT = "gtk-connect";
26085 enum STOCK_CONVERT = "gtk-convert";
26086 enum STOCK_COPY = "gtk-copy";
26087 enum STOCK_CUT = "gtk-cut";
26088 enum STOCK_DELETE = "gtk-delete";
26089 enum STOCK_DIALOG_AUTHENTICATION = "gtk-dialog-authentication";
26090 enum STOCK_DIALOG_ERROR = "gtk-dialog-error";
26091 enum STOCK_DIALOG_INFO = "gtk-dialog-info";
26092 enum STOCK_DIALOG_QUESTION = "gtk-dialog-question";
26093 enum STOCK_DIALOG_WARNING = "gtk-dialog-warning";
26094 enum STOCK_DIRECTORY = "gtk-directory";
26095 enum STOCK_DISCARD = "gtk-discard";
26096 enum STOCK_DISCONNECT = "gtk-disconnect";
26097 enum STOCK_DND = "gtk-dnd";
26098 enum STOCK_DND_MULTIPLE = "gtk-dnd-multiple";
26099 enum STOCK_EDIT = "gtk-edit";
26100 enum STOCK_EXECUTE = "gtk-execute";
26101 enum STOCK_FILE = "gtk-file";
26102 enum STOCK_FIND = "gtk-find";
26103 enum STOCK_FIND_AND_REPLACE = "gtk-find-and-replace";
26104 enum STOCK_FLOPPY = "gtk-floppy";
26105 enum STOCK_FULLSCREEN = "gtk-fullscreen";
26106 enum STOCK_GOTO_BOTTOM = "gtk-goto-bottom";
26107 enum STOCK_GOTO_FIRST = "gtk-goto-first";
26108 enum STOCK_GOTO_LAST = "gtk-goto-last";
26109 enum STOCK_GOTO_TOP = "gtk-goto-top";
26110 enum STOCK_GO_BACK = "gtk-go-back";
26111 enum STOCK_GO_DOWN = "gtk-go-down";
26112 enum STOCK_GO_FORWARD = "gtk-go-forward";
26113 enum STOCK_GO_UP = "gtk-go-up";
26114 enum STOCK_HARDDISK = "gtk-harddisk";
26115 enum STOCK_HELP = "gtk-help";
26116 enum STOCK_HOME = "gtk-home";
26117 enum STOCK_INDENT = "gtk-indent";
26118 enum STOCK_INDEX = "gtk-index";
26119 enum STOCK_INFO = "gtk-info";
26120 enum STOCK_ITALIC = "gtk-italic";
26121 enum STOCK_JUMP_TO = "gtk-jump-to";
26122 enum STOCK_JUSTIFY_CENTER = "gtk-justify-center";
26123 enum STOCK_JUSTIFY_FILL = "gtk-justify-fill";
26124 enum STOCK_JUSTIFY_LEFT = "gtk-justify-left";
26125 enum STOCK_JUSTIFY_RIGHT = "gtk-justify-right";
26126 enum STOCK_LEAVE_FULLSCREEN = "gtk-leave-fullscreen";
26127 enum STOCK_MEDIA_FORWARD = "gtk-media-forward";
26128 enum STOCK_MEDIA_NEXT = "gtk-media-next";
26129 enum STOCK_MEDIA_PAUSE = "gtk-media-pause";
26130 enum STOCK_MEDIA_PLAY = "gtk-media-play";
26131 enum STOCK_MEDIA_PREVIOUS = "gtk-media-previous";
26132 enum STOCK_MEDIA_RECORD = "gtk-media-record";
26133 enum STOCK_MEDIA_REWIND = "gtk-media-rewind";
26134 enum STOCK_MEDIA_STOP = "gtk-media-stop";
26135 enum STOCK_MISSING_IMAGE = "gtk-missing-image";
26136 enum STOCK_NETWORK = "gtk-network";
26137 enum STOCK_NEW = "gtk-new";
26138 enum STOCK_NO = "gtk-no";
26139 enum STOCK_OK = "gtk-ok";
26140 enum STOCK_OPEN = "gtk-open";
26141 enum STOCK_ORIENTATION_LANDSCAPE = "gtk-orientation-landscape";
26142 enum STOCK_ORIENTATION_PORTRAIT = "gtk-orientation-portrait";
26143 enum STOCK_ORIENTATION_REVERSE_LANDSCAPE = "gtk-orientation-reverse-landscape";
26144 enum STOCK_ORIENTATION_REVERSE_PORTRAIT = "gtk-orientation-reverse-portrait";
26145 enum STOCK_PAGE_SETUP = "gtk-page-setup";
26146 enum STOCK_PASTE = "gtk-paste";
26147 enum STOCK_PREFERENCES = "gtk-preferences";
26148 enum STOCK_PRINT = "gtk-print";
26149 enum STOCK_PRINT_ERROR = "gtk-print-error";
26150 enum STOCK_PRINT_PAUSED = "gtk-print-paused";
26151 enum STOCK_PRINT_PREVIEW = "gtk-print-preview";
26152 enum STOCK_PRINT_REPORT = "gtk-print-report";
26153 enum STOCK_PRINT_WARNING = "gtk-print-warning";
26154 enum STOCK_PROPERTIES = "gtk-properties";
26155 enum STOCK_QUIT = "gtk-quit";
26156 enum STOCK_REDO = "gtk-redo";
26157 enum STOCK_REFRESH = "gtk-refresh";
26158 enum STOCK_REMOVE = "gtk-remove";
26159 enum STOCK_REVERT_TO_SAVED = "gtk-revert-to-saved";
26160 enum STOCK_SAVE = "gtk-save";
26161 enum STOCK_SAVE_AS = "gtk-save-as";
26162 enum STOCK_SELECT_ALL = "gtk-select-all";
26163 enum STOCK_SELECT_COLOR = "gtk-select-color";
26164 enum STOCK_SELECT_FONT = "gtk-select-font";
26165 enum STOCK_SORT_ASCENDING = "gtk-sort-ascending";
26166 enum STOCK_SORT_DESCENDING = "gtk-sort-descending";
26167 enum STOCK_SPELL_CHECK = "gtk-spell-check";
26168 enum STOCK_STOP = "gtk-stop";
26169 enum STOCK_STRIKETHROUGH = "gtk-strikethrough";
26170 enum STOCK_UNDELETE = "gtk-undelete";
26171 enum STOCK_UNDERLINE = "gtk-underline";
26172 enum STOCK_UNDO = "gtk-undo";
26173 enum STOCK_UNINDENT = "gtk-unindent";
26174 enum STOCK_YES = "gtk-yes";
26175 enum STOCK_ZOOM_100 = "gtk-zoom-100";
26176 enum STOCK_ZOOM_FIT = "gtk-zoom-fit";
26177 enum STOCK_ZOOM_IN = "gtk-zoom-in";
26178 enum STOCK_ZOOM_OUT = "gtk-zoom-out";
26179 struct Scale /* : Range */ {
26180 mixin Atk.ImplementorIface.__interface__;
26181 mixin Buildable.__interface__;
26182 mixin Orientable.__interface__;
26183 alias range this;
26184 alias range super_;
26185 Range range;
26186 int digits;
26187 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26188 uint, "draw_value", 1,
26189 uint, "value_pos", 2,
26190 uint, "__dummy32A", 29));
26193 // VERSION: 2.16
26194 // Adds a mark at @value.
26196 // A mark is indicated visually by drawing a tick mark next to the scale,
26197 // and GTK+ makes it easy for the user to position the scale exactly at the
26198 // marks value.
26200 // If @markup is not %NULL, text is shown next to the tick mark.
26202 // To remove marks from a scale, use gtk_scale_clear_marks().
26203 // <value>: the value at which the mark is placed, must be between the lower and upper limits of the scales' adjustment
26204 // <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.
26205 // <markup>: Text to be shown at the mark, using <link linkend="PangoMarkupFormat">Pango markup</link>, or %NULL
26206 void add_mark(AT0)(double value, PositionType position, AT0 /*char*/ markup=null) nothrow {
26207 gtk_scale_add_mark(&this, value, position, toCString!(char*)(markup));
26210 // VERSION: 2.16
26211 // Removes any marks that have been added with gtk_scale_add_mark().
26212 void clear_marks()() nothrow {
26213 gtk_scale_clear_marks(&this);
26216 // Gets the number of decimal places that are displayed in the value.
26217 // RETURNS: the number of decimal places that are displayed
26218 int get_digits()() nothrow {
26219 return gtk_scale_get_digits(&this);
26222 // Returns whether the current value is displayed as a string
26223 // next to the slider.
26224 // RETURNS: whether the current value is displayed as a string
26225 int get_draw_value()() nothrow {
26226 return gtk_scale_get_draw_value(&this);
26229 // VERSION: 2.4
26230 // Gets the #PangoLayout used to display the scale. The returned
26231 // object is owned by the scale so does not need to be freed by
26232 // the caller.
26234 // or %NULL if the #GtkScale:draw-value property is %FALSE.
26235 // RETURNS: the #PangoLayout for this scale,
26236 Pango.Layout* get_layout()() nothrow {
26237 return gtk_scale_get_layout(&this);
26240 // VERSION: 2.4
26241 // Obtains the coordinates where the scale will draw the
26242 // #PangoLayout representing the text in the scale. Remember
26243 // when using the #PangoLayout function you need to convert to
26244 // and from pixels using PANGO_PIXELS() or #PANGO_SCALE.
26246 // If the #GtkScale:draw-value property is %FALSE, the return
26247 // values are undefined.
26248 // <x>: location to store X offset of layout, or %NULL
26249 // <y>: location to store Y offset of layout, or %NULL
26250 void get_layout_offsets()(/*out*/ int* x=null, /*out*/ int* y=null) nothrow {
26251 gtk_scale_get_layout_offsets(&this, x, y);
26254 // Gets the position in which the current value is displayed.
26255 // RETURNS: the position in which the current value is displayed
26256 PositionType get_value_pos()() nothrow {
26257 return gtk_scale_get_value_pos(&this);
26260 // Sets the number of decimal places that are displayed in the value.
26261 // Also causes the value of the adjustment to be rounded off to this
26262 // number of digits, so the retrieved value matches the value the user saw.
26263 // <digits>: the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00, etc
26264 void set_digits()(int digits) nothrow {
26265 gtk_scale_set_digits(&this, digits);
26268 // Specifies whether the current value is displayed as a string next
26269 // to the slider.
26270 // <draw_value>: %TRUE to draw the value
26271 void set_draw_value()(int draw_value) nothrow {
26272 gtk_scale_set_draw_value(&this, draw_value);
26275 // Sets the position in which the current value is displayed.
26276 // <pos>: the position in which the current value is displayed
26277 void set_value_pos()(PositionType pos) nothrow {
26278 gtk_scale_set_value_pos(&this, pos);
26281 // Signal which allows you to change how the scale value is displayed.
26282 // Connect a signal handler which returns an allocated string representing
26283 // @value. That string will then be used to display the scale's value.
26285 // Here's an example signal handler which displays a value 1.0 as
26286 // with "--&gt;1.0&lt;--".
26287 // |[
26288 // static gchar*
26289 // format_value_callback (GtkScale *scale,
26290 // gdouble value)
26291 // {
26292 // return g_strdup_printf ("--&gt;&percnt;0.*g&lt;--",
26293 // gtk_scale_get_digits (scale), value);
26294 // }
26295 // ]|
26296 // RETURNS: allocated string representing @value
26297 // <value>: the value to format
26298 extern (C) alias static char* /*new*/ function (Scale* this_, double value, void* user_data=null) nothrow signal_format_value;
26300 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26301 return super_.signal_connect!name(cb, data, cf);
26304 ulong signal_connect(string name:"format-value", CB/*:signal_format_value*/)
26305 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
26306 if (is(typeof(cb)==signal_format_value)||_ttmm!(CB, signal_format_value)()) {
26307 return signal_connect_data!()(&this, cast(char*)"format-value",
26308 cast(GObject2.Callback)cb, data, null, cf);
26312 struct ScaleButton /* : Button */ {
26313 mixin Atk.ImplementorIface.__interface__;
26314 mixin Activatable.__interface__;
26315 mixin Buildable.__interface__;
26316 mixin Orientable.__interface__;
26317 alias parent this;
26318 alias parent super_;
26319 alias parent button;
26320 Button parent;
26321 Widget* plus_button, minus_button;
26322 private ScaleButtonPrivate* priv;
26325 // VERSION: 2.12
26326 // Creates a #GtkScaleButton, with a range between @min and @max, with
26327 // a stepping of @step.
26328 // RETURNS: a new #GtkScaleButton
26329 // <size>: a stock icon size
26330 // <min>: the minimum value of the scale (usually 0)
26331 // <max>: the maximum value of the scale (usually 100)
26332 // <step>: the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)
26333 // <icons>: a %NULL-terminated array of icon names, or %NULL if you want to set the list later with gtk_scale_button_set_icons()
26334 static ScaleButton* new_(AT0)(IconSize size, double min, double max, double step, AT0 /*char**/ icons=null) nothrow {
26335 return gtk_scale_button_new(size, min, max, step, toCString!(char**)(icons));
26337 static auto opCall(AT0)(IconSize size, double min, double max, double step, AT0 /*char**/ icons=null) {
26338 return gtk_scale_button_new(size, min, max, step, toCString!(char**)(icons));
26341 // VERSION: 2.12
26342 // Gets the #GtkAdjustment associated with the #GtkScaleButton's scale.
26343 // See gtk_range_get_adjustment() for details.
26344 // RETURNS: the adjustment associated with the scale
26345 Adjustment* get_adjustment()() nothrow {
26346 return gtk_scale_button_get_adjustment(&this);
26349 // VERSION: 2.14
26350 // Retrieves the minus button of the #GtkScaleButton.
26351 // RETURNS: the minus button of the #GtkScaleButton
26352 Widget* get_minus_button()() nothrow {
26353 return gtk_scale_button_get_minus_button(&this);
26356 // VERSION: 2.14
26357 // DEPRECATED (v2.16) method: get_orientation - Use gtk_orientable_get_orientation() instead.
26358 // Gets the orientation of the #GtkScaleButton's popup window.
26359 // RETURNS: the #GtkScaleButton's orientation.
26360 Orientation get_orientation()() nothrow {
26361 return gtk_scale_button_get_orientation(&this);
26364 // VERSION: 2.14
26365 // Retrieves the plus button of the #GtkScaleButton.
26366 // RETURNS: the plus button of the #GtkScaleButton
26367 Widget* get_plus_button()() nothrow {
26368 return gtk_scale_button_get_plus_button(&this);
26371 // VERSION: 2.14
26372 // Retrieves the popup of the #GtkScaleButton.
26373 // RETURNS: the popup of the #GtkScaleButton
26374 Widget* get_popup()() nothrow {
26375 return gtk_scale_button_get_popup(&this);
26378 // VERSION: 2.12
26379 // Gets the current value of the scale button.
26380 // RETURNS: current value of the scale button
26381 double get_value()() nothrow {
26382 return gtk_scale_button_get_value(&this);
26385 // VERSION: 2.12
26386 // Sets the #GtkAdjustment to be used as a model
26387 // for the #GtkScaleButton's scale.
26388 // See gtk_range_set_adjustment() for details.
26389 // <adjustment>: a #GtkAdjustment
26390 void set_adjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
26391 gtk_scale_button_set_adjustment(&this, UpCast!(Adjustment*)(adjustment));
26394 // VERSION: 2.12
26395 // Sets the icons to be used by the scale button.
26396 // For details, see the #GtkScaleButton:icons property.
26397 // <icons>: a %NULL-terminated array of icon names
26398 void set_icons(AT0)(AT0 /*char**/ icons) nothrow {
26399 gtk_scale_button_set_icons(&this, toCString!(char**)(icons));
26402 // VERSION: 2.14
26403 // DEPRECATED (v2.16) method: set_orientation - Use gtk_orientable_set_orientation() instead.
26404 // Sets the orientation of the #GtkScaleButton's popup window.
26405 // <orientation>: the new orientation
26406 void set_orientation()(Orientation orientation) nothrow {
26407 gtk_scale_button_set_orientation(&this, orientation);
26410 // VERSION: 2.12
26411 // Sets the current value of the scale; if the value is outside
26412 // the minimum or maximum range values, it will be clamped to fit
26413 // inside them. The scale button emits the #GtkScaleButton::value-changed
26414 // signal if the value changes.
26415 // <value>: new value of the scale button
26416 void set_value()(double value) nothrow {
26417 gtk_scale_button_set_value(&this, value);
26420 // VERSION: 2.12
26421 // The ::popdown signal is a
26422 // <link linkend="keybinding-signals">keybinding signal</link>
26423 // which gets emitted to popdown the scale widget.
26425 // The default binding for this signal is Escape.
26426 extern (C) alias static void function (ScaleButton* this_, void* user_data=null) nothrow signal_popdown;
26428 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26429 return super_.signal_connect!name(cb, data, cf);
26432 ulong signal_connect(string name:"popdown", CB/*:signal_popdown*/)
26433 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
26434 if (is(typeof(cb)==signal_popdown)||_ttmm!(CB, signal_popdown)()) {
26435 return signal_connect_data!()(&this, cast(char*)"popdown",
26436 cast(GObject2.Callback)cb, data, null, cf);
26439 // VERSION: 2.12
26440 // The ::popup signal is a
26441 // <link linkend="keybinding-signals">keybinding signal</link>
26442 // which gets emitted to popup the scale widget.
26444 // The default bindings for this signal are Space, Enter and Return.
26445 extern (C) alias static void function (ScaleButton* this_, void* user_data=null) nothrow signal_popup;
26446 ulong signal_connect(string name:"popup", CB/*:signal_popup*/)
26447 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
26448 if (is(typeof(cb)==signal_popup)||_ttmm!(CB, signal_popup)()) {
26449 return signal_connect_data!()(&this, cast(char*)"popup",
26450 cast(GObject2.Callback)cb, data, null, cf);
26453 // VERSION: 2.12
26454 // The ::value-changed signal is emitted when the value field has
26455 // changed.
26456 // <value>: the new value
26457 extern (C) alias static void function (ScaleButton* this_, double value, void* user_data=null) nothrow signal_value_changed;
26458 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)
26459 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
26460 if (is(typeof(cb)==signal_value_changed)||_ttmm!(CB, signal_value_changed)()) {
26461 return signal_connect_data!()(&this, cast(char*)"value-changed",
26462 cast(GObject2.Callback)cb, data, null, cf);
26466 struct ScaleButtonClass {
26467 ButtonClass parent_class;
26468 extern (C) void function (ScaleButton* button, double value) nothrow value_changed;
26469 extern (C) void function () nothrow _gtk_reserved1;
26470 extern (C) void function () nothrow _gtk_reserved2;
26471 extern (C) void function () nothrow _gtk_reserved3;
26472 extern (C) void function () nothrow _gtk_reserved4;
26475 struct ScaleButtonPrivate {
26478 struct ScaleClass {
26479 RangeClass parent_class;
26480 extern (C) char* /*new*/ function (Scale* scale, double value) nothrow format_value;
26481 extern (C) void function (Scale* scale) nothrow draw_value;
26483 // <x>: location to store X offset of layout, or %NULL
26484 // <y>: location to store Y offset of layout, or %NULL
26485 extern (C) void function (Scale* scale, /*out*/ int* x=null, /*out*/ int* y=null) nothrow get_layout_offsets;
26486 extern (C) void function () nothrow _gtk_reserved1;
26487 extern (C) void function () nothrow _gtk_reserved2;
26488 extern (C) void function () nothrow _gtk_reserved3;
26491 enum ScrollStep {
26492 STEPS = 0,
26493 PAGES = 1,
26494 ENDS = 2,
26495 HORIZONTAL_STEPS = 3,
26496 HORIZONTAL_PAGES = 4,
26497 HORIZONTAL_ENDS = 5
26499 enum ScrollType {
26500 NONE = 0,
26501 JUMP = 1,
26502 STEP_BACKWARD = 2,
26503 STEP_FORWARD = 3,
26504 PAGE_BACKWARD = 4,
26505 PAGE_FORWARD = 5,
26506 STEP_UP = 6,
26507 STEP_DOWN = 7,
26508 PAGE_UP = 8,
26509 PAGE_DOWN = 9,
26510 STEP_LEFT = 10,
26511 STEP_RIGHT = 11,
26512 PAGE_LEFT = 12,
26513 PAGE_RIGHT = 13,
26514 START = 14,
26515 END = 15
26517 struct Scrollbar /* : Range */ {
26518 mixin Atk.ImplementorIface.__interface__;
26519 mixin Buildable.__interface__;
26520 mixin Orientable.__interface__;
26521 alias range this;
26522 alias range super_;
26523 Range range;
26526 struct ScrollbarClass {
26527 RangeClass parent_class;
26528 extern (C) void function () nothrow _gtk_reserved1;
26529 extern (C) void function () nothrow _gtk_reserved2;
26530 extern (C) void function () nothrow _gtk_reserved3;
26531 extern (C) void function () nothrow _gtk_reserved4;
26534 struct ScrolledWindow /* : Bin */ {
26535 mixin Atk.ImplementorIface.__interface__;
26536 mixin Buildable.__interface__;
26537 alias container this;
26538 alias container super_;
26539 alias container bin;
26540 Bin container;
26541 Widget* hscrollbar, vscrollbar;
26542 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26543 uint, "hscrollbar_policy", 2,
26544 uint, "vscrollbar_policy", 2,
26545 uint, "hscrollbar_visible", 1,
26546 uint, "vscrollbar_visible", 1,
26547 uint, "window_placement", 2,
26548 uint, "focus_out", 1,
26549 uint, "__dummy32A", 23));
26550 private ushort shadow_type;
26553 // Creates a new scrolled window.
26555 // The two arguments are the scrolled window's adjustments; these will be
26556 // shared with the scrollbars and the child widget to keep the bars in sync
26557 // with the child. Usually you want to pass %NULL for the adjustments, which
26558 // will cause the scrolled window to create them for you.
26559 // RETURNS: a new scrolled window
26560 // <hadjustment>: horizontal adjustment
26561 // <vadjustment>: vertical adjustment
26562 static ScrolledWindow* new_(AT0, AT1)(AT0 /*Adjustment*/ hadjustment=null, AT1 /*Adjustment*/ vadjustment=null) nothrow {
26563 return gtk_scrolled_window_new(UpCast!(Adjustment*)(hadjustment), UpCast!(Adjustment*)(vadjustment));
26565 static auto opCall(AT0, AT1)(AT0 /*Adjustment*/ hadjustment=null, AT1 /*Adjustment*/ vadjustment=null) {
26566 return gtk_scrolled_window_new(UpCast!(Adjustment*)(hadjustment), UpCast!(Adjustment*)(vadjustment));
26569 // Used to add children without native scrolling capabilities. This
26570 // is simply a convenience function; it is equivalent to adding the
26571 // unscrollable child to a viewport, then adding the viewport to the
26572 // scrolled window. If a child has native scrolling, use
26573 // gtk_container_add() instead of this function.
26575 // The viewport scrolls the child by moving its #GdkWindow, and takes
26576 // the size of the child to be the size of its toplevel #GdkWindow.
26577 // This will be very wrong for most widgets that support native scrolling;
26578 // for example, if you add a widget such as #GtkTreeView with a viewport,
26579 // the whole widget will scroll, including the column headings. Thus,
26580 // widgets with native scrolling support should not be used with the
26581 // #GtkViewport proxy.
26583 // A widget supports scrolling natively if the
26584 // set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero,
26585 // i.e. has been filled in with a valid signal identifier.
26586 // <child>: the widget you want to scroll
26587 void add_with_viewport(AT0)(AT0 /*Widget*/ child) nothrow {
26588 gtk_scrolled_window_add_with_viewport(&this, UpCast!(Widget*)(child));
26591 // Returns the horizontal scrollbar's adjustment, used to connect the
26592 // horizontal scrollbar to the child widget's horizontal scroll
26593 // functionality.
26594 // RETURNS: the horizontal #GtkAdjustment
26595 Adjustment* get_hadjustment()() nothrow {
26596 return gtk_scrolled_window_get_hadjustment(&this);
26599 // VERSION: 2.8
26600 // Returns the horizontal scrollbar of @scrolled_window.
26602 // or %NULL if it does not have one.
26603 // RETURNS: the horizontal scrollbar of the scrolled window,
26604 Widget* get_hscrollbar()() nothrow {
26605 return gtk_scrolled_window_get_hscrollbar(&this);
26608 // Gets the placement of the contents with respect to the scrollbars
26609 // for the scrolled window. See gtk_scrolled_window_set_placement().
26612 // See also gtk_scrolled_window_set_placement() and
26613 // gtk_scrolled_window_unset_placement().
26614 // RETURNS: the current placement value.
26615 CornerType get_placement()() nothrow {
26616 return gtk_scrolled_window_get_placement(&this);
26619 // Retrieves the current policy values for the horizontal and vertical
26620 // scrollbars. See gtk_scrolled_window_set_policy().
26621 // <hscrollbar_policy>: location to store the policy for the horizontal scrollbar, or %NULL.
26622 // <vscrollbar_policy>: location to store the policy for the vertical scrollbar, or %NULL.
26623 void get_policy(AT0, AT1)(/*out*/ AT0 /*PolicyType*/ hscrollbar_policy=null, /*out*/ AT1 /*PolicyType*/ vscrollbar_policy=null) nothrow {
26624 gtk_scrolled_window_get_policy(&this, UpCast!(PolicyType*)(hscrollbar_policy), UpCast!(PolicyType*)(vscrollbar_policy));
26627 // Gets the shadow type of the scrolled window. See
26628 // gtk_scrolled_window_set_shadow_type().
26629 // RETURNS: the current shadow type
26630 ShadowType get_shadow_type()() nothrow {
26631 return gtk_scrolled_window_get_shadow_type(&this);
26634 // Returns the vertical scrollbar's adjustment, used to connect the
26635 // vertical scrollbar to the child widget's vertical scroll functionality.
26636 // RETURNS: the vertical #GtkAdjustment
26637 Adjustment* get_vadjustment()() nothrow {
26638 return gtk_scrolled_window_get_vadjustment(&this);
26641 // VERSION: 2.8
26642 // Returns the vertical scrollbar of @scrolled_window.
26644 // or %NULL if it does not have one.
26645 // RETURNS: the vertical scrollbar of the scrolled window,
26646 Widget* get_vscrollbar()() nothrow {
26647 return gtk_scrolled_window_get_vscrollbar(&this);
26650 // Sets the #GtkAdjustment for the horizontal scrollbar.
26651 // <hadjustment>: horizontal scroll adjustment
26652 void set_hadjustment(AT0)(AT0 /*Adjustment*/ hadjustment) nothrow {
26653 gtk_scrolled_window_set_hadjustment(&this, UpCast!(Adjustment*)(hadjustment));
26656 // Sets the placement of the contents with respect to the scrollbars
26657 // for the scrolled window.
26659 // The default is %GTK_CORNER_TOP_LEFT, meaning the child is
26660 // in the top left, with the scrollbars underneath and to the right.
26661 // Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT,
26662 // %GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.
26664 // See also gtk_scrolled_window_get_placement() and
26665 // gtk_scrolled_window_unset_placement().
26666 // <window_placement>: position of the child window
26667 void set_placement()(CornerType window_placement) nothrow {
26668 gtk_scrolled_window_set_placement(&this, window_placement);
26671 // Sets the scrollbar policy for the horizontal and vertical scrollbars.
26673 // The policy determines when the scrollbar should appear; it is a value
26674 // from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the
26675 // scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is
26676 // never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only
26677 // if needed (that is, if the slider part of the bar would be smaller
26678 // than the trough - the display is larger than the page size).
26679 // <hscrollbar_policy>: policy for horizontal bar
26680 // <vscrollbar_policy>: policy for vertical bar
26681 void set_policy()(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy) nothrow {
26682 gtk_scrolled_window_set_policy(&this, hscrollbar_policy, vscrollbar_policy);
26685 // Changes the type of shadow drawn around the contents of
26686 // @scrolled_window.
26687 // <type>: kind of shadow to draw around scrolled window contents
26688 void set_shadow_type()(ShadowType type) nothrow {
26689 gtk_scrolled_window_set_shadow_type(&this, type);
26692 // Sets the #GtkAdjustment for the vertical scrollbar.
26693 // <vadjustment>: vertical scroll adjustment
26694 void set_vadjustment(AT0)(AT0 /*Adjustment*/ vadjustment) nothrow {
26695 gtk_scrolled_window_set_vadjustment(&this, UpCast!(Adjustment*)(vadjustment));
26698 // VERSION: 2.10
26699 // Unsets the placement of the contents with respect to the scrollbars
26700 // for the scrolled window. If no window placement is set for a scrolled
26701 // window, it obeys the "gtk-scrolled-window-placement" XSETTING.
26703 // See also gtk_scrolled_window_set_placement() and
26704 // gtk_scrolled_window_get_placement().
26705 void unset_placement()() nothrow {
26706 gtk_scrolled_window_unset_placement(&this);
26708 extern (C) alias static void function (ScrolledWindow* this_, DirectionType* object, void* user_data=null) nothrow signal_move_focus_out;
26710 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26711 return super_.signal_connect!name(cb, data, cf);
26714 ulong signal_connect(string name:"move-focus-out", CB/*:signal_move_focus_out*/)
26715 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
26716 if (is(typeof(cb)==signal_move_focus_out)||_ttmm!(CB, signal_move_focus_out)()) {
26717 return signal_connect_data!()(&this, cast(char*)"move-focus-out",
26718 cast(GObject2.Callback)cb, data, null, cf);
26720 extern (C) alias static c_int function (ScrolledWindow* this_, ScrollType* object, c_int p0, void* user_data=null) nothrow signal_scroll_child;
26721 ulong signal_connect(string name:"scroll-child", CB/*:signal_scroll_child*/)
26722 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
26723 if (is(typeof(cb)==signal_scroll_child)||_ttmm!(CB, signal_scroll_child)()) {
26724 return signal_connect_data!()(&this, cast(char*)"scroll-child",
26725 cast(GObject2.Callback)cb, data, null, cf);
26729 struct ScrolledWindowClass {
26730 BinClass parent_class;
26731 int scrollbar_spacing;
26732 extern (C) int function (ScrolledWindow* scrolled_window, ScrollType scroll, int horizontal) nothrow scroll_child;
26733 extern (C) void function (ScrolledWindow* scrolled_window, DirectionType direction) nothrow move_focus_out;
26734 extern (C) void function () nothrow _gtk_reserved1;
26735 extern (C) void function () nothrow _gtk_reserved2;
26736 extern (C) void function () nothrow _gtk_reserved3;
26737 extern (C) void function () nothrow _gtk_reserved4;
26740 struct SelectionData {
26741 Gdk2.Atom selection, target, type;
26742 int format;
26743 ubyte* data;
26744 int length;
26745 Gdk2.Display* display;
26748 // Makes a copy of a #GtkSelectionData structure and its data.
26749 // RETURNS: a pointer to a copy of @data.
26750 SelectionData* /*new*/ copy()() nothrow {
26751 return gtk_selection_data_copy(&this);
26754 // Frees a #GtkSelectionData structure returned from
26755 // gtk_selection_data_copy().
26756 void free()() nothrow {
26757 gtk_selection_data_free(&this);
26760 // VERSION: 2.14
26761 // Retrieves the raw data of the selection.
26762 // RETURNS: the raw data of the selection.
26763 ubyte* get_data()() nothrow {
26764 return gtk_selection_data_get_data(&this);
26767 // VERSION: 2.14
26768 // Retrieves the data type of the selection.
26769 // RETURNS: the data type of the selection.
26770 Gdk2.Atom get_data_type()() nothrow {
26771 return gtk_selection_data_get_data_type(&this);
26774 // VERSION: 2.14
26775 // Retrieves the display of the selection.
26776 // RETURNS: the display of the selection.
26777 Gdk2.Display* get_display()() nothrow {
26778 return gtk_selection_data_get_display(&this);
26781 // VERSION: 2.14
26782 // Retrieves the format of the selection.
26783 // RETURNS: the format of the selection.
26784 int get_format()() nothrow {
26785 return gtk_selection_data_get_format(&this);
26788 // VERSION: 2.14
26789 // Retrieves the length of the raw data of the selection.
26790 // RETURNS: the length of the data of the selection.
26791 int get_length()() nothrow {
26792 return gtk_selection_data_get_length(&this);
26795 // VERSION: 2.6
26796 // Gets the contents of the selection data as a #GdkPixbuf.
26798 // image type and it could be converted to a #GdkPixbuf, a
26799 // newly allocated pixbuf is returned, otherwise %NULL.
26800 // If the result is non-%NULL it must be freed with g_object_unref().
26801 // RETURNS: if the selection data contained a recognized
26802 GdkPixbuf2.Pixbuf* /*new*/ get_pixbuf()() nothrow {
26803 return gtk_selection_data_get_pixbuf(&this);
26806 // VERSION: 2.16
26807 // Retrieves the selection #GdkAtom of the selection data.
26808 // RETURNS: the selection #GdkAtom of the selection data.
26809 Gdk2.Atom get_selection()() nothrow {
26810 return gtk_selection_data_get_selection(&this);
26813 // VERSION: 2.14
26814 // Retrieves the target of the selection.
26815 // RETURNS: the target of the selection.
26816 Gdk2.Atom get_target()() nothrow {
26817 return gtk_selection_data_get_target(&this);
26820 // Gets the contents of @selection_data as an array of targets.
26821 // This can be used to interpret the results of getting
26822 // the standard TARGETS target that is always supplied for
26823 // any selection.
26825 // array of targets, otherwise %FALSE.
26826 // RETURNS: %TRUE if @selection_data contains a valid
26827 // <targets>: location to store an array of targets. The result stored here must be freed with g_free().
26828 // <n_atoms>: location to store number of items in @targets.
26829 int get_targets(AT0)(/*out*/ AT0 /*Gdk2.Atom**/ targets, /*out*/ int* n_atoms) nothrow {
26830 return gtk_selection_data_get_targets(&this, UpCast!(Gdk2.Atom**)(targets), n_atoms);
26833 // Gets the contents of the selection data as a UTF-8 string.
26835 // text type and it could be converted to UTF-8, a newly allocated
26836 // string containing the converted text, otherwise %NULL.
26837 // If the result is non-%NULL it must be freed with g_free().
26838 // RETURNS: if the selection data contained a recognized
26839 ubyte* get_text()() nothrow {
26840 return gtk_selection_data_get_text(&this);
26843 // VERSION: 2.6
26844 // Gets the contents of the selection data as array of URIs.
26846 // the selection data contains a list of
26847 // URIs, a newly allocated %NULL-terminated string array
26848 // containing the URIs, otherwise %NULL. If the result is
26849 // non-%NULL it must be freed with g_strfreev().
26850 // RETURNS: if
26851 char** /*new*/ get_uris()() nothrow {
26852 return gtk_selection_data_get_uris(&this);
26855 // Stores new data into a #GtkSelectionData object. Should
26856 // <emphasis>only</emphasis> be called from a selection handler callback.
26857 // Zero-terminates the stored data.
26858 // <type>: the type of selection data
26859 // <format>: format (number of bits in a unit)
26860 // <data>: pointer to the data (will be copied)
26861 // <length>: length of the data
26862 void set(AT0)(Gdk2.Atom type, int format, AT0 /*ubyte*/ data, int length) nothrow {
26863 gtk_selection_data_set(&this, type, format, UpCast!(ubyte*)(data), length);
26866 // VERSION: 2.6
26867 // Sets the contents of the selection from a #GdkPixbuf
26868 // The pixbuf is converted to the form determined by
26869 // @selection_data->target.
26871 // otherwise %FALSE.
26872 // RETURNS: %TRUE if the selection was successfully set,
26873 // <pixbuf>: a #GdkPixbuf
26874 int set_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
26875 return gtk_selection_data_set_pixbuf(&this, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
26878 // Sets the contents of the selection from a UTF-8 encoded string.
26879 // The string is converted to the form determined by
26880 // @selection_data->target.
26882 // otherwise %FALSE.
26883 // RETURNS: %TRUE if the selection was successfully set,
26884 // <str>: a UTF-8 string
26885 // <len>: the length of @str, or -1 if @str is nul-terminated.
26886 int set_text(AT0)(AT0 /*char*/ str, int len) nothrow {
26887 return gtk_selection_data_set_text(&this, toCString!(char*)(str), len);
26890 // VERSION: 2.6
26891 // Sets the contents of the selection from a list of URIs.
26892 // The string is converted to the form determined by
26893 // @selection_data->target.
26895 // otherwise %FALSE.
26896 // RETURNS: %TRUE if the selection was successfully set,
26897 // <uris>: a %NULL-terminated array of strings holding URIs
26898 int set_uris(AT0)(AT0 /*char**/ uris) nothrow {
26899 return gtk_selection_data_set_uris(&this, toCString!(char**)(uris));
26902 // VERSION: 2.6
26903 // Given a #GtkSelectionData object holding a list of targets,
26904 // determines if any of the targets in @targets can be used to
26905 // provide a #GdkPixbuf.
26907 // and a suitable target for images is included, otherwise %FALSE.
26908 // RETURNS: %TRUE if @selection_data holds a list of targets,
26909 // <writable>: whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format
26910 int targets_include_image()(int writable) nothrow {
26911 return gtk_selection_data_targets_include_image(&this, writable);
26914 // VERSION: 2.10
26915 // Given a #GtkSelectionData object holding a list of targets,
26916 // determines if any of the targets in @targets can be used to
26917 // provide rich text.
26919 // and a suitable target for rich text is included,
26920 // otherwise %FALSE.
26921 // RETURNS: %TRUE if @selection_data holds a list of targets,
26922 // <buffer>: a #GtkTextBuffer
26923 int targets_include_rich_text(AT0)(AT0 /*TextBuffer*/ buffer) nothrow {
26924 return gtk_selection_data_targets_include_rich_text(&this, UpCast!(TextBuffer*)(buffer));
26927 // Given a #GtkSelectionData object holding a list of targets,
26928 // determines if any of the targets in @targets can be used to
26929 // provide text.
26931 // and a suitable target for text is included, otherwise %FALSE.
26932 // RETURNS: %TRUE if @selection_data holds a list of targets,
26933 int targets_include_text()() nothrow {
26934 return gtk_selection_data_targets_include_text(&this);
26937 // VERSION: 2.10
26938 // Given a #GtkSelectionData object holding a list of targets,
26939 // determines if any of the targets in @targets can be used to
26940 // provide a list or URIs.
26942 // and a suitable target for URI lists is included, otherwise %FALSE.
26943 // RETURNS: %TRUE if @selection_data holds a list of targets,
26944 int targets_include_uri()() nothrow {
26945 return gtk_selection_data_targets_include_uri(&this);
26949 enum SelectionMode {
26950 NONE = 0,
26951 SINGLE = 1,
26952 BROWSE = 2,
26953 MULTIPLE = 3,
26954 EXTENDED = 3
26956 enum SensitivityType {
26957 AUTO = 0,
26958 ON = 1,
26959 OFF = 2
26961 struct Separator /* : Widget */ {
26962 mixin Atk.ImplementorIface.__interface__;
26963 mixin Buildable.__interface__;
26964 mixin Orientable.__interface__;
26965 alias widget this;
26966 alias widget super_;
26967 Widget widget;
26970 struct SeparatorClass {
26971 WidgetClass parent_class;
26974 struct SeparatorMenuItem /* : MenuItem */ {
26975 mixin Atk.ImplementorIface.__interface__;
26976 mixin Activatable.__interface__;
26977 mixin Buildable.__interface__;
26978 alias menu_item this;
26979 alias menu_item super_;
26980 alias menu_item menuitem;
26981 MenuItem menu_item;
26983 static SeparatorMenuItem* new_()() nothrow {
26984 return gtk_separator_menu_item_new();
26986 static auto opCall()() {
26987 return gtk_separator_menu_item_new();
26991 struct SeparatorMenuItemClass {
26992 MenuItemClass parent_class;
26995 struct SeparatorToolItem /* : ToolItem */ {
26996 mixin Atk.ImplementorIface.__interface__;
26997 mixin Activatable.__interface__;
26998 mixin Buildable.__interface__;
26999 alias parent this;
27000 alias parent super_;
27001 alias parent toolitem;
27002 ToolItem parent;
27003 private SeparatorToolItemPrivate* priv;
27006 // VERSION: 2.4
27007 // Create a new #GtkSeparatorToolItem
27008 // RETURNS: the new #GtkSeparatorToolItem
27009 static SeparatorToolItem* new_()() nothrow {
27010 return gtk_separator_tool_item_new();
27012 static auto opCall()() {
27013 return gtk_separator_tool_item_new();
27016 // VERSION: 2.4
27017 // Returns whether @item is drawn as a line, or just blank.
27018 // See gtk_separator_tool_item_set_draw().
27019 // RETURNS: %TRUE if @item is drawn as a line, or just blank.
27020 int get_draw()() nothrow {
27021 return gtk_separator_tool_item_get_draw(&this);
27024 // VERSION: 2.4
27025 // Whether @item is drawn as a vertical line, or just blank.
27026 // Setting this to %FALSE along with gtk_tool_item_set_expand() is useful
27027 // to create an item that forces following items to the end of the toolbar.
27028 // <draw>: whether @item is drawn as a vertical line
27029 void set_draw()(int draw) nothrow {
27030 gtk_separator_tool_item_set_draw(&this, draw);
27034 struct SeparatorToolItemClass {
27035 ToolItemClass parent_class;
27036 extern (C) void function () nothrow _gtk_reserved1;
27037 extern (C) void function () nothrow _gtk_reserved2;
27038 extern (C) void function () nothrow _gtk_reserved3;
27039 extern (C) void function () nothrow _gtk_reserved4;
27042 struct SeparatorToolItemPrivate {
27045 struct Settings /* : GObject.Object */ {
27046 alias parent_instance this;
27047 alias parent_instance super_;
27048 alias parent_instance object;
27049 GObject2.Object parent_instance;
27050 GLib2.Data* queued_settings;
27051 SettingsPropertyValue* property_values;
27052 RcContext* rc_context;
27053 Gdk2.Screen* screen;
27056 // Gets the #GtkSettings object for the default GDK screen, creating
27057 // it if necessary. See gtk_settings_get_for_screen().
27059 // screen, then returns %NULL.
27060 // RETURNS: a #GtkSettings object. If there is no default
27061 static Settings* get_default()() nothrow {
27062 return gtk_settings_get_default();
27065 // VERSION: 2.2
27066 // Gets the #GtkSettings object for @screen, creating it if necessary.
27067 // RETURNS: a #GtkSettings object.
27068 // <screen>: a #GdkScreen.
27069 static Settings* get_for_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
27070 return gtk_settings_get_for_screen(UpCast!(Gdk2.Screen*)(screen));
27072 static void install_property(AT0)(AT0 /*GObject2.ParamSpec*/ pspec) nothrow {
27073 gtk_settings_install_property(UpCast!(GObject2.ParamSpec*)(pspec));
27075 // Unintrospectable function: install_property_parser() / gtk_settings_install_property_parser()
27076 static void install_property_parser(AT0)(AT0 /*GObject2.ParamSpec*/ pspec, RcPropertyParser parser) nothrow {
27077 gtk_settings_install_property_parser(UpCast!(GObject2.ParamSpec*)(pspec), parser);
27079 void set_double_property(AT0, AT1)(AT0 /*char*/ name, double v_double, AT1 /*char*/ origin) nothrow {
27080 gtk_settings_set_double_property(&this, toCString!(char*)(name), v_double, toCString!(char*)(origin));
27082 void set_long_property(AT0, AT1)(AT0 /*char*/ name, c_long v_long, AT1 /*char*/ origin) nothrow {
27083 gtk_settings_set_long_property(&this, toCString!(char*)(name), v_long, toCString!(char*)(origin));
27085 void set_property_value(AT0, AT1)(AT0 /*char*/ name, AT1 /*SettingsValue*/ svalue) nothrow {
27086 gtk_settings_set_property_value(&this, toCString!(char*)(name), UpCast!(SettingsValue*)(svalue));
27088 void set_string_property(AT0, AT1, AT2)(AT0 /*char*/ name, AT1 /*char*/ v_string, AT2 /*char*/ origin) nothrow {
27089 gtk_settings_set_string_property(&this, toCString!(char*)(name), toCString!(char*)(v_string), toCString!(char*)(origin));
27093 struct SettingsClass {
27094 GObject2.ObjectClass parent_class;
27097 struct SettingsPropertyValue {
27100 struct SettingsValue {
27101 char* origin;
27102 GObject2.Value value;
27105 enum ShadowType {
27106 NONE = 0,
27107 IN = 1,
27108 OUT = 2,
27109 ETCHED_IN = 3,
27110 ETCHED_OUT = 4
27112 enum SideType {
27113 TOP = 0,
27114 BOTTOM = 1,
27115 LEFT = 2,
27116 RIGHT = 3
27118 extern (C) alias void function () nothrow SignalFunc;
27120 enum SignalRunType {
27121 FIRST = 1,
27122 LAST = 2,
27123 BOTH = 3,
27124 NO_RECURSE = 8,
27125 ACTION = 32,
27126 NO_HOOKS = 64
27128 struct SizeGroup /* : GObject.Object */ {
27129 mixin Buildable.__interface__;
27130 alias parent_instance this;
27131 alias parent_instance super_;
27132 alias parent_instance object;
27133 GObject2.Object parent_instance;
27134 private GLib2.SList* widgets;
27135 private ubyte mode;
27136 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27137 uint, "have_width", 1,
27138 uint, "have_height", 1,
27139 uint, "ignore_hidden", 1,
27140 uint, "__dummy32A", 29));
27141 private Requisition requisition;
27144 // Create a new #GtkSizeGroup.
27145 // RETURNS: a newly created #GtkSizeGroup
27146 // <mode>: the mode for the new size group.
27147 static SizeGroup* /*new*/ new_()(SizeGroupMode mode) nothrow {
27148 return gtk_size_group_new(mode);
27150 static auto opCall()(SizeGroupMode mode) {
27151 return gtk_size_group_new(mode);
27154 // Adds a widget to a #GtkSizeGroup. In the future, the requisition
27155 // of the widget will be determined as the maximum of its requisition
27156 // and the requisition of the other widgets in the size group.
27157 // Whether this applies horizontally, vertically, or in both directions
27158 // depends on the mode of the size group. See gtk_size_group_set_mode().
27160 // When the widget is destroyed or no longer referenced elsewhere, it will
27161 // be removed from the size group.
27162 // <widget>: the #GtkWidget to add
27163 void add_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
27164 gtk_size_group_add_widget(&this, UpCast!(Widget*)(widget));
27167 // VERSION: 2.8
27168 // Returns if invisible widgets are ignored when calculating the size.
27169 // RETURNS: %TRUE if invisible widgets are ignored.
27170 int get_ignore_hidden()() nothrow {
27171 return gtk_size_group_get_ignore_hidden(&this);
27174 // Gets the current mode of the size group. See gtk_size_group_set_mode().
27175 // RETURNS: the current mode of the size group.
27176 SizeGroupMode get_mode()() nothrow {
27177 return gtk_size_group_get_mode(&this);
27180 // VERSION: 2.10
27181 // Returns the list of widgets associated with @size_group.
27183 // widgets. The list is owned by GTK+ and should not be modified.
27184 // RETURNS: a #GSList of
27185 GLib2.SList* get_widgets()() nothrow {
27186 return gtk_size_group_get_widgets(&this);
27189 // Removes a widget from a #GtkSizeGroup.
27190 // <widget>: the #GtkWidget to remove
27191 void remove_widget(AT0)(AT0 /*Widget*/ widget) nothrow {
27192 gtk_size_group_remove_widget(&this, UpCast!(Widget*)(widget));
27195 // VERSION: 2.8
27196 // Sets whether unmapped widgets should be ignored when
27197 // calculating the size.
27198 // <ignore_hidden>: whether unmapped widgets should be ignored when calculating the size
27199 void set_ignore_hidden()(int ignore_hidden) nothrow {
27200 gtk_size_group_set_ignore_hidden(&this, ignore_hidden);
27203 // Sets the #GtkSizeGroupMode of the size group. The mode of the size
27204 // group determines whether the widgets in the size group should
27205 // all have the same horizontal requisition (%GTK_SIZE_GROUP_MODE_HORIZONTAL)
27206 // all have the same vertical requisition (%GTK_SIZE_GROUP_MODE_VERTICAL),
27207 // or should all have the same requisition in both directions
27208 // (%GTK_SIZE_GROUP_MODE_BOTH).
27209 // <mode>: the mode to set for the size group.
27210 void set_mode()(SizeGroupMode mode) nothrow {
27211 gtk_size_group_set_mode(&this, mode);
27215 struct SizeGroupClass {
27216 GObject2.ObjectClass parent_class;
27217 extern (C) void function () nothrow _gtk_reserved1;
27218 extern (C) void function () nothrow _gtk_reserved2;
27219 extern (C) void function () nothrow _gtk_reserved3;
27220 extern (C) void function () nothrow _gtk_reserved4;
27224 // The mode of the size group determines the directions in which the size
27225 // group affects the requested sizes of its component widgets.
27226 enum SizeGroupMode {
27227 NONE = 0,
27228 HORIZONTAL = 1,
27229 VERTICAL = 2,
27230 BOTH = 3
27233 // Together with #GtkPlug, #GtkSocket provides the ability
27234 // to embed widgets from one process into another process
27235 // in a fashion that is transparent to the user. One
27236 // process creates a #GtkSocket widget and passes
27237 // that widget's window ID to the other process,
27238 // which then creates a #GtkPlug with that window ID.
27239 // Any widgets contained in the #GtkPlug then will appear
27240 // inside the first application's window.
27242 // The socket's window ID is obtained by using
27243 // gtk_socket_get_id(). Before using this function,
27244 // the socket must have been realized, and for hence,
27245 // have been added to its parent.
27247 // <example>
27248 // <title>Obtaining the window ID of a socket.</title>
27249 // <programlisting>
27250 // GtkWidget *socket = gtk_socket_new (<!-- -->);
27251 // gtk_widget_show (socket);
27252 // gtk_container_add (GTK_CONTAINER (parent), socket);
27254 // /<!---->* The following call is only necessary if one of
27255 // * the ancestors of the socket is not yet visible.
27256 // *<!---->/
27257 // gtk_widget_realize (socket);
27258 // g_print ("The ID of the sockets window is %#x\n",
27259 // gtk_socket_get_id (socket));
27260 // </programlisting>
27261 // </example>
27263 // Note that if you pass the window ID of the socket to another
27264 // process that will create a plug in the socket, you
27265 // must make sure that the socket widget is not destroyed
27266 // until that plug is created. Violating this rule will
27267 // cause unpredictable consequences, the most likely
27268 // consequence being that the plug will appear as a
27269 // separate toplevel window. You can check if the plug
27270 // has been created by using gtk_socket_get_plug_window(). If
27271 // it returns a non-%NULL value, then the plug has been
27272 // successfully created inside of the socket.
27274 // When GTK+ is notified that the embedded window has been
27275 // destroyed, then it will destroy the socket as well. You
27276 // should always, therefore, be prepared for your sockets
27277 // to be destroyed at any time when the main event loop
27278 // is running. To prevent this from happening, you can
27279 // connect to the #GtkSocket::plug-removed signal.
27281 // The communication between a #GtkSocket and a #GtkPlug follows the
27282 // <ulink url="http://www.freedesktop.org/Standards/xembed-spec">XEmbed</ulink>
27283 // protocol. This protocol has also been implemented in other toolkits, e.g.
27284 // <application>Qt</application>, allowing the same level of integration
27285 // when embedding a <application>Qt</application> widget in GTK or vice versa.
27287 // A socket can also be used to swallow arbitrary
27288 // pre-existing top-level windows using gtk_socket_steal(),
27289 // though the integration when this is done will not be as close
27290 // as between a #GtkPlug and a #GtkSocket.
27292 // <note>
27293 // The #GtkPlug and #GtkSocket widgets are currently not available
27294 // on all platforms supported by GTK+.
27295 // </note>
27296 struct Socket /* : Container */ {
27297 mixin Atk.ImplementorIface.__interface__;
27298 mixin Buildable.__interface__;
27299 alias container this;
27300 alias container super_;
27301 Container container;
27302 ushort request_width, request_height, current_width, current_height;
27303 Gdk2.Window* plug_window;
27304 Widget* plug_widget;
27305 short xembed_version;
27306 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27307 uint, "same_app", 1,
27308 uint, "focus_in", 1,
27309 uint, "have_size", 1,
27310 uint, "need_map", 1,
27311 uint, "is_mapped", 1,
27312 uint, "active", 1,
27313 uint, "__dummy32A", 26));
27314 AccelGroup* accel_group;
27315 Widget* toplevel;
27318 // Create a new empty #GtkSocket.
27319 // RETURNS: the new #GtkSocket.
27320 static Socket* new_()() nothrow {
27321 return gtk_socket_new();
27323 static auto opCall()() {
27324 return gtk_socket_new();
27327 // Adds an XEMBED client, such as a #GtkPlug, to the #GtkSocket. The
27328 // client may be in the same process or in a different process.
27330 // To embed a #GtkPlug in a #GtkSocket, you can either create the
27331 // #GtkPlug with <literal>gtk_plug_new (0)</literal>, call
27332 // gtk_plug_get_id() to get the window ID of the plug, and then pass that to the
27333 // gtk_socket_add_id(), or you can call gtk_socket_get_id() to get the
27334 // window ID for the socket, and call gtk_plug_new() passing in that
27335 // ID.
27337 // The #GtkSocket must have already be added into a toplevel window
27338 // before you can make this call.
27339 // <window_id>: the window ID of a client participating in the XEMBED protocol.
27340 void add_id()(Gdk2.NativeWindow window_id) nothrow {
27341 gtk_socket_add_id(&this, window_id);
27344 // Gets the window ID of a #GtkSocket widget, which can then
27345 // be used to create a client embedded inside the socket, for
27346 // instance with gtk_plug_new().
27348 // The #GtkSocket must have already be added into a toplevel window
27349 // before you can make this call.
27350 // RETURNS: the window ID for the socket
27351 Gdk2.NativeWindow get_id()() nothrow {
27352 return gtk_socket_get_id(&this);
27355 // VERSION: 2.14
27356 // Retrieves the window of the plug. Use this to check if the plug has
27357 // been created inside of the socket.
27358 // RETURNS: the window of the plug if available, or %NULL
27359 Gdk2.Window* get_plug_window()() nothrow {
27360 return gtk_socket_get_plug_window(&this);
27363 // Reparents a pre-existing toplevel window into a #GtkSocket. This is
27364 // meant to embed clients that do not know about embedding into a
27365 // #GtkSocket, however doing so is inherently unreliable, and using
27366 // this function is not recommended.
27368 // The #GtkSocket must have already be added into a toplevel window
27369 // before you can make this call.
27370 // <wid>: the window ID of an existing toplevel window.
27371 void steal()(Gdk2.NativeWindow wid) nothrow {
27372 gtk_socket_steal(&this, wid);
27375 // This signal is emitted when a client is successfully
27376 // added to the socket.
27377 extern (C) alias static void function (Socket* this_, void* user_data=null) nothrow signal_plug_added;
27379 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27380 return super_.signal_connect!name(cb, data, cf);
27383 ulong signal_connect(string name:"plug-added", CB/*:signal_plug_added*/)
27384 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
27385 if (is(typeof(cb)==signal_plug_added)||_ttmm!(CB, signal_plug_added)()) {
27386 return signal_connect_data!()(&this, cast(char*)"plug-added",
27387 cast(GObject2.Callback)cb, data, null, cf);
27390 // This signal is emitted when a client is removed from the socket.
27391 // The default action is to destroy the #GtkSocket widget, so if you
27392 // want to reuse it you must add a signal handler that returns %TRUE.
27393 // RETURNS: %TRUE to stop other handlers from being invoked.
27394 extern (C) alias static c_int function (Socket* this_, void* user_data=null) nothrow signal_plug_removed;
27395 ulong signal_connect(string name:"plug-removed", CB/*:signal_plug_removed*/)
27396 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
27397 if (is(typeof(cb)==signal_plug_removed)||_ttmm!(CB, signal_plug_removed)()) {
27398 return signal_connect_data!()(&this, cast(char*)"plug-removed",
27399 cast(GObject2.Callback)cb, data, null, cf);
27403 struct SocketClass {
27404 ContainerClass parent_class;
27405 extern (C) void function (Socket* socket_) nothrow plug_added;
27406 extern (C) int function (Socket* socket_) nothrow plug_removed;
27407 extern (C) void function () nothrow _gtk_reserved1;
27408 extern (C) void function () nothrow _gtk_reserved2;
27409 extern (C) void function () nothrow _gtk_reserved3;
27410 extern (C) void function () nothrow _gtk_reserved4;
27413 enum SortType {
27414 ASCENDING = 0,
27415 DESCENDING = 1
27417 struct SpinButton /* : Entry */ {
27418 mixin Atk.ImplementorIface.__interface__;
27419 mixin Buildable.__interface__;
27420 mixin CellEditable.__interface__;
27421 mixin Editable.__interface__;
27422 alias entry this;
27423 alias entry super_;
27424 Entry entry;
27425 Adjustment* adjustment;
27426 Gdk2.Window* panel;
27427 uint timer;
27428 double climb_rate, timer_step;
27429 SpinButtonUpdatePolicy update_policy;
27430 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27431 uint, "in_child", 2,
27432 uint, "click_child", 2,
27433 uint, "button", 2,
27434 uint, "need_timer", 1,
27435 uint, "timer_calls", 3,
27436 uint, "digits", 10,
27437 uint, "numeric", 1,
27438 uint, "wrap", 1,
27439 uint, "snap_to_ticks", 1,
27440 uint, "__dummy32A", 9));
27442 static SpinButton* new_(AT0)(AT0 /*Adjustment*/ adjustment, double climb_rate, uint digits) nothrow {
27443 return gtk_spin_button_new(UpCast!(Adjustment*)(adjustment), climb_rate, digits);
27445 static auto opCall(AT0)(AT0 /*Adjustment*/ adjustment, double climb_rate, uint digits) {
27446 return gtk_spin_button_new(UpCast!(Adjustment*)(adjustment), climb_rate, digits);
27449 // This is a convenience constructor that allows creation of a numeric
27450 // #GtkSpinButton without manually creating an adjustment. The value is
27451 // initially set to the minimum value and a page increment of 10 * @step
27452 // is the default. The precision of the spin button is equivalent to the
27453 // precision of @step.
27455 // Note that the way in which the precision is derived works best if @step
27456 // is a power of ten. If the resulting precision is not suitable for your
27457 // needs, use gtk_spin_button_set_digits() to correct it.
27458 // RETURNS: The new spin button as a #GtkWidget.
27459 // <min>: Minimum allowable value
27460 // <max>: Maximum allowable value
27461 // <step>: Increment added or subtracted by spinning the widget
27462 static SpinButton* new_with_range()(double min, double max, double step) nothrow {
27463 return gtk_spin_button_new_with_range(min, max, step);
27465 static auto opCall()(double min, double max, double step) {
27466 return gtk_spin_button_new_with_range(min, max, step);
27469 // Changes the properties of an existing spin button. The adjustment, climb rate,
27470 // and number of decimal places are all changed accordingly, after this function call.
27471 // <adjustment>: a #GtkAdjustment.
27472 // <climb_rate>: the new climb rate.
27473 // <digits>: the number of decimal places to display in the spin button.
27474 void configure(AT0)(AT0 /*Adjustment*/ adjustment, double climb_rate, uint digits) nothrow {
27475 gtk_spin_button_configure(&this, UpCast!(Adjustment*)(adjustment), climb_rate, digits);
27478 // Get the adjustment associated with a #GtkSpinButton
27479 // RETURNS: the #GtkAdjustment of @spin_button
27480 Adjustment* get_adjustment()() nothrow {
27481 return gtk_spin_button_get_adjustment(&this);
27484 // Fetches the precision of @spin_button. See gtk_spin_button_set_digits().
27485 // RETURNS: the current precision
27486 uint get_digits()() nothrow {
27487 return gtk_spin_button_get_digits(&this);
27490 // Gets the current step and page the increments used by @spin_button. See
27491 // gtk_spin_button_set_increments().
27492 // <step>: location to store step increment, or %NULL
27493 // <page>: location to store page increment, or %NULL
27494 void get_increments(AT0, AT1)(/*out*/ AT0 /*double*/ step=null, /*out*/ AT1 /*double*/ page=null) nothrow {
27495 gtk_spin_button_get_increments(&this, UpCast!(double*)(step), UpCast!(double*)(page));
27498 // Returns whether non-numeric text can be typed into the spin button.
27499 // See gtk_spin_button_set_numeric().
27500 // RETURNS: %TRUE if only numeric text can be entered
27501 int get_numeric()() nothrow {
27502 return gtk_spin_button_get_numeric(&this);
27505 // Gets the range allowed for @spin_button. See
27506 // gtk_spin_button_set_range().
27507 // <min>: location to store minimum allowed value, or %NULL
27508 // <max>: location to store maximum allowed value, or %NULL
27509 void get_range(AT0, AT1)(/*out*/ AT0 /*double*/ min=null, /*out*/ AT1 /*double*/ max=null) nothrow {
27510 gtk_spin_button_get_range(&this, UpCast!(double*)(min), UpCast!(double*)(max));
27513 // Returns whether the values are corrected to the nearest step. See
27514 // gtk_spin_button_set_snap_to_ticks().
27515 // RETURNS: %TRUE if values are snapped to the nearest step.
27516 int get_snap_to_ticks()() nothrow {
27517 return gtk_spin_button_get_snap_to_ticks(&this);
27520 // Gets the update behavior of a spin button. See
27521 // gtk_spin_button_set_update_policy().
27522 // RETURNS: the current update policy
27523 SpinButtonUpdatePolicy get_update_policy()() nothrow {
27524 return gtk_spin_button_get_update_policy(&this);
27527 // Get the value in the @spin_button.
27528 // RETURNS: the value of @spin_button
27529 double get_value()() nothrow {
27530 return gtk_spin_button_get_value(&this);
27533 // Get the value @spin_button represented as an integer.
27534 // RETURNS: the value of @spin_button
27535 int get_value_as_int()() nothrow {
27536 return gtk_spin_button_get_value_as_int(&this);
27539 // Returns whether the spin button's value wraps around to the
27540 // opposite limit when the upper or lower limit of the range is
27541 // exceeded. See gtk_spin_button_set_wrap().
27542 // RETURNS: %TRUE if the spin button wraps around
27543 int get_wrap()() nothrow {
27544 return gtk_spin_button_get_wrap(&this);
27547 // Replaces the #GtkAdjustment associated with @spin_button.
27548 // <adjustment>: a #GtkAdjustment to replace the existing adjustment
27549 void set_adjustment(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
27550 gtk_spin_button_set_adjustment(&this, UpCast!(Adjustment*)(adjustment));
27553 // Set the precision to be displayed by @spin_button. Up to 20 digit precision
27554 // is allowed.
27555 // <digits>: the number of digits after the decimal point to be displayed for the spin button's value
27556 void set_digits()(uint digits) nothrow {
27557 gtk_spin_button_set_digits(&this, digits);
27560 // Sets the step and page increments for spin_button. This affects how
27561 // quickly the value changes when the spin button's arrows are activated.
27562 // <step>: increment applied for a button 1 press.
27563 // <page>: increment applied for a button 2 press.
27564 void set_increments()(double step, double page) nothrow {
27565 gtk_spin_button_set_increments(&this, step, page);
27568 // Sets the flag that determines if non-numeric text can be typed into
27569 // the spin button.
27570 // <numeric>: flag indicating if only numeric entry is allowed.
27571 void set_numeric()(int numeric) nothrow {
27572 gtk_spin_button_set_numeric(&this, numeric);
27575 // Sets the minimum and maximum allowable values for @spin_button
27576 // <min>: minimum allowable value
27577 // <max>: maximum allowable value
27578 void set_range()(double min, double max) nothrow {
27579 gtk_spin_button_set_range(&this, min, max);
27582 // Sets the policy as to whether values are corrected to the nearest step
27583 // increment when a spin button is activated after providing an invalid value.
27584 // <snap_to_ticks>: a flag indicating if invalid values should be corrected.
27585 void set_snap_to_ticks()(int snap_to_ticks) nothrow {
27586 gtk_spin_button_set_snap_to_ticks(&this, snap_to_ticks);
27589 // Sets the update behavior of a spin button. This determines whether the
27590 // spin button is always updated or only when a valid value is set.
27591 // <policy>: a #GtkSpinButtonUpdatePolicy value
27592 void set_update_policy()(SpinButtonUpdatePolicy policy) nothrow {
27593 gtk_spin_button_set_update_policy(&this, policy);
27596 // Set the value of @spin_button.
27597 // <value>: the new value
27598 void set_value()(double value) nothrow {
27599 gtk_spin_button_set_value(&this, value);
27602 // Sets the flag that determines if a spin button value wraps around to the
27603 // opposite limit when the upper or lower limit of the range is exceeded.
27604 // <wrap>: a flag indicating if wrapping behavior is performed.
27605 void set_wrap()(int wrap) nothrow {
27606 gtk_spin_button_set_wrap(&this, wrap);
27609 // Increment or decrement a spin button's value in a specified direction
27610 // by a specified amount.
27611 // <direction>: a #GtkSpinType indicating the direction to spin.
27612 // <increment>: step increment to apply in the specified direction.
27613 void spin()(SpinType direction, double increment) nothrow {
27614 gtk_spin_button_spin(&this, direction, increment);
27616 // Manually force an update of the spin button.
27617 void update()() nothrow {
27618 gtk_spin_button_update(&this);
27620 extern (C) alias static void function (SpinButton* this_, ScrollType* object, void* user_data=null) nothrow signal_change_value;
27622 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27623 return super_.signal_connect!name(cb, data, cf);
27626 ulong signal_connect(string name:"change-value", CB/*:signal_change_value*/)
27627 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
27628 if (is(typeof(cb)==signal_change_value)||_ttmm!(CB, signal_change_value)()) {
27629 return signal_connect_data!()(&this, cast(char*)"change-value",
27630 cast(GObject2.Callback)cb, data, null, cf);
27632 extern (C) alias static int function (SpinButton* this_, void* object, void* user_data=null) nothrow signal_input;
27633 ulong signal_connect(string name:"input", CB/*:signal_input*/)
27634 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
27635 if (is(typeof(cb)==signal_input)||_ttmm!(CB, signal_input)()) {
27636 return signal_connect_data!()(&this, cast(char*)"input",
27637 cast(GObject2.Callback)cb, data, null, cf);
27640 // The ::output signal can be used to change to formatting
27641 // of the value that is displayed in the spin buttons entry.
27642 // |[
27643 // /&ast; show leading zeros &ast;/
27644 // static gboolean
27645 // on_output (GtkSpinButton *spin,
27646 // gpointer data)
27647 // {
27648 // GtkAdjustment *adj;
27649 // gchar *text;
27650 // int value;
27652 // adj = gtk_spin_button_get_adjustment (spin);
27653 // value = (int)gtk_adjustment_get_value (adj);
27654 // text = g_strdup_printf ("%02d", value);
27655 // gtk_entry_set_text (GTK_ENTRY (spin), text);
27656 // g_free (text);
27658 // return TRUE;
27659 // }
27660 // ]|
27661 // RETURNS: %TRUE if the value has been displayed.
27662 extern (C) alias static c_int function (SpinButton* this_, void* user_data=null) nothrow signal_output;
27663 ulong signal_connect(string name:"output", CB/*:signal_output*/)
27664 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
27665 if (is(typeof(cb)==signal_output)||_ttmm!(CB, signal_output)()) {
27666 return signal_connect_data!()(&this, cast(char*)"output",
27667 cast(GObject2.Callback)cb, data, null, cf);
27669 extern (C) alias static void function (SpinButton* this_, void* user_data=null) nothrow signal_value_changed;
27670 ulong signal_connect(string name:"value-changed", CB/*:signal_value_changed*/)
27671 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
27672 if (is(typeof(cb)==signal_value_changed)||_ttmm!(CB, signal_value_changed)()) {
27673 return signal_connect_data!()(&this, cast(char*)"value-changed",
27674 cast(GObject2.Callback)cb, data, null, cf);
27677 // VERSION: 2.10
27678 // The wrapped signal is emitted right after the spinbutton wraps
27679 // from its maximum to minimum value or vice-versa.
27680 extern (C) alias static void function (SpinButton* this_, void* user_data=null) nothrow signal_wrapped;
27681 ulong signal_connect(string name:"wrapped", CB/*:signal_wrapped*/)
27682 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
27683 if (is(typeof(cb)==signal_wrapped)||_ttmm!(CB, signal_wrapped)()) {
27684 return signal_connect_data!()(&this, cast(char*)"wrapped",
27685 cast(GObject2.Callback)cb, data, null, cf);
27689 struct SpinButtonClass {
27690 EntryClass parent_class;
27691 extern (C) int function (SpinButton* spin_button, double* new_value) nothrow input;
27692 extern (C) int function (SpinButton* spin_button) nothrow output;
27693 extern (C) void function (SpinButton* spin_button) nothrow value_changed;
27694 extern (C) void function (SpinButton* spin_button, ScrollType scroll) nothrow change_value;
27695 extern (C) void function (SpinButton* spin_button) nothrow wrapped;
27696 extern (C) void function () nothrow _gtk_reserved1;
27697 extern (C) void function () nothrow _gtk_reserved2;
27698 extern (C) void function () nothrow _gtk_reserved3;
27701 enum SpinButtonUpdatePolicy {
27702 ALWAYS = 0,
27703 IF_VALID = 1
27705 enum SpinType {
27706 STEP_FORWARD = 0,
27707 STEP_BACKWARD = 1,
27708 PAGE_FORWARD = 2,
27709 PAGE_BACKWARD = 3,
27710 HOME = 4,
27711 END = 5,
27712 USER_DEFINED = 6
27715 // A GtkSpinner widget displays an icon-size spinning animation.
27716 // It is often used as an alternative to a #GtkProgressBar for
27717 // displaying indefinite activity, instead of actual progress.
27719 // To start the animation, use gtk_spinner_start(), to stop it
27720 // use gtk_spinner_stop().
27721 struct Spinner /* : DrawingArea */ {
27722 mixin Atk.ImplementorIface.__interface__;
27723 mixin Buildable.__interface__;
27724 alias parent this;
27725 alias parent super_;
27726 alias parent drawingarea;
27727 DrawingArea parent;
27728 SpinnerPrivate* priv;
27731 // VERSION: 2.20
27732 // Returns a new spinner widget. Not yet started.
27733 // RETURNS: a new #GtkSpinner
27734 static Spinner* new_()() nothrow {
27735 return gtk_spinner_new();
27737 static auto opCall()() {
27738 return gtk_spinner_new();
27741 // VERSION: 2.20
27742 // Starts the animation of the spinner.
27743 void start()() nothrow {
27744 gtk_spinner_start(&this);
27747 // VERSION: 2.20
27748 // Stops the animation of the spinner.
27749 void stop()() nothrow {
27750 gtk_spinner_stop(&this);
27754 struct SpinnerClass {
27755 DrawingAreaClass parent_class;
27758 struct SpinnerPrivate {
27761 enum StateType {
27762 NORMAL = 0,
27763 ACTIVE = 1,
27764 PRELIGHT = 2,
27765 SELECTED = 3,
27766 INSENSITIVE = 4
27768 struct StatusIcon /* : GObject.Object */ {
27769 alias parent_instance this;
27770 alias parent_instance super_;
27771 alias parent_instance object;
27772 GObject2.Object parent_instance;
27773 StatusIconPrivate* priv;
27776 // VERSION: 2.10
27777 // Creates an empty status icon object.
27778 // RETURNS: a new #GtkStatusIcon
27779 static StatusIcon* /*new*/ new_()() nothrow {
27780 return gtk_status_icon_new();
27782 static auto opCall()() {
27783 return gtk_status_icon_new();
27786 // VERSION: 2.10
27787 // Creates a status icon displaying the file @filename.
27789 // The image will be scaled down to fit in the available
27790 // space in the notification area, if necessary.
27791 // RETURNS: a new #GtkStatusIcon
27792 // <filename>: a filename
27793 static StatusIcon* /*new*/ new_from_file(AT0)(AT0 /*char*/ filename) nothrow {
27794 return gtk_status_icon_new_from_file(toCString!(char*)(filename));
27796 static auto opCall(AT0)(AT0 /*char*/ filename) {
27797 return gtk_status_icon_new_from_file(toCString!(char*)(filename));
27800 // VERSION: 2.14
27801 // Creates a status icon displaying a #GIcon. If the icon is a
27802 // themed icon, it will be updated when the theme changes.
27803 // RETURNS: a new #GtkStatusIcon
27804 // <icon>: a #GIcon
27805 static StatusIcon* /*new*/ new_from_gicon(AT0)(AT0 /*Gio2.Icon*/ icon) nothrow {
27806 return gtk_status_icon_new_from_gicon(UpCast!(Gio2.Icon*)(icon));
27808 static auto opCall(AT0)(AT0 /*Gio2.Icon*/ icon) {
27809 return gtk_status_icon_new_from_gicon(UpCast!(Gio2.Icon*)(icon));
27812 // VERSION: 2.10
27813 // Creates a status icon displaying an icon from the current icon theme.
27814 // If the current icon theme is changed, the icon will be updated
27815 // appropriately.
27816 // RETURNS: a new #GtkStatusIcon
27817 // <icon_name>: an icon name
27818 static StatusIcon* /*new*/ new_from_icon_name(AT0)(AT0 /*char*/ icon_name) nothrow {
27819 return gtk_status_icon_new_from_icon_name(toCString!(char*)(icon_name));
27821 static auto opCall(AT0)(AT0 /*char*/ icon_name) {
27822 return gtk_status_icon_new_from_icon_name(toCString!(char*)(icon_name));
27825 // VERSION: 2.10
27826 // Creates a status icon displaying @pixbuf.
27828 // The image will be scaled down to fit in the available
27829 // space in the notification area, if necessary.
27830 // RETURNS: a new #GtkStatusIcon
27831 // <pixbuf>: a #GdkPixbuf
27832 static StatusIcon* /*new*/ new_from_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
27833 return gtk_status_icon_new_from_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
27835 static auto opCall(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf) {
27836 return gtk_status_icon_new_from_pixbuf(UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
27839 // VERSION: 2.10
27840 // Creates a status icon displaying a stock icon. Sample stock icon
27841 // names are #GTK_STOCK_OPEN, #GTK_STOCK_QUIT. You can register your
27842 // own stock icon names, see gtk_icon_factory_add_default() and
27843 // gtk_icon_factory_add().
27844 // RETURNS: a new #GtkStatusIcon
27845 // <stock_id>: a stock icon id
27846 static StatusIcon* /*new*/ new_from_stock(AT0)(AT0 /*char*/ stock_id) nothrow {
27847 return gtk_status_icon_new_from_stock(toCString!(char*)(stock_id));
27849 static auto opCall(AT0)(AT0 /*char*/ stock_id) {
27850 return gtk_status_icon_new_from_stock(toCString!(char*)(stock_id));
27853 // VERSION: 2.10
27854 // Menu positioning function to use with gtk_menu_popup()
27855 // to position @menu aligned to the status icon @user_data.
27856 // <menu>: the #GtkMenu
27857 // <x>: return location for the x position
27858 // <y>: return location for the y position
27859 // <push_in>: whether the first menu item should be offset (pushed in) to be aligned with the menu popup position (only useful for GtkOptionMenu).
27860 // <user_data>: the status icon to position the menu on
27861 static void position_menu(AT0, AT1)(AT0 /*Menu*/ menu, int* x, int* y, int* push_in, AT1 /*void*/ user_data) nothrow {
27862 gtk_status_icon_position_menu(UpCast!(Menu*)(menu), x, y, push_in, UpCast!(void*)(user_data));
27865 // VERSION: 2.10
27866 // DEPRECATED (v2.22) method: get_blinking - This function will be removed in GTK+ 3
27867 // Returns whether the icon is blinking, see
27868 // gtk_status_icon_set_blinking().
27869 // RETURNS: %TRUE if the icon is blinking
27870 int get_blinking()() nothrow {
27871 return gtk_status_icon_get_blinking(&this);
27874 // VERSION: 2.10
27875 // Obtains information about the location of the status icon
27876 // on screen. This information can be used to e.g. position
27877 // popups like notification bubbles.
27879 // See gtk_status_icon_position_menu() for a more convenient
27880 // alternative for positioning menus.
27882 // Note that some platforms do not allow GTK+ to provide
27883 // this information, and even on platforms that do allow it,
27884 // the information is not reliable unless the status icon
27885 // is embedded in a notification area, see
27886 // gtk_status_icon_is_embedded().
27888 // been filled in
27889 // RETURNS: %TRUE if the location information has
27890 // <screen>: return location for the screen, or %NULL if the information is not needed
27891 // <area>: return location for the area occupied by the status icon, or %NULL
27892 // <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.
27893 int get_geometry(AT0, AT1, AT2)(/*out*/ AT0 /*Gdk2.Screen**/ screen=null, /*out*/ AT1 /*Gdk2.Rectangle*/ area=null, /*out*/ AT2 /*Orientation*/ orientation=null) nothrow {
27894 return gtk_status_icon_get_geometry(&this, UpCast!(Gdk2.Screen**)(screen), UpCast!(Gdk2.Rectangle*)(area), UpCast!(Orientation*)(orientation));
27897 // VERSION: 2.14
27898 // Retrieves the #GIcon being displayed by the #GtkStatusIcon.
27899 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
27900 // %GTK_IMAGE_GICON (see gtk_status_icon_get_storage_type()).
27901 // The caller of this function does not own a reference to the
27902 // returned #GIcon.
27904 // If this function fails, @icon is left unchanged;
27905 // RETURNS: the displayed icon, or %NULL if the image is empty
27906 Gio2.Icon* get_gicon()() nothrow {
27907 return gtk_status_icon_get_gicon(&this);
27910 // VERSION: 2.16
27911 // Returns the current value of the has-tooltip property.
27912 // See #GtkStatusIcon:has-tooltip for more information.
27913 // RETURNS: current value of has-tooltip on @status_icon.
27914 int get_has_tooltip()() nothrow {
27915 return gtk_status_icon_get_has_tooltip(&this);
27918 // VERSION: 2.10
27919 // Gets the name of the icon being displayed by the #GtkStatusIcon.
27920 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
27921 // %GTK_IMAGE_ICON_NAME (see gtk_status_icon_get_storage_type()).
27922 // The returned string is owned by the #GtkStatusIcon and should not
27923 // be freed or modified.
27924 // RETURNS: name of the displayed icon, or %NULL if the image is empty.
27925 char* get_icon_name()() nothrow {
27926 return gtk_status_icon_get_icon_name(&this);
27929 // VERSION: 2.10
27930 // Gets the #GdkPixbuf being displayed by the #GtkStatusIcon.
27931 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
27932 // %GTK_IMAGE_PIXBUF (see gtk_status_icon_get_storage_type()).
27933 // The caller of this function does not own a reference to the
27934 // returned pixbuf.
27936 // or %NULL if the image is empty.
27937 // RETURNS: the displayed pixbuf,
27938 GdkPixbuf2.Pixbuf* get_pixbuf()() nothrow {
27939 return gtk_status_icon_get_pixbuf(&this);
27942 // VERSION: 2.12
27943 // Returns the #GdkScreen associated with @status_icon.
27944 // RETURNS: a #GdkScreen.
27945 Gdk2.Screen* get_screen()() nothrow {
27946 return gtk_status_icon_get_screen(&this);
27949 // VERSION: 2.10
27950 // Gets the size in pixels that is available for the image.
27951 // Stock icons and named icons adapt their size automatically
27952 // if the size of the notification area changes. For other
27953 // storage types, the size-changed signal can be used to
27954 // react to size changes.
27956 // Note that the returned size is only meaningful while the
27957 // status icon is embedded (see gtk_status_icon_is_embedded()).
27958 // RETURNS: the size that is available for the image
27959 int get_size()() nothrow {
27960 return gtk_status_icon_get_size(&this);
27963 // VERSION: 2.10
27964 // Gets the id of the stock icon being displayed by the #GtkStatusIcon.
27965 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
27966 // %GTK_IMAGE_STOCK (see gtk_status_icon_get_storage_type()).
27967 // The returned string is owned by the #GtkStatusIcon and should not
27968 // be freed or modified.
27970 // or %NULL if the image is empty.
27971 // RETURNS: stock id of the displayed stock icon,
27972 char* get_stock()() nothrow {
27973 return gtk_status_icon_get_stock(&this);
27976 // VERSION: 2.10
27977 // Gets the type of representation being used by the #GtkStatusIcon
27978 // to store image data. If the #GtkStatusIcon has no image data,
27979 // the return value will be %GTK_IMAGE_EMPTY.
27980 // RETURNS: the image representation being used
27981 ImageType get_storage_type()() nothrow {
27982 return gtk_status_icon_get_storage_type(&this);
27985 // VERSION: 2.18
27986 // Gets the title of this tray icon. See gtk_status_icon_set_title().
27987 // RETURNS: the title of the status icon
27988 char* get_title()() nothrow {
27989 return gtk_status_icon_get_title(&this);
27992 // VERSION: 2.16
27993 // Gets the contents of the tooltip for @status_icon.
27995 // returned string with g_free() when done.
27996 // RETURNS: the tooltip text, or %NULL. You should free the
27997 char* /*new*/ get_tooltip_markup()() nothrow {
27998 return gtk_status_icon_get_tooltip_markup(&this);
28001 // VERSION: 2.16
28002 // Gets the contents of the tooltip for @status_icon.
28004 // returned string with g_free() when done.
28005 // RETURNS: the tooltip text, or %NULL. You should free the
28006 char* /*new*/ get_tooltip_text()() nothrow {
28007 return gtk_status_icon_get_tooltip_text(&this);
28010 // VERSION: 2.10
28011 // Returns whether the status icon is visible or not.
28012 // Note that being visible does not guarantee that
28013 // the user can actually see the icon, see also
28014 // gtk_status_icon_is_embedded().
28015 // RETURNS: %TRUE if the status icon is visible
28016 int get_visible()() nothrow {
28017 return gtk_status_icon_get_visible(&this);
28020 // VERSION: 2.14
28021 // This function is only useful on the X11/freedesktop.org platform.
28022 // It returns a window ID for the widget in the underlying
28023 // status icon implementation. This is useful for the Galago
28024 // notification service, which can send a window ID in the protocol
28025 // in order for the server to position notification windows
28026 // pointing to a status icon reliably.
28028 // This function is not intended for other use cases which are
28029 // more likely to be met by one of the non-X11 specific methods, such
28030 // as gtk_status_icon_position_menu().
28032 // underlying X11 Window
28033 // RETURNS: An 32 bit unsigned integer identifier for the
28034 uint get_x11_window_id()() nothrow {
28035 return gtk_status_icon_get_x11_window_id(&this);
28038 // VERSION: 2.10
28039 // Returns whether the status icon is embedded in a notification
28040 // area.
28042 // a notification area.
28043 // RETURNS: %TRUE if the status icon is embedded in
28044 int is_embedded()() nothrow {
28045 return gtk_status_icon_is_embedded(&this);
28048 // VERSION: 2.10
28049 // DEPRECATED (v2.22) method: set_blinking - This function will be removed in GTK+ 3
28050 // Makes the status icon start or stop blinking.
28051 // Note that blinking user interface elements may be problematic
28052 // for some users, and thus may be turned off, in which case
28053 // this setting has no effect.
28054 // <blinking>: %TRUE to turn blinking on, %FALSE to turn it off
28055 void set_blinking()(int blinking) nothrow {
28056 gtk_status_icon_set_blinking(&this, blinking);
28059 // VERSION: 2.10
28060 // Makes @status_icon display the file @filename.
28061 // See gtk_status_icon_new_from_file() for details.
28062 // <filename>: a filename
28063 void set_from_file(AT0)(AT0 /*char*/ filename) nothrow {
28064 gtk_status_icon_set_from_file(&this, toCString!(char*)(filename));
28067 // VERSION: 2.14
28068 // Makes @status_icon display the #GIcon.
28069 // See gtk_status_icon_new_from_gicon() for details.
28070 // <icon>: a GIcon
28071 void set_from_gicon(AT0)(AT0 /*Gio2.Icon*/ icon) nothrow {
28072 gtk_status_icon_set_from_gicon(&this, UpCast!(Gio2.Icon*)(icon));
28075 // VERSION: 2.10
28076 // Makes @status_icon display the icon named @icon_name from the
28077 // current icon theme.
28078 // See gtk_status_icon_new_from_icon_name() for details.
28079 // <icon_name>: an icon name
28080 void set_from_icon_name(AT0)(AT0 /*char*/ icon_name) nothrow {
28081 gtk_status_icon_set_from_icon_name(&this, toCString!(char*)(icon_name));
28084 // VERSION: 2.10
28085 // Makes @status_icon display @pixbuf.
28086 // See gtk_status_icon_new_from_pixbuf() for details.
28087 // <pixbuf>: a #GdkPixbuf or %NULL
28088 void set_from_pixbuf(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) nothrow {
28089 gtk_status_icon_set_from_pixbuf(&this, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
28092 // VERSION: 2.10
28093 // Makes @status_icon display the stock icon with the id @stock_id.
28094 // See gtk_status_icon_new_from_stock() for details.
28095 // <stock_id>: a stock icon id
28096 void set_from_stock(AT0)(AT0 /*char*/ stock_id) nothrow {
28097 gtk_status_icon_set_from_stock(&this, toCString!(char*)(stock_id));
28100 // VERSION: 2.16
28101 // Sets the has-tooltip property on @status_icon to @has_tooltip.
28102 // See #GtkStatusIcon:has-tooltip for more information.
28103 // <has_tooltip>: whether or not @status_icon has a tooltip
28104 void set_has_tooltip()(int has_tooltip) nothrow {
28105 gtk_status_icon_set_has_tooltip(&this, has_tooltip);
28108 // VERSION: 2.20
28109 // Sets the name of this tray icon.
28110 // This should be a string identifying this icon. It is may be
28111 // used for sorting the icons in the tray and will not be shown to
28112 // the user.
28113 // <name>: the name
28114 void set_name(AT0)(AT0 /*char*/ name) nothrow {
28115 gtk_status_icon_set_name(&this, toCString!(char*)(name));
28118 // VERSION: 2.12
28119 // Sets the #GdkScreen where @status_icon is displayed; if
28120 // the icon is already mapped, it will be unmapped, and
28121 // then remapped on the new screen.
28122 // <screen>: a #GdkScreen
28123 void set_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
28124 gtk_status_icon_set_screen(&this, UpCast!(Gdk2.Screen*)(screen));
28127 // VERSION: 2.18
28128 // Sets the title of this tray icon.
28129 // This should be a short, human-readable, localized string
28130 // describing the tray icon. It may be used by tools like screen
28131 // readers to render the tray icon.
28132 // <title>: the title
28133 void set_title(AT0)(AT0 /*char*/ title) nothrow {
28134 gtk_status_icon_set_title(&this, toCString!(char*)(title));
28137 // VERSION: 2.10
28138 // DEPRECATED (v2.16) method: set_tooltip - Use gtk_status_icon_set_tooltip_text() instead.
28139 // Sets the tooltip of the status icon.
28140 // <tooltip_text>: the tooltip text, or %NULL
28141 void set_tooltip(AT0)(AT0 /*char*/ tooltip_text=null) nothrow {
28142 gtk_status_icon_set_tooltip(&this, toCString!(char*)(tooltip_text));
28145 // VERSION: 2.16
28146 // Sets @markup as the contents of the tooltip, which is marked up with
28147 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
28149 // This function will take care of setting #GtkStatusIcon:has-tooltip to %TRUE
28150 // and of the default handler for the #GtkStatusIcon::query-tooltip signal.
28152 // See also the #GtkStatusIcon:tooltip-markup property and
28153 // gtk_tooltip_set_markup().
28154 // <markup>: the contents of the tooltip for @status_icon, or %NULL
28155 void set_tooltip_markup(AT0)(AT0 /*char*/ markup=null) nothrow {
28156 gtk_status_icon_set_tooltip_markup(&this, toCString!(char*)(markup));
28159 // VERSION: 2.16
28160 // Sets @text as the contents of the tooltip.
28162 // This function will take care of setting #GtkStatusIcon:has-tooltip to
28163 // %TRUE and of the default handler for the #GtkStatusIcon::query-tooltip
28164 // signal.
28166 // See also the #GtkStatusIcon:tooltip-text property and
28167 // gtk_tooltip_set_text().
28168 // <text>: the contents of the tooltip for @status_icon
28169 void set_tooltip_text(AT0)(AT0 /*char*/ text) nothrow {
28170 gtk_status_icon_set_tooltip_text(&this, toCString!(char*)(text));
28173 // VERSION: 2.10
28174 // Shows or hides a status icon.
28175 // <visible>: %TRUE to show the status icon, %FALSE to hide it
28176 void set_visible()(int visible) nothrow {
28177 gtk_status_icon_set_visible(&this, visible);
28180 // VERSION: 2.10
28181 // Gets emitted when the user activates the status icon.
28182 // If and how status icons can activated is platform-dependent.
28184 // Unlike most G_SIGNAL_ACTION signals, this signal is meant to
28185 // be used by applications and should be wrapped by language bindings.
28186 extern (C) alias static void function (StatusIcon* this_, void* user_data=null) nothrow signal_activate;
28188 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28189 return super_.signal_connect!name(cb, data, cf);
28192 ulong signal_connect(string name:"activate", CB/*:signal_activate*/)
28193 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28194 if (is(typeof(cb)==signal_activate)||_ttmm!(CB, signal_activate)()) {
28195 return signal_connect_data!()(&this, cast(char*)"activate",
28196 cast(GObject2.Callback)cb, data, null, cf);
28199 // VERSION: 2.14
28200 // The ::button-press-event signal will be emitted when a button
28201 // (typically from a mouse) is pressed.
28203 // Whether this event is emitted is platform-dependent. Use the ::activate
28204 // and ::popup-menu signals in preference.
28206 // for the event. %FALSE to propagate the event further.
28207 // RETURNS: %TRUE to stop other handlers from being invoked
28208 // <event>: the #GdkEventButton which triggered this signal
28209 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_button_press_event;
28210 ulong signal_connect(string name:"button-press-event", CB/*:signal_button_press_event*/)
28211 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28212 if (is(typeof(cb)==signal_button_press_event)||_ttmm!(CB, signal_button_press_event)()) {
28213 return signal_connect_data!()(&this, cast(char*)"button-press-event",
28214 cast(GObject2.Callback)cb, data, null, cf);
28217 // VERSION: 2.14
28218 // The ::button-release-event signal will be emitted when a button
28219 // (typically from a mouse) is released.
28221 // Whether this event is emitted is platform-dependent. Use the ::activate
28222 // and ::popup-menu signals in preference.
28224 // for the event. %FALSE to propagate the event further.
28225 // RETURNS: %TRUE to stop other handlers from being invoked
28226 // <event>: the #GdkEventButton which triggered this signal
28227 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_button_release_event;
28228 ulong signal_connect(string name:"button-release-event", CB/*:signal_button_release_event*/)
28229 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28230 if (is(typeof(cb)==signal_button_release_event)||_ttmm!(CB, signal_button_release_event)()) {
28231 return signal_connect_data!()(&this, cast(char*)"button-release-event",
28232 cast(GObject2.Callback)cb, data, null, cf);
28235 // VERSION: 2.10
28236 // Gets emitted when the user brings up the context menu
28237 // of the status icon. Whether status icons can have context
28238 // menus and how these are activated is platform-dependent.
28240 // The @button and @activate_time parameters should be
28241 // passed as the last to arguments to gtk_menu_popup().
28243 // Unlike most G_SIGNAL_ACTION signals, this signal is meant to
28244 // be used by applications and should be wrapped by language bindings.
28245 // <button>: the button that was pressed, or 0 if the signal is not emitted in response to a button press event
28246 // <activate_time>: the timestamp of the event that triggered the signal emission
28247 extern (C) alias static void function (StatusIcon* this_, c_uint button, c_uint activate_time, void* user_data=null) nothrow signal_popup_menu;
28248 ulong signal_connect(string name:"popup-menu", CB/*:signal_popup_menu*/)
28249 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28250 if (is(typeof(cb)==signal_popup_menu)||_ttmm!(CB, signal_popup_menu)()) {
28251 return signal_connect_data!()(&this, cast(char*)"popup-menu",
28252 cast(GObject2.Callback)cb, data, null, cf);
28255 // VERSION: 2.16
28256 // Emitted when the #GtkSettings:gtk-tooltip-timeout has expired with the
28257 // cursor hovering above @status_icon; or emitted when @status_icon got
28258 // focus in keyboard mode.
28260 // Using the given coordinates, the signal handler should determine
28261 // whether a tooltip should be shown for @status_icon. If this is
28262 // the case %TRUE should be returned, %FALSE otherwise. Note that if
28263 // @keyboard_mode is %TRUE, the values of @x and @y are undefined and
28264 // should not be used.
28266 // The signal handler is free to manipulate @tooltip with the therefore
28267 // destined function calls.
28269 // Whether this signal is emitted is platform-dependent.
28270 // For plain text tooltips, use #GtkStatusIcon:tooltip-text in preference.
28271 // RETURNS: %TRUE if @tooltip should be shown right now, %FALSE otherwise.
28272 // <x>: the x coordinate of the cursor position where the request has been emitted, relative to @status_icon
28273 // <y>: the y coordinate of the cursor position where the request has been emitted, relative to @status_icon
28274 // <keyboard_mode>: %TRUE if the tooltip was trigged using the keyboard
28275 // <tooltip>: a #GtkTooltip
28276 extern (C) alias static c_int function (StatusIcon* this_, int x, int y, c_int keyboard_mode, Tooltip* tooltip, void* user_data=null) nothrow signal_query_tooltip;
28277 ulong signal_connect(string name:"query-tooltip", CB/*:signal_query_tooltip*/)
28278 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28279 if (is(typeof(cb)==signal_query_tooltip)||_ttmm!(CB, signal_query_tooltip)()) {
28280 return signal_connect_data!()(&this, cast(char*)"query-tooltip",
28281 cast(GObject2.Callback)cb, data, null, cf);
28284 // The ::scroll-event signal is emitted when a button in the 4 to 7
28285 // range is pressed. Wheel mice are usually configured to generate
28286 // button press events for buttons 4 and 5 when the wheel is turned.
28288 // Whether this event is emitted is platform-dependent.
28290 // %FALSE to propagate the event further.
28291 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
28292 // <event>: the #GdkEventScroll which triggered this signal
28293 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_scroll_event;
28294 ulong signal_connect(string name:"scroll-event", CB/*:signal_scroll_event*/)
28295 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28296 if (is(typeof(cb)==signal_scroll_event)||_ttmm!(CB, signal_scroll_event)()) {
28297 return signal_connect_data!()(&this, cast(char*)"scroll-event",
28298 cast(GObject2.Callback)cb, data, null, cf);
28301 // VERSION: 2.10
28302 // Gets emitted when the size available for the image
28303 // changes, e.g. because the notification area got resized.
28305 // size. Otherwise, GTK+ will scale the icon as necessary.
28306 // RETURNS: %TRUE if the icon was updated for the new
28307 // <size>: the new size
28308 extern (C) alias static c_int function (StatusIcon* this_, int size, void* user_data=null) nothrow signal_size_changed;
28309 ulong signal_connect(string name:"size-changed", CB/*:signal_size_changed*/)
28310 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28311 if (is(typeof(cb)==signal_size_changed)||_ttmm!(CB, signal_size_changed)()) {
28312 return signal_connect_data!()(&this, cast(char*)"size-changed",
28313 cast(GObject2.Callback)cb, data, null, cf);
28317 struct StatusIconClass {
28318 GObject2.ObjectClass parent_class;
28319 extern (C) void function (StatusIcon* status_icon) nothrow activate;
28320 extern (C) void function (StatusIcon* status_icon, uint button, uint activate_time) nothrow popup_menu;
28321 extern (C) int function (StatusIcon* status_icon, int size) nothrow size_changed;
28322 extern (C) int function (StatusIcon* status_icon, Gdk2.EventButton* event) nothrow button_press_event;
28323 extern (C) int function (StatusIcon* status_icon, Gdk2.EventButton* event) nothrow button_release_event;
28324 extern (C) int function (StatusIcon* status_icon, Gdk2.EventScroll* event) nothrow scroll_event;
28325 extern (C) int function (StatusIcon* status_icon, int x, int y, int keyboard_mode, Tooltip* tooltip) nothrow query_tooltip;
28326 void* __gtk_reserved1, __gtk_reserved2;
28329 struct StatusIconPrivate {
28332 struct Statusbar /* : HBox */ {
28333 mixin Atk.ImplementorIface.__interface__;
28334 mixin Buildable.__interface__;
28335 mixin Orientable.__interface__;
28336 alias parent_widget this;
28337 alias parent_widget super_;
28338 alias parent_widget hbox;
28339 HBox parent_widget;
28340 Widget* frame, label;
28341 GLib2.SList* messages, keys;
28342 uint seq_context_id, seq_message_id;
28343 Gdk2.Window* grip_window;
28344 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28345 uint, "has_resize_grip", 1,
28346 uint, "__dummy32A", 31));
28349 // Creates a new #GtkStatusbar ready for messages.
28350 // RETURNS: the new #GtkStatusbar
28351 static Statusbar* new_()() nothrow {
28352 return gtk_statusbar_new();
28354 static auto opCall()() {
28355 return gtk_statusbar_new();
28358 // Returns a new context identifier, given a description
28359 // of the actual context. Note that the description is
28360 // <emphasis>not</emphasis> shown in the UI.
28361 // RETURNS: an integer id
28362 // <context_description>: textual description of what context the new message is being used in
28363 uint get_context_id(AT0)(AT0 /*char*/ context_description) nothrow {
28364 return gtk_statusbar_get_context_id(&this, toCString!(char*)(context_description));
28367 // Returns whether the statusbar has a resize grip.
28368 // RETURNS: %TRUE if the statusbar has a resize grip.
28369 int get_has_resize_grip()() nothrow {
28370 return gtk_statusbar_get_has_resize_grip(&this);
28373 // VERSION: 2.20
28374 // Retrieves the box containing the label widget.
28375 // RETURNS: a #GtkBox
28376 Widget* get_message_area()() nothrow {
28377 return gtk_statusbar_get_message_area(&this);
28380 // Removes the first message in the #GtkStatusBar's stack
28381 // with the given context id.
28383 // Note that this may not change the displayed message, if
28384 // the message at the top of the stack has a different
28385 // context id.
28386 // <context_id>: a context identifier
28387 void pop()(uint context_id) nothrow {
28388 gtk_statusbar_pop(&this, context_id);
28391 // Pushes a new message onto a statusbar's stack.
28393 // gtk_statusbar_remove().
28394 // RETURNS: a message id that can be used with
28395 // <context_id>: the message's context id, as returned by gtk_statusbar_get_context_id()
28396 // <text>: the message to add to the statusbar
28397 uint push(AT0)(uint context_id, AT0 /*char*/ text) nothrow {
28398 return gtk_statusbar_push(&this, context_id, toCString!(char*)(text));
28401 // Forces the removal of a message from a statusbar's stack.
28402 // The exact @context_id and @message_id must be specified.
28403 // <context_id>: a context identifier
28404 // <message_id>: a message identifier, as returned by gtk_statusbar_push()
28405 void remove()(uint context_id, uint message_id) nothrow {
28406 gtk_statusbar_remove(&this, context_id, message_id);
28409 // VERSION: 2.22
28410 // Forces the removal of all messages from a statusbar's
28411 // stack with the exact @context_id.
28412 // <context_id>: a context identifier
28413 void remove_all()(uint context_id) nothrow {
28414 gtk_statusbar_remove_all(&this, context_id);
28417 // Sets whether the statusbar has a resize grip.
28418 // %TRUE by default.
28419 // <setting>: %TRUE to have a resize grip
28420 void set_has_resize_grip()(int setting) nothrow {
28421 gtk_statusbar_set_has_resize_grip(&this, setting);
28424 // Is emitted whenever a new message is popped off a statusbar's stack.
28425 // <context_id>: the context id of the relevant message/statusbar.
28426 // <text>: the message that was just popped.
28427 extern (C) alias static void function (Statusbar* this_, c_uint context_id, char* text, void* user_data=null) nothrow signal_text_popped;
28429 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28430 return super_.signal_connect!name(cb, data, cf);
28433 ulong signal_connect(string name:"text-popped", CB/*:signal_text_popped*/)
28434 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28435 if (is(typeof(cb)==signal_text_popped)||_ttmm!(CB, signal_text_popped)()) {
28436 return signal_connect_data!()(&this, cast(char*)"text-popped",
28437 cast(GObject2.Callback)cb, data, null, cf);
28440 // Is emitted whenever a new message gets pushed onto a statusbar's stack.
28441 // <context_id>: the context id of the relevant message/statusbar.
28442 // <text>: the message that was pushed.
28443 extern (C) alias static void function (Statusbar* this_, c_uint context_id, char* text, void* user_data=null) nothrow signal_text_pushed;
28444 ulong signal_connect(string name:"text-pushed", CB/*:signal_text_pushed*/)
28445 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28446 if (is(typeof(cb)==signal_text_pushed)||_ttmm!(CB, signal_text_pushed)()) {
28447 return signal_connect_data!()(&this, cast(char*)"text-pushed",
28448 cast(GObject2.Callback)cb, data, null, cf);
28452 struct StatusbarClass {
28453 HBoxClass parent_class;
28454 void* reserved;
28455 extern (C) void function (Statusbar* statusbar, uint context_id, char* text) nothrow text_pushed;
28456 extern (C) void function (Statusbar* statusbar, uint context_id, char* text) nothrow text_popped;
28457 extern (C) void function () nothrow _gtk_reserved1;
28458 extern (C) void function () nothrow _gtk_reserved2;
28459 extern (C) void function () nothrow _gtk_reserved3;
28460 extern (C) void function () nothrow _gtk_reserved4;
28463 struct StockItem {
28464 char* stock_id, label;
28465 Gdk2.ModifierType modifier;
28466 uint keyval;
28467 char* translation_domain;
28470 // Unintrospectable method: copy() / gtk_stock_item_copy()
28471 // Copies a stock item, mostly useful for language bindings and not in applications.
28472 // RETURNS: a new #GtkStockItem
28473 StockItem* copy()() nothrow {
28474 return gtk_stock_item_copy(&this);
28477 // Frees a stock item allocated on the heap, such as one returned by
28478 // gtk_stock_item_copy(). Also frees the fields inside the stock item,
28479 // if they are not %NULL.
28480 void free()() nothrow {
28481 gtk_stock_item_free(&this);
28485 struct Style /* : GObject.Object */ {
28486 alias parent_instance this;
28487 alias parent_instance super_;
28488 alias parent_instance object;
28489 GObject2.Object parent_instance;
28490 Gdk2.Color[5] fg, bg, light, dark, mid, text, base, text_aa;
28491 Gdk2.Color black, white;
28492 Pango.FontDescription* font_desc;
28493 int xthickness, ythickness;
28494 Gdk2.GC*[5] fg_gc, bg_gc, light_gc, dark_gc, mid_gc, text_gc, base_gc, text_aa_gc;
28495 Gdk2.GC* black_gc, white_gc;
28496 Gdk2.Pixmap*[5] bg_pixmap;
28497 private int attach_count, depth;
28498 private Gdk2.Colormap* colormap;
28499 private Gdk2.Font* private_font;
28500 private Pango.FontDescription* private_font_desc;
28501 private RcStyle* rc_style;
28502 private GLib2.SList* styles;
28503 private void*[0] property_cache;
28504 private GLib2.SList* icon_factories;
28507 // Creates a new #GtkStyle.
28508 // RETURNS: a new #GtkStyle.
28509 static Style* /*new*/ new_()() nothrow {
28510 return gtk_style_new();
28512 static auto opCall()() {
28513 return gtk_style_new();
28515 void apply_default_background(AT0, AT1)(AT0 /*Gdk2.Window*/ window, int set_bg, StateType state_type, AT1 /*Gdk2.Rectangle*/ area, int x, int y, int width, int height) nothrow {
28516 gtk_style_apply_default_background(&this, UpCast!(Gdk2.Window*)(window), set_bg, state_type, UpCast!(Gdk2.Rectangle*)(area), x, y, width, height);
28519 // Unintrospectable method: attach() / gtk_style_attach()
28520 // Attaches a style to a window; this process allocates the
28521 // colors and creates the GC's for the style - it specializes
28522 // it to a particular visual and colormap. The process may
28523 // involve the creation of a new style if the style has already
28524 // been attached to a window with a different style and colormap.
28526 // Since this function may return a new object, you have to use it
28527 // in the following way:
28528 // <literal>style = gtk_style_attach (style, window)</literal>
28530 // If the style is newly created, the style parameter
28531 // will be unref'ed, and the new style will have
28532 // a reference count belonging to the caller.
28533 // RETURNS: Either @style, or a newly-created #GtkStyle.
28534 // <window>: a #GdkWindow.
28535 Style* attach(AT0)(AT0 /*Gdk2.Window*/ window) nothrow {
28536 return gtk_style_attach(&this, UpCast!(Gdk2.Window*)(window));
28539 // Creates a copy of the passed in #GtkStyle object.
28540 // RETURNS: a copy of @style
28541 Style* /*new*/ copy()() nothrow {
28542 return gtk_style_copy(&this);
28545 // Detaches a style from a window. If the style is not attached
28546 // to any windows anymore, it is unrealized. See gtk_style_attach().
28547 void detach()() nothrow {
28548 gtk_style_detach(&this);
28551 // Unintrospectable method: get() / gtk_style_get()
28552 // VERSION: 2.16
28553 // Gets the values of a multiple style properties for @widget_type
28554 // from @style.
28555 // <widget_type>: the #GType of a descendant of #GtkWidget
28556 // <first_property_name>: the name of the first style property to get
28557 /+ Not available -- variadic methods unsupported - use the C function directly.
28558 alias gtk_style_get get; // Variadic
28561 // Gets the #GdkFont to use for the given style. This is
28562 // meant only as a replacement for direct access to @style->font
28563 // and should not be used in new code. New code should
28564 // use @style->font_desc instead.
28566 // by the style; if you want to keep around a copy, you must
28567 // call gdk_font_ref().
28568 // RETURNS: the #GdkFont for the style. This font is owned
28569 Gdk2.Font* /*new*/ get_font()() nothrow {
28570 return gtk_style_get_font(&this);
28573 // VERSION: 2.16
28574 // Queries the value of a style property corresponding to a
28575 // widget class is in the given style.
28576 // <widget_type>: the #GType of a descendant of #GtkWidget
28577 // <property_name>: the name of the style property to get
28578 // <value>: a #GValue where the value of the property being queried will be stored
28579 void get_style_property(AT0, AT1)(Type widget_type, AT0 /*char*/ property_name, AT1 /*GObject2.Value*/ value) nothrow {
28580 gtk_style_get_style_property(&this, widget_type, toCString!(char*)(property_name), UpCast!(GObject2.Value*)(value));
28583 // Unintrospectable method: get_valist() / gtk_style_get_valist()
28584 // VERSION: 2.16
28585 // Non-vararg variant of gtk_style_get().
28586 // Used primarily by language bindings.
28587 // <widget_type>: the #GType of a descendant of #GtkWidget
28588 // <first_property_name>: the name of the first style property to get
28589 // <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.
28590 void get_valist(AT0)(Type widget_type, AT0 /*char*/ first_property_name, va_list var_args) nothrow {
28591 gtk_style_get_valist(&this, widget_type, toCString!(char*)(first_property_name), var_args);
28594 // VERSION: 2.10
28595 // Looks up @color_name in the style's logical color mappings,
28596 // filling in @color and returning %TRUE if found, otherwise
28597 // returning %FALSE. Do not cache the found mapping, because
28598 // it depends on the #GtkStyle and might change when a theme
28599 // switch occurs.
28600 // RETURNS: %TRUE if the mapping was found.
28601 // <color_name>: the name of the logical color to look up
28602 // <color>: the #GdkColor to fill in
28603 int lookup_color(AT0, AT1)(AT0 /*char*/ color_name, /*out*/ AT1 /*Gdk2.Color*/ color) nothrow {
28604 return gtk_style_lookup_color(&this, toCString!(char*)(color_name), UpCast!(Gdk2.Color*)(color));
28607 // Looks up @stock_id in the icon factories associated with @style
28608 // and the default icon factory, returning an icon set if found,
28609 // otherwise %NULL.
28610 // RETURNS: icon set of @stock_id
28611 // <stock_id>: an icon name
28612 IconSet* lookup_icon_set(AT0)(AT0 /*char*/ stock_id) nothrow {
28613 return gtk_style_lookup_icon_set(&this, toCString!(char*)(stock_id));
28616 // Unintrospectable method: ref() / gtk_style_ref()
28617 // DEPRECATED (v2.0) method: ref - use g_object_ref() instead.
28618 // Increase the reference count of @style.
28619 // RETURNS: @style.
28620 Style* ref_()() nothrow {
28621 return gtk_style_ref(&this);
28624 // Renders the icon specified by @source at the given @size
28625 // according to the given parameters and returns the result in a
28626 // pixbuf.
28628 // containing the rendered icon
28629 // RETURNS: a newly-created #GdkPixbuf
28630 // <source>: the #GtkIconSource specifying the icon to render
28631 // <direction>: a text direction
28632 // <state>: a state
28633 // <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.
28634 // <widget>: the widget
28635 // <detail>: a style detail
28636 GdkPixbuf2.Pixbuf* /*new*/ render_icon(AT0, AT1, AT2)(AT0 /*IconSource*/ source, TextDirection direction, StateType state, IconSize size, AT1 /*Widget*/ widget=null, AT2 /*char*/ detail=null) nothrow {
28637 return gtk_style_render_icon(&this, UpCast!(IconSource*)(source), direction, state, size, UpCast!(Widget*)(widget), toCString!(char*)(detail));
28640 // Sets the background of @window to the background color or pixmap
28641 // specified by @style for the given state.
28642 // <window>: a #GdkWindow
28643 // <state_type>: a state
28644 void set_background(AT0)(AT0 /*Gdk2.Window*/ window, StateType state_type) nothrow {
28645 gtk_style_set_background(&this, UpCast!(Gdk2.Window*)(window), state_type);
28648 // Sets the #GdkFont to use for a given style. This is
28649 // meant only as a replacement for direct access to style->font
28650 // and should not be used in new code. New code should
28651 // use style->font_desc instead.
28652 // <font>: a #GdkFont, or %NULL to use the #GdkFont corresponding to style->font_desc.
28653 void set_font(AT0)(AT0 /*Gdk2.Font*/ font=null) nothrow {
28654 gtk_style_set_font(&this, UpCast!(Gdk2.Font*)(font));
28657 // DEPRECATED (v2.0) method: unref - use g_object_unref() instead.
28658 // Decrease the reference count of @style.
28659 void unref()() nothrow {
28660 gtk_style_unref(&this);
28663 // VERSION: 2.4
28664 // Emitted when the style has been initialized for a particular
28665 // colormap and depth. Connecting to this signal is probably seldom
28666 // useful since most of the time applications and widgets only
28667 // deal with styles that have been already realized.
28668 extern (C) alias static void function (Style* this_, void* user_data=null) nothrow signal_realize;
28670 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
28671 return super_.signal_connect!name(cb, data, cf);
28674 ulong signal_connect(string name:"realize", CB/*:signal_realize*/)
28675 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28676 if (is(typeof(cb)==signal_realize)||_ttmm!(CB, signal_realize)()) {
28677 return signal_connect_data!()(&this, cast(char*)"realize",
28678 cast(GObject2.Callback)cb, data, null, cf);
28681 // VERSION: 2.4
28682 // Emitted when the aspects of the style specific to a particular colormap
28683 // and depth are being cleaned up. A connection to this signal can be useful
28684 // if a widget wants to cache objects like a #GdkGC as object data on #GtkStyle.
28685 // This signal provides a convenient place to free such cached objects.
28686 extern (C) alias static void function (Style* this_, void* user_data=null) nothrow signal_unrealize;
28687 ulong signal_connect(string name:"unrealize", CB/*:signal_unrealize*/)
28688 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
28689 if (is(typeof(cb)==signal_unrealize)||_ttmm!(CB, signal_unrealize)()) {
28690 return signal_connect_data!()(&this, cast(char*)"unrealize",
28691 cast(GObject2.Callback)cb, data, null, cf);
28695 struct StyleClass {
28696 GObject2.ObjectClass parent_class;
28697 extern (C) void function (Style* style) nothrow realize;
28698 extern (C) void function (Style* style) nothrow unrealize;
28699 extern (C) void function (Style* style, Style* src) nothrow copy;
28700 // Unintrospectable functionp: clone() / ()
28701 extern (C) Style* function (Style* style) nothrow clone;
28702 extern (C) void function (Style* style, RcStyle* rc_style) nothrow init_from_rc;
28704 // <window>: a #GdkWindow
28705 // <state_type>: a state
28706 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type) nothrow set_background;
28708 // RETURNS: a newly-created #GdkPixbuf
28709 // <source>: the #GtkIconSource specifying the icon to render
28710 // <direction>: a text direction
28711 // <state>: a state
28712 // <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.
28713 // <widget>: the widget
28714 // <detail>: a style detail
28715 extern (C) GdkPixbuf2.Pixbuf* /*new*/ function (Style* style, IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null) nothrow render_icon;
28716 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) nothrow draw_hline;
28717 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) nothrow draw_vline;
28718 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) nothrow draw_shadow;
28719 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) nothrow draw_polygon;
28720 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) nothrow draw_arrow;
28721 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) nothrow draw_diamond;
28722 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_) nothrow draw_string;
28723 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) nothrow draw_box;
28724 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) nothrow draw_flat_box;
28725 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) nothrow draw_check;
28726 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) nothrow draw_option;
28727 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) nothrow draw_tab;
28728 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) nothrow draw_shadow_gap;
28729 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) nothrow draw_box_gap;
28730 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) nothrow draw_extension;
28731 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) nothrow draw_focus;
28732 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) nothrow draw_slider;
28733 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) nothrow draw_handle;
28734 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) nothrow draw_expander;
28735 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) nothrow draw_layout;
28736 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) nothrow draw_resize_grip;
28737 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) nothrow draw_spinner;
28738 extern (C) void function () nothrow _gtk_reserved1;
28739 extern (C) void function () nothrow _gtk_reserved2;
28740 extern (C) void function () nothrow _gtk_reserved3;
28741 extern (C) void function () nothrow _gtk_reserved4;
28742 extern (C) void function () nothrow _gtk_reserved5;
28743 extern (C) void function () nothrow _gtk_reserved6;
28744 extern (C) void function () nothrow _gtk_reserved7;
28745 extern (C) void function () nothrow _gtk_reserved8;
28746 extern (C) void function () nothrow _gtk_reserved9;
28747 extern (C) void function () nothrow _gtk_reserved10;
28748 extern (C) void function () nothrow _gtk_reserved11;
28751 enum SubmenuDirection {
28752 LEFT = 0,
28753 RIGHT = 1
28755 enum SubmenuPlacement {
28756 TOP_BOTTOM = 0,
28757 LEFT_RIGHT = 1
28759 enum int TEXT_VIEW_PRIORITY_VALIDATE = 5;
28760 enum int TOGGLE_GROUP_MOD_MASK = 0;
28761 enum int TYPE_FUNDAMENTAL_LAST = -1;
28762 struct Table /* : Container */ {
28763 mixin Atk.ImplementorIface.__interface__;
28764 mixin Buildable.__interface__;
28765 alias container this;
28766 alias container super_;
28767 Container container;
28768 GLib2.List* children;
28769 TableRowCol* rows, cols;
28770 ushort nrows, ncols, column_spacing, row_spacing;
28771 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28772 uint, "homogeneous", 1,
28773 uint, "__dummy32A", 31));
28775 static Table* new_()(uint rows, uint columns, int homogeneous) nothrow {
28776 return gtk_table_new(rows, columns, homogeneous);
28778 static auto opCall()(uint rows, uint columns, int homogeneous) {
28779 return gtk_table_new(rows, columns, homogeneous);
28781 void attach(AT0)(AT0 /*Widget*/ child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach, AttachOptions xoptions, AttachOptions yoptions, uint xpadding, uint ypadding) nothrow {
28782 gtk_table_attach(&this, UpCast!(Widget*)(child), left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding);
28784 void attach_defaults(AT0)(AT0 /*Widget*/ widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) nothrow {
28785 gtk_table_attach_defaults(&this, UpCast!(Widget*)(widget), left_attach, right_attach, top_attach, bottom_attach);
28788 // Gets the amount of space between column @col, and
28789 // column @col + 1. See gtk_table_set_col_spacing().
28790 // RETURNS: the column spacing
28791 // <column>: a column in the table, 0 indicates the first column
28792 uint get_col_spacing()(uint column) nothrow {
28793 return gtk_table_get_col_spacing(&this, column);
28796 // Gets the default column spacing for the table. This is
28797 // the spacing that will be used for newly added columns.
28798 // (See gtk_table_set_col_spacings())
28799 // RETURNS: the default column spacing
28800 uint get_default_col_spacing()() nothrow {
28801 return gtk_table_get_default_col_spacing(&this);
28804 // Gets the default row spacing for the table. This is
28805 // the spacing that will be used for newly added rows.
28806 // (See gtk_table_set_row_spacings())
28807 // RETURNS: the default row spacing
28808 uint get_default_row_spacing()() nothrow {
28809 return gtk_table_get_default_row_spacing(&this);
28812 // Returns whether the table cells are all constrained to the same
28813 // width and height. (See gtk_table_set_homogenous ())
28814 // RETURNS: %TRUE if the cells are all constrained to the same size
28815 int get_homogeneous()() nothrow {
28816 return gtk_table_get_homogeneous(&this);
28819 // Gets the amount of space between row @row, and
28820 // row @row + 1. See gtk_table_set_row_spacing().
28821 // RETURNS: the row spacing
28822 // <row>: a row in the table, 0 indicates the first row
28823 uint get_row_spacing()(uint row) nothrow {
28824 return gtk_table_get_row_spacing(&this, row);
28827 // VERSION: 2.22
28828 // Returns the number of rows and columns in the table.
28829 // <rows>: return location for the number of rows, or %NULL
28830 // <columns>: return location for the number of columns, or %NULL
28831 void get_size(AT0, AT1)(/*out*/ AT0 /*uint*/ rows=null, /*out*/ AT1 /*uint*/ columns=null) nothrow {
28832 gtk_table_get_size(&this, UpCast!(uint*)(rows), UpCast!(uint*)(columns));
28834 void resize()(uint rows, uint columns) nothrow {
28835 gtk_table_resize(&this, rows, columns);
28837 void set_col_spacing()(uint column, uint spacing) nothrow {
28838 gtk_table_set_col_spacing(&this, column, spacing);
28840 void set_col_spacings()(uint spacing) nothrow {
28841 gtk_table_set_col_spacings(&this, spacing);
28843 void set_homogeneous()(int homogeneous) nothrow {
28844 gtk_table_set_homogeneous(&this, homogeneous);
28846 void set_row_spacing()(uint row, uint spacing) nothrow {
28847 gtk_table_set_row_spacing(&this, row, spacing);
28849 void set_row_spacings()(uint spacing) nothrow {
28850 gtk_table_set_row_spacings(&this, spacing);
28854 struct TableChild {
28855 Widget* widget;
28856 ushort left_attach, right_attach, top_attach, bottom_attach, xpadding, ypadding;
28857 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28858 uint, "xexpand", 1,
28859 uint, "yexpand", 1,
28860 uint, "xshrink", 1,
28861 uint, "yshrink", 1,
28862 uint, "xfill", 1,
28863 uint, "yfill", 1,
28864 uint, "__dummy32A", 26));
28867 struct TableClass {
28868 ContainerClass parent_class;
28871 struct TableRowCol {
28872 ushort requisition, allocation, spacing;
28873 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28874 uint, "need_expand", 1,
28875 uint, "need_shrink", 1,
28876 uint, "expand", 1,
28877 uint, "shrink", 1,
28878 uint, "empty", 1,
28879 uint, "__dummy32A", 27));
28882 struct TargetEntry {
28883 char* target;
28884 uint flags, info;
28887 enum TargetFlags {
28888 SAME_APP = 1,
28889 SAME_WIDGET = 2,
28890 OTHER_APP = 4,
28891 OTHER_WIDGET = 8
28893 struct TargetList {
28894 GLib2.List* list;
28895 uint ref_count;
28898 // Creates a new #GtkTargetList from an array of #GtkTargetEntry.
28899 // RETURNS: the new #GtkTargetList.
28900 // <targets>: Pointer to an array of #GtkTargetEntry
28901 // <ntargets>: number of entries in @targets.
28902 static TargetList* /*new*/ new_(AT0)(AT0 /*TargetEntry*/ targets, uint ntargets) nothrow {
28903 return gtk_target_list_new(UpCast!(TargetEntry*)(targets), ntargets);
28905 static auto opCall(AT0)(AT0 /*TargetEntry*/ targets, uint ntargets) {
28906 return gtk_target_list_new(UpCast!(TargetEntry*)(targets), ntargets);
28909 // Appends another target to a #GtkTargetList.
28910 // <target>: the interned atom representing the target
28911 // <flags>: the flags for this target
28912 // <info>: an ID that will be passed back to the application
28913 void add()(Gdk2.Atom target, uint flags, uint info) nothrow {
28914 gtk_target_list_add(&this, target, flags, info);
28917 // VERSION: 2.6
28918 // Appends the image targets supported by #GtkSelection to
28919 // the target list. All targets are added with the same @info.
28920 // <info>: an ID that will be passed back to the application
28921 // <writable>: whether to add only targets for which GTK+ knows how to convert a pixbuf into the format
28922 void add_image_targets()(uint info, int writable) nothrow {
28923 gtk_target_list_add_image_targets(&this, info, writable);
28926 // VERSION: 2.10
28927 // Appends the rich text targets registered with
28928 // gtk_text_buffer_register_serialize_format() or
28929 // gtk_text_buffer_register_deserialize_format() to the target list. All
28930 // targets are added with the same @info.
28931 // <info>: an ID that will be passed back to the application
28932 // <deserializable>: if %TRUE, then deserializable rich text formats will be added, serializable formats otherwise.
28933 // <buffer>: a #GtkTextBuffer.
28934 void add_rich_text_targets(AT0)(uint info, int deserializable, AT0 /*TextBuffer*/ buffer) nothrow {
28935 gtk_target_list_add_rich_text_targets(&this, info, deserializable, UpCast!(TextBuffer*)(buffer));
28938 // Prepends a table of #GtkTargetEntry to a target list.
28939 // <targets>: the table of #GtkTargetEntry
28940 // <ntargets>: number of targets in the table
28941 void add_table(AT0)(AT0 /*TargetEntry*/ targets, uint ntargets) nothrow {
28942 gtk_target_list_add_table(&this, UpCast!(TargetEntry*)(targets), ntargets);
28945 // VERSION: 2.6
28946 // Appends the text targets supported by #GtkSelection to
28947 // the target list. All targets are added with the same @info.
28948 // <info>: an ID that will be passed back to the application
28949 void add_text_targets()(uint info) nothrow {
28950 gtk_target_list_add_text_targets(&this, info);
28953 // VERSION: 2.6
28954 // Appends the URI targets supported by #GtkSelection to
28955 // the target list. All targets are added with the same @info.
28956 // <info>: an ID that will be passed back to the application
28957 void add_uri_targets()(uint info) nothrow {
28958 gtk_target_list_add_uri_targets(&this, info);
28961 // Looks up a given target in a #GtkTargetList.
28962 // RETURNS: %TRUE if the target was found, otherwise %FALSE
28963 // <target>: an interned atom representing the target to search for
28964 // <info>: a pointer to the location to store application info for target, or %NULL
28965 int find(AT0)(Gdk2.Atom target, AT0 /*uint*/ info) nothrow {
28966 return gtk_target_list_find(&this, target, UpCast!(uint*)(info));
28969 // Increases the reference count of a #GtkTargetList by one.
28970 // RETURNS: the passed in #GtkTargetList.
28971 TargetList* /*new*/ ref_()() nothrow {
28972 return gtk_target_list_ref(&this);
28975 // Removes a target from a target list.
28976 // <target>: the interned atom representing the target
28977 void remove()(Gdk2.Atom target) nothrow {
28978 gtk_target_list_remove(&this, target);
28981 // Decreases the reference count of a #GtkTargetList by one.
28982 // If the resulting reference count is zero, frees the list.
28983 void unref()() nothrow {
28984 gtk_target_list_unref(&this);
28988 struct TargetPair {
28989 Gdk2.Atom target;
28990 uint flags, info;
28993 struct TearoffMenuItem /* : MenuItem */ {
28994 mixin Atk.ImplementorIface.__interface__;
28995 mixin Activatable.__interface__;
28996 mixin Buildable.__interface__;
28997 alias menu_item this;
28998 alias menu_item super_;
28999 alias menu_item menuitem;
29000 MenuItem menu_item;
29001 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29002 uint, "torn_off", 1,
29003 uint, "__dummy32A", 31));
29005 static TearoffMenuItem* new_()() nothrow {
29006 return gtk_tearoff_menu_item_new();
29008 static auto opCall()() {
29009 return gtk_tearoff_menu_item_new();
29013 struct TearoffMenuItemClass {
29014 MenuItemClass parent_class;
29015 extern (C) void function () nothrow _gtk_reserved1;
29016 extern (C) void function () nothrow _gtk_reserved2;
29017 extern (C) void function () nothrow _gtk_reserved3;
29018 extern (C) void function () nothrow _gtk_reserved4;
29021 struct TextAppearance {
29022 Gdk2.Color bg_color, fg_color;
29023 Gdk2.Bitmap* bg_stipple, fg_stipple;
29024 int rise;
29025 private void* padding1;
29026 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29027 uint, "underline", 4,
29028 uint, "strikethrough", 1,
29029 uint, "draw_bg", 1,
29030 uint, "inside_selection", 1,
29031 uint, "is_text", 1,
29032 uint, "pad1", 1,
29033 uint, "pad2", 1,
29034 uint, "pad3", 1,
29035 uint, "pad4", 1,
29036 uint, "__dummy32A", 20));
29039 struct TextAttrAppearance {
29040 Pango.Attribute attr;
29041 TextAppearance appearance;
29044 struct TextAttributes {
29045 private uint refcount;
29046 TextAppearance appearance;
29047 Justification justification;
29048 TextDirection direction;
29049 Pango.FontDescription* font;
29050 double font_scale;
29051 int left_margin, indent, right_margin, pixels_above_lines, pixels_below_lines, pixels_inside_wrap;
29052 Pango.TabArray* tabs;
29053 WrapMode wrap_mode;
29054 Pango.Language* language;
29055 private Gdk2.Color* pg_bg_color;
29056 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29057 uint, "invisible", 1,
29058 uint, "bg_full_height", 1,
29059 uint, "editable", 1,
29060 uint, "realized", 1,
29061 uint, "pad1", 1,
29062 uint, "pad2", 1,
29063 uint, "pad3", 1,
29064 uint, "pad4", 1,
29065 uint, "__dummy32A", 24));
29068 // Creates a #GtkTextAttributes, which describes
29069 // a set of properties on some text.
29070 // RETURNS: a new #GtkTextAttributes
29071 static TextAttributes* /*new*/ new_()() nothrow {
29072 return gtk_text_attributes_new();
29074 static auto opCall()() {
29075 return gtk_text_attributes_new();
29078 // Copies @src and returns a new #GtkTextAttributes.
29079 // RETURNS: a copy of @src
29080 TextAttributes* /*new*/ copy()() nothrow {
29081 return gtk_text_attributes_copy(&this);
29084 // Copies the values from @src to @dest so that @dest has the same values
29085 // as @src. Frees existing values in @dest.
29086 // <dest>: another #GtkTextAttributes
29087 void copy_values(AT0)(AT0 /*TextAttributes*/ dest) nothrow {
29088 gtk_text_attributes_copy_values(&this, UpCast!(TextAttributes*)(dest));
29091 // Increments the reference count on @values.
29092 // RETURNS: the #GtkTextAttributes that were passed in
29093 TextAttributes* /*new*/ ref_()() nothrow {
29094 return gtk_text_attributes_ref(&this);
29097 // Decrements the reference count on @values, freeing the structure
29098 // if the reference count reaches 0.
29099 void unref()() nothrow {
29100 gtk_text_attributes_unref(&this);
29104 struct TextBTree {
29107 struct TextBuffer /* : GObject.Object */ {
29108 alias parent_instance this;
29109 alias parent_instance super_;
29110 alias parent_instance object;
29111 GObject2.Object parent_instance;
29112 TextTagTable* tag_table;
29113 TextBTree* btree;
29114 GLib2.SList* clipboard_contents_buffers, selection_clipboards;
29115 TextLogAttrCache* log_attr_cache;
29116 uint user_action_count;
29117 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29118 uint, "modified", 1,
29119 uint, "has_selection", 1,
29120 uint, "__dummy32A", 30));
29123 // Creates a new text buffer.
29124 // RETURNS: a new text buffer
29125 // <table>: a tag table, or %NULL to create a new one
29126 static TextBuffer* /*new*/ new_(AT0)(AT0 /*TextTagTable*/ table=null) nothrow {
29127 return gtk_text_buffer_new(UpCast!(TextTagTable*)(table));
29129 static auto opCall(AT0)(AT0 /*TextTagTable*/ table=null) {
29130 return gtk_text_buffer_new(UpCast!(TextTagTable*)(table));
29133 // VERSION: 2.12
29134 // Adds the mark at position @where. The mark must not be added to
29135 // another buffer, and if its name is not %NULL then there must not
29136 // be another mark in the buffer with the same name.
29138 // Emits the "mark-set" signal as notification of the mark's initial
29139 // placement.
29140 // <mark>: the mark to add
29141 // <where>: location to place mark
29142 void add_mark(AT0, AT1)(AT0 /*TextMark*/ mark, AT1 /*TextIter*/ where) nothrow {
29143 gtk_text_buffer_add_mark(&this, UpCast!(TextMark*)(mark), UpCast!(TextIter*)(where));
29146 // Adds @clipboard to the list of clipboards in which the selection
29147 // contents of @buffer are available. In most cases, @clipboard will be
29148 // the #GtkClipboard of type %GDK_SELECTION_PRIMARY for a view of @buffer.
29149 // <clipboard>: a #GtkClipboard
29150 void add_selection_clipboard(AT0)(AT0 /*Clipboard*/ clipboard) nothrow {
29151 gtk_text_buffer_add_selection_clipboard(&this, UpCast!(Clipboard*)(clipboard));
29154 // Emits the "apply-tag" signal on @buffer. The default
29155 // handler for the signal applies @tag to the given range.
29156 // @start and @end do not have to be in order.
29157 // <tag>: a #GtkTextTag
29158 // <start>: one bound of range to be tagged
29159 // <end>: other bound of range to be tagged
29160 void apply_tag(AT0, AT1, AT2)(AT0 /*TextTag*/ tag, AT1 /*TextIter*/ start, AT2 /*TextIter*/ end) nothrow {
29161 gtk_text_buffer_apply_tag(&this, UpCast!(TextTag*)(tag), UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29164 // Calls gtk_text_tag_table_lookup() on the buffer's tag table to
29165 // get a #GtkTextTag, then calls gtk_text_buffer_apply_tag().
29166 // <name>: name of a named #GtkTextTag
29167 // <start>: one bound of range to be tagged
29168 // <end>: other bound of range to be tagged
29169 void apply_tag_by_name(AT0, AT1, AT2)(AT0 /*char*/ name, AT1 /*TextIter*/ start, AT2 /*TextIter*/ end) nothrow {
29170 gtk_text_buffer_apply_tag_by_name(&this, toCString!(char*)(name), UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29173 // VERSION: 2.6
29174 // Performs the appropriate action as if the user hit the delete
29175 // key with the cursor at the position specified by @iter. In the
29176 // normal case a single character will be deleted, but when
29177 // combining accents are involved, more than one character can
29178 // be deleted, and when precomposed character and accent combinations
29179 // are involved, less than one character will be deleted.
29181 // Because the buffer is modified, all outstanding iterators become
29182 // invalid after calling this function; however, the @iter will be
29183 // re-initialized to point to the location where text was deleted.
29184 // RETURNS: %TRUE if the buffer was modified
29185 // <iter>: a position in @buffer
29186 // <interactive>: whether the deletion is caused by user interaction
29187 // <default_editable>: whether the buffer is editable by default
29188 int backspace(AT0)(AT0 /*TextIter*/ iter, int interactive, int default_editable) nothrow {
29189 return gtk_text_buffer_backspace(&this, UpCast!(TextIter*)(iter), interactive, default_editable);
29192 // Called to indicate that the buffer operations between here and a
29193 // call to gtk_text_buffer_end_user_action() are part of a single
29194 // user-visible operation. The operations between
29195 // gtk_text_buffer_begin_user_action() and
29196 // gtk_text_buffer_end_user_action() can then be grouped when creating
29197 // an undo stack. #GtkTextBuffer maintains a count of calls to
29198 // gtk_text_buffer_begin_user_action() that have not been closed with
29199 // a call to gtk_text_buffer_end_user_action(), and emits the
29200 // "begin-user-action" and "end-user-action" signals only for the
29201 // outermost pair of calls. This allows you to build user actions
29202 // from other user actions.
29204 // The "interactive" buffer mutation functions, such as
29205 // gtk_text_buffer_insert_interactive(), automatically call begin/end
29206 // user action around the buffer operations they perform, so there's
29207 // no need to add extra calls if you user action consists solely of a
29208 // single call to one of those functions.
29209 void begin_user_action()() nothrow {
29210 gtk_text_buffer_begin_user_action(&this);
29213 // Copies the currently-selected text to a clipboard.
29214 // <clipboard>: the #GtkClipboard object to copy to
29215 void copy_clipboard(AT0)(AT0 /*Clipboard*/ clipboard) nothrow {
29216 gtk_text_buffer_copy_clipboard(&this, UpCast!(Clipboard*)(clipboard));
29219 // This is a convenience function which simply creates a child anchor
29220 // with gtk_text_child_anchor_new() and inserts it into the buffer
29221 // with gtk_text_buffer_insert_child_anchor(). The new anchor is
29222 // owned by the buffer; no reference count is returned to
29223 // the caller of gtk_text_buffer_create_child_anchor().
29224 // RETURNS: the created child anchor
29225 // <iter>: location in the buffer
29226 TextChildAnchor* create_child_anchor(AT0)(AT0 /*TextIter*/ iter) nothrow {
29227 return gtk_text_buffer_create_child_anchor(&this, UpCast!(TextIter*)(iter));
29230 // Creates a mark at position @where. If @mark_name is %NULL, the mark
29231 // is anonymous; otherwise, the mark can be retrieved by name using
29232 // gtk_text_buffer_get_mark(). If a mark has left gravity, and text is
29233 // inserted at the mark's current location, the mark will be moved to
29234 // the left of the newly-inserted text. If the mark has right gravity
29235 // (@left_gravity = %FALSE), the mark will end up on the right of
29236 // newly-inserted text. The standard left-to-right cursor is a mark
29237 // with right gravity (when you type, the cursor stays on the right
29238 // side of the text you're typing).
29240 // The caller of this function does <emphasis>not</emphasis> own a
29241 // reference to the returned #GtkTextMark, so you can ignore the
29242 // return value if you like. Marks are owned by the buffer and go
29243 // away when the buffer does.
29245 // Emits the "mark-set" signal as notification of the mark's initial
29246 // placement.
29247 // RETURNS: the new #GtkTextMark object
29248 // <mark_name>: name for mark, or %NULL
29249 // <where>: location to place mark
29250 // <left_gravity>: whether the mark has left gravity
29251 TextMark* create_mark(AT0, AT1)(AT0 /*char*/ mark_name, AT1 /*TextIter*/ where, int left_gravity) nothrow {
29252 return gtk_text_buffer_create_mark(&this, toCString!(char*)(mark_name), UpCast!(TextIter*)(where), left_gravity);
29255 // Unintrospectable method: create_tag() / gtk_text_buffer_create_tag()
29256 // Creates a tag and adds it to the tag table for @buffer.
29257 // Equivalent to calling gtk_text_tag_new() and then adding the
29258 // tag to the buffer's tag table. The returned tag is owned by
29259 // the buffer's tag table, so the ref count will be equal to one.
29261 // If @tag_name is %NULL, the tag is anonymous.
29263 // If @tag_name is non-%NULL, a tag called @tag_name must not already
29264 // exist in the tag table for this buffer.
29266 // The @first_property_name argument and subsequent arguments are a list
29267 // of properties to set on the tag, as with g_object_set().
29268 // RETURNS: a new tag
29269 // <tag_name>: name of the new tag, or %NULL
29270 // <first_property_name>: name of first property to set, or %NULL
29271 /+ Not available -- variadic methods unsupported - use the C function directly.
29272 alias gtk_text_buffer_create_tag create_tag; // Variadic
29275 // Copies the currently-selected text to a clipboard, then deletes
29276 // said text if it's editable.
29277 // <clipboard>: the #GtkClipboard object to cut to
29278 // <default_editable>: default editability of the buffer
29279 void cut_clipboard(AT0)(AT0 /*Clipboard*/ clipboard, int default_editable) nothrow {
29280 gtk_text_buffer_cut_clipboard(&this, UpCast!(Clipboard*)(clipboard), default_editable);
29283 // Deletes text between @start and @end. The order of @start and @end
29284 // is not actually relevant; gtk_text_buffer_delete() will reorder
29285 // them. This function actually emits the "delete-range" signal, and
29286 // the default handler of that signal deletes the text. Because the
29287 // buffer is modified, all outstanding iterators become invalid after
29288 // calling this function; however, the @start and @end will be
29289 // re-initialized to point to the location where text was deleted.
29290 // <start>: a position in @buffer
29291 // <end>: another position in @buffer
29292 void delete_(AT0, AT1)(AT0 /*TextIter*/ start, AT1 /*TextIter*/ end) nothrow {
29293 gtk_text_buffer_delete(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29296 // Deletes all <emphasis>editable</emphasis> text in the given range.
29297 // Calls gtk_text_buffer_delete() for each editable sub-range of
29298 // [@start,@end). @start and @end are revalidated to point to
29299 // the location of the last deleted range, or left untouched if
29300 // no text was deleted.
29301 // RETURNS: whether some text was actually deleted
29302 // <start_iter>: start of range to delete
29303 // <end_iter>: end of range
29304 // <default_editable>: whether the buffer is editable by default
29305 int delete_interactive(AT0, AT1)(AT0 /*TextIter*/ start_iter, AT1 /*TextIter*/ end_iter, int default_editable) nothrow {
29306 return gtk_text_buffer_delete_interactive(&this, UpCast!(TextIter*)(start_iter), UpCast!(TextIter*)(end_iter), default_editable);
29309 // Deletes @mark, so that it's no longer located anywhere in the
29310 // buffer. Removes the reference the buffer holds to the mark, so if
29311 // you haven't called g_object_ref() on the mark, it will be freed. Even
29312 // if the mark isn't freed, most operations on @mark become
29313 // invalid, until it gets added to a buffer again with
29314 // gtk_text_buffer_add_mark(). Use gtk_text_mark_get_deleted() to
29315 // find out if a mark has been removed from its buffer.
29316 // The "mark-deleted" signal will be emitted as notification after
29317 // the mark is deleted.
29318 // <mark>: a #GtkTextMark in @buffer
29319 void delete_mark(AT0)(AT0 /*TextMark*/ mark) nothrow {
29320 gtk_text_buffer_delete_mark(&this, UpCast!(TextMark*)(mark));
29323 // Deletes the mark named @name; the mark must exist. See
29324 // gtk_text_buffer_delete_mark() for details.
29325 // <name>: name of a mark in @buffer
29326 void delete_mark_by_name(AT0)(AT0 /*char*/ name) nothrow {
29327 gtk_text_buffer_delete_mark_by_name(&this, toCString!(char*)(name));
29330 // Deletes the range between the "insert" and "selection_bound" marks,
29331 // that is, the currently-selected text. If @interactive is %TRUE,
29332 // the editability of the selection will be considered (users can't delete
29333 // uneditable text).
29334 // RETURNS: whether there was a non-empty selection to delete
29335 // <interactive>: whether the deletion is caused by user interaction
29336 // <default_editable>: whether the buffer is editable by default
29337 int delete_selection()(int interactive, int default_editable) nothrow {
29338 return gtk_text_buffer_delete_selection(&this, interactive, default_editable);
29341 // VERSION: 2.10
29342 // This function deserializes rich text in format @format and inserts
29343 // it at @iter.
29345 // @format<!-- -->s to be used must be registered using
29346 // gtk_text_buffer_register_deserialize_format() or
29347 // gtk_text_buffer_register_deserialize_tagset() beforehand.
29348 // RETURNS: %TRUE on success, %FALSE otherwise.
29349 // <content_buffer>: the #GtkTextBuffer to deserialize into
29350 // <format>: the rich text format to use for deserializing
29351 // <iter>: insertion point for the deserialized text
29352 // <data>: data to deserialize
29353 // <length>: length of @data
29354 int deserialize(AT0, AT1, AT2, AT3)(AT0 /*TextBuffer*/ content_buffer, Gdk2.Atom format, AT1 /*TextIter*/ iter, AT2 /*ubyte*/ data, size_t length, AT3 /*GLib2.Error**/ error=null) nothrow {
29355 return gtk_text_buffer_deserialize(&this, UpCast!(TextBuffer*)(content_buffer), format, UpCast!(TextIter*)(iter), UpCast!(ubyte*)(data), length, UpCast!(GLib2.Error**)(error));
29358 // VERSION: 2.10
29359 // This functions returns the value set with
29360 // gtk_text_buffer_deserialize_set_can_create_tags()
29361 // RETURNS: whether deserializing this format may create tags
29362 // <format>: a #GdkAtom representing a registered rich text format
29363 int deserialize_get_can_create_tags()(Gdk2.Atom format) nothrow {
29364 return gtk_text_buffer_deserialize_get_can_create_tags(&this, format);
29367 // VERSION: 2.10
29368 // Use this function to allow a rich text deserialization function to
29369 // create new tags in the receiving buffer. Note that using this
29370 // function is almost always a bad idea, because the rich text
29371 // functions you register should know how to map the rich text format
29372 // they handler to your text buffers set of tags.
29374 // The ability of creating new (arbitrary!) tags in the receiving buffer
29375 // is meant for special rich text formats like the internal one that
29376 // is registered using gtk_text_buffer_register_deserialize_tagset(),
29377 // because that format is essentially a dump of the internal structure
29378 // of the source buffer, including its tag names.
29380 // You should allow creation of tags only if you know what you are
29381 // doing, e.g. if you defined a tagset name for your application
29382 // suite's text buffers and you know that it's fine to receive new
29383 // tags from these buffers, because you know that your application can
29384 // handle the newly created tags.
29385 // <format>: a #GdkAtom representing a registered rich text format
29386 // <can_create_tags>: whether deserializing this format may create tags
29387 void deserialize_set_can_create_tags()(Gdk2.Atom format, int can_create_tags) nothrow {
29388 gtk_text_buffer_deserialize_set_can_create_tags(&this, format, can_create_tags);
29391 // Should be paired with a call to gtk_text_buffer_begin_user_action().
29392 // See that function for a full explanation.
29393 void end_user_action()() nothrow {
29394 gtk_text_buffer_end_user_action(&this);
29397 // Retrieves the first and last iterators in the buffer, i.e. the
29398 // entire buffer lies within the range [@start,@end).
29399 // <start>: iterator to initialize with first position in the buffer
29400 // <end>: iterator to initialize with the end iterator
29401 void get_bounds(AT0, AT1)(/*out*/ AT0 /*TextIter*/ start, /*out*/ AT1 /*TextIter*/ end) nothrow {
29402 gtk_text_buffer_get_bounds(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29405 // Gets the number of characters in the buffer; note that characters
29406 // and bytes are not the same, you can't e.g. expect the contents of
29407 // the buffer in string form to be this many bytes long. The character
29408 // count is cached, so this function is very fast.
29409 // RETURNS: number of characters in the buffer
29410 int get_char_count()() nothrow {
29411 return gtk_text_buffer_get_char_count(&this);
29414 // VERSION: 2.10
29415 // This function returns the list of targets this text buffer can
29416 // provide for copying and as DND source. The targets in the list are
29417 // added with %info values from the #GtkTextBufferTargetInfo enum,
29418 // using gtk_target_list_add_rich_text_targets() and
29419 // gtk_target_list_add_text_targets().
29420 // RETURNS: the #GtkTargetList
29421 TargetList* get_copy_target_list()() nothrow {
29422 return gtk_text_buffer_get_copy_target_list(&this);
29425 // VERSION: 2.10
29426 // This function returns the rich text deserialize formats registered
29427 // with @buffer using gtk_text_buffer_register_deserialize_format() or
29428 // gtk_text_buffer_register_deserialize_tagset()
29430 // #GdkAtom<!-- -->s representing the registered formats.
29431 // RETURNS: an array of
29432 // <n_formats>: return location for the number of formats
29433 Gdk2.Atom* /*new container*/ get_deserialize_formats()(/*out*/ int* n_formats) nothrow {
29434 return gtk_text_buffer_get_deserialize_formats(&this, n_formats);
29437 // Initializes @iter with the "end iterator," one past the last valid
29438 // character in the text buffer. If dereferenced with
29439 // gtk_text_iter_get_char(), the end iterator has a character value of
29440 // 0. The entire buffer lies in the range from the first position in
29441 // the buffer (call gtk_text_buffer_get_start_iter() to get
29442 // character position 0) to the end iterator.
29443 // <iter>: iterator to initialize
29444 void get_end_iter(AT0)(/*out*/ AT0 /*TextIter*/ iter) nothrow {
29445 gtk_text_buffer_get_end_iter(&this, UpCast!(TextIter*)(iter));
29448 // VERSION: 2.10
29449 // Indicates whether the buffer has some text currently selected.
29450 // RETURNS: %TRUE if the there is text selected
29451 int get_has_selection()() nothrow {
29452 return gtk_text_buffer_get_has_selection(&this);
29455 // Returns the mark that represents the cursor (insertion point).
29456 // Equivalent to calling gtk_text_buffer_get_mark() to get the mark
29457 // named "insert", but very slightly more efficient, and involves less
29458 // typing.
29459 // RETURNS: insertion point mark
29460 TextMark* get_insert()() nothrow {
29461 return gtk_text_buffer_get_insert(&this);
29464 // Obtains the location of @anchor within @buffer.
29465 // <iter>: an iterator to be initialized
29466 // <anchor>: a child anchor that appears in @buffer
29467 void get_iter_at_child_anchor(AT0, AT1)(/*out*/ AT0 /*TextIter*/ iter, AT1 /*TextChildAnchor*/ anchor) nothrow {
29468 gtk_text_buffer_get_iter_at_child_anchor(&this, UpCast!(TextIter*)(iter), UpCast!(TextChildAnchor*)(anchor));
29471 // Initializes @iter to the start of the given line.
29472 // <iter>: iterator to initialize
29473 // <line_number>: line number counting from 0
29474 void get_iter_at_line(AT0)(/*out*/ AT0 /*TextIter*/ iter, int line_number) nothrow {
29475 gtk_text_buffer_get_iter_at_line(&this, UpCast!(TextIter*)(iter), line_number);
29478 // Obtains an iterator pointing to @byte_index within the given line.
29479 // @byte_index must be the start of a UTF-8 character, and must not be
29480 // beyond the end of the line. Note <emphasis>bytes</emphasis>, not
29481 // characters; UTF-8 may encode one character as multiple bytes.
29482 // <iter>: iterator to initialize
29483 // <line_number>: line number counting from 0
29484 // <byte_index>: byte index from start of line
29485 void get_iter_at_line_index(AT0)(/*out*/ AT0 /*TextIter*/ iter, int line_number, int byte_index) nothrow {
29486 gtk_text_buffer_get_iter_at_line_index(&this, UpCast!(TextIter*)(iter), line_number, byte_index);
29489 // Obtains an iterator pointing to @char_offset within the given
29490 // line. The @char_offset must exist, offsets off the end of the line
29491 // are not allowed. Note <emphasis>characters</emphasis>, not bytes;
29492 // UTF-8 may encode one character as multiple bytes.
29493 // <iter>: iterator to initialize
29494 // <line_number>: line number counting from 0
29495 // <char_offset>: char offset from start of line
29496 void get_iter_at_line_offset(AT0)(/*out*/ AT0 /*TextIter*/ iter, int line_number, int char_offset) nothrow {
29497 gtk_text_buffer_get_iter_at_line_offset(&this, UpCast!(TextIter*)(iter), line_number, char_offset);
29500 // Initializes @iter with the current position of @mark.
29501 // <iter>: iterator to initialize
29502 // <mark>: a #GtkTextMark in @buffer
29503 void get_iter_at_mark(AT0, AT1)(/*out*/ AT0 /*TextIter*/ iter, AT1 /*TextMark*/ mark) nothrow {
29504 gtk_text_buffer_get_iter_at_mark(&this, UpCast!(TextIter*)(iter), UpCast!(TextMark*)(mark));
29507 // Initializes @iter to a position @char_offset chars from the start
29508 // of the entire buffer. If @char_offset is -1 or greater than the number
29509 // of characters in the buffer, @iter is initialized to the end iterator,
29510 // the iterator one past the last valid character in the buffer.
29511 // <iter>: iterator to initialize
29512 // <char_offset>: char offset from start of buffer, counting from 0, or -1
29513 void get_iter_at_offset(AT0)(/*out*/ AT0 /*TextIter*/ iter, int char_offset) nothrow {
29514 gtk_text_buffer_get_iter_at_offset(&this, UpCast!(TextIter*)(iter), char_offset);
29517 // Obtains the number of lines in the buffer. This value is cached, so
29518 // the function is very fast.
29519 // RETURNS: number of lines in the buffer
29520 int get_line_count()() nothrow {
29521 return gtk_text_buffer_get_line_count(&this);
29524 // Returns the mark named @name in buffer @buffer, or %NULL if no such
29525 // mark exists in the buffer.
29526 // RETURNS: a #GtkTextMark, or %NULL
29527 // <name>: a mark name
29528 TextMark* get_mark(AT0)(AT0 /*char*/ name) nothrow {
29529 return gtk_text_buffer_get_mark(&this, toCString!(char*)(name));
29532 // Indicates whether the buffer has been modified since the last call
29533 // to gtk_text_buffer_set_modified() set the modification flag to
29534 // %FALSE. Used for example to enable a "save" function in a text
29535 // editor.
29536 // RETURNS: %TRUE if the buffer has been modified
29537 int get_modified()() nothrow {
29538 return gtk_text_buffer_get_modified(&this);
29541 // VERSION: 2.10
29542 // This function returns the list of targets this text buffer supports
29543 // for pasting and as DND destination. The targets in the list are
29544 // added with %info values from the #GtkTextBufferTargetInfo enum,
29545 // using gtk_target_list_add_rich_text_targets() and
29546 // gtk_target_list_add_text_targets().
29547 // RETURNS: the #GtkTargetList
29548 TargetList* get_paste_target_list()() nothrow {
29549 return gtk_text_buffer_get_paste_target_list(&this);
29552 // Returns the mark that represents the selection bound. Equivalent
29553 // to calling gtk_text_buffer_get_mark() to get the mark named
29554 // "selection_bound", but very slightly more efficient, and involves
29555 // less typing.
29557 // The currently-selected text in @buffer is the region between the
29558 // "selection_bound" and "insert" marks. If "selection_bound" and
29559 // "insert" are in the same place, then there is no current selection.
29560 // gtk_text_buffer_get_selection_bounds() is another convenient function
29561 // for handling the selection, if you just want to know whether there's a
29562 // selection and what its bounds are.
29563 // RETURNS: selection bound mark
29564 TextMark* get_selection_bound()() nothrow {
29565 return gtk_text_buffer_get_selection_bound(&this);
29568 // Returns %TRUE if some text is selected; places the bounds
29569 // of the selection in @start and @end (if the selection has length 0,
29570 // then @start and @end are filled in with the same value).
29571 // @start and @end will be in ascending order. If @start and @end are
29572 // NULL, then they are not filled in, but the return value still indicates
29573 // whether text is selected.
29574 // RETURNS: whether the selection has nonzero length
29575 // <start>: iterator to initialize with selection start
29576 // <end>: iterator to initialize with selection end
29577 int get_selection_bounds(AT0, AT1)(/*out*/ AT0 /*TextIter*/ start, /*out*/ AT1 /*TextIter*/ end) nothrow {
29578 return gtk_text_buffer_get_selection_bounds(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29581 // VERSION: 2.10
29582 // This function returns the rich text serialize formats registered
29583 // with @buffer using gtk_text_buffer_register_serialize_format() or
29584 // gtk_text_buffer_register_serialize_tagset()
29586 // #GdkAtom<!-- -->s representing the registered formats.
29587 // RETURNS: an array of
29588 // <n_formats>: return location for the number of formats
29589 Gdk2.Atom* /*new container*/ get_serialize_formats()(/*out*/ int* n_formats) nothrow {
29590 return gtk_text_buffer_get_serialize_formats(&this, n_formats);
29593 // Returns the text in the range [@start,@end). Excludes undisplayed
29594 // text (text marked with tags that set the invisibility attribute) if
29595 // @include_hidden_chars is %FALSE. The returned string includes a
29596 // 0xFFFC character whenever the buffer contains
29597 // embedded images, so byte and character indexes into
29598 // the returned string <emphasis>do</emphasis> correspond to byte
29599 // and character indexes into the buffer. Contrast with
29600 // gtk_text_buffer_get_text(). Note that 0xFFFC can occur in normal
29601 // text as well, so it is not a reliable indicator that a pixbuf or
29602 // widget is in the buffer.
29603 // RETURNS: an allocated UTF-8 string
29604 // <start>: start of a range
29605 // <end>: end of a range
29606 // <include_hidden_chars>: whether to include invisible text
29607 char* /*new*/ get_slice(AT0, AT1)(AT0 /*TextIter*/ start, AT1 /*TextIter*/ end, int include_hidden_chars) nothrow {
29608 return gtk_text_buffer_get_slice(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end), include_hidden_chars);
29611 // Initialized @iter with the first position in the text buffer. This
29612 // is the same as using gtk_text_buffer_get_iter_at_offset() to get
29613 // the iter at character offset 0.
29614 // <iter>: iterator to initialize
29615 void get_start_iter(AT0)(/*out*/ AT0 /*TextIter*/ iter) nothrow {
29616 gtk_text_buffer_get_start_iter(&this, UpCast!(TextIter*)(iter));
29619 // Get the #GtkTextTagTable associated with this buffer.
29620 // RETURNS: the buffer's tag table
29621 TextTagTable* get_tag_table()() nothrow {
29622 return gtk_text_buffer_get_tag_table(&this);
29625 // Returns the text in the range [@start,@end). Excludes undisplayed
29626 // text (text marked with tags that set the invisibility attribute) if
29627 // @include_hidden_chars is %FALSE. Does not include characters
29628 // representing embedded images, so byte and character indexes into
29629 // the returned string do <emphasis>not</emphasis> correspond to byte
29630 // and character indexes into the buffer. Contrast with
29631 // gtk_text_buffer_get_slice().
29632 // RETURNS: an allocated UTF-8 string
29633 // <start>: start of a range
29634 // <end>: end of a range
29635 // <include_hidden_chars>: whether to include invisible text
29636 char* /*new*/ get_text(AT0, AT1)(AT0 /*TextIter*/ start, AT1 /*TextIter*/ end, int include_hidden_chars) nothrow {
29637 return gtk_text_buffer_get_text(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end), include_hidden_chars);
29640 // Inserts @len bytes of @text at position @iter. If @len is -1,
29641 // @text must be nul-terminated and will be inserted in its
29642 // entirety. Emits the "insert-text" signal; insertion actually occurs
29643 // in the default handler for the signal. @iter is invalidated when
29644 // insertion occurs (because the buffer contents change), but the
29645 // default signal handler revalidates it to point to the end of the
29646 // inserted text.
29647 // <iter>: a position in the buffer
29648 // <text>: text in UTF-8 format
29649 // <len>: length of text in bytes, or -1
29650 void insert(AT0, AT1)(AT0 /*TextIter*/ iter, AT1 /*char*/ text, int len) nothrow {
29651 gtk_text_buffer_insert(&this, UpCast!(TextIter*)(iter), toCString!(char*)(text), len);
29654 // Simply calls gtk_text_buffer_insert(), using the current
29655 // cursor position as the insertion point.
29656 // <text>: text in UTF-8 format
29657 // <len>: length of text, in bytes
29658 void insert_at_cursor(AT0)(AT0 /*char*/ text, int len) nothrow {
29659 gtk_text_buffer_insert_at_cursor(&this, toCString!(char*)(text), len);
29662 // Inserts a child widget anchor into the text buffer at @iter. The
29663 // anchor will be counted as one character in character counts, and
29664 // when obtaining the buffer contents as a string, will be represented
29665 // by the Unicode "object replacement character" 0xFFFC. Note that the
29666 // "slice" variants for obtaining portions of the buffer as a string
29667 // include this character for child anchors, but the "text" variants do
29668 // not. E.g. see gtk_text_buffer_get_slice() and
29669 // gtk_text_buffer_get_text(). Consider
29670 // gtk_text_buffer_create_child_anchor() as a more convenient
29671 // alternative to this function. The buffer will add a reference to
29672 // the anchor, so you can unref it after insertion.
29673 // <iter>: location to insert the anchor
29674 // <anchor>: a #GtkTextChildAnchor
29675 void insert_child_anchor(AT0, AT1)(AT0 /*TextIter*/ iter, AT1 /*TextChildAnchor*/ anchor) nothrow {
29676 gtk_text_buffer_insert_child_anchor(&this, UpCast!(TextIter*)(iter), UpCast!(TextChildAnchor*)(anchor));
29679 // Like gtk_text_buffer_insert(), but the insertion will not occur if
29680 // @iter is at a non-editable location in the buffer. Usually you
29681 // want to prevent insertions at ineditable locations if the insertion
29682 // results from a user action (is interactive).
29684 // @default_editable indicates the editability of text that doesn't
29685 // have a tag affecting editability applied to it. Typically the
29686 // result of gtk_text_view_get_editable() is appropriate here.
29687 // RETURNS: whether text was actually inserted
29688 // <iter>: a position in @buffer
29689 // <text>: some UTF-8 text
29690 // <len>: length of text in bytes, or -1
29691 // <default_editable>: default editability of buffer
29692 int insert_interactive(AT0, AT1)(AT0 /*TextIter*/ iter, AT1 /*char*/ text, int len, int default_editable) nothrow {
29693 return gtk_text_buffer_insert_interactive(&this, UpCast!(TextIter*)(iter), toCString!(char*)(text), len, default_editable);
29696 // Calls gtk_text_buffer_insert_interactive() at the cursor
29697 // position.
29699 // @default_editable indicates the editability of text that doesn't
29700 // have a tag affecting editability applied to it. Typically the
29701 // result of gtk_text_view_get_editable() is appropriate here.
29702 // RETURNS: whether text was actually inserted
29703 // <text>: text in UTF-8 format
29704 // <len>: length of text in bytes, or -1
29705 // <default_editable>: default editability of buffer
29706 int insert_interactive_at_cursor(AT0)(AT0 /*char*/ text, int len, int default_editable) nothrow {
29707 return gtk_text_buffer_insert_interactive_at_cursor(&this, toCString!(char*)(text), len, default_editable);
29710 // Inserts an image into the text buffer at @iter. The image will be
29711 // counted as one character in character counts, and when obtaining
29712 // the buffer contents as a string, will be represented by the Unicode
29713 // "object replacement character" 0xFFFC. Note that the "slice"
29714 // variants for obtaining portions of the buffer as a string include
29715 // this character for pixbufs, but the "text" variants do
29716 // not. e.g. see gtk_text_buffer_get_slice() and
29717 // gtk_text_buffer_get_text().
29718 // <iter>: location to insert the pixbuf
29719 // <pixbuf>: a #GdkPixbuf
29720 void insert_pixbuf(AT0, AT1)(AT0 /*TextIter*/ iter, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
29721 gtk_text_buffer_insert_pixbuf(&this, UpCast!(TextIter*)(iter), UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
29724 // Copies text, tags, and pixbufs between @start and @end (the order
29725 // of @start and @end doesn't matter) and inserts the copy at @iter.
29726 // Used instead of simply getting/inserting text because it preserves
29727 // images and tags. If @start and @end are in a different buffer from
29728 // @buffer, the two buffers must share the same tag table.
29730 // Implemented via emissions of the insert_text and apply_tag signals,
29731 // so expect those.
29732 // <iter>: a position in @buffer
29733 // <start>: a position in a #GtkTextBuffer
29734 // <end>: another position in the same buffer as @start
29735 void insert_range(AT0, AT1, AT2)(AT0 /*TextIter*/ iter, AT1 /*TextIter*/ start, AT2 /*TextIter*/ end) nothrow {
29736 gtk_text_buffer_insert_range(&this, UpCast!(TextIter*)(iter), UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29739 // Same as gtk_text_buffer_insert_range(), but does nothing if the
29740 // insertion point isn't editable. The @default_editable parameter
29741 // indicates whether the text is editable at @iter if no tags
29742 // enclosing @iter affect editability. Typically the result of
29743 // gtk_text_view_get_editable() is appropriate here.
29744 // RETURNS: whether an insertion was possible at @iter
29745 // <iter>: a position in @buffer
29746 // <start>: a position in a #GtkTextBuffer
29747 // <end>: another position in the same buffer as @start
29748 // <default_editable>: default editability of the buffer
29749 int insert_range_interactive(AT0, AT1, AT2)(AT0 /*TextIter*/ iter, AT1 /*TextIter*/ start, AT2 /*TextIter*/ end, int default_editable) nothrow {
29750 return gtk_text_buffer_insert_range_interactive(&this, UpCast!(TextIter*)(iter), UpCast!(TextIter*)(start), UpCast!(TextIter*)(end), default_editable);
29753 // Unintrospectable method: insert_with_tags() / gtk_text_buffer_insert_with_tags()
29754 // Inserts @text into @buffer at @iter, applying the list of tags to
29755 // the newly-inserted text. The last tag specified must be NULL to
29756 // terminate the list. Equivalent to calling gtk_text_buffer_insert(),
29757 // then gtk_text_buffer_apply_tag() on the inserted text;
29758 // gtk_text_buffer_insert_with_tags() is just a convenience function.
29759 // <iter>: an iterator in @buffer
29760 // <text>: UTF-8 text
29761 // <len>: length of @text, or -1
29762 // <first_tag>: first tag to apply to @text
29763 /+ Not available -- variadic methods unsupported - use the C function directly.
29764 alias gtk_text_buffer_insert_with_tags insert_with_tags; // Variadic
29767 // Unintrospectable method: insert_with_tags_by_name() / gtk_text_buffer_insert_with_tags_by_name()
29768 // Same as gtk_text_buffer_insert_with_tags(), but allows you
29769 // to pass in tag names instead of tag objects.
29770 // <iter>: position in @buffer
29771 // <text>: UTF-8 text
29772 // <len>: length of @text, or -1
29773 // <first_tag_name>: name of a tag to apply to @text
29774 /+ Not available -- variadic methods unsupported - use the C function directly.
29775 alias gtk_text_buffer_insert_with_tags_by_name insert_with_tags_by_name; // Variadic
29778 // Moves @mark to the new location @where. Emits the "mark-set" signal
29779 // as notification of the move.
29780 // <mark>: a #GtkTextMark
29781 // <where>: new location for @mark in @buffer
29782 void move_mark(AT0, AT1)(AT0 /*TextMark*/ mark, AT1 /*TextIter*/ where) nothrow {
29783 gtk_text_buffer_move_mark(&this, UpCast!(TextMark*)(mark), UpCast!(TextIter*)(where));
29786 // Moves the mark named @name (which must exist) to location @where.
29787 // See gtk_text_buffer_move_mark() for details.
29788 // <name>: name of a mark
29789 // <where>: new location for mark
29790 void move_mark_by_name(AT0, AT1)(AT0 /*char*/ name, AT1 /*TextIter*/ where) nothrow {
29791 gtk_text_buffer_move_mark_by_name(&this, toCString!(char*)(name), UpCast!(TextIter*)(where));
29794 // Pastes the contents of a clipboard at the insertion point, or
29795 // at @override_location. (Note: pasting is asynchronous, that is,
29796 // we'll ask for the paste data and return, and at some point later
29797 // after the main loop runs, the paste data will be inserted.)
29798 // <clipboard>: the #GtkClipboard to paste from
29799 // <override_location>: location to insert pasted text, or %NULL for at the cursor
29800 // <default_editable>: whether the buffer is editable by default
29801 void paste_clipboard(AT0, AT1)(AT0 /*Clipboard*/ clipboard, AT1 /*TextIter*/ override_location, int default_editable) nothrow {
29802 gtk_text_buffer_paste_clipboard(&this, UpCast!(Clipboard*)(clipboard), UpCast!(TextIter*)(override_location), default_editable);
29805 // This function moves the "insert" and "selection_bound" marks
29806 // simultaneously. If you move them to the same place in two steps
29807 // with gtk_text_buffer_move_mark(), you will temporarily select a
29808 // region in between their old and new locations, which can be pretty
29809 // inefficient since the temporarily-selected region will force stuff
29810 // to be recalculated. This function moves them as a unit, which can
29811 // be optimized.
29812 // <where>: where to put the cursor
29813 void place_cursor(AT0)(AT0 /*TextIter*/ where) nothrow {
29814 gtk_text_buffer_place_cursor(&this, UpCast!(TextIter*)(where));
29817 // VERSION: 2.10
29818 // This function registers a rich text deserialization @function along with
29819 // its @mime_type with the passed @buffer.
29821 // newly registered format's mime-type.
29822 // RETURNS: the #GdkAtom that corresponds to the
29823 // <mime_type>: the format's mime-type
29824 // <function>: the deserialize function to register
29825 // <user_data>: @function's user_data
29826 // <user_data_destroy>: a function to call when @user_data is no longer needed
29827 Gdk2.Atom register_deserialize_format(AT0, AT1)(AT0 /*char*/ mime_type, TextBufferDeserializeFunc function_, AT1 /*void*/ user_data, GLib2.DestroyNotify user_data_destroy) nothrow {
29828 return gtk_text_buffer_register_deserialize_format(&this, toCString!(char*)(mime_type), function_, UpCast!(void*)(user_data), user_data_destroy);
29831 // VERSION: 2.10
29832 // This function registers GTK+'s internal rich text serialization
29833 // format with the passed @buffer. See
29834 // gtk_text_buffer_register_serialize_tagset() for details.
29836 // newly registered format's mime-type.
29837 // RETURNS: the #GdkAtom that corresponds to the
29838 // <tagset_name>: an optional tagset name, on %NULL
29839 Gdk2.Atom register_deserialize_tagset(AT0)(AT0 /*char*/ tagset_name=null) nothrow {
29840 return gtk_text_buffer_register_deserialize_tagset(&this, toCString!(char*)(tagset_name));
29843 // VERSION: 2.10
29844 // This function registers a rich text serialization @function along with
29845 // its @mime_type with the passed @buffer.
29847 // newly registered format's mime-type.
29848 // RETURNS: the #GdkAtom that corresponds to the
29849 // <mime_type>: the format's mime-type
29850 // <function>: the serialize function to register
29851 // <user_data>: %function's user_data
29852 // <user_data_destroy>: a function to call when @user_data is no longer needed
29853 Gdk2.Atom register_serialize_format(AT0, AT1)(AT0 /*char*/ mime_type, TextBufferSerializeFunc function_, AT1 /*void*/ user_data, GLib2.DestroyNotify user_data_destroy) nothrow {
29854 return gtk_text_buffer_register_serialize_format(&this, toCString!(char*)(mime_type), function_, UpCast!(void*)(user_data), user_data_destroy);
29857 // VERSION: 2.10
29858 // This function registers GTK+'s internal rich text serialization
29859 // format with the passed @buffer. The internal format does not comply
29860 // to any standard rich text format and only works between #GtkTextBuffer
29861 // instances. It is capable of serializing all of a text buffer's tags
29862 // and embedded pixbufs.
29864 // This function is just a wrapper around
29865 // gtk_text_buffer_register_serialize_format(). The mime type used
29866 // for registering is "application/x-gtk-text-buffer-rich-text", or
29867 // "application/x-gtk-text-buffer-rich-text;format=@tagset_name" if a
29868 // @tagset_name was passed.
29870 // The @tagset_name can be used to restrict the transfer of rich text
29871 // to buffers with compatible sets of tags, in order to avoid unknown
29872 // tags from being pasted. It is probably the common case to pass an
29873 // identifier != %NULL here, since the %NULL tagset requires the
29874 // receiving buffer to deal with with pasting of arbitrary tags.
29876 // newly registered format's mime-type.
29877 // RETURNS: the #GdkAtom that corresponds to the
29878 // <tagset_name>: an optional tagset name, on %NULL
29879 Gdk2.Atom register_serialize_tagset(AT0)(AT0 /*char*/ tagset_name=null) nothrow {
29880 return gtk_text_buffer_register_serialize_tagset(&this, toCString!(char*)(tagset_name));
29883 // Removes all tags in the range between @start and @end. Be careful
29884 // with this function; it could remove tags added in code unrelated to
29885 // the code you're currently writing. That is, using this function is
29886 // probably a bad idea if you have two or more unrelated code sections
29887 // that add tags.
29888 // <start>: one bound of range to be untagged
29889 // <end>: other bound of range to be untagged
29890 void remove_all_tags(AT0, AT1)(AT0 /*TextIter*/ start, AT1 /*TextIter*/ end) nothrow {
29891 gtk_text_buffer_remove_all_tags(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29894 // Removes a #GtkClipboard added with
29895 // gtk_text_buffer_add_selection_clipboard().
29896 // <clipboard>: a #GtkClipboard added to @buffer by gtk_text_buffer_add_selection_clipboard()
29897 void remove_selection_clipboard(AT0)(AT0 /*Clipboard*/ clipboard) nothrow {
29898 gtk_text_buffer_remove_selection_clipboard(&this, UpCast!(Clipboard*)(clipboard));
29901 // Emits the "remove-tag" signal. The default handler for the signal
29902 // removes all occurrences of @tag from the given range. @start and
29903 // @end don't have to be in order.
29904 // <tag>: a #GtkTextTag
29905 // <start>: one bound of range to be untagged
29906 // <end>: other bound of range to be untagged
29907 void remove_tag(AT0, AT1, AT2)(AT0 /*TextTag*/ tag, AT1 /*TextIter*/ start, AT2 /*TextIter*/ end) nothrow {
29908 gtk_text_buffer_remove_tag(&this, UpCast!(TextTag*)(tag), UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29911 // Calls gtk_text_tag_table_lookup() on the buffer's tag table to
29912 // get a #GtkTextTag, then calls gtk_text_buffer_remove_tag().
29913 // <name>: name of a #GtkTextTag
29914 // <start>: one bound of range to be untagged
29915 // <end>: other bound of range to be untagged
29916 void remove_tag_by_name(AT0, AT1, AT2)(AT0 /*char*/ name, AT1 /*TextIter*/ start, AT2 /*TextIter*/ end) nothrow {
29917 gtk_text_buffer_remove_tag_by_name(&this, toCString!(char*)(name), UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
29920 // VERSION: 2.4
29921 // This function moves the "insert" and "selection_bound" marks
29922 // simultaneously. If you move them in two steps
29923 // with gtk_text_buffer_move_mark(), you will temporarily select a
29924 // region in between their old and new locations, which can be pretty
29925 // inefficient since the temporarily-selected region will force stuff
29926 // to be recalculated. This function moves them as a unit, which can
29927 // be optimized.
29928 // <ins>: where to put the "insert" mark
29929 // <bound>: where to put the "selection_bound" mark
29930 void select_range(AT0, AT1)(AT0 /*TextIter*/ ins, AT1 /*TextIter*/ bound) nothrow {
29931 gtk_text_buffer_select_range(&this, UpCast!(TextIter*)(ins), UpCast!(TextIter*)(bound));
29934 // VERSION: 2.10
29935 // This function serializes the portion of text between @start
29936 // and @end in the rich text format represented by @format.
29938 // @format<!-- -->s to be used must be registered using
29939 // gtk_text_buffer_register_serialize_format() or
29940 // gtk_text_buffer_register_serialize_tagset() beforehand.
29942 // data, encoded as @format
29943 // RETURNS: the serialized
29944 // <content_buffer>: the #GtkTextBuffer to serialize
29945 // <format>: the rich text format to use for serializing
29946 // <start>: start of block of text to serialize
29947 // <end>: end of block of test to serialize
29948 // <length>: return location for the length of the serialized data
29949 ubyte* /*new*/ serialize(AT0, AT1, AT2, AT3)(AT0 /*TextBuffer*/ content_buffer, Gdk2.Atom format, AT1 /*TextIter*/ start, AT2 /*TextIter*/ end, /*out*/ AT3 /*size_t*/ length) nothrow {
29950 return gtk_text_buffer_serialize(&this, UpCast!(TextBuffer*)(content_buffer), format, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end), UpCast!(size_t*)(length));
29953 // Used to keep track of whether the buffer has been modified since the
29954 // last time it was saved. Whenever the buffer is saved to disk, call
29955 // gtk_text_buffer_set_modified (@buffer, FALSE). When the buffer is modified,
29956 // it will automatically toggled on the modified bit again. When the modified
29957 // bit flips, the buffer emits a "modified-changed" signal.
29958 // <setting>: modification flag setting
29959 void set_modified()(int setting) nothrow {
29960 gtk_text_buffer_set_modified(&this, setting);
29963 // Deletes current contents of @buffer, and inserts @text instead. If
29964 // @len is -1, @text must be nul-terminated. @text must be valid UTF-8.
29965 // <text>: UTF-8 text to insert
29966 // <len>: length of @text in bytes
29967 void set_text(AT0)(AT0 /*char*/ text, int len) nothrow {
29968 gtk_text_buffer_set_text(&this, toCString!(char*)(text), len);
29971 // VERSION: 2.10
29972 // This function unregisters a rich text format that was previously
29973 // registered using gtk_text_buffer_register_deserialize_format() or
29974 // gtk_text_buffer_register_deserialize_tagset().
29975 // <format>: a #GdkAtom representing a registered rich text format.
29976 void unregister_deserialize_format()(Gdk2.Atom format) nothrow {
29977 gtk_text_buffer_unregister_deserialize_format(&this, format);
29980 // VERSION: 2.10
29981 // This function unregisters a rich text format that was previously
29982 // registered using gtk_text_buffer_register_serialize_format() or
29983 // gtk_text_buffer_register_serialize_tagset()
29984 // <format>: a #GdkAtom representing a registered rich text format.
29985 void unregister_serialize_format()(Gdk2.Atom format) nothrow {
29986 gtk_text_buffer_unregister_serialize_format(&this, format);
29989 // The ::apply-tag signal is emitted to apply a tag to a
29990 // range of text in a #GtkTextBuffer.
29991 // Applying actually occurs in the default handler.
29993 // Note that if your handler runs before the default handler it must not
29994 // invalidate the @start and @end iters (or has to revalidate them).
29996 // See also:
29997 // gtk_text_buffer_apply_tag(),
29998 // gtk_text_buffer_insert_with_tags(),
29999 // gtk_text_buffer_insert_range().
30000 // <tag>: the applied tag
30001 // <start>: the start of the range the tag is applied to
30002 // <end>: the end of the range the tag is applied to
30003 extern (C) alias static void function (TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end, void* user_data=null) nothrow signal_apply_tag;
30005 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30006 return super_.signal_connect!name(cb, data, cf);
30009 ulong signal_connect(string name:"apply-tag", CB/*:signal_apply_tag*/)
30010 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30011 if (is(typeof(cb)==signal_apply_tag)||_ttmm!(CB, signal_apply_tag)()) {
30012 return signal_connect_data!()(&this, cast(char*)"apply-tag",
30013 cast(GObject2.Callback)cb, data, null, cf);
30016 // The ::begin-user-action signal is emitted at the beginning of a single
30017 // user-visible operation on a #GtkTextBuffer.
30019 // See also:
30020 // gtk_text_buffer_begin_user_action(),
30021 // gtk_text_buffer_insert_interactive(),
30022 // gtk_text_buffer_insert_range_interactive(),
30023 // gtk_text_buffer_delete_interactive(),
30024 // gtk_text_buffer_backspace(),
30025 // gtk_text_buffer_delete_selection().
30026 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) nothrow signal_begin_user_action;
30027 ulong signal_connect(string name:"begin-user-action", CB/*:signal_begin_user_action*/)
30028 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30029 if (is(typeof(cb)==signal_begin_user_action)||_ttmm!(CB, signal_begin_user_action)()) {
30030 return signal_connect_data!()(&this, cast(char*)"begin-user-action",
30031 cast(GObject2.Callback)cb, data, null, cf);
30034 // The ::changed signal is emitted when the content of a #GtkTextBuffer
30035 // has changed.
30036 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) nothrow signal_changed;
30037 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
30038 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30039 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
30040 return signal_connect_data!()(&this, cast(char*)"changed",
30041 cast(GObject2.Callback)cb, data, null, cf);
30044 // The ::delete-range signal is emitted to delete a range
30045 // from a #GtkTextBuffer.
30047 // Note that if your handler runs before the default handler it must not
30048 // invalidate the @start and @end iters (or has to revalidate them).
30049 // The default signal handler revalidates the @start and @end iters to
30050 // both point point to the location where text was deleted. Handlers
30051 // which run after the default handler (see g_signal_connect_after())
30052 // do not have access to the deleted text.
30054 // See also: gtk_text_buffer_delete().
30055 // <start>: the start of the range to be deleted
30056 // <end>: the end of the range to be deleted
30057 extern (C) alias static void function (TextBuffer* this_, TextIter* start, TextIter* end, void* user_data=null) nothrow signal_delete_range;
30058 ulong signal_connect(string name:"delete-range", CB/*:signal_delete_range*/)
30059 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30060 if (is(typeof(cb)==signal_delete_range)||_ttmm!(CB, signal_delete_range)()) {
30061 return signal_connect_data!()(&this, cast(char*)"delete-range",
30062 cast(GObject2.Callback)cb, data, null, cf);
30065 // The ::end-user-action signal is emitted at the end of a single
30066 // user-visible operation on the #GtkTextBuffer.
30068 // See also:
30069 // gtk_text_buffer_end_user_action(),
30070 // gtk_text_buffer_insert_interactive(),
30071 // gtk_text_buffer_insert_range_interactive(),
30072 // gtk_text_buffer_delete_interactive(),
30073 // gtk_text_buffer_backspace(),
30074 // gtk_text_buffer_delete_selection(),
30075 // gtk_text_buffer_backspace().
30076 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) nothrow signal_end_user_action;
30077 ulong signal_connect(string name:"end-user-action", CB/*:signal_end_user_action*/)
30078 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30079 if (is(typeof(cb)==signal_end_user_action)||_ttmm!(CB, signal_end_user_action)()) {
30080 return signal_connect_data!()(&this, cast(char*)"end-user-action",
30081 cast(GObject2.Callback)cb, data, null, cf);
30084 // The ::insert-child-anchor signal is emitted to insert a
30085 // #GtkTextChildAnchor in a #GtkTextBuffer.
30086 // Insertion actually occurs in the default handler.
30088 // Note that if your handler runs before the default handler it must
30089 // not invalidate the @location iter (or has to revalidate it).
30090 // The default signal handler revalidates it to be placed after the
30091 // inserted @anchor.
30093 // See also: gtk_text_buffer_insert_child_anchor().
30094 // <location>: position to insert @anchor in @textbuffer
30095 // <anchor>: the #GtkTextChildAnchor to be inserted
30096 extern (C) alias static void function (TextBuffer* this_, TextIter* location, TextChildAnchor* anchor, void* user_data=null) nothrow signal_insert_child_anchor;
30097 ulong signal_connect(string name:"insert-child-anchor", CB/*:signal_insert_child_anchor*/)
30098 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30099 if (is(typeof(cb)==signal_insert_child_anchor)||_ttmm!(CB, signal_insert_child_anchor)()) {
30100 return signal_connect_data!()(&this, cast(char*)"insert-child-anchor",
30101 cast(GObject2.Callback)cb, data, null, cf);
30104 // The ::insert-pixbuf signal is emitted to insert a #GdkPixbuf
30105 // in a #GtkTextBuffer. Insertion actually occurs in the default handler.
30107 // Note that if your handler runs before the default handler it must not
30108 // invalidate the @location iter (or has to revalidate it).
30109 // The default signal handler revalidates it to be placed after the
30110 // inserted @pixbuf.
30112 // See also: gtk_text_buffer_insert_pixbuf().
30113 // <location>: position to insert @pixbuf in @textbuffer
30114 // <pixbuf>: the #GdkPixbuf to be inserted
30115 extern (C) alias static void function (TextBuffer* this_, TextIter* location, GdkPixbuf2.Pixbuf* pixbuf, void* user_data=null) nothrow signal_insert_pixbuf;
30116 ulong signal_connect(string name:"insert-pixbuf", CB/*:signal_insert_pixbuf*/)
30117 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30118 if (is(typeof(cb)==signal_insert_pixbuf)||_ttmm!(CB, signal_insert_pixbuf)()) {
30119 return signal_connect_data!()(&this, cast(char*)"insert-pixbuf",
30120 cast(GObject2.Callback)cb, data, null, cf);
30123 // The ::insert-text signal is emitted to insert text in a #GtkTextBuffer.
30124 // Insertion actually occurs in the default handler.
30126 // Note that if your handler runs before the default handler it must not
30127 // invalidate the @location iter (or has to revalidate it).
30128 // The default signal handler revalidates it to point to the end of the
30129 // inserted text.
30131 // See also:
30132 // gtk_text_buffer_insert(),
30133 // gtk_text_buffer_insert_range().
30134 // <location>: position to insert @text in @textbuffer
30135 // <text>: the UTF-8 text to be inserted
30136 // <len>: length of the inserted text in bytes
30137 extern (C) alias static void function (TextBuffer* this_, TextIter* location, char* text, int len, void* user_data=null) nothrow signal_insert_text;
30138 ulong signal_connect(string name:"insert-text", CB/*:signal_insert_text*/)
30139 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30140 if (is(typeof(cb)==signal_insert_text)||_ttmm!(CB, signal_insert_text)()) {
30141 return signal_connect_data!()(&this, cast(char*)"insert-text",
30142 cast(GObject2.Callback)cb, data, null, cf);
30145 // The ::mark-deleted signal is emitted as notification
30146 // after a #GtkTextMark is deleted.
30148 // See also:
30149 // gtk_text_buffer_delete_mark().
30150 // <mark>: The mark that was deleted
30151 extern (C) alias static void function (TextBuffer* this_, TextMark* mark, void* user_data=null) nothrow signal_mark_deleted;
30152 ulong signal_connect(string name:"mark-deleted", CB/*:signal_mark_deleted*/)
30153 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30154 if (is(typeof(cb)==signal_mark_deleted)||_ttmm!(CB, signal_mark_deleted)()) {
30155 return signal_connect_data!()(&this, cast(char*)"mark-deleted",
30156 cast(GObject2.Callback)cb, data, null, cf);
30159 // The ::mark-set signal is emitted as notification
30160 // after a #GtkTextMark is set.
30162 // See also:
30163 // gtk_text_buffer_create_mark(),
30164 // gtk_text_buffer_move_mark().
30165 // <location>: The location of @mark in @textbuffer
30166 // <mark>: The mark that is set
30167 extern (C) alias static void function (TextBuffer* this_, TextIter* location, TextMark* mark, void* user_data=null) nothrow signal_mark_set;
30168 ulong signal_connect(string name:"mark-set", CB/*:signal_mark_set*/)
30169 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30170 if (is(typeof(cb)==signal_mark_set)||_ttmm!(CB, signal_mark_set)()) {
30171 return signal_connect_data!()(&this, cast(char*)"mark-set",
30172 cast(GObject2.Callback)cb, data, null, cf);
30175 // The ::modified-changed signal is emitted when the modified bit of a
30176 // #GtkTextBuffer flips.
30178 // See also:
30179 // gtk_text_buffer_set_modified().
30180 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) nothrow signal_modified_changed;
30181 ulong signal_connect(string name:"modified-changed", CB/*:signal_modified_changed*/)
30182 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30183 if (is(typeof(cb)==signal_modified_changed)||_ttmm!(CB, signal_modified_changed)()) {
30184 return signal_connect_data!()(&this, cast(char*)"modified-changed",
30185 cast(GObject2.Callback)cb, data, null, cf);
30188 // VERSION: 2.16
30189 // The paste-done signal is emitted after paste operation has been completed.
30190 // This is useful to properly scroll the view to the end of the pasted text.
30191 // See gtk_text_buffer_paste_clipboard() for more details.
30192 extern (C) alias static void function (TextBuffer* this_, Clipboard* since, void* user_data=null) nothrow signal_paste_done;
30193 ulong signal_connect(string name:"paste-done", CB/*:signal_paste_done*/)
30194 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30195 if (is(typeof(cb)==signal_paste_done)||_ttmm!(CB, signal_paste_done)()) {
30196 return signal_connect_data!()(&this, cast(char*)"paste-done",
30197 cast(GObject2.Callback)cb, data, null, cf);
30200 // The ::remove-tag signal is emitted to remove all occurrences of @tag from
30201 // a range of text in a #GtkTextBuffer.
30202 // Removal actually occurs in the default handler.
30204 // Note that if your handler runs before the default handler it must not
30205 // invalidate the @start and @end iters (or has to revalidate them).
30207 // See also:
30208 // gtk_text_buffer_remove_tag().
30209 // <tag>: the tag to be removed
30210 // <start>: the start of the range the tag is removed from
30211 // <end>: the end of the range the tag is removed from
30212 extern (C) alias static void function (TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end, void* user_data=null) nothrow signal_remove_tag;
30213 ulong signal_connect(string name:"remove-tag", CB/*:signal_remove_tag*/)
30214 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
30215 if (is(typeof(cb)==signal_remove_tag)||_ttmm!(CB, signal_remove_tag)()) {
30216 return signal_connect_data!()(&this, cast(char*)"remove-tag",
30217 cast(GObject2.Callback)cb, data, null, cf);
30221 struct TextBufferClass {
30222 GObject2.ObjectClass parent_class;
30223 extern (C) void function (TextBuffer* buffer, TextIter* pos, char* text, int length) nothrow insert_text;
30224 // <pixbuf>: a #GdkPixbuf
30225 extern (C) void function (TextBuffer* buffer, TextIter* pos, GdkPixbuf2.Pixbuf* pixbuf) nothrow insert_pixbuf;
30226 // <anchor>: a #GtkTextChildAnchor
30227 extern (C) void function (TextBuffer* buffer, TextIter* pos, TextChildAnchor* anchor) nothrow insert_child_anchor;
30228 extern (C) void function (TextBuffer* buffer, TextIter* start, TextIter* end) nothrow delete_range;
30229 extern (C) void function (TextBuffer* buffer) nothrow changed;
30230 extern (C) void function (TextBuffer* buffer) nothrow modified_changed;
30231 extern (C) void function (TextBuffer* buffer, TextIter* location, TextMark* mark) nothrow mark_set;
30232 extern (C) void function (TextBuffer* buffer, TextMark* mark) nothrow mark_deleted;
30233 // <tag>: a #GtkTextTag
30234 extern (C) void function (TextBuffer* buffer, TextTag* tag, TextIter* start_char, TextIter* end_char) nothrow apply_tag;
30235 // <tag>: a #GtkTextTag
30236 extern (C) void function (TextBuffer* buffer, TextTag* tag, TextIter* start_char, TextIter* end_char) nothrow remove_tag;
30237 extern (C) void function (TextBuffer* buffer) nothrow begin_user_action;
30238 extern (C) void function (TextBuffer* buffer) nothrow end_user_action;
30239 extern (C) void function (TextBuffer* buffer, Clipboard* clipboard) nothrow paste_done;
30240 extern (C) void function () nothrow _gtk_reserved1;
30241 extern (C) void function () nothrow _gtk_reserved2;
30242 extern (C) void function () nothrow _gtk_reserved3;
30243 extern (C) void function () nothrow _gtk_reserved4;
30244 extern (C) void function () nothrow _gtk_reserved5;
30247 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) nothrow TextBufferDeserializeFunc;
30249 extern (C) alias ubyte* function (TextBuffer* register_buffer, TextBuffer* content_buffer, TextIter* start, TextIter* end, size_t* length, void* user_data) nothrow TextBufferSerializeFunc;
30251 enum TextBufferTargetInfo {
30252 BUFFER_CONTENTS = -1,
30253 RICH_TEXT = -2,
30254 TEXT = -3
30256 extern (C) alias int function (dchar ch, void* user_data) nothrow TextCharPredicate;
30258 struct TextChildAnchor /* : GObject.Object */ {
30259 alias parent_instance this;
30260 alias parent_instance super_;
30261 alias parent_instance object;
30262 GObject2.Object parent_instance;
30263 void* segment;
30266 // Creates a new #GtkTextChildAnchor. Usually you would then insert
30267 // it into a #GtkTextBuffer with gtk_text_buffer_insert_child_anchor().
30268 // To perform the creation and insertion in one step, use the
30269 // convenience function gtk_text_buffer_create_child_anchor().
30270 // RETURNS: a new #GtkTextChildAnchor
30271 static TextChildAnchor* /*new*/ new_()() nothrow {
30272 return gtk_text_child_anchor_new();
30274 static auto opCall()() {
30275 return gtk_text_child_anchor_new();
30278 // Determines whether a child anchor has been deleted from
30279 // the buffer. Keep in mind that the child anchor will be
30280 // unreferenced when removed from the buffer, so you need to
30281 // hold your own reference (with g_object_ref()) if you plan
30282 // to use this function &mdash; otherwise all deleted child anchors
30283 // will also be finalized.
30284 // RETURNS: %TRUE if the child anchor has been deleted from its buffer
30285 int get_deleted()() nothrow {
30286 return gtk_text_child_anchor_get_deleted(&this);
30289 // Gets a list of all widgets anchored at this child anchor.
30290 // The returned list should be freed with g_list_free().
30291 // RETURNS: list of widgets anchored at @anchor
30292 GLib2.List* /*new container*/ get_widgets()() nothrow {
30293 return gtk_text_child_anchor_get_widgets(&this);
30295 void queue_resize(AT0)(AT0 /*TextLayout*/ layout) nothrow {
30296 gtk_text_child_anchor_queue_resize(&this, UpCast!(TextLayout*)(layout));
30298 void register_child(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*TextLayout*/ layout) nothrow {
30299 gtk_text_child_anchor_register_child(&this, UpCast!(Widget*)(child), UpCast!(TextLayout*)(layout));
30301 void unregister_child(AT0)(AT0 /*Widget*/ child) nothrow {
30302 gtk_text_child_anchor_unregister_child(&this, UpCast!(Widget*)(child));
30306 struct TextChildAnchorClass {
30307 GObject2.ObjectClass parent_class;
30308 extern (C) void function () nothrow _gtk_reserved1;
30309 extern (C) void function () nothrow _gtk_reserved2;
30310 extern (C) void function () nothrow _gtk_reserved3;
30311 extern (C) void function () nothrow _gtk_reserved4;
30314 struct TextCursorDisplay {
30315 int x, y, height;
30316 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
30317 uint, "is_strong", 1,
30318 uint, "is_weak", 1,
30319 uint, "__dummy32A", 30));
30322 enum TextDirection {
30323 NONE = 0,
30324 LTR = 1,
30325 RTL = 2
30327 extern (C) alias void function (OldEditable* editable, uint time_) nothrow TextFunction;
30329 struct TextIter {
30330 private void* dummy1, dummy2;
30331 private int dummy3, dummy4, dummy5, dummy6, dummy7, dummy8;
30332 private void* dummy9, dummy10;
30333 private int dummy11, dummy12, dummy13;
30334 private void* dummy14;
30337 // Moves backward by one character offset. Returns %TRUE if movement
30338 // was possible; if @iter was the first in the buffer (character
30339 // offset 0), gtk_text_iter_backward_char () returns %FALSE for convenience when
30340 // writing loops.
30341 // RETURNS: whether movement was possible
30342 int backward_char()() nothrow {
30343 return gtk_text_iter_backward_char(&this);
30346 // Moves @count characters backward, if possible (if @count would move
30347 // past the start or end of the buffer, moves to the start or end of
30348 // the buffer). The return value indicates whether the iterator moved
30349 // onto a dereferenceable position; if the iterator didn't move, or
30350 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
30351 // the function does nothing and returns %FALSE.
30352 // RETURNS: whether @iter moved and is dereferenceable
30353 // <count>: number of characters to move
30354 int backward_chars()(int count) nothrow {
30355 return gtk_text_iter_backward_chars(&this, count);
30358 // Like gtk_text_iter_forward_cursor_position(), but moves backward.
30359 // RETURNS: %TRUE if we moved
30360 int backward_cursor_position()() nothrow {
30361 return gtk_text_iter_backward_cursor_position(&this);
30364 // Moves up to @count cursor positions. See
30365 // gtk_text_iter_forward_cursor_position() for details.
30366 // RETURNS: %TRUE if we moved and the new position is dereferenceable
30367 // <count>: number of positions to move
30368 int backward_cursor_positions()(int count) nothrow {
30369 return gtk_text_iter_backward_cursor_positions(&this, count);
30372 // Same as gtk_text_iter_forward_find_char(), but goes backward from @iter.
30373 // RETURNS: whether a match was found
30374 // <pred>: function to be called on each character
30375 // <user_data>: user data for @pred
30376 // <limit>: search limit, or %NULL for none
30377 int backward_find_char(AT0, AT1)(TextCharPredicate pred, AT0 /*void*/ user_data, AT1 /*TextIter*/ limit=null) nothrow {
30378 return gtk_text_iter_backward_find_char(&this, pred, UpCast!(void*)(user_data), UpCast!(TextIter*)(limit));
30381 // Moves @iter to the start of the previous line. Returns %TRUE if
30382 // @iter could be moved; i.e. if @iter was at character offset 0, this
30383 // function returns %FALSE. Therefore if @iter was already on line 0,
30384 // but not at the start of the line, @iter is snapped to the start of
30385 // the line and the function returns %TRUE. (Note that this implies that
30386 // in a loop calling this function, the line number may not change on
30387 // every iteration, if your first iteration is on line 0.)
30388 // RETURNS: whether @iter moved
30389 int backward_line()() nothrow {
30390 return gtk_text_iter_backward_line(&this);
30393 // Moves @count lines backward, if possible (if @count would move
30394 // past the start or end of the buffer, moves to the start or end of
30395 // the buffer). The return value indicates whether the iterator moved
30396 // onto a dereferenceable position; if the iterator didn't move, or
30397 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
30398 // the function does nothing and returns %FALSE. If @count is negative,
30399 // moves forward by 0 - @count lines.
30400 // RETURNS: whether @iter moved and is dereferenceable
30401 // <count>: number of lines to move backward
30402 int backward_lines()(int count) nothrow {
30403 return gtk_text_iter_backward_lines(&this, count);
30406 // Same as gtk_text_iter_forward_search(), but moves backward.
30407 // RETURNS: whether a match was found
30408 // <str>: search string
30409 // <flags>: bitmask of flags affecting the search
30410 // <match_start>: return location for start of match, or %NULL
30411 // <match_end>: return location for end of match, or %NULL
30412 // <limit>: location of last possible @match_start, or %NULL for start of buffer
30413 int backward_search(AT0, AT1, AT2, AT3)(AT0 /*char*/ str, TextSearchFlags flags, /*out*/ AT1 /*TextIter*/ match_start=null, /*out*/ AT2 /*TextIter*/ match_end=null, AT3 /*TextIter*/ limit=null) nothrow {
30414 return gtk_text_iter_backward_search(&this, toCString!(char*)(str), flags, UpCast!(TextIter*)(match_start), UpCast!(TextIter*)(match_end), UpCast!(TextIter*)(limit));
30417 // Moves backward to the previous sentence start; if @iter is already at
30418 // the start of a sentence, moves backward to the next one. Sentence
30419 // boundaries are determined by Pango and should be correct for nearly
30420 // any language (if not, the correct fix would be to the Pango text
30421 // boundary algorithms).
30422 // RETURNS: %TRUE if @iter moved and is not the end iterator
30423 int backward_sentence_start()() nothrow {
30424 return gtk_text_iter_backward_sentence_start(&this);
30427 // Calls gtk_text_iter_backward_sentence_start() up to @count times,
30428 // or until it returns %FALSE. If @count is negative, moves forward
30429 // instead of backward.
30430 // RETURNS: %TRUE if @iter moved and is not the end iterator
30431 // <count>: number of sentences to move
30432 int backward_sentence_starts()(int count) nothrow {
30433 return gtk_text_iter_backward_sentence_starts(&this, count);
30436 // Moves backward to the next toggle (on or off) of the
30437 // #GtkTextTag @tag, or to the next toggle of any tag if
30438 // @tag is %NULL. If no matching tag toggles are found,
30439 // returns %FALSE, otherwise %TRUE. Does not return toggles
30440 // located at @iter, only toggles before @iter. Sets @iter
30441 // to the location of the toggle, or the start of the buffer
30442 // if no toggle is found.
30443 // RETURNS: whether we found a tag toggle before @iter
30444 // <tag>: a #GtkTextTag, or %NULL
30445 int backward_to_tag_toggle(AT0)(AT0 /*TextTag*/ tag=null) nothrow {
30446 return gtk_text_iter_backward_to_tag_toggle(&this, UpCast!(TextTag*)(tag));
30449 // VERSION: 2.4
30450 // Moves @iter forward to the previous visible cursor position. See
30451 // gtk_text_iter_backward_cursor_position() for details.
30452 // RETURNS: %TRUE if we moved and the new position is dereferenceable
30453 int backward_visible_cursor_position()() nothrow {
30454 return gtk_text_iter_backward_visible_cursor_position(&this);
30457 // VERSION: 2.4
30458 // Moves up to @count visible cursor positions. See
30459 // gtk_text_iter_backward_cursor_position() for details.
30460 // RETURNS: %TRUE if we moved and the new position is dereferenceable
30461 // <count>: number of positions to move
30462 int backward_visible_cursor_positions()(int count) nothrow {
30463 return gtk_text_iter_backward_visible_cursor_positions(&this, count);
30466 // VERSION: 2.8
30467 // Moves @iter to the start of the previous visible line. Returns %TRUE if
30468 // @iter could be moved; i.e. if @iter was at character offset 0, this
30469 // function returns %FALSE. Therefore if @iter was already on line 0,
30470 // but not at the start of the line, @iter is snapped to the start of
30471 // the line and the function returns %TRUE. (Note that this implies that
30472 // in a loop calling this function, the line number may not change on
30473 // every iteration, if your first iteration is on line 0.)
30474 // RETURNS: whether @iter moved
30475 int backward_visible_line()() nothrow {
30476 return gtk_text_iter_backward_visible_line(&this);
30479 // VERSION: 2.8
30480 // Moves @count visible lines backward, if possible (if @count would move
30481 // past the start or end of the buffer, moves to the start or end of
30482 // the buffer). The return value indicates whether the iterator moved
30483 // onto a dereferenceable position; if the iterator didn't move, or
30484 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
30485 // the function does nothing and returns %FALSE. If @count is negative,
30486 // moves forward by 0 - @count lines.
30487 // RETURNS: whether @iter moved and is dereferenceable
30488 // <count>: number of lines to move backward
30489 int backward_visible_lines()(int count) nothrow {
30490 return gtk_text_iter_backward_visible_lines(&this, count);
30493 // VERSION: 2.4
30494 // Moves backward to the previous visible word start. (If @iter is currently
30495 // on a word start, moves backward to the next one after that.) Word breaks
30496 // are determined by Pango and should be correct for nearly any
30497 // language (if not, the correct fix would be to the Pango word break
30498 // algorithms).
30499 // RETURNS: %TRUE if @iter moved and is not the end iterator
30500 int backward_visible_word_start()() nothrow {
30501 return gtk_text_iter_backward_visible_word_start(&this);
30504 // VERSION: 2.4
30505 // Calls gtk_text_iter_backward_visible_word_start() up to @count times.
30506 // RETURNS: %TRUE if @iter moved and is not the end iterator
30507 // <count>: number of times to move
30508 int backward_visible_word_starts()(int count) nothrow {
30509 return gtk_text_iter_backward_visible_word_starts(&this, count);
30512 // Moves backward to the previous word start. (If @iter is currently on a
30513 // word start, moves backward to the next one after that.) Word breaks
30514 // are determined by Pango and should be correct for nearly any
30515 // language (if not, the correct fix would be to the Pango word break
30516 // algorithms).
30517 // RETURNS: %TRUE if @iter moved and is not the end iterator
30518 int backward_word_start()() nothrow {
30519 return gtk_text_iter_backward_word_start(&this);
30522 // Calls gtk_text_iter_backward_word_start() up to @count times.
30523 // RETURNS: %TRUE if @iter moved and is not the end iterator
30524 // <count>: number of times to move
30525 int backward_word_starts()(int count) nothrow {
30526 return gtk_text_iter_backward_word_starts(&this, count);
30529 // Returns %TRUE if @tag is toggled on at exactly this point. If @tag
30530 // is %NULL, returns %TRUE if any tag is toggled on at this point. Note
30531 // that the gtk_text_iter_begins_tag () returns %TRUE if @iter is the
30532 // <emphasis>start</emphasis> of the tagged range;
30533 // gtk_text_iter_has_tag () tells you whether an iterator is
30534 // <emphasis>within</emphasis> a tagged range.
30535 // RETURNS: whether @iter is the start of a range tagged with @tag
30536 // <tag>: a #GtkTextTag, or %NULL
30537 int begins_tag(AT0)(AT0 /*TextTag*/ tag=null) nothrow {
30538 return gtk_text_iter_begins_tag(&this, UpCast!(TextTag*)(tag));
30541 // Considering the default editability of the buffer, and tags that
30542 // affect editability, determines whether text inserted at @iter would
30543 // be editable. If text inserted at @iter would be editable then the
30544 // user should be allowed to insert text at @iter.
30545 // gtk_text_buffer_insert_interactive() uses this function to decide
30546 // whether insertions are allowed at a given position.
30547 // RETURNS: whether text inserted at @iter would be editable
30548 // <default_editability>: %TRUE if text is editable by default
30549 int can_insert()(int default_editability) nothrow {
30550 return gtk_text_iter_can_insert(&this, default_editability);
30553 // A qsort()-style function that returns negative if @lhs is less than
30554 // @rhs, positive if @lhs is greater than @rhs, and 0 if they're equal.
30555 // Ordering is in character offset order, i.e. the first character in the buffer
30556 // is less than the second character in the buffer.
30557 // RETURNS: -1 if @lhs is less than @rhs, 1 if @lhs is greater, 0 if they are equal
30558 // <rhs>: another #GtkTextIter
30559 int compare(AT0)(AT0 /*TextIter*/ rhs) nothrow {
30560 return gtk_text_iter_compare(&this, UpCast!(TextIter*)(rhs));
30563 // Creates a dynamically-allocated copy of an iterator. This function
30564 // is not useful in applications, because iterators can be copied with a
30565 // simple assignment (<literal>GtkTextIter i = j;</literal>). The
30566 // function is used by language bindings.
30567 // RETURNS: a copy of the @iter, free with gtk_text_iter_free ()
30568 TextIter* /*new*/ copy()() nothrow {
30569 return gtk_text_iter_copy(&this);
30572 // Returns whether the character at @iter is within an editable region
30573 // of text. Non-editable text is "locked" and can't be changed by the
30574 // user via #GtkTextView. This function is simply a convenience
30575 // wrapper around gtk_text_iter_get_attributes (). If no tags applied
30576 // to this text affect editability, @default_setting will be returned.
30578 // You don't want to use this function to decide whether text can be
30579 // inserted at @iter, because for insertion you don't want to know
30580 // whether the char at @iter is inside an editable range, you want to
30581 // know whether a new character inserted at @iter would be inside an
30582 // editable range. Use gtk_text_iter_can_insert() to handle this
30583 // case.
30584 // RETURNS: whether @iter is inside an editable range
30585 // <default_setting>: %TRUE if text is editable by default
30586 int editable()(int default_setting) nothrow {
30587 return gtk_text_iter_editable(&this, default_setting);
30590 // Returns %TRUE if @iter points to the start of the paragraph
30591 // delimiter characters for a line (delimiters will be either a
30592 // newline, a carriage return, a carriage return followed by a
30593 // newline, or a Unicode paragraph separator character). Note that an
30594 // iterator pointing to the \n of a \r\n pair will not be counted as
30595 // the end of a line, the line ends before the \r. The end iterator is
30596 // considered to be at the end of a line, even though there are no
30597 // paragraph delimiter chars there.
30598 // RETURNS: whether @iter is at the end of a line
30599 int ends_line()() nothrow {
30600 return gtk_text_iter_ends_line(&this);
30603 // Determines whether @iter ends a sentence. Sentence boundaries are
30604 // determined by Pango and should be correct for nearly any language
30605 // (if not, the correct fix would be to the Pango text boundary
30606 // algorithms).
30607 // RETURNS: %TRUE if @iter is at the end of a sentence.
30608 int ends_sentence()() nothrow {
30609 return gtk_text_iter_ends_sentence(&this);
30612 // Returns %TRUE if @tag is toggled off at exactly this point. If @tag
30613 // is %NULL, returns %TRUE if any tag is toggled off at this point. Note
30614 // that the gtk_text_iter_ends_tag () returns %TRUE if @iter is the
30615 // <emphasis>end</emphasis> of the tagged range;
30616 // gtk_text_iter_has_tag () tells you whether an iterator is
30617 // <emphasis>within</emphasis> a tagged range.
30618 // RETURNS: whether @iter is the end of a range tagged with @tag
30619 // <tag>: a #GtkTextTag, or %NULL
30620 int ends_tag(AT0)(AT0 /*TextTag*/ tag=null) nothrow {
30621 return gtk_text_iter_ends_tag(&this, UpCast!(TextTag*)(tag));
30624 // Determines whether @iter ends a natural-language word. Word breaks
30625 // are determined by Pango and should be correct for nearly any
30626 // language (if not, the correct fix would be to the Pango word break
30627 // algorithms).
30628 // RETURNS: %TRUE if @iter is at the end of a word
30629 int ends_word()() nothrow {
30630 return gtk_text_iter_ends_word(&this);
30633 // Tests whether two iterators are equal, using the fastest possible
30634 // mechanism. This function is very fast; you can expect it to perform
30635 // better than e.g. getting the character offset for each iterator and
30636 // comparing the offsets yourself. Also, it's a bit faster than
30637 // gtk_text_iter_compare().
30638 // RETURNS: %TRUE if the iterators point to the same place in the buffer
30639 // <rhs>: another #GtkTextIter
30640 int equal(AT0)(AT0 /*TextIter*/ rhs) nothrow {
30641 return gtk_text_iter_equal(&this, UpCast!(TextIter*)(rhs));
30644 // Moves @iter forward by one character offset. Note that images
30645 // embedded in the buffer occupy 1 character slot, so
30646 // gtk_text_iter_forward_char () may actually move onto an image instead
30647 // of a character, if you have images in your buffer. If @iter is the
30648 // end iterator or one character before it, @iter will now point at
30649 // the end iterator, and gtk_text_iter_forward_char () returns %FALSE for
30650 // convenience when writing loops.
30651 // RETURNS: whether @iter moved and is dereferenceable
30652 int forward_char()() nothrow {
30653 return gtk_text_iter_forward_char(&this);
30656 // Moves @count characters if possible (if @count would move past the
30657 // start or end of the buffer, moves to the start or end of the
30658 // buffer). The return value indicates whether the new position of
30659 // @iter is different from its original position, and dereferenceable
30660 // (the last iterator in the buffer is not dereferenceable). If @count
30661 // is 0, the function does nothing and returns %FALSE.
30662 // RETURNS: whether @iter moved and is dereferenceable
30663 // <count>: number of characters to move, may be negative
30664 int forward_chars()(int count) nothrow {
30665 return gtk_text_iter_forward_chars(&this, count);
30668 // Moves @iter forward by a single cursor position. Cursor positions
30669 // are (unsurprisingly) positions where the cursor can appear. Perhaps
30670 // surprisingly, there may not be a cursor position between all
30671 // characters. The most common example for European languages would be
30672 // a carriage return/newline sequence. For some Unicode characters,
30673 // the equivalent of say the letter "a" with an accent mark will be
30674 // represented as two characters, first the letter then a "combining
30675 // mark" that causes the accent to be rendered; so the cursor can't go
30676 // between those two characters. See also the #PangoLogAttr structure and
30677 // pango_break() function.
30678 // RETURNS: %TRUE if we moved and the new position is dereferenceable
30679 int forward_cursor_position()() nothrow {
30680 return gtk_text_iter_forward_cursor_position(&this);
30683 // Moves up to @count cursor positions. See
30684 // gtk_text_iter_forward_cursor_position() for details.
30685 // RETURNS: %TRUE if we moved and the new position is dereferenceable
30686 // <count>: number of positions to move
30687 int forward_cursor_positions()(int count) nothrow {
30688 return gtk_text_iter_forward_cursor_positions(&this, count);
30691 // Advances @iter, calling @pred on each character. If
30692 // @pred returns %TRUE, returns %TRUE and stops scanning.
30693 // If @pred never returns %TRUE, @iter is set to @limit if
30694 // @limit is non-%NULL, otherwise to the end iterator.
30695 // RETURNS: whether a match was found
30696 // <pred>: a function to be called on each character
30697 // <user_data>: user data for @pred
30698 // <limit>: search limit, or %NULL for none
30699 int forward_find_char(AT0, AT1)(TextCharPredicate pred, AT0 /*void*/ user_data, AT1 /*TextIter*/ limit=null) nothrow {
30700 return gtk_text_iter_forward_find_char(&this, pred, UpCast!(void*)(user_data), UpCast!(TextIter*)(limit));
30703 // Moves @iter to the start of the next line. If the iter is already on the
30704 // last line of the buffer, moves the iter to the end of the current line.
30705 // If after the operation, the iter is at the end of the buffer and not
30706 // dereferencable, returns %FALSE. Otherwise, returns %TRUE.
30707 // RETURNS: whether @iter can be dereferenced
30708 int forward_line()() nothrow {
30709 return gtk_text_iter_forward_line(&this);
30712 // Moves @count lines forward, if possible (if @count would move
30713 // past the start or end of the buffer, moves to the start or end of
30714 // the buffer). The return value indicates whether the iterator moved
30715 // onto a dereferenceable position; if the iterator didn't move, or
30716 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
30717 // the function does nothing and returns %FALSE. If @count is negative,
30718 // moves backward by 0 - @count lines.
30719 // RETURNS: whether @iter moved and is dereferenceable
30720 // <count>: number of lines to move forward
30721 int forward_lines()(int count) nothrow {
30722 return gtk_text_iter_forward_lines(&this, count);
30725 // Searches forward for @str. Any match is returned by setting
30726 // @match_start to the first character of the match and @match_end to the
30727 // first character after the match. The search will not continue past
30728 // @limit. Note that a search is a linear or O(n) operation, so you
30729 // may wish to use @limit to avoid locking up your UI on large
30730 // buffers.
30732 // If the #GTK_TEXT_SEARCH_VISIBLE_ONLY flag is present, the match may
30733 // have invisible text interspersed in @str. i.e. @str will be a
30734 // possibly-noncontiguous subsequence of the matched range. similarly,
30735 // if you specify #GTK_TEXT_SEARCH_TEXT_ONLY, the match may have
30736 // pixbufs or child widgets mixed inside the matched range. If these
30737 // flags are not given, the match must be exact; the special 0xFFFC
30738 // character in @str will match embedded pixbufs or child widgets.
30739 // RETURNS: whether a match was found
30740 // <str>: a search string
30741 // <flags>: flags affecting how the search is done
30742 // <match_start>: return location for start of match, or %NULL
30743 // <match_end>: return location for end of match, or %NULL
30744 // <limit>: bound for the search, or %NULL for the end of the buffer
30745 int forward_search(AT0, AT1, AT2, AT3)(AT0 /*char*/ str, TextSearchFlags flags, /*out*/ AT1 /*TextIter*/ match_start=null, /*out*/ AT2 /*TextIter*/ match_end=null, AT3 /*TextIter*/ limit=null) nothrow {
30746 return gtk_text_iter_forward_search(&this, toCString!(char*)(str), flags, UpCast!(TextIter*)(match_start), UpCast!(TextIter*)(match_end), UpCast!(TextIter*)(limit));
30749 // Moves forward to the next sentence end. (If @iter is at the end of
30750 // a sentence, moves to the next end of sentence.) Sentence
30751 // boundaries are determined by Pango and should be correct for nearly
30752 // any language (if not, the correct fix would be to the Pango text
30753 // boundary algorithms).
30754 // RETURNS: %TRUE if @iter moved and is not the end iterator
30755 int forward_sentence_end()() nothrow {
30756 return gtk_text_iter_forward_sentence_end(&this);
30759 // Calls gtk_text_iter_forward_sentence_end() @count times (or until
30760 // gtk_text_iter_forward_sentence_end() returns %FALSE). If @count is
30761 // negative, moves backward instead of forward.
30762 // RETURNS: %TRUE if @iter moved and is not the end iterator
30763 // <count>: number of sentences to move
30764 int forward_sentence_ends()(int count) nothrow {
30765 return gtk_text_iter_forward_sentence_ends(&this, count);
30768 // Moves @iter forward to the "end iterator," which points one past the last
30769 // valid character in the buffer. gtk_text_iter_get_char() called on the
30770 // end iterator returns 0, which is convenient for writing loops.
30771 void forward_to_end()() nothrow {
30772 gtk_text_iter_forward_to_end(&this);
30775 // Moves the iterator to point to the paragraph delimiter characters,
30776 // which will be either a newline, a carriage return, a carriage
30777 // return/newline in sequence, or the Unicode paragraph separator
30778 // character. If the iterator is already at the paragraph delimiter
30779 // characters, moves to the paragraph delimiter characters for the
30780 // next line. If @iter is on the last line in the buffer, which does
30781 // not end in paragraph delimiters, moves to the end iterator (end of
30782 // the last line), and returns %FALSE.
30783 // RETURNS: %TRUE if we moved and the new location is not the end iterator
30784 int forward_to_line_end()() nothrow {
30785 return gtk_text_iter_forward_to_line_end(&this);
30788 // Moves forward to the next toggle (on or off) of the
30789 // #GtkTextTag @tag, or to the next toggle of any tag if
30790 // @tag is %NULL. If no matching tag toggles are found,
30791 // returns %FALSE, otherwise %TRUE. Does not return toggles
30792 // located at @iter, only toggles after @iter. Sets @iter to
30793 // the location of the toggle, or to the end of the buffer
30794 // if no toggle is found.
30795 // RETURNS: whether we found a tag toggle after @iter
30796 // <tag>: a #GtkTextTag, or %NULL
30797 int forward_to_tag_toggle(AT0)(AT0 /*TextTag*/ tag=null) nothrow {
30798 return gtk_text_iter_forward_to_tag_toggle(&this, UpCast!(TextTag*)(tag));
30801 // VERSION: 2.4
30802 // Moves @iter forward to the next visible cursor position. See
30803 // gtk_text_iter_forward_cursor_position() for details.
30804 // RETURNS: %TRUE if we moved and the new position is dereferenceable
30805 int forward_visible_cursor_position()() nothrow {
30806 return gtk_text_iter_forward_visible_cursor_position(&this);
30809 // VERSION: 2.4
30810 // Moves up to @count visible cursor positions. See
30811 // gtk_text_iter_forward_cursor_position() for details.
30812 // RETURNS: %TRUE if we moved and the new position is dereferenceable
30813 // <count>: number of positions to move
30814 int forward_visible_cursor_positions()(int count) nothrow {
30815 return gtk_text_iter_forward_visible_cursor_positions(&this, count);
30818 // VERSION: 2.8
30819 // Moves @iter to the start of the next visible line. Returns %TRUE if there
30820 // was a next line to move to, and %FALSE if @iter was simply moved to
30821 // the end of the buffer and is now not dereferenceable, or if @iter was
30822 // already at the end of the buffer.
30823 // RETURNS: whether @iter can be dereferenced
30824 int forward_visible_line()() nothrow {
30825 return gtk_text_iter_forward_visible_line(&this);
30828 // VERSION: 2.8
30829 // Moves @count visible lines forward, if possible (if @count would move
30830 // past the start or end of the buffer, moves to the start or end of
30831 // the buffer). The return value indicates whether the iterator moved
30832 // onto a dereferenceable position; if the iterator didn't move, or
30833 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
30834 // the function does nothing and returns %FALSE. If @count is negative,
30835 // moves backward by 0 - @count lines.
30836 // RETURNS: whether @iter moved and is dereferenceable
30837 // <count>: number of lines to move forward
30838 int forward_visible_lines()(int count) nothrow {
30839 return gtk_text_iter_forward_visible_lines(&this, count);
30842 // VERSION: 2.4
30843 // Moves forward to the next visible word end. (If @iter is currently on a
30844 // word end, moves forward to the next one after that.) Word breaks
30845 // are determined by Pango and should be correct for nearly any
30846 // language (if not, the correct fix would be to the Pango word break
30847 // algorithms).
30848 // RETURNS: %TRUE if @iter moved and is not the end iterator
30849 int forward_visible_word_end()() nothrow {
30850 return gtk_text_iter_forward_visible_word_end(&this);
30853 // VERSION: 2.4
30854 // Calls gtk_text_iter_forward_visible_word_end() up to @count times.
30855 // RETURNS: %TRUE if @iter moved and is not the end iterator
30856 // <count>: number of times to move
30857 int forward_visible_word_ends()(int count) nothrow {
30858 return gtk_text_iter_forward_visible_word_ends(&this, count);
30861 // Moves forward to the next word end. (If @iter is currently on a
30862 // word end, moves forward to the next one after that.) Word breaks
30863 // are determined by Pango and should be correct for nearly any
30864 // language (if not, the correct fix would be to the Pango word break
30865 // algorithms).
30866 // RETURNS: %TRUE if @iter moved and is not the end iterator
30867 int forward_word_end()() nothrow {
30868 return gtk_text_iter_forward_word_end(&this);
30871 // Calls gtk_text_iter_forward_word_end() up to @count times.
30872 // RETURNS: %TRUE if @iter moved and is not the end iterator
30873 // <count>: number of times to move
30874 int forward_word_ends()(int count) nothrow {
30875 return gtk_text_iter_forward_word_ends(&this, count);
30878 // Free an iterator allocated on the heap. This function
30879 // is intended for use in language bindings, and is not
30880 // especially useful for applications, because iterators can
30881 // simply be allocated on the stack.
30882 void free()() nothrow {
30883 gtk_text_iter_free(&this);
30886 // Computes the effect of any tags applied to this spot in the
30887 // text. The @values parameter should be initialized to the default
30888 // settings you wish to use if no tags are in effect. You'd typically
30889 // obtain the defaults from gtk_text_view_get_default_attributes().
30891 // gtk_text_iter_get_attributes () will modify @values, applying the
30892 // effects of any tags present at @iter. If any tags affected @values,
30893 // the function returns %TRUE.
30894 // RETURNS: %TRUE if @values was modified
30895 // <values>: a #GtkTextAttributes to be filled in
30896 int get_attributes(AT0)(/*out*/ AT0 /*TextAttributes*/ values) nothrow {
30897 return gtk_text_iter_get_attributes(&this, UpCast!(TextAttributes*)(values));
30900 // Returns the #GtkTextBuffer this iterator is associated with.
30901 // RETURNS: the buffer
30902 TextBuffer* get_buffer()() nothrow {
30903 return gtk_text_iter_get_buffer(&this);
30906 // Returns the number of bytes in the line containing @iter,
30907 // including the paragraph delimiters.
30908 // RETURNS: number of bytes in the line
30909 int get_bytes_in_line()() nothrow {
30910 return gtk_text_iter_get_bytes_in_line(&this);
30913 // Returns the Unicode character at this iterator. (Equivalent to
30914 // operator* on a C++ iterator.) If the element at this iterator is a
30915 // non-character element, such as an image embedded in the buffer, the
30916 // Unicode "unknown" character 0xFFFC is returned. If invoked on
30917 // the end iterator, zero is returned; zero is not a valid Unicode character.
30918 // So you can write a loop which ends when gtk_text_iter_get_char ()
30919 // returns 0.
30920 // RETURNS: a Unicode character, or 0 if @iter is not dereferenceable
30921 dchar get_char()() nothrow {
30922 return gtk_text_iter_get_char(&this);
30925 // Returns the number of characters in the line containing @iter,
30926 // including the paragraph delimiters.
30927 // RETURNS: number of characters in the line
30928 int get_chars_in_line()() nothrow {
30929 return gtk_text_iter_get_chars_in_line(&this);
30932 // If the location at @iter contains a child anchor, the
30933 // anchor is returned (with no new reference count added). Otherwise,
30934 // %NULL is returned.
30935 // RETURNS: the anchor at @iter
30936 TextChildAnchor* get_child_anchor()() nothrow {
30937 return gtk_text_iter_get_child_anchor(&this);
30940 // A convenience wrapper around gtk_text_iter_get_attributes (),
30941 // which returns the language in effect at @iter. If no tags affecting
30942 // language apply to @iter, the return value is identical to that of
30943 // gtk_get_default_language ().
30944 // RETURNS: language in effect at @iter
30945 Pango.Language* /*new*/ get_language()() nothrow {
30946 return gtk_text_iter_get_language(&this);
30949 // Returns the line number containing the iterator. Lines in
30950 // a #GtkTextBuffer are numbered beginning with 0 for the first
30951 // line in the buffer.
30952 // RETURNS: a line number
30953 int get_line()() nothrow {
30954 return gtk_text_iter_get_line(&this);
30957 // Returns the byte index of the iterator, counting
30958 // from the start of a newline-terminated line.
30959 // Remember that #GtkTextBuffer encodes text in
30960 // UTF-8, and that characters can require a variable
30961 // number of bytes to represent.
30962 // RETURNS: distance from start of line, in bytes
30963 int get_line_index()() nothrow {
30964 return gtk_text_iter_get_line_index(&this);
30967 // Returns the character offset of the iterator,
30968 // counting from the start of a newline-terminated line.
30969 // The first character on the line has offset 0.
30970 // RETURNS: offset from start of line
30971 int get_line_offset()() nothrow {
30972 return gtk_text_iter_get_line_offset(&this);
30975 // Returns a list of all #GtkTextMark at this location. Because marks
30976 // are not iterable (they don't take up any "space" in the buffer,
30977 // they are just marks in between iterable locations), multiple marks
30978 // can exist in the same place. The returned list is not in any
30979 // meaningful order.
30980 // RETURNS: list of #GtkTextMark
30981 GLib2.SList* /*new container*/ get_marks()() nothrow {
30982 return gtk_text_iter_get_marks(&this);
30985 // Returns the character offset of an iterator.
30986 // Each character in a #GtkTextBuffer has an offset,
30987 // starting with 0 for the first character in the buffer.
30988 // Use gtk_text_buffer_get_iter_at_offset () to convert an
30989 // offset back into an iterator.
30990 // RETURNS: a character offset
30991 int get_offset()() nothrow {
30992 return gtk_text_iter_get_offset(&this);
30995 // If the element at @iter is a pixbuf, the pixbuf is returned
30996 // (with no new reference count added). Otherwise,
30997 // %NULL is returned.
30998 // RETURNS: the pixbuf at @iter
30999 GdkPixbuf2.Pixbuf* get_pixbuf()() nothrow {
31000 return gtk_text_iter_get_pixbuf(&this);
31003 // Returns the text in the given range. A "slice" is an array of
31004 // characters encoded in UTF-8 format, including the Unicode "unknown"
31005 // character 0xFFFC for iterable non-character elements in the buffer,
31006 // such as images. Because images are encoded in the slice, byte and
31007 // character offsets in the returned array will correspond to byte
31008 // offsets in the text buffer. Note that 0xFFFC can occur in normal
31009 // text as well, so it is not a reliable indicator that a pixbuf or
31010 // widget is in the buffer.
31011 // RETURNS: slice of text from the buffer
31012 // <end>: iterator at end of a range
31013 char* /*new*/ get_slice(AT0)(AT0 /*TextIter*/ end) nothrow {
31014 return gtk_text_iter_get_slice(&this, UpCast!(TextIter*)(end));
31017 // Returns a list of tags that apply to @iter, in ascending order of
31018 // priority (highest-priority tags are last). The #GtkTextTag in the
31019 // list don't have a reference added, but you have to free the list
31020 // itself.
31021 // RETURNS: list of #GtkTextTag
31022 GLib2.SList* /*new container*/ get_tags()() nothrow {
31023 return gtk_text_iter_get_tags(&this);
31026 // Returns <emphasis>text</emphasis> in the given range. If the range
31027 // contains non-text elements such as images, the character and byte
31028 // offsets in the returned string will not correspond to character and
31029 // byte offsets in the buffer. If you want offsets to correspond, see
31030 // gtk_text_iter_get_slice ().
31031 // RETURNS: array of characters from the buffer
31032 // <end>: iterator at end of a range
31033 char* /*new*/ get_text(AT0)(AT0 /*TextIter*/ end) nothrow {
31034 return gtk_text_iter_get_text(&this, UpCast!(TextIter*)(end));
31037 // Returns a list of #GtkTextTag that are toggled on or off at this
31038 // point. (If @toggled_on is %TRUE, the list contains tags that are
31039 // toggled on.) If a tag is toggled on at @iter, then some non-empty
31040 // range of characters following @iter has that tag applied to it. If
31041 // a tag is toggled off, then some non-empty range following @iter
31042 // does <emphasis>not</emphasis> have the tag applied to it.
31043 // RETURNS: tags toggled at this point
31044 // <toggled_on>: %TRUE to get toggled-on tags
31045 GLib2.SList* /*new container*/ get_toggled_tags()(int toggled_on) nothrow {
31046 return gtk_text_iter_get_toggled_tags(&this, toggled_on);
31049 // Returns the number of bytes from the start of the
31050 // line to the given @iter, not counting bytes that
31051 // are invisible due to tags with the "invisible" flag
31052 // toggled on.
31053 // RETURNS: byte index of @iter with respect to the start of the line
31054 int get_visible_line_index()() nothrow {
31055 return gtk_text_iter_get_visible_line_index(&this);
31058 // Returns the offset in characters from the start of the
31059 // line to the given @iter, not counting characters that
31060 // are invisible due to tags with the "invisible" flag
31061 // toggled on.
31062 // RETURNS: offset in visible characters from the start of the line
31063 int get_visible_line_offset()() nothrow {
31064 return gtk_text_iter_get_visible_line_offset(&this);
31067 // Like gtk_text_iter_get_slice (), but invisible text is not included.
31068 // Invisible text is usually invisible because a #GtkTextTag with the
31069 // "invisible" attribute turned on has been applied to it.
31070 // RETURNS: slice of text from the buffer
31071 // <end>: iterator at end of range
31072 char* /*new*/ get_visible_slice(AT0)(AT0 /*TextIter*/ end) nothrow {
31073 return gtk_text_iter_get_visible_slice(&this, UpCast!(TextIter*)(end));
31076 // Like gtk_text_iter_get_text (), but invisible text is not included.
31077 // Invisible text is usually invisible because a #GtkTextTag with the
31078 // "invisible" attribute turned on has been applied to it.
31079 // RETURNS: string containing visible text in the range
31080 // <end>: iterator at end of range
31081 char* /*new*/ get_visible_text(AT0)(AT0 /*TextIter*/ end) nothrow {
31082 return gtk_text_iter_get_visible_text(&this, UpCast!(TextIter*)(end));
31085 // Returns %TRUE if @iter is within a range tagged with @tag.
31086 // RETURNS: whether @iter is tagged with @tag
31087 // <tag>: a #GtkTextTag
31088 int has_tag(AT0)(AT0 /*TextTag*/ tag) nothrow {
31089 return gtk_text_iter_has_tag(&this, UpCast!(TextTag*)(tag));
31092 // Checks whether @iter falls in the range [@start, @end).
31093 // @start and @end must be in ascending order.
31094 // RETURNS: %TRUE if @iter is in the range
31095 // <start>: start of range
31096 // <end>: end of range
31097 int in_range(AT0, AT1)(AT0 /*TextIter*/ start, AT1 /*TextIter*/ end) nothrow {
31098 return gtk_text_iter_in_range(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
31101 // Determines whether @iter is inside a sentence (as opposed to in
31102 // between two sentences, e.g. after a period and before the first
31103 // letter of the next sentence). Sentence boundaries are determined
31104 // by Pango and should be correct for nearly any language (if not, the
31105 // correct fix would be to the Pango text boundary algorithms).
31106 // RETURNS: %TRUE if @iter is inside a sentence.
31107 int inside_sentence()() nothrow {
31108 return gtk_text_iter_inside_sentence(&this);
31111 // Determines whether @iter is inside a natural-language word (as
31112 // opposed to say inside some whitespace). Word breaks are determined
31113 // by Pango and should be correct for nearly any language (if not, the
31114 // correct fix would be to the Pango word break algorithms).
31115 // RETURNS: %TRUE if @iter is inside a word
31116 int inside_word()() nothrow {
31117 return gtk_text_iter_inside_word(&this);
31120 // See gtk_text_iter_forward_cursor_position() or #PangoLogAttr or
31121 // pango_break() for details on what a cursor position is.
31122 // RETURNS: %TRUE if the cursor can be placed at @iter
31123 int is_cursor_position()() nothrow {
31124 return gtk_text_iter_is_cursor_position(&this);
31127 // Returns %TRUE if @iter is the end iterator, i.e. one past the last
31128 // dereferenceable iterator in the buffer. gtk_text_iter_is_end () is
31129 // the most efficient way to check whether an iterator is the end
31130 // iterator.
31131 // RETURNS: whether @iter is the end iterator
31132 int is_end()() nothrow {
31133 return gtk_text_iter_is_end(&this);
31136 // Returns %TRUE if @iter is the first iterator in the buffer, that is
31137 // if @iter has a character offset of 0.
31138 // RETURNS: whether @iter is the first in the buffer
31139 int is_start()() nothrow {
31140 return gtk_text_iter_is_start(&this);
31143 // Swaps the value of @first and @second if @second comes before
31144 // @first in the buffer. That is, ensures that @first and @second are
31145 // in sequence. Most text buffer functions that take a range call this
31146 // automatically on your behalf, so there's no real reason to call it yourself
31147 // in those cases. There are some exceptions, such as gtk_text_iter_in_range(),
31148 // that expect a pre-sorted range.
31149 // <second>: another #GtkTextIter
31150 void order(AT0)(AT0 /*TextIter*/ second) nothrow {
31151 gtk_text_iter_order(&this, UpCast!(TextIter*)(second));
31154 // Moves iterator @iter to the start of the line @line_number. If
31155 // @line_number is negative or larger than the number of lines in the
31156 // buffer, moves @iter to the start of the last line in the buffer.
31157 // <line_number>: line number (counted from 0)
31158 void set_line()(int line_number) nothrow {
31159 gtk_text_iter_set_line(&this, line_number);
31162 // Same as gtk_text_iter_set_line_offset(), but works with a
31163 // <emphasis>byte</emphasis> index. The given byte index must be at
31164 // the start of a character, it can't be in the middle of a UTF-8
31165 // encoded character.
31166 // <byte_on_line>: a byte index relative to the start of @iter's current line
31167 void set_line_index()(int byte_on_line) nothrow {
31168 gtk_text_iter_set_line_index(&this, byte_on_line);
31171 // Moves @iter within a line, to a new <emphasis>character</emphasis>
31172 // (not byte) offset. The given character offset must be less than or
31173 // equal to the number of characters in the line; if equal, @iter
31174 // moves to the start of the next line. See
31175 // gtk_text_iter_set_line_index() if you have a byte index rather than
31176 // a character offset.
31177 // <char_on_line>: a character offset relative to the start of @iter's current line
31178 void set_line_offset()(int char_on_line) nothrow {
31179 gtk_text_iter_set_line_offset(&this, char_on_line);
31182 // Sets @iter to point to @char_offset. @char_offset counts from the start
31183 // of the entire text buffer, starting with 0.
31184 // <char_offset>: a character number
31185 void set_offset()(int char_offset) nothrow {
31186 gtk_text_iter_set_offset(&this, char_offset);
31189 // Like gtk_text_iter_set_line_index(), but the index is in visible
31190 // bytes, i.e. text with a tag making it invisible is not counted
31191 // in the index.
31192 // <byte_on_line>: a byte index
31193 void set_visible_line_index()(int byte_on_line) nothrow {
31194 gtk_text_iter_set_visible_line_index(&this, byte_on_line);
31197 // Like gtk_text_iter_set_line_offset(), but the offset is in visible
31198 // characters, i.e. text with a tag making it invisible is not
31199 // counted in the offset.
31200 // <char_on_line>: a character offset
31201 void set_visible_line_offset()(int char_on_line) nothrow {
31202 gtk_text_iter_set_visible_line_offset(&this, char_on_line);
31205 // Returns %TRUE if @iter begins a paragraph,
31206 // i.e. if gtk_text_iter_get_line_offset () would return 0.
31207 // However this function is potentially more efficient than
31208 // gtk_text_iter_get_line_offset () because it doesn't have to compute
31209 // the offset, it just has to see whether it's 0.
31210 // RETURNS: whether @iter begins a line
31211 int starts_line()() nothrow {
31212 return gtk_text_iter_starts_line(&this);
31215 // Determines whether @iter begins a sentence. Sentence boundaries are
31216 // determined by Pango and should be correct for nearly any language
31217 // (if not, the correct fix would be to the Pango text boundary
31218 // algorithms).
31219 // RETURNS: %TRUE if @iter is at the start of a sentence.
31220 int starts_sentence()() nothrow {
31221 return gtk_text_iter_starts_sentence(&this);
31224 // Determines whether @iter begins a natural-language word. Word
31225 // breaks are determined by Pango and should be correct for nearly any
31226 // language (if not, the correct fix would be to the Pango word break
31227 // algorithms).
31228 // RETURNS: %TRUE if @iter is at the start of a word
31229 int starts_word()() nothrow {
31230 return gtk_text_iter_starts_word(&this);
31233 // This is equivalent to (gtk_text_iter_begins_tag () ||
31234 // gtk_text_iter_ends_tag ()), i.e. it tells you whether a range with
31235 // @tag applied to it begins <emphasis>or</emphasis> ends at @iter.
31236 // RETURNS: whether @tag is toggled on or off at @iter
31237 // <tag>: a #GtkTextTag, or %NULL
31238 int toggles_tag(AT0)(AT0 /*TextTag*/ tag=null) nothrow {
31239 return gtk_text_iter_toggles_tag(&this, UpCast!(TextTag*)(tag));
31243 struct TextLayout /* : GObject.Object */ {
31244 alias parent_instance this;
31245 alias parent_instance super_;
31246 alias parent_instance object;
31247 GObject2.Object parent_instance;
31248 int screen_width, width, height;
31249 TextBuffer* buffer;
31250 TextAttributes* default_style;
31251 Pango.Context* ltr_context, rtl_context;
31252 TextAttributes* one_style_cache;
31253 TextLineDisplay* one_display_cache;
31254 int wrap_loop_count;
31255 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
31256 uint, "cursor_visible", 1,
31257 uint, "cursor_direction", 2,
31258 uint, "keyboard_direction", 2,
31259 uint, "__dummy32A", 27));
31260 char* preedit_string;
31261 Pango.AttrList* preedit_attrs;
31262 int preedit_len, preedit_cursor;
31263 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
31264 uint, "overwrite_mode", 1,
31265 uint, "__dummy32B", 31));
31267 static TextLayout* /*new*/ new_()() nothrow {
31268 return gtk_text_layout_new();
31270 static auto opCall()() {
31271 return gtk_text_layout_new();
31273 void changed()(int y, int old_height, int new_height) nothrow {
31274 gtk_text_layout_changed(&this, y, old_height, new_height);
31277 // If the iterator is not fully in the range @top <= y < @bottom,
31278 // then, if possible, move it the minimum distance so that the
31279 // iterator in this range.
31280 // RETURNS: %TRUE if the iterator was moved, otherwise %FALSE.
31281 // <iter>: a #GtkTextIter
31282 // <top>: the top of the range
31283 // <bottom>: the bottom the range
31284 int clamp_iter_to_vrange(AT0)(AT0 /*TextIter*/ iter, int top, int bottom) nothrow {
31285 return gtk_text_layout_clamp_iter_to_vrange(&this, UpCast!(TextIter*)(iter), top, bottom);
31287 void cursors_changed()(int y, int old_height, int new_height) nothrow {
31288 gtk_text_layout_cursors_changed(&this, y, old_height, new_height);
31290 void default_style_changed()() nothrow {
31291 gtk_text_layout_default_style_changed(&this);
31293 // Unintrospectable method: draw() / gtk_text_layout_draw()
31294 void draw(AT0, AT1, AT2, AT3)(AT0 /*Widget*/ widget, AT1 /*Gdk2.Drawable*/ drawable, AT2 /*Gdk2.GC*/ cursor_gc, int x_offset, int y_offset, int x, int y, int width, int height, AT3 /*GLib2.List**/ widgets) nothrow {
31295 gtk_text_layout_draw(&this, UpCast!(Widget*)(widget), UpCast!(Gdk2.Drawable*)(drawable), UpCast!(Gdk2.GC*)(cursor_gc), x_offset, y_offset, x, y, width, height, UpCast!(GLib2.List**)(widgets));
31297 void free_line_data(AT0, AT1)(AT0 /*TextLine*/ line, AT1 /*TextLineData*/ line_data) nothrow {
31298 gtk_text_layout_free_line_data(&this, UpCast!(TextLine*)(line), UpCast!(TextLineData*)(line_data));
31300 void free_line_display(AT0)(AT0 /*TextLineDisplay*/ display) nothrow {
31301 gtk_text_layout_free_line_display(&this, UpCast!(TextLineDisplay*)(display));
31304 // Unintrospectable method: get_buffer() / gtk_text_layout_get_buffer()
31305 // Gets the text buffer used by the layout. See
31306 // gtk_text_layout_set_buffer().
31307 // RETURNS: the text buffer used by the layout.
31308 TextBuffer* get_buffer()() nothrow {
31309 return gtk_text_layout_get_buffer(&this);
31312 // Given an iterator within a text layout, determine the positions of the
31313 // strong and weak cursors if the insertion point is at that
31314 // iterator. The position of each cursor is stored as a zero-width
31315 // rectangle. The strong cursor location is the location where
31316 // characters of the directionality equal to the base direction of the
31317 // paragraph are inserted. The weak cursor location is the location
31318 // where characters of the directionality opposite to the base
31319 // direction of the paragraph are inserted.
31320 // <iter>: a #GtkTextIter
31321 // <strong_pos>: location to store the strong cursor position (may be %NULL)
31322 // <weak_pos>: location to store the weak cursor position (may be %NULL)
31323 void get_cursor_locations(AT0, AT1, AT2)(AT0 /*TextIter*/ iter, AT1 /*Gdk2.Rectangle*/ strong_pos=null, AT2 /*Gdk2.Rectangle*/ weak_pos=null) nothrow {
31324 gtk_text_layout_get_cursor_locations(&this, UpCast!(TextIter*)(iter), UpCast!(Gdk2.Rectangle*)(strong_pos), UpCast!(Gdk2.Rectangle*)(weak_pos));
31327 // Returns whether the insertion cursor will be shown.
31329 // shown, even if the text is editable.
31330 // RETURNS: if %FALSE, the insertion cursor will not be
31331 int get_cursor_visible()() nothrow {
31332 return gtk_text_layout_get_cursor_visible(&this);
31334 void get_iter_at_line(AT0, AT1)(AT0 /*TextIter*/ iter, AT1 /*TextLine*/ line, int byte_offset) nothrow {
31335 gtk_text_layout_get_iter_at_line(&this, UpCast!(TextIter*)(iter), UpCast!(TextLine*)(line), byte_offset);
31337 void get_iter_at_pixel(AT0)(AT0 /*TextIter*/ iter, int x, int y) nothrow {
31338 gtk_text_layout_get_iter_at_pixel(&this, UpCast!(TextIter*)(iter), x, y);
31340 void get_iter_at_position(AT0)(AT0 /*TextIter*/ iter, int* trailing, int x, int y) nothrow {
31341 gtk_text_layout_get_iter_at_position(&this, UpCast!(TextIter*)(iter), trailing, x, y);
31343 void get_iter_location(AT0, AT1)(AT0 /*TextIter*/ iter, AT1 /*Gdk2.Rectangle*/ rect) nothrow {
31344 gtk_text_layout_get_iter_location(&this, UpCast!(TextIter*)(iter), UpCast!(Gdk2.Rectangle*)(rect));
31347 // Get the iter at the beginning of the line which is displayed
31348 // at the given y.
31349 // <target_iter>: the iterator in which the result is stored
31350 // <y>: the y positition
31351 // <line_top>: location to store the y coordinate of the top of the line. (Can by %NULL)
31352 void get_line_at_y(AT0)(AT0 /*TextIter*/ target_iter, int y, int* line_top) nothrow {
31353 gtk_text_layout_get_line_at_y(&this, UpCast!(TextIter*)(target_iter), y, line_top);
31355 // Unintrospectable method: get_line_display() / gtk_text_layout_get_line_display()
31356 TextLineDisplay* get_line_display(AT0)(AT0 /*TextLine*/ line, int size_only) nothrow {
31357 return gtk_text_layout_get_line_display(&this, UpCast!(TextLine*)(line), size_only);
31360 // Find the range of y coordinates for the paragraph containing
31361 // the given iter.
31362 // <iter>: a #GtkTextIter
31363 // <y>: location to store the top of the paragraph in pixels, or %NULL. or %NULL.
31364 void get_line_yrange(AT0)(AT0 /*TextIter*/ iter, int* y, int* height) nothrow {
31365 gtk_text_layout_get_line_yrange(&this, UpCast!(TextIter*)(iter), y, height);
31367 GLib2.SList* /*new container*/ get_lines()(int top_y, int bottom_y, int* first_line_y) nothrow {
31368 return gtk_text_layout_get_lines(&this, top_y, bottom_y, first_line_y);
31370 void get_size()(int* width, int* height) nothrow {
31371 gtk_text_layout_get_size(&this, width, height);
31373 void invalidate(AT0, AT1)(AT0 /*TextIter*/ start, AT1 /*TextIter*/ end) nothrow {
31374 gtk_text_layout_invalidate(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
31376 void invalidate_cursors(AT0, AT1)(AT0 /*TextIter*/ start, AT1 /*TextIter*/ end) nothrow {
31377 gtk_text_layout_invalidate_cursors(&this, UpCast!(TextIter*)(start), UpCast!(TextIter*)(end));
31380 // Check if there are any invalid regions in a #GtkTextLayout's buffer
31381 // RETURNS: %TRUE if any invalid regions were found
31382 int is_valid()() nothrow {
31383 return gtk_text_layout_is_valid(&this);
31386 // Tests whether an iterator is at the start of a display line.
31387 // <iter>: iterator to test
31388 int iter_starts_line(AT0)(AT0 /*TextIter*/ iter) nothrow {
31389 return gtk_text_layout_iter_starts_line(&this, UpCast!(TextIter*)(iter));
31392 // Move to the beginning or end of a display line.
31393 // <direction>: if negative, move to beginning of line, otherwise
31394 int move_iter_to_line_end(AT0)(AT0 /*TextIter*/ iter, int direction) nothrow {
31395 return gtk_text_layout_move_iter_to_line_end(&this, UpCast!(TextIter*)(iter), direction);
31398 // Move the iterator to the beginning of the next line. The
31399 // lines of a wrapped paragraph are treated as distinct for
31400 // this operation.
31401 // <iter>: a #GtkTextIter
31402 int move_iter_to_next_line(AT0)(AT0 /*TextIter*/ iter) nothrow {
31403 return gtk_text_layout_move_iter_to_next_line(&this, UpCast!(TextIter*)(iter));
31406 // Move the iterator to the beginning of the previous line. The lines
31407 // of a wrapped paragraph are treated as distinct for this operation.
31408 // <iter>: a #GtkTextIter
31409 int move_iter_to_previous_line(AT0)(AT0 /*TextIter*/ iter) nothrow {
31410 return gtk_text_layout_move_iter_to_previous_line(&this, UpCast!(TextIter*)(iter));
31413 // Keeping the iterator on the same line of the layout, move it to the
31414 // specified X coordinate. The lines of a wrapped paragraph are
31415 // treated as distinct for this operation.
31416 // <iter>: a #GtkTextIter
31417 // <x>: X coordinate
31418 void move_iter_to_x(AT0)(AT0 /*TextIter*/ iter, int x) nothrow {
31419 gtk_text_layout_move_iter_to_x(&this, UpCast!(TextIter*)(iter), x);
31422 // Move the iterator a given number of characters visually, treating
31423 // it as the strong cursor position. If @count is positive, then the
31424 // new strong cursor position will be @count positions to the right of
31425 // the old cursor position. If @count is negative then the new strong
31426 // cursor position will be @count positions to the left of the old
31427 // cursor position.
31429 // In the presence of bidirection text, the correspondence
31430 // between logical and visual order will depend on the direction
31431 // of the current run, and there may be jumps when the cursor
31432 // is moved off of the end of a run.
31433 // <iter>: a #GtkTextIter
31434 // <count>: number of characters to move (negative moves left, positive moves right)
31435 int move_iter_visually(AT0)(AT0 /*TextIter*/ iter, int count) nothrow {
31436 return gtk_text_layout_move_iter_visually(&this, UpCast!(TextIter*)(iter), count);
31438 void set_buffer(AT0)(AT0 /*TextBuffer*/ buffer=null) nothrow {
31439 gtk_text_layout_set_buffer(&this, UpCast!(TextBuffer*)(buffer));
31441 void set_contexts(AT0, AT1)(AT0 /*Pango.Context*/ ltr_context, AT1 /*Pango.Context*/ rtl_context) nothrow {
31442 gtk_text_layout_set_contexts(&this, UpCast!(Pango.Context*)(ltr_context), UpCast!(Pango.Context*)(rtl_context));
31445 // Sets which text directions (left-to-right and/or right-to-left) for
31446 // which cursors will be drawn for the insertion point. The visual
31447 // point at which new text is inserted depends on whether the new
31448 // text is right-to-left or left-to-right, so it may be desired to
31449 // make the drawn position of the cursor depend on the keyboard state.
31450 // <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.)
31451 void set_cursor_direction()(TextDirection direction) nothrow {
31452 gtk_text_layout_set_cursor_direction(&this, direction);
31455 // Sets whether the insertion cursor should be shown. Generally,
31456 // widgets using #GtkTextLayout will hide the cursor when the
31457 // widget does not have the input focus.
31458 // <cursor_visible>: If %FALSE, then the insertion cursor will not be shown, even if the text is editable.
31459 void set_cursor_visible()(int cursor_visible) nothrow {
31460 gtk_text_layout_set_cursor_visible(&this, cursor_visible);
31462 void set_default_style(AT0)(AT0 /*TextAttributes*/ values) nothrow {
31463 gtk_text_layout_set_default_style(&this, UpCast!(TextAttributes*)(values));
31466 // Sets the keyboard direction; this is used as for the bidirectional
31467 // base direction for the line with the cursor if the line contains
31468 // only neutral characters.
31469 // <keyboard_dir>: the current direction of the keyboard.
31470 void set_keyboard_direction()(TextDirection keyboard_dir) nothrow {
31471 gtk_text_layout_set_keyboard_direction(&this, keyboard_dir);
31474 // Sets overwrite mode
31475 // <overwrite>: overwrite mode
31476 void set_overwrite_mode()(int overwrite) nothrow {
31477 gtk_text_layout_set_overwrite_mode(&this, overwrite);
31480 // Set the preedit string and attributes. The preedit string is a
31481 // string showing text that is currently being edited and not
31482 // yet committed into the buffer.
31483 // <preedit_string>: a string to display at the insertion point
31484 // <preedit_attrs>: a #PangoAttrList of attributes that apply to @preedit_string
31485 // <cursor_pos>: position of cursor within preedit string in chars
31486 void set_preedit_string(AT0, AT1)(AT0 /*char*/ preedit_string, AT1 /*Pango.AttrList*/ preedit_attrs, int cursor_pos) nothrow {
31487 gtk_text_layout_set_preedit_string(&this, toCString!(char*)(preedit_string), UpCast!(Pango.AttrList*)(preedit_attrs), cursor_pos);
31489 void set_screen_width()(int width) nothrow {
31490 gtk_text_layout_set_screen_width(&this, width);
31492 void spew()() nothrow {
31493 gtk_text_layout_spew(&this);
31496 // Validate regions of a #GtkTextLayout. The ::changed signal will
31497 // be emitted for each region validated.
31498 // <max_pixels>: the maximum number of pixels to validate. (No more than one paragraph beyond this limit will be validated)
31499 void validate()(int max_pixels) nothrow {
31500 gtk_text_layout_validate(&this, max_pixels);
31503 // Ensure that a region of a #GtkTextLayout is valid. The ::changed
31504 // signal will be emitted if any lines are validated.
31505 // <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.)
31506 // <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.)
31507 void validate_yrange(AT0)(AT0 /*TextIter*/ anchor_line, int y0_, int y1_) nothrow {
31508 gtk_text_layout_validate_yrange(&this, UpCast!(TextIter*)(anchor_line), y0_, y1_);
31510 // Unintrospectable method: wrap() / gtk_text_layout_wrap()
31511 TextLineData* wrap(AT0, AT1)(AT0 /*TextLine*/ line, AT1 /*TextLineData*/ line_data) nothrow {
31512 return gtk_text_layout_wrap(&this, UpCast!(TextLine*)(line), UpCast!(TextLineData*)(line_data));
31514 void wrap_loop_end()() nothrow {
31515 gtk_text_layout_wrap_loop_end(&this);
31517 void wrap_loop_start()() nothrow {
31518 gtk_text_layout_wrap_loop_start(&this);
31520 extern (C) alias static void function (TextLayout* this_, Object* object, int p0, int p1, void* user_data=null) nothrow signal_allocate_child;
31522 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31523 return super_.signal_connect!name(cb, data, cf);
31526 ulong signal_connect(string name:"allocate-child", CB/*:signal_allocate_child*/)
31527 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
31528 if (is(typeof(cb)==signal_allocate_child)||_ttmm!(CB, signal_allocate_child)()) {
31529 return signal_connect_data!()(&this, cast(char*)"allocate-child",
31530 cast(GObject2.Callback)cb, data, null, cf);
31532 extern (C) alias static void function (TextLayout* this_, int object, int p0, int p1, void* user_data=null) nothrow signal_changed;
31533 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
31534 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
31535 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
31536 return signal_connect_data!()(&this, cast(char*)"changed",
31537 cast(GObject2.Callback)cb, data, null, cf);
31539 extern (C) alias static void function (TextLayout* this_, void* user_data=null) nothrow signal_invalidated;
31540 ulong signal_connect(string name:"invalidated", CB/*:signal_invalidated*/)
31541 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
31542 if (is(typeof(cb)==signal_invalidated)||_ttmm!(CB, signal_invalidated)()) {
31543 return signal_connect_data!()(&this, cast(char*)"invalidated",
31544 cast(GObject2.Callback)cb, data, null, cf);
31548 struct TextLayoutClass {
31549 GObject2.ObjectClass parent_class;
31550 extern (C) void function (TextLayout* layout) nothrow invalidated;
31551 extern (C) void function (TextLayout* layout, int y, int old_height, int new_height) nothrow changed;
31552 // Unintrospectable functionp: wrap() / ()
31553 extern (C) TextLineData* function (TextLayout* layout, TextLine* line, TextLineData* line_data) nothrow wrap;
31554 extern (C) void function (TextLayout* layout, TextLine* line, Pango.LogAttr** attrs, int* n_attrs) nothrow get_log_attrs;
31555 extern (C) void function (TextLayout* layout, TextIter* start, TextIter* end) nothrow invalidate;
31556 extern (C) void function (TextLayout* layout, TextLine* line, TextLineData* line_data) nothrow free_line_data;
31557 extern (C) void function (TextLayout* layout, Widget* child, int x, int y) nothrow allocate_child;
31558 extern (C) void function (TextLayout* layout, TextIter* start, TextIter* end) nothrow invalidate_cursors;
31559 extern (C) void function () nothrow _gtk_reserved1;
31560 extern (C) void function () nothrow _gtk_reserved2;
31561 extern (C) void function () nothrow _gtk_reserved3;
31564 struct TextLine {
31567 struct TextLineData {
31570 struct TextLineDisplay {
31571 Pango.Layout* layout;
31572 GLib2.SList* cursors, shaped_objects;
31573 TextDirection direction;
31574 int width, total_width, height, x_offset, left_margin, right_margin, top_margin, bottom_margin, insert_index;
31575 int size_only;
31576 TextLine* line;
31577 Gdk2.Color* pg_bg_color;
31578 Gdk2.Rectangle block_cursor;
31579 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
31580 uint, "cursors_invalid", 1,
31581 uint, "has_block_cursor", 1,
31582 uint, "cursor_at_line_end", 1,
31583 uint, "__dummy32A", 29));
31586 struct TextLogAttrCache {
31589 struct TextMark /* : GObject.Object */ {
31590 alias parent_instance this;
31591 alias parent_instance super_;
31592 alias parent_instance object;
31593 GObject2.Object parent_instance;
31594 void* segment;
31597 // VERSION: 2.12
31598 // Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark().
31599 // If @name is %NULL, the mark is anonymous; otherwise, the mark can be
31600 // retrieved by name using gtk_text_buffer_get_mark(). If a mark has left
31601 // gravity, and text is inserted at the mark's current location, the mark
31602 // will be moved to the left of the newly-inserted text. If the mark has
31603 // right gravity (@left_gravity = %FALSE), the mark will end up on the
31604 // right of newly-inserted text. The standard left-to-right cursor is a
31605 // mark with right gravity (when you type, the cursor stays on the right
31606 // side of the text you're typing).
31607 // RETURNS: new #GtkTextMark
31608 // <name>: mark name or %NULL
31609 // <left_gravity>: whether the mark should have left gravity
31610 static TextMark* /*new*/ new_(AT0)(AT0 /*char*/ name, int left_gravity) nothrow {
31611 return gtk_text_mark_new(toCString!(char*)(name), left_gravity);
31613 static auto opCall(AT0)(AT0 /*char*/ name, int left_gravity) {
31614 return gtk_text_mark_new(toCString!(char*)(name), left_gravity);
31617 // Gets the buffer this mark is located inside,
31618 // or %NULL if the mark is deleted.
31619 // RETURNS: the mark's #GtkTextBuffer
31620 TextBuffer* get_buffer()() nothrow {
31621 return gtk_text_mark_get_buffer(&this);
31624 // Returns %TRUE if the mark has been removed from its buffer
31625 // with gtk_text_buffer_delete_mark(). See gtk_text_buffer_add_mark()
31626 // for a way to add it to a buffer again.
31627 // RETURNS: whether the mark is deleted
31628 int get_deleted()() nothrow {
31629 return gtk_text_mark_get_deleted(&this);
31632 // Determines whether the mark has left gravity.
31633 // RETURNS: %TRUE if the mark has left gravity, %FALSE otherwise
31634 int get_left_gravity()() nothrow {
31635 return gtk_text_mark_get_left_gravity(&this);
31638 // Returns the mark name; returns NULL for anonymous marks.
31639 // RETURNS: mark name
31640 char* get_name()() nothrow {
31641 return gtk_text_mark_get_name(&this);
31644 // Returns %TRUE if the mark is visible (i.e. a cursor is displayed
31645 // for it).
31646 // RETURNS: %TRUE if visible
31647 int get_visible()() nothrow {
31648 return gtk_text_mark_get_visible(&this);
31651 // Sets the visibility of @mark; the insertion point is normally
31652 // visible, i.e. you can see it as a vertical bar. Also, the text
31653 // widget uses a visible mark to indicate where a drop will occur when
31654 // dragging-and-dropping text. Most other marks are not visible.
31655 // Marks are not visible by default.
31656 // <setting>: visibility of mark
31657 void set_visible()(int setting) nothrow {
31658 gtk_text_mark_set_visible(&this, setting);
31662 struct TextMarkClass {
31663 GObject2.ObjectClass parent_class;
31664 extern (C) void function () nothrow _gtk_reserved1;
31665 extern (C) void function () nothrow _gtk_reserved2;
31666 extern (C) void function () nothrow _gtk_reserved3;
31667 extern (C) void function () nothrow _gtk_reserved4;
31670 struct TextPendingScroll {
31673 enum TextSearchFlags {
31674 VISIBLE_ONLY = 1,
31675 TEXT_ONLY = 2
31677 struct TextTag /* : GObject.Object */ {
31678 alias parent_instance this;
31679 alias parent_instance super_;
31680 alias parent_instance object;
31681 GObject2.Object parent_instance;
31682 TextTagTable* table;
31683 char* name;
31684 int priority;
31685 TextAttributes* values;
31686 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
31687 uint, "bg_color_set", 1,
31688 uint, "bg_stipple_set", 1,
31689 uint, "fg_color_set", 1,
31690 uint, "scale_set", 1,
31691 uint, "fg_stipple_set", 1,
31692 uint, "justification_set", 1,
31693 uint, "left_margin_set", 1,
31694 uint, "indent_set", 1,
31695 uint, "rise_set", 1,
31696 uint, "strikethrough_set", 1,
31697 uint, "right_margin_set", 1,
31698 uint, "pixels_above_lines_set", 1,
31699 uint, "pixels_below_lines_set", 1,
31700 uint, "pixels_inside_wrap_set", 1,
31701 uint, "tabs_set", 1,
31702 uint, "underline_set", 1,
31703 uint, "wrap_mode_set", 1,
31704 uint, "bg_full_height_set", 1,
31705 uint, "invisible_set", 1,
31706 uint, "editable_set", 1,
31707 uint, "language_set", 1,
31708 uint, "pg_bg_color_set", 1,
31709 uint, "accumulative_margin", 1,
31710 uint, "pad1", 1,
31711 uint, "__dummy32A", 8));
31714 // Creates a #GtkTextTag. Configure the tag using object arguments,
31715 // i.e. using g_object_set().
31716 // RETURNS: a new #GtkTextTag
31717 // <name>: tag name, or %NULL
31718 static TextTag* /*new*/ new_(AT0)(AT0 /*char*/ name=null) nothrow {
31719 return gtk_text_tag_new(toCString!(char*)(name));
31721 static auto opCall(AT0)(AT0 /*char*/ name=null) {
31722 return gtk_text_tag_new(toCString!(char*)(name));
31725 // Emits the "event" signal on the #GtkTextTag.
31726 // RETURNS: result of signal emission (whether the event was handled)
31727 // <event_object>: object that received the event, such as a widget
31728 // <event>: the event
31729 // <iter>: location where the event was received
31730 int event(AT0, AT1, AT2)(AT0 /*GObject2.Object*/ event_object, AT1 /*Gdk2.Event*/ event, AT2 /*TextIter*/ iter) nothrow {
31731 return gtk_text_tag_event(&this, UpCast!(GObject2.Object*)(event_object), UpCast!(Gdk2.Event*)(event), UpCast!(TextIter*)(iter));
31734 // Get the tag priority.
31735 // RETURNS: The tag's priority.
31736 int get_priority()() nothrow {
31737 return gtk_text_tag_get_priority(&this);
31740 // Sets the priority of a #GtkTextTag. Valid priorities are
31741 // start at 0 and go to one less than gtk_text_tag_table_get_size().
31742 // Each tag in a table has a unique priority; setting the priority
31743 // of one tag shifts the priorities of all the other tags in the
31744 // table to maintain a unique priority for each tag. Higher priority
31745 // tags "win" if two tags both set the same text attribute. When adding
31746 // a tag to a tag table, it will be assigned the highest priority in
31747 // the table by default; so normally the precedence of a set of tags
31748 // is the order in which they were added to the table, or created with
31749 // gtk_text_buffer_create_tag(), which adds the tag to the buffer's table
31750 // automatically.
31751 // <priority>: the new priority
31752 void set_priority()(int priority) nothrow {
31753 gtk_text_tag_set_priority(&this, priority);
31756 // The ::event signal is emitted when an event occurs on a region of the
31757 // buffer marked with this tag.
31759 // event. %FALSE to propagate the event further.
31760 // RETURNS: %TRUE to stop other handlers from being invoked for the
31761 // <object>: the object the event was fired from (typically a #GtkTextView)
31762 // <event>: the event which triggered the signal
31763 // <iter>: a #GtkTextIter pointing at the location the event occured
31764 extern (C) alias static c_int function (TextTag* this_, GObject2.Object* object, Gdk2.Event* event, TextIter* iter, void* user_data=null) nothrow signal_event;
31766 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31767 return super_.signal_connect!name(cb, data, cf);
31770 ulong signal_connect(string name:"event", CB/*:signal_event*/)
31771 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
31772 if (is(typeof(cb)==signal_event)||_ttmm!(CB, signal_event)()) {
31773 return signal_connect_data!()(&this, cast(char*)"event",
31774 cast(GObject2.Callback)cb, data, null, cf);
31778 struct TextTagClass {
31779 GObject2.ObjectClass parent_class;
31781 // RETURNS: result of signal emission (whether the event was handled)
31782 // <event_object>: object that received the event, such as a widget
31783 // <event>: the event
31784 // <iter>: location where the event was received
31785 extern (C) int function (TextTag* tag, GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter) nothrow event;
31786 extern (C) void function () nothrow _gtk_reserved1;
31787 extern (C) void function () nothrow _gtk_reserved2;
31788 extern (C) void function () nothrow _gtk_reserved3;
31789 extern (C) void function () nothrow _gtk_reserved4;
31793 // You may wish to begin by reading the <link linkend="TextWidget">text widget
31794 // conceptual overview</link> which gives an overview of all the objects and data
31795 // types related to the text widget and how they work together.
31797 // <refsect2 id="GtkTextTagTable-BUILDER-UI">
31798 // <title>GtkTextTagTables as GtkBuildable</title>
31799 // <para>
31800 // The GtkTextTagTable implementation of the GtkBuildable interface
31801 // supports adding tags by specifying "tag" as the "type"
31802 // attribute of a &lt;child&gt; element.
31803 // </para>
31804 // <example>
31805 // <title>A UI definition fragment specifying tags</title>
31806 // <programlisting><![CDATA[
31807 // <object class="GtkTextTagTable">
31808 // <child type="tag">
31809 // <object class="GtkTextTag"/>
31810 // </child>
31811 // </object>
31812 // ]]></programlisting>
31813 // </example>
31814 // </refsect2>
31815 struct TextTagTable /* : GObject.Object */ {
31816 mixin Buildable.__interface__;
31817 alias parent_instance this;
31818 alias parent_instance super_;
31819 alias parent_instance object;
31820 GObject2.Object parent_instance;
31821 GLib2.HashTable* hash;
31822 GLib2.SList* anonymous;
31823 int anon_count;
31824 GLib2.SList* buffers;
31827 // Creates a new #GtkTextTagTable. The table contains no tags by
31828 // default.
31829 // RETURNS: a new #GtkTextTagTable
31830 static TextTagTable* /*new*/ new_()() nothrow {
31831 return gtk_text_tag_table_new();
31833 static auto opCall()() {
31834 return gtk_text_tag_table_new();
31837 // Add a tag to the table. The tag is assigned the highest priority
31838 // in the table.
31840 // @tag must not be in a tag table already, and may not have
31841 // the same name as an already-added tag.
31842 // <tag>: a #GtkTextTag
31843 void add(AT0)(AT0 /*TextTag*/ tag) nothrow {
31844 gtk_text_tag_table_add(&this, UpCast!(TextTag*)(tag));
31847 // Calls @func on each tag in @table, with user data @data.
31848 // Note that the table may not be modified while iterating
31849 // over it (you can't add/remove tags).
31850 // <func>: a function to call on each tag
31851 // <data>: user data
31852 void foreach_(AT0)(TextTagTableForeach func, AT0 /*void*/ data) nothrow {
31853 gtk_text_tag_table_foreach(&this, func, UpCast!(void*)(data));
31856 // Returns the size of the table (number of tags)
31857 // RETURNS: number of tags in @table
31858 int get_size()() nothrow {
31859 return gtk_text_tag_table_get_size(&this);
31862 // Look up a named tag.
31863 // RETURNS: The tag, or %NULL if none by that name is in the table.
31864 // <name>: name of a tag
31865 TextTag* lookup(AT0)(AT0 /*char*/ name) nothrow {
31866 return gtk_text_tag_table_lookup(&this, toCString!(char*)(name));
31869 // Remove a tag from the table. This will remove the table's
31870 // reference to the tag, so be careful - the tag will end
31871 // up destroyed if you don't have a reference to it.
31872 // <tag>: a #GtkTextTag
31873 void remove(AT0)(AT0 /*TextTag*/ tag) nothrow {
31874 gtk_text_tag_table_remove(&this, UpCast!(TextTag*)(tag));
31876 extern (C) alias static void function (TextTagTable* this_, TextTag* object, void* user_data=null) nothrow signal_tag_added;
31878 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31879 return super_.signal_connect!name(cb, data, cf);
31882 ulong signal_connect(string name:"tag-added", CB/*:signal_tag_added*/)
31883 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
31884 if (is(typeof(cb)==signal_tag_added)||_ttmm!(CB, signal_tag_added)()) {
31885 return signal_connect_data!()(&this, cast(char*)"tag-added",
31886 cast(GObject2.Callback)cb, data, null, cf);
31888 extern (C) alias static void function (TextTagTable* this_, TextTag* object, c_int p0, void* user_data=null) nothrow signal_tag_changed;
31889 ulong signal_connect(string name:"tag-changed", CB/*:signal_tag_changed*/)
31890 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
31891 if (is(typeof(cb)==signal_tag_changed)||_ttmm!(CB, signal_tag_changed)()) {
31892 return signal_connect_data!()(&this, cast(char*)"tag-changed",
31893 cast(GObject2.Callback)cb, data, null, cf);
31895 extern (C) alias static void function (TextTagTable* this_, TextTag* object, void* user_data=null) nothrow signal_tag_removed;
31896 ulong signal_connect(string name:"tag-removed", CB/*:signal_tag_removed*/)
31897 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
31898 if (is(typeof(cb)==signal_tag_removed)||_ttmm!(CB, signal_tag_removed)()) {
31899 return signal_connect_data!()(&this, cast(char*)"tag-removed",
31900 cast(GObject2.Callback)cb, data, null, cf);
31904 struct TextTagTableClass {
31905 GObject2.ObjectClass parent_class;
31906 extern (C) void function (TextTagTable* table, TextTag* tag, int size_changed) nothrow tag_changed;
31907 extern (C) void function (TextTagTable* table, TextTag* tag) nothrow tag_added;
31908 extern (C) void function (TextTagTable* table, TextTag* tag) nothrow tag_removed;
31909 extern (C) void function () nothrow _gtk_reserved1;
31910 extern (C) void function () nothrow _gtk_reserved2;
31911 extern (C) void function () nothrow _gtk_reserved3;
31912 extern (C) void function () nothrow _gtk_reserved4;
31915 extern (C) alias void function (TextTag* tag, void* data) nothrow TextTagTableForeach;
31917 struct TextView /* : Container */ {
31918 mixin Atk.ImplementorIface.__interface__;
31919 mixin Buildable.__interface__;
31920 alias parent_instance this;
31921 alias parent_instance super_;
31922 alias parent_instance container;
31923 Container parent_instance;
31924 void** layout;
31925 TextBuffer* buffer;
31926 uint selection_drag_handler, scroll_timeout;
31927 int pixels_above_lines, pixels_below_lines, pixels_inside_wrap;
31928 WrapMode wrap_mode;
31929 Justification justify;
31930 int left_margin, right_margin, indent;
31931 Pango.TabArray* tabs;
31932 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
31933 uint, "editable", 1,
31934 uint, "overwrite_mode", 1,
31935 uint, "cursor_visible", 1,
31936 uint, "need_im_reset", 1,
31937 uint, "accepts_tab", 1,
31938 uint, "width_changed", 1,
31939 uint, "onscreen_validated", 1,
31940 uint, "mouse_cursor_obscured", 1,
31941 uint, "__dummy32A", 24));
31942 TextWindow* text_window, left_window, right_window, top_window, bottom_window;
31943 Adjustment* hadjustment, vadjustment;
31944 int xoffset, yoffset, width, height, virtual_cursor_x, virtual_cursor_y;
31945 TextMark* first_para_mark;
31946 int first_para_pixels;
31947 TextMark* dnd_mark;
31948 uint blink_timeout, first_validate_idle, incremental_validate_idle;
31949 IMContext* im_context;
31950 Widget* popup_menu;
31951 int drag_start_x, drag_start_y;
31952 GLib2.SList* children;
31953 TextPendingScroll* pending_scroll;
31954 int pending_place_cursor_button;
31957 // Creates a new #GtkTextView. If you don't call gtk_text_view_set_buffer()
31958 // before using the text view, an empty default buffer will be created
31959 // for you. Get the buffer with gtk_text_view_get_buffer(). If you want
31960 // to specify your own buffer, consider gtk_text_view_new_with_buffer().
31961 // RETURNS: a new #GtkTextView
31962 static TextView* new_()() nothrow {
31963 return gtk_text_view_new();
31965 static auto opCall()() {
31966 return gtk_text_view_new();
31969 // Creates a new #GtkTextView widget displaying the buffer
31970 // @buffer. One buffer can be shared among many widgets.
31971 // @buffer may be %NULL to create a default buffer, in which case
31972 // this function is equivalent to gtk_text_view_new(). The
31973 // text view adds its own reference count to the buffer; it does not
31974 // take over an existing reference.
31975 // RETURNS: a new #GtkTextView.
31976 // <buffer>: a #GtkTextBuffer
31977 static TextView* new_with_buffer(AT0)(AT0 /*TextBuffer*/ buffer) nothrow {
31978 return gtk_text_view_new_with_buffer(UpCast!(TextBuffer*)(buffer));
31980 static auto opCall(AT0)(AT0 /*TextBuffer*/ buffer) {
31981 return gtk_text_view_new_with_buffer(UpCast!(TextBuffer*)(buffer));
31984 // Adds a child widget in the text buffer, at the given @anchor.
31985 // <child>: a #GtkWidget
31986 // <anchor>: a #GtkTextChildAnchor in the #GtkTextBuffer for @text_view
31987 void add_child_at_anchor(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*TextChildAnchor*/ anchor) nothrow {
31988 gtk_text_view_add_child_at_anchor(&this, UpCast!(Widget*)(child), UpCast!(TextChildAnchor*)(anchor));
31991 // Adds a child at fixed coordinates in one of the text widget's
31992 // windows. The window must have nonzero size (see
31993 // gtk_text_view_set_border_window_size()). Note that the child
31994 // coordinates are given relative to the #GdkWindow in question, and
31995 // that these coordinates have no sane relationship to scrolling. When
31996 // placing a child in #GTK_TEXT_WINDOW_WIDGET, scrolling is
31997 // irrelevant, the child floats above all scrollable areas. But when
31998 // placing a child in one of the scrollable windows (border windows or
31999 // text window), you'll need to compute the child's correct position
32000 // in buffer coordinates any time scrolling occurs or buffer changes
32001 // occur, and then call gtk_text_view_move_child() to update the
32002 // child's position. Unfortunately there's no good way to detect that
32003 // scrolling has occurred, using the current API; a possible hack
32004 // would be to update all child positions when the scroll adjustments
32005 // change or the text buffer changes. See bug 64518 on
32006 // bugzilla.gnome.org for status of fixing this issue.
32007 // <child>: a #GtkWidget
32008 // <which_window>: which window the child should appear in
32009 // <xpos>: X position of child in window coordinates
32010 // <ypos>: Y position of child in window coordinates
32011 void add_child_in_window(AT0)(AT0 /*Widget*/ child, TextWindowType which_window, int xpos, int ypos) nothrow {
32012 gtk_text_view_add_child_in_window(&this, UpCast!(Widget*)(child), which_window, xpos, ypos);
32015 // Moves the given @iter backward by one display (wrapped) line.
32016 // A display line is different from a paragraph. Paragraphs are
32017 // separated by newlines or other paragraph separator characters.
32018 // Display lines are created by line-wrapping a paragraph. If
32019 // wrapping is turned off, display lines and paragraphs will be the
32020 // same. Display lines are divided differently for each view, since
32021 // they depend on the view's width; paragraphs are the same in all
32022 // views, since they depend on the contents of the #GtkTextBuffer.
32023 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
32024 // <iter>: a #GtkTextIter
32025 int backward_display_line(AT0)(AT0 /*TextIter*/ iter) nothrow {
32026 return gtk_text_view_backward_display_line(&this, UpCast!(TextIter*)(iter));
32029 // Moves the given @iter backward to the next display line start.
32030 // A display line is different from a paragraph. Paragraphs are
32031 // separated by newlines or other paragraph separator characters.
32032 // Display lines are created by line-wrapping a paragraph. If
32033 // wrapping is turned off, display lines and paragraphs will be the
32034 // same. Display lines are divided differently for each view, since
32035 // they depend on the view's width; paragraphs are the same in all
32036 // views, since they depend on the contents of the #GtkTextBuffer.
32037 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
32038 // <iter>: a #GtkTextIter
32039 int backward_display_line_start(AT0)(AT0 /*TextIter*/ iter) nothrow {
32040 return gtk_text_view_backward_display_line_start(&this, UpCast!(TextIter*)(iter));
32043 // Converts coordinate (@buffer_x, @buffer_y) to coordinates for the window
32044 // @win, and stores the result in (@window_x, @window_y).
32046 // Note that you can't convert coordinates for a nonexisting window (see
32047 // gtk_text_view_set_border_window_size()).
32048 // <win>: a #GtkTextWindowType except #GTK_TEXT_WINDOW_PRIVATE
32049 // <buffer_x>: buffer x coordinate
32050 // <buffer_y>: buffer y coordinate
32051 // <window_x>: window x coordinate return location or %NULL
32052 // <window_y>: window y coordinate return location or %NULL
32053 void buffer_to_window_coords()(TextWindowType win, int buffer_x, int buffer_y, /*out*/ int* window_x=null, /*out*/ int* window_y=null) nothrow {
32054 gtk_text_view_buffer_to_window_coords(&this, win, buffer_x, buffer_y, window_x, window_y);
32057 // Moves the given @iter forward by one display (wrapped) line.
32058 // A display line is different from a paragraph. Paragraphs are
32059 // separated by newlines or other paragraph separator characters.
32060 // Display lines are created by line-wrapping a paragraph. If
32061 // wrapping is turned off, display lines and paragraphs will be the
32062 // same. Display lines are divided differently for each view, since
32063 // they depend on the view's width; paragraphs are the same in all
32064 // views, since they depend on the contents of the #GtkTextBuffer.
32065 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
32066 // <iter>: a #GtkTextIter
32067 int forward_display_line(AT0)(AT0 /*TextIter*/ iter) nothrow {
32068 return gtk_text_view_forward_display_line(&this, UpCast!(TextIter*)(iter));
32071 // Moves the given @iter forward to the next display line end.
32072 // A display line is different from a paragraph. Paragraphs are
32073 // separated by newlines or other paragraph separator characters.
32074 // Display lines are created by line-wrapping a paragraph. If
32075 // wrapping is turned off, display lines and paragraphs will be the
32076 // same. Display lines are divided differently for each view, since
32077 // they depend on the view's width; paragraphs are the same in all
32078 // views, since they depend on the contents of the #GtkTextBuffer.
32079 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
32080 // <iter>: a #GtkTextIter
32081 int forward_display_line_end(AT0)(AT0 /*TextIter*/ iter) nothrow {
32082 return gtk_text_view_forward_display_line_end(&this, UpCast!(TextIter*)(iter));
32085 // VERSION: 2.4
32086 // Returns whether pressing the Tab key inserts a tab characters.
32087 // gtk_text_view_set_accepts_tab().
32089 // %FALSE if pressing the Tab key moves the keyboard focus.
32090 // RETURNS: %TRUE if pressing the Tab key inserts a tab character,
32091 int get_accepts_tab()() nothrow {
32092 return gtk_text_view_get_accepts_tab(&this);
32095 // Gets the width of the specified border window. See
32096 // gtk_text_view_set_border_window_size().
32097 // RETURNS: width of window
32098 // <type>: window to return size from
32099 int get_border_window_size()(TextWindowType type) nothrow {
32100 return gtk_text_view_get_border_window_size(&this, type);
32103 // Returns the #GtkTextBuffer being displayed by this text view.
32104 // The reference count on the buffer is not incremented; the caller
32105 // of this function won't own a new reference.
32106 // RETURNS: a #GtkTextBuffer
32107 TextBuffer* get_buffer()() nothrow {
32108 return gtk_text_view_get_buffer(&this);
32111 // Find out whether the cursor is being displayed.
32112 // RETURNS: whether the insertion mark is visible
32113 int get_cursor_visible()() nothrow {
32114 return gtk_text_view_get_cursor_visible(&this);
32117 // Obtains a copy of the default text attributes. These are the
32118 // attributes used for text unless a tag overrides them.
32119 // You'd typically pass the default attributes in to
32120 // gtk_text_iter_get_attributes() in order to get the
32121 // attributes in effect at a given text position.
32123 // The return value is a copy owned by the caller of this function,
32124 // and should be freed.
32125 // RETURNS: a new #GtkTextAttributes
32126 TextAttributes* /*new*/ get_default_attributes()() nothrow {
32127 return gtk_text_view_get_default_attributes(&this);
32130 // Returns the default editability of the #GtkTextView. Tags in the
32131 // buffer may override this setting for some ranges of text.
32132 // RETURNS: whether text is editable by default
32133 int get_editable()() nothrow {
32134 return gtk_text_view_get_editable(&this);
32137 // VERSION: 2.22
32138 // Gets the horizontal-scrolling #GtkAdjustment.
32139 // RETURNS: pointer to the horizontal #GtkAdjustment
32140 Adjustment* get_hadjustment()() nothrow {
32141 return gtk_text_view_get_hadjustment(&this);
32144 // Gets the default indentation of paragraphs in @text_view.
32145 // Tags in the view's buffer may override the default.
32146 // The indentation may be negative.
32147 // RETURNS: number of pixels of indentation
32148 int get_indent()() nothrow {
32149 return gtk_text_view_get_indent(&this);
32152 // Retrieves the iterator at buffer coordinates @x and @y. Buffer
32153 // coordinates are coordinates for the entire buffer, not just the
32154 // currently-displayed portion. If you have coordinates from an
32155 // event, you have to convert those to buffer coordinates with
32156 // gtk_text_view_window_to_buffer_coords().
32157 // <iter>: a #GtkTextIter
32158 // <x>: x position, in buffer coordinates
32159 // <y>: y position, in buffer coordinates
32160 void get_iter_at_location(AT0)(/*out*/ AT0 /*TextIter*/ iter, int x, int y) nothrow {
32161 gtk_text_view_get_iter_at_location(&this, UpCast!(TextIter*)(iter), x, y);
32164 // VERSION: 2.6
32165 // Retrieves the iterator pointing to the character at buffer
32166 // coordinates @x and @y. Buffer coordinates are coordinates for
32167 // the entire buffer, not just the currently-displayed portion.
32168 // If you have coordinates from an event, you have to convert
32169 // those to buffer coordinates with
32170 // gtk_text_view_window_to_buffer_coords().
32172 // Note that this is different from gtk_text_view_get_iter_at_location(),
32173 // which returns cursor locations, i.e. positions <emphasis>between</emphasis>
32174 // characters.
32175 // <iter>: a #GtkTextIter
32176 // <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.
32177 // <x>: x position, in buffer coordinates
32178 // <y>: y position, in buffer coordinates
32179 void get_iter_at_position(AT0)(/*out*/ AT0 /*TextIter*/ iter, /*out*/ int* trailing, int x, int y) nothrow {
32180 gtk_text_view_get_iter_at_position(&this, UpCast!(TextIter*)(iter), trailing, x, y);
32183 // Gets a rectangle which roughly contains the character at @iter.
32184 // The rectangle position is in buffer coordinates; use
32185 // gtk_text_view_buffer_to_window_coords() to convert these
32186 // coordinates to coordinates for one of the windows in the text view.
32187 // <iter>: a #GtkTextIter
32188 // <location>: bounds of the character at @iter
32189 void get_iter_location(AT0, AT1)(AT0 /*TextIter*/ iter, /*out*/ AT1 /*Gdk2.Rectangle*/ location) nothrow {
32190 gtk_text_view_get_iter_location(&this, UpCast!(TextIter*)(iter), UpCast!(Gdk2.Rectangle*)(location));
32193 // Gets the default justification of paragraphs in @text_view.
32194 // Tags in the buffer may override the default.
32195 // RETURNS: default justification
32196 Justification get_justification()() nothrow {
32197 return gtk_text_view_get_justification(&this);
32200 // Gets the default left margin size of paragraphs in the @text_view.
32201 // Tags in the buffer may override the default.
32202 // RETURNS: left margin in pixels
32203 int get_left_margin()() nothrow {
32204 return gtk_text_view_get_left_margin(&this);
32207 // Gets the #GtkTextIter at the start of the line containing
32208 // the coordinate @y. @y is in buffer coordinates, convert from
32209 // window coordinates with gtk_text_view_window_to_buffer_coords().
32210 // If non-%NULL, @line_top will be filled with the coordinate of the top
32211 // edge of the line.
32212 // <target_iter>: a #GtkTextIter
32213 // <y>: a y coordinate
32214 // <line_top>: return location for top coordinate of the line
32215 void get_line_at_y(AT0)(/*out*/ AT0 /*TextIter*/ target_iter, int y, /*out*/ int* line_top) nothrow {
32216 gtk_text_view_get_line_at_y(&this, UpCast!(TextIter*)(target_iter), y, line_top);
32219 // Gets the y coordinate of the top of the line containing @iter,
32220 // and the height of the line. The coordinate is a buffer coordinate;
32221 // convert to window coordinates with gtk_text_view_buffer_to_window_coords().
32222 // <iter>: a #GtkTextIter
32223 // <y>: return location for a y coordinate
32224 // <height>: return location for a height
32225 void get_line_yrange(AT0)(AT0 /*TextIter*/ iter, /*out*/ int* y, /*out*/ int* height) nothrow {
32226 gtk_text_view_get_line_yrange(&this, UpCast!(TextIter*)(iter), y, height);
32229 // VERSION: 2.4
32230 // Returns whether the #GtkTextView is in overwrite mode or not.
32231 // RETURNS: whether @text_view is in overwrite mode or not.
32232 int get_overwrite()() nothrow {
32233 return gtk_text_view_get_overwrite(&this);
32236 // Gets the default number of pixels to put above paragraphs.
32237 // RETURNS: default number of pixels above paragraphs
32238 int get_pixels_above_lines()() nothrow {
32239 return gtk_text_view_get_pixels_above_lines(&this);
32242 // Gets the value set by gtk_text_view_set_pixels_below_lines().
32243 // RETURNS: default number of blank pixels below paragraphs
32244 int get_pixels_below_lines()() nothrow {
32245 return gtk_text_view_get_pixels_below_lines(&this);
32248 // Gets the value set by gtk_text_view_set_pixels_inside_wrap().
32249 // RETURNS: default number of pixels of blank space between wrapped lines
32250 int get_pixels_inside_wrap()() nothrow {
32251 return gtk_text_view_get_pixels_inside_wrap(&this);
32254 // Gets the default right margin for text in @text_view. Tags
32255 // in the buffer may override the default.
32256 // RETURNS: right margin in pixels
32257 int get_right_margin()() nothrow {
32258 return gtk_text_view_get_right_margin(&this);
32261 // Gets the default tabs for @text_view. Tags in the buffer may
32262 // override the defaults. The returned array will be %NULL if
32263 // "standard" (8-space) tabs are used. Free the return value
32264 // with pango_tab_array_free().
32266 // tabs are used; must be freed with pango_tab_array_free().
32267 // RETURNS: copy of default tab array, or %NULL if "standard"
32268 Pango.TabArray* /*new*/ get_tabs()() nothrow {
32269 return gtk_text_view_get_tabs(&this);
32272 // VERSION: 2.22
32273 // Gets the vertical-scrolling #GtkAdjustment.
32274 // RETURNS: pointer to the vertical #GtkAdjustment
32275 Adjustment* get_vadjustment()() nothrow {
32276 return gtk_text_view_get_vadjustment(&this);
32279 // Fills @visible_rect with the currently-visible
32280 // region of the buffer, in buffer coordinates. Convert to window coordinates
32281 // with gtk_text_view_buffer_to_window_coords().
32282 // <visible_rect>: rectangle to fill
32283 void get_visible_rect(AT0)(/*out*/ AT0 /*Gdk2.Rectangle*/ visible_rect) nothrow {
32284 gtk_text_view_get_visible_rect(&this, UpCast!(Gdk2.Rectangle*)(visible_rect));
32287 // Retrieves the #GdkWindow corresponding to an area of the text view;
32288 // possible windows include the overall widget window, child windows
32289 // on the left, right, top, bottom, and the window that displays the
32290 // text buffer. Windows are %NULL and nonexistent if their width or
32291 // height is 0, and are nonexistent before the widget has been
32292 // realized.
32293 // RETURNS: a #GdkWindow, or %NULL
32294 // <win>: window to get
32295 Gdk2.Window* get_window()(TextWindowType win) nothrow {
32296 return gtk_text_view_get_window(&this, win);
32299 // Usually used to find out which window an event corresponds to.
32300 // If you connect to an event signal on @text_view, this function
32301 // should be called on <literal>event-&gt;window</literal> to
32302 // see which window it was.
32303 // RETURNS: the window type.
32304 // <window>: a window type
32305 TextWindowType get_window_type(AT0)(AT0 /*Gdk2.Window*/ window) nothrow {
32306 return gtk_text_view_get_window_type(&this, UpCast!(Gdk2.Window*)(window));
32309 // Gets the line wrapping for the view.
32310 // RETURNS: the line wrap setting
32311 WrapMode get_wrap_mode()() nothrow {
32312 return gtk_text_view_get_wrap_mode(&this);
32315 // VERSION: 2.22
32316 // Allow the #GtkTextView input method to internally handle key press
32317 // and release events. If this function returns %TRUE, then no further
32318 // processing should be done for this key event. See
32319 // gtk_im_context_filter_keypress().
32321 // Note that you are expected to call this function from your handler
32322 // when overriding key event handling. This is needed in the case when
32323 // you need to insert your own key handling between the input method
32324 // and the default key event handling of the #GtkTextView.
32326 // |[
32327 // static gboolean
32328 // gtk_foo_bar_key_press_event (GtkWidget *widget,
32329 // GdkEventKey *event)
32330 // {
32331 // if ((key->keyval == GDK_Return || key->keyval == GDK_KP_Enter))
32332 // {
32333 // if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (view), event))
32334 // return TRUE;
32335 // }
32337 // /&ast; Do some stuff &ast;/
32339 // return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event);
32340 // }
32341 // ]|
32342 // RETURNS: %TRUE if the input method handled the key event.
32343 // <event>: the key event
32344 int im_context_filter_keypress(AT0)(AT0 /*Gdk2.EventKey*/ event) nothrow {
32345 return gtk_text_view_im_context_filter_keypress(&this, UpCast!(Gdk2.EventKey*)(event));
32348 // Updates the position of a child, as for gtk_text_view_add_child_in_window().
32349 // <child>: child widget already added to the text view
32350 // <xpos>: new X position in window coordinates
32351 // <ypos>: new Y position in window coordinates
32352 void move_child(AT0)(AT0 /*Widget*/ child, int xpos, int ypos) nothrow {
32353 gtk_text_view_move_child(&this, UpCast!(Widget*)(child), xpos, ypos);
32356 // Moves a mark within the buffer so that it's
32357 // located within the currently-visible text area.
32358 // RETURNS: %TRUE if the mark moved (wasn't already onscreen)
32359 // <mark>: a #GtkTextMark
32360 int move_mark_onscreen(AT0)(AT0 /*TextMark*/ mark) nothrow {
32361 return gtk_text_view_move_mark_onscreen(&this, UpCast!(TextMark*)(mark));
32364 // Move the iterator a given number of characters visually, treating
32365 // it as the strong cursor position. If @count is positive, then the
32366 // new strong cursor position will be @count positions to the right of
32367 // the old cursor position. If @count is negative then the new strong
32368 // cursor position will be @count positions to the left of the old
32369 // cursor position.
32371 // In the presence of bi-directional text, the correspondence
32372 // between logical and visual order will depend on the direction
32373 // of the current run, and there may be jumps when the cursor
32374 // is moved off of the end of a run.
32375 // RETURNS: %TRUE if @iter moved and is not on the end iterator
32376 // <iter>: a #GtkTextIter
32377 // <count>: number of characters to move (negative moves left, positive moves right)
32378 int move_visually(AT0)(AT0 /*TextIter*/ iter, int count) nothrow {
32379 return gtk_text_view_move_visually(&this, UpCast!(TextIter*)(iter), count);
32382 // Moves the cursor to the currently visible region of the
32383 // buffer, it it isn't there already.
32384 // RETURNS: %TRUE if the cursor had to be moved.
32385 int place_cursor_onscreen()() nothrow {
32386 return gtk_text_view_place_cursor_onscreen(&this);
32389 // VERSION: 2.22
32390 // Reset the input method context of the text view if needed.
32392 // This can be necessary in the case where modifying the buffer
32393 // would confuse on-going input method behavior.
32394 void reset_im_context()() nothrow {
32395 gtk_text_view_reset_im_context(&this);
32398 // Scrolls @text_view the minimum distance such that @mark is contained
32399 // within the visible area of the widget.
32400 // <mark>: a mark in the buffer for @text_view
32401 void scroll_mark_onscreen(AT0)(AT0 /*TextMark*/ mark) nothrow {
32402 gtk_text_view_scroll_mark_onscreen(&this, UpCast!(TextMark*)(mark));
32405 // Scrolls @text_view so that @iter is on the screen in the position
32406 // indicated by @xalign and @yalign. An alignment of 0.0 indicates
32407 // left or top, 1.0 indicates right or bottom, 0.5 means center.
32408 // If @use_align is %FALSE, the text scrolls the minimal distance to
32409 // get the mark onscreen, possibly not scrolling at all. The effective
32410 // screen for purposes of this function is reduced by a margin of size
32411 // @within_margin.
32413 // Note that this function uses the currently-computed height of the
32414 // lines in the text buffer. Line heights are computed in an idle
32415 // handler; so this function may not have the desired effect if it's
32416 // called before the height computations. To avoid oddness, consider
32417 // using gtk_text_view_scroll_to_mark() which saves a point to be
32418 // scrolled to after line validation.
32419 // RETURNS: %TRUE if scrolling occurred
32420 // <iter>: a #GtkTextIter
32421 // <within_margin>: margin as a [0.0,0.5) fraction of screen size
32422 // <use_align>: whether to use alignment arguments (if %FALSE, just get the mark onscreen)
32423 // <xalign>: horizontal alignment of mark within visible area
32424 // <yalign>: vertical alignment of mark within visible area
32425 int scroll_to_iter(AT0)(AT0 /*TextIter*/ iter, double within_margin, int use_align, double xalign, double yalign) nothrow {
32426 return gtk_text_view_scroll_to_iter(&this, UpCast!(TextIter*)(iter), within_margin, use_align, xalign, yalign);
32429 // Scrolls @text_view so that @mark is on the screen in the position
32430 // indicated by @xalign and @yalign. An alignment of 0.0 indicates
32431 // left or top, 1.0 indicates right or bottom, 0.5 means center.
32432 // If @use_align is %FALSE, the text scrolls the minimal distance to
32433 // get the mark onscreen, possibly not scrolling at all. The effective
32434 // screen for purposes of this function is reduced by a margin of size
32435 // @within_margin.
32436 // <mark>: a #GtkTextMark
32437 // <within_margin>: margin as a [0.0,0.5) fraction of screen size
32438 // <use_align>: whether to use alignment arguments (if %FALSE, just get the mark onscreen)
32439 // <xalign>: horizontal alignment of mark within visible area
32440 // <yalign>: vertical alignment of mark within visible area
32441 void scroll_to_mark(AT0)(AT0 /*TextMark*/ mark, double within_margin, int use_align, double xalign, double yalign) nothrow {
32442 gtk_text_view_scroll_to_mark(&this, UpCast!(TextMark*)(mark), within_margin, use_align, xalign, yalign);
32445 // VERSION: 2.4
32446 // Sets the behavior of the text widget when the Tab key is pressed.
32447 // If @accepts_tab is %TRUE, a tab character is inserted. If @accepts_tab
32448 // is %FALSE the keyboard focus is moved to the next widget in the focus
32449 // chain.
32450 // <accepts_tab>: %TRUE if pressing the Tab key should insert a tab character, %FALSE, if pressing the Tab key should move the keyboard focus.
32451 void set_accepts_tab()(int accepts_tab) nothrow {
32452 gtk_text_view_set_accepts_tab(&this, accepts_tab);
32455 // Sets the width of %GTK_TEXT_WINDOW_LEFT or %GTK_TEXT_WINDOW_RIGHT,
32456 // or the height of %GTK_TEXT_WINDOW_TOP or %GTK_TEXT_WINDOW_BOTTOM.
32457 // Automatically destroys the corresponding window if the size is set
32458 // to 0, and creates the window if the size is set to non-zero. This
32459 // function can only be used for the "border windows," it doesn't work
32460 // with #GTK_TEXT_WINDOW_WIDGET, #GTK_TEXT_WINDOW_TEXT, or
32461 // #GTK_TEXT_WINDOW_PRIVATE.
32462 // <type>: window to affect
32463 // <size>: width or height of the window
32464 void set_border_window_size()(TextWindowType type, int size) nothrow {
32465 gtk_text_view_set_border_window_size(&this, type, size);
32468 // Sets @buffer as the buffer being displayed by @text_view. The previous
32469 // buffer displayed by the text view is unreferenced, and a reference is
32470 // added to @buffer. If you owned a reference to @buffer before passing it
32471 // to this function, you must remove that reference yourself; #GtkTextView
32472 // will not "adopt" it.
32473 // <buffer>: a #GtkTextBuffer
32474 void set_buffer(AT0)(AT0 /*TextBuffer*/ buffer=null) nothrow {
32475 gtk_text_view_set_buffer(&this, UpCast!(TextBuffer*)(buffer));
32478 // Toggles whether the insertion point is displayed. A buffer with no editable
32479 // text probably shouldn't have a visible cursor, so you may want to turn
32480 // the cursor off.
32481 // <setting>: whether to show the insertion cursor
32482 void set_cursor_visible()(int setting) nothrow {
32483 gtk_text_view_set_cursor_visible(&this, setting);
32486 // Sets the default editability of the #GtkTextView. You can override
32487 // this default setting with tags in the buffer, using the "editable"
32488 // attribute of tags.
32489 // <setting>: whether it's editable
32490 void set_editable()(int setting) nothrow {
32491 gtk_text_view_set_editable(&this, setting);
32494 // Sets the default indentation for paragraphs in @text_view.
32495 // Tags in the buffer may override the default.
32496 // <indent>: indentation in pixels
32497 void set_indent()(int indent) nothrow {
32498 gtk_text_view_set_indent(&this, indent);
32501 // Sets the default justification of text in @text_view.
32502 // Tags in the view's buffer may override the default.
32503 // <justification>: justification
32504 void set_justification()(Justification justification) nothrow {
32505 gtk_text_view_set_justification(&this, justification);
32508 // Sets the default left margin for text in @text_view.
32509 // Tags in the buffer may override the default.
32510 // <left_margin>: left margin in pixels
32511 void set_left_margin()(int left_margin) nothrow {
32512 gtk_text_view_set_left_margin(&this, left_margin);
32515 // VERSION: 2.4
32516 // Changes the #GtkTextView overwrite mode.
32517 // <overwrite>: %TRUE to turn on overwrite mode, %FALSE to turn it off
32518 void set_overwrite()(int overwrite) nothrow {
32519 gtk_text_view_set_overwrite(&this, overwrite);
32522 // Sets the default number of blank pixels above paragraphs in @text_view.
32523 // Tags in the buffer for @text_view may override the defaults.
32524 // <pixels_above_lines>: pixels above paragraphs
32525 void set_pixels_above_lines()(int pixels_above_lines) nothrow {
32526 gtk_text_view_set_pixels_above_lines(&this, pixels_above_lines);
32529 // Sets the default number of pixels of blank space
32530 // to put below paragraphs in @text_view. May be overridden
32531 // by tags applied to @text_view's buffer.
32532 // <pixels_below_lines>: pixels below paragraphs
32533 void set_pixels_below_lines()(int pixels_below_lines) nothrow {
32534 gtk_text_view_set_pixels_below_lines(&this, pixels_below_lines);
32537 // Sets the default number of pixels of blank space to leave between
32538 // display/wrapped lines within a paragraph. May be overridden by
32539 // tags in @text_view's buffer.
32540 // <pixels_inside_wrap>: default number of pixels between wrapped lines
32541 void set_pixels_inside_wrap()(int pixels_inside_wrap) nothrow {
32542 gtk_text_view_set_pixels_inside_wrap(&this, pixels_inside_wrap);
32545 // Sets the default right margin for text in the text view.
32546 // Tags in the buffer may override the default.
32547 // <right_margin>: right margin in pixels
32548 void set_right_margin()(int right_margin) nothrow {
32549 gtk_text_view_set_right_margin(&this, right_margin);
32552 // Sets the default tab stops for paragraphs in @text_view.
32553 // Tags in the buffer may override the default.
32554 // <tabs>: tabs as a #PangoTabArray
32555 void set_tabs(AT0)(AT0 /*Pango.TabArray*/ tabs) nothrow {
32556 gtk_text_view_set_tabs(&this, UpCast!(Pango.TabArray*)(tabs));
32559 // Sets the line wrapping for the view.
32560 // <wrap_mode>: a #GtkWrapMode
32561 void set_wrap_mode()(WrapMode wrap_mode) nothrow {
32562 gtk_text_view_set_wrap_mode(&this, wrap_mode);
32565 // Determines whether @iter is at the start of a display line.
32566 // See gtk_text_view_forward_display_line() for an explanation of
32567 // display lines vs. paragraphs.
32568 // RETURNS: %TRUE if @iter begins a wrapped line
32569 // <iter>: a #GtkTextIter
32570 int starts_display_line(AT0)(AT0 /*TextIter*/ iter) nothrow {
32571 return gtk_text_view_starts_display_line(&this, UpCast!(TextIter*)(iter));
32574 // Converts coordinates on the window identified by @win to buffer
32575 // coordinates, storing the result in (@buffer_x,@buffer_y).
32577 // Note that you can't convert coordinates for a nonexisting window (see
32578 // gtk_text_view_set_border_window_size()).
32579 // <win>: a #GtkTextWindowType except #GTK_TEXT_WINDOW_PRIVATE
32580 // <window_x>: window x coordinate
32581 // <window_y>: window y coordinate
32582 // <buffer_x>: buffer x coordinate return location or %NULL
32583 // <buffer_y>: buffer y coordinate return location or %NULL
32584 void window_to_buffer_coords()(TextWindowType win, int window_x, int window_y, /*out*/ int* buffer_x=null, /*out*/ int* buffer_y=null) nothrow {
32585 gtk_text_view_window_to_buffer_coords(&this, win, window_x, window_y, buffer_x, buffer_y);
32588 // The ::backspace signal is a
32589 // <link linkend="keybinding-signals">keybinding signal</link>
32590 // which gets emitted when the user asks for it.
32592 // The default bindings for this signal are
32593 // Backspace and Shift-Backspace.
32594 extern (C) alias static void function (TextView* this_, void* user_data=null) nothrow signal_backspace;
32596 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32597 return super_.signal_connect!name(cb, data, cf);
32600 ulong signal_connect(string name:"backspace", CB/*:signal_backspace*/)
32601 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32602 if (is(typeof(cb)==signal_backspace)||_ttmm!(CB, signal_backspace)()) {
32603 return signal_connect_data!()(&this, cast(char*)"backspace",
32604 cast(GObject2.Callback)cb, data, null, cf);
32607 // The ::copy-clipboard signal is a
32608 // <link linkend="keybinding-signals">keybinding signal</link>
32609 // which gets emitted to copy the selection to the clipboard.
32611 // The default bindings for this signal are
32612 // Ctrl-c and Ctrl-Insert.
32613 extern (C) alias static void function (TextView* this_, void* user_data=null) nothrow signal_copy_clipboard;
32614 ulong signal_connect(string name:"copy-clipboard", CB/*:signal_copy_clipboard*/)
32615 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32616 if (is(typeof(cb)==signal_copy_clipboard)||_ttmm!(CB, signal_copy_clipboard)()) {
32617 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
32618 cast(GObject2.Callback)cb, data, null, cf);
32621 // The ::cut-clipboard signal is a
32622 // <link linkend="keybinding-signals">keybinding signal</link>
32623 // which gets emitted to cut the selection to the clipboard.
32625 // The default bindings for this signal are
32626 // Ctrl-x and Shift-Delete.
32627 extern (C) alias static void function (TextView* this_, void* user_data=null) nothrow signal_cut_clipboard;
32628 ulong signal_connect(string name:"cut-clipboard", CB/*:signal_cut_clipboard*/)
32629 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32630 if (is(typeof(cb)==signal_cut_clipboard)||_ttmm!(CB, signal_cut_clipboard)()) {
32631 return signal_connect_data!()(&this, cast(char*)"cut-clipboard",
32632 cast(GObject2.Callback)cb, data, null, cf);
32635 // The ::delete-from-cursor signal is a
32636 // <link linkend="keybinding-signals">keybinding signal</link>
32637 // which gets emitted when the user initiates a text deletion.
32639 // If the @type is %GTK_DELETE_CHARS, GTK+ deletes the selection
32640 // if there is one, otherwise it deletes the requested number
32641 // of characters.
32643 // The default bindings for this signal are
32644 // Delete for deleting a character, Ctrl-Delete for
32645 // deleting a word and Ctrl-Backspace for deleting a word
32646 // backwords.
32647 // <type>: the granularity of the deletion, as a #GtkDeleteType
32648 // <count>: the number of @type units to delete
32649 extern (C) alias static void function (TextView* this_, DeleteType* type, int count, void* user_data=null) nothrow signal_delete_from_cursor;
32650 ulong signal_connect(string name:"delete-from-cursor", CB/*:signal_delete_from_cursor*/)
32651 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32652 if (is(typeof(cb)==signal_delete_from_cursor)||_ttmm!(CB, signal_delete_from_cursor)()) {
32653 return signal_connect_data!()(&this, cast(char*)"delete-from-cursor",
32654 cast(GObject2.Callback)cb, data, null, cf);
32657 // The ::insert-at-cursor signal is a
32658 // <link linkend="keybinding-signals">keybinding signal</link>
32659 // which gets emitted when the user initiates the insertion of a
32660 // fixed string at the cursor.
32662 // This signal has no default bindings.
32663 // <string>: the string to insert
32664 extern (C) alias static void function (TextView* this_, char* string_, void* user_data=null) nothrow signal_insert_at_cursor;
32665 ulong signal_connect(string name:"insert-at-cursor", CB/*:signal_insert_at_cursor*/)
32666 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32667 if (is(typeof(cb)==signal_insert_at_cursor)||_ttmm!(CB, signal_insert_at_cursor)()) {
32668 return signal_connect_data!()(&this, cast(char*)"insert-at-cursor",
32669 cast(GObject2.Callback)cb, data, null, cf);
32672 // The ::move-cursor signal is a
32673 // <link linkend="keybinding-signals">keybinding signal</link>
32674 // which gets emitted when the user initiates a cursor movement.
32675 // If the cursor is not visible in @text_view, this signal causes
32676 // the viewport to be moved instead.
32678 // Applications should not connect to it, but may emit it with
32679 // g_signal_emit_by_name() if they need to control the cursor
32680 // programmatically.
32682 // The default bindings for this signal come in two variants,
32683 // the variant with the Shift modifier extends the selection,
32684 // the variant without the Shift modifer does not.
32685 // There are too many key combinations to list them all here.
32686 // <itemizedlist>
32687 // <listitem>Arrow keys move by individual characters/lines</listitem>
32688 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
32689 // <listitem>Home/End keys move to the ends of the buffer</listitem>
32690 // <listitem>PageUp/PageDown keys move vertically by pages</listitem>
32691 // <listitem>Ctrl-PageUp/PageDown keys move horizontally by pages</listitem>
32692 // </itemizedlist>
32693 // <step>: the granularity of the move, as a #GtkMovementStep
32694 // <count>: the number of @step units to move
32695 // <extend_selection>: %TRUE if the move should extend the selection
32696 extern (C) alias static void function (TextView* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) nothrow signal_move_cursor;
32697 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)
32698 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32699 if (is(typeof(cb)==signal_move_cursor)||_ttmm!(CB, signal_move_cursor)()) {
32700 return signal_connect_data!()(&this, cast(char*)"move-cursor",
32701 cast(GObject2.Callback)cb, data, null, cf);
32704 // The ::move-viewport signal is a
32705 // <link linkend="keybinding-signals">keybinding signal</link>
32706 // which can be bound to key combinations to allow the user
32707 // to move the viewport, i.e. change what part of the text view
32708 // is visible in a containing scrolled window.
32710 // There are no default bindings for this signal.
32711 // <step>: the granularity of the move, as a #GtkMovementStep
32712 // <count>: the number of @step units to move
32713 extern (C) alias static void function (TextView* this_, ScrollStep* step, int count, void* user_data=null) nothrow signal_move_viewport;
32714 ulong signal_connect(string name:"move-viewport", CB/*:signal_move_viewport*/)
32715 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32716 if (is(typeof(cb)==signal_move_viewport)||_ttmm!(CB, signal_move_viewport)()) {
32717 return signal_connect_data!()(&this, cast(char*)"move-viewport",
32718 cast(GObject2.Callback)cb, data, null, cf);
32721 // The ::page-horizontally signal is a
32722 // <link linkend="keybinding-signals">keybinding signal</link>
32723 // which can be bound to key combinations to allow the user
32724 // to initiate horizontal cursor movement by pages.
32726 // This signal should not be used anymore, instead use the
32727 // #GtkTextview::move-cursor signal with the #GTK_MOVEMENT_HORIZONTAL_PAGES
32728 // granularity.
32729 // <count>: the number of @step units to move
32730 // <extend_selection>: %TRUE if the move should extend the selection
32731 extern (C) alias static void function (TextView* this_, int count, c_int extend_selection, void* user_data=null) nothrow signal_page_horizontally;
32732 ulong signal_connect(string name:"page-horizontally", CB/*:signal_page_horizontally*/)
32733 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32734 if (is(typeof(cb)==signal_page_horizontally)||_ttmm!(CB, signal_page_horizontally)()) {
32735 return signal_connect_data!()(&this, cast(char*)"page-horizontally",
32736 cast(GObject2.Callback)cb, data, null, cf);
32739 // The ::paste-clipboard signal is a
32740 // <link linkend="keybinding-signals">keybinding signal</link>
32741 // which gets emitted to paste the contents of the clipboard
32742 // into the text view.
32744 // The default bindings for this signal are
32745 // Ctrl-v and Shift-Insert.
32746 extern (C) alias static void function (TextView* this_, void* user_data=null) nothrow signal_paste_clipboard;
32747 ulong signal_connect(string name:"paste-clipboard", CB/*:signal_paste_clipboard*/)
32748 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32749 if (is(typeof(cb)==signal_paste_clipboard)||_ttmm!(CB, signal_paste_clipboard)()) {
32750 return signal_connect_data!()(&this, cast(char*)"paste-clipboard",
32751 cast(GObject2.Callback)cb, data, null, cf);
32754 // The ::populate-popup signal gets emitted before showing the
32755 // context menu of the text view.
32757 // If you need to add items to the context menu, connect
32758 // to this signal and append your menuitems to the @menu.
32759 // <menu>: the menu that is being populated
32760 extern (C) alias static void function (TextView* this_, Menu* menu, void* user_data=null) nothrow signal_populate_popup;
32761 ulong signal_connect(string name:"populate-popup", CB/*:signal_populate_popup*/)
32762 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32763 if (is(typeof(cb)==signal_populate_popup)||_ttmm!(CB, signal_populate_popup)()) {
32764 return signal_connect_data!()(&this, cast(char*)"populate-popup",
32765 cast(GObject2.Callback)cb, data, null, cf);
32768 // VERSION: 2.20
32769 // If an input method is used, the typed text will not immediately
32770 // be committed to the buffer. So if you are interested in the text,
32771 // connect to this signal.
32773 // This signal is only emitted if the text at the given position
32774 // is actually editable.
32775 // <preedit>: the current preedit string
32776 extern (C) alias static void function (TextView* this_, char* preedit, void* user_data=null) nothrow signal_preedit_changed;
32777 ulong signal_connect(string name:"preedit-changed", CB/*:signal_preedit_changed*/)
32778 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32779 if (is(typeof(cb)==signal_preedit_changed)||_ttmm!(CB, signal_preedit_changed)()) {
32780 return signal_connect_data!()(&this, cast(char*)"preedit-changed",
32781 cast(GObject2.Callback)cb, data, null, cf);
32784 // The ::select-all signal is a
32785 // <link linkend="keybinding-signals">keybinding signal</link>
32786 // which gets emitted to select or unselect the complete
32787 // contents of the text view.
32789 // The default bindings for this signal are Ctrl-a and Ctrl-/
32790 // for selecting and Shift-Ctrl-a and Ctrl-\ for unselecting.
32791 // <select>: %TRUE to select, %FALSE to unselect
32792 extern (C) alias static void function (TextView* this_, c_int select, void* user_data=null) nothrow signal_select_all;
32793 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)
32794 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32795 if (is(typeof(cb)==signal_select_all)||_ttmm!(CB, signal_select_all)()) {
32796 return signal_connect_data!()(&this, cast(char*)"select-all",
32797 cast(GObject2.Callback)cb, data, null, cf);
32800 // The ::set-anchor signal is a
32801 // <link linkend="keybinding-signals">keybinding signal</link>
32802 // which gets emitted when the user initiates setting the "anchor"
32803 // mark. The "anchor" mark gets placed at the same position as the
32804 // "insert" mark.
32806 // This signal has no default bindings.
32807 extern (C) alias static void function (TextView* this_, void* user_data=null) nothrow signal_set_anchor;
32808 ulong signal_connect(string name:"set-anchor", CB/*:signal_set_anchor*/)
32809 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32810 if (is(typeof(cb)==signal_set_anchor)||_ttmm!(CB, signal_set_anchor)()) {
32811 return signal_connect_data!()(&this, cast(char*)"set-anchor",
32812 cast(GObject2.Callback)cb, data, null, cf);
32815 // Set the scroll adjustments for the text view. Usually scrolled containers
32816 // like #GtkScrolledWindow will emit this signal to connect two instances
32817 // of #GtkScrollbar to the scroll directions of the #GtkTextView.
32818 extern (C) alias static void function (TextView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) nothrow signal_set_scroll_adjustments;
32819 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)
32820 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32821 if (is(typeof(cb)==signal_set_scroll_adjustments)||_ttmm!(CB, signal_set_scroll_adjustments)()) {
32822 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
32823 cast(GObject2.Callback)cb, data, null, cf);
32826 // The ::toggle-cursor-visible signal is a
32827 // <link linkend="keybinding-signals">keybinding signal</link>
32828 // which gets emitted to toggle the visibility of the cursor.
32830 // The default binding for this signal is F7.
32831 extern (C) alias static void function (TextView* this_, void* user_data=null) nothrow signal_toggle_cursor_visible;
32832 ulong signal_connect(string name:"toggle-cursor-visible", CB/*:signal_toggle_cursor_visible*/)
32833 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32834 if (is(typeof(cb)==signal_toggle_cursor_visible)||_ttmm!(CB, signal_toggle_cursor_visible)()) {
32835 return signal_connect_data!()(&this, cast(char*)"toggle-cursor-visible",
32836 cast(GObject2.Callback)cb, data, null, cf);
32839 // The ::toggle-overwrite signal is a
32840 // <link linkend="keybinding-signals">keybinding signal</link>
32841 // which gets emitted to toggle the overwrite mode of the text view.
32843 // The default bindings for this signal is Insert.
32844 extern (C) alias static void function (TextView* this_, void* user_data=null) nothrow signal_toggle_overwrite;
32845 ulong signal_connect(string name:"toggle-overwrite", CB/*:signal_toggle_overwrite*/)
32846 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32847 if (is(typeof(cb)==signal_toggle_overwrite)||_ttmm!(CB, signal_toggle_overwrite)()) {
32848 return signal_connect_data!()(&this, cast(char*)"toggle-overwrite",
32849 cast(GObject2.Callback)cb, data, null, cf);
32853 struct TextViewClass {
32854 ContainerClass parent_class;
32855 extern (C) void function (TextView* text_view, Adjustment* hadjustment, Adjustment* vadjustment) nothrow set_scroll_adjustments;
32856 extern (C) void function (TextView* text_view, Menu* menu) nothrow populate_popup;
32857 extern (C) void function (TextView* text_view, MovementStep step, int count, int extend_selection) nothrow move_cursor;
32858 extern (C) void function (TextView* text_view, int count, int extend_selection) nothrow page_horizontally;
32859 extern (C) void function (TextView* text_view) nothrow set_anchor;
32860 extern (C) void function (TextView* text_view, char* str) nothrow insert_at_cursor;
32861 extern (C) void function (TextView* text_view, DeleteType type, int count) nothrow delete_from_cursor;
32862 extern (C) void function (TextView* text_view) nothrow backspace;
32863 extern (C) void function (TextView* text_view) nothrow cut_clipboard;
32864 extern (C) void function (TextView* text_view) nothrow copy_clipboard;
32865 extern (C) void function (TextView* text_view) nothrow paste_clipboard;
32866 extern (C) void function (TextView* text_view) nothrow toggle_overwrite;
32867 extern (C) void function (TextView* text_view, DirectionType direction) nothrow move_focus;
32868 extern (C) void function () nothrow _gtk_reserved1;
32869 extern (C) void function () nothrow _gtk_reserved2;
32870 extern (C) void function () nothrow _gtk_reserved3;
32871 extern (C) void function () nothrow _gtk_reserved4;
32872 extern (C) void function () nothrow _gtk_reserved5;
32873 extern (C) void function () nothrow _gtk_reserved6;
32874 extern (C) void function () nothrow _gtk_reserved7;
32877 struct TextWindow {
32880 enum TextWindowType {
32881 PRIVATE = 0,
32882 WIDGET = 1,
32883 TEXT = 2,
32884 LEFT = 3,
32885 RIGHT = 4,
32886 TOP = 5,
32887 BOTTOM = 6
32889 struct ThemeEngine {
32892 struct TipsQuery /* : Label */ {
32893 mixin Atk.ImplementorIface.__interface__;
32894 mixin Buildable.__interface__;
32895 alias label this;
32896 alias label super_;
32897 Label label;
32898 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
32899 uint, "emit_always", 1,
32900 uint, "in_query", 1,
32901 uint, "__dummy32A", 30));
32902 char* label_inactive, label_no_tip;
32903 Widget* caller, last_crossed;
32904 Gdk2.Cursor* query_cursor;
32906 static TipsQuery* new_()() nothrow {
32907 return gtk_tips_query_new();
32909 static auto opCall()() {
32910 return gtk_tips_query_new();
32912 void set_caller(AT0)(AT0 /*Widget*/ caller) nothrow {
32913 gtk_tips_query_set_caller(&this, UpCast!(Widget*)(caller));
32915 void set_labels(AT0, AT1)(AT0 /*char*/ label_inactive, AT1 /*char*/ label_no_tip) nothrow {
32916 gtk_tips_query_set_labels(&this, toCString!(char*)(label_inactive), toCString!(char*)(label_no_tip));
32918 void start_query()() nothrow {
32919 gtk_tips_query_start_query(&this);
32921 void stop_query()() nothrow {
32922 gtk_tips_query_stop_query(&this);
32924 extern (C) alias static void function (TipsQuery* this_, void* user_data=null) nothrow signal_start_query;
32926 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32927 return super_.signal_connect!name(cb, data, cf);
32930 ulong signal_connect(string name:"start-query", CB/*:signal_start_query*/)
32931 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32932 if (is(typeof(cb)==signal_start_query)||_ttmm!(CB, signal_start_query)()) {
32933 return signal_connect_data!()(&this, cast(char*)"start-query",
32934 cast(GObject2.Callback)cb, data, null, cf);
32936 extern (C) alias static void function (TipsQuery* this_, void* user_data=null) nothrow signal_stop_query;
32937 ulong signal_connect(string name:"stop-query", CB/*:signal_stop_query*/)
32938 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32939 if (is(typeof(cb)==signal_stop_query)||_ttmm!(CB, signal_stop_query)()) {
32940 return signal_connect_data!()(&this, cast(char*)"stop-query",
32941 cast(GObject2.Callback)cb, data, null, cf);
32943 extern (C) alias static void function (TipsQuery* this_, Widget* object, char* p0, char* p1, void* user_data=null) nothrow signal_widget_entered;
32944 ulong signal_connect(string name:"widget-entered", CB/*:signal_widget_entered*/)
32945 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32946 if (is(typeof(cb)==signal_widget_entered)||_ttmm!(CB, signal_widget_entered)()) {
32947 return signal_connect_data!()(&this, cast(char*)"widget-entered",
32948 cast(GObject2.Callback)cb, data, null, cf);
32950 extern (C) alias static c_int function (TipsQuery* this_, Widget* object, char* p0, char* p1, Gdk2.Event* p2, void* user_data=null) nothrow signal_widget_selected;
32951 ulong signal_connect(string name:"widget-selected", CB/*:signal_widget_selected*/)
32952 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
32953 if (is(typeof(cb)==signal_widget_selected)||_ttmm!(CB, signal_widget_selected)()) {
32954 return signal_connect_data!()(&this, cast(char*)"widget-selected",
32955 cast(GObject2.Callback)cb, data, null, cf);
32959 struct TipsQueryClass {
32960 LabelClass parent_class;
32961 extern (C) void function (TipsQuery* tips_query) nothrow start_query;
32962 extern (C) void function (TipsQuery* tips_query) nothrow stop_query;
32963 extern (C) void function (TipsQuery* tips_query, Widget* widget, char* tip_text, char* tip_private) nothrow widget_entered;
32964 extern (C) int function (TipsQuery* tips_query, Widget* widget, char* tip_text, char* tip_private, Gdk2.EventButton* event) nothrow widget_selected;
32965 extern (C) void function () nothrow _gtk_reserved1;
32966 extern (C) void function () nothrow _gtk_reserved2;
32967 extern (C) void function () nothrow _gtk_reserved3;
32968 extern (C) void function () nothrow _gtk_reserved4;
32971 struct ToggleAction /* : Action */ {
32972 mixin Buildable.__interface__;
32973 alias parent this;
32974 alias parent super_;
32975 alias parent action;
32976 Action parent;
32977 private ToggleActionPrivate* private_data;
32980 // VERSION: 2.4
32981 // Creates a new #GtkToggleAction object. To add the action to
32982 // a #GtkActionGroup and set the accelerator for the action,
32983 // call gtk_action_group_add_action_with_accel().
32984 // RETURNS: a new #GtkToggleAction
32985 // <name>: A unique name for the action
32986 // <label>: The label displayed in menu items and on buttons, or %NULL
32987 // <tooltip>: A tooltip for the action, or %NULL
32988 // <stock_id>: The stock icon to display in widgets representing the action, or %NULL
32989 static ToggleAction* /*new*/ new_(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id) nothrow {
32990 return gtk_toggle_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id));
32992 static auto opCall(AT0, AT1, AT2, AT3)(AT0 /*char*/ name, AT1 /*char*/ label, AT2 /*char*/ tooltip, AT3 /*char*/ stock_id) {
32993 return gtk_toggle_action_new(toCString!(char*)(name), toCString!(char*)(label), toCString!(char*)(tooltip), toCString!(char*)(stock_id));
32996 // VERSION: 2.4
32997 // Returns the checked state of the toggle action.
32998 // RETURNS: the checked state of the toggle action
32999 int get_active()() nothrow {
33000 return gtk_toggle_action_get_active(&this);
33003 // VERSION: 2.4
33004 // Returns whether the action should have proxies like a radio action.
33005 // RETURNS: whether the action should have proxies like a radio action.
33006 int get_draw_as_radio()() nothrow {
33007 return gtk_toggle_action_get_draw_as_radio(&this);
33010 // VERSION: 2.4
33011 // Sets the checked state on the toggle action.
33012 // <is_active>: whether the action should be checked or not
33013 void set_active()(int is_active) nothrow {
33014 gtk_toggle_action_set_active(&this, is_active);
33017 // VERSION: 2.4
33018 // Sets whether the action should have proxies like a radio action.
33019 // <draw_as_radio>: whether the action should have proxies like a radio action
33020 void set_draw_as_radio()(int draw_as_radio) nothrow {
33021 gtk_toggle_action_set_draw_as_radio(&this, draw_as_radio);
33024 // VERSION: 2.4
33025 // Emits the "toggled" signal on the toggle action.
33026 void toggled()() nothrow {
33027 gtk_toggle_action_toggled(&this);
33029 extern (C) alias static void function (ToggleAction* this_, void* user_data=null) nothrow signal_toggled;
33031 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33032 return super_.signal_connect!name(cb, data, cf);
33035 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)
33036 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
33037 if (is(typeof(cb)==signal_toggled)||_ttmm!(CB, signal_toggled)()) {
33038 return signal_connect_data!()(&this, cast(char*)"toggled",
33039 cast(GObject2.Callback)cb, data, null, cf);
33043 struct ToggleActionClass {
33044 ActionClass parent_class;
33045 extern (C) void function (ToggleAction* action) nothrow toggled;
33046 extern (C) void function () nothrow _gtk_reserved1;
33047 extern (C) void function () nothrow _gtk_reserved2;
33048 extern (C) void function () nothrow _gtk_reserved3;
33049 extern (C) void function () nothrow _gtk_reserved4;
33052 struct ToggleActionEntry {
33053 char* name, stock_id, label, accelerator, tooltip;
33054 GObject2.Callback callback;
33055 int is_active;
33058 struct ToggleActionPrivate {
33061 struct ToggleButton /* : Button */ {
33062 mixin Atk.ImplementorIface.__interface__;
33063 mixin Activatable.__interface__;
33064 mixin Buildable.__interface__;
33065 alias button this;
33066 alias button super_;
33067 Button button;
33068 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
33069 uint, "active", 1,
33070 uint, "draw_indicator", 1,
33071 uint, "inconsistent", 1,
33072 uint, "__dummy32A", 29));
33074 static ToggleButton* new_()() nothrow {
33075 return gtk_toggle_button_new();
33077 static auto opCall()() {
33078 return gtk_toggle_button_new();
33080 static ToggleButton* new_with_label(AT0)(AT0 /*char*/ label) nothrow {
33081 return gtk_toggle_button_new_with_label(toCString!(char*)(label));
33083 static auto opCall(AT0)(AT0 /*char*/ label) {
33084 return gtk_toggle_button_new_with_label(toCString!(char*)(label));
33087 // Creates a new #GtkToggleButton containing a label. The label
33088 // will be created using gtk_label_new_with_mnemonic(), so underscores
33089 // in @label indicate the mnemonic for the button.
33090 // RETURNS: a new #GtkToggleButton
33091 // <label>: the text of the button, with an underscore in front of the mnemonic character
33092 static ToggleButton* new_with_mnemonic(AT0)(AT0 /*char*/ label) nothrow {
33093 return gtk_toggle_button_new_with_mnemonic(toCString!(char*)(label));
33095 static auto opCall(AT0)(AT0 /*char*/ label) {
33096 return gtk_toggle_button_new_with_mnemonic(toCString!(char*)(label));
33098 int get_active()() nothrow {
33099 return gtk_toggle_button_get_active(&this);
33102 // Gets the value set by gtk_toggle_button_set_inconsistent().
33103 // RETURNS: %TRUE if the button is displayed as inconsistent, %FALSE otherwise
33104 int get_inconsistent()() nothrow {
33105 return gtk_toggle_button_get_inconsistent(&this);
33108 // Retrieves whether the button is displayed as a separate indicator
33109 // and label. See gtk_toggle_button_set_mode().
33111 // and label.
33112 // RETURNS: %TRUE if the togglebutton is drawn as a separate indicator
33113 int get_mode()() nothrow {
33114 return gtk_toggle_button_get_mode(&this);
33116 void set_active()(int is_active) nothrow {
33117 gtk_toggle_button_set_active(&this, is_active);
33120 // If the user has selected a range of elements (such as some text or
33121 // spreadsheet cells) that are affected by a toggle button, and the
33122 // current values in that range are inconsistent, you may want to
33123 // display the toggle in an "in between" state. This function turns on
33124 // "in between" display. Normally you would turn off the inconsistent
33125 // state again if the user toggles the toggle button. This has to be
33126 // done manually, gtk_toggle_button_set_inconsistent() only affects
33127 // visual appearance, it doesn't affect the semantics of the button.
33128 // <setting>: %TRUE if state is inconsistent
33129 void set_inconsistent()(int setting) nothrow {
33130 gtk_toggle_button_set_inconsistent(&this, setting);
33133 // Sets whether the button is displayed as a separate indicator and label.
33134 // You can call this function on a checkbutton or a radiobutton with
33135 // @draw_indicator = %FALSE to make the button look like a normal button
33137 // This function only affects instances of classes like #GtkCheckButton
33138 // and #GtkRadioButton that derive from #GtkToggleButton,
33139 // not instances of #GtkToggleButton itself.
33140 // <draw_indicator>: if %TRUE, draw the button as a separate indicator and label; if %FALSE, draw the button like a normal button
33141 void set_mode()(int draw_indicator) nothrow {
33142 gtk_toggle_button_set_mode(&this, draw_indicator);
33144 void toggled()() nothrow {
33145 gtk_toggle_button_toggled(&this);
33147 extern (C) alias static void function (ToggleButton* this_, void* user_data=null) nothrow signal_toggled;
33149 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33150 return super_.signal_connect!name(cb, data, cf);
33153 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)
33154 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
33155 if (is(typeof(cb)==signal_toggled)||_ttmm!(CB, signal_toggled)()) {
33156 return signal_connect_data!()(&this, cast(char*)"toggled",
33157 cast(GObject2.Callback)cb, data, null, cf);
33161 struct ToggleButtonClass {
33162 ButtonClass parent_class;
33163 extern (C) void function (ToggleButton* toggle_button) nothrow toggled;
33164 extern (C) void function () nothrow _gtk_reserved1;
33165 extern (C) void function () nothrow _gtk_reserved2;
33166 extern (C) void function () nothrow _gtk_reserved3;
33167 extern (C) void function () nothrow _gtk_reserved4;
33170 struct ToggleToolButton /* : ToolButton */ {
33171 mixin Atk.ImplementorIface.__interface__;
33172 mixin Activatable.__interface__;
33173 mixin Buildable.__interface__;
33174 alias parent this;
33175 alias parent super_;
33176 alias parent toolbutton;
33177 ToolButton parent;
33178 private ToggleToolButtonPrivate* priv;
33181 // VERSION: 2.4
33182 // Returns a new #GtkToggleToolButton
33183 // RETURNS: a newly created #GtkToggleToolButton
33184 static ToggleToolButton* new_()() nothrow {
33185 return gtk_toggle_tool_button_new();
33187 static auto opCall()() {
33188 return gtk_toggle_tool_button_new();
33191 // VERSION: 2.4
33192 // Creates a new #GtkToggleToolButton containing the image and text from a
33193 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
33194 // and #GTK_STOCK_APPLY.
33196 // It is an error if @stock_id is not a name of a stock item.
33197 // RETURNS: A new #GtkToggleToolButton
33198 // <stock_id>: the name of the stock item
33199 static ToggleToolButton* new_from_stock(AT0)(AT0 /*char*/ stock_id) nothrow {
33200 return gtk_toggle_tool_button_new_from_stock(toCString!(char*)(stock_id));
33202 static auto opCall(AT0)(AT0 /*char*/ stock_id) {
33203 return gtk_toggle_tool_button_new_from_stock(toCString!(char*)(stock_id));
33206 // VERSION: 2.4
33207 // Queries a #GtkToggleToolButton and returns its current state.
33208 // Returns %TRUE if the toggle button is pressed in and %FALSE if it is raised.
33209 // RETURNS: %TRUE if the toggle tool button is pressed in, %FALSE if not
33210 int get_active()() nothrow {
33211 return gtk_toggle_tool_button_get_active(&this);
33214 // VERSION: 2.4
33215 // Sets the status of the toggle tool button. Set to %TRUE if you
33216 // want the GtkToggleButton to be 'pressed in', and %FALSE to raise it.
33217 // This action causes the toggled signal to be emitted.
33218 // <is_active>: whether @button should be active
33219 void set_active()(int is_active) nothrow {
33220 gtk_toggle_tool_button_set_active(&this, is_active);
33222 // Emitted whenever the toggle tool button changes state.
33223 extern (C) alias static void function (ToggleToolButton* this_, void* user_data=null) nothrow signal_toggled;
33225 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33226 return super_.signal_connect!name(cb, data, cf);
33229 ulong signal_connect(string name:"toggled", CB/*:signal_toggled*/)
33230 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
33231 if (is(typeof(cb)==signal_toggled)||_ttmm!(CB, signal_toggled)()) {
33232 return signal_connect_data!()(&this, cast(char*)"toggled",
33233 cast(GObject2.Callback)cb, data, null, cf);
33237 struct ToggleToolButtonClass {
33238 ToolButtonClass parent_class;
33239 extern (C) void function (ToggleToolButton* button) nothrow toggled;
33240 extern (C) void function () nothrow _gtk_reserved1;
33241 extern (C) void function () nothrow _gtk_reserved2;
33242 extern (C) void function () nothrow _gtk_reserved3;
33243 extern (C) void function () nothrow _gtk_reserved4;
33246 struct ToggleToolButtonPrivate {
33249 struct ToolButton /* : ToolItem */ {
33250 mixin Atk.ImplementorIface.__interface__;
33251 mixin Activatable.__interface__;
33252 mixin Buildable.__interface__;
33253 alias parent this;
33254 alias parent super_;
33255 alias parent toolitem;
33256 ToolItem parent;
33257 private ToolButtonPrivate* priv;
33260 // VERSION: 2.4
33261 // Creates a new %GtkToolButton using @icon_widget as icon and @label as
33262 // label.
33263 // RETURNS: A new #GtkToolButton
33264 // <icon_widget>: a #GtkMisc widget that will be used as icon widget, or %NULL
33265 // <label>: a string that will be used as label, or %NULL
33266 static ToolButton* new_(AT0, AT1)(AT0 /*Widget*/ icon_widget=null, AT1 /*char*/ label=null) nothrow {
33267 return gtk_tool_button_new(UpCast!(Widget*)(icon_widget), toCString!(char*)(label));
33269 static auto opCall(AT0, AT1)(AT0 /*Widget*/ icon_widget=null, AT1 /*char*/ label=null) {
33270 return gtk_tool_button_new(UpCast!(Widget*)(icon_widget), toCString!(char*)(label));
33273 // VERSION: 2.4
33274 // Creates a new #GtkToolButton containing the image and text from a
33275 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
33276 // and #GTK_STOCK_APPLY.
33278 // It is an error if @stock_id is not a name of a stock item.
33279 // RETURNS: A new #GtkToolButton
33280 // <stock_id>: the name of the stock item
33281 static ToolButton* new_from_stock(AT0)(AT0 /*char*/ stock_id) nothrow {
33282 return gtk_tool_button_new_from_stock(toCString!(char*)(stock_id));
33284 static auto opCall(AT0)(AT0 /*char*/ stock_id) {
33285 return gtk_tool_button_new_from_stock(toCString!(char*)(stock_id));
33288 // VERSION: 2.8
33289 // Returns the name of the themed icon for the tool button,
33290 // see gtk_tool_button_set_icon_name().
33292 // no themed icon
33293 // RETURNS: the icon name or %NULL if the tool button has
33294 char* get_icon_name()() nothrow {
33295 return gtk_tool_button_get_icon_name(&this);
33298 // VERSION: 2.4
33299 // Return the widget used as icon widget on @button.
33300 // See gtk_tool_button_set_icon_widget().
33302 // on @button, or %NULL.
33303 // RETURNS: The widget used as icon
33304 Widget* get_icon_widget()() nothrow {
33305 return gtk_tool_button_get_icon_widget(&this);
33308 // VERSION: 2.4
33309 // Returns the label used by the tool button, or %NULL if the tool button
33310 // doesn't have a label. or uses a the label from a stock item. The returned
33311 // string is owned by GTK+, and must not be modified or freed.
33312 // RETURNS: The label, or %NULL
33313 char* get_label()() nothrow {
33314 return gtk_tool_button_get_label(&this);
33317 // VERSION: 2.4
33318 // Returns the widget used as label on @button.
33319 // See gtk_tool_button_set_label_widget().
33321 // on @button, or %NULL.
33322 // RETURNS: The widget used as label
33323 Widget* get_label_widget()() nothrow {
33324 return gtk_tool_button_get_label_widget(&this);
33327 // VERSION: 2.4
33328 // Returns the name of the stock item. See gtk_tool_button_set_stock_id().
33329 // The returned string is owned by GTK+ and must not be freed or modifed.
33330 // RETURNS: the name of the stock item for @button.
33331 char* get_stock_id()() nothrow {
33332 return gtk_tool_button_get_stock_id(&this);
33335 // VERSION: 2.4
33336 // Returns whether underscores in the label property are used as mnemonics
33337 // on menu items on the overflow menu. See gtk_tool_button_set_use_underline().
33339 // mnemonics on menu items on the overflow menu.
33340 // RETURNS: %TRUE if underscores in the label property are used as
33341 int get_use_underline()() nothrow {
33342 return gtk_tool_button_get_use_underline(&this);
33345 // VERSION: 2.8
33346 // Sets the icon for the tool button from a named themed icon.
33347 // See the docs for #GtkIconTheme for more details.
33348 // The "icon_name" property only has an effect if not
33349 // overridden by non-%NULL "label", "icon_widget" and "stock_id"
33350 // properties.
33351 // <icon_name>: the name of the themed icon
33352 void set_icon_name(AT0)(AT0 /*char*/ icon_name=null) nothrow {
33353 gtk_tool_button_set_icon_name(&this, toCString!(char*)(icon_name));
33356 // VERSION: 2.4
33357 // Sets @icon as the widget used as icon on @button. If @icon_widget is
33358 // %NULL the icon is determined by the "stock_id" property. If the
33359 // "stock_id" property is also %NULL, @button will not have an icon.
33360 // <icon_widget>: the widget used as icon, or %NULL
33361 void set_icon_widget(AT0)(AT0 /*Widget*/ icon_widget=null) nothrow {
33362 gtk_tool_button_set_icon_widget(&this, UpCast!(Widget*)(icon_widget));
33365 // VERSION: 2.4
33366 // Sets @label as the label used for the tool button. The "label" property
33367 // only has an effect if not overridden by a non-%NULL "label_widget" property.
33368 // If both the "label_widget" and "label" properties are %NULL, the label
33369 // is determined by the "stock_id" property. If the "stock_id" property is also
33370 // %NULL, @button will not have a label.
33371 // <label>: a string that will be used as label, or %NULL.
33372 void set_label(AT0)(AT0 /*char*/ label=null) nothrow {
33373 gtk_tool_button_set_label(&this, toCString!(char*)(label));
33376 // VERSION: 2.4
33377 // Sets @label_widget as the widget that will be used as the label
33378 // for @button. If @label_widget is %NULL the "label" property is used
33379 // as label. If "label" is also %NULL, the label in the stock item
33380 // determined by the "stock_id" property is used as label. If
33381 // "stock_id" is also %NULL, @button does not have a label.
33382 // <label_widget>: the widget used as label, or %NULL
33383 void set_label_widget(AT0)(AT0 /*Widget*/ label_widget=null) nothrow {
33384 gtk_tool_button_set_label_widget(&this, UpCast!(Widget*)(label_widget));
33387 // VERSION: 2.4
33388 // Sets the name of the stock item. See gtk_tool_button_new_from_stock().
33389 // The stock_id property only has an effect if not
33390 // overridden by non-%NULL "label" and "icon_widget" properties.
33391 // <stock_id>: a name of a stock item, or %NULL
33392 void set_stock_id(AT0)(AT0 /*char*/ stock_id=null) nothrow {
33393 gtk_tool_button_set_stock_id(&this, toCString!(char*)(stock_id));
33396 // VERSION: 2.4
33397 // If set, an underline in the label property indicates that the next character
33398 // should be used for the mnemonic accelerator key in the overflow menu. For
33399 // example, if the label property is "_Open" and @use_underline is %TRUE,
33400 // the label on the tool button will be "Open" and the item on the overflow
33401 // menu will have an underlined 'O'.
33403 // Labels shown on tool buttons never have mnemonics on them; this property
33404 // only affects the menu item on the overflow menu.
33405 // <use_underline>: whether the button label has the form "_Open"
33406 void set_use_underline()(int use_underline) nothrow {
33407 gtk_tool_button_set_use_underline(&this, use_underline);
33410 // This signal is emitted when the tool button is clicked with the mouse
33411 // or activated with the keyboard.
33412 extern (C) alias static void function (ToolButton* this_, void* user_data=null) nothrow signal_clicked;
33414 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33415 return super_.signal_connect!name(cb, data, cf);
33418 ulong signal_connect(string name:"clicked", CB/*:signal_clicked*/)
33419 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
33420 if (is(typeof(cb)==signal_clicked)||_ttmm!(CB, signal_clicked)()) {
33421 return signal_connect_data!()(&this, cast(char*)"clicked",
33422 cast(GObject2.Callback)cb, data, null, cf);
33426 struct ToolButtonClass {
33427 ToolItemClass parent_class;
33428 Type button_type;
33429 extern (C) void function (ToolButton* tool_item) nothrow clicked;
33430 extern (C) void function () nothrow _gtk_reserved1;
33431 extern (C) void function () nothrow _gtk_reserved2;
33432 extern (C) void function () nothrow _gtk_reserved3;
33433 extern (C) void function () nothrow _gtk_reserved4;
33436 struct ToolButtonPrivate {
33440 // #GtkToolItem<!-- -->s are widgets that can appear on a toolbar. To
33441 // create a toolbar item that contain something else than a button, use
33442 // gtk_tool_item_new(). Use gtk_container_add() to add a child
33443 // widget to the tool item.
33445 // For toolbar items that contain buttons, see the #GtkToolButton,
33446 // #GtkToggleToolButton and #GtkRadioToolButton classes.
33448 // See the #GtkToolbar class for a description of the toolbar widget, and
33449 // #GtkToolShell for a description of the tool shell interface.
33450 struct ToolItem /* : Bin */ {
33451 mixin Atk.ImplementorIface.__interface__;
33452 mixin Activatable.__interface__;
33453 mixin Buildable.__interface__;
33454 alias parent this;
33455 alias parent super_;
33456 alias parent bin;
33457 Bin parent;
33458 private ToolItemPrivate* priv;
33461 // VERSION: 2.4
33462 // Creates a new #GtkToolItem
33463 // RETURNS: the new #GtkToolItem
33464 static ToolItem* new_()() nothrow {
33465 return gtk_tool_item_new();
33467 static auto opCall()() {
33468 return gtk_tool_item_new();
33471 // VERSION: 2.20
33472 // Returns the ellipsize mode used for @tool_item. Custom subclasses of
33473 // #GtkToolItem should call this function to find out how text should
33474 // be ellipsized.
33476 // should be ellipsized.
33477 // RETURNS: a #PangoEllipsizeMode indicating how text in @tool_item
33478 Pango.EllipsizeMode get_ellipsize_mode()() nothrow {
33479 return gtk_tool_item_get_ellipsize_mode(&this);
33482 // VERSION: 2.4
33483 // Returns whether @tool_item is allocated extra space.
33484 // See gtk_tool_item_set_expand().
33485 // RETURNS: %TRUE if @tool_item is allocated extra space.
33486 int get_expand()() nothrow {
33487 return gtk_tool_item_get_expand(&this);
33490 // VERSION: 2.4
33491 // Returns whether @tool_item is the same size as other homogeneous
33492 // items. See gtk_tool_item_set_homogeneous().
33494 // items.
33495 // RETURNS: %TRUE if the item is the same size as other homogeneous
33496 int get_homogeneous()() nothrow {
33497 return gtk_tool_item_get_homogeneous(&this);
33500 // VERSION: 2.4
33501 // Returns the icon size used for @tool_item. Custom subclasses of
33502 // #GtkToolItem should call this function to find out what size icons
33503 // they should use.
33505 // used for @tool_item
33506 // RETURNS: a #GtkIconSize indicating the icon size
33507 IconSize get_icon_size()() nothrow {
33508 return gtk_tool_item_get_icon_size(&this);
33511 // VERSION: 2.4
33512 // Returns whether @tool_item is considered important. See
33513 // gtk_tool_item_set_is_important()
33514 // RETURNS: %TRUE if @tool_item is considered important.
33515 int get_is_important()() nothrow {
33516 return gtk_tool_item_get_is_important(&this);
33519 // VERSION: 2.4
33520 // Returns the orientation used for @tool_item. Custom subclasses of
33521 // #GtkToolItem should call this function to find out what size icons
33522 // they should use.
33524 // used for @tool_item
33525 // RETURNS: a #GtkOrientation indicating the orientation
33526 Orientation get_orientation()() nothrow {
33527 return gtk_tool_item_get_orientation(&this);
33530 // VERSION: 2.4
33531 // If @menu_item_id matches the string passed to
33532 // gtk_tool_item_set_proxy_menu_item() return the corresponding #GtkMenuItem.
33534 // Custom subclasses of #GtkToolItem should use this function to
33535 // update their menu item when the #GtkToolItem changes. That the
33536 // @menu_item_id<!-- -->s must match ensures that a #GtkToolItem
33537 // will not inadvertently change a menu item that they did not create.
33539 // gtk_tool_item_set_proxy_menu_item(), if the @menu_item_id<!-- -->s
33540 // match.
33541 // RETURNS: The #GtkMenuItem passed to
33542 // <menu_item_id>: a string used to identify the menu item
33543 Widget* get_proxy_menu_item(AT0)(AT0 /*char*/ menu_item_id) nothrow {
33544 return gtk_tool_item_get_proxy_menu_item(&this, toCString!(char*)(menu_item_id));
33547 // VERSION: 2.4
33548 // Returns the relief style of @tool_item. See gtk_button_set_relief_style().
33549 // Custom subclasses of #GtkToolItem should call this function in the handler
33550 // of the #GtkToolItem::toolbar_reconfigured signal to find out the
33551 // relief style of buttons.
33553 // for @tool_item.
33554 // RETURNS: a #GtkReliefStyle indicating the relief style used
33555 ReliefStyle get_relief_style()() nothrow {
33556 return gtk_tool_item_get_relief_style(&this);
33559 // VERSION: 2.20
33560 // Returns the text alignment used for @tool_item. Custom subclasses of
33561 // #GtkToolItem should call this function to find out how text should
33562 // be aligned.
33564 // used for @tool_item
33565 // RETURNS: a #gfloat indicating the horizontal text alignment
33566 float get_text_alignment()() nothrow {
33567 return gtk_tool_item_get_text_alignment(&this);
33570 // VERSION: 2.20
33571 // Returns the text orientation used for @tool_item. Custom subclasses of
33572 // #GtkToolItem should call this function to find out how text should
33573 // be orientated.
33575 // used for @tool_item
33576 // RETURNS: a #GtkOrientation indicating the text orientation
33577 Orientation get_text_orientation()() nothrow {
33578 return gtk_tool_item_get_text_orientation(&this);
33581 // VERSION: 2.20
33582 // Returns the size group used for labels in @tool_item.
33583 // Custom subclasses of #GtkToolItem should call this function
33584 // and use the size group for labels.
33585 // RETURNS: a #GtkSizeGroup
33586 SizeGroup* get_text_size_group()() nothrow {
33587 return gtk_tool_item_get_text_size_group(&this);
33590 // VERSION: 2.4
33591 // Returns the toolbar style used for @tool_item. Custom subclasses of
33592 // #GtkToolItem should call this function in the handler of the
33593 // GtkToolItem::toolbar_reconfigured signal to find out in what style
33594 // the toolbar is displayed and change themselves accordingly
33596 // Possibilities are:
33597 // <itemizedlist>
33598 // <listitem> GTK_TOOLBAR_BOTH, meaning the tool item should show
33599 // both an icon and a label, stacked vertically </listitem>
33600 // <listitem> GTK_TOOLBAR_ICONS, meaning the toolbar shows
33601 // only icons </listitem>
33602 // <listitem> GTK_TOOLBAR_TEXT, meaning the tool item should only
33603 // show text</listitem>
33604 // <listitem> GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show
33605 // both an icon and a label, arranged horizontally (however, note the
33606 // #GtkToolButton::has_text_horizontally that makes tool buttons not
33607 // show labels when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ.
33608 // </listitem>
33609 // </itemizedlist>
33611 // for @tool_item.
33612 // RETURNS: A #GtkToolbarStyle indicating the toolbar style used
33613 ToolbarStyle get_toolbar_style()() nothrow {
33614 return gtk_tool_item_get_toolbar_style(&this);
33617 // VERSION: 2.4
33618 // Returns whether @tool_item has a drag window. See
33619 // gtk_tool_item_set_use_drag_window().
33620 // RETURNS: %TRUE if @tool_item uses a drag window.
33621 int get_use_drag_window()() nothrow {
33622 return gtk_tool_item_get_use_drag_window(&this);
33625 // VERSION: 2.4
33626 // Returns whether the @tool_item is visible on toolbars that are
33627 // docked horizontally.
33629 // docked horizontally.
33630 // RETURNS: %TRUE if @tool_item is visible on toolbars that are
33631 int get_visible_horizontal()() nothrow {
33632 return gtk_tool_item_get_visible_horizontal(&this);
33635 // VERSION: 2.4
33636 // Returns whether @tool_item is visible when the toolbar is docked vertically.
33637 // See gtk_tool_item_set_visible_vertical().
33638 // RETURNS: Whether @tool_item is visible when the toolbar is docked vertically
33639 int get_visible_vertical()() nothrow {
33640 return gtk_tool_item_get_visible_vertical(&this);
33643 // VERSION: 2.6
33644 // Calling this function signals to the toolbar that the
33645 // overflow menu item for @tool_item has changed. If the
33646 // overflow menu is visible when this function it called,
33647 // the menu will be rebuilt.
33649 // The function must be called when the tool item changes what it
33650 // will do in response to the #GtkToolItem::create-menu-proxy signal.
33651 void rebuild_menu()() nothrow {
33652 gtk_tool_item_rebuild_menu(&this);
33655 // VERSION: 2.4
33656 // Returns the #GtkMenuItem that was last set by
33657 // gtk_tool_item_set_proxy_menu_item(), ie. the #GtkMenuItem
33658 // that is going to appear in the overflow menu.
33660 // overflow menu for @tool_item.
33661 // RETURNS: The #GtkMenuItem that is going to appear in the
33662 Widget* retrieve_proxy_menu_item()() nothrow {
33663 return gtk_tool_item_retrieve_proxy_menu_item(&this);
33666 // VERSION: 2.4
33667 // Sets whether @tool_item is allocated extra space when there
33668 // is more room on the toolbar then needed for the items. The
33669 // effect is that the item gets bigger when the toolbar gets bigger
33670 // and smaller when the toolbar gets smaller.
33671 // <expand>: Whether @tool_item is allocated extra space
33672 void set_expand()(int expand) nothrow {
33673 gtk_tool_item_set_expand(&this, expand);
33676 // VERSION: 2.4
33677 // Sets whether @tool_item is to be allocated the same size as other
33678 // homogeneous items. The effect is that all homogeneous items will have
33679 // the same width as the widest of the items.
33680 // <homogeneous>: whether @tool_item is the same size as other homogeneous items
33681 void set_homogeneous()(int homogeneous) nothrow {
33682 gtk_tool_item_set_homogeneous(&this, homogeneous);
33685 // VERSION: 2.4
33686 // Sets whether @tool_item should be considered important. The #GtkToolButton
33687 // class uses this property to determine whether to show or hide its label
33688 // when the toolbar style is %GTK_TOOLBAR_BOTH_HORIZ. The result is that
33689 // only tool buttons with the "is_important" property set have labels, an
33690 // effect known as "priority text"
33691 // <is_important>: whether the tool item should be considered important
33692 void set_is_important()(int is_important) nothrow {
33693 gtk_tool_item_set_is_important(&this, is_important);
33696 // VERSION: 2.4
33697 // Sets the #GtkMenuItem used in the toolbar overflow menu. The
33698 // @menu_item_id is used to identify the caller of this function and
33699 // should also be used with gtk_tool_item_get_proxy_menu_item().
33700 // <menu_item_id>: a string used to identify @menu_item
33701 // <menu_item>: a #GtkMenuItem to be used in the overflow menu
33702 void set_proxy_menu_item(AT0, AT1)(AT0 /*char*/ menu_item_id, AT1 /*Widget*/ menu_item) nothrow {
33703 gtk_tool_item_set_proxy_menu_item(&this, toCString!(char*)(menu_item_id), UpCast!(Widget*)(menu_item));
33706 // VERSION: 2.4
33707 // DEPRECATED (v2.12) method: set_tooltip - Use gtk_tool_item_set_tooltip_text() instead.
33708 // Sets the #GtkTooltips object to be used for @tool_item, the
33709 // text to be displayed as tooltip on the item and the private text
33710 // to be used. See gtk_tooltips_set_tip().
33711 // <tooltips>: The #GtkTooltips object to be used
33712 // <tip_text>: text to be used as tooltip text for @tool_item
33713 // <tip_private>: text to be used as private tooltip text
33714 void set_tooltip(AT0, AT1, AT2)(AT0 /*Tooltips*/ tooltips, AT1 /*char*/ tip_text=null, AT2 /*char*/ tip_private=null) nothrow {
33715 gtk_tool_item_set_tooltip(&this, UpCast!(Tooltips*)(tooltips), toCString!(char*)(tip_text), toCString!(char*)(tip_private));
33718 // VERSION: 2.12
33719 // Sets the markup text to be displayed as tooltip on the item.
33720 // See gtk_widget_set_tooltip_markup().
33721 // <markup>: markup text to be used as tooltip for @tool_item
33722 void set_tooltip_markup(AT0)(AT0 /*char*/ markup) nothrow {
33723 gtk_tool_item_set_tooltip_markup(&this, toCString!(char*)(markup));
33726 // VERSION: 2.12
33727 // Sets the text to be displayed as tooltip on the item.
33728 // See gtk_widget_set_tooltip_text().
33729 // <text>: text to be used as tooltip for @tool_item
33730 void set_tooltip_text(AT0)(AT0 /*char*/ text) nothrow {
33731 gtk_tool_item_set_tooltip_text(&this, toCString!(char*)(text));
33734 // VERSION: 2.4
33735 // Sets whether @tool_item has a drag window. When %TRUE the
33736 // toolitem can be used as a drag source through gtk_drag_source_set().
33737 // When @tool_item has a drag window it will intercept all events,
33738 // even those that would otherwise be sent to a child of @tool_item.
33739 // <use_drag_window>: Whether @tool_item has a drag window.
33740 void set_use_drag_window()(int use_drag_window) nothrow {
33741 gtk_tool_item_set_use_drag_window(&this, use_drag_window);
33744 // VERSION: 2.4
33745 // Sets whether @tool_item is visible when the toolbar is docked horizontally.
33746 // <visible_horizontal>: Whether @tool_item is visible when in horizontal mode
33747 void set_visible_horizontal()(int visible_horizontal) nothrow {
33748 gtk_tool_item_set_visible_horizontal(&this, visible_horizontal);
33751 // VERSION: 2.4
33752 // Sets whether @tool_item is visible when the toolbar is docked
33753 // vertically. Some tool items, such as text entries, are too wide to be
33754 // useful on a vertically docked toolbar. If @visible_vertical is %FALSE
33755 // @tool_item will not appear on toolbars that are docked vertically.
33756 // <visible_vertical>: whether @tool_item is visible when the toolbar is in vertical mode
33757 void set_visible_vertical()(int visible_vertical) nothrow {
33758 gtk_tool_item_set_visible_vertical(&this, visible_vertical);
33761 // VERSION: 2.14
33762 // Emits the signal #GtkToolItem::toolbar_reconfigured on @tool_item.
33763 // #GtkToolbar and other #GtkToolShell implementations use this function
33764 // to notify children, when some aspect of their configuration changes.
33765 void toolbar_reconfigured()() nothrow {
33766 gtk_tool_item_toolbar_reconfigured(&this);
33769 // This signal is emitted when the toolbar needs information from @tool_item
33770 // about whether the item should appear in the toolbar overflow menu. In
33771 // response the tool item should either
33772 // <itemizedlist>
33773 // <listitem>call gtk_tool_item_set_proxy_menu_item() with a %NULL
33774 // pointer and return %TRUE to indicate that the item should not appear
33775 // in the overflow menu
33776 // </listitem>
33777 // <listitem> call gtk_tool_item_set_proxy_menu_item() with a new menu
33778 // item and return %TRUE, or
33779 // </listitem>
33780 // <listitem> return %FALSE to indicate that the signal was not
33781 // handled by the item. This means that
33782 // the item will not appear in the overflow menu unless a later handler
33783 // installs a menu item.
33784 // </listitem>
33785 // </itemizedlist>
33787 // The toolbar may cache the result of this signal. When the tool item changes
33788 // how it will respond to this signal it must call gtk_tool_item_rebuild_menu()
33789 // to invalidate the cache and ensure that the toolbar rebuilds its overflow
33790 // menu.
33791 // RETURNS: %TRUE if the signal was handled, %FALSE if not
33792 extern (C) alias static c_int function (ToolItem* this_, void* user_data=null) nothrow signal_create_menu_proxy;
33794 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33795 return super_.signal_connect!name(cb, data, cf);
33798 ulong signal_connect(string name:"create-menu-proxy", CB/*:signal_create_menu_proxy*/)
33799 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
33800 if (is(typeof(cb)==signal_create_menu_proxy)||_ttmm!(CB, signal_create_menu_proxy)()) {
33801 return signal_connect_data!()(&this, cast(char*)"create-menu-proxy",
33802 cast(GObject2.Callback)cb, data, null, cf);
33805 // DEPRECATED (v2.12) glib:signal: set-tooltip - With the new tooltip API, there is no
33806 // This signal is emitted when the toolitem's tooltip changes.
33807 // Application developers can use gtk_tool_item_set_tooltip() to
33808 // set the item's tooltip.
33811 // need to use this signal anymore.
33812 // RETURNS: %TRUE if the signal was handled, %FALSE if not
33813 // <tooltips>: the #GtkTooltips
33814 // <tip_text>: the tooltip text
33815 // <tip_private>: the tooltip private text
33816 extern (C) alias static c_int function (ToolItem* this_, Tooltips* tooltips, char* tip_text, char* tip_private, void* user_data=null) nothrow signal_set_tooltip;
33817 ulong signal_connect(string name:"set-tooltip", CB/*:signal_set_tooltip*/)
33818 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
33819 if (is(typeof(cb)==signal_set_tooltip)||_ttmm!(CB, signal_set_tooltip)()) {
33820 return signal_connect_data!()(&this, cast(char*)"set-tooltip",
33821 cast(GObject2.Callback)cb, data, null, cf);
33824 // This signal is emitted when some property of the toolbar that the
33825 // item is a child of changes. For custom subclasses of #GtkToolItem,
33826 // the default handler of this signal use the functions
33827 // <itemizedlist>
33828 // <listitem>gtk_tool_shell_get_orientation()</listitem>
33829 // <listitem>gtk_tool_shell_get_style()</listitem>
33830 // <listitem>gtk_tool_shell_get_icon_size()</listitem>
33831 // <listitem>gtk_tool_shell_get_relief_style()</listitem>
33832 // </itemizedlist>
33833 // to find out what the toolbar should look like and change
33834 // themselves accordingly.
33835 extern (C) alias static void function (ToolItem* this_, void* user_data=null) nothrow signal_toolbar_reconfigured;
33836 ulong signal_connect(string name:"toolbar-reconfigured", CB/*:signal_toolbar_reconfigured*/)
33837 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
33838 if (is(typeof(cb)==signal_toolbar_reconfigured)||_ttmm!(CB, signal_toolbar_reconfigured)()) {
33839 return signal_connect_data!()(&this, cast(char*)"toolbar-reconfigured",
33840 cast(GObject2.Callback)cb, data, null, cf);
33844 struct ToolItemClass {
33845 BinClass parent_class;
33846 extern (C) int function (ToolItem* tool_item) nothrow create_menu_proxy;
33847 extern (C) void function (ToolItem* tool_item) nothrow toolbar_reconfigured;
33848 extern (C) int function (ToolItem* tool_item, Tooltips* tooltips, char* tip_text, char* tip_private) nothrow set_tooltip;
33849 extern (C) void function () nothrow _gtk_reserved1;
33850 extern (C) void function () nothrow _gtk_reserved2;
33851 extern (C) void function () nothrow _gtk_reserved3;
33852 extern (C) void function () nothrow _gtk_reserved4;
33856 // A #GtkToolItemGroup is used together with #GtkToolPalette to add
33857 // #GtkToolItem<!-- -->s to a palette like container with different
33858 // categories and drag and drop support.
33859 struct ToolItemGroup /* : Container */ {
33860 mixin Atk.ImplementorIface.__interface__;
33861 mixin Buildable.__interface__;
33862 mixin ToolShell.__interface__;
33863 alias parent_instance this;
33864 alias parent_instance super_;
33865 alias parent_instance container;
33866 Container parent_instance;
33867 ToolItemGroupPrivate* priv;
33870 // VERSION: 2.20
33871 // Creates a new tool item group with label @label.
33872 // RETURNS: a new #GtkToolItemGroup.
33873 // <label>: the label of the new group
33874 static ToolItemGroup* new_(AT0)(AT0 /*char*/ label) nothrow {
33875 return gtk_tool_item_group_new(toCString!(char*)(label));
33877 static auto opCall(AT0)(AT0 /*char*/ label) {
33878 return gtk_tool_item_group_new(toCString!(char*)(label));
33881 // VERSION: 2.20
33882 // Gets whether @group is collapsed or expanded.
33883 // RETURNS: %TRUE if @group is collapsed, %FALSE if it is expanded
33884 int get_collapsed()() nothrow {
33885 return gtk_tool_item_group_get_collapsed(&this);
33888 // VERSION: 2.20
33889 // Gets the tool item at position (x, y).
33890 // RETURNS: the #GtkToolItem at position (x, y)
33891 // <x>: the x position
33892 // <y>: the y position
33893 ToolItem* get_drop_item()(int x, int y) nothrow {
33894 return gtk_tool_item_group_get_drop_item(&this, x, y);
33897 // VERSION: 2.20
33898 // Gets the ellipsization mode of @group.
33899 // RETURNS: the #PangoEllipsizeMode of @group
33900 Pango.EllipsizeMode get_ellipsize()() nothrow {
33901 return gtk_tool_item_group_get_ellipsize(&this);
33904 // VERSION: 2.20
33905 // Gets the relief mode of the header button of @group.
33906 // RETURNS: the #GtkReliefStyle
33907 ReliefStyle get_header_relief()() nothrow {
33908 return gtk_tool_item_group_get_header_relief(&this);
33911 // VERSION: 2.20
33912 // Gets the position of @item in @group as index.
33913 // RETURNS: the index of @item in @group or -1 if @item is no child of @group
33914 // <item>: a #GtkToolItem
33915 int get_item_position(AT0)(AT0 /*ToolItem*/ item) nothrow {
33916 return gtk_tool_item_group_get_item_position(&this, UpCast!(ToolItem*)(item));
33919 // VERSION: 2.20
33920 // Gets the label of @group.
33922 // and must not be modified. Note that %NULL is returned if a custom
33923 // label has been set with gtk_tool_item_group_set_label_widget()
33924 // RETURNS: the label of @group. The label is an internal string of @group
33925 char* get_label()() nothrow {
33926 return gtk_tool_item_group_get_label(&this);
33929 // VERSION: 2.20
33930 // Gets the label widget of @group.
33931 // See gtk_tool_item_group_set_label_widget().
33932 // RETURNS: the label widget of @group
33933 Widget* get_label_widget()() nothrow {
33934 return gtk_tool_item_group_get_label_widget(&this);
33937 // VERSION: 2.20
33938 // Gets the number of tool items in @group.
33939 // RETURNS: the number of tool items in @group
33940 uint get_n_items()() nothrow {
33941 return gtk_tool_item_group_get_n_items(&this);
33944 // VERSION: 2.20
33945 // Gets the tool item at @index in group.
33946 // RETURNS: the #GtkToolItem at index
33947 // <index>: the index
33948 ToolItem* get_nth_item()(uint index) nothrow {
33949 return gtk_tool_item_group_get_nth_item(&this, index);
33952 // VERSION: 2.20
33953 // Inserts @item at @position in the list of children of @group.
33954 // <item>: the #GtkToolItem to insert into @group
33955 // <position>: the position of @item in @group, starting with 0. The position -1 means end of list.
33956 void insert(AT0)(AT0 /*ToolItem*/ item, int position) nothrow {
33957 gtk_tool_item_group_insert(&this, UpCast!(ToolItem*)(item), position);
33960 // VERSION: 2.20
33961 // Sets whether the @group should be collapsed or expanded.
33962 // <collapsed>: whether the @group should be collapsed or expanded
33963 void set_collapsed()(int collapsed) nothrow {
33964 gtk_tool_item_group_set_collapsed(&this, collapsed);
33967 // VERSION: 2.20
33968 // Sets the ellipsization mode which should be used by labels in @group.
33969 // <ellipsize>: the #PangoEllipsizeMode labels in @group should use
33970 void set_ellipsize()(Pango.EllipsizeMode ellipsize) nothrow {
33971 gtk_tool_item_group_set_ellipsize(&this, ellipsize);
33974 // VERSION: 2.20
33975 // Set the button relief of the group header.
33976 // See gtk_button_set_relief() for details.
33977 // <style>: the #GtkReliefStyle
33978 void set_header_relief()(ReliefStyle style) nothrow {
33979 gtk_tool_item_group_set_header_relief(&this, style);
33982 // VERSION: 2.20
33983 // Sets the position of @item in the list of children of @group.
33984 // <item>: the #GtkToolItem to move to a new position, should be a child of @group.
33985 // <position>: the new position of @item in @group, starting with 0. The position -1 means end of list.
33986 void set_item_position(AT0)(AT0 /*ToolItem*/ item, int position) nothrow {
33987 gtk_tool_item_group_set_item_position(&this, UpCast!(ToolItem*)(item), position);
33990 // VERSION: 2.20
33991 // Sets the label of the tool item group. The label is displayed in the header
33992 // of the group.
33993 // <label>: the new human-readable label of of the group
33994 void set_label(AT0)(AT0 /*char*/ label) nothrow {
33995 gtk_tool_item_group_set_label(&this, toCString!(char*)(label));
33998 // VERSION: 2.20
33999 // Sets the label of the tool item group.
34000 // The label widget is displayed in the header of the group, in place
34001 // of the usual label.
34002 // <label_widget>: the widget to be displayed in place of the usual label
34003 void set_label_widget(AT0)(AT0 /*Widget*/ label_widget) nothrow {
34004 gtk_tool_item_group_set_label_widget(&this, UpCast!(Widget*)(label_widget));
34008 struct ToolItemGroupClass {
34009 ContainerClass parent_class;
34012 struct ToolItemGroupPrivate {
34015 struct ToolItemPrivate {
34019 // A #GtkToolPalette allows you to add #GtkToolItem<!-- -->s to a palette-like
34020 // container with different categories and drag and drop support.
34022 // A #GtkToolPalette is created with a call to gtk_tool_palette_new().
34024 // #GtkToolItem<!-- -->s cannot be added directly to a #GtkToolPalette -
34025 // instead they are added to a #GtkToolItemGroup which can than be added
34026 // to a #GtkToolPalette. To add a #GtkToolItemGroup to a #GtkToolPalette,
34027 // use gtk_container_add().
34029 // |[
34030 // GtkWidget *palette, *group;
34031 // GtkToolItem *item;
34033 // palette = gtk_tool_palette_new ();
34034 // group = gtk_tool_item_group_new (_("Test Category"));
34035 // gtk_container_add (GTK_CONTAINER (palette), group);
34037 // item = gtk_tool_button_new_from_stock (GTK_STOCK_OK);
34038 // gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
34039 // ]|
34041 // The easiest way to use drag and drop with #GtkToolPalette is to call
34042 // gtk_tool_palette_add_drag_dest() with the desired drag source @palette
34043 // and the desired drag target @widget. Then gtk_tool_palette_get_drag_item()
34044 // can be used to get the dragged item in the #GtkWidget::drag-data-received
34045 // signal handler of the drag target.
34047 // |[
34048 // static void
34049 // passive_canvas_drag_data_received (GtkWidget *widget,
34050 // GdkDragContext *context,
34051 // gint x,
34052 // gint y,
34053 // GtkSelectionData *selection,
34054 // guint info,
34055 // guint time,
34056 // gpointer data)
34057 // {
34058 // GtkWidget *palette;
34059 // GtkWidget *item;
34061 // /<!-- -->* Get the dragged item *<!-- -->/
34062 // palette = gtk_widget_get_ancestor (gtk_drag_get_source_widget (context),
34063 // GTK_TYPE_TOOL_PALETTE);
34064 // if (palette != NULL)
34065 // item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
34066 // selection);
34068 // /<!-- -->* Do something with item *<!-- -->/
34069 // }
34071 // GtkWidget *target, palette;
34073 // palette = gtk_tool_palette_new ();
34074 // target = gtk_drawing_area_new ();
34076 // g_signal_connect (G_OBJECT (target), "drag-data-received",
34077 // G_CALLBACK (passive_canvas_drag_data_received), NULL);
34078 // gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette), target,
34079 // GTK_DEST_DEFAULT_ALL,
34080 // GTK_TOOL_PALETTE_DRAG_ITEMS,
34081 // GDK_ACTION_COPY);
34082 // ]|
34083 struct ToolPalette /* : Container */ {
34084 mixin Atk.ImplementorIface.__interface__;
34085 mixin Buildable.__interface__;
34086 mixin Orientable.__interface__;
34087 alias parent_instance this;
34088 alias parent_instance super_;
34089 alias parent_instance container;
34090 Container parent_instance;
34091 ToolPalettePrivate* priv;
34094 // VERSION: 2.20
34095 // Creates a new tool palette.
34096 // RETURNS: a new #GtkToolPalette
34097 static ToolPalette* new_()() nothrow {
34098 return gtk_tool_palette_new();
34100 static auto opCall()() {
34101 return gtk_tool_palette_new();
34104 // VERSION: 2.20
34105 // Get the target entry for a dragged #GtkToolItemGroup.
34106 // RETURNS: the #GtkTargetEntry for a dragged group
34107 static TargetEntry* get_drag_target_group()() nothrow {
34108 return gtk_tool_palette_get_drag_target_group();
34111 // VERSION: 2.20
34112 // Gets the target entry for a dragged #GtkToolItem.
34113 // RETURNS: the #GtkTargetEntry for a dragged item.
34114 static TargetEntry* get_drag_target_item()() nothrow {
34115 return gtk_tool_palette_get_drag_target_item();
34118 // VERSION: 2.20
34119 // Sets @palette as drag source (see gtk_tool_palette_set_drag_source())
34120 // and sets @widget as a drag destination for drags from @palette.
34121 // See gtk_drag_dest_set().
34122 // <widget>: a #GtkWidget which should be a drag destination for @palette
34123 // <flags>: the flags that specify what actions GTK+ should take for drops on that widget
34124 // <targets>: the #GtkToolPaletteDragTarget<!-- -->s which the widget should support
34125 // <actions>: the #GdkDragAction<!-- -->s which the widget should suppport
34126 void add_drag_dest(AT0)(AT0 /*Widget*/ widget, DestDefaults flags, ToolPaletteDragTargets targets, Gdk2.DragAction actions) nothrow {
34127 gtk_tool_palette_add_drag_dest(&this, UpCast!(Widget*)(widget), flags, targets, actions);
34130 // VERSION: 2.20
34131 // Get the dragged item from the selection.
34132 // This could be a #GtkToolItem or a #GtkToolItemGroup.
34133 // RETURNS: the dragged item in selection
34134 // <selection>: a #GtkSelectionData
34135 Widget* get_drag_item(AT0)(AT0 /*SelectionData*/ selection) nothrow {
34136 return gtk_tool_palette_get_drag_item(&this, UpCast!(SelectionData*)(selection));
34139 // VERSION: 2.20
34140 // Gets the group at position (x, y).
34142 // if there is no such group
34143 // RETURNS: the #GtkToolItemGroup at position or %NULL
34144 // <x>: the x position
34145 // <y>: the y position
34146 ToolItemGroup* get_drop_group()(int x, int y) nothrow {
34147 return gtk_tool_palette_get_drop_group(&this, x, y);
34150 // VERSION: 2.20
34151 // Gets the item at position (x, y).
34152 // See gtk_tool_palette_get_drop_group().
34153 // RETURNS: the #GtkToolItem at position or %NULL if there is no such item
34154 // <x>: the x position
34155 // <y>: the y position
34156 ToolItem* get_drop_item()(int x, int y) nothrow {
34157 return gtk_tool_palette_get_drop_item(&this, x, y);
34160 // VERSION: 2.20
34161 // Gets whether @group is exclusive or not.
34162 // See gtk_tool_palette_set_exclusive().
34163 // RETURNS: %TRUE if @group is exclusive
34164 // <group>: a #GtkToolItemGroup which is a child of palette
34165 int get_exclusive(AT0)(AT0 /*ToolItemGroup*/ group) nothrow {
34166 return gtk_tool_palette_get_exclusive(&this, UpCast!(ToolItemGroup*)(group));
34169 // VERSION: 2.20
34170 // Gets whether group should be given extra space.
34171 // See gtk_tool_palette_set_expand().
34172 // RETURNS: %TRUE if group should be given extra space, %FALSE otherwise
34173 // <group>: a #GtkToolItemGroup which is a child of palette
34174 int get_expand(AT0)(AT0 /*ToolItemGroup*/ group) nothrow {
34175 return gtk_tool_palette_get_expand(&this, UpCast!(ToolItemGroup*)(group));
34178 // VERSION: 2.20
34179 // Gets the position of @group in @palette as index.
34180 // See gtk_tool_palette_set_group_position().
34181 // RETURNS: the index of group or -1 if @group is not a child of @palette
34182 // <group>: a #GtkToolItemGroup
34183 int get_group_position(AT0)(AT0 /*ToolItemGroup*/ group) nothrow {
34184 return gtk_tool_palette_get_group_position(&this, UpCast!(ToolItemGroup*)(group));
34187 // VERSION: 2.20
34188 // Gets the horizontal adjustment of the tool palette.
34189 // RETURNS: the horizontal adjustment of @palette
34190 Adjustment* get_hadjustment()() nothrow {
34191 return gtk_tool_palette_get_hadjustment(&this);
34194 // VERSION: 2.20
34195 // Gets the size of icons in the tool palette.
34196 // See gtk_tool_palette_set_icon_size().
34197 // RETURNS: the #GtkIconSize of icons in the tool palette
34198 IconSize get_icon_size()() nothrow {
34199 return gtk_tool_palette_get_icon_size(&this);
34202 // VERSION: 2.20
34203 // Gets the style (icons, text or both) of items in the tool palette.
34204 // RETURNS: the #GtkToolbarStyle of items in the tool palette.
34205 ToolbarStyle get_style()() nothrow {
34206 return gtk_tool_palette_get_style(&this);
34209 // VERSION: 2.20
34210 // Gets the vertical adjustment of the tool palette.
34211 // RETURNS: the vertical adjustment of @palette
34212 Adjustment* get_vadjustment()() nothrow {
34213 return gtk_tool_palette_get_vadjustment(&this);
34216 // VERSION: 2.20
34217 // Sets the tool palette as a drag source.
34218 // Enables all groups and items in the tool palette as drag sources
34219 // on button 1 and button 3 press with copy and move actions.
34220 // See gtk_drag_source_set().
34221 // <targets>: the #GtkToolPaletteDragTarget<!-- -->s which the widget should support
34222 void set_drag_source()(ToolPaletteDragTargets targets) nothrow {
34223 gtk_tool_palette_set_drag_source(&this, targets);
34226 // VERSION: 2.20
34227 // Sets whether the group should be exclusive or not.
34228 // If an exclusive group is expanded all other groups are collapsed.
34229 // <group>: a #GtkToolItemGroup which is a child of palette
34230 // <exclusive>: whether the group should be exclusive or not
34231 void set_exclusive(AT0)(AT0 /*ToolItemGroup*/ group, int exclusive) nothrow {
34232 gtk_tool_palette_set_exclusive(&this, UpCast!(ToolItemGroup*)(group), exclusive);
34235 // VERSION: 2.20
34236 // Sets whether the group should be given extra space.
34237 // <group>: a #GtkToolItemGroup which is a child of palette
34238 // <expand>: whether the group should be given extra space
34239 void set_expand(AT0)(AT0 /*ToolItemGroup*/ group, int expand) nothrow {
34240 gtk_tool_palette_set_expand(&this, UpCast!(ToolItemGroup*)(group), expand);
34243 // VERSION: 2.20
34244 // Sets the position of the group as an index of the tool palette.
34245 // If position is 0 the group will become the first child, if position is
34246 // -1 it will become the last child.
34247 // <group>: a #GtkToolItemGroup which is a child of palette
34248 // <position>: a new index for group
34249 void set_group_position(AT0)(AT0 /*ToolItemGroup*/ group, int position) nothrow {
34250 gtk_tool_palette_set_group_position(&this, UpCast!(ToolItemGroup*)(group), position);
34253 // VERSION: 2.20
34254 // Sets the size of icons in the tool palette.
34255 // <icon_size>: the #GtkIconSize that icons in the tool palette shall have
34256 void set_icon_size()(IconSize icon_size) nothrow {
34257 gtk_tool_palette_set_icon_size(&this, icon_size);
34260 // VERSION: 2.20
34261 // Sets the style (text, icons or both) of items in the tool palette.
34262 // <style>: the #GtkToolbarStyle that items in the tool palette shall have
34263 void set_style()(ToolbarStyle style) nothrow {
34264 gtk_tool_palette_set_style(&this, style);
34267 // VERSION: 2.20
34268 // Unsets the tool palette icon size set with gtk_tool_palette_set_icon_size(),
34269 // so that user preferences will be used to determine the icon size.
34270 void unset_icon_size()() nothrow {
34271 gtk_tool_palette_unset_icon_size(&this);
34274 // VERSION: 2.20
34275 // Unsets a toolbar style set with gtk_tool_palette_set_style(),
34276 // so that user preferences will be used to determine the toolbar style.
34277 void unset_style()() nothrow {
34278 gtk_tool_palette_unset_style(&this);
34281 // VERSION: 2.20
34282 // Set the scroll adjustments for the viewport.
34283 // Usually scrolled containers like GtkScrolledWindow will emit this
34284 // signal to connect two instances of GtkScrollbar to the scroll
34285 // directions of the GtkToolpalette.
34286 // <hadjustment>: The horizontal adjustment
34287 // <vadjustment>: The vertical adjustment
34288 extern (C) alias static void function (ToolPalette* this_, Adjustment* hadjustment, Adjustment* vadjustment, void* user_data=null) nothrow signal_set_scroll_adjustments;
34290 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34291 return super_.signal_connect!name(cb, data, cf);
34294 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)
34295 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
34296 if (is(typeof(cb)==signal_set_scroll_adjustments)||_ttmm!(CB, signal_set_scroll_adjustments)()) {
34297 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
34298 cast(GObject2.Callback)cb, data, null, cf);
34302 struct ToolPaletteClass {
34303 ContainerClass parent_class;
34304 extern (C) void function (Widget* widget, Adjustment* hadjustment, Adjustment* vadjustment) nothrow set_scroll_adjustments;
34305 extern (C) void function () nothrow _gtk_reserved1;
34306 extern (C) void function () nothrow _gtk_reserved2;
34307 extern (C) void function () nothrow _gtk_reserved3;
34308 extern (C) void function () nothrow _gtk_reserved4;
34309 extern (C) void function () nothrow _gtk_reserved5;
34310 extern (C) void function () nothrow _gtk_reserved6;
34313 // Flags used to specify the supported drag targets.
34314 enum ToolPaletteDragTargets {
34315 ITEMS = 1,
34316 GROUPS = 2
34318 struct ToolPalettePrivate {
34322 // The #GtkToolShell interface allows container widgets to provide additional
34323 // information when embedding #GtkToolItem widgets.
34324 struct ToolShell /* Interface */ {
34325 mixin template __interface__() {
34326 // VERSION: 2.20
34327 // Retrieves the current ellipsize mode for the tool shell. Tool items must not
34328 // call this function directly, but rely on gtk_tool_item_get_ellipsize_mode()
34329 // instead.
34330 // RETURNS: the current ellipsize mode of @shell
34331 Pango.EllipsizeMode get_ellipsize_mode()() nothrow {
34332 return gtk_tool_shell_get_ellipsize_mode(cast(ToolShell*)&this);
34335 // VERSION: 2.14
34336 // Retrieves the icon size for the tool shell. Tool items must not call this
34337 // function directly, but rely on gtk_tool_item_get_icon_size() instead.
34338 // RETURNS: the current size for icons of @shell
34339 IconSize get_icon_size()() nothrow {
34340 return gtk_tool_shell_get_icon_size(cast(ToolShell*)&this);
34343 // VERSION: 2.14
34344 // Retrieves the current orientation for the tool shell. Tool items must not
34345 // call this function directly, but rely on gtk_tool_item_get_orientation()
34346 // instead.
34347 // RETURNS: the current orientation of @shell
34349 // method "get_orientation" removed: "get_orientation" clashes with other interfaces in Toolbar.
34351 // VERSION: 2.14
34352 // Returns the relief style of buttons on @shell. Tool items must not call this
34353 // function directly, but rely on gtk_tool_item_get_relief_style() instead.
34354 // RETURNS: The relief style of buttons on @shell.
34355 ReliefStyle get_relief_style()() nothrow {
34356 return gtk_tool_shell_get_relief_style(cast(ToolShell*)&this);
34359 // VERSION: 2.14
34360 // Retrieves whether the tool shell has text, icons, or both. Tool items must
34361 // not call this function directly, but rely on gtk_tool_item_get_style()
34362 // instead.
34363 // RETURNS: the current style of @shell
34364 ToolbarStyle get_style()() nothrow {
34365 return gtk_tool_shell_get_style(cast(ToolShell*)&this);
34368 // VERSION: 2.20
34369 // Retrieves the current text alignment for the tool shell. Tool items must not
34370 // call this function directly, but rely on gtk_tool_item_get_text_alignment()
34371 // instead.
34372 // RETURNS: the current text alignment of @shell
34373 float get_text_alignment()() nothrow {
34374 return gtk_tool_shell_get_text_alignment(cast(ToolShell*)&this);
34377 // VERSION: 2.20
34378 // Retrieves the current text orientation for the tool shell. Tool items must not
34379 // call this function directly, but rely on gtk_tool_item_get_text_orientation()
34380 // instead.
34381 // RETURNS: the current text orientation of @shell
34382 Orientation get_text_orientation()() nothrow {
34383 return gtk_tool_shell_get_text_orientation(cast(ToolShell*)&this);
34386 // VERSION: 2.20
34387 // Retrieves the current text size group for the tool shell. Tool items must not
34388 // call this function directly, but rely on gtk_tool_item_get_text_size_group()
34389 // instead.
34390 // RETURNS: the current text size group of @shell
34391 SizeGroup* get_text_size_group()() nothrow {
34392 return gtk_tool_shell_get_text_size_group(cast(ToolShell*)&this);
34395 // VERSION: 2.14
34396 // Calling this function signals the tool shell that the overflow menu item for
34397 // tool items have changed. If there is an overflow menu and if it is visible
34398 // when this function it called, the menu will be rebuilt.
34400 // Tool items must not call this function directly, but rely on
34401 // gtk_tool_item_rebuild_menu() instead.
34402 void rebuild_menu()() nothrow {
34403 gtk_tool_shell_rebuild_menu(cast(ToolShell*)&this);
34406 mixin __interface__;
34409 // Virtual function table for the #GtkToolShell interface.
34410 struct ToolShellIface {
34411 private GObject2.TypeInterface g_iface;
34412 extern (C) IconSize function (ToolShell* shell) nothrow get_icon_size;
34413 // RETURNS: the current orientation of @shell
34414 extern (C) Orientation function (ToolShell* shell) nothrow get_orientation;
34415 // RETURNS: the current style of @shell
34416 extern (C) ToolbarStyle function (ToolShell* shell) nothrow get_style;
34417 // RETURNS: The relief style of buttons on @shell.
34418 extern (C) ReliefStyle function (ToolShell* shell) nothrow get_relief_style;
34419 extern (C) void function (ToolShell* shell) nothrow rebuild_menu;
34420 // RETURNS: the current text orientation of @shell
34421 extern (C) Orientation function (ToolShell* shell) nothrow get_text_orientation;
34422 // RETURNS: the current text alignment of @shell
34423 extern (C) float function (ToolShell* shell) nothrow get_text_alignment;
34424 // RETURNS: the current ellipsize mode of @shell
34425 extern (C) Pango.EllipsizeMode function (ToolShell* shell) nothrow get_ellipsize_mode;
34426 // RETURNS: the current text size group of @shell
34427 extern (C) SizeGroup* function (ToolShell* shell) nothrow get_text_size_group;
34430 struct Toolbar /* : Container */ {
34431 mixin Atk.ImplementorIface.__interface__;
34432 mixin Buildable.__interface__;
34433 mixin Orientable.__interface__;
34434 mixin ToolShell.__interface__;
34435 alias container this;
34436 alias container super_;
34437 Container container;
34438 int num_children;
34439 GLib2.List* children;
34440 Orientation orientation;
34441 ToolbarStyle style;
34442 IconSize icon_size;
34443 Tooltips* tooltips;
34444 private int button_maxw, button_maxh;
34445 private uint _gtk_reserved1, _gtk_reserved2;
34446 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
34447 uint, "style_set", 1,
34448 uint, "icon_size_set", 1,
34449 uint, "__dummy32A", 30));
34452 // Creates a new toolbar.
34453 // RETURNS: the newly-created toolbar.
34454 static Toolbar* new_()() nothrow {
34455 return gtk_toolbar_new();
34457 static auto opCall()() {
34458 return gtk_toolbar_new();
34461 // Unintrospectable method: append_element() / gtk_toolbar_append_element()
34462 // DEPRECATED (v2.4) method: append_element - Use gtk_toolbar_insert() instead.
34463 // Adds a new element to the end of a toolbar.
34465 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
34466 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
34467 // the radio group for the new element. In all other cases, @widget must
34468 // be %NULL.
34470 // @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
34471 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
34472 // RETURNS: the new toolbar element as a #GtkWidget.
34473 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
34474 // <widget>: a #GtkWidget, or %NULL.
34475 // <text>: the element's label.
34476 // <tooltip_text>: the element's tooltip.
34477 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
34478 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
34479 // <callback>: the function to be executed when the button is pressed.
34480 // <user_data>: any data you wish to pass to the callback.
34481 Widget* append_element(AT0, AT1, AT2, AT3, AT4, AT5)(ToolbarChildType type, AT0 /*Widget*/ widget, AT1 /*char*/ text, AT2 /*char*/ tooltip_text, AT3 /*char*/ tooltip_private_text, AT4 /*Widget*/ icon, GObject2.Callback callback, AT5 /*void*/ user_data) nothrow {
34482 return gtk_toolbar_append_element(&this, type, UpCast!(Widget*)(widget), toCString!(char*)(text), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), UpCast!(Widget*)(icon), callback, UpCast!(void*)(user_data));
34485 // Unintrospectable method: append_item() / gtk_toolbar_append_item()
34486 // DEPRECATED (v2.4) method: append_item - Use gtk_toolbar_insert() instead.
34487 // Inserts a new item into the toolbar. You must specify the position
34488 // in the toolbar where it will be inserted.
34490 // @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
34491 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
34492 // RETURNS: the new toolbar item as a #GtkWidget.
34493 // <text>: give your toolbar button a label.
34494 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
34495 // <tooltip_private_text>: use with #GtkTipsQuery.
34496 // <icon>: a #GtkWidget that should be used as the button's icon.
34497 // <callback>: the function to be executed when the button is pressed.
34498 // <user_data>: a pointer to any data you wish to be passed to the callback.
34499 Widget* append_item(AT0, AT1, AT2, AT3, AT4)(AT0 /*char*/ text, AT1 /*char*/ tooltip_text, AT2 /*char*/ tooltip_private_text, AT3 /*Widget*/ icon, GObject2.Callback callback, AT4 /*void*/ user_data) nothrow {
34500 return gtk_toolbar_append_item(&this, toCString!(char*)(text), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), UpCast!(Widget*)(icon), callback, UpCast!(void*)(user_data));
34503 // DEPRECATED (v2.4) method: append_space - Use gtk_toolbar_insert() instead.
34504 // Adds a new space to the end of the toolbar.
34505 void append_space()() nothrow {
34506 gtk_toolbar_append_space(&this);
34509 // DEPRECATED (v2.4) method: append_widget - Use gtk_toolbar_insert() instead.
34510 // Adds a widget to the end of the given toolbar.
34511 // <widget>: a #GtkWidget to add to the toolbar.
34512 // <tooltip_text>: the element's tooltip.
34513 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
34514 void append_widget(AT0, AT1, AT2)(AT0 /*Widget*/ widget, AT1 /*char*/ tooltip_text=null, AT2 /*char*/ tooltip_private_text=null) nothrow {
34515 gtk_toolbar_append_widget(&this, UpCast!(Widget*)(widget), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text));
34518 // VERSION: 2.4
34519 // Returns the position corresponding to the indicated point on
34520 // @toolbar. This is useful when dragging items to the toolbar:
34521 // this function returns the position a new item should be
34522 // inserted.
34524 // @x and @y are in @toolbar coordinates.
34525 // RETURNS: The position corresponding to the point (@x, @y) on the toolbar.
34526 // <x>: x coordinate of a point on the toolbar
34527 // <y>: y coordinate of a point on the toolbar
34528 int get_drop_index()(int x, int y) nothrow {
34529 return gtk_toolbar_get_drop_index(&this, x, y);
34532 // Retrieves the icon size for the toolbar. See gtk_toolbar_set_icon_size().
34534 // the toolbar.
34535 // RETURNS: the current icon size for the icons on
34536 IconSize get_icon_size()() nothrow {
34537 return gtk_toolbar_get_icon_size(&this);
34540 // VERSION: 2.4
34541 // Returns the position of @item on the toolbar, starting from 0.
34542 // It is an error if @item is not a child of the toolbar.
34543 // RETURNS: the position of item on the toolbar.
34544 // <item>: a #GtkToolItem that is a child of @toolbar
34545 int get_item_index(AT0)(AT0 /*ToolItem*/ item) nothrow {
34546 return gtk_toolbar_get_item_index(&this, UpCast!(ToolItem*)(item));
34549 // VERSION: 2.4
34550 // Returns the number of items on the toolbar.
34551 // RETURNS: the number of items on the toolbar
34552 int get_n_items()() nothrow {
34553 return gtk_toolbar_get_n_items(&this);
34556 // VERSION: 2.4
34557 // Returns the @n<!-- -->'th item on @toolbar, or %NULL if the
34558 // toolbar does not contain an @n<!-- -->'th item.
34560 // or %NULL if there isn't an @n<!-- -->'th item.
34561 // RETURNS: The @n<!-- -->'th #GtkToolItem on @toolbar,
34562 // <n>: A position on the toolbar
34563 ToolItem* get_nth_item()(int n) nothrow {
34564 return gtk_toolbar_get_nth_item(&this, n);
34567 // DEPRECATED (v2.16) method: get_orientation - Use gtk_orientable_get_orientation() instead.
34568 // Retrieves the current orientation of the toolbar. See
34569 // gtk_toolbar_set_orientation().
34570 // RETURNS: the orientation
34571 Orientation get_orientation()() nothrow {
34572 return gtk_toolbar_get_orientation(&this);
34575 // VERSION: 2.4
34576 // Returns the relief style of buttons on @toolbar. See
34577 // gtk_button_set_relief().
34578 // RETURNS: The relief style of buttons on @toolbar.
34579 ReliefStyle get_relief_style()() nothrow {
34580 return gtk_toolbar_get_relief_style(&this);
34583 // VERSION: 2.4
34584 // Returns whether the toolbar has an overflow menu.
34585 // See gtk_toolbar_set_show_arrow().
34586 // RETURNS: %TRUE if the toolbar has an overflow menu.
34587 int get_show_arrow()() nothrow {
34588 return gtk_toolbar_get_show_arrow(&this);
34591 // Retrieves whether the toolbar has text, icons, or both . See
34592 // gtk_toolbar_set_style().
34593 // RETURNS: the current style of @toolbar
34594 ToolbarStyle get_style()() nothrow {
34595 return gtk_toolbar_get_style(&this);
34598 // DEPRECATED (v2.14) method: get_tooltips - The toolkit-wide #GtkSettings:gtk-enable-tooltips property
34599 // Retrieves whether tooltips are enabled. See
34600 // gtk_toolbar_set_tooltips().
34603 // is now used instead.
34604 // RETURNS: %TRUE if tooltips are enabled
34605 int get_tooltips()() nothrow {
34606 return gtk_toolbar_get_tooltips(&this);
34609 // VERSION: 2.4
34610 // Insert a #GtkToolItem into the toolbar at position @pos. If @pos is
34611 // 0 the item is prepended to the start of the toolbar. If @pos is
34612 // negative, the item is appended to the end of the toolbar.
34613 // <item>: a #GtkToolItem
34614 // <pos>: the position of the new item
34615 void insert(AT0)(AT0 /*ToolItem*/ item, int pos) nothrow {
34616 gtk_toolbar_insert(&this, UpCast!(ToolItem*)(item), pos);
34619 // Unintrospectable method: insert_element() / gtk_toolbar_insert_element()
34620 // DEPRECATED (v2.4) method: insert_element - Use gtk_toolbar_insert() instead.
34621 // Inserts a new element in the toolbar at the given position.
34623 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
34624 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
34625 // the radio group for the new element. In all other cases, @widget must
34626 // be %NULL.
34628 // @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
34629 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
34630 // RETURNS: the new toolbar element as a #GtkWidget.
34631 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
34632 // <widget>: a #GtkWidget, or %NULL.
34633 // <text>: the element's label.
34634 // <tooltip_text>: the element's tooltip.
34635 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
34636 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
34637 // <callback>: the function to be executed when the button is pressed.
34638 // <user_data>: any data you wish to pass to the callback.
34639 // <position>: the number of widgets to insert this element after.
34640 Widget* insert_element(AT0, AT1, AT2, AT3, AT4, AT5)(ToolbarChildType type, AT0 /*Widget*/ widget, AT1 /*char*/ text, AT2 /*char*/ tooltip_text, AT3 /*char*/ tooltip_private_text, AT4 /*Widget*/ icon, GObject2.Callback callback, AT5 /*void*/ user_data, int position) nothrow {
34641 return gtk_toolbar_insert_element(&this, type, UpCast!(Widget*)(widget), toCString!(char*)(text), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), UpCast!(Widget*)(icon), callback, UpCast!(void*)(user_data), position);
34644 // Unintrospectable method: insert_item() / gtk_toolbar_insert_item()
34645 // DEPRECATED (v2.4) method: insert_item - Use gtk_toolbar_insert() instead.
34646 // Inserts a new item into the toolbar. You must specify the position in the
34647 // toolbar where it will be inserted.
34649 // @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
34650 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
34651 // RETURNS: the new toolbar item as a #GtkWidget.
34652 // <text>: give your toolbar button a label.
34653 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
34654 // <tooltip_private_text>: use with #GtkTipsQuery.
34655 // <icon>: a #GtkWidget that should be used as the button's icon.
34656 // <callback>: the function to be executed when the button is pressed.
34657 // <user_data>: a pointer to any data you wish to be passed to the callback.
34658 // <position>: the number of widgets to insert this item after.
34659 Widget* insert_item(AT0, AT1, AT2, AT3, AT4)(AT0 /*char*/ text, AT1 /*char*/ tooltip_text, AT2 /*char*/ tooltip_private_text, AT3 /*Widget*/ icon, GObject2.Callback callback, AT4 /*void*/ user_data, int position) nothrow {
34660 return gtk_toolbar_insert_item(&this, toCString!(char*)(text), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), UpCast!(Widget*)(icon), callback, UpCast!(void*)(user_data), position);
34663 // DEPRECATED (v2.4) method: insert_space - Use gtk_toolbar_insert() instead.
34664 // Inserts a new space in the toolbar at the specified position.
34665 // <position>: the number of widgets after which a space should be inserted.
34666 void insert_space()(int position) nothrow {
34667 gtk_toolbar_insert_space(&this, position);
34670 // Unintrospectable method: insert_stock() / gtk_toolbar_insert_stock()
34671 // DEPRECATED (v2.4) method: insert_stock - Use gtk_toolbar_insert() instead.
34672 // Inserts a stock item at the specified position of the toolbar. If
34673 // @stock_id is not a known stock item ID, it's inserted verbatim,
34674 // except that underscores used to mark mnemonics are removed.
34676 // @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
34677 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
34678 // RETURNS: the inserted widget
34679 // <stock_id>: The id of the stock item you want to insert
34680 // <tooltip_text>: The text in the tooltip of the toolbar button
34681 // <tooltip_private_text>: The private text of the tooltip
34682 // <callback>: The callback called when the toolbar button is clicked.
34683 // <user_data>: user data passed to callback
34684 // <position>: The position the button shall be inserted at. -1 means at the end.
34685 Widget* insert_stock(AT0, AT1, AT2, AT3)(AT0 /*char*/ stock_id, AT1 /*char*/ tooltip_text, AT2 /*char*/ tooltip_private_text, GObject2.Callback callback, AT3 /*void*/ user_data, int position) nothrow {
34686 return gtk_toolbar_insert_stock(&this, toCString!(char*)(stock_id), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), callback, UpCast!(void*)(user_data), position);
34689 // DEPRECATED (v2.4) method: insert_widget - Use gtk_toolbar_insert() instead.
34690 // Inserts a widget in the toolbar at the given position.
34691 // <widget>: a #GtkWidget to add to the toolbar.
34692 // <tooltip_text>: the element's tooltip.
34693 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
34694 // <position>: the number of widgets to insert this widget after.
34695 void insert_widget(AT0, AT1, AT2)(AT0 /*Widget*/ widget, AT1 /*char*/ tooltip_text, AT2 /*char*/ tooltip_private_text, int position) nothrow {
34696 gtk_toolbar_insert_widget(&this, UpCast!(Widget*)(widget), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), position);
34699 // Unintrospectable method: prepend_element() / gtk_toolbar_prepend_element()
34700 // DEPRECATED (v2.4) method: prepend_element - Use gtk_toolbar_insert() instead.
34701 // Adds a new element to the beginning of a toolbar.
34703 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
34704 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
34705 // the radio group for the new element. In all other cases, @widget must
34706 // be %NULL.
34708 // @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
34709 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
34710 // RETURNS: the new toolbar element as a #GtkWidget.
34711 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
34712 // <widget>: a #GtkWidget, or %NULL
34713 // <text>: the element's label.
34714 // <tooltip_text>: the element's tooltip.
34715 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
34716 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
34717 // <callback>: the function to be executed when the button is pressed.
34718 // <user_data>: any data you wish to pass to the callback.
34719 Widget* prepend_element(AT0, AT1, AT2, AT3, AT4, AT5)(ToolbarChildType type, AT0 /*Widget*/ widget, AT1 /*char*/ text, AT2 /*char*/ tooltip_text, AT3 /*char*/ tooltip_private_text, AT4 /*Widget*/ icon, GObject2.Callback callback, AT5 /*void*/ user_data) nothrow {
34720 return gtk_toolbar_prepend_element(&this, type, UpCast!(Widget*)(widget), toCString!(char*)(text), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), UpCast!(Widget*)(icon), callback, UpCast!(void*)(user_data));
34723 // Unintrospectable method: prepend_item() / gtk_toolbar_prepend_item()
34724 // DEPRECATED (v2.4) method: prepend_item - Use gtk_toolbar_insert() instead.
34725 // Adds a new button to the beginning (top or left edges) of the given toolbar.
34727 // @callback must be a pointer to a function taking a #GtkWidget and a gpointer as
34728 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
34729 // RETURNS: the new toolbar item as a #GtkWidget.
34730 // <text>: give your toolbar button a label.
34731 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
34732 // <tooltip_private_text>: use with #GtkTipsQuery.
34733 // <icon>: a #GtkWidget that should be used as the button's icon.
34734 // <callback>: the function to be executed when the button is pressed.
34735 // <user_data>: a pointer to any data you wish to be passed to the callback.
34736 Widget* prepend_item(AT0, AT1, AT2, AT3, AT4)(AT0 /*char*/ text, AT1 /*char*/ tooltip_text, AT2 /*char*/ tooltip_private_text, AT3 /*Widget*/ icon, GObject2.Callback callback, AT4 /*void*/ user_data) nothrow {
34737 return gtk_toolbar_prepend_item(&this, toCString!(char*)(text), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text), UpCast!(Widget*)(icon), callback, UpCast!(void*)(user_data));
34740 // DEPRECATED (v2.4) method: prepend_space - Use gtk_toolbar_insert() instead.
34741 // Adds a new space to the beginning of the toolbar.
34742 void prepend_space()() nothrow {
34743 gtk_toolbar_prepend_space(&this);
34746 // DEPRECATED (v2.4) method: prepend_widget - Use gtk_toolbar_insert() instead.
34747 // Adds a widget to the beginning of the given toolbar.
34748 // <widget>: a #GtkWidget to add to the toolbar.
34749 // <tooltip_text>: the element's tooltip.
34750 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
34751 void prepend_widget(AT0, AT1, AT2)(AT0 /*Widget*/ widget, AT1 /*char*/ tooltip_text=null, AT2 /*char*/ tooltip_private_text=null) nothrow {
34752 gtk_toolbar_prepend_widget(&this, UpCast!(Widget*)(widget), toCString!(char*)(tooltip_text), toCString!(char*)(tooltip_private_text));
34755 // DEPRECATED (v2.4) method: remove_space - Use gtk_toolbar_insert() instead.
34756 // Removes a space from the specified position.
34757 // <position>: the index of the space to remove.
34758 void remove_space()(int position) nothrow {
34759 gtk_toolbar_remove_space(&this, position);
34762 // VERSION: 2.4
34763 // Highlights @toolbar to give an idea of what it would look like
34764 // if @item was added to @toolbar at the position indicated by @index_.
34765 // If @item is %NULL, highlighting is turned off. In that case @index_
34766 // is ignored.
34768 // The @tool_item passed to this function must not be part of any widget
34769 // hierarchy. When an item is set as drop highlight item it can not
34770 // added to any widget hierarchy or used as highlight item for another
34771 // toolbar.
34772 // <tool_item>: a #GtkToolItem, or %NULL to turn of highlighting
34773 // <index_>: a position on @toolbar
34774 void set_drop_highlight_item(AT0)(AT0 /*ToolItem*/ tool_item, int index_) nothrow {
34775 gtk_toolbar_set_drop_highlight_item(&this, UpCast!(ToolItem*)(tool_item), index_);
34778 // This function sets the size of stock icons in the toolbar. You
34779 // can call it both before you add the icons and after they've been
34780 // added. The size you set will override user preferences for the default
34781 // icon size.
34783 // This should only be used for special-purpose toolbars, normal
34784 // application toolbars should respect the user preferences for the
34785 // size of icons.
34786 // <icon_size>: The #GtkIconSize that stock icons in the toolbar shall have.
34787 void set_icon_size()(IconSize icon_size) nothrow {
34788 gtk_toolbar_set_icon_size(&this, icon_size);
34791 // DEPRECATED (v2.16) method: set_orientation - Use gtk_orientable_set_orientation() instead.
34792 // Sets whether a toolbar should appear horizontally or vertically.
34793 // <orientation>: a new #GtkOrientation.
34794 void set_orientation()(Orientation orientation) nothrow {
34795 gtk_toolbar_set_orientation(&this, orientation);
34798 // VERSION: 2.4
34799 // Sets whether to show an overflow menu when
34800 // @toolbar doesn't have room for all items on it. If %TRUE,
34801 // items that there are not room are available through an
34802 // overflow menu.
34803 // <show_arrow>: Whether to show an overflow menu
34804 void set_show_arrow()(int show_arrow) nothrow {
34805 gtk_toolbar_set_show_arrow(&this, show_arrow);
34808 // Alters the view of @toolbar to display either icons only, text only, or both.
34809 // <style>: the new style for @toolbar.
34810 void set_style()(ToolbarStyle style) nothrow {
34811 gtk_toolbar_set_style(&this, style);
34814 // DEPRECATED (v2.14) method: set_tooltips - The toolkit-wide #GtkSettings:gtk-enable-tooltips property
34815 // Sets if the tooltips of a toolbar should be active or not.
34817 // is now used instead.
34818 // <enable>: set to %FALSE to disable the tooltips, or %TRUE to enable them.
34819 void set_tooltips()(int enable) nothrow {
34820 gtk_toolbar_set_tooltips(&this, enable);
34823 // Unsets toolbar icon size set with gtk_toolbar_set_icon_size(), so that
34824 // user preferences will be used to determine the icon size.
34825 void unset_icon_size()() nothrow {
34826 gtk_toolbar_unset_icon_size(&this);
34829 // Unsets a toolbar style set with gtk_toolbar_set_style(), so that
34830 // user preferences will be used to determine the toolbar style.
34831 void unset_style()() nothrow {
34832 gtk_toolbar_unset_style(&this);
34835 // A keybinding signal used internally by GTK+. This signal can't
34836 // be used in application code
34837 // RETURNS: %TRUE if the signal was handled, %FALSE if not
34838 // <focus_home>: %TRUE if the first item should be focused
34839 extern (C) alias static c_int function (Toolbar* this_, c_int focus_home, void* user_data=null) nothrow signal_focus_home_or_end;
34841 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34842 return super_.signal_connect!name(cb, data, cf);
34845 ulong signal_connect(string name:"focus-home-or-end", CB/*:signal_focus_home_or_end*/)
34846 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
34847 if (is(typeof(cb)==signal_focus_home_or_end)||_ttmm!(CB, signal_focus_home_or_end)()) {
34848 return signal_connect_data!()(&this, cast(char*)"focus-home-or-end",
34849 cast(GObject2.Callback)cb, data, null, cf);
34852 // Emitted when the orientation of the toolbar changes.
34853 // <orientation>: the new #GtkOrientation of the toolbar
34854 extern (C) alias static void function (Toolbar* this_, Orientation* orientation, void* user_data=null) nothrow signal_orientation_changed;
34855 ulong signal_connect(string name:"orientation-changed", CB/*:signal_orientation_changed*/)
34856 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
34857 if (is(typeof(cb)==signal_orientation_changed)||_ttmm!(CB, signal_orientation_changed)()) {
34858 return signal_connect_data!()(&this, cast(char*)"orientation-changed",
34859 cast(GObject2.Callback)cb, data, null, cf);
34862 // Emitted when the user right-clicks the toolbar or uses the
34863 // keybinding to display a popup menu.
34865 // Application developers should handle this signal if they want
34866 // to display a context menu on the toolbar. The context-menu should
34867 // appear at the coordinates given by @x and @y. The mouse button
34868 // number is given by the @button parameter. If the menu was popped
34869 // up using the keybaord, @button is -1.
34870 // RETURNS: return %TRUE if the signal was handled, %FALSE if not
34871 // <x>: the x coordinate of the point where the menu should appear
34872 // <y>: the y coordinate of the point where the menu should appear
34873 // <button>: the mouse button the user pressed, or -1
34874 extern (C) alias static c_int function (Toolbar* this_, int x, int y, int button, void* user_data=null) nothrow signal_popup_context_menu;
34875 ulong signal_connect(string name:"popup-context-menu", CB/*:signal_popup_context_menu*/)
34876 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
34877 if (is(typeof(cb)==signal_popup_context_menu)||_ttmm!(CB, signal_popup_context_menu)()) {
34878 return signal_connect_data!()(&this, cast(char*)"popup-context-menu",
34879 cast(GObject2.Callback)cb, data, null, cf);
34882 // Emitted when the style of the toolbar changes.
34883 // <style>: the new #GtkToolbarStyle of the toolbar
34884 extern (C) alias static void function (Toolbar* this_, ToolbarStyle* style, void* user_data=null) nothrow signal_style_changed;
34885 ulong signal_connect(string name:"style-changed", CB/*:signal_style_changed*/)
34886 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
34887 if (is(typeof(cb)==signal_style_changed)||_ttmm!(CB, signal_style_changed)()) {
34888 return signal_connect_data!()(&this, cast(char*)"style-changed",
34889 cast(GObject2.Callback)cb, data, null, cf);
34893 struct ToolbarChild {
34894 ToolbarChildType type;
34895 Widget* widget, icon, label;
34898 enum ToolbarChildType {
34899 SPACE = 0,
34900 BUTTON = 1,
34901 TOGGLEBUTTON = 2,
34902 RADIOBUTTON = 3,
34903 WIDGET = 4
34905 struct ToolbarClass {
34906 ContainerClass parent_class;
34907 extern (C) void function (Toolbar* toolbar, Orientation orientation) nothrow orientation_changed;
34908 extern (C) void function (Toolbar* toolbar, ToolbarStyle style) nothrow style_changed;
34909 extern (C) int function (Toolbar* toolbar, int x, int y, int button_number) nothrow popup_context_menu;
34910 extern (C) void function () nothrow _gtk_reserved1;
34911 extern (C) void function () nothrow _gtk_reserved2;
34912 extern (C) void function () nothrow _gtk_reserved3;
34915 struct ToolbarPrivate {
34918 enum ToolbarSpaceStyle {
34919 EMPTY = 0,
34920 LINE = 1
34922 enum ToolbarStyle {
34923 ICONS = 0,
34924 TEXT = 1,
34925 BOTH = 2,
34926 BOTH_HORIZ = 3
34928 struct Tooltip /* : GObject.Object */ {
34929 alias method_parent this;
34930 alias method_parent super_;
34931 alias method_parent object;
34932 GObject2.Object method_parent;
34935 // VERSION: 2.12
34936 // Triggers a new tooltip query on @display, in order to update the current
34937 // visible tooltip, or to show/hide the current tooltip. This function is
34938 // useful to call when, for example, the state of the widget changed by a
34939 // key press.
34940 // <display>: a #GdkDisplay
34941 static void trigger_tooltip_query(AT0)(AT0 /*Gdk2.Display*/ display) nothrow {
34942 gtk_tooltip_trigger_tooltip_query(UpCast!(Gdk2.Display*)(display));
34945 // VERSION: 2.12
34946 // Replaces the widget packed into the tooltip with
34947 // @custom_widget. @custom_widget does not get destroyed when the tooltip goes
34948 // away.
34949 // By default a box with a #GtkImage and #GtkLabel is embedded in
34950 // the tooltip, which can be configured using gtk_tooltip_set_markup()
34951 // and gtk_tooltip_set_icon().
34952 // <custom_widget>: a #GtkWidget, or %NULL to unset the old custom widget.
34953 void set_custom(AT0)(AT0 /*Widget*/ custom_widget=null) nothrow {
34954 gtk_tooltip_set_custom(&this, UpCast!(Widget*)(custom_widget));
34957 // VERSION: 2.12
34958 // Sets the icon of the tooltip (which is in front of the text) to be
34959 // @pixbuf. If @pixbuf is %NULL, the image will be hidden.
34960 // <pixbuf>: a #GdkPixbuf, or %NULL
34961 void set_icon(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ pixbuf=null) nothrow {
34962 gtk_tooltip_set_icon(&this, UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
34965 // VERSION: 2.20
34966 // Sets the icon of the tooltip (which is in front of the text)
34967 // to be the icon indicated by @gicon with the size indicated
34968 // by @size. If @gicon is %NULL, the image will be hidden.
34969 // <gicon>: a #GIcon representing the icon, or %NULL
34970 // <size>: a stock icon size
34971 void set_icon_from_gicon(AT0)(AT0 /*Gio2.Icon*/ gicon, IconSize size) nothrow {
34972 gtk_tooltip_set_icon_from_gicon(&this, UpCast!(Gio2.Icon*)(gicon), size);
34975 // VERSION: 2.14
34976 // Sets the icon of the tooltip (which is in front of the text) to be
34977 // the icon indicated by @icon_name with the size indicated
34978 // by @size. If @icon_name is %NULL, the image will be hidden.
34979 // <icon_name>: an icon name, or %NULL
34980 // <size>: a stock icon size
34981 void set_icon_from_icon_name(AT0)(AT0 /*char*/ icon_name, IconSize size) nothrow {
34982 gtk_tooltip_set_icon_from_icon_name(&this, toCString!(char*)(icon_name), size);
34985 // VERSION: 2.12
34986 // Sets the icon of the tooltip (which is in front of the text) to be
34987 // the stock item indicated by @stock_id with the size indicated
34988 // by @size. If @stock_id is %NULL, the image will be hidden.
34989 // <stock_id>: a stock id, or %NULL
34990 // <size>: a stock icon size
34991 void set_icon_from_stock(AT0)(AT0 /*char*/ stock_id, IconSize size) nothrow {
34992 gtk_tooltip_set_icon_from_stock(&this, toCString!(char*)(stock_id), size);
34995 // VERSION: 2.12
34996 // Sets the text of the tooltip to be @markup, which is marked up
34997 // with the <link
34998 // linkend="PangoMarkupFormat">Pango text markup language</link>.
34999 // If @markup is %NULL, the label will be hidden.
35000 // <markup>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>) or %NULL
35001 void set_markup(AT0)(AT0 /*char*/ markup=null) nothrow {
35002 gtk_tooltip_set_markup(&this, toCString!(char*)(markup));
35005 // VERSION: 2.12
35006 // Sets the text of the tooltip to be @text. If @text is %NULL, the label
35007 // will be hidden. See also gtk_tooltip_set_markup().
35008 // <text>: a text string or %NULL
35009 void set_text(AT0)(AT0 /*char*/ text=null) nothrow {
35010 gtk_tooltip_set_text(&this, toCString!(char*)(text));
35013 // VERSION: 2.12
35014 // Sets the area of the widget, where the contents of this tooltip apply,
35015 // to be @rect (in widget coordinates). This is especially useful for
35016 // properly setting tooltips on #GtkTreeView rows and cells, #GtkIconViews,
35017 // etc.
35019 // For setting tooltips on #GtkTreeView, please refer to the convenience
35020 // functions for this: gtk_tree_view_set_tooltip_row() and
35021 // gtk_tree_view_set_tooltip_cell().
35022 // <rect>: a #GdkRectangle
35023 void set_tip_area(AT0)(AT0 /*Gdk2.Rectangle*/ rect) nothrow {
35024 gtk_tooltip_set_tip_area(&this, UpCast!(Gdk2.Rectangle*)(rect));
35028 struct Tooltips /* : Object */ {
35029 alias parent_instance this;
35030 alias parent_instance super_;
35031 alias parent_instance object;
35032 Object parent_instance;
35033 private Widget* tip_window, tip_label;
35034 private TooltipsData* active_tips_data;
35035 private GLib2.List* tips_data_list;
35036 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
35037 uint, "delay", 30,
35038 uint, "enabled", 1,
35039 uint, "have_grab", 1,
35040 uint, "use_sticky_delay", 1,
35041 uint, "__dummy64A", 31));
35042 private int timer_tag;
35043 private GLib2.TimeVal last_popdown;
35045 static Tooltips* new_()() nothrow {
35046 return gtk_tooltips_new();
35048 static auto opCall()() {
35049 return gtk_tooltips_new();
35052 // VERSION: 2.4
35053 // DEPRECATED function: get_info_from_tip_window - 2.12:
35054 // Determines the tooltips and the widget they belong to from the window in
35055 // which they are displayed.
35057 // This function is mostly intended for use by accessibility technologies;
35058 // applications should have little use for it.
35059 // RETURNS: %TRUE if @tip_window is displaying tooltips, otherwise %FALSE.
35060 // <tip_window>: a #GtkWindow
35061 // <tooltips>: the return location for the tooltips which are displayed in @tip_window, or %NULL
35062 // <current_widget>: the return location for the widget whose tooltips are displayed, or %NULL
35063 static int get_info_from_tip_window(AT0, AT1, AT2)(AT0 /*Window*/ tip_window, AT1 /*Tooltips**/ tooltips, AT2 /*Widget**/ current_widget) nothrow {
35064 return gtk_tooltips_get_info_from_tip_window(UpCast!(Window*)(tip_window), UpCast!(Tooltips**)(tooltips), UpCast!(Widget**)(current_widget));
35066 void disable()() nothrow {
35067 gtk_tooltips_disable(&this);
35069 void enable()() nothrow {
35070 gtk_tooltips_enable(&this);
35072 void force_window()() nothrow {
35073 gtk_tooltips_force_window(&this);
35075 void set_delay()(uint delay) nothrow {
35076 gtk_tooltips_set_delay(&this, delay);
35079 // DEPRECATED method: set_tip - 2.12:
35080 // Adds a tooltip containing the message @tip_text to the specified #GtkWidget.
35081 // <widget>: the #GtkWidget you wish to associate the tip with.
35082 // <tip_text>: a string containing the tip itself.
35083 // <tip_private>: a string of any further information that may be useful if the user gets stuck.
35084 void set_tip(AT0, AT1, AT2)(AT0 /*Widget*/ widget, AT1 /*char*/ tip_text=null, AT2 /*char*/ tip_private=null) nothrow {
35085 gtk_tooltips_set_tip(&this, UpCast!(Widget*)(widget), toCString!(char*)(tip_text), toCString!(char*)(tip_private));
35089 struct TooltipsClass {
35090 ObjectClass parent_class;
35091 extern (C) void function () nothrow _gtk_reserved1;
35092 extern (C) void function () nothrow _gtk_reserved2;
35093 extern (C) void function () nothrow _gtk_reserved3;
35094 extern (C) void function () nothrow _gtk_reserved4;
35097 struct TooltipsData {
35098 Tooltips* tooltips;
35099 Widget* widget;
35100 char* tip_text, tip_private;
35102 // Unintrospectable function: get() / gtk_tooltips_data_get()
35103 static TooltipsData* get(AT0)(AT0 /*Widget*/ widget) nothrow {
35104 return gtk_tooltips_data_get(UpCast!(Widget*)(widget));
35108 extern (C) alias char* /*new*/ function (char* path, void* func_data) nothrow TranslateFunc;
35110 extern (C) alias void function (TreeViewColumn* tree_column, CellRenderer* cell, TreeModel* tree_model, TreeIter* iter, void* data) nothrow TreeCellDataFunc;
35112 extern (C) alias void function (TreeView* tree_view, TreePath* path, int children, void* user_data) nothrow TreeDestroyCountFunc;
35114 struct TreeDragDest /* Interface */ {
35115 mixin template __interface__() {
35116 // Asks the #GtkTreeDragDest to insert a row before the path @dest,
35117 // deriving the contents of the row from @selection_data. If @dest is
35118 // outside the tree so that inserting before it is impossible, %FALSE
35119 // will be returned. Also, %FALSE may be returned if the new row is
35120 // not created for some model-specific reason. Should robustly handle
35121 // a @dest no longer found in the model!
35122 // RETURNS: whether a new row was created before position @dest
35123 // <dest>: row to drop in front of
35124 // <selection_data>: data to drop
35125 int drag_data_received(AT0, AT1)(AT0 /*TreePath*/ dest, AT1 /*SelectionData*/ selection_data) nothrow {
35126 return gtk_tree_drag_dest_drag_data_received(cast(TreeDragDest*)&this, UpCast!(TreePath*)(dest), UpCast!(SelectionData*)(selection_data));
35129 // Determines whether a drop is possible before the given @dest_path,
35130 // at the same depth as @dest_path. i.e., can we drop the data in
35131 // @selection_data at that location. @dest_path does not have to
35132 // exist; the return value will almost certainly be %FALSE if the
35133 // parent of @dest_path doesn't exist, though.
35134 // RETURNS: %TRUE if a drop is possible before @dest_path
35135 // <dest_path>: destination row
35136 // <selection_data>: the data being dragged
35137 int row_drop_possible(AT0, AT1)(AT0 /*TreePath*/ dest_path, AT1 /*SelectionData*/ selection_data) nothrow {
35138 return gtk_tree_drag_dest_row_drop_possible(cast(TreeDragDest*)&this, UpCast!(TreePath*)(dest_path), UpCast!(SelectionData*)(selection_data));
35141 mixin __interface__;
35144 struct TreeDragDestIface {
35145 GObject2.TypeInterface g_iface;
35147 // RETURNS: whether a new row was created before position @dest
35148 // <dest>: row to drop in front of
35149 // <selection_data>: data to drop
35150 extern (C) int function (TreeDragDest* drag_dest, TreePath* dest, SelectionData* selection_data) nothrow drag_data_received;
35152 // RETURNS: %TRUE if a drop is possible before @dest_path
35153 // <dest_path>: destination row
35154 // <selection_data>: the data being dragged
35155 extern (C) int function (TreeDragDest* drag_dest, TreePath* dest_path, SelectionData* selection_data) nothrow row_drop_possible;
35158 struct TreeDragSource /* Interface */ {
35159 mixin template __interface__() {
35160 // Asks the #GtkTreeDragSource to delete the row at @path, because
35161 // it was moved somewhere else via drag-and-drop. Returns %FALSE
35162 // if the deletion fails because @path no longer exists, or for
35163 // some model-specific reason. Should robustly handle a @path no
35164 // longer found in the model!
35165 // RETURNS: %TRUE if the row was successfully deleted
35166 // <path>: row that was being dragged
35167 int drag_data_delete(AT0)(AT0 /*TreePath*/ path) nothrow {
35168 return gtk_tree_drag_source_drag_data_delete(cast(TreeDragSource*)&this, UpCast!(TreePath*)(path));
35171 // Asks the #GtkTreeDragSource to fill in @selection_data with a
35172 // representation of the row at @path. @selection_data->target gives
35173 // the required type of the data. Should robustly handle a @path no
35174 // longer found in the model!
35175 // RETURNS: %TRUE if data of the required type was provided
35176 // <path>: row that was dragged
35177 // <selection_data>: a #GtkSelectionData to fill with data from the dragged row
35178 int drag_data_get(AT0, AT1)(AT0 /*TreePath*/ path, /*out*/ AT1 /*SelectionData*/ selection_data) nothrow {
35179 return gtk_tree_drag_source_drag_data_get(cast(TreeDragSource*)&this, UpCast!(TreePath*)(path), UpCast!(SelectionData*)(selection_data));
35182 // Asks the #GtkTreeDragSource whether a particular row can be used as
35183 // the source of a DND operation. If the source doesn't implement
35184 // this interface, the row is assumed draggable.
35185 // RETURNS: %TRUE if the row can be dragged
35186 // <path>: row on which user is initiating a drag
35187 int row_draggable(AT0)(AT0 /*TreePath*/ path) nothrow {
35188 return gtk_tree_drag_source_row_draggable(cast(TreeDragSource*)&this, UpCast!(TreePath*)(path));
35191 mixin __interface__;
35194 struct TreeDragSourceIface {
35195 GObject2.TypeInterface g_iface;
35197 // RETURNS: %TRUE if the row can be dragged
35198 // <path>: row on which user is initiating a drag
35199 extern (C) int function (TreeDragSource* drag_source, TreePath* path) nothrow row_draggable;
35201 // RETURNS: %TRUE if data of the required type was provided
35202 // <path>: row that was dragged
35203 // <selection_data>: a #GtkSelectionData to fill with data from the dragged row
35204 extern (C) int function (TreeDragSource* drag_source, TreePath* path, /*out*/ SelectionData* selection_data) nothrow drag_data_get;
35206 // RETURNS: %TRUE if the row was successfully deleted
35207 // <path>: row that was being dragged
35208 extern (C) int function (TreeDragSource* drag_source, TreePath* path) nothrow drag_data_delete;
35211 struct TreeIter {
35212 int stamp;
35213 void* user_data, user_data2, user_data3;
35216 // Creates a dynamically allocated tree iterator as a copy of @iter.
35217 // This function is not intended for use in applications, because you
35218 // can just copy the structs by value
35219 // (<literal>GtkTreeIter new_iter = iter;</literal>).
35220 // You must free this iter with gtk_tree_iter_free().
35221 // RETURNS: a newly-allocated copy of @iter.
35222 TreeIter* /*new*/ copy()() nothrow {
35223 return gtk_tree_iter_copy(&this);
35226 // Frees an iterator that has been allocated by gtk_tree_iter_copy().
35227 // This function is mainly used for language bindings.
35228 void free()() nothrow {
35229 gtk_tree_iter_free(&this);
35233 extern (C) alias int function (TreeModel* model, TreeIter* a, TreeIter* b, void* user_data) nothrow TreeIterCompareFunc;
35235 struct TreeModel /* Interface */ {
35236 mixin template __interface__() {
35237 // VERSION: 2.4
35238 // Creates a new #GtkTreeModel, with @child_model as the child_model
35239 // and @root as the virtual root.
35240 // RETURNS: A new #GtkTreeModel.
35241 // <root>: A #GtkTreePath or %NULL.
35242 TreeModel* /*new*/ filter_new(AT0)(AT0 /*TreePath*/ root=null) nothrow {
35243 return gtk_tree_model_filter_new(cast(TreeModel*)&this, UpCast!(TreePath*)(root));
35246 // Calls func on each node in model in a depth-first fashion.
35247 // If @func returns %TRUE, then the tree ceases to be walked, and
35248 // gtk_tree_model_foreach() returns.
35249 // <func>: A function to be called on each row
35250 // <user_data>: User data to passed to func.
35251 void foreach_(AT0)(TreeModelForeachFunc func, AT0 /*void*/ user_data) nothrow {
35252 gtk_tree_model_foreach(cast(TreeModel*)&this, func, UpCast!(void*)(user_data));
35255 // Unintrospectable method: get() / gtk_tree_model_get()
35256 // Gets the value of one or more cells in the row referenced by @iter.
35257 // The variable argument list should contain integer column numbers,
35258 // each column number followed by a place to store the value being
35259 // retrieved. The list is terminated by a -1. For example, to get a
35260 // value from column 0 with type %G_TYPE_STRING, you would
35261 // write: <literal>gtk_tree_model_get (model, iter, 0, &amp;place_string_here, -1)</literal>,
35262 // where <literal>place_string_here</literal> is a <type>gchar*</type> to be
35263 // filled with the string.
35265 // Returned values with type %G_TYPE_OBJECT have to be unreferenced, values
35266 // with type %G_TYPE_STRING or %G_TYPE_BOXED have to be freed. Other values are
35267 // passed by value.
35268 // <iter>: a row in @tree_model
35269 /+ Not available -- variadic methods unsupported - use the C function directly.
35270 alias gtk_tree_model_get get; // Variadic
35273 // Returns the type of the column.
35274 // RETURNS: The type of the column.
35275 // <index_>: The column index.
35276 Type get_column_type()(int index_) nothrow {
35277 return gtk_tree_model_get_column_type(cast(TreeModel*)&this, index_);
35280 // Returns a set of flags supported by this interface. The flags are a bitwise
35281 // combination of #GtkTreeModelFlags. The flags supported should not change
35282 // during the lifecycle of the @tree_model.
35283 // RETURNS: The flags supported by this interface.
35284 TreeModelFlags get_flags()() nothrow {
35285 return gtk_tree_model_get_flags(cast(TreeModel*)&this);
35288 // Sets @iter to a valid iterator pointing to @path.
35289 // RETURNS: %TRUE, if @iter was set.
35290 // <iter>: The uninitialized #GtkTreeIter.
35291 // <path>: The #GtkTreePath.
35292 int get_iter(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreePath*/ path) nothrow {
35293 return gtk_tree_model_get_iter(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter), UpCast!(TreePath*)(path));
35296 // Initializes @iter with the first iterator in the tree (the one at the path
35297 // "0") and returns %TRUE. Returns %FALSE if the tree is empty.
35298 // RETURNS: %TRUE, if @iter was set.
35299 // <iter>: The uninitialized #GtkTreeIter.
35300 int get_iter_first(AT0)(/*out*/ AT0 /*TreeIter*/ iter) nothrow {
35301 return gtk_tree_model_get_iter_first(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35304 // Sets @iter to a valid iterator pointing to @path_string, if it
35305 // exists. Otherwise, @iter is left invalid and %FALSE is returned.
35306 // RETURNS: %TRUE, if @iter was set.
35307 // <iter>: An uninitialized #GtkTreeIter.
35308 // <path_string>: A string representation of a #GtkTreePath.
35309 int get_iter_from_string(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*char*/ path_string) nothrow {
35310 return gtk_tree_model_get_iter_from_string(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter), toCString!(char*)(path_string));
35313 // Returns the number of columns supported by @tree_model.
35314 // RETURNS: The number of columns.
35315 int get_n_columns()() nothrow {
35316 return gtk_tree_model_get_n_columns(cast(TreeModel*)&this);
35319 // Returns a newly-created #GtkTreePath referenced by @iter. This path should
35320 // be freed with gtk_tree_path_free().
35321 // RETURNS: a newly-created #GtkTreePath.
35322 // <iter>: The #GtkTreeIter.
35323 TreePath* /*new*/ get_path(AT0)(AT0 /*TreeIter*/ iter) nothrow {
35324 return gtk_tree_model_get_path(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35327 // VERSION: 2.2
35328 // Generates a string representation of the iter. This string is a ':'
35329 // separated list of numbers. For example, "4:10:0:3" would be an
35330 // acceptable return value for this string.
35331 // RETURNS: A newly-allocated string. Must be freed with g_free().
35332 // <iter>: An #GtkTreeIter.
35333 char* /*new*/ get_string_from_iter(AT0)(AT0 /*TreeIter*/ iter) nothrow {
35334 return gtk_tree_model_get_string_from_iter(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35337 // Unintrospectable method: get_valist() / gtk_tree_model_get_valist()
35338 // See gtk_tree_model_get(), this version takes a <type>va_list</type>
35339 // for language bindings to use.
35340 // <iter>: a row in @tree_model
35341 // <var_args>: <type>va_list</type> of column/return location pairs
35342 void get_valist(AT0)(AT0 /*TreeIter*/ iter, va_list var_args) nothrow {
35343 gtk_tree_model_get_valist(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter), var_args);
35346 // Initializes and sets @value to that at @column.
35347 // When done with @value, g_value_unset() needs to be called
35348 // to free any allocated memory.
35349 // <iter>: The #GtkTreeIter.
35350 // <column>: The column to lookup the value at.
35351 // <value>: An empty #GValue to set.
35352 void get_value(AT0, AT1)(AT0 /*TreeIter*/ iter, int column, /*out*/ AT1 /*GObject2.Value*/ value) nothrow {
35353 gtk_tree_model_get_value(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter), column, UpCast!(GObject2.Value*)(value));
35356 // Sets @iter to point to the first child of @parent. If @parent has no
35357 // children, %FALSE is returned and @iter is set to be invalid. @parent
35358 // will remain a valid node after this function has been called.
35360 // If @parent is %NULL returns the first node, equivalent to
35361 // <literal>gtk_tree_model_get_iter_first (tree_model, iter);</literal>
35362 // RETURNS: %TRUE, if @child has been set to the first child.
35363 // <iter>: The new #GtkTreeIter to be set to the child.
35364 // <parent>: The #GtkTreeIter, or %NULL
35365 int iter_children(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent=null) nothrow {
35366 return gtk_tree_model_iter_children(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent));
35369 // Returns %TRUE if @iter has children, %FALSE otherwise.
35370 // RETURNS: %TRUE if @iter has children.
35371 // <iter>: The #GtkTreeIter to test for children.
35372 int iter_has_child(AT0)(AT0 /*TreeIter*/ iter) nothrow {
35373 return gtk_tree_model_iter_has_child(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35376 // Returns the number of children that @iter has. As a special case, if @iter
35377 // is %NULL, then the number of toplevel nodes is returned.
35378 // RETURNS: The number of children of @iter.
35379 // <iter>: The #GtkTreeIter, or %NULL.
35380 int iter_n_children(AT0)(AT0 /*TreeIter*/ iter=null) nothrow {
35381 return gtk_tree_model_iter_n_children(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35384 // Sets @iter to point to the node following it at the current level. If there
35385 // is no next @iter, %FALSE is returned and @iter is set to be invalid.
35386 // RETURNS: %TRUE if @iter has been changed to the next node.
35387 // <iter>: The #GtkTreeIter.
35388 int iter_next(AT0)(AT0 /*TreeIter*/ iter) nothrow {
35389 return gtk_tree_model_iter_next(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35392 // Sets @iter to be the child of @parent, using the given index. The first
35393 // index is 0. If @n is too big, or @parent has no children, @iter is set
35394 // to an invalid iterator and %FALSE is returned. @parent will remain a valid
35395 // node after this function has been called. As a special case, if @parent is
35396 // %NULL, then the @n<!-- -->th root node is set.
35397 // RETURNS: %TRUE, if @parent has an @n<!-- -->th child.
35398 // <iter>: The #GtkTreeIter to set to the nth child.
35399 // <parent>: The #GtkTreeIter to get the child from, or %NULL.
35400 // <n>: Then index of the desired child.
35401 int iter_nth_child(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent, int n) nothrow {
35402 return gtk_tree_model_iter_nth_child(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent), n);
35405 // Sets @iter to be the parent of @child. If @child is at the toplevel, and
35406 // doesn't have a parent, then @iter is set to an invalid iterator and %FALSE
35407 // is returned. @child will remain a valid node after this function has been
35408 // called.
35409 // RETURNS: %TRUE, if @iter is set to the parent of @child.
35410 // <iter>: The new #GtkTreeIter to set to the parent.
35411 // <child>: The #GtkTreeIter.
35412 int iter_parent(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ child) nothrow {
35413 return gtk_tree_model_iter_parent(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(child));
35416 // Lets the tree ref the node. This is an optional method for models to
35417 // implement. To be more specific, models may ignore this call as it exists
35418 // primarily for performance reasons.
35420 // This function is primarily meant as a way for views to let caching model
35421 // know when nodes are being displayed (and hence, whether or not to cache that
35422 // node.) For example, a file-system based model would not want to keep the
35423 // entire file-hierarchy in memory, just the sections that are currently being
35424 // displayed by every current view.
35426 // A model should be expected to be able to get an iter independent of its
35427 // reffed state.
35428 // <iter>: The #GtkTreeIter.
35429 void ref_node(AT0)(AT0 /*TreeIter*/ iter) nothrow {
35430 gtk_tree_model_ref_node(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35433 // Emits the "row-changed" signal on @tree_model.
35434 // <path>: A #GtkTreePath pointing to the changed row
35435 // <iter>: A valid #GtkTreeIter pointing to the changed row
35436 void row_changed(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*TreeIter*/ iter) nothrow {
35437 gtk_tree_model_row_changed(cast(TreeModel*)&this, UpCast!(TreePath*)(path), UpCast!(TreeIter*)(iter));
35440 // Emits the "row-deleted" signal on @tree_model. This should be called by
35441 // models after a row has been removed. The location pointed to by @path
35442 // should be the location that the row previously was at. It may not be a
35443 // valid location anymore.
35444 // <path>: A #GtkTreePath pointing to the previous location of the deleted row.
35445 void row_deleted(AT0)(AT0 /*TreePath*/ path) nothrow {
35446 gtk_tree_model_row_deleted(cast(TreeModel*)&this, UpCast!(TreePath*)(path));
35449 // Emits the "row-has-child-toggled" signal on @tree_model. This should be
35450 // called by models after the child state of a node changes.
35451 // <path>: A #GtkTreePath pointing to the changed row
35452 // <iter>: A valid #GtkTreeIter pointing to the changed row
35453 void row_has_child_toggled(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*TreeIter*/ iter) nothrow {
35454 gtk_tree_model_row_has_child_toggled(cast(TreeModel*)&this, UpCast!(TreePath*)(path), UpCast!(TreeIter*)(iter));
35457 // Emits the "row-inserted" signal on @tree_model
35458 // <path>: A #GtkTreePath pointing to the inserted row
35459 // <iter>: A valid #GtkTreeIter pointing to the inserted row
35460 void row_inserted(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*TreeIter*/ iter) nothrow {
35461 gtk_tree_model_row_inserted(cast(TreeModel*)&this, UpCast!(TreePath*)(path), UpCast!(TreeIter*)(iter));
35464 // Emits the "rows-reordered" signal on @tree_model. This should be called by
35465 // models when their rows have been reordered.
35466 // <path>: A #GtkTreePath pointing to the tree node whose children have been reordered
35467 // <iter>: A valid #GtkTreeIter pointing to the node whose children have been reordered, or %NULL if the depth of @path is 0.
35468 // <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>.
35469 void rows_reordered(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*TreeIter*/ iter, int* new_order) nothrow {
35470 gtk_tree_model_rows_reordered(cast(TreeModel*)&this, UpCast!(TreePath*)(path), UpCast!(TreeIter*)(iter), new_order);
35473 // Creates a new #GtkTreeModel, with @child_model as the child model.
35474 // RETURNS: A new #GtkTreeModel.
35475 TreeModel* /*new*/ sort_new_with_model()() nothrow {
35476 return gtk_tree_model_sort_new_with_model(cast(TreeModel*)&this);
35479 // Lets the tree unref the node. This is an optional method for models to
35480 // implement. To be more specific, models may ignore this call as it exists
35481 // primarily for performance reasons.
35483 // For more information on what this means, see gtk_tree_model_ref_node().
35484 // Please note that nodes that are deleted are not unreffed.
35485 // <iter>: The #GtkTreeIter.
35486 void unref_node(AT0)(AT0 /*TreeIter*/ iter) nothrow {
35487 gtk_tree_model_unref_node(cast(TreeModel*)&this, UpCast!(TreeIter*)(iter));
35490 // This signal is emitted when a row in the model has changed.
35491 // <path>: a #GtkTreePath identifying the changed row
35492 // <iter>: a valid #GtkTreeIter pointing to the changed row
35493 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) nothrow signal_row_changed;
35495 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35496 return super_.signal_connect!name(cb, data, cf);
35499 ulong signal_connect(string name:"row-changed", CB/*:signal_row_changed*/)
35500 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
35501 if (is(typeof(cb)==signal_row_changed)||_ttmm!(CB, signal_row_changed)()) {
35502 return signal_connect_data!()(&this, cast(char*)"row-changed",
35503 cast(GObject2.Callback)cb, data, null, cf);
35506 // This signal is emitted when a row has been deleted.
35508 // Note that no iterator is passed to the signal handler,
35509 // since the row is already deleted.
35511 // This should be called by models after a row has been removed.
35512 // The location pointed to by @path should be the location that
35513 // the row previously was at. It may not be a valid location anymore.
35514 // <path>: a #GtkTreePath identifying the row
35515 extern (C) alias static void function (TreeModel* this_, TreePath* path, void* user_data=null) nothrow signal_row_deleted;
35516 ulong signal_connect(string name:"row-deleted", CB/*:signal_row_deleted*/)
35517 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
35518 if (is(typeof(cb)==signal_row_deleted)||_ttmm!(CB, signal_row_deleted)()) {
35519 return signal_connect_data!()(&this, cast(char*)"row-deleted",
35520 cast(GObject2.Callback)cb, data, null, cf);
35523 // This signal is emitted when a row has gotten the first child row or lost
35524 // its last child row.
35525 // <path>: a #GtkTreePath identifying the row
35526 // <iter>: a valid #GtkTreeIter pointing to the row
35527 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) nothrow signal_row_has_child_toggled;
35528 ulong signal_connect(string name:"row-has-child-toggled", CB/*:signal_row_has_child_toggled*/)
35529 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
35530 if (is(typeof(cb)==signal_row_has_child_toggled)||_ttmm!(CB, signal_row_has_child_toggled)()) {
35531 return signal_connect_data!()(&this, cast(char*)"row-has-child-toggled",
35532 cast(GObject2.Callback)cb, data, null, cf);
35535 // This signal is emitted when a new row has been inserted in the model.
35537 // Note that the row may still be empty at this point, since
35538 // it is a common pattern to first insert an empty row, and
35539 // then fill it with the desired values.
35540 // <path>: a #GtkTreePath identifying the new row
35541 // <iter>: a valid #GtkTreeIter pointing to the new row
35542 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) nothrow signal_row_inserted;
35543 ulong signal_connect(string name:"row-inserted", CB/*:signal_row_inserted*/)
35544 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
35545 if (is(typeof(cb)==signal_row_inserted)||_ttmm!(CB, signal_row_inserted)()) {
35546 return signal_connect_data!()(&this, cast(char*)"row-inserted",
35547 cast(GObject2.Callback)cb, data, null, cf);
35550 // This signal is emitted when the children of a node in the #GtkTreeModel
35551 // have been reordered.
35553 // Note that this signal is <emphasis>not</emphasis> emitted
35554 // when rows are reordered by DND, since this is implemented
35555 // by removing and then reinserting the row.
35556 // <path>: a #GtkTreePath identifying the tree node whose children have been reordered
35557 // <iter>: a valid #GtkTreeIter pointing to the node whose
35558 // <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>.
35559 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* new_order, void* user_data=null) nothrow signal_rows_reordered;
35560 ulong signal_connect(string name:"rows-reordered", CB/*:signal_rows_reordered*/)
35561 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
35562 if (is(typeof(cb)==signal_rows_reordered)||_ttmm!(CB, signal_rows_reordered)()) {
35563 return signal_connect_data!()(&this, cast(char*)"rows-reordered",
35564 cast(GObject2.Callback)cb, data, null, cf);
35567 mixin __interface__;
35570 struct TreeModelFilter /* : GObject.Object */ {
35571 mixin TreeDragSource.__interface__;
35572 mixin TreeModel.__interface__;
35573 alias parent this;
35574 alias parent super_;
35575 alias parent object;
35576 GObject2.Object parent;
35577 private TreeModelFilterPrivate* priv;
35580 // VERSION: 2.4
35581 // This function should almost never be called. It clears the @filter
35582 // of any cached iterators that haven't been reffed with
35583 // gtk_tree_model_ref_node(). This might be useful if the child model
35584 // being filtered is static (and doesn't change often) and there has been
35585 // a lot of unreffed access to nodes. As a side effect of this function,
35586 // all unreffed iters will be invalid.
35587 void clear_cache()() nothrow {
35588 gtk_tree_model_filter_clear_cache(&this);
35591 // VERSION: 2.4
35592 // Sets @filter_iter to point to the row in @filter that corresponds to the
35593 // row pointed at by @child_iter. If @filter_iter was not set, %FALSE is
35594 // returned.
35596 // valid iterator pointing to a visible row in child model.
35597 // RETURNS: %TRUE, if @filter_iter was set, i.e. if @child_iter is a
35598 // <filter_iter>: An uninitialized #GtkTreeIter.
35599 // <child_iter>: A valid #GtkTreeIter pointing to a row on the child model.
35600 int convert_child_iter_to_iter(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ filter_iter, AT1 /*TreeIter*/ child_iter) nothrow {
35601 return gtk_tree_model_filter_convert_child_iter_to_iter(&this, UpCast!(TreeIter*)(filter_iter), UpCast!(TreeIter*)(child_iter));
35604 // VERSION: 2.4
35605 // Converts @child_path to a path relative to @filter. That is, @child_path
35606 // points to a path in the child model. The rerturned path will point to the
35607 // same row in the filtered model. If @child_path isn't a valid path on the
35608 // child model or points to a row which is not visible in @filter, then %NULL
35609 // is returned.
35610 // RETURNS: A newly allocated #GtkTreePath, or %NULL.
35611 // <child_path>: A #GtkTreePath to convert.
35612 TreePath* /*new*/ convert_child_path_to_path(AT0)(AT0 /*TreePath*/ child_path) nothrow {
35613 return gtk_tree_model_filter_convert_child_path_to_path(&this, UpCast!(TreePath*)(child_path));
35616 // VERSION: 2.4
35617 // Sets @child_iter to point to the row pointed to by @filter_iter.
35618 // <child_iter>: An uninitialized #GtkTreeIter.
35619 // <filter_iter>: A valid #GtkTreeIter pointing to a row on @filter.
35620 void convert_iter_to_child_iter(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ child_iter, AT1 /*TreeIter*/ filter_iter) nothrow {
35621 gtk_tree_model_filter_convert_iter_to_child_iter(&this, UpCast!(TreeIter*)(child_iter), UpCast!(TreeIter*)(filter_iter));
35624 // VERSION: 2.4
35625 // Converts @filter_path to a path on the child model of @filter. That is,
35626 // @filter_path points to a location in @filter. The returned path will
35627 // point to the same location in the model not being filtered. If @filter_path
35628 // does not point to a location in the child model, %NULL is returned.
35629 // RETURNS: A newly allocated #GtkTreePath, or %NULL.
35630 // <filter_path>: A #GtkTreePath to convert.
35631 TreePath* /*new*/ convert_path_to_child_path(AT0)(AT0 /*TreePath*/ filter_path) nothrow {
35632 return gtk_tree_model_filter_convert_path_to_child_path(&this, UpCast!(TreePath*)(filter_path));
35635 // VERSION: 2.4
35636 // Returns a pointer to the child model of @filter.
35637 // RETURNS: A pointer to a #GtkTreeModel.
35638 TreeModel* get_model()() nothrow {
35639 return gtk_tree_model_filter_get_model(&this);
35642 // VERSION: 2.4
35643 // Emits ::row_changed for each row in the child model, which causes
35644 // the filter to re-evaluate whether a row is visible or not.
35645 void refilter()() nothrow {
35646 gtk_tree_model_filter_refilter(&this);
35649 // VERSION: 2.4
35650 // With the @n_columns and @types parameters, you give an array of column
35651 // types for this model (which will be exposed to the parent model/view).
35652 // The @func, @data and @destroy parameters are for specifying the modify
35653 // function. The modify function will get called for <emphasis>each</emphasis>
35654 // data access, the goal of the modify function is to return the data which
35655 // should be displayed at the location specified using the parameters of the
35656 // modify function.
35657 // <n_columns>: The number of columns in the filter model.
35658 // <types>: The #GType<!-- -->s of the columns.
35659 // <func>: A #GtkTreeModelFilterModifyFunc
35660 // <data>: User data to pass to the modify function, or %NULL.
35661 // <destroy>: Destroy notifier of @data, or %NULL.
35662 void set_modify_func(AT0, AT1)(int n_columns, AT0 /*Type*/ types, TreeModelFilterModifyFunc func, AT1 /*void*/ data=null, GLib2.DestroyNotify destroy=null) nothrow {
35663 gtk_tree_model_filter_set_modify_func(&this, n_columns, UpCast!(Type*)(types), func, UpCast!(void*)(data), destroy);
35666 // VERSION: 2.4
35667 // Sets @column of the child_model to be the column where @filter should
35668 // look for visibility information. @columns should be a column of type
35669 // %G_TYPE_BOOLEAN, where %TRUE means that a row is visible, and %FALSE
35670 // if not.
35671 // <column>: A #gint which is the column containing the visible information.
35672 void set_visible_column()(int column) nothrow {
35673 gtk_tree_model_filter_set_visible_column(&this, column);
35676 // VERSION: 2.4
35677 // Sets the visible function used when filtering the @filter to be @func. The
35678 // function should return %TRUE if the given row should be visible and
35679 // %FALSE otherwise.
35681 // If the condition calculated by the function changes over time (e.g. because
35682 // it depends on some global parameters), you must call
35683 // gtk_tree_model_filter_refilter() to keep the visibility information of
35684 // the model uptodate.
35686 // Note that @func is called whenever a row is inserted, when it may still be
35687 // empty. The visible function should therefore take special care of empty
35688 // rows, like in the example below.
35690 // <informalexample><programlisting>
35691 // static gboolean
35692 // visible_func (GtkTreeModel *model,
35693 // GtkTreeIter *iter,
35694 // gpointer data)
35695 // {
35696 // /&ast; Visible if row is non-empty and first column is "HI" &ast;/
35697 // gchar *str;
35698 // gboolean visible = FALSE;
35700 // gtk_tree_model_get (model, iter, 0, &str, -1);
35701 // if (str && strcmp (str, "HI") == 0)
35702 // visible = TRUE;
35703 // g_free (str);
35705 // return visible;
35706 // }
35707 // </programlisting></informalexample>
35708 // <func>: A #GtkTreeModelFilterVisibleFunc, the visible function.
35709 // <data>: User data to pass to the visible function, or %NULL.
35710 // <destroy>: Destroy notifier of @data, or %NULL.
35711 void set_visible_func(AT0)(TreeModelFilterVisibleFunc func, AT0 /*void*/ data=null, GLib2.DestroyNotify destroy=null) nothrow {
35712 gtk_tree_model_filter_set_visible_func(&this, func, UpCast!(void*)(data), destroy);
35716 struct TreeModelFilterClass {
35717 GObject2.ObjectClass parent_class;
35718 extern (C) void function () nothrow _gtk_reserved0;
35719 extern (C) void function () nothrow _gtk_reserved1;
35720 extern (C) void function () nothrow _gtk_reserved2;
35721 extern (C) void function () nothrow _gtk_reserved3;
35724 extern (C) alias void function (TreeModel* model, TreeIter* iter, GObject2.Value* value, int column, void* data) nothrow TreeModelFilterModifyFunc;
35726 struct TreeModelFilterPrivate {
35729 extern (C) alias int function (TreeModel* model, TreeIter* iter, void* data) nothrow TreeModelFilterVisibleFunc;
35731 enum TreeModelFlags {
35732 ITERS_PERSIST = 1,
35733 LIST_ONLY = 2
35735 extern (C) alias int function (TreeModel* model, TreePath* path, TreeIter* iter, void* data) nothrow TreeModelForeachFunc;
35737 struct TreeModelIface {
35738 GObject2.TypeInterface g_iface;
35740 // <path>: A #GtkTreePath pointing to the changed row
35741 // <iter>: A valid #GtkTreeIter pointing to the changed row
35742 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) nothrow row_changed;
35744 // <path>: A #GtkTreePath pointing to the inserted row
35745 // <iter>: A valid #GtkTreeIter pointing to the inserted row
35746 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) nothrow row_inserted;
35748 // <path>: A #GtkTreePath pointing to the changed row
35749 // <iter>: A valid #GtkTreeIter pointing to the changed row
35750 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) nothrow row_has_child_toggled;
35751 // <path>: A #GtkTreePath pointing to the previous location of the deleted row.
35752 extern (C) void function (TreeModel* tree_model, TreePath* path) nothrow row_deleted;
35754 // <path>: A #GtkTreePath pointing to the tree node whose children have been reordered
35755 // <iter>: A valid #GtkTreeIter pointing to the node whose children have been reordered, or %NULL if the depth of @path is 0.
35756 // <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>.
35757 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter, int* new_order) nothrow rows_reordered;
35758 // RETURNS: The flags supported by this interface.
35759 extern (C) TreeModelFlags function (TreeModel* tree_model) nothrow get_flags;
35760 // RETURNS: The number of columns.
35761 extern (C) int function (TreeModel* tree_model) nothrow get_n_columns;
35763 // RETURNS: The type of the column.
35764 // <index_>: The column index.
35765 extern (C) Type function (TreeModel* tree_model, int index_) nothrow get_column_type;
35767 // RETURNS: %TRUE, if @iter was set.
35768 // <iter>: The uninitialized #GtkTreeIter.
35769 // <path>: The #GtkTreePath.
35770 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreePath* path) nothrow get_iter;
35772 // RETURNS: a newly-created #GtkTreePath.
35773 // <iter>: The #GtkTreeIter.
35774 extern (C) TreePath* /*new*/ function (TreeModel* tree_model, TreeIter* iter) nothrow get_path;
35776 // <iter>: The #GtkTreeIter.
35777 // <column>: The column to lookup the value at.
35778 // <value>: An empty #GValue to set.
35779 extern (C) void function (TreeModel* tree_model, TreeIter* iter, int column, /*out*/ GObject2.Value* value) nothrow get_value;
35781 // RETURNS: %TRUE if @iter has been changed to the next node.
35782 // <iter>: The #GtkTreeIter.
35783 extern (C) int function (TreeModel* tree_model, TreeIter* iter) nothrow iter_next;
35785 // RETURNS: %TRUE, if @child has been set to the first child.
35786 // <iter>: The new #GtkTreeIter to be set to the child.
35787 // <parent>: The #GtkTreeIter, or %NULL
35788 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* parent=null) nothrow iter_children;
35790 // RETURNS: %TRUE if @iter has children.
35791 // <iter>: The #GtkTreeIter to test for children.
35792 extern (C) int function (TreeModel* tree_model, TreeIter* iter) nothrow iter_has_child;
35794 // RETURNS: The number of children of @iter.
35795 // <iter>: The #GtkTreeIter, or %NULL.
35796 extern (C) int function (TreeModel* tree_model, TreeIter* iter=null) nothrow iter_n_children;
35798 // RETURNS: %TRUE, if @parent has an @n<!-- -->th child.
35799 // <iter>: The #GtkTreeIter to set to the nth child.
35800 // <parent>: The #GtkTreeIter to get the child from, or %NULL.
35801 // <n>: Then index of the desired child.
35802 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* parent, int n) nothrow iter_nth_child;
35804 // RETURNS: %TRUE, if @iter is set to the parent of @child.
35805 // <iter>: The new #GtkTreeIter to set to the parent.
35806 // <child>: The #GtkTreeIter.
35807 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* child) nothrow iter_parent;
35808 // <iter>: The #GtkTreeIter.
35809 extern (C) void function (TreeModel* tree_model, TreeIter* iter) nothrow ref_node;
35810 // <iter>: The #GtkTreeIter.
35811 extern (C) void function (TreeModel* tree_model, TreeIter* iter) nothrow unref_node;
35814 struct TreeModelSort /* : GObject.Object */ {
35815 mixin TreeDragSource.__interface__;
35816 mixin TreeModel.__interface__;
35817 mixin TreeSortable.__interface__;
35818 alias parent this;
35819 alias parent super_;
35820 alias parent object;
35821 GObject2.Object parent;
35822 private void* root;
35823 private int stamp;
35824 private uint child_flags;
35825 private TreeModel* child_model;
35826 private int zero_ref_count;
35827 private GLib2.List* sort_list;
35828 private int sort_column_id;
35829 private SortType order;
35830 private TreeIterCompareFunc default_sort_func;
35831 private void* default_sort_data;
35832 private GLib2.DestroyNotify default_sort_destroy;
35833 private uint changed_id, inserted_id, has_child_toggled_id, deleted_id, reordered_id;
35836 // This function should almost never be called. It clears the @tree_model_sort
35837 // of any cached iterators that haven't been reffed with
35838 // gtk_tree_model_ref_node(). This might be useful if the child model being
35839 // sorted is static (and doesn't change often) and there has been a lot of
35840 // unreffed access to nodes. As a side effect of this function, all unreffed
35841 // iters will be invalid.
35842 void clear_cache()() nothrow {
35843 gtk_tree_model_sort_clear_cache(&this);
35846 // Sets @sort_iter to point to the row in @tree_model_sort that corresponds to
35847 // the row pointed at by @child_iter. If @sort_iter was not set, %FALSE
35848 // is returned. Note: a boolean is only returned since 2.14.
35850 // valid iterator pointer to a visible row in the child model.
35851 // RETURNS: %TRUE, if @sort_iter was set, i.e. if @sort_iter is a
35852 // <sort_iter>: An uninitialized #GtkTreeIter.
35853 // <child_iter>: A valid #GtkTreeIter pointing to a row on the child model
35854 int convert_child_iter_to_iter(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ sort_iter, AT1 /*TreeIter*/ child_iter) nothrow {
35855 return gtk_tree_model_sort_convert_child_iter_to_iter(&this, UpCast!(TreeIter*)(sort_iter), UpCast!(TreeIter*)(child_iter));
35858 // Converts @child_path to a path relative to @tree_model_sort. That is,
35859 // @child_path points to a path in the child model. The returned path will
35860 // point to the same row in the sorted model. If @child_path isn't a valid
35861 // path on the child model, then %NULL is returned.
35862 // RETURNS: A newly allocated #GtkTreePath, or %NULL
35863 // <child_path>: A #GtkTreePath to convert
35864 TreePath* /*new*/ convert_child_path_to_path(AT0)(AT0 /*TreePath*/ child_path) nothrow {
35865 return gtk_tree_model_sort_convert_child_path_to_path(&this, UpCast!(TreePath*)(child_path));
35868 // Sets @child_iter to point to the row pointed to by @sorted_iter.
35869 // <child_iter>: An uninitialized #GtkTreeIter
35870 // <sorted_iter>: A valid #GtkTreeIter pointing to a row on @tree_model_sort.
35871 void convert_iter_to_child_iter(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ child_iter, AT1 /*TreeIter*/ sorted_iter) nothrow {
35872 gtk_tree_model_sort_convert_iter_to_child_iter(&this, UpCast!(TreeIter*)(child_iter), UpCast!(TreeIter*)(sorted_iter));
35875 // Converts @sorted_path to a path on the child model of @tree_model_sort.
35876 // That is, @sorted_path points to a location in @tree_model_sort. The
35877 // returned path will point to the same location in the model not being
35878 // sorted. If @sorted_path does not point to a location in the child model,
35879 // %NULL is returned.
35880 // RETURNS: A newly allocated #GtkTreePath, or %NULL
35881 // <sorted_path>: A #GtkTreePath to convert
35882 TreePath* /*new*/ convert_path_to_child_path(AT0)(AT0 /*TreePath*/ sorted_path) nothrow {
35883 return gtk_tree_model_sort_convert_path_to_child_path(&this, UpCast!(TreePath*)(sorted_path));
35886 // Returns the model the #GtkTreeModelSort is sorting.
35887 // RETURNS: the "child model" being sorted
35888 TreeModel* get_model()() nothrow {
35889 return gtk_tree_model_sort_get_model(&this);
35892 // VERSION: 2.2
35893 // <warning><para>
35894 // This function is slow. Only use it for debugging and/or testing purposes.
35895 // </para></warning>
35897 // Checks if the given iter is a valid iter for this #GtkTreeModelSort.
35898 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
35899 // <iter>: A #GtkTreeIter.
35900 int iter_is_valid(AT0)(AT0 /*TreeIter*/ iter) nothrow {
35901 return gtk_tree_model_sort_iter_is_valid(&this, UpCast!(TreeIter*)(iter));
35904 // This resets the default sort function to be in the 'unsorted' state. That
35905 // is, it is in the same order as the child model. It will re-sort the model
35906 // to be in the same order as the child model only if the #GtkTreeModelSort
35907 // is in 'unsorted' state.
35908 void reset_default_sort_func()() nothrow {
35909 gtk_tree_model_sort_reset_default_sort_func(&this);
35913 struct TreeModelSortClass {
35914 GObject2.ObjectClass parent_class;
35915 extern (C) void function () nothrow _gtk_reserved1;
35916 extern (C) void function () nothrow _gtk_reserved2;
35917 extern (C) void function () nothrow _gtk_reserved3;
35918 extern (C) void function () nothrow _gtk_reserved4;
35921 struct TreePath {
35923 // Creates a new #GtkTreePath. This structure refers to a row.
35924 // RETURNS: A newly created #GtkTreePath.
35925 static TreePath* /*new*/ new_()() nothrow {
35926 return gtk_tree_path_new();
35928 static auto opCall()() {
35929 return gtk_tree_path_new();
35932 // Creates a new #GtkTreePath. The string representation of this path is "0"
35933 // RETURNS: A new #GtkTreePath.
35934 static TreePath* /*new*/ new_first()() nothrow {
35935 return gtk_tree_path_new_first();
35938 // Unintrospectable constructor: new_from_indices() / gtk_tree_path_new_from_indices()
35939 // VERSION: 2.2
35940 // Creates a new path with @first_index and @varargs as indices.
35941 // RETURNS: A newly created #GtkTreePath.
35942 // <first_index>: first integer
35943 alias gtk_tree_path_new_from_indices new_from_indices; // Variadic
35945 // Creates a new #GtkTreePath initialized to @path. @path is expected to be a
35946 // colon separated list of numbers. For example, the string "10:4:0" would
35947 // create a path of depth 3 pointing to the 11th child of the root node, the 5th
35948 // child of that 11th child, and the 1st child of that 5th child. If an invalid
35949 // path string is passed in, %NULL is returned.
35950 // RETURNS: A newly-created #GtkTreePath, or %NULL
35951 // <path>: The string representation of a path.
35952 static TreePath* /*new*/ new_from_string(AT0)(AT0 /*char*/ path) nothrow {
35953 return gtk_tree_path_new_from_string(toCString!(char*)(path));
35955 static auto opCall(AT0)(AT0 /*char*/ path) {
35956 return gtk_tree_path_new_from_string(toCString!(char*)(path));
35959 // Appends a new index to a path. As a result, the depth of the path is
35960 // increased.
35961 // <index_>: The index.
35962 void append_index()(int index_) nothrow {
35963 gtk_tree_path_append_index(&this, index_);
35966 // Compares two paths. If @a appears before @b in a tree, then -1 is returned.
35967 // If @b appears before @a, then 1 is returned. If the two nodes are equal,
35968 // then 0 is returned.
35969 // RETURNS: The relative positions of @a and @b
35970 // <b>: A #GtkTreePath to compare with.
35971 int compare(AT0)(AT0 /*TreePath*/ b) nothrow {
35972 return gtk_tree_path_compare(&this, UpCast!(TreePath*)(b));
35975 // Creates a new #GtkTreePath as a copy of @path.
35976 // RETURNS: A new #GtkTreePath.
35977 TreePath* /*new*/ copy()() nothrow {
35978 return gtk_tree_path_copy(&this);
35980 // Moves @path to point to the first child of the current path.
35981 void down()() nothrow {
35982 gtk_tree_path_down(&this);
35984 // Frees @path.
35985 void free()() nothrow {
35986 gtk_tree_path_free(&this);
35989 // Returns the current depth of @path.
35990 // RETURNS: The depth of @path
35991 int get_depth()() nothrow {
35992 return gtk_tree_path_get_depth(&this);
35995 // Returns the current indices of @path. This is an array of integers, each
35996 // representing a node in a tree. This value should not be freed.
35997 // RETURNS: The current indices, or %NULL.
35998 int* get_indices()() nothrow {
35999 return gtk_tree_path_get_indices(&this);
36002 // VERSION: 2.22
36003 // Returns the current indices of @path.
36004 // This is an array of integers, each representing a node in a tree.
36005 // It also returns the number of elements in the array.
36006 // The array should not be freed.
36007 // RETURNS: The current indices, or %NULL.
36008 // <depth>: Number of elements returned in the integer array
36009 int* get_indices_with_depth()(/*out*/ int* depth) nothrow {
36010 return gtk_tree_path_get_indices_with_depth(&this, depth);
36013 // Returns %TRUE if @descendant is a descendant of @path.
36014 // RETURNS: %TRUE if @descendant is contained inside @path
36015 // <descendant>: another #GtkTreePath
36016 int is_ancestor(AT0)(AT0 /*TreePath*/ descendant) nothrow {
36017 return gtk_tree_path_is_ancestor(&this, UpCast!(TreePath*)(descendant));
36020 // Returns %TRUE if @path is a descendant of @ancestor.
36021 // RETURNS: %TRUE if @ancestor contains @path somewhere below it
36022 // <ancestor>: another #GtkTreePath
36023 int is_descendant(AT0)(AT0 /*TreePath*/ ancestor) nothrow {
36024 return gtk_tree_path_is_descendant(&this, UpCast!(TreePath*)(ancestor));
36026 // Moves the @path to point to the next node at the current depth.
36027 void next()() nothrow {
36028 gtk_tree_path_next(&this);
36031 // Prepends a new index to a path. As a result, the depth of the path is
36032 // increased.
36033 // <index_>: The index.
36034 void prepend_index()(int index_) nothrow {
36035 gtk_tree_path_prepend_index(&this, index_);
36038 // Moves the @path to point to the previous node at the current depth,
36039 // if it exists.
36040 // RETURNS: %TRUE if @path has a previous node, and the move was made.
36041 int prev()() nothrow {
36042 return gtk_tree_path_prev(&this);
36045 // Generates a string representation of the path. This string is a ':'
36046 // separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.
36047 // RETURNS: A newly-allocated string. Must be freed with g_free().
36048 char* /*new*/ to_string()() nothrow {
36049 return gtk_tree_path_to_string(&this);
36052 // Moves the @path to point to its parent node, if it has a parent.
36053 // RETURNS: %TRUE if @path has a parent, and the move was made.
36054 int up()() nothrow {
36055 return gtk_tree_path_up(&this);
36059 struct TreeRowReference {
36061 // Creates a row reference based on @path. This reference will keep pointing
36062 // to the node pointed to by @path, so long as it exists. It listens to all
36063 // signals emitted by @model, and updates its path appropriately. If @path
36064 // isn't a valid path in @model, then %NULL is returned.
36065 // RETURNS: A newly allocated #GtkTreeRowReference, or %NULL
36066 // <model>: A #GtkTreeModel
36067 // <path>: A valid #GtkTreePath to monitor
36068 static TreeRowReference* /*new*/ new_(AT0, AT1)(AT0 /*TreeModel*/ model, AT1 /*TreePath*/ path) nothrow {
36069 return gtk_tree_row_reference_new(UpCast!(TreeModel*)(model), UpCast!(TreePath*)(path));
36071 static auto opCall(AT0, AT1)(AT0 /*TreeModel*/ model, AT1 /*TreePath*/ path) {
36072 return gtk_tree_row_reference_new(UpCast!(TreeModel*)(model), UpCast!(TreePath*)(path));
36075 // You do not need to use this function. Creates a row reference based on
36076 // @path. This reference will keep pointing to the node pointed to by @path,
36077 // so long as it exists. If @path isn't a valid path in @model, then %NULL is
36078 // returned. However, unlike references created with
36079 // gtk_tree_row_reference_new(), it does not listen to the model for changes.
36080 // The creator of the row reference must do this explicitly using
36081 // gtk_tree_row_reference_inserted(), gtk_tree_row_reference_deleted(),
36082 // gtk_tree_row_reference_reordered().
36084 // These functions must be called exactly once per proxy when the
36085 // corresponding signal on the model is emitted. This single call
36086 // updates all row references for that proxy. Since built-in GTK+
36087 // objects like #GtkTreeView already use this mechanism internally,
36088 // using them as the proxy object will produce unpredictable results.
36089 // Further more, passing the same object as @model and @proxy
36090 // doesn't work for reasons of internal implementation.
36092 // This type of row reference is primarily meant by structures that need to
36093 // carefully monitor exactly when a row reference updates itself, and is not
36094 // generally needed by most applications.
36095 // RETURNS: A newly allocated #GtkTreeRowReference, or %NULL
36096 // <proxy>: A proxy #GObject
36097 // <model>: A #GtkTreeModel
36098 // <path>: A valid #GtkTreePath to monitor
36099 static TreeRowReference* /*new*/ new_proxy(AT0, AT1, AT2)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreeModel*/ model, AT2 /*TreePath*/ path) nothrow {
36100 return gtk_tree_row_reference_new_proxy(UpCast!(GObject2.Object*)(proxy), UpCast!(TreeModel*)(model), UpCast!(TreePath*)(path));
36102 static auto opCall(AT0, AT1, AT2)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreeModel*/ model, AT2 /*TreePath*/ path) {
36103 return gtk_tree_row_reference_new_proxy(UpCast!(GObject2.Object*)(proxy), UpCast!(TreeModel*)(model), UpCast!(TreePath*)(path));
36106 // VERSION: 2.2
36107 // Copies a #GtkTreeRowReference.
36108 // RETURNS: a copy of @reference.
36109 TreeRowReference* /*new*/ copy()() nothrow {
36110 return gtk_tree_row_reference_copy(&this);
36112 // Free's @reference. @reference may be %NULL.
36113 void free()() nothrow {
36114 gtk_tree_row_reference_free(&this);
36117 // VERSION: 2.8
36118 // Returns the model that the row reference is monitoring.
36119 // RETURNS: the model
36120 TreeModel* get_model()() nothrow {
36121 return gtk_tree_row_reference_get_model(&this);
36124 // Returns a path that the row reference currently points to, or %NULL if the
36125 // path pointed to is no longer valid.
36126 // RETURNS: A current path, or %NULL.
36127 TreePath* /*new*/ get_path()() nothrow {
36128 return gtk_tree_row_reference_get_path(&this);
36131 // Returns %TRUE if the @reference is non-%NULL and refers to a current valid
36132 // path.
36133 // RETURNS: %TRUE if @reference points to a valid path.
36134 int valid()() nothrow {
36135 return gtk_tree_row_reference_valid(&this);
36138 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
36139 // know that the model emitted the "row_deleted" signal.
36140 // <proxy>: A #GObject
36141 // <path>: The path position that was deleted
36142 static void deleted(AT0, AT1)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreePath*/ path) nothrow {
36143 gtk_tree_row_reference_deleted(UpCast!(GObject2.Object*)(proxy), UpCast!(TreePath*)(path));
36146 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
36147 // know that the model emitted the "row_inserted" signal.
36148 // <proxy>: A #GObject
36149 // <path>: The row position that was inserted
36150 static void inserted(AT0, AT1)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreePath*/ path) nothrow {
36151 gtk_tree_row_reference_inserted(UpCast!(GObject2.Object*)(proxy), UpCast!(TreePath*)(path));
36154 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
36155 // know that the model emitted the "rows_reordered" signal.
36156 // <proxy>: A #GObject
36157 // <path>: The parent path of the reordered signal
36158 // <iter>: The iter pointing to the parent of the reordered
36159 // <new_order>: The new order of rows
36160 static void reordered(AT0, AT1, AT2)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreePath*/ path, AT2 /*TreeIter*/ iter, int* new_order) nothrow {
36161 gtk_tree_row_reference_reordered(UpCast!(GObject2.Object*)(proxy), UpCast!(TreePath*)(path), UpCast!(TreeIter*)(iter), new_order);
36165 struct TreeSelection /* : GObject.Object */ {
36166 alias parent this;
36167 alias parent super_;
36168 alias parent object;
36169 GObject2.Object parent;
36170 private TreeView* tree_view;
36171 private SelectionMode type;
36172 private TreeSelectionFunc user_func;
36173 private void* user_data;
36174 private GLib2.DestroyNotify destroy;
36177 // VERSION: 2.2
36178 // Returns the number of rows that have been selected in @tree.
36179 // RETURNS: The number of rows selected.
36180 int count_selected_rows()() nothrow {
36181 return gtk_tree_selection_count_selected_rows(&this);
36184 // Gets the selection mode for @selection. See
36185 // gtk_tree_selection_set_mode().
36186 // RETURNS: the current selection mode
36187 SelectionMode get_mode()() nothrow {
36188 return gtk_tree_selection_get_mode(&this);
36191 // Unintrospectable method: get_select_function() / gtk_tree_selection_get_select_function()
36192 // VERSION: 2.14
36193 // Returns the current selection function.
36194 // RETURNS: The function.
36195 TreeSelectionFunc get_select_function()() nothrow {
36196 return gtk_tree_selection_get_select_function(&this);
36199 // Sets @iter to the currently selected node if @selection is set to
36200 // #GTK_SELECTION_SINGLE or #GTK_SELECTION_BROWSE. @iter may be NULL if you
36201 // just want to test if @selection has any selected nodes. @model is filled
36202 // with the current model as a convenience. This function will not work if you
36203 // use @selection is #GTK_SELECTION_MULTIPLE.
36204 // RETURNS: TRUE, if there is a selected node.
36205 // <model>: A pointer to set to the #GtkTreeModel, or NULL.
36206 // <iter>: The #GtkTreeIter, or NULL.
36207 int get_selected(AT0, AT1)(/*out*/ AT0 /*TreeModel**/ model=null, /*out*/ AT1 /*TreeIter*/ iter=null) nothrow {
36208 return gtk_tree_selection_get_selected(&this, UpCast!(TreeModel**)(model), UpCast!(TreeIter*)(iter));
36211 // VERSION: 2.2
36212 // Creates a list of path of all selected rows. Additionally, if you are
36213 // planning on modifying the model after calling this function, you may
36214 // want to convert the returned list into a list of #GtkTreeRowReference<!-- -->s.
36215 // To do this, you can use gtk_tree_row_reference_new().
36217 // To free the return value, use:
36218 // |[
36219 // g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
36220 // g_list_free (list);
36221 // ]|
36222 // RETURNS: A #GList containing a #GtkTreePath for each selected row.
36223 // <model>: A pointer to set to the #GtkTreeModel, or %NULL.
36224 GLib2.List* /*new*/ get_selected_rows(AT0)(/*out*/ AT0 /*TreeModel**/ model=null) nothrow {
36225 return gtk_tree_selection_get_selected_rows(&this, UpCast!(TreeModel**)(model));
36228 // Returns the tree view associated with @selection.
36229 // RETURNS: A #GtkTreeView
36230 TreeView* get_tree_view()() nothrow {
36231 return gtk_tree_selection_get_tree_view(&this);
36234 // Unintrospectable method: get_user_data() / gtk_tree_selection_get_user_data()
36235 // Returns the user data for the selection function.
36236 // RETURNS: The user data.
36237 void* get_user_data()() nothrow {
36238 return gtk_tree_selection_get_user_data(&this);
36241 // Returns %TRUE if the row at @iter is currently selected.
36242 // RETURNS: %TRUE, if @iter is selected
36243 // <iter>: A valid #GtkTreeIter
36244 int iter_is_selected(AT0)(AT0 /*TreeIter*/ iter) nothrow {
36245 return gtk_tree_selection_iter_is_selected(&this, UpCast!(TreeIter*)(iter));
36248 // Returns %TRUE if the row pointed to by @path is currently selected. If @path
36249 // does not point to a valid location, %FALSE is returned
36250 // RETURNS: %TRUE if @path is selected.
36251 // <path>: A #GtkTreePath to check selection on.
36252 int path_is_selected(AT0)(AT0 /*TreePath*/ path) nothrow {
36253 return gtk_tree_selection_path_is_selected(&this, UpCast!(TreePath*)(path));
36256 // Selects all the nodes. @selection must be set to #GTK_SELECTION_MULTIPLE
36257 // mode.
36258 void select_all()() nothrow {
36259 gtk_tree_selection_select_all(&this);
36262 // Selects the specified iterator.
36263 // <iter>: The #GtkTreeIter to be selected.
36264 void select_iter(AT0)(AT0 /*TreeIter*/ iter) nothrow {
36265 gtk_tree_selection_select_iter(&this, UpCast!(TreeIter*)(iter));
36268 // Select the row at @path.
36269 // <path>: The #GtkTreePath to be selected.
36270 void select_path(AT0)(AT0 /*TreePath*/ path) nothrow {
36271 gtk_tree_selection_select_path(&this, UpCast!(TreePath*)(path));
36274 // Selects a range of nodes, determined by @start_path and @end_path inclusive.
36275 // @selection must be set to #GTK_SELECTION_MULTIPLE mode.
36276 // <start_path>: The initial node of the range.
36277 // <end_path>: The final node of the range.
36278 void select_range(AT0, AT1)(AT0 /*TreePath*/ start_path, AT1 /*TreePath*/ end_path) nothrow {
36279 gtk_tree_selection_select_range(&this, UpCast!(TreePath*)(start_path), UpCast!(TreePath*)(end_path));
36282 // Calls a function for each selected node. Note that you cannot modify
36283 // the tree or selection from within this function. As a result,
36284 // gtk_tree_selection_get_selected_rows() might be more useful.
36285 // <func>: The function to call for each selected node.
36286 // <data>: user data to pass to the function.
36287 void selected_foreach(AT0)(TreeSelectionForeachFunc func, AT0 /*void*/ data) nothrow {
36288 gtk_tree_selection_selected_foreach(&this, func, UpCast!(void*)(data));
36291 // Sets the selection mode of the @selection. If the previous type was
36292 // #GTK_SELECTION_MULTIPLE, then the anchor is kept selected, if it was
36293 // previously selected.
36294 // <type>: The selection mode
36295 void set_mode()(SelectionMode type) nothrow {
36296 gtk_tree_selection_set_mode(&this, type);
36299 // Sets the selection function. If set, this function is called before any node
36300 // is selected or unselected, giving some control over which nodes are selected.
36301 // The select function should return %TRUE if the state of the node may be toggled,
36302 // and %FALSE if the state of the node should be left unchanged.
36303 // <func>: The selection function.
36304 // <data>: The selection function's data.
36305 // <destroy>: The destroy function for user data. May be NULL.
36306 void set_select_function(AT0)(TreeSelectionFunc func, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
36307 gtk_tree_selection_set_select_function(&this, func, UpCast!(void*)(data), destroy);
36309 // Unselects all the nodes.
36310 void unselect_all()() nothrow {
36311 gtk_tree_selection_unselect_all(&this);
36314 // Unselects the specified iterator.
36315 // <iter>: The #GtkTreeIter to be unselected.
36316 void unselect_iter(AT0)(AT0 /*TreeIter*/ iter) nothrow {
36317 gtk_tree_selection_unselect_iter(&this, UpCast!(TreeIter*)(iter));
36320 // Unselects the row at @path.
36321 // <path>: The #GtkTreePath to be unselected.
36322 void unselect_path(AT0)(AT0 /*TreePath*/ path) nothrow {
36323 gtk_tree_selection_unselect_path(&this, UpCast!(TreePath*)(path));
36326 // VERSION: 2.2
36327 // Unselects a range of nodes, determined by @start_path and @end_path
36328 // inclusive.
36329 // <start_path>: The initial node of the range.
36330 // <end_path>: The initial node of the range.
36331 void unselect_range(AT0, AT1)(AT0 /*TreePath*/ start_path, AT1 /*TreePath*/ end_path) nothrow {
36332 gtk_tree_selection_unselect_range(&this, UpCast!(TreePath*)(start_path), UpCast!(TreePath*)(end_path));
36334 extern (C) alias static void function (TreeSelection* this_, void* user_data=null) nothrow signal_changed;
36336 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36337 return super_.signal_connect!name(cb, data, cf);
36340 ulong signal_connect(string name:"changed", CB/*:signal_changed*/)
36341 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
36342 if (is(typeof(cb)==signal_changed)||_ttmm!(CB, signal_changed)()) {
36343 return signal_connect_data!()(&this, cast(char*)"changed",
36344 cast(GObject2.Callback)cb, data, null, cf);
36348 struct TreeSelectionClass {
36349 GObject2.ObjectClass parent_class;
36350 extern (C) void function (TreeSelection* selection) nothrow changed;
36351 extern (C) void function () nothrow _gtk_reserved1;
36352 extern (C) void function () nothrow _gtk_reserved2;
36353 extern (C) void function () nothrow _gtk_reserved3;
36354 extern (C) void function () nothrow _gtk_reserved4;
36357 extern (C) alias void function (TreeModel* model, TreePath* path, TreeIter* iter, void* data) nothrow TreeSelectionForeachFunc;
36359 extern (C) alias int function (TreeSelection* selection, TreeModel* model, TreePath* path, int path_currently_selected, void* data) nothrow TreeSelectionFunc;
36361 struct TreeSortable /* Interface */ {
36362 mixin template __interface__() {
36363 // Fills in @sort_column_id and @order with the current sort column and the
36364 // order. It returns %TRUE unless the @sort_column_id is
36365 // %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
36366 // %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
36368 // column ids.
36369 // RETURNS: %TRUE if the sort column is not one of the special sort
36370 // <sort_column_id>: The sort column id to be filled in
36371 // <order>: The #GtkSortType to be filled in
36372 int get_sort_column_id(AT0)(int* sort_column_id, AT0 /*SortType*/ order) nothrow {
36373 return gtk_tree_sortable_get_sort_column_id(cast(TreeSortable*)&this, sort_column_id, UpCast!(SortType*)(order));
36376 // Returns %TRUE if the model has a default sort function. This is used
36377 // primarily by GtkTreeViewColumns in order to determine if a model can
36378 // go back to the default state, or not.
36379 // RETURNS: %TRUE, if the model has a default sort function
36380 int has_default_sort_func()() nothrow {
36381 return gtk_tree_sortable_has_default_sort_func(cast(TreeSortable*)&this);
36384 // Sets the default comparison function used when sorting to be @sort_func.
36385 // If the current sort column id of @sortable is
36386 // %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using
36387 // this function.
36389 // If @sort_func is %NULL, then there will be no default comparison function.
36390 // This means that once the model has been sorted, it can't go back to the
36391 // default state. In this case, when the current sort column id of @sortable
36392 // is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
36393 // <sort_func>: The comparison function
36394 // <user_data>: User data to pass to @sort_func, or %NULL
36395 // <destroy>: Destroy notifier of @user_data, or %NULL
36396 void set_default_sort_func(AT0)(TreeIterCompareFunc sort_func, AT0 /*void*/ user_data=null, GLib2.DestroyNotify destroy=null) nothrow {
36397 gtk_tree_sortable_set_default_sort_func(cast(TreeSortable*)&this, sort_func, UpCast!(void*)(user_data), destroy);
36400 // Sets the current sort column to be @sort_column_id. The @sortable will
36401 // resort itself to reflect this change, after emitting a
36402 // #GtkTreeSortable::sort-column-changed signal. @sort_column_id may either be
36403 // a regular column id, or one of the following special values:
36404 // <variablelist>
36405 // <varlistentry>
36406 // <term>%GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID</term>
36407 // <listitem>the default sort function will be used, if it is set</listitem>
36408 // </varlistentry>
36409 // <varlistentry>
36410 // <term>%GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID</term>
36411 // <listitem>no sorting will occur</listitem>
36412 // </varlistentry>
36413 // </variablelist>
36414 // <sort_column_id>: the sort column id to set
36415 // <order>: The sort order of the column
36416 void set_sort_column_id()(int sort_column_id, SortType order) nothrow {
36417 gtk_tree_sortable_set_sort_column_id(cast(TreeSortable*)&this, sort_column_id, order);
36420 // Sets the comparison function used when sorting to be @sort_func. If the
36421 // current sort column id of @sortable is the same as @sort_column_id, then
36422 // the model will sort using this function.
36423 // <sort_column_id>: the sort column id to set the function for
36424 // <sort_func>: The comparison function
36425 // <user_data>: User data to pass to @sort_func, or %NULL
36426 // <destroy>: Destroy notifier of @user_data, or %NULL
36427 void set_sort_func(AT0)(int sort_column_id, TreeIterCompareFunc sort_func, AT0 /*void*/ user_data=null, GLib2.DestroyNotify destroy=null) nothrow {
36428 gtk_tree_sortable_set_sort_func(cast(TreeSortable*)&this, sort_column_id, sort_func, UpCast!(void*)(user_data), destroy);
36430 // Emits a #GtkTreeSortable::sort-column-changed signal on @sortable.
36431 void sort_column_changed()() nothrow {
36432 gtk_tree_sortable_sort_column_changed(cast(TreeSortable*)&this);
36435 // The ::sort-column-changed signal is emitted when the sort column
36436 // or sort order of @sortable is changed. The signal is emitted before
36437 // the contents of @sortable are resorted.
36438 extern (C) alias static void function (TreeSortable* this_, void* user_data=null) nothrow signal_sort_column_changed;
36440 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36441 return super_.signal_connect!name(cb, data, cf);
36444 ulong signal_connect(string name:"sort-column-changed", CB/*:signal_sort_column_changed*/)
36445 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
36446 if (is(typeof(cb)==signal_sort_column_changed)||_ttmm!(CB, signal_sort_column_changed)()) {
36447 return signal_connect_data!()(&this, cast(char*)"sort-column-changed",
36448 cast(GObject2.Callback)cb, data, null, cf);
36451 mixin __interface__;
36454 struct TreeSortableIface {
36455 GObject2.TypeInterface g_iface;
36456 extern (C) void function (TreeSortable* sortable) nothrow sort_column_changed;
36458 // RETURNS: %TRUE if the sort column is not one of the special sort
36459 // <sort_column_id>: The sort column id to be filled in
36460 // <order>: The #GtkSortType to be filled in
36461 extern (C) int function (TreeSortable* sortable, int* sort_column_id, SortType* order) nothrow get_sort_column_id;
36463 // <sort_column_id>: the sort column id to set
36464 // <order>: The sort order of the column
36465 extern (C) void function (TreeSortable* sortable, int sort_column_id, SortType order) nothrow set_sort_column_id;
36467 // <sort_column_id>: the sort column id to set the function for
36468 // <destroy>: Destroy notifier of @user_data, or %NULL
36469 extern (C) void function (TreeSortable* sortable, int sort_column_id, TreeIterCompareFunc func, void* data, GLib2.DestroyNotify destroy=null) nothrow set_sort_func;
36470 // <destroy>: Destroy notifier of @user_data, or %NULL
36471 extern (C) void function (TreeSortable* sortable, TreeIterCompareFunc func, void* data, GLib2.DestroyNotify destroy=null) nothrow set_default_sort_func;
36472 // RETURNS: %TRUE, if the model has a default sort function
36473 extern (C) int function (TreeSortable* sortable) nothrow has_default_sort_func;
36476 struct TreeStore /* : GObject.Object */ {
36477 mixin Buildable.__interface__;
36478 mixin TreeDragDest.__interface__;
36479 mixin TreeDragSource.__interface__;
36480 mixin TreeModel.__interface__;
36481 mixin TreeSortable.__interface__;
36482 alias parent this;
36483 alias parent super_;
36484 alias parent object;
36485 GObject2.Object parent;
36486 int stamp;
36487 void* root, last;
36488 int n_columns, sort_column_id;
36489 GLib2.List* sort_list;
36490 SortType order;
36491 Type* column_headers;
36492 TreeIterCompareFunc default_sort_func;
36493 void* default_sort_data;
36494 GLib2.DestroyNotify default_sort_destroy;
36495 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
36496 uint, "columns_dirty", 1,
36497 uint, "__dummy32A", 31));
36500 // Unintrospectable constructor: new() / gtk_tree_store_new()
36501 // Creates a new tree store as with @n_columns columns each of the types passed
36502 // in. Note that only types derived from standard GObject fundamental types
36503 // are supported.
36505 // As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
36506 // GDK_TYPE_PIXBUF);</literal> will create a new #GtkTreeStore with three columns, of type
36507 // <type>int</type>, <type>string</type> and #GdkPixbuf respectively.
36508 // RETURNS: a new #GtkTreeStore
36509 // <n_columns>: number of columns in the tree store
36510 alias gtk_tree_store_new new_; // Variadic
36512 // Non vararg creation function. Used primarily by language bindings.
36513 // RETURNS: a new #GtkTreeStore
36514 // <n_columns>: number of columns in the tree store
36515 // <types>: an array of #GType types for the columns, from first to last
36516 static TreeStore* /*new*/ newv(AT0)(int n_columns, AT0 /*Type*/ types) nothrow {
36517 return gtk_tree_store_newv(n_columns, UpCast!(Type*)(types));
36519 static auto opCall(AT0)(int n_columns, AT0 /*Type*/ types) {
36520 return gtk_tree_store_newv(n_columns, UpCast!(Type*)(types));
36523 // Appends a new row to @tree_store. If @parent is non-%NULL, then it will append the
36524 // new row after the last child of @parent, otherwise it will append a row to
36525 // the top level. @iter will be changed to point to this new row. The row will
36526 // be empty after this function is called. To fill in values, you need to call
36527 // gtk_tree_store_set() or gtk_tree_store_set_value().
36528 // <iter>: An unset #GtkTreeIter to set to the appended row
36529 // <parent>: A valid #GtkTreeIter, or %NULL
36530 void append(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent=null) nothrow {
36531 gtk_tree_store_append(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent));
36533 // Removes all rows from @tree_store
36534 void clear()() nothrow {
36535 gtk_tree_store_clear(&this);
36538 // Creates a new row at @position. If parent is non-%NULL, then the row will be
36539 // made a child of @parent. Otherwise, the row will be created at the toplevel.
36540 // If @position is larger than the number of rows at that level, then the new
36541 // row will be inserted to the end of the list. @iter will be changed to point
36542 // to this new row. The row will be empty after this function is called. To
36543 // fill in values, you need to call gtk_tree_store_set() or
36544 // gtk_tree_store_set_value().
36545 // <iter>: An unset #GtkTreeIter to set to the new row
36546 // <parent>: A valid #GtkTreeIter, or %NULL
36547 // <position>: position to insert the new row
36548 void insert(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent, int position) nothrow {
36549 gtk_tree_store_insert(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent), position);
36552 // Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
36553 // prepended to @parent 's children. If @parent and @sibling are %NULL, then
36554 // the row will be prepended to the toplevel. If both @sibling and @parent are
36555 // set, then @parent must be the parent of @sibling. When @sibling is set,
36556 // @parent is optional.
36558 // @iter will be changed to point to this new row. The row will be empty after
36559 // this function is called. To fill in values, you need to call
36560 // gtk_tree_store_set() or gtk_tree_store_set_value().
36561 // <iter>: An unset #GtkTreeIter to set to the new row
36562 // <parent>: A valid #GtkTreeIter, or %NULL
36563 // <sibling>: A valid #GtkTreeIter, or %NULL
36564 void insert_after(AT0, AT1, AT2)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent=null, AT2 /*TreeIter*/ sibling=null) nothrow {
36565 gtk_tree_store_insert_after(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent), UpCast!(TreeIter*)(sibling));
36568 // Inserts a new row before @sibling. If @sibling is %NULL, then the row will
36569 // be appended to @parent 's children. If @parent and @sibling are %NULL, then
36570 // the row will be appended to the toplevel. If both @sibling and @parent are
36571 // set, then @parent must be the parent of @sibling. When @sibling is set,
36572 // @parent is optional.
36574 // @iter will be changed to point to this new row. The row will be empty after
36575 // this function is called. To fill in values, you need to call
36576 // gtk_tree_store_set() or gtk_tree_store_set_value().
36577 // <iter>: An unset #GtkTreeIter to set to the new row
36578 // <parent>: A valid #GtkTreeIter, or %NULL
36579 // <sibling>: A valid #GtkTreeIter, or %NULL
36580 void insert_before(AT0, AT1, AT2)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent=null, AT2 /*TreeIter*/ sibling=null) nothrow {
36581 gtk_tree_store_insert_before(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent), UpCast!(TreeIter*)(sibling));
36584 // Unintrospectable method: insert_with_values() / gtk_tree_store_insert_with_values()
36585 // VERSION: 2.10
36586 // Creates a new row at @position. @iter will be changed to point to this
36587 // new row. If @position is larger than the number of rows on the list, then
36588 // the new row will be appended to the list. The row will be filled with
36589 // the values given to this function.
36591 // Calling
36592 // <literal>gtk_tree_store_insert_with_values (tree_store, iter, position, ...)</literal>
36593 // has the same effect as calling
36594 // |[
36595 // gtk_tree_store_insert (tree_store, iter, position);
36596 // gtk_tree_store_set (tree_store, iter, ...);
36597 // ]|
36598 // with the different that the former will only emit a row_inserted signal,
36599 // while the latter will emit row_inserted, row_changed and if the tree store
36600 // is sorted, rows_reordered. Since emitting the rows_reordered signal
36601 // repeatedly can affect the performance of the program,
36602 // gtk_tree_store_insert_with_values() should generally be preferred when
36603 // inserting rows in a sorted tree store.
36604 // <iter>: An unset #GtkTreeIter to set the new row, or %NULL.
36605 // <parent>: A valid #GtkTreeIter, or %NULL
36606 // <position>: position to insert the new row
36607 /+ Not available -- variadic methods unsupported - use the C function directly.
36608 alias gtk_tree_store_insert_with_values insert_with_values; // Variadic
36611 // VERSION: 2.10
36612 // A variant of gtk_tree_store_insert_with_values() which takes
36613 // the columns and values as two arrays, instead of varargs. This
36614 // function is mainly intended for language bindings.
36615 // <iter>: An unset #GtkTreeIter to set the new row, or %NULL.
36616 // <parent>: A valid #GtkTreeIter, or %NULL
36617 // <position>: position to insert the new row
36618 // <columns>: an array of column numbers
36619 // <values>: an array of GValues
36620 // <n_values>: the length of the @columns and @values arrays
36621 void insert_with_valuesv(AT0, AT1, AT2)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent, int position, int* columns, AT2 /*GObject2.Value*/ values, int n_values) nothrow {
36622 gtk_tree_store_insert_with_valuesv(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent), position, columns, UpCast!(GObject2.Value*)(values), n_values);
36625 // Returns %TRUE if @iter is an ancestor of @descendant. That is, @iter is the
36626 // parent (or grandparent or great-grandparent) of @descendant.
36627 // RETURNS: %TRUE, if @iter is an ancestor of @descendant
36628 // <iter>: A valid #GtkTreeIter
36629 // <descendant>: A valid #GtkTreeIter
36630 int is_ancestor(AT0, AT1)(AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ descendant) nothrow {
36631 return gtk_tree_store_is_ancestor(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(descendant));
36634 // Returns the depth of @iter. This will be 0 for anything on the root level, 1
36635 // for anything down a level, etc.
36636 // RETURNS: The depth of @iter
36637 // <iter>: A valid #GtkTreeIter
36638 int iter_depth(AT0)(AT0 /*TreeIter*/ iter) nothrow {
36639 return gtk_tree_store_iter_depth(&this, UpCast!(TreeIter*)(iter));
36642 // VERSION: 2.2
36643 // WARNING: This function is slow. Only use it for debugging and/or testing
36644 // purposes.
36646 // Checks if the given iter is a valid iter for this #GtkTreeStore.
36647 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
36648 // <iter>: A #GtkTreeIter.
36649 int iter_is_valid(AT0)(AT0 /*TreeIter*/ iter) nothrow {
36650 return gtk_tree_store_iter_is_valid(&this, UpCast!(TreeIter*)(iter));
36653 // VERSION: 2.2
36654 // Moves @iter in @tree_store to the position after @position. @iter and
36655 // @position should be in the same level. Note that this function only
36656 // works with unsorted stores. If @position is %NULL, @iter will be moved
36657 // to the start of the level.
36658 // <iter>: A #GtkTreeIter.
36659 // <position>: A #GtkTreeIter.
36660 void move_after(AT0, AT1)(AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ position=null) nothrow {
36661 gtk_tree_store_move_after(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(position));
36664 // VERSION: 2.2
36665 // Moves @iter in @tree_store to the position before @position. @iter and
36666 // @position should be in the same level. Note that this function only
36667 // works with unsorted stores. If @position is %NULL, @iter will be
36668 // moved to the end of the level.
36669 // <iter>: A #GtkTreeIter.
36670 // <position>: A #GtkTreeIter or %NULL.
36671 void move_before(AT0, AT1)(AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ position=null) nothrow {
36672 gtk_tree_store_move_before(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(position));
36675 // Prepends a new row to @tree_store. If @parent is non-%NULL, then it will prepend
36676 // the new row before the first child of @parent, otherwise it will prepend a row
36677 // to the top level. @iter will be changed to point to this new row. The row
36678 // will be empty after this function is called. To fill in values, you need to
36679 // call gtk_tree_store_set() or gtk_tree_store_set_value().
36680 // <iter>: An unset #GtkTreeIter to set to the prepended row
36681 // <parent>: A valid #GtkTreeIter, or %NULL
36682 void prepend(AT0, AT1)(/*out*/ AT0 /*TreeIter*/ iter, AT1 /*TreeIter*/ parent=null) nothrow {
36683 gtk_tree_store_prepend(&this, UpCast!(TreeIter*)(iter), UpCast!(TreeIter*)(parent));
36686 // Removes @iter from @tree_store. After being removed, @iter is set to the
36687 // next valid row at that level, or invalidated if it previously pointed to the
36688 // last one.
36689 // RETURNS: %TRUE if @iter is still valid, %FALSE if not.
36690 // <iter>: A valid #GtkTreeIter
36691 int remove(AT0)(AT0 /*TreeIter*/ iter) nothrow {
36692 return gtk_tree_store_remove(&this, UpCast!(TreeIter*)(iter));
36695 // VERSION: 2.2
36696 // Reorders the children of @parent in @tree_store to follow the order
36697 // indicated by @new_order. Note that this function only works with
36698 // unsorted stores.
36699 // <parent>: A #GtkTreeIter.
36700 // <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>.
36701 void reorder(AT0)(AT0 /*TreeIter*/ parent, int* new_order) nothrow {
36702 gtk_tree_store_reorder(&this, UpCast!(TreeIter*)(parent), new_order);
36705 // Unintrospectable method: set() / gtk_tree_store_set()
36706 // Sets the value of one or more cells in the row referenced by @iter.
36707 // The variable argument list should contain integer column numbers,
36708 // each column number followed by the value to be set.
36709 // The list is terminated by a -1. For example, to set column 0 with type
36710 // %G_TYPE_STRING to "Foo", you would write
36711 // <literal>gtk_tree_store_set (store, iter, 0, "Foo", -1)</literal>.
36713 // The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
36714 // will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
36715 // <iter>: A valid #GtkTreeIter for the row being modified
36716 /+ Not available -- variadic methods unsupported - use the C function directly.
36717 alias gtk_tree_store_set set; // Variadic
36720 // This function is meant primarily for #GObjects that inherit from
36721 // #GtkTreeStore, and should only be used when constructing a new
36722 // #GtkTreeStore. It will not function after a row has been added,
36723 // or a method on the #GtkTreeModel interface is called.
36724 // <n_columns>: Number of columns for the tree store
36725 // <types>: An array of #GType types, one for each column
36726 void set_column_types(AT0)(int n_columns, AT0 /*Type*/ types) nothrow {
36727 gtk_tree_store_set_column_types(&this, n_columns, UpCast!(Type*)(types));
36730 // Unintrospectable method: set_valist() / gtk_tree_store_set_valist()
36731 // See gtk_tree_store_set(); this version takes a <type>va_list</type> for
36732 // use by language bindings.
36733 // <iter>: A valid #GtkTreeIter for the row being modified
36734 // <var_args>: <type>va_list</type> of column/value pairs
36735 void set_valist(AT0)(AT0 /*TreeIter*/ iter, va_list var_args) nothrow {
36736 gtk_tree_store_set_valist(&this, UpCast!(TreeIter*)(iter), var_args);
36739 // Sets the data in the cell specified by @iter and @column.
36740 // The type of @value must be convertible to the type of the
36741 // column.
36742 // <iter>: A valid #GtkTreeIter for the row being modified
36743 // <column>: column number to modify
36744 // <value>: new value for the cell
36745 void set_value(AT0, AT1)(AT0 /*TreeIter*/ iter, int column, AT1 /*GObject2.Value*/ value) nothrow {
36746 gtk_tree_store_set_value(&this, UpCast!(TreeIter*)(iter), column, UpCast!(GObject2.Value*)(value));
36749 // VERSION: 2.12
36750 // A variant of gtk_tree_store_set_valist() which takes
36751 // the columns and values as two arrays, instead of varargs. This
36752 // function is mainly intended for language bindings or in case
36753 // the number of columns to change is not known until run-time.
36754 // <iter>: A valid #GtkTreeIter for the row being modified
36755 // <columns>: an array of column numbers
36756 // <values>: an array of GValues
36757 // <n_values>: the length of the @columns and @values arrays
36758 void set_valuesv(AT0, AT1)(AT0 /*TreeIter*/ iter, int* columns, AT1 /*GObject2.Value*/ values, int n_values) nothrow {
36759 gtk_tree_store_set_valuesv(&this, UpCast!(TreeIter*)(iter), columns, UpCast!(GObject2.Value*)(values), n_values);
36762 // VERSION: 2.2
36763 // Swaps @a and @b in the same level of @tree_store. Note that this function
36764 // only works with unsorted stores.
36765 // <a>: A #GtkTreeIter.
36766 // <b>: Another #GtkTreeIter.
36767 void swap(AT0, AT1)(AT0 /*TreeIter*/ a, AT1 /*TreeIter*/ b) nothrow {
36768 gtk_tree_store_swap(&this, UpCast!(TreeIter*)(a), UpCast!(TreeIter*)(b));
36772 struct TreeStoreClass {
36773 GObject2.ObjectClass parent_class;
36774 extern (C) void function () nothrow _gtk_reserved1;
36775 extern (C) void function () nothrow _gtk_reserved2;
36776 extern (C) void function () nothrow _gtk_reserved3;
36777 extern (C) void function () nothrow _gtk_reserved4;
36780 struct TreeView /* : Container */ {
36781 mixin Atk.ImplementorIface.__interface__;
36782 mixin Buildable.__interface__;
36783 alias parent this;
36784 alias parent super_;
36785 alias parent container;
36786 Container parent;
36787 TreeViewPrivate* priv;
36790 // Creates a new #GtkTreeView widget.
36791 // RETURNS: A newly created #GtkTreeView widget.
36792 static TreeView* new_()() nothrow {
36793 return gtk_tree_view_new();
36795 static auto opCall()() {
36796 return gtk_tree_view_new();
36799 // Creates a new #GtkTreeView widget with the model initialized to @model.
36800 // RETURNS: A newly created #GtkTreeView widget.
36801 // <model>: the model.
36802 static TreeView* new_with_model(AT0)(AT0 /*TreeModel*/ model) nothrow {
36803 return gtk_tree_view_new_with_model(UpCast!(TreeModel*)(model));
36805 static auto opCall(AT0)(AT0 /*TreeModel*/ model) {
36806 return gtk_tree_view_new_with_model(UpCast!(TreeModel*)(model));
36809 // Appends @column to the list of columns. If @tree_view has "fixed_height"
36810 // mode enabled, then @column must have its "sizing" property set to be
36811 // GTK_TREE_VIEW_COLUMN_FIXED.
36812 // RETURNS: The number of columns in @tree_view after appending.
36813 // <column>: The #GtkTreeViewColumn to add.
36814 int append_column(AT0)(AT0 /*TreeViewColumn*/ column) nothrow {
36815 return gtk_tree_view_append_column(&this, UpCast!(TreeViewColumn*)(column));
36817 // Recursively collapses all visible, expanded nodes in @tree_view.
36818 void collapse_all()() nothrow {
36819 gtk_tree_view_collapse_all(&this);
36822 // Collapses a row (hides its child rows, if they exist).
36823 // RETURNS: %TRUE if the row was collapsed.
36824 // <path>: path to a row in the @tree_view
36825 int collapse_row(AT0)(AT0 /*TreePath*/ path) nothrow {
36826 return gtk_tree_view_collapse_row(&this, UpCast!(TreePath*)(path));
36829 // Resizes all columns to their optimal width. Only works after the
36830 // treeview has been realized.
36831 void columns_autosize()() nothrow {
36832 gtk_tree_view_columns_autosize(&this);
36835 // VERSION: 2.12
36836 // Converts bin_window coordinates to coordinates for the
36837 // tree (the full scrollable area of the tree).
36838 // <bx>: X coordinate relative to bin_window
36839 // <by>: Y coordinate relative to bin_window
36840 // <tx>: return location for tree X coordinate
36841 // <ty>: return location for tree Y coordinate
36842 void convert_bin_window_to_tree_coords()(int bx, int by, /*out*/ int* tx, /*out*/ int* ty) nothrow {
36843 gtk_tree_view_convert_bin_window_to_tree_coords(&this, bx, by, tx, ty);
36846 // VERSION: 2.12
36847 // Converts bin_window coordinates (see gtk_tree_view_get_bin_window())
36848 // to widget relative coordinates.
36849 // <bx>: bin_window X coordinate
36850 // <by>: bin_window Y coordinate
36851 // <wx>: return location for widget X coordinate
36852 // <wy>: return location for widget Y coordinate
36853 void convert_bin_window_to_widget_coords()(int bx, int by, /*out*/ int* wx, /*out*/ int* wy) nothrow {
36854 gtk_tree_view_convert_bin_window_to_widget_coords(&this, bx, by, wx, wy);
36857 // VERSION: 2.12
36858 // Converts tree coordinates (coordinates in full scrollable area of the tree)
36859 // to bin_window coordinates.
36860 // <tx>: tree X coordinate
36861 // <ty>: tree Y coordinate
36862 // <bx>: return location for X coordinate relative to bin_window
36863 // <by>: return location for Y coordinate relative to bin_window
36864 void convert_tree_to_bin_window_coords()(int tx, int ty, /*out*/ int* bx, /*out*/ int* by) nothrow {
36865 gtk_tree_view_convert_tree_to_bin_window_coords(&this, tx, ty, bx, by);
36868 // VERSION: 2.12
36869 // Converts tree coordinates (coordinates in full scrollable area of the tree)
36870 // to widget coordinates.
36871 // <tx>: X coordinate relative to the tree
36872 // <ty>: Y coordinate relative to the tree
36873 // <wx>: return location for widget X coordinate
36874 // <wy>: return location for widget Y coordinate
36875 void convert_tree_to_widget_coords()(int tx, int ty, /*out*/ int* wx, /*out*/ int* wy) nothrow {
36876 gtk_tree_view_convert_tree_to_widget_coords(&this, tx, ty, wx, wy);
36879 // VERSION: 2.12
36880 // Converts widget coordinates to coordinates for the bin_window
36881 // (see gtk_tree_view_get_bin_window()).
36882 // <wx>: X coordinate relative to the widget
36883 // <wy>: Y coordinate relative to the widget
36884 // <bx>: return location for bin_window X coordinate
36885 // <by>: return location for bin_window Y coordinate
36886 void convert_widget_to_bin_window_coords()(int wx, int wy, /*out*/ int* bx, /*out*/ int* by) nothrow {
36887 gtk_tree_view_convert_widget_to_bin_window_coords(&this, wx, wy, bx, by);
36890 // VERSION: 2.12
36891 // Converts widget coordinates to coordinates for the
36892 // tree (the full scrollable area of the tree).
36893 // <wx>: X coordinate relative to the widget
36894 // <wy>: Y coordinate relative to the widget
36895 // <tx>: return location for tree X coordinate
36896 // <ty>: return location for tree Y coordinate
36897 void convert_widget_to_tree_coords()(int wx, int wy, /*out*/ int* tx, /*out*/ int* ty) nothrow {
36898 gtk_tree_view_convert_widget_to_tree_coords(&this, wx, wy, tx, ty);
36901 // Creates a #GdkPixmap representation of the row at @path.
36902 // This image is used for a drag icon.
36903 // RETURNS: a newly-allocated pixmap of the drag icon.
36904 // <path>: a #GtkTreePath in @tree_view
36905 Gdk2.Pixmap* create_row_drag_icon(AT0)(AT0 /*TreePath*/ path) nothrow {
36906 return gtk_tree_view_create_row_drag_icon(&this, UpCast!(TreePath*)(path));
36909 // Turns @tree_view into a drop destination for automatic DND. Calling
36910 // this method sets #GtkTreeView:reorderable to %FALSE.
36911 // <targets>: the table of targets that the drag will support
36912 // <n_targets>: the number of items in @targets
36913 // <actions>: the bitmask of possible actions for a drag from this widget
36914 void enable_model_drag_dest(AT0)(AT0 /*TargetEntry*/ targets, int n_targets, Gdk2.DragAction actions) nothrow {
36915 gtk_tree_view_enable_model_drag_dest(&this, UpCast!(TargetEntry*)(targets), n_targets, actions);
36918 // Turns @tree_view into a drag source for automatic DND. Calling this
36919 // method sets #GtkTreeView:reorderable to %FALSE.
36920 // <start_button_mask>: Mask of allowed buttons to start drag
36921 // <targets>: the table of targets that the drag will support
36922 // <n_targets>: the number of items in @targets
36923 // <actions>: the bitmask of possible actions for a drag from this widget
36924 void enable_model_drag_source(AT0)(Gdk2.ModifierType start_button_mask, AT0 /*TargetEntry*/ targets, int n_targets, Gdk2.DragAction actions) nothrow {
36925 gtk_tree_view_enable_model_drag_source(&this, start_button_mask, UpCast!(TargetEntry*)(targets), n_targets, actions);
36927 // Recursively expands all nodes in the @tree_view.
36928 void expand_all()() nothrow {
36929 gtk_tree_view_expand_all(&this);
36932 // Opens the row so its children are visible.
36933 // RETURNS: %TRUE if the row existed and had children
36934 // <path>: path to a row
36935 // <open_all>: whether to recursively expand, or just expand immediate children
36936 int expand_row(AT0)(AT0 /*TreePath*/ path, int open_all) nothrow {
36937 return gtk_tree_view_expand_row(&this, UpCast!(TreePath*)(path), open_all);
36940 // VERSION: 2.2
36941 // Expands the row at @path. This will also expand all parent rows of
36942 // @path as necessary.
36943 // <path>: path to a row.
36944 void expand_to_path(AT0)(AT0 /*TreePath*/ path) nothrow {
36945 gtk_tree_view_expand_to_path(&this, UpCast!(TreePath*)(path));
36948 // Fills the bounding rectangle in bin_window coordinates for the cell at the
36949 // row specified by @path and the column specified by @column. If @path is
36950 // %NULL, or points to a node not found in the tree, the @y and @height fields of
36951 // the rectangle will be filled with 0. If @column is %NULL, the @x and @width
36952 // fields will be filled with 0. The returned rectangle is equivalent to the
36953 // @background_area passed to gtk_cell_renderer_render(). These background
36954 // areas tile to cover the entire bin window. Contrast with the @cell_area,
36955 // returned by gtk_tree_view_get_cell_area(), which returns only the cell
36956 // itself, excluding surrounding borders and the tree expander area.
36957 // <path>: a #GtkTreePath for the row, or %NULL to get only horizontal coordinates
36958 // <column>: a #GtkTreeViewColumn for the column, or %NULL to get only vertical coordiantes
36959 // <rect>: rectangle to fill with cell background rect
36960 void get_background_area(AT0, AT1, AT2)(AT0 /*TreePath*/ path, AT1 /*TreeViewColumn*/ column, /*out*/ AT2 /*Gdk2.Rectangle*/ rect) nothrow {
36961 gtk_tree_view_get_background_area(&this, UpCast!(TreePath*)(path), UpCast!(TreeViewColumn*)(column), UpCast!(Gdk2.Rectangle*)(rect));
36964 // Returns the window that @tree_view renders to.
36965 // This is used primarily to compare to <literal>event->window</literal>
36966 // to confirm that the event on @tree_view is on the right window.
36968 // hasn't been realized yet
36969 // RETURNS: A #GdkWindow, or %NULL when @tree_view
36970 Gdk2.Window* get_bin_window()() nothrow {
36971 return gtk_tree_view_get_bin_window(&this);
36974 // Fills the bounding rectangle in bin_window coordinates for the cell at the
36975 // row specified by @path and the column specified by @column. If @path is
36976 // %NULL, or points to a path not currently displayed, the @y and @height fields
36977 // of the rectangle will be filled with 0. If @column is %NULL, the @x and @width
36978 // fields will be filled with 0. The sum of all cell rects does not cover the
36979 // entire tree; there are extra pixels in between rows, for example. The
36980 // returned rectangle is equivalent to the @cell_area passed to
36981 // gtk_cell_renderer_render(). This function is only valid if @tree_view is
36982 // realized.
36983 // <path>: a #GtkTreePath for the row, or %NULL to get only horizontal coordinates
36984 // <column>: a #GtkTreeViewColumn for the column, or %NULL to get only vertical coordinates
36985 // <rect>: rectangle to fill with cell rect
36986 void get_cell_area(AT0, AT1, AT2)(AT0 /*TreePath*/ path, AT1 /*TreeViewColumn*/ column, /*out*/ AT2 /*Gdk2.Rectangle*/ rect) nothrow {
36987 gtk_tree_view_get_cell_area(&this, UpCast!(TreePath*)(path), UpCast!(TreeViewColumn*)(column), UpCast!(Gdk2.Rectangle*)(rect));
36990 // Gets the #GtkTreeViewColumn at the given position in the #tree_view.
36992 // position is outside the range of columns.
36993 // RETURNS: The #GtkTreeViewColumn, or %NULL if the
36994 // <n>: The position of the column, counting from 0.
36995 TreeViewColumn* get_column()(int n) nothrow {
36996 return gtk_tree_view_get_column(&this, n);
36999 // Returns a #GList of all the #GtkTreeViewColumn s currently in @tree_view.
37000 // The returned list must be freed with g_list_free ().
37001 // RETURNS: A list of #GtkTreeViewColumn s
37002 GLib2.List* /*new container*/ get_columns()() nothrow {
37003 return gtk_tree_view_get_columns(&this);
37006 // Fills in @path and @focus_column with the current path and focus column. If
37007 // the cursor isn't currently set, then *@path will be %NULL. If no column
37008 // currently has focus, then *@focus_column will be %NULL.
37010 // The returned #GtkTreePath must be freed with gtk_tree_path_free() when
37011 // you are done with it.
37012 // <path>: A pointer to be filled with the current cursor path, or %NULL
37013 // <focus_column>: A pointer to be filled with the current focus column, or %NULL
37014 void get_cursor(AT0, AT1)(/*out*/ AT0 /*TreePath**/ path=null, /*out*/ AT1 /*TreeViewColumn**/ focus_column=null) nothrow {
37015 gtk_tree_view_get_cursor(&this, UpCast!(TreePath**)(path), UpCast!(TreeViewColumn**)(focus_column));
37018 // Determines the destination row for a given position. @drag_x and
37019 // @drag_y are expected to be in widget coordinates. This function is only
37020 // meaningful if @tree_view is realized. Therefore this function will always
37021 // return %FALSE if @tree_view is not realized or does not have a model.
37023 // is indeed the case.
37024 // RETURNS: whether there is a row at the given position, %TRUE if this
37025 // <drag_x>: the position to determine the destination row for
37026 // <drag_y>: the position to determine the destination row for
37027 // <path>: Return location for the path of the highlighted row, or %NULL.
37028 // <pos>: Return location for the drop position, or %NULL
37029 int get_dest_row_at_pos(AT0, AT1)(int drag_x, int drag_y, /*out*/ AT0 /*TreePath**/ path=null, /*out*/ AT1 /*TreeViewDropPosition*/ pos=null) nothrow {
37030 return gtk_tree_view_get_dest_row_at_pos(&this, drag_x, drag_y, UpCast!(TreePath**)(path), UpCast!(TreeViewDropPosition*)(pos));
37033 // Gets information about the row that is highlighted for feedback.
37034 // <path>: Return location for the path of the highlighted row, or %NULL.
37035 // <pos>: Return location for the drop position, or %NULL
37036 void get_drag_dest_row(AT0, AT1)(/*out*/ AT0 /*TreePath**/ path=null, /*out*/ AT1 /*TreeViewDropPosition*/ pos=null) nothrow {
37037 gtk_tree_view_get_drag_dest_row(&this, UpCast!(TreePath**)(path), UpCast!(TreeViewDropPosition*)(pos));
37040 // Returns whether or not the tree allows to start interactive searching
37041 // by typing in text.
37042 // RETURNS: whether or not to let the user search interactively
37043 int get_enable_search()() nothrow {
37044 return gtk_tree_view_get_enable_search(&this);
37047 // VERSION: 2.10
37048 // Returns whether or not tree lines are drawn in @tree_view.
37050 // otherwise.
37051 // RETURNS: %TRUE if tree lines are drawn in @tree_view, %FALSE
37052 int get_enable_tree_lines()() nothrow {
37053 return gtk_tree_view_get_enable_tree_lines(&this);
37056 // Returns the column that is the current expander column.
37057 // This column has the expander arrow drawn next to it.
37058 // RETURNS: The expander column.
37059 TreeViewColumn* get_expander_column()() nothrow {
37060 return gtk_tree_view_get_expander_column(&this);
37063 // VERSION: 2.6
37064 // Returns whether fixed height mode is turned on for @tree_view.
37065 // RETURNS: %TRUE if @tree_view is in fixed height mode
37066 int get_fixed_height_mode()() nothrow {
37067 return gtk_tree_view_get_fixed_height_mode(&this);
37070 // VERSION: 2.10
37071 // Returns which grid lines are enabled in @tree_view.
37073 // are enabled.
37074 // RETURNS: a #GtkTreeViewGridLines value indicating which grid lines
37075 TreeViewGridLines get_grid_lines()() nothrow {
37076 return gtk_tree_view_get_grid_lines(&this);
37079 // Gets the #GtkAdjustment currently being used for the horizontal aspect.
37081 // if none is currently being used.
37082 // RETURNS: A #GtkAdjustment object, or %NULL
37083 Adjustment* get_hadjustment()() nothrow {
37084 return gtk_tree_view_get_hadjustment(&this);
37087 // VERSION: 2.10
37088 // Returns whether all header columns are clickable.
37089 // RETURNS: %TRUE if all header columns are clickable, otherwise %FALSE
37090 int get_headers_clickable()() nothrow {
37091 return gtk_tree_view_get_headers_clickable(&this);
37094 // Returns %TRUE if the headers on the @tree_view are visible.
37095 // RETURNS: Whether the headers are visible or not.
37096 int get_headers_visible()() nothrow {
37097 return gtk_tree_view_get_headers_visible(&this);
37100 // VERSION: 2.6
37101 // Returns whether hover expansion mode is turned on for @tree_view.
37102 // RETURNS: %TRUE if @tree_view is in hover expansion mode
37103 int get_hover_expand()() nothrow {
37104 return gtk_tree_view_get_hover_expand(&this);
37107 // VERSION: 2.6
37108 // Returns whether hover selection mode is turned on for @tree_view.
37109 // RETURNS: %TRUE if @tree_view is in hover selection mode
37110 int get_hover_selection()() nothrow {
37111 return gtk_tree_view_get_hover_selection(&this);
37114 // VERSION: 2.12
37115 // Returns the amount, in pixels, of extra indentation for child levels
37116 // in @tree_view.
37118 // @tree_view. A return value of 0 means that this feature is disabled.
37119 // RETURNS: the amount of extra indentation for child levels in
37120 int get_level_indentation()() nothrow {
37121 return gtk_tree_view_get_level_indentation(&this);
37124 // Returns the model the #GtkTreeView is based on. Returns %NULL if the
37125 // model is unset.
37126 // RETURNS: A #GtkTreeModel, or %NULL if none is currently being used.
37127 TreeModel* get_model()() nothrow {
37128 return gtk_tree_view_get_model(&this);
37131 // Finds the path at the point (@x, @y), relative to bin_window coordinates
37132 // (please see gtk_tree_view_get_bin_window()).
37133 // That is, @x and @y are relative to an events coordinates. @x and @y must
37134 // come from an event on the @tree_view only where <literal>event->window ==
37135 // gtk_tree_view_get_bin_window (<!-- -->)</literal>. It is primarily for
37136 // things like popup menus. If @path is non-%NULL, then it will be filled
37137 // with the #GtkTreePath at that point. This path should be freed with
37138 // gtk_tree_path_free(). If @column is non-%NULL, then it will be filled
37139 // with the column at that point. @cell_x and @cell_y return the coordinates
37140 // relative to the cell background (i.e. the @background_area passed to
37141 // gtk_cell_renderer_render()). This function is only meaningful if
37142 // @tree_view is realized. Therefore this function will always return %FALSE
37143 // if @tree_view is not realized or does not have a model.
37145 // For converting widget coordinates (eg. the ones you get from
37146 // GtkWidget::query-tooltip), please see
37147 // gtk_tree_view_convert_widget_to_bin_window_coords().
37148 // RETURNS: %TRUE if a row exists at that coordinate.
37149 // <x>: The x position to be identified (relative to bin_window).
37150 // <y>: The y position to be identified (relative to bin_window).
37151 // <path>: A pointer to a #GtkTreePath pointer to be filled in, or %NULL
37152 // <column>: A pointer to a #GtkTreeViewColumn pointer to be filled in, or %NULL
37153 // <cell_x>: A pointer where the X coordinate relative to the cell can be placed, or %NULL
37154 // <cell_y>: A pointer where the Y coordinate relative to the cell can be placed, or %NULL
37155 int get_path_at_pos(AT0, AT1)(int x, int y, /*out*/ AT0 /*TreePath**/ path=null, /*out*/ AT1 /*TreeViewColumn**/ column=null, /*out*/ int* cell_x=null, /*out*/ int* cell_y=null) nothrow {
37156 return gtk_tree_view_get_path_at_pos(&this, x, y, UpCast!(TreePath**)(path), UpCast!(TreeViewColumn**)(column), cell_x, cell_y);
37159 // Retrieves whether the user can reorder the tree via drag-and-drop. See
37160 // gtk_tree_view_set_reorderable().
37161 // RETURNS: %TRUE if the tree can be reordered.
37162 int get_reorderable()() nothrow {
37163 return gtk_tree_view_get_reorderable(&this);
37166 // Unintrospectable method: get_row_separator_func() / gtk_tree_view_get_row_separator_func()
37167 // VERSION: 2.6
37168 // Returns the current row separator function.
37169 // RETURNS: the current row separator function.
37170 TreeViewRowSeparatorFunc get_row_separator_func()() nothrow {
37171 return gtk_tree_view_get_row_separator_func(&this);
37174 // VERSION: 2.10
37175 // Returns whether rubber banding is turned on for @tree_view. If the
37176 // selection mode is #GTK_SELECTION_MULTIPLE, rubber banding will allow the
37177 // user to select multiple rows by dragging the mouse.
37178 // RETURNS: %TRUE if rubber banding in @tree_view is enabled.
37179 int get_rubber_banding()() nothrow {
37180 return gtk_tree_view_get_rubber_banding(&this);
37183 // Gets the setting set by gtk_tree_view_set_rules_hint().
37184 // RETURNS: %TRUE if rules are useful for the user of this tree
37185 int get_rules_hint()() nothrow {
37186 return gtk_tree_view_get_rules_hint(&this);
37189 // Gets the column searched on by the interactive search code.
37190 // RETURNS: the column the interactive search code searches in.
37191 int get_search_column()() nothrow {
37192 return gtk_tree_view_get_search_column(&this);
37195 // VERSION: 2.10
37196 // Returns the #GtkEntry which is currently in use as interactive search
37197 // entry for @tree_view. In case the built-in entry is being used, %NULL
37198 // will be returned.
37199 // RETURNS: the entry currently in use as search entry.
37200 Entry* get_search_entry()() nothrow {
37201 return gtk_tree_view_get_search_entry(&this);
37204 // Unintrospectable method: get_search_equal_func() / gtk_tree_view_get_search_equal_func()
37205 // Returns the compare function currently in use.
37206 // RETURNS: the currently used compare function for the search code.
37207 TreeViewSearchEqualFunc get_search_equal_func()() nothrow {
37208 return gtk_tree_view_get_search_equal_func(&this);
37211 // Unintrospectable method: get_search_position_func() / gtk_tree_view_get_search_position_func()
37212 // VERSION: 2.10
37213 // Returns the positioning function currently in use.
37214 // RETURNS: the currently used function for positioning the search dialog.
37215 TreeViewSearchPositionFunc get_search_position_func()() nothrow {
37216 return gtk_tree_view_get_search_position_func(&this);
37219 // Gets the #GtkTreeSelection associated with @tree_view.
37220 // RETURNS: A #GtkTreeSelection object.
37221 TreeSelection* get_selection()() nothrow {
37222 return gtk_tree_view_get_selection(&this);
37225 // VERSION: 2.12
37226 // Returns whether or not expanders are drawn in @tree_view.
37228 // otherwise.
37229 // RETURNS: %TRUE if expanders are drawn in @tree_view, %FALSE
37230 int get_show_expanders()() nothrow {
37231 return gtk_tree_view_get_show_expanders(&this);
37234 // VERSION: 2.12
37235 // Returns the column of @tree_view's model which is being used for
37236 // displaying tooltips on @tree_view's rows.
37238 // used, or -1 if this is disabled.
37239 // RETURNS: the index of the tooltip column that is currently being
37240 int get_tooltip_column()() nothrow {
37241 return gtk_tree_view_get_tooltip_column(&this);
37244 // VERSION: 2.12
37245 // This function is supposed to be used in a #GtkWidget::query-tooltip
37246 // signal handler for #GtkTreeView. The @x, @y and @keyboard_tip values
37247 // which are received in the signal handler, should be passed to this
37248 // function without modification.
37250 // The return value indicates whether there is a tree view row at the given
37251 // coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
37252 // tooltips the row returned will be the cursor row. When %TRUE, then any of
37253 // @model, @path and @iter which have been provided will be set to point to
37254 // that row and the corresponding model. @x and @y will always be converted
37255 // to be relative to @tree_view's bin_window if @keyboard_tooltip is %FALSE.
37256 // RETURNS: whether or not the given tooltip context points to a row.
37257 // <x>: the x coordinate (relative to widget coordinates)
37258 // <y>: the y coordinate (relative to widget coordinates)
37259 // <keyboard_tip>: whether this is a keyboard tooltip or not
37260 // <model>: a pointer to receive a #GtkTreeModel or %NULL
37261 // <path>: a pointer to receive a #GtkTreePath or %NULL
37262 // <iter>: a pointer to receive a #GtkTreeIter or %NULL
37263 int get_tooltip_context(AT0, AT1, AT2)(/*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ AT0 /*TreeModel**/ model=null, /*out*/ AT1 /*TreePath**/ path=null, /*out*/ AT2 /*TreeIter*/ iter=null) nothrow {
37264 return gtk_tree_view_get_tooltip_context(&this, x, y, keyboard_tip, UpCast!(TreeModel**)(model), UpCast!(TreePath**)(path), UpCast!(TreeIter*)(iter));
37267 // Gets the #GtkAdjustment currently being used for the vertical aspect.
37269 // if none is currently being used.
37270 // RETURNS: A #GtkAdjustment object, or %NULL
37271 Adjustment* get_vadjustment()() nothrow {
37272 return gtk_tree_view_get_vadjustment(&this);
37275 // VERSION: 2.8
37276 // Sets @start_path and @end_path to be the first and last visible path.
37277 // Note that there may be invisible paths in between.
37279 // The paths should be freed with gtk_tree_path_free() after use.
37280 // RETURNS: %TRUE, if valid paths were placed in @start_path and @end_path.
37281 // <start_path>: Return location for start of region, or %NULL.
37282 // <end_path>: Return location for end of region, or %NULL.
37283 int get_visible_range(AT0, AT1)(/*out*/ AT0 /*TreePath**/ start_path=null, /*out*/ AT1 /*TreePath**/ end_path=null) nothrow {
37284 return gtk_tree_view_get_visible_range(&this, UpCast!(TreePath**)(start_path), UpCast!(TreePath**)(end_path));
37287 // Fills @visible_rect with the currently-visible region of the
37288 // buffer, in tree coordinates. Convert to bin_window coordinates with
37289 // gtk_tree_view_convert_tree_to_bin_window_coords().
37290 // Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
37291 // scrollable area of the tree.
37292 // <visible_rect>: rectangle to fill
37293 void get_visible_rect(AT0)(/*out*/ AT0 /*Gdk2.Rectangle*/ visible_rect) nothrow {
37294 gtk_tree_view_get_visible_rect(&this, UpCast!(Gdk2.Rectangle*)(visible_rect));
37297 // This inserts the @column into the @tree_view at @position. If @position is
37298 // -1, then the column is inserted at the end. If @tree_view has
37299 // "fixed_height" mode enabled, then @column must have its "sizing" property
37300 // set to be GTK_TREE_VIEW_COLUMN_FIXED.
37301 // RETURNS: The number of columns in @tree_view after insertion.
37302 // <column>: The #GtkTreeViewColumn to be inserted.
37303 // <position>: The position to insert @column in.
37304 int insert_column(AT0)(AT0 /*TreeViewColumn*/ column, int position) nothrow {
37305 return gtk_tree_view_insert_column(&this, UpCast!(TreeViewColumn*)(column), position);
37308 // Unintrospectable method: insert_column_with_attributes() / gtk_tree_view_insert_column_with_attributes()
37309 // Creates a new #GtkTreeViewColumn and inserts it into the @tree_view at
37310 // @position. If @position is -1, then the newly created column is inserted at
37311 // the end. The column is initialized with the attributes given. If @tree_view
37312 // has "fixed_height" mode enabled, then the new column will have its sizing
37313 // property set to be GTK_TREE_VIEW_COLUMN_FIXED.
37314 // RETURNS: The number of columns in @tree_view after insertion.
37315 // <position>: The position to insert the new column in.
37316 // <title>: The title to set the header to.
37317 // <cell>: The #GtkCellRenderer.
37318 /+ Not available -- variadic methods unsupported - use the C function directly.
37319 alias gtk_tree_view_insert_column_with_attributes insert_column_with_attributes; // Variadic
37322 // Convenience function that inserts a new column into the #GtkTreeView
37323 // with the given cell renderer and a #GtkCellDataFunc to set cell renderer
37324 // attributes (normally using data from the model). See also
37325 // gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
37326 // If @tree_view has "fixed_height" mode enabled, then the new column will have its
37327 // "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED.
37328 // RETURNS: number of columns in the tree view post-insert
37329 // <position>: Position to insert, -1 for append
37330 // <title>: column title
37331 // <cell>: cell renderer for column
37332 // <func>: function to set attributes of cell renderer
37333 // <data>: data for @func
37334 // <dnotify>: destroy notifier for @data
37335 int insert_column_with_data_func(AT0, AT1, AT2)(int position, AT0 /*char*/ title, AT1 /*CellRenderer*/ cell, TreeCellDataFunc func, AT2 /*void*/ data, GLib2.DestroyNotify dnotify) nothrow {
37336 return gtk_tree_view_insert_column_with_data_func(&this, position, toCString!(char*)(title), UpCast!(CellRenderer*)(cell), func, UpCast!(void*)(data), dnotify);
37339 // VERSION: 2.12
37340 // Returns whether a rubber banding operation is currently being done
37341 // in @tree_view.
37343 // done in @tree_view.
37344 // RETURNS: %TRUE if a rubber banding operation is currently being
37345 int is_rubber_banding_active()() nothrow {
37346 return gtk_tree_view_is_rubber_banding_active(&this);
37349 // Calls @func on all expanded rows.
37350 // <func>: A function to be called
37351 // <data>: User data to be passed to the function.
37352 void map_expanded_rows(AT0)(TreeViewMappingFunc func, AT0 /*void*/ data) nothrow {
37353 gtk_tree_view_map_expanded_rows(&this, func, UpCast!(void*)(data));
37356 // Moves @column to be after to @base_column. If @base_column is %NULL, then
37357 // @column is placed in the first position.
37358 // <column>: The #GtkTreeViewColumn to be moved.
37359 // <base_column>: The #GtkTreeViewColumn to be moved relative to, or %NULL.
37360 void move_column_after(AT0, AT1)(AT0 /*TreeViewColumn*/ column, AT1 /*TreeViewColumn*/ base_column=null) nothrow {
37361 gtk_tree_view_move_column_after(&this, UpCast!(TreeViewColumn*)(column), UpCast!(TreeViewColumn*)(base_column));
37364 // Removes @column from @tree_view.
37365 // RETURNS: The number of columns in @tree_view after removing.
37366 // <column>: The #GtkTreeViewColumn to remove.
37367 int remove_column(AT0)(AT0 /*TreeViewColumn*/ column) nothrow {
37368 return gtk_tree_view_remove_column(&this, UpCast!(TreeViewColumn*)(column));
37371 // Activates the cell determined by @path and @column.
37372 // <path>: The #GtkTreePath to be activated.
37373 // <column>: The #GtkTreeViewColumn to be activated.
37374 void row_activated(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*TreeViewColumn*/ column) nothrow {
37375 gtk_tree_view_row_activated(&this, UpCast!(TreePath*)(path), UpCast!(TreeViewColumn*)(column));
37378 // Returns %TRUE if the node pointed to by @path is expanded in @tree_view.
37379 // RETURNS: %TRUE if #path is expanded.
37380 // <path>: A #GtkTreePath to test expansion state.
37381 int row_expanded(AT0)(AT0 /*TreePath*/ path) nothrow {
37382 return gtk_tree_view_row_expanded(&this, UpCast!(TreePath*)(path));
37385 // Moves the alignments of @tree_view to the position specified by @column and
37386 // @path. If @column is %NULL, then no horizontal scrolling occurs. Likewise,
37387 // if @path is %NULL no vertical scrolling occurs. At a minimum, one of @column
37388 // or @path need to be non-%NULL. @row_align determines where the row is
37389 // placed, and @col_align determines where @column is placed. Both are expected
37390 // to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
37391 // right/bottom alignment, 0.5 means center.
37393 // If @use_align is %FALSE, then the alignment arguments are ignored, and the
37394 // tree does the minimum amount of work to scroll the cell onto the screen.
37395 // This means that the cell will be scrolled to the edge closest to its current
37396 // position. If the cell is currently visible on the screen, nothing is done.
37398 // This function only works if the model is set, and @path is a valid row on the
37399 // model. If the model changes before the @tree_view is realized, the centered
37400 // path will be modified to reflect this change.
37401 // <path>: The path of the row to move to, or %NULL.
37402 // <column>: The #GtkTreeViewColumn to move horizontally to, or %NULL.
37403 // <use_align>: whether to use alignment arguments, or %FALSE.
37404 // <row_align>: The vertical alignment of the row specified by @path.
37405 // <col_align>: The horizontal alignment of the column specified by @column.
37406 void scroll_to_cell(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*TreeViewColumn*/ column, int use_align, float row_align, float col_align) nothrow {
37407 gtk_tree_view_scroll_to_cell(&this, UpCast!(TreePath*)(path), UpCast!(TreeViewColumn*)(column), use_align, row_align, col_align);
37410 // Scrolls the tree view such that the top-left corner of the visible
37411 // area is @tree_x, @tree_y, where @tree_x and @tree_y are specified
37412 // in tree coordinates. The @tree_view must be realized before
37413 // this function is called. If it isn't, you probably want to be
37414 // using gtk_tree_view_scroll_to_cell().
37416 // If either @tree_x or @tree_y are -1, then that direction isn't scrolled.
37417 // <tree_x>: X coordinate of new top-left pixel of visible area, or -1
37418 // <tree_y>: Y coordinate of new top-left pixel of visible area, or -1
37419 void scroll_to_point()(int tree_x, int tree_y) nothrow {
37420 gtk_tree_view_scroll_to_point(&this, tree_x, tree_y);
37423 // Sets a user function for determining where a column may be dropped when
37424 // dragged. This function is called on every column pair in turn at the
37425 // beginning of a column drag to determine where a drop can take place. The
37426 // arguments passed to @func are: the @tree_view, the #GtkTreeViewColumn being
37427 // dragged, the two #GtkTreeViewColumn s determining the drop spot, and
37428 // @user_data. If either of the #GtkTreeViewColumn arguments for the drop spot
37429 // are %NULL, then they indicate an edge. If @func is set to be %NULL, then
37430 // @tree_view reverts to the default behavior of allowing all columns to be
37431 // dropped everywhere.
37432 // <func>: A function to determine which columns are reorderable, or %NULL.
37433 // <user_data>: User data to be passed to @func, or %NULL
37434 // <destroy>: Destroy notifier for @user_data, or %NULL
37435 void set_column_drag_function(AT0)(TreeViewColumnDropFunc func=null, AT0 /*void*/ user_data=null, GLib2.DestroyNotify destroy=null) nothrow {
37436 gtk_tree_view_set_column_drag_function(&this, func, UpCast!(void*)(user_data), destroy);
37439 // Sets the current keyboard focus to be at @path, and selects it. This is
37440 // useful when you want to focus the user's attention on a particular row. If
37441 // @focus_column is not %NULL, then focus is given to the column specified by
37442 // it. Additionally, if @focus_column is specified, and @start_editing is
37443 // %TRUE, then editing should be started in the specified cell.
37444 // This function is often followed by @gtk_widget_grab_focus (@tree_view)
37445 // in order to give keyboard focus to the widget. Please note that editing
37446 // can only happen when the widget is realized.
37448 // If @path is invalid for @model, the current cursor (if any) will be unset
37449 // and the function will return without failing.
37450 // <path>: A #GtkTreePath
37451 // <focus_column>: A #GtkTreeViewColumn, or %NULL
37452 // <start_editing>: %TRUE if the specified cell should start being edited.
37453 void set_cursor(AT0, AT1)(AT0 /*TreePath*/ path, AT1 /*TreeViewColumn*/ focus_column, int start_editing) nothrow {
37454 gtk_tree_view_set_cursor(&this, UpCast!(TreePath*)(path), UpCast!(TreeViewColumn*)(focus_column), start_editing);
37457 // VERSION: 2.2
37458 // Sets the current keyboard focus to be at @path, and selects it. This is
37459 // useful when you want to focus the user's attention on a particular row. If
37460 // @focus_column is not %NULL, then focus is given to the column specified by
37461 // it. If @focus_column and @focus_cell are not %NULL, and @focus_column
37462 // contains 2 or more editable or activatable cells, then focus is given to
37463 // the cell specified by @focus_cell. Additionally, if @focus_column is
37464 // specified, and @start_editing is %TRUE, then editing should be started in
37465 // the specified cell. This function is often followed by
37466 // @gtk_widget_grab_focus (@tree_view) in order to give keyboard focus to the
37467 // widget. Please note that editing can only happen when the widget is
37468 // realized.
37470 // If @path is invalid for @model, the current cursor (if any) will be unset
37471 // and the function will return without failing.
37472 // <path>: A #GtkTreePath
37473 // <focus_column>: A #GtkTreeViewColumn, or %NULL
37474 // <focus_cell>: A #GtkCellRenderer, or %NULL
37475 // <start_editing>: %TRUE if the specified cell should start being edited.
37476 void set_cursor_on_cell(AT0, AT1, AT2)(AT0 /*TreePath*/ path, AT1 /*TreeViewColumn*/ focus_column, AT2 /*CellRenderer*/ focus_cell, int start_editing) nothrow {
37477 gtk_tree_view_set_cursor_on_cell(&this, UpCast!(TreePath*)(path), UpCast!(TreeViewColumn*)(focus_column), UpCast!(CellRenderer*)(focus_cell), start_editing);
37480 // This function should almost never be used. It is meant for private use by
37481 // ATK for determining the number of visible children that are removed when the
37482 // user collapses a row, or a row is deleted.
37483 // <func>: Function to be called when a view row is destroyed, or %NULL
37484 // <data>: User data to be passed to @func, or %NULL
37485 // <destroy>: Destroy notifier for @data, or %NULL
37486 void set_destroy_count_func(AT0)(TreeDestroyCountFunc func=null, AT0 /*void*/ data=null, GLib2.DestroyNotify destroy=null) nothrow {
37487 gtk_tree_view_set_destroy_count_func(&this, func, UpCast!(void*)(data), destroy);
37490 // Sets the row that is highlighted for feedback.
37491 // <path>: The path of the row to highlight, or %NULL.
37492 // <pos>: Specifies whether to drop before, after or into the row
37493 void set_drag_dest_row(AT0)(AT0 /*TreePath*/ path, TreeViewDropPosition pos) nothrow {
37494 gtk_tree_view_set_drag_dest_row(&this, UpCast!(TreePath*)(path), pos);
37497 // If @enable_search is set, then the user can type in text to search through
37498 // the tree interactively (this is sometimes called "typeahead find").
37500 // Note that even if this is %FALSE, the user can still initiate a search
37501 // using the "start-interactive-search" key binding.
37502 // <enable_search>: %TRUE, if the user can search interactively
37503 void set_enable_search()(int enable_search) nothrow {
37504 gtk_tree_view_set_enable_search(&this, enable_search);
37507 // VERSION: 2.10
37508 // Sets whether to draw lines interconnecting the expanders in @tree_view.
37509 // This does not have any visible effects for lists.
37510 // <enabled>: %TRUE to enable tree line drawing, %FALSE otherwise.
37511 void set_enable_tree_lines()(int enabled) nothrow {
37512 gtk_tree_view_set_enable_tree_lines(&this, enabled);
37515 // Sets the column to draw the expander arrow at. It must be in @tree_view.
37516 // If @column is %NULL, then the expander arrow is always at the first
37517 // visible column.
37519 // If you do not want expander arrow to appear in your tree, set the
37520 // expander column to a hidden column.
37521 // <column>: %NULL, or the column to draw the expander arrow at.
37522 void set_expander_column(AT0)(AT0 /*TreeViewColumn*/ column) nothrow {
37523 gtk_tree_view_set_expander_column(&this, UpCast!(TreeViewColumn*)(column));
37526 // VERSION: 2.6
37527 // Enables or disables the fixed height mode of @tree_view.
37528 // Fixed height mode speeds up #GtkTreeView by assuming that all
37529 // rows have the same height.
37530 // Only enable this option if all rows are the same height and all
37531 // columns are of type %GTK_TREE_VIEW_COLUMN_FIXED.
37532 // <enable>: %TRUE to enable fixed height mode
37533 void set_fixed_height_mode()(int enable) nothrow {
37534 gtk_tree_view_set_fixed_height_mode(&this, enable);
37537 // VERSION: 2.10
37538 // Sets which grid lines to draw in @tree_view.
37539 // <grid_lines>: a #GtkTreeViewGridLines value indicating which grid lines to enable.
37540 void set_grid_lines()(TreeViewGridLines grid_lines) nothrow {
37541 gtk_tree_view_set_grid_lines(&this, grid_lines);
37544 // Sets the #GtkAdjustment for the current horizontal aspect.
37545 // <adjustment>: The #GtkAdjustment to set, or %NULL
37546 void set_hadjustment(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
37547 gtk_tree_view_set_hadjustment(&this, UpCast!(Adjustment*)(adjustment));
37550 // Allow the column title buttons to be clicked.
37551 // <setting>: %TRUE if the columns are clickable.
37552 void set_headers_clickable()(int setting) nothrow {
37553 gtk_tree_view_set_headers_clickable(&this, setting);
37556 // Sets the visibility state of the headers.
37557 // <headers_visible>: %TRUE if the headers are visible
37558 void set_headers_visible()(int headers_visible) nothrow {
37559 gtk_tree_view_set_headers_visible(&this, headers_visible);
37562 // VERSION: 2.6
37563 // Enables of disables the hover expansion mode of @tree_view.
37564 // Hover expansion makes rows expand or collapse if the pointer
37565 // moves over them.
37566 // <expand>: %TRUE to enable hover selection mode
37567 void set_hover_expand()(int expand) nothrow {
37568 gtk_tree_view_set_hover_expand(&this, expand);
37571 // VERSION: 2.6
37572 // Enables of disables the hover selection mode of @tree_view.
37573 // Hover selection makes the selected row follow the pointer.
37574 // Currently, this works only for the selection modes
37575 // %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
37576 // <hover>: %TRUE to enable hover selection mode
37577 void set_hover_selection()(int hover) nothrow {
37578 gtk_tree_view_set_hover_selection(&this, hover);
37581 // VERSION: 2.12
37582 // Sets the amount of extra indentation for child levels to use in @tree_view
37583 // in addition to the default indentation. The value should be specified in
37584 // pixels, a value of 0 disables this feature and in this case only the default
37585 // indentation will be used.
37586 // This does not have any visible effects for lists.
37587 // <indentation>: the amount, in pixels, of extra indentation in @tree_view.
37588 void set_level_indentation()(int indentation) nothrow {
37589 gtk_tree_view_set_level_indentation(&this, indentation);
37592 // Sets the model for a #GtkTreeView. If the @tree_view already has a model
37593 // set, it will remove it before setting the new model. If @model is %NULL,
37594 // then it will unset the old model.
37595 // <model>: The model.
37596 void set_model(AT0)(AT0 /*TreeModel*/ model=null) nothrow {
37597 gtk_tree_view_set_model(&this, UpCast!(TreeModel*)(model));
37600 // This function is a convenience function to allow you to reorder
37601 // models that support the #GtkDragSourceIface and the
37602 // #GtkDragDestIface. Both #GtkTreeStore and #GtkListStore support
37603 // these. If @reorderable is %TRUE, then the user can reorder the
37604 // model by dragging and dropping rows. The developer can listen to
37605 // these changes by connecting to the model's row_inserted and
37606 // row_deleted signals. The reordering is implemented by setting up
37607 // the tree view as a drag source and destination. Therefore, drag and
37608 // drop can not be used in a reorderable view for any other purpose.
37610 // This function does not give you any degree of control over the order -- any
37611 // reordering is allowed. If more control is needed, you should probably
37612 // handle drag and drop manually.
37613 // <reorderable>: %TRUE, if the tree can be reordered.
37614 void set_reorderable()(int reorderable) nothrow {
37615 gtk_tree_view_set_reorderable(&this, reorderable);
37618 // VERSION: 2.6
37619 // Sets the row separator function, which is used to determine
37620 // whether a row should be drawn as a separator. If the row separator
37621 // function is %NULL, no separators are drawn. This is the default value.
37622 // <func>: a #GtkTreeViewRowSeparatorFunc
37623 // <data>: user data to pass to @func, or %NULL
37624 // <destroy>: destroy notifier for @data, or %NULL
37625 void set_row_separator_func(AT0)(TreeViewRowSeparatorFunc func, AT0 /*void*/ data=null, GLib2.DestroyNotify destroy=null) nothrow {
37626 gtk_tree_view_set_row_separator_func(&this, func, UpCast!(void*)(data), destroy);
37629 // VERSION: 2.10
37630 // Enables or disables rubber banding in @tree_view. If the selection mode
37631 // is #GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
37632 // multiple rows by dragging the mouse.
37633 // <enable>: %TRUE to enable rubber banding
37634 void set_rubber_banding()(int enable) nothrow {
37635 gtk_tree_view_set_rubber_banding(&this, enable);
37638 // This function tells GTK+ that the user interface for your
37639 // application requires users to read across tree rows and associate
37640 // cells with one another. By default, GTK+ will then render the tree
37641 // with alternating row colors. Do <emphasis>not</emphasis> use it
37642 // just because you prefer the appearance of the ruled tree; that's a
37643 // question for the theme. Some themes will draw tree rows in
37644 // alternating colors even when rules are turned off, and users who
37645 // prefer that appearance all the time can choose those themes. You
37646 // should call this function only as a <emphasis>semantic</emphasis>
37647 // hint to the theme engine that your tree makes alternating colors
37648 // useful from a functional standpoint (since it has lots of columns,
37649 // generally).
37650 // <setting>: %TRUE if the tree requires reading across rows
37651 void set_rules_hint()(int setting) nothrow {
37652 gtk_tree_view_set_rules_hint(&this, setting);
37655 // Sets @column as the column where the interactive search code should
37656 // search in for the current model.
37658 // If the search column is set, users can use the "start-interactive-search"
37659 // key binding to bring up search popup. The enable-search property controls
37660 // whether simply typing text will also start an interactive search.
37662 // Note that @column refers to a column of the current model. The search
37663 // column is reset to -1 when the model is changed.
37664 // <column>: the column of the model to search in, or -1 to disable searching
37665 void set_search_column()(int column) nothrow {
37666 gtk_tree_view_set_search_column(&this, column);
37669 // VERSION: 2.10
37670 // Sets the entry which the interactive search code will use for this
37671 // @tree_view. This is useful when you want to provide a search entry
37672 // in our interface at all time at a fixed position. Passing %NULL for
37673 // @entry will make the interactive search code use the built-in popup
37674 // entry again.
37675 // <entry>: the entry the interactive search code of @tree_view should use or %NULL
37676 void set_search_entry(AT0)(AT0 /*Entry*/ entry=null) nothrow {
37677 gtk_tree_view_set_search_entry(&this, UpCast!(Entry*)(entry));
37680 // Sets the compare function for the interactive search capabilities; note
37681 // that somewhat like strcmp() returning 0 for equality
37682 // #GtkTreeViewSearchEqualFunc returns %FALSE on matches.
37683 // <search_equal_func>: the compare function to use during the search
37684 // <search_user_data>: user data to pass to @search_equal_func, or %NULL
37685 // <search_destroy>: Destroy notifier for @search_user_data, or %NULL
37686 void set_search_equal_func(AT0)(TreeViewSearchEqualFunc search_equal_func, AT0 /*void*/ search_user_data=null, GLib2.DestroyNotify search_destroy=null) nothrow {
37687 gtk_tree_view_set_search_equal_func(&this, search_equal_func, UpCast!(void*)(search_user_data), search_destroy);
37690 // VERSION: 2.10
37691 // Sets the function to use when positioning the search dialog.
37692 // <func>: the function to use to position the search dialog, or %NULL to use the default search position function
37693 // <data>: user data to pass to @func, or %NULL
37694 // <destroy>: Destroy notifier for @data, or %NULL
37695 void set_search_position_func(AT0)(TreeViewSearchPositionFunc func=null, AT0 /*void*/ data=null, GLib2.DestroyNotify destroy=null) nothrow {
37696 gtk_tree_view_set_search_position_func(&this, func, UpCast!(void*)(data), destroy);
37699 // VERSION: 2.12
37700 // Sets whether to draw and enable expanders and indent child rows in
37701 // @tree_view. When disabled there will be no expanders visible in trees
37702 // and there will be no way to expand and collapse rows by default. Also
37703 // note that hiding the expanders will disable the default indentation. You
37704 // can set a custom indentation in this case using
37705 // gtk_tree_view_set_level_indentation().
37706 // This does not have any visible effects for lists.
37707 // <enabled>: %TRUE to enable expander drawing, %FALSE otherwise.
37708 void set_show_expanders()(int enabled) nothrow {
37709 gtk_tree_view_set_show_expanders(&this, enabled);
37712 // VERSION: 2.12
37713 // Sets the tip area of @tooltip to the area @path, @column and @cell have
37714 // in common. For example if @path is %NULL and @column is set, the tip
37715 // area will be set to the full area covered by @column. See also
37716 // gtk_tooltip_set_tip_area().
37718 // Note that if @path is not specified and @cell is set and part of a column
37719 // containing the expander, the tooltip might not show and hide at the correct
37720 // position. In such cases @path must be set to the current node under the
37721 // mouse cursor for this function to operate correctly.
37723 // See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
37724 // <tooltip>: a #GtkTooltip
37725 // <path>: a #GtkTreePath or %NULL
37726 // <column>: a #GtkTreeViewColumn or %NULL
37727 // <cell>: a #GtkCellRenderer or %NULL
37728 void set_tooltip_cell(AT0, AT1, AT2, AT3)(AT0 /*Tooltip*/ tooltip, AT1 /*TreePath*/ path=null, AT2 /*TreeViewColumn*/ column=null, AT3 /*CellRenderer*/ cell=null) nothrow {
37729 gtk_tree_view_set_tooltip_cell(&this, UpCast!(Tooltip*)(tooltip), UpCast!(TreePath*)(path), UpCast!(TreeViewColumn*)(column), UpCast!(CellRenderer*)(cell));
37732 // VERSION: 2.12
37733 // If you only plan to have simple (text-only) tooltips on full rows, you
37734 // can use this function to have #GtkTreeView handle these automatically
37735 // for you. @column should be set to the column in @tree_view's model
37736 // containing the tooltip texts, or -1 to disable this feature.
37738 // When enabled, #GtkWidget::has-tooltip will be set to %TRUE and
37739 // @tree_view will connect a #GtkWidget::query-tooltip signal handler.
37741 // Note that the signal handler sets the text with gtk_tooltip_set_markup(),
37742 // so &amp;, &lt;, etc have to be escaped in the text.
37743 // <column>: an integer, which is a valid column number for @tree_view's model
37744 void set_tooltip_column()(int column) nothrow {
37745 gtk_tree_view_set_tooltip_column(&this, column);
37748 // VERSION: 2.12
37749 // Sets the tip area of @tooltip to be the area covered by the row at @path.
37750 // See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
37751 // See also gtk_tooltip_set_tip_area().
37752 // <tooltip>: a #GtkTooltip
37753 // <path>: a #GtkTreePath
37754 void set_tooltip_row(AT0, AT1)(AT0 /*Tooltip*/ tooltip, AT1 /*TreePath*/ path) nothrow {
37755 gtk_tree_view_set_tooltip_row(&this, UpCast!(Tooltip*)(tooltip), UpCast!(TreePath*)(path));
37758 // Sets the #GtkAdjustment for the current vertical aspect.
37759 // <adjustment>: The #GtkAdjustment to set, or %NULL
37760 void set_vadjustment(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
37761 gtk_tree_view_set_vadjustment(&this, UpCast!(Adjustment*)(adjustment));
37764 // DEPRECATED (v2.12) method: tree_to_widget_coords - Due to historial reasons the name of this function is
37765 // Converts tree coordinates (coordinates in full scrollable area of the tree)
37766 // to bin_window coordinates.
37768 // incorrect. For converting bin_window coordinates to coordinates relative
37769 // to bin_window, please see
37770 // gtk_tree_view_convert_bin_window_to_widget_coords().
37771 // <tx>: tree X coordinate
37772 // <ty>: tree Y coordinate
37773 // <wx>: return location for X coordinate relative to bin_window
37774 // <wy>: return location for Y coordinate relative to bin_window
37775 void tree_to_widget_coords()(int tx, int ty, int* wx, int* wy) nothrow {
37776 gtk_tree_view_tree_to_widget_coords(&this, tx, ty, wx, wy);
37779 // Undoes the effect of
37780 // gtk_tree_view_enable_model_drag_dest(). Calling this method sets
37781 // #GtkTreeView:reorderable to %FALSE.
37782 void unset_rows_drag_dest()() nothrow {
37783 gtk_tree_view_unset_rows_drag_dest(&this);
37786 // Undoes the effect of
37787 // gtk_tree_view_enable_model_drag_source(). Calling this method sets
37788 // #GtkTreeView:reorderable to %FALSE.
37789 void unset_rows_drag_source()() nothrow {
37790 gtk_tree_view_unset_rows_drag_source(&this);
37793 // DEPRECATED (v2.12) method: widget_to_tree_coords - Due to historial reasons the name of this function is
37794 // Converts bin_window coordinates to coordinates for the
37795 // tree (the full scrollable area of the tree).
37797 // incorrect. For converting coordinates relative to the widget to
37798 // bin_window coordinates, please see
37799 // gtk_tree_view_convert_widget_to_bin_window_coords().
37800 // <wx>: X coordinate relative to bin_window
37801 // <wy>: Y coordinate relative to bin_window
37802 // <tx>: return location for tree X coordinate
37803 // <ty>: return location for tree Y coordinate
37804 void widget_to_tree_coords()(int wx, int wy, int* tx, int* ty) nothrow {
37805 gtk_tree_view_widget_to_tree_coords(&this, wx, wy, tx, ty);
37807 // The number of columns of the treeview has changed.
37808 extern (C) alias static void function (TreeView* this_, void* user_data=null) nothrow signal_columns_changed;
37810 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
37811 return super_.signal_connect!name(cb, data, cf);
37814 ulong signal_connect(string name:"columns-changed", CB/*:signal_columns_changed*/)
37815 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37816 if (is(typeof(cb)==signal_columns_changed)||_ttmm!(CB, signal_columns_changed)()) {
37817 return signal_connect_data!()(&this, cast(char*)"columns-changed",
37818 cast(GObject2.Callback)cb, data, null, cf);
37820 // The position of the cursor (focused cell) has changed.
37821 extern (C) alias static void function (TreeView* this_, void* user_data=null) nothrow signal_cursor_changed;
37822 ulong signal_connect(string name:"cursor-changed", CB/*:signal_cursor_changed*/)
37823 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37824 if (is(typeof(cb)==signal_cursor_changed)||_ttmm!(CB, signal_cursor_changed)()) {
37825 return signal_connect_data!()(&this, cast(char*)"cursor-changed",
37826 cast(GObject2.Callback)cb, data, null, cf);
37828 extern (C) alias static c_int function (TreeView* this_, c_int object, c_int p0, c_int p1, void* user_data=null) nothrow signal_expand_collapse_cursor_row;
37829 ulong signal_connect(string name:"expand-collapse-cursor-row", CB/*:signal_expand_collapse_cursor_row*/)
37830 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37831 if (is(typeof(cb)==signal_expand_collapse_cursor_row)||_ttmm!(CB, signal_expand_collapse_cursor_row)()) {
37832 return signal_connect_data!()(&this, cast(char*)"expand-collapse-cursor-row",
37833 cast(GObject2.Callback)cb, data, null, cf);
37835 extern (C) alias static c_int function (TreeView* this_, MovementStep* object, int p0, void* user_data=null) nothrow signal_move_cursor;
37836 ulong signal_connect(string name:"move-cursor", CB/*:signal_move_cursor*/)
37837 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37838 if (is(typeof(cb)==signal_move_cursor)||_ttmm!(CB, signal_move_cursor)()) {
37839 return signal_connect_data!()(&this, cast(char*)"move-cursor",
37840 cast(GObject2.Callback)cb, data, null, cf);
37843 // The "row-activated" signal is emitted when the method
37844 // gtk_tree_view_row_activated() is called or the user double clicks
37845 // a treeview row. It is also emitted when a non-editable row is
37846 // selected and one of the keys: Space, Shift+Space, Return or
37847 // Enter is pressed.
37849 // For selection handling refer to the <link linkend="TreeWidget">tree
37850 // widget conceptual overview</link> as well as #GtkTreeSelection.
37851 // <path>: the #GtkTreePath for the activated row
37852 // <column>: the #GtkTreeViewColumn in which the activation occurred
37853 extern (C) alias static void function (TreeView* this_, TreePath* path, TreeViewColumn* column, void* user_data=null) nothrow signal_row_activated;
37854 ulong signal_connect(string name:"row-activated", CB/*:signal_row_activated*/)
37855 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37856 if (is(typeof(cb)==signal_row_activated)||_ttmm!(CB, signal_row_activated)()) {
37857 return signal_connect_data!()(&this, cast(char*)"row-activated",
37858 cast(GObject2.Callback)cb, data, null, cf);
37861 // The given row has been collapsed (child nodes are hidden).
37862 // <iter>: the tree iter of the collapsed row
37863 // <path>: a tree path that points to the row
37864 extern (C) alias static void function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) nothrow signal_row_collapsed;
37865 ulong signal_connect(string name:"row-collapsed", CB/*:signal_row_collapsed*/)
37866 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37867 if (is(typeof(cb)==signal_row_collapsed)||_ttmm!(CB, signal_row_collapsed)()) {
37868 return signal_connect_data!()(&this, cast(char*)"row-collapsed",
37869 cast(GObject2.Callback)cb, data, null, cf);
37872 // The given row has been expanded (child nodes are shown).
37873 // <iter>: the tree iter of the expanded row
37874 // <path>: a tree path that points to the row
37875 extern (C) alias static void function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) nothrow signal_row_expanded;
37876 ulong signal_connect(string name:"row-expanded", CB/*:signal_row_expanded*/)
37877 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37878 if (is(typeof(cb)==signal_row_expanded)||_ttmm!(CB, signal_row_expanded)()) {
37879 return signal_connect_data!()(&this, cast(char*)"row-expanded",
37880 cast(GObject2.Callback)cb, data, null, cf);
37882 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) nothrow signal_select_all;
37883 ulong signal_connect(string name:"select-all", CB/*:signal_select_all*/)
37884 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37885 if (is(typeof(cb)==signal_select_all)||_ttmm!(CB, signal_select_all)()) {
37886 return signal_connect_data!()(&this, cast(char*)"select-all",
37887 cast(GObject2.Callback)cb, data, null, cf);
37889 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) nothrow signal_select_cursor_parent;
37890 ulong signal_connect(string name:"select-cursor-parent", CB/*:signal_select_cursor_parent*/)
37891 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37892 if (is(typeof(cb)==signal_select_cursor_parent)||_ttmm!(CB, signal_select_cursor_parent)()) {
37893 return signal_connect_data!()(&this, cast(char*)"select-cursor-parent",
37894 cast(GObject2.Callback)cb, data, null, cf);
37896 extern (C) alias static c_int function (TreeView* this_, c_int object, void* user_data=null) nothrow signal_select_cursor_row;
37897 ulong signal_connect(string name:"select-cursor-row", CB/*:signal_select_cursor_row*/)
37898 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37899 if (is(typeof(cb)==signal_select_cursor_row)||_ttmm!(CB, signal_select_cursor_row)()) {
37900 return signal_connect_data!()(&this, cast(char*)"select-cursor-row",
37901 cast(GObject2.Callback)cb, data, null, cf);
37904 // Set the scroll adjustments for the tree view. Usually scrolled containers
37905 // like #GtkScrolledWindow will emit this signal to connect two instances
37906 // of #GtkScrollbar to the scroll directions of the #GtkTreeView.
37907 extern (C) alias static void function (TreeView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) nothrow signal_set_scroll_adjustments;
37908 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)
37909 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37910 if (is(typeof(cb)==signal_set_scroll_adjustments)||_ttmm!(CB, signal_set_scroll_adjustments)()) {
37911 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
37912 cast(GObject2.Callback)cb, data, null, cf);
37914 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) nothrow signal_start_interactive_search;
37915 ulong signal_connect(string name:"start-interactive-search", CB/*:signal_start_interactive_search*/)
37916 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37917 if (is(typeof(cb)==signal_start_interactive_search)||_ttmm!(CB, signal_start_interactive_search)()) {
37918 return signal_connect_data!()(&this, cast(char*)"start-interactive-search",
37919 cast(GObject2.Callback)cb, data, null, cf);
37922 // The given row is about to be collapsed (hide its children nodes). Use this
37923 // signal if you need to control the collapsibility of individual rows.
37924 // RETURNS: %FALSE to allow collapsing, %TRUE to reject
37925 // <iter>: the tree iter of the row to collapse
37926 // <path>: a tree path that points to the row
37927 extern (C) alias static c_int function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) nothrow signal_test_collapse_row;
37928 ulong signal_connect(string name:"test-collapse-row", CB/*:signal_test_collapse_row*/)
37929 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37930 if (is(typeof(cb)==signal_test_collapse_row)||_ttmm!(CB, signal_test_collapse_row)()) {
37931 return signal_connect_data!()(&this, cast(char*)"test-collapse-row",
37932 cast(GObject2.Callback)cb, data, null, cf);
37935 // The given row is about to be expanded (show its children nodes). Use this
37936 // signal if you need to control the expandability of individual rows.
37937 // RETURNS: %FALSE to allow expansion, %TRUE to reject
37938 // <iter>: the tree iter of the row to expand
37939 // <path>: a tree path that points to the row
37940 extern (C) alias static c_int function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) nothrow signal_test_expand_row;
37941 ulong signal_connect(string name:"test-expand-row", CB/*:signal_test_expand_row*/)
37942 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37943 if (is(typeof(cb)==signal_test_expand_row)||_ttmm!(CB, signal_test_expand_row)()) {
37944 return signal_connect_data!()(&this, cast(char*)"test-expand-row",
37945 cast(GObject2.Callback)cb, data, null, cf);
37947 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) nothrow signal_toggle_cursor_row;
37948 ulong signal_connect(string name:"toggle-cursor-row", CB/*:signal_toggle_cursor_row*/)
37949 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37950 if (is(typeof(cb)==signal_toggle_cursor_row)||_ttmm!(CB, signal_toggle_cursor_row)()) {
37951 return signal_connect_data!()(&this, cast(char*)"toggle-cursor-row",
37952 cast(GObject2.Callback)cb, data, null, cf);
37954 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) nothrow signal_unselect_all;
37955 ulong signal_connect(string name:"unselect-all", CB/*:signal_unselect_all*/)
37956 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
37957 if (is(typeof(cb)==signal_unselect_all)||_ttmm!(CB, signal_unselect_all)()) {
37958 return signal_connect_data!()(&this, cast(char*)"unselect-all",
37959 cast(GObject2.Callback)cb, data, null, cf);
37963 struct TreeViewClass {
37964 ContainerClass parent_class;
37965 extern (C) void function (TreeView* tree_view, Adjustment* hadjustment, Adjustment* vadjustment) nothrow set_scroll_adjustments;
37967 // <path>: The #GtkTreePath to be activated.
37968 // <column>: The #GtkTreeViewColumn to be activated.
37969 extern (C) void function (TreeView* tree_view, TreePath* path, TreeViewColumn* column) nothrow row_activated;
37970 extern (C) int function (TreeView* tree_view, TreeIter* iter, TreePath* path) nothrow test_expand_row;
37971 extern (C) int function (TreeView* tree_view, TreeIter* iter, TreePath* path) nothrow test_collapse_row;
37972 extern (C) void function (TreeView* tree_view, TreeIter* iter, TreePath* path) nothrow row_expanded;
37973 extern (C) void function (TreeView* tree_view, TreeIter* iter, TreePath* path) nothrow row_collapsed;
37974 extern (C) void function (TreeView* tree_view) nothrow columns_changed;
37975 extern (C) void function (TreeView* tree_view) nothrow cursor_changed;
37976 extern (C) int function (TreeView* tree_view, MovementStep step, int count) nothrow move_cursor;
37977 extern (C) int function (TreeView* tree_view) nothrow select_all;
37978 extern (C) int function (TreeView* tree_view) nothrow unselect_all;
37979 extern (C) int function (TreeView* tree_view, int start_editing) nothrow select_cursor_row;
37980 extern (C) int function (TreeView* tree_view) nothrow toggle_cursor_row;
37981 extern (C) int function (TreeView* tree_view, int logical, int expand, int open_all) nothrow expand_collapse_cursor_row;
37982 extern (C) int function (TreeView* tree_view) nothrow select_cursor_parent;
37983 extern (C) int function (TreeView* tree_view) nothrow start_interactive_search;
37984 extern (C) void function () nothrow _gtk_reserved0;
37985 extern (C) void function () nothrow _gtk_reserved1;
37986 extern (C) void function () nothrow _gtk_reserved2;
37987 extern (C) void function () nothrow _gtk_reserved3;
37988 extern (C) void function () nothrow _gtk_reserved4;
37991 struct TreeViewColumn /* : Object */ {
37992 mixin Buildable.__interface__;
37993 mixin CellLayout.__interface__;
37994 alias parent this;
37995 alias parent super_;
37996 alias parent object;
37997 Object parent;
37998 Widget* tree_view, button, child, arrow, alignment;
37999 Gdk2.Window* window;
38000 CellEditable* editable_widget;
38001 float xalign;
38002 uint property_changed_signal;
38003 int spacing;
38004 TreeViewColumnSizing column_type;
38005 int requested_width, button_request, resized_width, width, fixed_width, min_width, max_width, drag_x, drag_y;
38006 char* title;
38007 GLib2.List* cell_list;
38008 uint sort_clicked_signal, sort_column_changed_signal;
38009 int sort_column_id;
38010 SortType sort_order;
38011 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
38012 uint, "visible", 1,
38013 uint, "resizable", 1,
38014 uint, "clickable", 1,
38015 uint, "dirty", 1,
38016 uint, "show_sort_indicator", 1,
38017 uint, "maybe_reordered", 1,
38018 uint, "reorderable", 1,
38019 uint, "use_resized_width", 1,
38020 uint, "expand", 1,
38021 uint, "__dummy32A", 23));
38024 // Creates a new #GtkTreeViewColumn.
38025 // RETURNS: A newly created #GtkTreeViewColumn.
38026 static TreeViewColumn* new_()() nothrow {
38027 return gtk_tree_view_column_new();
38029 static auto opCall()() {
38030 return gtk_tree_view_column_new();
38033 // Unintrospectable constructor: new_with_attributes() / gtk_tree_view_column_new_with_attributes()
38034 // Creates a new #GtkTreeViewColumn with a number of default values. This is
38035 // equivalent to calling gtk_tree_view_column_set_title(),
38036 // gtk_tree_view_column_pack_start(), and
38037 // gtk_tree_view_column_set_attributes() on the newly created #GtkTreeViewColumn.
38039 // Here's a simple example:
38040 // |[
38041 // enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS };
38042 // ...
38043 // {
38044 // GtkTreeViewColumn *column;
38045 // GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
38047 // column = gtk_tree_view_column_new_with_attributes ("Title",
38048 // renderer,
38049 // "text", TEXT_COLUMN,
38050 // "foreground", COLOR_COLUMN,
38051 // NULL);
38052 // }
38053 // ]|
38054 // RETURNS: A newly created #GtkTreeViewColumn.
38055 // <title>: The title to set the header to.
38056 // <cell>: The #GtkCellRenderer.
38057 alias gtk_tree_view_column_new_with_attributes new_with_attributes; // Variadic
38059 // Adds an attribute mapping to the list in @tree_column. The @column is the
38060 // column of the model to get a value from, and the @attribute is the
38061 // parameter on @cell_renderer to be set from the value. So for example
38062 // if column 2 of the model contains strings, you could have the
38063 // "text" attribute of a #GtkCellRendererText get its values from
38064 // column 2.
38065 // <cell_renderer>: the #GtkCellRenderer to set attributes on
38066 // <attribute>: An attribute on the renderer
38067 // <column>: The column position on the model to get the attribute from.
38068 void add_attribute(AT0, AT1)(AT0 /*CellRenderer*/ cell_renderer, AT1 /*char*/ attribute, int column) nothrow {
38069 gtk_tree_view_column_add_attribute(&this, UpCast!(CellRenderer*)(cell_renderer), toCString!(char*)(attribute), column);
38072 // Obtains the horizontal position and size of a cell in a column. If the
38073 // cell is not found in the column, @start_pos and @width are not changed and
38074 // %FALSE is returned.
38075 // RETURNS: %TRUE if @cell belongs to @tree_column.
38076 // <cell_renderer>: a #GtkCellRenderer
38077 // <start_pos>: return location for the horizontal position of @cell within @tree_column, may be %NULL
38078 // <width>: return location for the width of @cell, may be %NULL
38079 int cell_get_position(AT0)(AT0 /*CellRenderer*/ cell_renderer, int* start_pos, int* width) nothrow {
38080 return gtk_tree_view_column_cell_get_position(&this, UpCast!(CellRenderer*)(cell_renderer), start_pos, width);
38083 // Obtains the width and height needed to render the column. This is used
38084 // primarily by the #GtkTreeView.
38085 // <cell_area>: The area a cell in the column will be allocated, or %NULL
38086 // <x_offset>: location to return x offset of a cell relative to @cell_area, or %NULL
38087 // <y_offset>: location to return y offset of a cell relative to @cell_area, or %NULL
38088 // <width>: location to return width needed to render a cell, or %NULL
38089 // <height>: location to return height needed to render a cell, or %NULL
38090 void cell_get_size(AT0)(AT0 /*Gdk2.Rectangle*/ cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) nothrow {
38091 gtk_tree_view_column_cell_get_size(&this, UpCast!(Gdk2.Rectangle*)(cell_area), x_offset, y_offset, width, height);
38094 // Returns %TRUE if any of the cells packed into the @tree_column are visible.
38095 // For this to be meaningful, you must first initialize the cells with
38096 // gtk_tree_view_column_cell_set_cell_data()
38097 // RETURNS: %TRUE, if any of the cells packed into the @tree_column are currently visible
38098 int cell_is_visible()() nothrow {
38099 return gtk_tree_view_column_cell_is_visible(&this);
38102 // Sets the cell renderer based on the @tree_model and @iter. That is, for
38103 // every attribute mapping in @tree_column, it will get a value from the set
38104 // column on the @iter, and use that value to set the attribute on the cell
38105 // renderer. This is used primarily by the #GtkTreeView.
38106 // <tree_model>: The #GtkTreeModel to to get the cell renderers attributes from.
38107 // <iter>: The #GtkTreeIter to to get the cell renderer's attributes from.
38108 // <is_expander>: %TRUE, if the row has children
38109 // <is_expanded>: %TRUE, if the row has visible children
38110 void cell_set_cell_data(AT0, AT1)(AT0 /*TreeModel*/ tree_model, AT1 /*TreeIter*/ iter, int is_expander, int is_expanded) nothrow {
38111 gtk_tree_view_column_cell_set_cell_data(&this, UpCast!(TreeModel*)(tree_model), UpCast!(TreeIter*)(iter), is_expander, is_expanded);
38113 // Unsets all the mappings on all renderers on the @tree_column.
38114 void clear()() nothrow {
38115 gtk_tree_view_column_clear(&this);
38118 // Clears all existing attributes previously set with
38119 // gtk_tree_view_column_set_attributes().
38120 // <cell_renderer>: a #GtkCellRenderer to clear the attribute mapping on.
38121 void clear_attributes(AT0)(AT0 /*CellRenderer*/ cell_renderer) nothrow {
38122 gtk_tree_view_column_clear_attributes(&this, UpCast!(CellRenderer*)(cell_renderer));
38125 // Emits the "clicked" signal on the column. This function will only work if
38126 // @tree_column is clickable.
38127 void clicked()() nothrow {
38128 gtk_tree_view_column_clicked(&this);
38131 // VERSION: 2.2
38132 // Sets the current keyboard focus to be at @cell, if the column contains
38133 // 2 or more editable and activatable cells.
38134 // <cell>: A #GtkCellRenderer
38135 void focus_cell(AT0)(AT0 /*CellRenderer*/ cell) nothrow {
38136 gtk_tree_view_column_focus_cell(&this, UpCast!(CellRenderer*)(cell));
38139 // Returns the current x alignment of @tree_column. This value can range
38140 // between 0.0 and 1.0.
38141 // RETURNS: The current alignent of @tree_column.
38142 float get_alignment()() nothrow {
38143 return gtk_tree_view_column_get_alignment(&this);
38146 // Unintrospectable method: get_cell_renderers() / gtk_tree_view_column_get_cell_renderers()
38147 // DEPRECATED (v2.18) method: get_cell_renderers - use gtk_cell_layout_get_cells() instead.
38148 // Returns a newly-allocated #GList of all the cell renderers in the column,
38149 // in no particular order. The list must be freed with g_list_free().
38150 // RETURNS: A list of #GtkCellRenderers
38151 GLib2.List* get_cell_renderers()() nothrow {
38152 return gtk_tree_view_column_get_cell_renderers(&this);
38155 // Returns %TRUE if the user can click on the header for the column.
38156 // RETURNS: %TRUE if user can click the column header.
38157 int get_clickable()() nothrow {
38158 return gtk_tree_view_column_get_clickable(&this);
38161 // VERSION: 2.4
38162 // Return %TRUE if the column expands to take any available space.
38163 // RETURNS: %TRUE, if the column expands
38164 int get_expand()() nothrow {
38165 return gtk_tree_view_column_get_expand(&this);
38168 // Gets the fixed width of the column. This value is only meaning may not be
38169 // the actual width of the column on the screen, just what is requested.
38170 // RETURNS: the fixed width of the column
38171 int get_fixed_width()() nothrow {
38172 return gtk_tree_view_column_get_fixed_width(&this);
38175 // Returns the maximum width in pixels of the @tree_column, or -1 if no maximum
38176 // width is set.
38177 // RETURNS: The maximum width of the @tree_column.
38178 int get_max_width()() nothrow {
38179 return gtk_tree_view_column_get_max_width(&this);
38182 // Returns the minimum width in pixels of the @tree_column, or -1 if no minimum
38183 // width is set.
38184 // RETURNS: The minimum width of the @tree_column.
38185 int get_min_width()() nothrow {
38186 return gtk_tree_view_column_get_min_width(&this);
38189 // Returns %TRUE if the @tree_column can be reordered by the user.
38190 // RETURNS: %TRUE if the @tree_column can be reordered by the user.
38191 int get_reorderable()() nothrow {
38192 return gtk_tree_view_column_get_reorderable(&this);
38195 // Returns %TRUE if the @tree_column can be resized by the end user.
38196 // RETURNS: %TRUE, if the @tree_column can be resized.
38197 int get_resizable()() nothrow {
38198 return gtk_tree_view_column_get_resizable(&this);
38201 // Returns the current type of @tree_column.
38202 // RETURNS: The type of @tree_column.
38203 TreeViewColumnSizing get_sizing()() nothrow {
38204 return gtk_tree_view_column_get_sizing(&this);
38207 // Gets the logical @sort_column_id that the model sorts on when this
38208 // column is selected for sorting.
38209 // See gtk_tree_view_column_set_sort_column_id().
38211 // this column can't be used for sorting.
38212 // RETURNS: the current @sort_column_id for this column, or -1 if
38213 int get_sort_column_id()() nothrow {
38214 return gtk_tree_view_column_get_sort_column_id(&this);
38217 // Gets the value set by gtk_tree_view_column_set_sort_indicator().
38218 // RETURNS: whether the sort indicator arrow is displayed
38219 int get_sort_indicator()() nothrow {
38220 return gtk_tree_view_column_get_sort_indicator(&this);
38223 // Gets the value set by gtk_tree_view_column_set_sort_order().
38224 // RETURNS: the sort order the sort indicator is indicating
38225 SortType get_sort_order()() nothrow {
38226 return gtk_tree_view_column_get_sort_order(&this);
38229 // Returns the spacing of @tree_column.
38230 // RETURNS: the spacing of @tree_column.
38231 int get_spacing()() nothrow {
38232 return gtk_tree_view_column_get_spacing(&this);
38235 // Returns the title of the widget.
38237 // modified or freed.
38238 // RETURNS: the title of the column. This string should not be
38239 char* get_title()() nothrow {
38240 return gtk_tree_view_column_get_title(&this);
38243 // VERSION: 2.12
38244 // Returns the #GtkTreeView wherein @tree_column has been inserted.
38245 // If @column is currently not inserted in any tree view, %NULL is
38246 // returned.
38248 // been inserted if any, %NULL otherwise.
38249 // RETURNS: The tree view wherein @column has
38250 Widget* get_tree_view()() nothrow {
38251 return gtk_tree_view_column_get_tree_view(&this);
38254 // Returns %TRUE if @tree_column is visible.
38256 // the tree will show the column.
38257 // RETURNS: whether the column is visible or not. If it is visible, then
38258 int get_visible()() nothrow {
38259 return gtk_tree_view_column_get_visible(&this);
38262 // Returns the #GtkWidget in the button on the column header.
38263 // If a custom widget has not been set then %NULL is returned.
38265 // header, or %NULL
38266 // RETURNS: The #GtkWidget in the column
38267 Widget* get_widget()() nothrow {
38268 return gtk_tree_view_column_get_widget(&this);
38271 // Returns the current size of @tree_column in pixels.
38272 // RETURNS: The current width of @tree_column.
38273 int get_width()() nothrow {
38274 return gtk_tree_view_column_get_width(&this);
38277 // Adds the @cell to end of the column. If @expand is %FALSE, then the @cell
38278 // is allocated no more space than it needs. Any unused space is divided
38279 // evenly between cells for which @expand is %TRUE.
38280 // <cell>: The #GtkCellRenderer.
38281 // <expand>: %TRUE if @cell is to be given extra space allocated to @tree_column.
38282 void pack_end(AT0)(AT0 /*CellRenderer*/ cell, int expand) nothrow {
38283 gtk_tree_view_column_pack_end(&this, UpCast!(CellRenderer*)(cell), expand);
38286 // Packs the @cell into the beginning of the column. If @expand is %FALSE, then
38287 // the @cell is allocated no more space than it needs. Any unused space is divided
38288 // evenly between cells for which @expand is %TRUE.
38289 // <cell>: The #GtkCellRenderer.
38290 // <expand>: %TRUE if @cell is to be given extra space allocated to @tree_column.
38291 void pack_start(AT0)(AT0 /*CellRenderer*/ cell, int expand) nothrow {
38292 gtk_tree_view_column_pack_start(&this, UpCast!(CellRenderer*)(cell), expand);
38295 // VERSION: 2.8
38296 // Flags the column, and the cell renderers added to this column, to have
38297 // their sizes renegotiated.
38298 void queue_resize()() nothrow {
38299 gtk_tree_view_column_queue_resize(&this);
38302 // Sets the alignment of the title or custom widget inside the column header.
38303 // The alignment determines its location inside the button -- 0.0 for left, 0.5
38304 // for center, 1.0 for right.
38305 // <xalign>: The alignment, which is between [0.0 and 1.0] inclusive.
38306 void set_alignment()(float xalign) nothrow {
38307 gtk_tree_view_column_set_alignment(&this, xalign);
38310 // Unintrospectable method: set_attributes() / gtk_tree_view_column_set_attributes()
38311 // Sets the attributes in the list as the attributes of @tree_column.
38312 // The attributes should be in attribute/column order, as in
38313 // gtk_tree_view_column_add_attribute(). All existing attributes
38314 // are removed, and replaced with the new attributes.
38315 // <cell_renderer>: the #GtkCellRenderer we're setting the attributes of
38316 /+ Not available -- variadic methods unsupported - use the C function directly.
38317 alias gtk_tree_view_column_set_attributes set_attributes; // Variadic
38320 // Sets the #GtkTreeViewColumnFunc to use for the column. This
38321 // function is used instead of the standard attributes mapping for
38322 // setting the column value, and should set the value of @tree_column's
38323 // cell renderer as appropriate. @func may be %NULL to remove an
38324 // older one.
38325 // <cell_renderer>: A #GtkCellRenderer
38326 // <func>: The #GtkTreeViewColumnFunc to use.
38327 // <func_data>: The user data for @func.
38328 // <destroy>: The destroy notification for @func_data
38329 void set_cell_data_func(AT0, AT1)(AT0 /*CellRenderer*/ cell_renderer, TreeCellDataFunc func, AT1 /*void*/ func_data, GLib2.DestroyNotify destroy) nothrow {
38330 gtk_tree_view_column_set_cell_data_func(&this, UpCast!(CellRenderer*)(cell_renderer), func, UpCast!(void*)(func_data), destroy);
38333 // Sets the header to be active if @active is %TRUE. When the header is active,
38334 // then it can take keyboard focus, and can be clicked.
38335 // <clickable>: %TRUE if the header is active.
38336 void set_clickable()(int clickable) nothrow {
38337 gtk_tree_view_column_set_clickable(&this, clickable);
38340 // VERSION: 2.4
38341 // Sets the column to take available extra space. This space is shared equally
38342 // amongst all columns that have the expand set to %TRUE. If no column has this
38343 // option set, then the last column gets all extra space. By default, every
38344 // column is created with this %FALSE.
38345 // <expand>: %TRUE if the column should take available extra space, %FALSE if not
38346 void set_expand()(int expand) nothrow {
38347 gtk_tree_view_column_set_expand(&this, expand);
38350 // Sets the size of the column in pixels. This is meaningful only if the sizing
38351 // type is #GTK_TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
38352 // the min/max width for the column. Please note that the min/max width of the
38353 // column doesn't actually affect the "fixed_width" property of the widget, just
38354 // the actual size when displayed.
38355 // <fixed_width>: The size to set @tree_column to. Must be greater than 0.
38356 void set_fixed_width()(int fixed_width) nothrow {
38357 gtk_tree_view_column_set_fixed_width(&this, fixed_width);
38360 // Sets the maximum width of the @tree_column. If @max_width is -1, then the
38361 // maximum width is unset. Note, the column can actually be wider than max
38362 // width if it's the last column in a view. In this case, the column expands to
38363 // fill any extra space.
38364 // <max_width>: The maximum width of the column in pixels, or -1.
38365 void set_max_width()(int max_width) nothrow {
38366 gtk_tree_view_column_set_max_width(&this, max_width);
38369 // Sets the minimum width of the @tree_column. If @min_width is -1, then the
38370 // minimum width is unset.
38371 // <min_width>: The minimum width of the column in pixels, or -1.
38372 void set_min_width()(int min_width) nothrow {
38373 gtk_tree_view_column_set_min_width(&this, min_width);
38376 // If @reorderable is %TRUE, then the column can be reordered by the end user
38377 // dragging the header.
38378 // <reorderable>: %TRUE, if the column can be reordered.
38379 void set_reorderable()(int reorderable) nothrow {
38380 gtk_tree_view_column_set_reorderable(&this, reorderable);
38383 // If @resizable is %TRUE, then the user can explicitly resize the column by
38384 // grabbing the outer edge of the column button. If resizable is %TRUE and
38385 // sizing mode of the column is #GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
38386 // mode is changed to #GTK_TREE_VIEW_COLUMN_GROW_ONLY.
38387 // <resizable>: %TRUE, if the column can be resized
38388 void set_resizable()(int resizable) nothrow {
38389 gtk_tree_view_column_set_resizable(&this, resizable);
38392 // Sets the growth behavior of @tree_column to @type.
38393 // <type>: The #GtkTreeViewColumnSizing.
38394 void set_sizing()(TreeViewColumnSizing type) nothrow {
38395 gtk_tree_view_column_set_sizing(&this, type);
38398 // Sets the logical @sort_column_id that this column sorts on when this column
38399 // is selected for sorting. Doing so makes the column header clickable.
38400 // <sort_column_id>: The @sort_column_id of the model to sort on.
38401 void set_sort_column_id()(int sort_column_id) nothrow {
38402 gtk_tree_view_column_set_sort_column_id(&this, sort_column_id);
38405 // Call this function with a @setting of %TRUE to display an arrow in
38406 // the header button indicating the column is sorted. Call
38407 // gtk_tree_view_column_set_sort_order() to change the direction of
38408 // the arrow.
38409 // <setting>: %TRUE to display an indicator that the column is sorted
38410 void set_sort_indicator()(int setting) nothrow {
38411 gtk_tree_view_column_set_sort_indicator(&this, setting);
38414 // Changes the appearance of the sort indicator.
38416 // This <emphasis>does not</emphasis> actually sort the model. Use
38417 // gtk_tree_view_column_set_sort_column_id() if you want automatic sorting
38418 // support. This function is primarily for custom sorting behavior, and should
38419 // be used in conjunction with gtk_tree_sortable_set_sort_column() to do
38420 // that. For custom models, the mechanism will vary.
38422 // The sort indicator changes direction to indicate normal sort or reverse sort.
38423 // Note that you must have the sort indicator enabled to see anything when
38424 // calling this function; see gtk_tree_view_column_set_sort_indicator().
38425 // <order>: sort order that the sort indicator should indicate
38426 void set_sort_order()(SortType order) nothrow {
38427 gtk_tree_view_column_set_sort_order(&this, order);
38430 // Sets the spacing field of @tree_column, which is the number of pixels to
38431 // place between cell renderers packed into it.
38432 // <spacing>: distance between cell renderers in pixels.
38433 void set_spacing()(int spacing) nothrow {
38434 gtk_tree_view_column_set_spacing(&this, spacing);
38437 // Sets the title of the @tree_column. If a custom widget has been set, then
38438 // this value is ignored.
38439 // <title>: The title of the @tree_column.
38440 void set_title(AT0)(AT0 /*char*/ title) nothrow {
38441 gtk_tree_view_column_set_title(&this, toCString!(char*)(title));
38444 // Sets the visibility of @tree_column.
38445 // <visible>: %TRUE if the @tree_column is visible.
38446 void set_visible()(int visible) nothrow {
38447 gtk_tree_view_column_set_visible(&this, visible);
38450 // Sets the widget in the header to be @widget. If widget is %NULL, then the
38451 // header button is set with a #GtkLabel set to the title of @tree_column.
38452 // <widget>: A child #GtkWidget, or %NULL.
38453 void set_widget(AT0)(AT0 /*Widget*/ widget=null) nothrow {
38454 gtk_tree_view_column_set_widget(&this, UpCast!(Widget*)(widget));
38456 extern (C) alias static void function (TreeViewColumn* this_, void* user_data=null) nothrow signal_clicked;
38458 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38459 return super_.signal_connect!name(cb, data, cf);
38462 ulong signal_connect(string name:"clicked", CB/*:signal_clicked*/)
38463 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
38464 if (is(typeof(cb)==signal_clicked)||_ttmm!(CB, signal_clicked)()) {
38465 return signal_connect_data!()(&this, cast(char*)"clicked",
38466 cast(GObject2.Callback)cb, data, null, cf);
38470 struct TreeViewColumnClass {
38471 ObjectClass parent_class;
38472 extern (C) void function (TreeViewColumn* tree_column) nothrow clicked;
38473 extern (C) void function () nothrow _gtk_reserved1;
38474 extern (C) void function () nothrow _gtk_reserved2;
38475 extern (C) void function () nothrow _gtk_reserved3;
38476 extern (C) void function () nothrow _gtk_reserved4;
38479 extern (C) alias int function (TreeView* tree_view, TreeViewColumn* column, TreeViewColumn* prev_column, TreeViewColumn* next_column, void* data) nothrow TreeViewColumnDropFunc;
38481 enum TreeViewColumnSizing {
38482 GROW_ONLY = 0,
38483 AUTOSIZE = 1,
38484 FIXED = 2
38486 enum TreeViewDropPosition {
38487 BEFORE = 0,
38488 AFTER = 1,
38489 INTO_OR_BEFORE = 2,
38490 INTO_OR_AFTER = 3
38492 enum TreeViewGridLines {
38493 NONE = 0,
38494 HORIZONTAL = 1,
38495 VERTICAL = 2,
38496 BOTH = 3
38498 extern (C) alias void function (TreeView* tree_view, TreePath* path, void* user_data) nothrow TreeViewMappingFunc;
38500 enum TreeViewMode {
38501 LINE = 0,
38502 ITEM = 1
38504 struct TreeViewPrivate {
38507 extern (C) alias int function (TreeModel* model, TreeIter* iter, void* data) nothrow TreeViewRowSeparatorFunc;
38509 extern (C) alias int function (TreeModel* model, int column, char* key, TreeIter* iter, void* search_data) nothrow TreeViewSearchEqualFunc;
38511 extern (C) alias void function (TreeView* tree_view, Widget* search_dialog, void* user_data) nothrow TreeViewSearchPositionFunc;
38513 struct GTypeInfo {
38514 char* type_name;
38515 uint object_size, class_size;
38516 ClassInitFunc class_init_func;
38517 ObjectInitFunc object_init_func;
38518 void* reserved_1, reserved_2;
38519 ClassInitFunc base_class_init_func;
38522 struct UIManager /* : GObject.Object */ {
38523 mixin Buildable.__interface__;
38524 alias parent this;
38525 alias parent super_;
38526 alias parent object;
38527 GObject2.Object parent;
38528 private UIManagerPrivate* private_data;
38531 // VERSION: 2.4
38532 // Creates a new ui manager object.
38533 // RETURNS: a new ui manager object.
38534 static UIManager* /*new*/ new_()() nothrow {
38535 return gtk_ui_manager_new();
38537 static auto opCall()() {
38538 return gtk_ui_manager_new();
38541 // VERSION: 2.4
38542 // Adds a UI element to the current contents of @self.
38544 // If @type is %GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
38545 // separator if such an element can be inserted at the place determined by
38546 // @path. Otherwise @type must indicate an element that can be inserted at
38547 // the place determined by @path.
38549 // If @path points to a menuitem or toolitem, the new element will be inserted
38550 // before or after this item, depending on @top.
38551 // <merge_id>: the merge id for the merged UI, see gtk_ui_manager_new_merge_id()
38552 // <path>: a path
38553 // <name>: the name for the added UI element
38554 // <action>: the name of the action to be proxied, or %NULL to add a separator
38555 // <type>: the type of UI element to add.
38556 // <top>: if %TRUE, the UI element is added before its siblings, otherwise it is added after its siblings.
38557 void add_ui(AT0, AT1, AT2)(uint merge_id, AT0 /*char*/ path, AT1 /*char*/ name, AT2 /*char*/ action, UIManagerItemType type, int top) nothrow {
38558 gtk_ui_manager_add_ui(&this, merge_id, toCString!(char*)(path), toCString!(char*)(name), toCString!(char*)(action), type, top);
38561 // VERSION: 2.4
38562 // Parses a file containing a <link linkend="XML-UI">UI definition</link> and
38563 // merges it with the current contents of @self.
38565 // to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
38566 // the return value is 0.
38567 // RETURNS: The merge id for the merged UI. The merge id can be used
38568 // <filename>: the name of the file to parse
38569 uint add_ui_from_file(AT0, AT1)(AT0 /*char*/ filename, AT1 /*GLib2.Error**/ error=null) nothrow {
38570 return gtk_ui_manager_add_ui_from_file(&this, toCString!(char*)(filename), UpCast!(GLib2.Error**)(error));
38573 // VERSION: 2.4
38574 // Parses a string containing a <link linkend="XML-UI">UI definition</link> and
38575 // merges it with the current contents of @self. An enclosing &lt;ui&gt;
38576 // element is added if it is missing.
38578 // to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
38579 // the return value is 0.
38580 // RETURNS: The merge id for the merged UI. The merge id can be used
38581 // <buffer>: the string to parse
38582 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
38583 uint add_ui_from_string(AT0, AT1)(AT0 /*char*/ buffer, ssize_t length, AT1 /*GLib2.Error**/ error=null) nothrow {
38584 return gtk_ui_manager_add_ui_from_string(&this, toCString!(char*)(buffer), length, UpCast!(GLib2.Error**)(error));
38587 // VERSION: 2.4
38588 // Makes sure that all pending updates to the UI have been completed.
38590 // This may occasionally be necessary, since #GtkUIManager updates the
38591 // UI in an idle function. A typical example where this function is
38592 // useful is to enforce that the menubar and toolbar have been added to
38593 // the main window before showing it:
38594 // |[
38595 // gtk_container_add (GTK_CONTAINER (window), vbox);
38596 // g_signal_connect (merge, "add-widget",
38597 // G_CALLBACK (add_widget), vbox);
38598 // gtk_ui_manager_add_ui_from_file (merge, "my-menus");
38599 // gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
38600 // gtk_ui_manager_ensure_update (merge);
38601 // gtk_widget_show (window);
38602 // ]|
38603 void ensure_update()() nothrow {
38604 gtk_ui_manager_ensure_update(&this);
38607 // VERSION: 2.4
38608 // Returns the #GtkAccelGroup associated with @self.
38609 // RETURNS: the #GtkAccelGroup.
38610 AccelGroup* get_accel_group()() nothrow {
38611 return gtk_ui_manager_get_accel_group(&this);
38614 // VERSION: 2.4
38615 // Looks up an action by following a path. See gtk_ui_manager_get_widget()
38616 // for more information about paths.
38618 // or %NULL if no widget was found.
38619 // RETURNS: the action whose proxy widget is found by following the path,
38620 // <path>: a path
38621 Action* get_action(AT0)(AT0 /*char*/ path) nothrow {
38622 return gtk_ui_manager_get_action(&this, toCString!(char*)(path));
38625 // VERSION: 2.4
38626 // Returns the list of action groups associated with @self.
38628 // action groups. The list is owned by GTK+
38629 // and should not be modified.
38630 // RETURNS: a #GList of
38631 GLib2.List* get_action_groups()() nothrow {
38632 return gtk_ui_manager_get_action_groups(&this);
38635 // VERSION: 2.4
38636 // Returns whether menus generated by this #GtkUIManager
38637 // will have tearoff menu items.
38638 // RETURNS: whether tearoff menu items are added
38639 int get_add_tearoffs()() nothrow {
38640 return gtk_ui_manager_get_add_tearoffs(&this);
38643 // VERSION: 2.4
38644 // Obtains a list of all toplevel widgets of the requested types.
38646 // all toplevel widgets of the requested types. Free the returned list with g_slist_free().
38647 // RETURNS: a newly-allocated #GSList of
38648 // <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.
38649 GLib2.SList* /*new container*/ get_toplevels()(UIManagerItemType types) nothrow {
38650 return gtk_ui_manager_get_toplevels(&this, types);
38653 // VERSION: 2.4
38654 // Creates a <link linkend="XML-UI">UI definition</link> of the merged UI.
38656 // the merged UI.
38657 // RETURNS: A newly allocated string containing an XML representation of
38658 char* /*new*/ get_ui()() nothrow {
38659 return gtk_ui_manager_get_ui(&this);
38662 // VERSION: 2.4
38663 // Looks up a widget by following a path.
38664 // The path consists of the names specified in the XML description of the UI.
38665 // separated by '/'. Elements which don't have a name or action attribute in
38666 // the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name
38667 // (e.g. "popup"). The root element ("/ui") can be omitted in the path.
38669 // Note that the widget found by following a path that ends in a &lt;menu&gt;
38670 // element is the menuitem to which the menu is attached, not the menu itself.
38672 // Also note that the widgets constructed by a ui manager are not tied to
38673 // the lifecycle of the ui manager. If you add the widgets returned by this
38674 // function to some container or explicitly ref them, they will survive the
38675 // destruction of the ui manager.
38677 // was found.
38678 // RETURNS: the widget found by following the path, or %NULL if no widget
38679 // <path>: a path
38680 Widget* get_widget(AT0)(AT0 /*char*/ path) nothrow {
38681 return gtk_ui_manager_get_widget(&this, toCString!(char*)(path));
38684 // VERSION: 2.4
38685 // Inserts an action group into the list of action groups associated
38686 // with @self. Actions in earlier groups hide actions with the same
38687 // name in later groups.
38688 // <action_group>: the action group to be inserted
38689 // <pos>: the position at which the group will be inserted.
38690 void insert_action_group(AT0)(AT0 /*ActionGroup*/ action_group, int pos) nothrow {
38691 gtk_ui_manager_insert_action_group(&this, UpCast!(ActionGroup*)(action_group), pos);
38694 // VERSION: 2.4
38695 // Returns an unused merge id, suitable for use with
38696 // gtk_ui_manager_add_ui().
38697 // RETURNS: an unused merge id.
38698 uint new_merge_id()() nothrow {
38699 return gtk_ui_manager_new_merge_id(&this);
38702 // VERSION: 2.4
38703 // Removes an action group from the list of action groups associated
38704 // with @self.
38705 // <action_group>: the action group to be removed
38706 void remove_action_group(AT0)(AT0 /*ActionGroup*/ action_group) nothrow {
38707 gtk_ui_manager_remove_action_group(&this, UpCast!(ActionGroup*)(action_group));
38710 // VERSION: 2.4
38711 // Unmerges the part of @self<!-- -->s content identified by @merge_id.
38712 // <merge_id>: a merge id as returned by gtk_ui_manager_add_ui_from_string()
38713 void remove_ui()(uint merge_id) nothrow {
38714 gtk_ui_manager_remove_ui(&this, merge_id);
38717 // VERSION: 2.4
38718 // Sets the "add_tearoffs" property, which controls whether menus
38719 // generated by this #GtkUIManager will have tearoff menu items.
38721 // Note that this only affects regular menus. Generated popup
38722 // menus never have tearoff menu items.
38723 // <add_tearoffs>: whether tearoff menu items are added
38724 void set_add_tearoffs()(int add_tearoffs) nothrow {
38725 gtk_ui_manager_set_add_tearoffs(&this, add_tearoffs);
38728 // VERSION: 2.4
38729 // The "actions-changed" signal is emitted whenever the set of actions
38730 // changes.
38731 extern (C) alias static void function (UIManager* this_, void* user_data=null) nothrow signal_actions_changed;
38733 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38734 return super_.signal_connect!name(cb, data, cf);
38737 ulong signal_connect(string name:"actions-changed", CB/*:signal_actions_changed*/)
38738 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
38739 if (is(typeof(cb)==signal_actions_changed)||_ttmm!(CB, signal_actions_changed)()) {
38740 return signal_connect_data!()(&this, cast(char*)"actions-changed",
38741 cast(GObject2.Callback)cb, data, null, cf);
38744 // VERSION: 2.4
38745 // The add_widget signal is emitted for each generated menubar and toolbar.
38746 // It is not emitted for generated popup menus, which can be obtained by
38747 // gtk_ui_manager_get_widget().
38748 // <widget>: the added widget
38749 extern (C) alias static void function (UIManager* this_, Widget* widget, void* user_data=null) nothrow signal_add_widget;
38750 ulong signal_connect(string name:"add-widget", CB/*:signal_add_widget*/)
38751 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
38752 if (is(typeof(cb)==signal_add_widget)||_ttmm!(CB, signal_add_widget)()) {
38753 return signal_connect_data!()(&this, cast(char*)"add-widget",
38754 cast(GObject2.Callback)cb, data, null, cf);
38757 // VERSION: 2.4
38758 // The connect_proxy signal is emitted after connecting a proxy to
38759 // an action in the group.
38761 // This is intended for simple customizations for which a custom action
38762 // class would be too clumsy, e.g. showing tooltips for menuitems in the
38763 // statusbar.
38764 // <action>: the action
38765 // <proxy>: the proxy
38766 extern (C) alias static void function (UIManager* this_, Action* action, Widget* proxy, void* user_data=null) nothrow signal_connect_proxy;
38767 ulong signal_connect(string name:"connect-proxy", CB/*:signal_connect_proxy*/)
38768 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
38769 if (is(typeof(cb)==signal_connect_proxy)||_ttmm!(CB, signal_connect_proxy)()) {
38770 return signal_connect_data!()(&this, cast(char*)"connect-proxy",
38771 cast(GObject2.Callback)cb, data, null, cf);
38774 // VERSION: 2.4
38775 // The disconnect_proxy signal is emitted after disconnecting a proxy
38776 // from an action in the group.
38777 // <action>: the action
38778 // <proxy>: the proxy
38779 extern (C) alias static void function (UIManager* this_, Action* action, Widget* proxy, void* user_data=null) nothrow signal_disconnect_proxy;
38780 ulong signal_connect(string name:"disconnect-proxy", CB/*:signal_disconnect_proxy*/)
38781 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
38782 if (is(typeof(cb)==signal_disconnect_proxy)||_ttmm!(CB, signal_disconnect_proxy)()) {
38783 return signal_connect_data!()(&this, cast(char*)"disconnect-proxy",
38784 cast(GObject2.Callback)cb, data, null, cf);
38787 // VERSION: 2.4
38788 // The post_activate signal is emitted just after the @action
38789 // is activated.
38791 // This is intended for applications to get notification
38792 // just after any action is activated.
38793 // <action>: the action
38794 extern (C) alias static void function (UIManager* this_, Action* action, void* user_data=null) nothrow signal_post_activate;
38795 ulong signal_connect(string name:"post-activate", CB/*:signal_post_activate*/)
38796 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
38797 if (is(typeof(cb)==signal_post_activate)||_ttmm!(CB, signal_post_activate)()) {
38798 return signal_connect_data!()(&this, cast(char*)"post-activate",
38799 cast(GObject2.Callback)cb, data, null, cf);
38802 // VERSION: 2.4
38803 // The pre_activate signal is emitted just before the @action
38804 // is activated.
38806 // This is intended for applications to get notification
38807 // just before any action is activated.
38808 // <action>: the action
38809 extern (C) alias static void function (UIManager* this_, Action* action, void* user_data=null) nothrow signal_pre_activate;
38810 ulong signal_connect(string name:"pre-activate", CB/*:signal_pre_activate*/)
38811 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
38812 if (is(typeof(cb)==signal_pre_activate)||_ttmm!(CB, signal_pre_activate)()) {
38813 return signal_connect_data!()(&this, cast(char*)"pre-activate",
38814 cast(GObject2.Callback)cb, data, null, cf);
38818 struct UIManagerClass {
38819 GObject2.ObjectClass parent_class;
38820 extern (C) void function (UIManager* merge, Widget* widget) nothrow add_widget;
38821 extern (C) void function (UIManager* merge) nothrow actions_changed;
38822 extern (C) void function (UIManager* merge, Action* action, Widget* proxy) nothrow connect_proxy;
38823 extern (C) void function (UIManager* merge, Action* action, Widget* proxy) nothrow disconnect_proxy;
38824 extern (C) void function (UIManager* merge, Action* action) nothrow pre_activate;
38825 extern (C) void function (UIManager* merge, Action* action) nothrow post_activate;
38827 // RETURNS: the widget found by following the path, or %NULL if no widget
38828 // <path>: a path
38829 extern (C) Widget* function (UIManager* manager, char* path) nothrow get_widget;
38831 // RETURNS: the action whose proxy widget is found by following the path,
38832 // <path>: a path
38833 extern (C) Action* function (UIManager* manager, char* path) nothrow get_action;
38834 extern (C) void function () nothrow _gtk_reserved1;
38835 extern (C) void function () nothrow _gtk_reserved2;
38838 enum UIManagerItemType {
38839 AUTO = 0,
38840 MENUBAR = 1,
38841 MENU = 2,
38842 TOOLBAR = 4,
38843 PLACEHOLDER = 8,
38844 POPUP = 16,
38845 MENUITEM = 32,
38846 TOOLITEM = 64,
38847 SEPARATOR = 128,
38848 ACCELERATOR = 256,
38849 POPUP_WITH_ACCELS = 512
38851 struct UIManagerPrivate {
38854 enum Unit {
38855 PIXEL = 0,
38856 POINTS = 1,
38857 INCH = 2,
38858 MM = 3
38860 enum UpdateType {
38861 CONTINUOUS = 0,
38862 DISCONTINUOUS = 1,
38863 DELAYED = 2
38866 // A #GtkVBox is a container that organizes child widgets into a single column.
38868 // Use the #GtkBox packing interface to determine the arrangement,
38869 // spacing, height, and alignment of #GtkVBox children.
38871 // All children are allocated the same width.
38872 struct VBox /* : Box */ {
38873 mixin Atk.ImplementorIface.__interface__;
38874 mixin Buildable.__interface__;
38875 mixin Orientable.__interface__;
38876 alias box this;
38877 alias box super_;
38878 Box box;
38881 // Creates a new #GtkVBox.
38882 // RETURNS: a new #GtkVBox.
38883 // <homogeneous>: %TRUE if all children are to be given equal space allotments.
38884 // <spacing>: the number of pixels to place by default between children.
38885 static VBox* new_()(int homogeneous, int spacing) nothrow {
38886 return gtk_vbox_new(homogeneous, spacing);
38888 static auto opCall()(int homogeneous, int spacing) {
38889 return gtk_vbox_new(homogeneous, spacing);
38893 struct VBoxClass {
38894 BoxClass parent_class;
38897 struct VButtonBox /* : ButtonBox */ {
38898 mixin Atk.ImplementorIface.__interface__;
38899 mixin Buildable.__interface__;
38900 mixin Orientable.__interface__;
38901 alias button_box this;
38902 alias button_box super_;
38903 alias button_box buttonbox;
38904 ButtonBox button_box;
38907 // Creates a new vertical button box.
38908 // RETURNS: a new button box #GtkWidget.
38909 static VButtonBox* new_()() nothrow {
38910 return gtk_vbutton_box_new();
38912 static auto opCall()() {
38913 return gtk_vbutton_box_new();
38916 // DEPRECATED (v2.0) function: get_layout_default - Use gtk_button_box_get_layout() instead.
38917 // Retrieves the current layout used to arrange buttons in button box widgets.
38918 // RETURNS: the current #GtkButtonBoxStyle.
38919 static ButtonBoxStyle get_layout_default()() nothrow {
38920 return gtk_vbutton_box_get_layout_default();
38923 // DEPRECATED (v2.0) function: get_spacing_default - Use gtk_box_get_spacing() instead.
38924 // Retrieves the current default spacing for vertical button boxes. This is the number of pixels
38925 // to be placed between the buttons when they are arranged.
38926 // RETURNS: the default number of pixels between buttons.
38927 static int get_spacing_default()() nothrow {
38928 return gtk_vbutton_box_get_spacing_default();
38931 // DEPRECATED (v2.0) function: set_layout_default - Use gtk_button_box_set_layout() instead.
38932 // Sets a new layout mode that will be used by all button boxes.
38933 // <layout>: a new #GtkButtonBoxStyle.
38934 static void set_layout_default()(ButtonBoxStyle layout) nothrow {
38935 gtk_vbutton_box_set_layout_default(layout);
38938 // DEPRECATED (v2.0) function: set_spacing_default - Use gtk_box_set_spacing() instead.
38939 // Changes the default spacing that is placed between widgets in an
38940 // vertical button box.
38941 // <spacing>: an integer value.
38942 static void set_spacing_default()(int spacing) nothrow {
38943 gtk_vbutton_box_set_spacing_default(spacing);
38947 struct VButtonBoxClass {
38948 ButtonBoxClass parent_class;
38952 // The VPaned widget is a container widget with two
38953 // children arranged vertically. The division between
38954 // the two panes is adjustable by the user by dragging
38955 // a handle. See #GtkPaned for details.
38956 struct VPaned /* : Paned */ {
38957 mixin Atk.ImplementorIface.__interface__;
38958 mixin Buildable.__interface__;
38959 mixin Orientable.__interface__;
38960 alias paned this;
38961 alias paned super_;
38962 Paned paned;
38965 // Create a new #GtkVPaned
38966 // RETURNS: the new #GtkVPaned
38967 static VPaned* new_()() nothrow {
38968 return gtk_vpaned_new();
38970 static auto opCall()() {
38971 return gtk_vpaned_new();
38975 struct VPanedClass {
38976 PanedClass parent_class;
38980 // <note>
38981 // This widget is considered too specialized/little-used for
38982 // GTK+, and will be removed in GTK 3. If your application needs this widget,
38983 // feel free to use it, as the widget is useful in some applications; it's just
38984 // not of general interest. However, we are not accepting new features for the
38985 // widget, and it will move out of the GTK+ distribution.
38986 // </note>
38988 // The VRuler widget is a widget arranged vertically creating a ruler that is
38989 // utilized around other widgets such as a text widget. The ruler is used to show
38990 // the location of the mouse on the window and to show the size of the window in
38991 // specified units. The available units of measurement are GTK_PIXELS, GTK_INCHES
38992 // and GTK_CENTIMETERS. GTK_PIXELS is the default unit of measurement.
38993 struct VRuler /* : Ruler */ {
38994 mixin Atk.ImplementorIface.__interface__;
38995 mixin Buildable.__interface__;
38996 mixin Orientable.__interface__;
38997 alias ruler this;
38998 alias ruler super_;
38999 Ruler ruler;
39002 // Creates a new vertical ruler
39005 // unmaintained and too specialized. There is no replacement.
39006 // RETURNS: a new #GtkVRuler.
39007 static VRuler* new_()() nothrow {
39008 return gtk_vruler_new();
39010 static auto opCall()() {
39011 return gtk_vruler_new();
39015 struct VRulerClass {
39016 RulerClass parent_class;
39020 // The #GtkVScale widget is used to allow the user to select a value using
39021 // a vertical slider. To create one, use gtk_hscale_new_with_range().
39023 // The position to show the current value, and the number of decimal places
39024 // shown can be set using the parent #GtkScale class's functions.
39025 struct VScale /* : Scale */ {
39026 mixin Atk.ImplementorIface.__interface__;
39027 mixin Buildable.__interface__;
39028 mixin Orientable.__interface__;
39029 alias scale this;
39030 alias scale super_;
39031 Scale scale;
39034 // Creates a new #GtkVScale.
39035 // RETURNS: a new #GtkVScale.
39036 // <adjustment>: the #GtkAdjustment which sets the range of the scale.
39037 static VScale* new_(AT0)(AT0 /*Adjustment*/ adjustment) nothrow {
39038 return gtk_vscale_new(UpCast!(Adjustment*)(adjustment));
39040 static auto opCall(AT0)(AT0 /*Adjustment*/ adjustment) {
39041 return gtk_vscale_new(UpCast!(Adjustment*)(adjustment));
39044 // Creates a new vertical scale widget that lets the user input a
39045 // number between @min and @max (including @min and @max) with the
39046 // increment @step. @step must be nonzero; it's the distance the
39047 // slider moves when using the arrow keys to adjust the scale value.
39049 // Note that the way in which the precision is derived works best if @step
39050 // is a power of ten. If the resulting precision is not suitable for your
39051 // needs, use gtk_scale_set_digits() to correct it.
39052 // RETURNS: a new #GtkVScale
39053 // <min>: minimum value
39054 // <max>: maximum value
39055 // <step>: step increment (tick size) used with keyboard shortcuts
39056 static VScale* new_with_range()(double min, double max, double step) nothrow {
39057 return gtk_vscale_new_with_range(min, max, step);
39059 static auto opCall()(double min, double max, double step) {
39060 return gtk_vscale_new_with_range(min, max, step);
39064 struct VScaleClass {
39065 ScaleClass parent_class;
39069 // The #GtkVScrollbar widget is a widget arranged vertically creating a
39070 // scrollbar. See #GtkScrollbar for details on
39071 // scrollbars. #GtkAdjustment pointers may be added to handle the
39072 // adjustment of the scrollbar or it may be left %NULL in which case one
39073 // will be created for you. See #GtkScrollbar for a description of what the
39074 // fields in an adjustment represent for a scrollbar.
39075 struct VScrollbar /* : Scrollbar */ {
39076 mixin Atk.ImplementorIface.__interface__;
39077 mixin Buildable.__interface__;
39078 mixin Orientable.__interface__;
39079 alias scrollbar this;
39080 alias scrollbar super_;
39081 Scrollbar scrollbar;
39084 // Creates a new vertical scrollbar.
39085 // RETURNS: the new #GtkVScrollbar
39086 // <adjustment>: the #GtkAdjustment to use, or %NULL to create a new adjustment
39087 static VScrollbar* new_(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
39088 return gtk_vscrollbar_new(UpCast!(Adjustment*)(adjustment));
39090 static auto opCall(AT0)(AT0 /*Adjustment*/ adjustment=null) {
39091 return gtk_vscrollbar_new(UpCast!(Adjustment*)(adjustment));
39095 struct VScrollbarClass {
39096 ScrollbarClass parent_class;
39100 // The #GtkVSeparator widget is a vertical separator, used to group the
39101 // widgets within a window. It displays a vertical line with a shadow to
39102 // make it appear sunken into the interface.
39103 struct VSeparator /* : Separator */ {
39104 mixin Atk.ImplementorIface.__interface__;
39105 mixin Buildable.__interface__;
39106 mixin Orientable.__interface__;
39107 alias separator this;
39108 alias separator super_;
39109 Separator separator;
39112 // Creates a new #GtkVSeparator.
39113 // RETURNS: a new #GtkVSeparator.
39114 static VSeparator* new_()() nothrow {
39115 return gtk_vseparator_new();
39117 static auto opCall()() {
39118 return gtk_vseparator_new();
39122 struct VSeparatorClass {
39123 SeparatorClass parent_class;
39127 // The #GtkViewport widget acts as an adaptor class, implementing
39128 // scrollability for child widgets that lack their own scrolling
39129 // capabilities. Use #GtkViewport to scroll child widgets such as
39130 // #GtkTable, #GtkBox, and so on.
39132 // If a widget has native scrolling abilities, such as #GtkTextView,
39133 // #GtkTreeView or #GtkIconview, it can be added to a #GtkScrolledWindow
39134 // with gtk_container_add(). If a widget does not, you must first add the
39135 // widget to a #GtkViewport, then add the viewport to the scrolled window.
39136 // The convenience function gtk_scrolled_window_add_with_viewport() does
39137 // exactly this, so you can ignore the presence of the viewport.
39138 struct Viewport /* : Bin */ {
39139 mixin Atk.ImplementorIface.__interface__;
39140 mixin Buildable.__interface__;
39141 alias bin this;
39142 alias bin super_;
39143 Bin bin;
39144 ShadowType shadow_type;
39145 Gdk2.Window* view_window, bin_window;
39146 Adjustment* hadjustment, vadjustment;
39149 // Creates a new #GtkViewport with the given adjustments.
39150 // RETURNS: a new #GtkViewport.
39151 // <hadjustment>: horizontal adjustment.
39152 // <vadjustment>: vertical adjustment.
39153 static Viewport* new_(AT0, AT1)(AT0 /*Adjustment*/ hadjustment, AT1 /*Adjustment*/ vadjustment) nothrow {
39154 return gtk_viewport_new(UpCast!(Adjustment*)(hadjustment), UpCast!(Adjustment*)(vadjustment));
39156 static auto opCall(AT0, AT1)(AT0 /*Adjustment*/ hadjustment, AT1 /*Adjustment*/ vadjustment) {
39157 return gtk_viewport_new(UpCast!(Adjustment*)(hadjustment), UpCast!(Adjustment*)(vadjustment));
39160 // VERSION: 2.20
39161 // Gets the bin window of the #GtkViewport.
39162 // RETURNS: a #GdkWindow
39163 Gdk2.Window* get_bin_window()() nothrow {
39164 return gtk_viewport_get_bin_window(&this);
39167 // Returns the horizontal adjustment of the viewport.
39168 // RETURNS: the horizontal adjustment of @viewport.
39169 Adjustment* get_hadjustment()() nothrow {
39170 return gtk_viewport_get_hadjustment(&this);
39173 // Gets the shadow type of the #GtkViewport. See
39174 // gtk_viewport_set_shadow_type().
39175 // RETURNS: the shadow type
39176 ShadowType get_shadow_type()() nothrow {
39177 return gtk_viewport_get_shadow_type(&this);
39180 // Returns the vertical adjustment of the viewport.
39181 // RETURNS: the vertical adjustment of @viewport.
39182 Adjustment* get_vadjustment()() nothrow {
39183 return gtk_viewport_get_vadjustment(&this);
39186 // VERSION: 2.22
39187 // Gets the view window of the #GtkViewport.
39188 // RETURNS: a #GdkWindow
39189 Gdk2.Window* get_view_window()() nothrow {
39190 return gtk_viewport_get_view_window(&this);
39193 // Sets the horizontal adjustment of the viewport.
39194 // <adjustment>: a #GtkAdjustment.
39195 void set_hadjustment(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
39196 gtk_viewport_set_hadjustment(&this, UpCast!(Adjustment*)(adjustment));
39199 // Sets the shadow type of the viewport.
39200 // <type>: the new shadow type.
39201 void set_shadow_type()(ShadowType type) nothrow {
39202 gtk_viewport_set_shadow_type(&this, type);
39205 // Sets the vertical adjustment of the viewport.
39206 // <adjustment>: a #GtkAdjustment.
39207 void set_vadjustment(AT0)(AT0 /*Adjustment*/ adjustment=null) nothrow {
39208 gtk_viewport_set_vadjustment(&this, UpCast!(Adjustment*)(adjustment));
39211 // Set the scroll adjustments for the viewport. Usually scrolled containers
39212 // like #GtkScrolledWindow will emit this signal to connect two instances
39213 // of #GtkScrollbar to the scroll directions of the #GtkViewport.
39214 extern (C) alias static void function (Viewport* this_, Adjustment* object, Adjustment* p0, void* user_data=null) nothrow signal_set_scroll_adjustments;
39216 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39217 return super_.signal_connect!name(cb, data, cf);
39220 ulong signal_connect(string name:"set-scroll-adjustments", CB/*:signal_set_scroll_adjustments*/)
39221 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
39222 if (is(typeof(cb)==signal_set_scroll_adjustments)||_ttmm!(CB, signal_set_scroll_adjustments)()) {
39223 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
39224 cast(GObject2.Callback)cb, data, null, cf);
39228 struct ViewportClass {
39229 BinClass parent_class;
39230 extern (C) void function (Viewport* viewport, Adjustment* hadjustment, Adjustment* vadjustment) nothrow set_scroll_adjustments;
39233 enum Visibility {
39234 NONE = 0,
39235 PARTIAL = 1,
39236 FULL = 2
39239 // #GtkVolumeButton is a subclass of #GtkScaleButton that has
39240 // been tailored for use as a volume control widget with suitable
39241 // icons, tooltips and accessible labels.
39242 struct VolumeButton /* : ScaleButton */ {
39243 mixin Atk.ImplementorIface.__interface__;
39244 mixin Activatable.__interface__;
39245 mixin Buildable.__interface__;
39246 mixin Orientable.__interface__;
39247 alias parent this;
39248 alias parent super_;
39249 alias parent scalebutton;
39250 ScaleButton parent;
39253 // VERSION: 2.12
39254 // Creates a #GtkVolumeButton, with a range between 0.0 and 1.0, with
39255 // a stepping of 0.02. Volume values can be obtained and modified using
39256 // the functions from #GtkScaleButton.
39257 // RETURNS: a new #GtkVolumeButton
39258 static VolumeButton* new_()() nothrow {
39259 return gtk_volume_button_new();
39261 static auto opCall()() {
39262 return gtk_volume_button_new();
39266 struct VolumeButtonClass {
39267 ScaleButtonClass parent_class;
39268 extern (C) void function () nothrow _gtk_reserved1;
39269 extern (C) void function () nothrow _gtk_reserved2;
39270 extern (C) void function () nothrow _gtk_reserved3;
39271 extern (C) void function () nothrow _gtk_reserved4;
39275 // GtkWidget is the base class all widgets in GTK+ derive from. It manages the
39276 // widget lifecycle, states and style.
39278 // <refsect2 id="style-properties">
39279 // <para>
39280 // <structname>GtkWidget</structname> introduces <firstterm>style
39281 // properties</firstterm> - these are basically object properties that are stored
39282 // not on the object, but in the style object associated to the widget. Style
39283 // properties are set in <link linkend="gtk-Resource-Files">resource files</link>.
39284 // This mechanism is used for configuring such things as the location of the
39285 // scrollbar arrows through the theme, giving theme authors more control over the
39286 // look of applications without the need to write a theme engine in C.
39287 // </para>
39288 // <para>
39289 // Use gtk_widget_class_install_style_property() to install style properties for
39290 // a widget class, gtk_widget_class_find_style_property() or
39291 // gtk_widget_class_list_style_properties() to get information about existing
39292 // style properties and gtk_widget_style_get_property(), gtk_widget_style_get() or
39293 // gtk_widget_style_get_valist() to obtain the value of a style property.
39294 // </para>
39295 // </refsect2>
39296 // <refsect2 id="GtkWidget-BUILDER-UI">
39297 // <title>GtkWidget as GtkBuildable</title>
39298 // <para>
39299 // The GtkWidget implementation of the GtkBuildable interface supports a
39300 // custom &lt;accelerator&gt; element, which has attributes named key,
39301 // modifiers and signal and allows to specify accelerators.
39302 // </para>
39303 // <example>
39304 // <title>A UI definition fragment specifying an accelerator</title>
39305 // <programlisting><![CDATA[
39306 // <object class="GtkButton">
39307 // <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
39308 // </object>
39309 // ]]></programlisting>
39310 // </example>
39311 // <para>
39312 // In addition to accelerators, <structname>GtkWidget</structname> also support a
39313 // custom &lt;accessible&gt; element, which supports actions and relations.
39314 // Properties on the accessible implementation of an object can be set by accessing the
39315 // internal child "accessible" of a <structname>GtkWidget</structname>.
39316 // </para>
39317 // <example>
39318 // <title>A UI definition fragment specifying an accessible</title>
39319 // <programlisting><![CDATA[
39320 // <object class="GtkButton" id="label1"/>
39321 // <property name="label">I am a Label for a Button</property>
39322 // </object>
39323 // <object class="GtkButton" id="button1">
39324 // <accessibility>
39325 // <action action_name="click" translatable="yes">Click the button.</action>
39326 // <relation target="label1" type="labelled-by"/>
39327 // </accessibility>
39328 // <child internal-child="accessible">
39329 // <object class="AtkObject" id="a11y-button1">
39330 // <property name="AtkObject::name">Clickable Button</property>
39331 // </object>
39332 // </child>
39333 // </object>
39334 // ]]></programlisting>
39335 // </example>
39336 // </refsect2>
39337 struct Widget /* : Object */ {
39338 mixin Atk.ImplementorIface.__interface__;
39339 mixin Buildable.__interface__;
39340 alias object this;
39341 alias object super_;
39342 Object object;
39343 ushort private_flags;
39344 ubyte state, saved_state;
39345 char* name;
39346 Style* style;
39347 Requisition requisition;
39348 Allocation allocation;
39349 Gdk2.Window* window;
39350 Widget* parent;
39353 // Unintrospectable constructor: new() / gtk_widget_new()
39354 // This is a convenience function for creating a widget and setting
39355 // its properties in one go. For example you might write:
39356 // <literal>gtk_widget_new (GTK_TYPE_LABEL, "label", "Hello World", "xalign",
39357 // 0.0, NULL)</literal> to create a left-aligned label. Equivalent to
39358 // g_object_new(), but returns a widget so you don't have to
39359 // cast the object yourself.
39360 // RETURNS: a new #GtkWidget of type @widget_type
39361 // <type>: type ID of the widget to create
39362 // <first_property_name>: name of first property to set
39363 alias gtk_widget_new new_; // Variadic
39365 // Obtains the default colormap used to create widgets.
39366 // RETURNS: default widget colormap
39367 static Gdk2.Colormap* get_default_colormap()() nothrow {
39368 return gtk_widget_get_default_colormap();
39371 // Obtains the current default reading direction. See
39372 // gtk_widget_set_default_direction().
39373 // RETURNS: the current default direction.
39374 static TextDirection get_default_direction()() nothrow {
39375 return gtk_widget_get_default_direction();
39378 // Returns the default style used by all widgets initially.
39380 // by GTK+ and should not be modified or freed.
39381 // RETURNS: the default style. This #GtkStyle object is owned
39382 static Style* get_default_style()() nothrow {
39383 return gtk_widget_get_default_style();
39386 // Obtains the visual of the default colormap. Not really useful;
39387 // used to be useful before gdk_colormap_get_visual() existed.
39388 // RETURNS: visual of the default colormap
39389 static Gdk2.Visual* get_default_visual()() nothrow {
39390 return gtk_widget_get_default_visual();
39392 // Removes a colormap pushed with gtk_widget_push_colormap().
39393 static void pop_colormap()() nothrow {
39394 gtk_widget_pop_colormap();
39396 // Cancels the effect of a previous call to gtk_widget_push_composite_child().
39397 static void pop_composite_child()() nothrow {
39398 gtk_widget_pop_composite_child();
39401 // Pushes @cmap onto a global stack of colormaps; the topmost
39402 // colormap on the stack will be used to create all widgets.
39403 // Remove @cmap with gtk_widget_pop_colormap(). There's little
39404 // reason to use this function.
39405 // <cmap>: a #GdkColormap
39406 static void push_colormap(AT0)(AT0 /*Gdk2.Colormap*/ cmap) nothrow {
39407 gtk_widget_push_colormap(UpCast!(Gdk2.Colormap*)(cmap));
39410 // Makes all newly-created widgets as composite children until
39411 // the corresponding gtk_widget_pop_composite_child() call.
39413 // A composite child is a child that's an implementation detail of the
39414 // container it's inside and should not be visible to people using the
39415 // container. Composite children aren't treated differently by GTK (but
39416 // see gtk_container_foreach() vs. gtk_container_forall()), but e.g. GUI
39417 // builders might want to treat them in a different way.
39419 // Here is a simple example:
39420 // |[
39421 // gtk_widget_push_composite_child ();
39422 // scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
39423 // gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
39424 // gtk_widget_pop_composite_child ();
39425 // gtk_widget_set_parent (scrolled_window->hscrollbar,
39426 // GTK_WIDGET (scrolled_window));
39427 // g_object_ref (scrolled_window->hscrollbar);
39428 // ]|
39429 static void push_composite_child()() nothrow {
39430 gtk_widget_push_composite_child();
39433 // Sets the default colormap to use when creating widgets.
39434 // gtk_widget_push_colormap() is a better function to use if
39435 // you only want to affect a few widgets, rather than all widgets.
39436 // <colormap>: a #GdkColormap
39437 static void set_default_colormap(AT0)(AT0 /*Gdk2.Colormap*/ colormap) nothrow {
39438 gtk_widget_set_default_colormap(UpCast!(Gdk2.Colormap*)(colormap));
39441 // Sets the default reading direction for widgets where the
39442 // direction has not been explicitly set by gtk_widget_set_direction().
39443 // <dir>: the new default direction. This cannot be %GTK_TEXT_DIR_NONE.
39444 static void set_default_direction()(TextDirection dir) nothrow {
39445 gtk_widget_set_default_direction(dir);
39448 // For widgets that can be "activated" (buttons, menu items, etc.)
39449 // this function activates them. Activation is what happens when you
39450 // press Enter on a widget during key navigation. If @widget isn't
39451 // activatable, the function returns %FALSE.
39452 // RETURNS: %TRUE if the widget was activatable
39453 int activate()() nothrow {
39454 return gtk_widget_activate(&this);
39457 // Installs an accelerator for this @widget in @accel_group that causes
39458 // @accel_signal to be emitted if the accelerator is activated.
39459 // The @accel_group needs to be added to the widget's toplevel via
39460 // gtk_window_add_accel_group(), and the signal must be of type %G_RUN_ACTION.
39461 // Accelerators added through this function are not user changeable during
39462 // runtime. If you want to support accelerators that can be changed by the
39463 // user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or
39464 // gtk_menu_item_set_accel_path() instead.
39465 // <accel_signal>: widget signal to emit on accelerator activation
39466 // <accel_group>: accel group for this widget, added to its toplevel
39467 // <accel_key>: GDK keyval of the accelerator
39468 // <accel_mods>: modifier key combination of the accelerator
39469 // <accel_flags>: flag accelerators, e.g. %GTK_ACCEL_VISIBLE
39470 void add_accelerator(AT0, AT1)(AT0 /*char*/ accel_signal, AT1 /*AccelGroup*/ accel_group, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags) nothrow {
39471 gtk_widget_add_accelerator(&this, toCString!(char*)(accel_signal), UpCast!(AccelGroup*)(accel_group), accel_key, accel_mods, accel_flags);
39474 // Adds the events in the bitfield @events to the event mask for
39475 // @widget. See gtk_widget_set_events() for details.
39476 // <events>: an event mask, see #GdkEventMask
39477 void add_events()(int events) nothrow {
39478 gtk_widget_add_events(&this, events);
39481 // VERSION: 2.4
39482 // Adds a widget to the list of mnemonic labels for
39483 // this widget. (See gtk_widget_list_mnemonic_labels()). Note the
39484 // list of mnemonic labels for the widget is cleared when the
39485 // widget is destroyed, so the caller must make sure to update
39486 // its internal state at this point as well, by using a connection
39487 // to the #GtkWidget::destroy signal or a weak notifier.
39488 // <label>: a #GtkWidget that acts as a mnemonic label for @widget
39489 void add_mnemonic_label(AT0)(AT0 /*Widget*/ label) nothrow {
39490 gtk_widget_add_mnemonic_label(&this, UpCast!(Widget*)(label));
39493 // VERSION: 2.4
39494 // Determines whether an accelerator that activates the signal
39495 // identified by @signal_id can currently be activated.
39496 // This is done by emitting the #GtkWidget::can-activate-accel
39497 // signal on @widget; if the signal isn't overridden by a
39498 // handler or in a derived widget, then the default check is
39499 // that the widget must be sensitive, and the widget and all
39500 // its ancestors mapped.
39501 // RETURNS: %TRUE if the accelerator can be activated.
39502 // <signal_id>: the ID of a signal installed on @widget
39503 int can_activate_accel()(uint signal_id) nothrow {
39504 return gtk_widget_can_activate_accel(&this, signal_id);
39507 // This function is used by custom widget implementations; if you're
39508 // writing an app, you'd use gtk_widget_grab_focus() to move the focus
39509 // to a particular widget, and gtk_container_set_focus_chain() to
39510 // change the focus tab order. So you may want to investigate those
39511 // functions instead.
39513 // gtk_widget_child_focus() is called by containers as the user moves
39514 // around the window using keyboard shortcuts. @direction indicates
39515 // what kind of motion is taking place (up, down, left, right, tab
39516 // forward, tab backward). gtk_widget_child_focus() emits the
39517 // #GtkWidget::focus signal; widgets override the default handler
39518 // for this signal in order to implement appropriate focus behavior.
39520 // The default ::focus handler for a widget should return %TRUE if
39521 // moving in @direction left the focus on a focusable location inside
39522 // that widget, and %FALSE if moving in @direction moved the focus
39523 // outside the widget. If returning %TRUE, widgets normally
39524 // call gtk_widget_grab_focus() to place the focus accordingly;
39525 // if returning %FALSE, they don't modify the current focus location.
39527 // This function replaces gtk_container_focus() from GTK+ 1.2.
39528 // It was necessary to check that the child was visible, sensitive,
39529 // and focusable before calling gtk_container_focus().
39530 // gtk_widget_child_focus() returns %FALSE if the widget is not
39531 // currently in a focusable state, so there's no need for those checks.
39532 // RETURNS: %TRUE if focus ended up inside @widget
39533 // <direction>: direction of focus movement
39534 int child_focus()(DirectionType direction) nothrow {
39535 return gtk_widget_child_focus(&this, direction);
39538 // Emits a #GtkWidget::child-notify signal for the
39539 // <link linkend="child-properties">child property</link> @child_property
39540 // on @widget.
39542 // This is the analogue of g_object_notify() for child properties.
39543 // <child_property>: the name of a child property installed on the class of @widget<!-- -->'s parent
39544 void child_notify(AT0)(AT0 /*char*/ child_property) nothrow {
39545 gtk_widget_child_notify(&this, toCString!(char*)(child_property));
39548 // Same as gtk_widget_path(), but always uses the name of a widget's type,
39549 // never uses a custom name set with gtk_widget_set_name().
39550 // <path_length>: location to store the length of the class path, or %NULL
39551 // <path>: location to store the class path as an allocated string, or %NULL
39552 // <path_reversed>: location to store the reverse class path as an allocated string, or %NULL
39553 void class_path(AT0, AT1, AT2)(/*out*/ AT0 /*uint*/ path_length=null, /*out*/ AT1 /*char**/ path=null, /*out*/ AT2 /*char**/ path_reversed=null) nothrow {
39554 gtk_widget_class_path(&this, UpCast!(uint*)(path_length), toCString!(char**)(path), toCString!(char**)(path_reversed));
39557 // Creates a new #PangoContext with the appropriate font map,
39558 // font description, and base direction for drawing text for
39559 // this widget. See also gtk_widget_get_pango_context().
39560 // RETURNS: the new #PangoContext
39561 Pango.Context* /*new*/ create_pango_context()() nothrow {
39562 return gtk_widget_create_pango_context(&this);
39565 // Creates a new #PangoLayout with the appropriate font map,
39566 // font description, and base direction for drawing text for
39567 // this widget.
39569 // If you keep a #PangoLayout created in this way around, in order to
39570 // notify the layout of changes to the base direction or font of this
39571 // widget, you must call pango_layout_context_changed() in response to
39572 // the #GtkWidget::style-set and #GtkWidget::direction-changed signals
39573 // for the widget.
39574 // RETURNS: the new #PangoLayout
39575 // <text>: text to set on the layout (can be %NULL)
39576 Pango.Layout* /*new*/ create_pango_layout(AT0)(AT0 /*char*/ text) nothrow {
39577 return gtk_widget_create_pango_layout(&this, toCString!(char*)(text));
39580 // Destroys a widget. Equivalent to gtk_object_destroy(), except that
39581 // you don't have to cast the widget to #GtkObject. When a widget is
39582 // destroyed, it will break any references it holds to other objects.
39583 // If the widget is inside a container, the widget will be removed
39584 // from the container. If the widget is a toplevel (derived from
39585 // #GtkWindow), it will be removed from the list of toplevels, and the
39586 // reference GTK+ holds to it will be removed. Removing a
39587 // widget from its container or the list of toplevels results in the
39588 // widget being finalized, unless you've added additional references
39589 // to the widget with g_object_ref().
39591 // In most cases, only toplevel widgets (windows) require explicit
39592 // destruction, because when you destroy a toplevel its children will
39593 // be destroyed as well.
39594 void destroy()() nothrow {
39595 gtk_widget_destroy(&this);
39598 // This function sets *@widget_pointer to %NULL if @widget_pointer !=
39599 // %NULL. It's intended to be used as a callback connected to the
39600 // "destroy" signal of a widget. You connect gtk_widget_destroyed()
39601 // as a signal handler, and pass the address of your widget variable
39602 // as user data. Then when the widget is destroyed, the variable will
39603 // be set to %NULL. Useful for example to avoid multiple copies
39604 // of the same dialog.
39605 // <widget_pointer>: address of a variable that contains @widget
39606 void destroyed(AT0)(/*inout*/ AT0 /*Widget**/ widget_pointer) nothrow {
39607 gtk_widget_destroyed(&this, UpCast!(Widget**)(widget_pointer));
39610 // In GTK+ 1.2, this function would immediately render the
39611 // region @area of a widget, by invoking the virtual draw method of a
39612 // widget. In GTK+ 2.0, the draw method is gone, and instead
39613 // gtk_widget_draw() simply invalidates the specified region of the
39614 // widget, then updates the invalid region of the widget immediately.
39615 // Usually you don't want to update the region immediately for
39616 // performance reasons, so in general gtk_widget_queue_draw_area() is
39617 // a better choice if you want to draw a region of a widget.
39618 // <area>: area to draw
39619 void draw(AT0)(AT0 /*Gdk2.Rectangle*/ area) nothrow {
39620 gtk_widget_draw(&this, UpCast!(Gdk2.Rectangle*)(area));
39623 // Ensures that @widget has a style (@widget->style). Not a very useful
39624 // function; most of the time, if you want the style, the widget is
39625 // realized, and realized widgets are guaranteed to have a style
39626 // already.
39627 void ensure_style()() nothrow {
39628 gtk_widget_ensure_style(&this);
39631 // VERSION: 2.12
39632 // Notifies the user about an input-related error on this widget.
39633 // If the #GtkSettings:gtk-error-bell setting is %TRUE, it calls
39634 // gdk_window_beep(), otherwise it does nothing.
39636 // Note that the effect of gdk_window_beep() can be configured in many
39637 // ways, depending on the windowing backend and the desktop environment
39638 // or window manager that is used.
39639 void error_bell()() nothrow {
39640 gtk_widget_error_bell(&this);
39643 // Rarely-used function. This function is used to emit
39644 // the event signals on a widget (those signals should never
39645 // be emitted without using this function to do so).
39646 // If you want to synthesize an event though, don't use this function;
39647 // instead, use gtk_main_do_event() so the event will behave as if
39648 // it were in the event queue. Don't synthesize expose events; instead,
39649 // use gdk_window_invalidate_rect() to invalidate a region of the
39650 // window.
39652 // the event was handled)
39653 // RETURNS: return from the event signal emission (%TRUE if
39654 // <event>: a #GdkEvent
39655 int event(AT0)(AT0 /*Gdk2.Event*/ event) nothrow {
39656 return gtk_widget_event(&this, UpCast!(Gdk2.Event*)(event));
39659 // Stops emission of #GtkWidget::child-notify signals on @widget. The
39660 // signals are queued until gtk_widget_thaw_child_notify() is called
39661 // on @widget.
39663 // This is the analogue of g_object_freeze_notify() for child properties.
39664 void freeze_child_notify()() nothrow {
39665 gtk_widget_freeze_child_notify(&this);
39668 // Returns the accessible object that describes the widget to an
39669 // assistive technology.
39671 // If no accessibility library is loaded (i.e. no ATK implementation library is
39672 // loaded via <envar>GTK_MODULES</envar> or via another application library,
39673 // such as libgnome), then this #AtkObject instance may be a no-op. Likewise,
39674 // if no class-specific #AtkObject implementation is available for the widget
39675 // instance in question, it will inherit an #AtkObject implementation from the
39676 // first ancestor class for which such an implementation is defined.
39678 // The documentation of the <ulink url="http://developer.gnome.org/doc/API/2.0/atk/index.html">ATK</ulink>
39679 // library contains more information about accessible objects and their uses.
39680 // RETURNS: the #AtkObject associated with @widget
39681 Atk.Object* get_accessible()() nothrow {
39682 return gtk_widget_get_accessible(&this);
39685 // Unintrospectable method: get_action() / gtk_widget_get_action()
39686 // VERSION: 2.10
39687 // DEPRECATED (v2.16) method: get_action - Use gtk_activatable_get_related_action() instead.
39688 // Returns the #GtkAction that @widget is a proxy for.
39689 // See also gtk_action_get_proxies().
39691 // %NULL, if it is not attached to an action.
39692 // RETURNS: the action that a widget is a proxy for, or
39693 Action* get_action()() nothrow {
39694 return gtk_widget_get_action(&this);
39697 // VERSION: 2.18
39698 // Retrieves the widget's allocation.
39699 // <allocation>: a pointer to a #GtkAllocation to copy to
39700 void get_allocation(AT0)(/*out*/ AT0 /*Allocation*/ allocation) nothrow {
39701 gtk_widget_get_allocation(&this, UpCast!(Allocation*)(allocation));
39704 // Gets the first ancestor of @widget with type @widget_type. For example,
39705 // <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)</literal> gets
39706 // the first #GtkBox that's an ancestor of @widget. No reference will be
39707 // added to the returned widget; it should not be unreferenced. See note
39708 // about checking for a toplevel #GtkWindow in the docs for
39709 // gtk_widget_get_toplevel().
39711 // Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor()
39712 // considers @widget to be an ancestor of itself.
39713 // RETURNS: the ancestor widget, or %NULL if not found
39714 // <widget_type>: ancestor type
39715 Widget* get_ancestor()(Type widget_type) nothrow {
39716 return gtk_widget_get_ancestor(&this, widget_type);
39719 // VERSION: 2.18
39720 // Determines whether the application intends to draw on the widget in
39721 // an #GtkWidget::expose-event handler.
39723 // See gtk_widget_set_app_paintable()
39724 // RETURNS: %TRUE if the widget is app paintable
39725 int get_app_paintable()() nothrow {
39726 return gtk_widget_get_app_paintable(&this);
39729 // VERSION: 2.18
39730 // Determines whether @widget can be a default widget. See
39731 // gtk_widget_set_can_default().
39732 // RETURNS: %TRUE if @widget can be a default widget, %FALSE otherwise
39733 int get_can_default()() nothrow {
39734 return gtk_widget_get_can_default(&this);
39737 // VERSION: 2.18
39738 // Determines whether @widget can own the input focus. See
39739 // gtk_widget_set_can_focus().
39740 // RETURNS: %TRUE if @widget can own the input focus, %FALSE otherwise
39741 int get_can_focus()() nothrow {
39742 return gtk_widget_get_can_focus(&this);
39745 // This function is only for use in widget implementations. Obtains
39746 // @widget->requisition, unless someone has forced a particular
39747 // geometry on the widget (e.g. with gtk_widget_set_size_request()),
39748 // in which case it returns that geometry instead of the widget's
39749 // requisition.
39751 // This function differs from gtk_widget_size_request() in that
39752 // it retrieves the last size request value from @widget->requisition,
39753 // while gtk_widget_size_request() actually calls the "size_request" method
39754 // on @widget to compute the size request and fill in @widget->requisition,
39755 // and only then returns @widget->requisition.
39757 // Because this function does not call the "size_request" method, it
39758 // can only be used when you know that @widget->requisition is
39759 // up-to-date, that is, gtk_widget_size_request() has been called
39760 // since the last time a resize was queued. In general, only container
39761 // implementations have this information; applications should use
39762 // gtk_widget_size_request().
39763 // <requisition>: a #GtkRequisition to be filled in
39764 void get_child_requisition(AT0)(AT0 /*Requisition*/ requisition) nothrow {
39765 gtk_widget_get_child_requisition(&this, UpCast!(Requisition*)(requisition));
39768 // Gets the value set with gtk_widget_set_child_visible().
39769 // If you feel a need to use this function, your code probably
39770 // needs reorganization.
39772 // This function is only useful for container implementations and
39773 // never should be called by an application.
39774 // RETURNS: %TRUE if the widget is mapped with the parent.
39775 int get_child_visible()() nothrow {
39776 return gtk_widget_get_child_visible(&this);
39779 // VERSION: 2.2
39780 // Returns the clipboard object for the given selection to
39781 // be used with @widget. @widget must have a #GdkDisplay
39782 // associated with it, so must be attached to a toplevel
39783 // window.
39785 // clipboard already exists, a new one will
39786 // be created. Once a clipboard object has
39787 // been created, it is persistent for all time.
39788 // RETURNS: the appropriate clipboard object. If no
39789 // <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.
39790 Clipboard* get_clipboard()(Gdk2.Atom selection) nothrow {
39791 return gtk_widget_get_clipboard(&this, selection);
39794 // Gets the colormap that will be used to render @widget. No reference will
39795 // be added to the returned colormap; it should not be unreferenced.
39796 // RETURNS: the colormap used by @widget
39797 Gdk2.Colormap* get_colormap()() nothrow {
39798 return gtk_widget_get_colormap(&this);
39801 // Obtains the composite name of a widget.
39803 // a composite child. The string should be freed when it is no
39804 // longer needed.
39805 // RETURNS: the composite name of @widget, or %NULL if @widget is not
39806 char* /*new*/ get_composite_name()() nothrow {
39807 return gtk_widget_get_composite_name(&this);
39810 // Gets the reading direction for a particular widget. See
39811 // gtk_widget_set_direction().
39812 // RETURNS: the reading direction for the widget.
39813 TextDirection get_direction()() nothrow {
39814 return gtk_widget_get_direction(&this);
39817 // VERSION: 2.2
39818 // Get the #GdkDisplay for the toplevel window associated with
39819 // this widget. This function can only be called after the widget
39820 // has been added to a widget hierarchy with a #GtkWindow at the top.
39822 // In general, you should only create display specific
39823 // resources when a widget has been realized, and you should
39824 // free those resources when the widget is unrealized.
39825 // RETURNS: the #GdkDisplay for the toplevel for this widget.
39826 Gdk2.Display* get_display()() nothrow {
39827 return gtk_widget_get_display(&this);
39830 // VERSION: 2.18
39831 // Determines whether the widget is double buffered.
39833 // See gtk_widget_set_double_buffered()
39834 // RETURNS: %TRUE if the widget is double buffered
39835 int get_double_buffered()() nothrow {
39836 return gtk_widget_get_double_buffered(&this);
39839 // Returns the event mask for the widget (a bitfield containing flags
39840 // from the #GdkEventMask enumeration). These are the events that the widget
39841 // will receive.
39842 // RETURNS: event mask for @widget
39843 int get_events()() nothrow {
39844 return gtk_widget_get_events(&this);
39847 // Retrieves the extension events the widget will receive; see
39848 // gdk_input_set_extension_events().
39849 // RETURNS: extension events for @widget
39850 Gdk2.ExtensionMode get_extension_events()() nothrow {
39851 return gtk_widget_get_extension_events(&this);
39854 // VERSION: 2.12
39855 // Returns the current value of the has-tooltip property. See
39856 // GtkWidget:has-tooltip for more information.
39857 // RETURNS: current value of has-tooltip on @widget.
39858 int get_has_tooltip()() nothrow {
39859 return gtk_widget_get_has_tooltip(&this);
39862 // VERSION: 2.18
39863 // Determines whether @widget has a #GdkWindow of its own. See
39864 // gtk_widget_set_has_window().
39865 // RETURNS: %TRUE if @widget has a window, %FALSE otherwise
39866 int get_has_window()() nothrow {
39867 return gtk_widget_get_has_window(&this);
39870 // VERSION: 2.20
39871 // Whether the widget is mapped.
39872 // RETURNS: %TRUE if the widget is mapped, %FALSE otherwise.
39873 int get_mapped()() nothrow {
39874 return gtk_widget_get_mapped(&this);
39877 // Returns the current modifier style for the widget. (As set by
39878 // gtk_widget_modify_style().) If no style has previously set, a new
39879 // #GtkRcStyle will be created with all values unset, and set as the
39880 // modifier style for the widget. If you make changes to this rc
39881 // style, you must call gtk_widget_modify_style(), passing in the
39882 // returned rc style, to make sure that your changes take effect.
39884 // Caution: passing the style back to gtk_widget_modify_style() will
39885 // normally end up destroying it, because gtk_widget_modify_style() copies
39886 // the passed-in style and sets the copy as the new modifier style,
39887 // thus dropping any reference to the old modifier style. Add a reference
39888 // to the modifier style if you want to keep it alive.
39890 // owned by the widget. If you want to keep a pointer to value this
39891 // around, you must add a refcount using g_object_ref().
39892 // RETURNS: the modifier style for the widget. This rc style is
39893 RcStyle* get_modifier_style()() nothrow {
39894 return gtk_widget_get_modifier_style(&this);
39897 // Retrieves the name of a widget. See gtk_widget_set_name() for the
39898 // significance of widget names.
39900 // should not be modified or freed
39901 // RETURNS: name of the widget. This string is owned by GTK+ and
39902 char* get_name()() nothrow {
39903 return gtk_widget_get_name(&this);
39906 // VERSION: 2.4
39907 // Returns the current value of the GtkWidget:no-show-all property,
39908 // which determines whether calls to gtk_widget_show_all() and
39909 // gtk_widget_hide_all() will affect this widget.
39910 // RETURNS: the current value of the "no-show-all" property.
39911 int get_no_show_all()() nothrow {
39912 return gtk_widget_get_no_show_all(&this);
39915 // Gets a #PangoContext with the appropriate font map, font description,
39916 // and base direction for this widget. Unlike the context returned
39917 // by gtk_widget_create_pango_context(), this context is owned by
39918 // the widget (it can be used until the screen for the widget changes
39919 // or the widget is removed from its toplevel), and will be updated to
39920 // match any changes to the widget's attributes.
39922 // If you create and keep a #PangoLayout using this context, you must
39923 // deal with changes to the context by calling pango_layout_context_changed()
39924 // on the layout in response to the #GtkWidget::style-set and
39925 // #GtkWidget::direction-changed signals for the widget.
39926 // RETURNS: the #PangoContext for the widget.
39927 Pango.Context* get_pango_context()() nothrow {
39928 return gtk_widget_get_pango_context(&this);
39931 // Returns the parent container of @widget.
39932 // RETURNS: the parent container of @widget, or %NULL
39933 Widget* get_parent()() nothrow {
39934 return gtk_widget_get_parent(&this);
39937 // Gets @widget's parent window.
39938 // RETURNS: the parent window of @widget.
39939 Gdk2.Window* get_parent_window()() nothrow {
39940 return gtk_widget_get_parent_window(&this);
39943 // Obtains the location of the mouse pointer in widget coordinates.
39944 // Widget coordinates are a bit odd; for historical reasons, they are
39945 // defined as @widget->window coordinates for widgets that are not
39946 // #GTK_NO_WINDOW widgets, and are relative to @widget->allocation.x,
39947 // @widget->allocation.y for widgets that are #GTK_NO_WINDOW widgets.
39948 // <x>: return location for the X coordinate, or %NULL
39949 // <y>: return location for the Y coordinate, or %NULL
39950 void get_pointer()(/*out*/ int* x=null, /*out*/ int* y=null) nothrow {
39951 gtk_widget_get_pointer(&this, x, y);
39954 // VERSION: 2.20
39955 // Determines whether @widget is realized.
39956 // RETURNS: %TRUE if @widget is realized, %FALSE otherwise
39957 int get_realized()() nothrow {
39958 return gtk_widget_get_realized(&this);
39961 // VERSION: 2.18
39962 // Determines whether @widget is alyways treated as default widget
39963 // withing its toplevel when it has the focus, even if another widget
39964 // is the default.
39966 // See gtk_widget_set_receives_default().
39968 // %FALSE otherwise
39969 // RETURNS: %TRUE if @widget acts as default widget when focussed,
39970 int get_receives_default()() nothrow {
39971 return gtk_widget_get_receives_default(&this);
39974 // VERSION: 2.20
39975 // Retrieves the widget's requisition.
39977 // This function should only be used by widget implementations in
39978 // order to figure whether the widget's requisition has actually
39979 // changed after some internal state change (so that they can call
39980 // gtk_widget_queue_resize() instead of gtk_widget_queue_draw()).
39982 // Normally, gtk_widget_size_request() should be used.
39983 // <requisition>: a pointer to a #GtkRequisition to copy to
39984 void get_requisition(AT0)(/*out*/ AT0 /*Requisition*/ requisition) nothrow {
39985 gtk_widget_get_requisition(&this, UpCast!(Requisition*)(requisition));
39988 // VERSION: 2.2
39989 // Get the root window where this widget is located. This function can
39990 // only be called after the widget has been added to a widget
39991 // hierarchy with #GtkWindow at the top.
39993 // The root window is useful for such purposes as creating a popup
39994 // #GdkWindow associated with the window. In general, you should only
39995 // create display specific resources when a widget has been realized,
39996 // and you should free those resources when the widget is unrealized.
39997 // RETURNS: the #GdkWindow root window for the toplevel for this widget.
39998 Gdk2.Window* get_root_window()() nothrow {
39999 return gtk_widget_get_root_window(&this);
40002 // VERSION: 2.2
40003 // Get the #GdkScreen from the toplevel window associated with
40004 // this widget. This function can only be called after the widget
40005 // has been added to a widget hierarchy with a #GtkWindow
40006 // at the top.
40008 // In general, you should only create screen specific
40009 // resources when a widget has been realized, and you should
40010 // free those resources when the widget is unrealized.
40011 // RETURNS: the #GdkScreen for the toplevel for this widget.
40012 Gdk2.Screen* get_screen()() nothrow {
40013 return gtk_widget_get_screen(&this);
40016 // VERSION: 2.18
40017 // Returns the widget's sensitivity (in the sense of returning
40018 // the value that has been set using gtk_widget_set_sensitive()).
40020 // The effective sensitivity of a widget is however determined by both its
40021 // own and its parent widget's sensitivity. See gtk_widget_is_sensitive().
40022 // RETURNS: %TRUE if the widget is sensitive
40023 int get_sensitive()() nothrow {
40024 return gtk_widget_get_sensitive(&this);
40027 // Gets the settings object holding the settings (global property
40028 // settings, RC file information, etc) used for this widget.
40030 // Note that this function can only be called when the #GtkWidget
40031 // is attached to a toplevel, since the settings object is specific
40032 // to a particular #GdkScreen.
40033 // RETURNS: the relevant #GtkSettings object
40034 Settings* get_settings()() nothrow {
40035 return gtk_widget_get_settings(&this);
40038 // Gets the size request that was explicitly set for the widget using
40039 // gtk_widget_set_size_request(). A value of -1 stored in @width or
40040 // @height indicates that that dimension has not been set explicitly
40041 // and the natural requisition of the widget will be used intead. See
40042 // gtk_widget_set_size_request(). To get the size a widget will
40043 // actually use, call gtk_widget_size_request() instead of
40044 // this function.
40045 // <width>: return location for width, or %NULL
40046 // <height>: return location for height, or %NULL
40047 void get_size_request()(/*out*/ int* width=null, /*out*/ int* height=null) nothrow {
40048 gtk_widget_get_size_request(&this, width, height);
40051 // Unintrospectable method: get_snapshot() / gtk_widget_get_snapshot()
40052 // VERSION: 2.14
40053 // Create a #GdkPixmap of the contents of the widget and its children.
40055 // Works even if the widget is obscured. The depth and visual of the
40056 // resulting pixmap is dependent on the widget being snapshot and likely
40057 // differs from those of a target widget displaying the pixmap.
40058 // The function gdk_pixbuf_get_from_drawable() can be used to convert
40059 // the pixmap to a visual independant representation.
40061 // The snapshot area used by this function is the @widget's allocation plus
40062 // any extra space occupied by additional windows belonging to this widget
40063 // (such as the arrows of a spin button).
40064 // Thus, the resulting snapshot pixmap is possibly larger than the allocation.
40066 // If @clip_rect is non-%NULL, the resulting pixmap is shrunken to
40067 // match the specified clip_rect. The (x,y) coordinates of @clip_rect are
40068 // interpreted widget relative. If width or height of @clip_rect are 0 or
40069 // negative, the width or height of the resulting pixmap will be shrunken
40070 // by the respective amount.
40071 // For instance a @clip_rect <literal>{ +5, +5, -10, -10 }</literal> will
40072 // chop off 5 pixels at each side of the snapshot pixmap.
40073 // If non-%NULL, @clip_rect will contain the exact widget-relative snapshot
40074 // coordinates upon return. A @clip_rect of <literal>{ -1, -1, 0, 0 }</literal>
40075 // can be used to preserve the auto-grown snapshot area and use @clip_rect
40076 // as a pure output parameter.
40078 // The returned pixmap can be %NULL, if the resulting @clip_area was empty.
40079 // RETURNS: #GdkPixmap snapshot of the widget
40080 // <clip_rect>: a #GdkRectangle or %NULL
40081 Gdk2.Pixmap* get_snapshot(AT0)(AT0 /*Gdk2.Rectangle*/ clip_rect=null) nothrow {
40082 return gtk_widget_get_snapshot(&this, UpCast!(Gdk2.Rectangle*)(clip_rect));
40085 // VERSION: 2.18
40086 // Returns the widget's state. See gtk_widget_set_state().
40087 // RETURNS: the state of @widget.
40088 StateType get_state()() nothrow {
40089 return gtk_widget_get_state(&this);
40092 // Simply an accessor function that returns @widget->style.
40093 // RETURNS: the widget's #GtkStyle
40094 Style* get_style()() nothrow {
40095 return gtk_widget_get_style(&this);
40098 // VERSION: 2.12
40099 // Gets the contents of the tooltip for @widget.
40101 // returned string with g_free() when done.
40102 // RETURNS: the tooltip text, or %NULL. You should free the
40103 char* /*new*/ get_tooltip_markup()() nothrow {
40104 return gtk_widget_get_tooltip_markup(&this);
40107 // VERSION: 2.12
40108 // Gets the contents of the tooltip for @widget.
40110 // returned string with g_free() when done.
40111 // RETURNS: the tooltip text, or %NULL. You should free the
40112 char* /*new*/ get_tooltip_text()() nothrow {
40113 return gtk_widget_get_tooltip_text(&this);
40116 // VERSION: 2.12
40117 // Returns the #GtkWindow of the current tooltip. This can be the
40118 // GtkWindow created by default, or the custom tooltip window set
40119 // using gtk_widget_set_tooltip_window().
40120 // RETURNS: The #GtkWindow of the current tooltip.
40121 Window* get_tooltip_window()() nothrow {
40122 return gtk_widget_get_tooltip_window(&this);
40125 // This function returns the topmost widget in the container hierarchy
40126 // @widget is a part of. If @widget has no parent widgets, it will be
40127 // returned as the topmost widget. No reference will be added to the
40128 // returned widget; it should not be unreferenced.
40130 // Note the difference in behavior vs. gtk_widget_get_ancestor();
40131 // <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)</literal>
40132 // would return
40133 // %NULL if @widget wasn't inside a toplevel window, and if the
40134 // window was inside a #GtkWindow-derived widget which was in turn
40135 // inside the toplevel #GtkWindow. While the second case may
40136 // seem unlikely, it actually happens when a #GtkPlug is embedded
40137 // inside a #GtkSocket within the same application.
40139 // To reliably find the toplevel #GtkWindow, use
40140 // gtk_widget_get_toplevel() and check if the %TOPLEVEL flags
40141 // is set on the result.
40142 // |[
40143 // GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
40144 // if (gtk_widget_is_toplevel (toplevel))
40145 // {
40146 // /&ast; Perform action on toplevel. &ast;/
40147 // }
40148 // ]|
40150 // if there's no ancestor.
40151 // RETURNS: the topmost ancestor of @widget, or @widget itself
40152 Widget* get_toplevel()() nothrow {
40153 return gtk_widget_get_toplevel(&this);
40156 // VERSION: 2.18
40157 // Determines whether the widget is visible. Note that this doesn't
40158 // take into account whether the widget's parent is also visible
40159 // or the widget is obscured in any way.
40161 // See gtk_widget_set_visible().
40162 // RETURNS: %TRUE if the widget is visible
40163 int get_visible()() nothrow {
40164 return gtk_widget_get_visible(&this);
40167 // Gets the visual that will be used to render @widget.
40168 // RETURNS: the visual for @widget
40169 Gdk2.Visual* get_visual()() nothrow {
40170 return gtk_widget_get_visual(&this);
40173 // VERSION: 2.14
40174 // Returns the widget's window if it is realized, %NULL otherwise
40175 // RETURNS: @widget's window.
40176 Gdk2.Window* get_window()() nothrow {
40177 return gtk_widget_get_window(&this);
40180 // Causes @widget to become the default widget. @widget must have the
40181 // %GTK_CAN_DEFAULT flag set; typically you have to set this flag
40182 // yourself by calling <literal>gtk_widget_set_can_default (@widget,
40183 // %TRUE)</literal>. The default widget is activated when
40184 // the user presses Enter in a window. Default widgets must be
40185 // activatable, that is, gtk_widget_activate() should affect them.
40186 void grab_default()() nothrow {
40187 gtk_widget_grab_default(&this);
40190 // Causes @widget to have the keyboard focus for the #GtkWindow it's
40191 // inside. @widget must be a focusable widget, such as a #GtkEntry;
40192 // something like #GtkFrame won't work.
40194 // More precisely, it must have the %GTK_CAN_FOCUS flag set. Use
40195 // gtk_widget_set_can_focus() to modify that flag.
40197 // The widget also needs to be realized and mapped. This is indicated by the
40198 // related signals. Grabbing the focus immediately after creating the widget
40199 // will likely fail and cause critical warnings.
40200 void grab_focus()() nothrow {
40201 gtk_widget_grab_focus(&this);
40204 // VERSION: 2.18
40205 // Determines whether @widget is the current default widget within its
40206 // toplevel. See gtk_widget_set_can_default().
40208 // its toplevel, %FALSE otherwise
40209 // RETURNS: %TRUE if @widget is the current default widget within
40210 int has_default()() nothrow {
40211 return gtk_widget_has_default(&this);
40214 // VERSION: 2.18
40215 // Determines if the widget has the global input focus. See
40216 // gtk_widget_is_focus() for the difference between having the global
40217 // input focus, and only having the focus within a toplevel.
40218 // RETURNS: %TRUE if the widget has the global input focus.
40219 int has_focus()() nothrow {
40220 return gtk_widget_has_focus(&this);
40223 // VERSION: 2.18
40224 // Determines whether the widget is currently grabbing events, so it
40225 // is the only widget receiving input events (keyboard and mouse).
40227 // See also gtk_grab_add().
40228 // RETURNS: %TRUE if the widget is in the grab_widgets stack
40229 int has_grab()() nothrow {
40230 return gtk_widget_has_grab(&this);
40233 // VERSION: 2.20
40234 // Determines if the widget style has been looked up through the rc mechanism.
40236 // mechanism, %FALSE otherwise.
40237 // RETURNS: %TRUE if the widget has been looked up through the rc
40238 int has_rc_style()() nothrow {
40239 return gtk_widget_has_rc_style(&this);
40242 // VERSION: 2.2
40243 // Checks whether there is a #GdkScreen is associated with
40244 // this widget. All toplevel widgets have an associated
40245 // screen, and all widgets added into a hierarchy with a toplevel
40246 // window at the top.
40248 // with the widget.
40249 // RETURNS: %TRUE if there is a #GdkScreen associcated
40250 int has_screen()() nothrow {
40251 return gtk_widget_has_screen(&this);
40254 // Reverses the effects of gtk_widget_show(), causing the widget to be
40255 // hidden (invisible to the user).
40256 void hide()() nothrow {
40257 gtk_widget_hide(&this);
40260 // DEPRECATED (v2.24) method: hide_all - Use gtk_widget_hide() instead.
40261 // Recursively hides a widget and any child widgets.
40262 void hide_all()() nothrow {
40263 gtk_widget_hide_all(&this);
40266 // Utility function; intended to be connected to the #GtkWidget::delete-event
40267 // signal on a #GtkWindow. The function calls gtk_widget_hide() on its
40268 // argument, then returns %TRUE. If connected to ::delete-event, the
40269 // result is that clicking the close button for a window (on the
40270 // window frame, top right corner usually) will hide but not destroy
40271 // the window. By default, GTK+ destroys windows when ::delete-event
40272 // is received.
40273 // RETURNS: %TRUE
40274 int hide_on_delete()() nothrow {
40275 return gtk_widget_hide_on_delete(&this);
40278 // VERSION: 2.10
40279 // Sets an input shape for this widget's GDK window. This allows for
40280 // windows which react to mouse click in a nonrectangular region, see
40281 // gdk_window_input_shape_combine_mask() for more information.
40282 // <shape_mask>: shape to be added, or %NULL to remove an existing shape
40283 // <offset_x>: X position of shape mask with respect to @window
40284 // <offset_y>: Y position of shape mask with respect to @window
40285 void input_shape_combine_mask(AT0)(AT0 /*Gdk2.Bitmap*/ shape_mask, int offset_x, int offset_y) nothrow {
40286 gtk_widget_input_shape_combine_mask(&this, UpCast!(Gdk2.Bitmap*)(shape_mask), offset_x, offset_y);
40289 // Computes the intersection of a @widget's area and @area, storing
40290 // the intersection in @intersection, and returns %TRUE if there was
40291 // an intersection. @intersection may be %NULL if you're only
40292 // interested in whether there was an intersection.
40293 // RETURNS: %TRUE if there was an intersection
40294 // <area>: a rectangle
40295 // <intersection>: rectangle to store intersection of @widget and @area
40296 int intersect(AT0, AT1)(AT0 /*Gdk2.Rectangle*/ area, AT1 /*Gdk2.Rectangle*/ intersection) nothrow {
40297 return gtk_widget_intersect(&this, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Gdk2.Rectangle*)(intersection));
40300 // Determines whether @widget is somewhere inside @ancestor, possibly with
40301 // intermediate containers.
40303 // grandchild, great grandchild, etc.
40304 // RETURNS: %TRUE if @ancestor contains @widget as a child,
40305 // <ancestor>: another #GtkWidget
40306 int is_ancestor(AT0)(AT0 /*Widget*/ ancestor) nothrow {
40307 return gtk_widget_is_ancestor(&this, UpCast!(Widget*)(ancestor));
40310 // VERSION: 2.10
40311 // Whether @widget can rely on having its alpha channel
40312 // drawn correctly. On X11 this function returns whether a
40313 // compositing manager is running for @widget's screen.
40315 // Please note that the semantics of this call will change
40316 // in the future if used on a widget that has a composited
40317 // window in its hierarchy (as set by gdk_window_set_composited()).
40319 // channel being drawn correctly.
40320 // RETURNS: %TRUE if the widget can rely on its alpha
40321 int is_composited()() nothrow {
40322 return gtk_widget_is_composited(&this);
40325 // VERSION: 2.18
40326 // Determines whether @widget can be drawn to. A widget can be drawn
40327 // to if it is mapped and visible.
40328 // RETURNS: %TRUE if @widget is drawable, %FALSE otherwise
40329 int is_drawable()() nothrow {
40330 return gtk_widget_is_drawable(&this);
40333 // Determines if the widget is the focus widget within its
40334 // toplevel. (This does not mean that the %HAS_FOCUS flag is
40335 // necessarily set; %HAS_FOCUS will only be set if the
40336 // toplevel widget additionally has the global input focus.)
40337 // RETURNS: %TRUE if the widget is the focus widget.
40338 int is_focus()() nothrow {
40339 return gtk_widget_is_focus(&this);
40342 // VERSION: 2.18
40343 // Returns the widget's effective sensitivity, which means
40344 // it is sensitive itself and also its parent widget is sensntive
40345 // RETURNS: %TRUE if the widget is effectively sensitive
40346 int is_sensitive()() nothrow {
40347 return gtk_widget_is_sensitive(&this);
40350 // VERSION: 2.18
40351 // Determines whether @widget is a toplevel widget. Currently only
40352 // #GtkWindow and #GtkInvisible are toplevel widgets. Toplevel
40353 // widgets have no parent widget.
40354 // RETURNS: %TRUE if @widget is a toplevel, %FALSE otherwise
40355 int is_toplevel()() nothrow {
40356 return gtk_widget_is_toplevel(&this);
40359 // VERSION: 2.12
40360 // This function should be called whenever keyboard navigation within
40361 // a single widget hits a boundary. The function emits the
40362 // #GtkWidget::keynav-failed signal on the widget and its return
40363 // value should be interpreted in a way similar to the return value of
40364 // gtk_widget_child_focus():
40366 // When %TRUE is returned, stay in the widget, the failed keyboard
40367 // navigation is Ok and/or there is nowhere we can/should move the
40368 // focus to.
40370 // When %FALSE is returned, the caller should continue with keyboard
40371 // navigation outside the widget, e.g. by calling
40372 // gtk_widget_child_focus() on the widget's toplevel.
40374 // The default ::keynav-failed handler returns %TRUE for
40375 // %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD. For the other
40376 // values of #GtkDirectionType, it looks at the
40377 // #GtkSettings:gtk-keynav-cursor-only setting and returns %FALSE
40378 // if the setting is %TRUE. This way the entire user interface
40379 // becomes cursor-navigatable on input devices such as mobile phones
40380 // which only have cursor keys but no tab key.
40382 // Whenever the default handler returns %TRUE, it also calls
40383 // gtk_widget_error_bell() to notify the user of the failed keyboard
40384 // navigation.
40386 // A use case for providing an own implementation of ::keynav-failed
40387 // (either by connecting to it or by overriding it) would be a row of
40388 // #GtkEntry widgets where the user should be able to navigate the
40389 // entire row with the cursor keys, as e.g. known from user interfaces
40390 // that require entering license keys.
40392 // if the emitting widget should try to handle the keyboard
40393 // navigation attempt in its parent container(s).
40394 // RETURNS: %TRUE if stopping keyboard navigation is fine, %FALSE
40395 // <direction>: direction of focus movement
40396 int keynav_failed()(DirectionType direction) nothrow {
40397 return gtk_widget_keynav_failed(&this, direction);
40400 // Lists the closures used by @widget for accelerator group connections
40401 // with gtk_accel_group_connect_by_path() or gtk_accel_group_connect().
40402 // The closures can be used to monitor accelerator changes on @widget,
40403 // by connecting to the @GtkAccelGroup::accel-changed signal of the
40404 // #GtkAccelGroup of a closure which can be found out with
40405 // gtk_accel_group_from_accel_closure().
40407 // a newly allocated #GList of closures
40408 GLib2.List* /*new container*/ list_accel_closures()() nothrow {
40409 return gtk_widget_list_accel_closures(&this);
40412 // VERSION: 2.4
40413 // Returns a newly allocated list of the widgets, normally labels, for
40414 // which this widget is a the target of a mnemonic (see for example,
40415 // gtk_label_set_mnemonic_widget()).
40416 // The widgets in the list are not individually referenced. If you
40417 // want to iterate through the list and perform actions involving
40418 // callbacks that might destroy the widgets, you
40419 // <emphasis>must</emphasis> call <literal>g_list_foreach (result,
40420 // (GFunc)g_object_ref, NULL)</literal> first, and then unref all the
40421 // widgets afterwards.
40422 // mnemonic labels; free this list
40423 // with g_list_free() when you are done with it.
40424 // RETURNS: the list of
40425 GLib2.List* /*new container*/ list_mnemonic_labels()() nothrow {
40426 return gtk_widget_list_mnemonic_labels(&this);
40429 // This function is only for use in widget implementations. Causes
40430 // a widget to be mapped if it isn't already.
40431 void map()() nothrow {
40432 gtk_widget_map(&this);
40435 // Emits the #GtkWidget::mnemonic-activate signal.
40437 // The default handler for this signal activates the @widget if
40438 // @group_cycling is %FALSE, and just grabs the focus if @group_cycling
40439 // is %TRUE.
40440 // RETURNS: %TRUE if the signal has been handled
40441 // <group_cycling>: %TRUE if there are other widgets with the same mnemonic
40442 int mnemonic_activate()(int group_cycling) nothrow {
40443 return gtk_widget_mnemonic_activate(&this, group_cycling);
40446 // Sets the base color for a widget in a particular state.
40447 // All other style values are left untouched. The base color
40448 // is the background color used along with the text color
40449 // (see gtk_widget_modify_text()) for widgets such as #GtkEntry
40450 // and #GtkTextView. See also gtk_widget_modify_style().
40452 // Note that "no window" widgets (which have the %GTK_NO_WINDOW flag set)
40453 // draw on their parent container's window and thus may not draw any
40454 // background themselves. This is the case for e.g. #GtkLabel. To modify
40455 // the background of such widgets, you have to set the base color on their
40456 // parent; if you want to set the background of a rectangular area around
40457 // a label, try placing the label in a #GtkEventBox widget and setting
40458 // the base color on that.
40459 // <state>: the state for which to set the base color
40460 // <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().
40461 void modify_base(AT0)(StateType state, AT0 /*Gdk2.Color*/ color=null) nothrow {
40462 gtk_widget_modify_base(&this, state, UpCast!(Gdk2.Color*)(color));
40465 // Sets the background color for a widget in a particular state.
40466 // All other style values are left untouched. See also
40467 // gtk_widget_modify_style().
40469 // Note that "no window" widgets (which have the %GTK_NO_WINDOW flag set)
40470 // draw on their parent container's window and thus may not draw any
40471 // background themselves. This is the case for e.g. #GtkLabel. To modify
40472 // the background of such widgets, you have to set the background color
40473 // on their parent; if you want to set the background of a rectangular
40474 // area around a label, try placing the label in a #GtkEventBox widget
40475 // and setting the background color on that.
40476 // <state>: the state for which to set the background color
40477 // <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().
40478 void modify_bg(AT0)(StateType state, AT0 /*Gdk2.Color*/ color=null) nothrow {
40479 gtk_widget_modify_bg(&this, state, UpCast!(Gdk2.Color*)(color));
40482 // VERSION: 2.12
40483 // Sets the cursor color to use in a widget, overriding the
40484 // #GtkWidget:cursor-color and #GtkWidget:secondary-cursor-color
40485 // style properties. All other style values are left untouched.
40486 // See also gtk_widget_modify_style().
40487 // <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().
40488 // <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().
40489 void modify_cursor(AT0, AT1)(AT0 /*Gdk2.Color*/ primary, AT1 /*Gdk2.Color*/ secondary) nothrow {
40490 gtk_widget_modify_cursor(&this, UpCast!(Gdk2.Color*)(primary), UpCast!(Gdk2.Color*)(secondary));
40493 // Sets the foreground color for a widget in a particular state.
40494 // All other style values are left untouched. See also
40495 // gtk_widget_modify_style().
40496 // <state>: the state for which to set the foreground color
40497 // <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().
40498 void modify_fg(AT0)(StateType state, AT0 /*Gdk2.Color*/ color=null) nothrow {
40499 gtk_widget_modify_fg(&this, state, UpCast!(Gdk2.Color*)(color));
40502 // Sets the font to use for a widget. All other style values are left
40503 // untouched. See also gtk_widget_modify_style().
40504 // <font_desc>: the font description to use, or %NULL to undo the effect of previous calls to gtk_widget_modify_font().
40505 void modify_font(AT0)(AT0 /*Pango.FontDescription*/ font_desc=null) nothrow {
40506 gtk_widget_modify_font(&this, UpCast!(Pango.FontDescription*)(font_desc));
40509 // Modifies style values on the widget. Modifications made using this
40510 // technique take precedence over style values set via an RC file,
40511 // however, they will be overriden if a style is explicitely set on
40512 // the widget using gtk_widget_set_style(). The #GtkRcStyle structure
40513 // is designed so each field can either be set or unset, so it is
40514 // possible, using this function, to modify some style values and
40515 // leave the others unchanged.
40517 // Note that modifications made with this function are not cumulative
40518 // with previous calls to gtk_widget_modify_style() or with such
40519 // functions as gtk_widget_modify_fg(). If you wish to retain
40520 // previous values, you must first call gtk_widget_get_modifier_style(),
40521 // make your modifications to the returned style, then call
40522 // gtk_widget_modify_style() with that style. On the other hand,
40523 // if you first call gtk_widget_modify_style(), subsequent calls
40524 // to such functions gtk_widget_modify_fg() will have a cumulative
40525 // effect with the initial modifications.
40526 // <style>: the #GtkRcStyle holding the style modifications
40527 void modify_style(AT0)(AT0 /*RcStyle*/ style) nothrow {
40528 gtk_widget_modify_style(&this, UpCast!(RcStyle*)(style));
40531 // Sets the text color for a widget in a particular state. All other
40532 // style values are left untouched. The text color is the foreground
40533 // color used along with the base color (see gtk_widget_modify_base())
40534 // for widgets such as #GtkEntry and #GtkTextView. See also
40535 // gtk_widget_modify_style().
40536 // <state>: the state for which to set the text color
40537 // <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().
40538 void modify_text(AT0)(StateType state, AT0 /*Gdk2.Color*/ color=null) nothrow {
40539 gtk_widget_modify_text(&this, state, UpCast!(Gdk2.Color*)(color));
40542 // Obtains the full path to @widget. The path is simply the name of a
40543 // widget and all its parents in the container hierarchy, separated by
40544 // periods. The name of a widget comes from
40545 // gtk_widget_get_name(). Paths are used to apply styles to a widget
40546 // in gtkrc configuration files. Widget names are the type of the
40547 // widget by default (e.g. "GtkButton") or can be set to an
40548 // application-specific value with gtk_widget_set_name(). By setting
40549 // the name of a widget, you allow users or theme authors to apply
40550 // styles to that specific widget in their gtkrc
40551 // file. @path_reversed_p fills in the path in reverse order,
40552 // i.e. starting with @widget's name instead of starting with the name
40553 // of @widget's outermost ancestor.
40554 // <path_length>: location to store length of the path, or %NULL
40555 // <path>: location to store allocated path string, or %NULL
40556 // <path_reversed>: location to store allocated reverse path string, or %NULL
40557 void path(AT0, AT1, AT2)(/*out*/ AT0 /*uint*/ path_length=null, /*out*/ AT1 /*char**/ path=null, /*out*/ AT2 /*char**/ path_reversed=null) nothrow {
40558 gtk_widget_path(&this, UpCast!(uint*)(path_length), toCString!(char**)(path), toCString!(char**)(path_reversed));
40561 // DEPRECATED (v2.2) method: queue_clear - Use gtk_widget_queue_draw() instead.
40562 // This function does the same as gtk_widget_queue_draw().
40563 void queue_clear()() nothrow {
40564 gtk_widget_queue_clear(&this);
40567 // DEPRECATED (v2.2) method: queue_clear_area - Use gtk_widget_queue_draw_area() instead.
40568 // This function is no longer different from
40569 // gtk_widget_queue_draw_area(), though it once was. Now it just calls
40570 // gtk_widget_queue_draw_area(). Originally
40571 // gtk_widget_queue_clear_area() would force a redraw of the
40572 // background for %GTK_NO_WINDOW widgets, and
40573 // gtk_widget_queue_draw_area() would not. Now both functions ensure
40574 // the background will be redrawn.
40575 // <x>: x coordinate of upper-left corner of rectangle to redraw
40576 // <y>: y coordinate of upper-left corner of rectangle to redraw
40577 // <width>: width of region to draw
40578 // <height>: height of region to draw
40579 void queue_clear_area()(int x, int y, int width, int height) nothrow {
40580 gtk_widget_queue_clear_area(&this, x, y, width, height);
40583 // Equivalent to calling gtk_widget_queue_draw_area() for the
40584 // entire area of a widget.
40585 void queue_draw()() nothrow {
40586 gtk_widget_queue_draw(&this);
40589 // Invalidates the rectangular area of @widget defined by @x, @y,
40590 // @width and @height by calling gdk_window_invalidate_rect() on the
40591 // widget's window and all its child windows. Once the main loop
40592 // becomes idle (after the current batch of events has been processed,
40593 // roughly), the window will receive expose events for the union of
40594 // all regions that have been invalidated.
40596 // Normally you would only use this function in widget
40597 // implementations. You might also use it, or
40598 // gdk_window_invalidate_rect() directly, to schedule a redraw of a
40599 // #GtkDrawingArea or some portion thereof.
40601 // Frequently you can just call gdk_window_invalidate_rect() or
40602 // gdk_window_invalidate_region() instead of this function. Those
40603 // functions will invalidate only a single window, instead of the
40604 // widget and all its children.
40606 // The advantage of adding to the invalidated region compared to
40607 // simply drawing immediately is efficiency; using an invalid region
40608 // ensures that you only have to redraw one time.
40609 // <x>: x coordinate of upper-left corner of rectangle to redraw
40610 // <y>: y coordinate of upper-left corner of rectangle to redraw
40611 // <width>: width of region to draw
40612 // <height>: height of region to draw
40613 void queue_draw_area()(int x, int y, int width, int height) nothrow {
40614 gtk_widget_queue_draw_area(&this, x, y, width, height);
40617 // This function is only for use in widget implementations.
40618 // Flags a widget to have its size renegotiated; should
40619 // be called when a widget for some reason has a new size request.
40620 // For example, when you change the text in a #GtkLabel, #GtkLabel
40621 // queues a resize to ensure there's enough space for the new text.
40622 void queue_resize()() nothrow {
40623 gtk_widget_queue_resize(&this);
40626 // VERSION: 2.4
40627 // This function works like gtk_widget_queue_resize(),
40628 // except that the widget is not invalidated.
40629 void queue_resize_no_redraw()() nothrow {
40630 gtk_widget_queue_resize_no_redraw(&this);
40633 // Creates the GDK (windowing system) resources associated with a
40634 // widget. For example, @widget->window will be created when a widget
40635 // is realized. Normally realization happens implicitly; if you show
40636 // a widget and all its parent containers, then the widget will be
40637 // realized and mapped automatically.
40639 // Realizing a widget requires all
40640 // the widget's parent widgets to be realized; calling
40641 // gtk_widget_realize() realizes the widget's parents in addition to
40642 // @widget itself. If a widget is not yet inside a toplevel window
40643 // when you realize it, bad things will happen.
40645 // This function is primarily used in widget implementations, and
40646 // isn't very useful otherwise. Many times when you think you might
40647 // need it, a better approach is to connect to a signal that will be
40648 // called after the widget is realized automatically, such as
40649 // GtkWidget::expose-event. Or simply g_signal_connect () to the
40650 // GtkWidget::realize signal.
40651 void realize()() nothrow {
40652 gtk_widget_realize(&this);
40655 // Unintrospectable method: ref() / gtk_widget_ref()
40656 // DEPRECATED (v2.12) method: ref - Use g_object_ref() instead.
40657 // Adds a reference to a widget. This function is exactly the same
40658 // as calling g_object_ref(), and exists mostly for historical
40659 // reasons. It can still be convenient to avoid casting a widget
40660 // to a #GObject, it saves a small amount of typing.
40661 // RETURNS: the widget that was referenced
40662 Widget* ref_()() nothrow {
40663 return gtk_widget_ref(&this);
40666 // Unintrospectable method: region_intersect() / gtk_widget_region_intersect()
40667 // Computes the intersection of a @widget's area and @region, returning
40668 // the intersection. The result may be empty, use gdk_region_empty() to
40669 // check.
40670 // 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.
40671 // <region>: a #GdkRegion, in the same coordinate system as @widget->allocation. That is, relative to @widget->window for %NO_WINDOW widgets; relative to the parent window of @widget->window for widgets with their own window.
40672 Gdk2.Region* region_intersect(AT0)(AT0 /*Gdk2.Region*/ region) nothrow {
40673 return gtk_widget_region_intersect(&this, UpCast!(Gdk2.Region*)(region));
40676 // Removes an accelerator from @widget, previously installed with
40677 // gtk_widget_add_accelerator().
40678 // RETURNS: whether an accelerator was installed and could be removed
40679 // <accel_group>: accel group for this widget
40680 // <accel_key>: GDK keyval of the accelerator
40681 // <accel_mods>: modifier key combination of the accelerator
40682 int remove_accelerator(AT0)(AT0 /*AccelGroup*/ accel_group, uint accel_key, Gdk2.ModifierType accel_mods) nothrow {
40683 return gtk_widget_remove_accelerator(&this, UpCast!(AccelGroup*)(accel_group), accel_key, accel_mods);
40686 // VERSION: 2.4
40687 // Removes a widget from the list of mnemonic labels for
40688 // this widget. (See gtk_widget_list_mnemonic_labels()). The widget
40689 // must have previously been added to the list with
40690 // gtk_widget_add_mnemonic_label().
40691 // <label>: a #GtkWidget that was previously set as a mnemnic label for @widget with gtk_widget_add_mnemonic_label().
40692 void remove_mnemonic_label(AT0)(AT0 /*Widget*/ label) nothrow {
40693 gtk_widget_remove_mnemonic_label(&this, UpCast!(Widget*)(label));
40696 // A convenience function that uses the theme engine and RC file
40697 // settings for @widget to look up @stock_id and render it to
40698 // a pixbuf. @stock_id should be a stock icon ID such as
40699 // #GTK_STOCK_OPEN or #GTK_STOCK_OK. @size should be a size
40700 // such as #GTK_ICON_SIZE_MENU. @detail should be a string that
40701 // identifies the widget or code doing the rendering, so that
40702 // theme engines can special-case rendering for that widget or code.
40704 // The pixels in the returned #GdkPixbuf are shared with the rest of
40705 // the application and should not be modified. The pixbuf should be freed
40706 // after use with g_object_unref().
40708 // stock ID wasn't known
40709 // RETURNS: a new pixbuf, or %NULL if the
40710 // <stock_id>: a stock ID
40711 // <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).
40712 // <detail>: render detail to pass to theme engine
40713 GdkPixbuf2.Pixbuf* /*new*/ render_icon(AT0, AT1)(AT0 /*char*/ stock_id, IconSize size, AT1 /*char*/ detail=null) nothrow {
40714 return gtk_widget_render_icon(&this, toCString!(char*)(stock_id), size, toCString!(char*)(detail));
40717 // Moves a widget from one #GtkContainer to another, handling reference
40718 // count issues to avoid destroying the widget.
40719 // <new_parent>: a #GtkContainer to move the widget into
40720 void reparent(AT0)(AT0 /*Widget*/ new_parent) nothrow {
40721 gtk_widget_reparent(&this, UpCast!(Widget*)(new_parent));
40724 // Reset the styles of @widget and all descendents, so when
40725 // they are looked up again, they get the correct values
40726 // for the currently loaded RC file settings.
40728 // This function is not useful for applications.
40729 void reset_rc_styles()() nothrow {
40730 gtk_widget_reset_rc_styles(&this);
40733 // DEPRECATED method: reset_shapes - This function is being removed in GTK+ 3.0. Don't use it.
40734 // Recursively resets the shape on this widget and its descendants.
40735 void reset_shapes()() nothrow {
40736 gtk_widget_reset_shapes(&this);
40739 // Very rarely-used function. This function is used to emit
40740 // an expose event signals on a widget. This function is not
40741 // normally used directly. The only time it is used is when
40742 // propagating an expose event to a child %NO_WINDOW widget, and
40743 // that is normally done using gtk_container_propagate_expose().
40745 // If you want to force an area of a window to be redrawn,
40746 // use gdk_window_invalidate_rect() or gdk_window_invalidate_region().
40747 // To cause the redraw to be done immediately, follow that call
40748 // with a call to gdk_window_process_updates().
40750 // the event was handled)
40751 // RETURNS: return from the event signal emission (%TRUE if
40752 // <event>: a expose #GdkEvent
40753 int send_expose(AT0)(AT0 /*Gdk2.Event*/ event) nothrow {
40754 return gtk_widget_send_expose(&this, UpCast!(Gdk2.Event*)(event));
40757 // VERSION: 2.22
40758 // Sends the focus change @event to @widget
40760 // This function is not meant to be used by applications. The only time it
40761 // should be used is when it is necessary for a #GtkWidget to assign focus
40762 // to a widget that is semantically owned by the first widget even though
40763 // it's not a direct child - for instance, a search entry in a floating
40764 // window similar to the quick search in #GtkTreeView.
40766 // An example of its usage is:
40768 // |[
40769 // GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
40771 // fevent->focus_change.type = GDK_FOCUS_CHANGE;
40772 // fevent->focus_change.in = TRUE;
40773 // fevent->focus_change.window = gtk_widget_get_window (widget);
40774 // if (fevent->focus_change.window != NULL)
40775 // g_object_ref (fevent->focus_change.window);
40777 // gtk_widget_send_focus_change (widget, fevent);
40779 // gdk_event_free (event);
40780 // ]|
40782 // if the event was handled, and %FALSE otherwise
40783 // RETURNS: the return value from the event signal emission: %TRUE
40784 // <event>: a #GdkEvent of type GDK_FOCUS_CHANGE
40785 int send_focus_change(AT0)(AT0 /*Gdk2.Event*/ event) nothrow {
40786 return gtk_widget_send_focus_change(&this, UpCast!(Gdk2.Event*)(event));
40789 // Unintrospectable method: set() / gtk_widget_set()
40790 // DEPRECATED (v2.0) method: set - Use g_object_set() instead.
40791 // Precursor of g_object_set().
40792 // <first_property_name>: name of first property to set
40793 /+ Not available -- variadic methods unsupported - use the C function directly.
40794 alias gtk_widget_set set; // Variadic
40797 // Given an accelerator group, @accel_group, and an accelerator path,
40798 // @accel_path, sets up an accelerator in @accel_group so whenever the
40799 // key binding that is defined for @accel_path is pressed, @widget
40800 // will be activated. This removes any accelerators (for any
40801 // accelerator group) installed by previous calls to
40802 // gtk_widget_set_accel_path(). Associating accelerators with
40803 // paths allows them to be modified by the user and the modifications
40804 // to be saved for future use. (See gtk_accel_map_save().)
40806 // This function is a low level function that would most likely
40807 // be used by a menu creation system like #GtkUIManager. If you
40808 // use #GtkUIManager, setting up accelerator paths will be done
40809 // automatically.
40811 // Even when you you aren't using #GtkUIManager, if you only want to
40812 // set up accelerators on menu items gtk_menu_item_set_accel_path()
40813 // provides a somewhat more convenient interface.
40815 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
40816 // pass a static string, you can save some memory by interning it first with
40817 // g_intern_static_string().
40818 // <accel_path>: path used to look up the accelerator
40819 // <accel_group>: a #GtkAccelGroup.
40820 void set_accel_path(AT0, AT1)(AT0 /*char*/ accel_path=null, AT1 /*AccelGroup*/ accel_group=null) nothrow {
40821 gtk_widget_set_accel_path(&this, toCString!(char*)(accel_path), UpCast!(AccelGroup*)(accel_group));
40824 // VERSION: 2.18
40825 // Sets the widget's allocation. This should not be used
40826 // directly, but from within a widget's size_allocate method.
40827 // <allocation>: a pointer to a #GtkAllocation to copy from
40828 void set_allocation(AT0)(AT0 /*Allocation*/ allocation) nothrow {
40829 gtk_widget_set_allocation(&this, UpCast!(Allocation*)(allocation));
40832 // Sets whether the application intends to draw on the widget in
40833 // an #GtkWidget::expose-event handler.
40835 // This is a hint to the widget and does not affect the behavior of
40836 // the GTK+ core; many widgets ignore this flag entirely. For widgets
40837 // that do pay attention to the flag, such as #GtkEventBox and #GtkWindow,
40838 // the effect is to suppress default themed drawing of the widget's
40839 // background. (Children of the widget will still be drawn.) The application
40840 // is then entirely responsible for drawing the widget background.
40842 // Note that the background is still drawn when the widget is mapped.
40843 // If this is not suitable (e.g. because you want to make a transparent
40844 // window using an RGBA visual), you can work around this by doing:
40845 // |[
40846 // gtk_widget_realize (window);
40847 // gdk_window_set_back_pixmap (window->window, NULL, FALSE);
40848 // gtk_widget_show (window);
40849 // ]|
40850 // <app_paintable>: %TRUE if the application will paint on the widget
40851 void set_app_paintable()(int app_paintable) nothrow {
40852 gtk_widget_set_app_paintable(&this, app_paintable);
40855 // VERSION: 2.18
40856 // Specifies whether @widget can be a default widget. See
40857 // gtk_widget_grab_default() for details about the meaning of
40858 // "default".
40859 // <can_default>: whether or not @widget can be a default widget.
40860 void set_can_default()(int can_default) nothrow {
40861 gtk_widget_set_can_default(&this, can_default);
40864 // VERSION: 2.18
40865 // Specifies whether @widget can own the input focus. See
40866 // gtk_widget_grab_focus() for actually setting the input focus on a
40867 // widget.
40868 // <can_focus>: whether or not @widget can own the input focus.
40869 void set_can_focus()(int can_focus) nothrow {
40870 gtk_widget_set_can_focus(&this, can_focus);
40873 // Sets whether @widget should be mapped along with its when its parent
40874 // is mapped and @widget has been shown with gtk_widget_show().
40876 // The child visibility can be set for widget before it is added to
40877 // a container with gtk_widget_set_parent(), to avoid mapping
40878 // children unnecessary before immediately unmapping them. However
40879 // it will be reset to its default state of %TRUE when the widget
40880 // is removed from a container.
40882 // Note that changing the child visibility of a widget does not
40883 // queue a resize on the widget. Most of the time, the size of
40884 // a widget is computed from all visible children, whether or
40885 // not they are mapped. If this is not the case, the container
40886 // can queue a resize itself.
40888 // This function is only useful for container implementations and
40889 // never should be called by an application.
40890 // <is_visible>: if %TRUE, @widget should be mapped along with its parent.
40891 void set_child_visible()(int is_visible) nothrow {
40892 gtk_widget_set_child_visible(&this, is_visible);
40895 // Sets the colormap for the widget to the given value. Widget must not
40896 // have been previously realized. This probably should only be used
40897 // from an <function>init()</function> function (i.e. from the constructor
40898 // for the widget).
40899 // <colormap>: a colormap
40900 void set_colormap(AT0)(AT0 /*Gdk2.Colormap*/ colormap) nothrow {
40901 gtk_widget_set_colormap(&this, UpCast!(Gdk2.Colormap*)(colormap));
40904 // Sets a widgets composite name. The widget must be
40905 // a composite child of its parent; see gtk_widget_push_composite_child().
40906 // <name>: the name to set
40907 void set_composite_name(AT0)(AT0 /*char*/ name) nothrow {
40908 gtk_widget_set_composite_name(&this, toCString!(char*)(name));
40911 // Sets the reading direction on a particular widget. This direction
40912 // controls the primary direction for widgets containing text,
40913 // and also the direction in which the children of a container are
40914 // packed. The ability to set the direction is present in order
40915 // so that correct localization into languages with right-to-left
40916 // reading directions can be done. Generally, applications will
40917 // let the default reading direction present, except for containers
40918 // where the containers are arranged in an order that is explicitely
40919 // visual rather than logical (such as buttons for text justification).
40921 // If the direction is set to %GTK_TEXT_DIR_NONE, then the value
40922 // set by gtk_widget_set_default_direction() will be used.
40923 // <dir>: the new direction
40924 void set_direction()(TextDirection dir) nothrow {
40925 gtk_widget_set_direction(&this, dir);
40928 // Widgets are double buffered by default; you can use this function
40929 // to turn off the buffering. "Double buffered" simply means that
40930 // gdk_window_begin_paint_region() and gdk_window_end_paint() are called
40931 // automatically around expose events sent to the
40932 // widget. gdk_window_begin_paint() diverts all drawing to a widget's
40933 // window to an offscreen buffer, and gdk_window_end_paint() draws the
40934 // buffer to the screen. The result is that users see the window
40935 // update in one smooth step, and don't see individual graphics
40936 // primitives being rendered.
40938 // In very simple terms, double buffered widgets don't flicker,
40939 // so you would only use this function to turn off double buffering
40940 // if you had special needs and really knew what you were doing.
40942 // Note: if you turn off double-buffering, you have to handle
40943 // expose events, since even the clearing to the background color or
40944 // pixmap will not happen automatically (as it is done in
40945 // gdk_window_begin_paint()).
40946 // <double_buffered>: %TRUE to double-buffer a widget
40947 void set_double_buffered()(int double_buffered) nothrow {
40948 gtk_widget_set_double_buffered(&this, double_buffered);
40951 // Sets the event mask (see #GdkEventMask) for a widget. The event
40952 // mask determines which events a widget will receive. Keep in mind
40953 // that different widgets have different default event masks, and by
40954 // changing the event mask you may disrupt a widget's functionality,
40955 // so be careful. This function must be called while a widget is
40956 // unrealized. Consider gtk_widget_add_events() for widgets that are
40957 // already realized, or if you want to preserve the existing event
40958 // mask. This function can't be used with #GTK_NO_WINDOW widgets;
40959 // to get events on those widgets, place them inside a #GtkEventBox
40960 // and receive events on the event box.
40961 // <events>: event mask
40962 void set_events()(int events) nothrow {
40963 gtk_widget_set_events(&this, events);
40966 // Sets the extension events mask to @mode. See #GdkExtensionMode
40967 // and gdk_input_set_extension_events().
40968 // <mode>: bitfield of extension events to receive
40969 void set_extension_events()(Gdk2.ExtensionMode mode) nothrow {
40970 gtk_widget_set_extension_events(&this, mode);
40973 // VERSION: 2.12
40974 // Sets the has-tooltip property on @widget to @has_tooltip. See
40975 // GtkWidget:has-tooltip for more information.
40976 // <has_tooltip>: whether or not @widget has a tooltip.
40977 void set_has_tooltip()(int has_tooltip) nothrow {
40978 gtk_widget_set_has_tooltip(&this, has_tooltip);
40981 // VERSION: 2.18
40982 // Specifies whether @widget has a #GdkWindow of its own. Note that
40983 // all realized widgets have a non-%NULL "window" pointer
40984 // (gtk_widget_get_window() never returns a %NULL window when a widget
40985 // is realized), but for many of them it's actually the #GdkWindow of
40986 // one of its parent widgets. Widgets that do not create a %window for
40987 // themselves in GtkWidget::realize() must announce this by
40988 // calling this function with @has_window = %FALSE.
40990 // This function should only be called by widget implementations,
40991 // and they should call it in their init() function.
40992 // <has_window>: whether or not @widget has a window.
40993 void set_has_window()(int has_window) nothrow {
40994 gtk_widget_set_has_window(&this, has_window);
40997 // VERSION: 2.20
40998 // Marks the widget as being realized.
41000 // This function should only ever be called in a derived widget's
41001 // "map" or "unmap" implementation.
41002 // <mapped>: %TRUE to mark the widget as mapped
41003 void set_mapped()(int mapped) nothrow {
41004 gtk_widget_set_mapped(&this, mapped);
41007 // Widgets can be named, which allows you to refer to them from a
41008 // gtkrc file. You can apply a style to widgets with a particular name
41009 // in the gtkrc file. See the documentation for gtkrc files (on the
41010 // same page as the docs for #GtkRcStyle).
41012 // Note that widget names are separated by periods in paths (see
41013 // gtk_widget_path()), so names with embedded periods may cause confusion.
41014 // <name>: name for the widget
41015 void set_name(AT0)(AT0 /*char*/ name) nothrow {
41016 gtk_widget_set_name(&this, toCString!(char*)(name));
41019 // VERSION: 2.4
41020 // Sets the #GtkWidget:no-show-all property, which determines whether
41021 // calls to gtk_widget_show_all() and gtk_widget_hide_all() will affect
41022 // this widget.
41024 // This is mostly for use in constructing widget hierarchies with externally
41025 // controlled visibility, see #GtkUIManager.
41026 // <no_show_all>: the new value for the "no-show-all" property
41027 void set_no_show_all()(int no_show_all) nothrow {
41028 gtk_widget_set_no_show_all(&this, no_show_all);
41031 // This function is useful only when implementing subclasses of
41032 // #GtkContainer.
41033 // Sets the container as the parent of @widget, and takes care of
41034 // some details such as updating the state and style of the child
41035 // to reflect its new location. The opposite function is
41036 // gtk_widget_unparent().
41037 // <parent>: parent container
41038 void set_parent(AT0)(AT0 /*Widget*/ parent) nothrow {
41039 gtk_widget_set_parent(&this, UpCast!(Widget*)(parent));
41042 // Sets a non default parent window for @widget.
41043 // <parent_window>: the new parent window.
41044 void set_parent_window(AT0)(AT0 /*Gdk2.Window*/ parent_window) nothrow {
41045 gtk_widget_set_parent_window(&this, UpCast!(Gdk2.Window*)(parent_window));
41048 // VERSION: 2.20
41049 // Marks the widget as being realized.
41051 // This function should only ever be called in a derived widget's
41052 // "realize" or "unrealize" implementation.
41053 // <realized>: %TRUE to mark the widget as realized
41054 void set_realized()(int realized) nothrow {
41055 gtk_widget_set_realized(&this, realized);
41058 // VERSION: 2.18
41059 // Specifies whether @widget will be treated as the default widget
41060 // within its toplevel when it has the focus, even if another widget
41061 // is the default.
41063 // See gtk_widget_grab_default() for details about the meaning of
41064 // "default".
41065 // <receives_default>: whether or not @widget can be a default widget.
41066 void set_receives_default()(int receives_default) nothrow {
41067 gtk_widget_set_receives_default(&this, receives_default);
41070 // Sets whether the entire widget is queued for drawing when its size
41071 // allocation changes. By default, this setting is %TRUE and
41072 // the entire widget is redrawn on every size change. If your widget
41073 // leaves the upper left unchanged when made bigger, turning this
41074 // setting off will improve performance.
41075 // Note that for %NO_WINDOW widgets setting this flag to %FALSE turns
41076 // off all allocation on resizing: the widget will not even redraw if
41077 // its position changes; this is to allow containers that don't draw
41078 // anything to avoid excess invalidations. If you set this flag on a
41079 // %NO_WINDOW widget that <emphasis>does</emphasis> draw on @widget->window,
41080 // you are responsible for invalidating both the old and new allocation
41081 // of the widget when the widget is moved and responsible for invalidating
41082 // regions newly when the widget increases size.
41083 // <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.
41084 void set_redraw_on_allocate()(int redraw_on_allocate) nothrow {
41085 gtk_widget_set_redraw_on_allocate(&this, redraw_on_allocate);
41088 // For widgets that support scrolling, sets the scroll adjustments and
41089 // returns %TRUE. For widgets that don't support scrolling, does
41090 // nothing and returns %FALSE. Widgets that don't support scrolling
41091 // can be scrolled by placing them in a #GtkViewport, which does
41092 // support scrolling.
41093 // RETURNS: %TRUE if the widget supports scrolling
41094 // <hadjustment>: an adjustment for horizontal scrolling, or %NULL
41095 // <vadjustment>: an adjustment for vertical scrolling, or %NULL
41096 int set_scroll_adjustments(AT0, AT1)(AT0 /*Adjustment*/ hadjustment=null, AT1 /*Adjustment*/ vadjustment=null) nothrow {
41097 return gtk_widget_set_scroll_adjustments(&this, UpCast!(Adjustment*)(hadjustment), UpCast!(Adjustment*)(vadjustment));
41100 // Sets the sensitivity of a widget. A widget is sensitive if the user
41101 // can interact with it. Insensitive widgets are "grayed out" and the
41102 // user can't interact with them. Insensitive widgets are known as
41103 // "inactive", "disabled", or "ghosted" in some other toolkits.
41104 // <sensitive>: %TRUE to make the widget sensitive
41105 void set_sensitive()(int sensitive) nothrow {
41106 gtk_widget_set_sensitive(&this, sensitive);
41109 // Sets the minimum size of a widget; that is, the widget's size
41110 // request will be @width by @height. You can use this function to
41111 // force a widget to be either larger or smaller than it normally
41112 // would be.
41114 // In most cases, gtk_window_set_default_size() is a better choice for
41115 // toplevel windows than this function; setting the default size will
41116 // still allow users to shrink the window. Setting the size request
41117 // will force them to leave the window at least as large as the size
41118 // request. When dealing with window sizes,
41119 // gtk_window_set_geometry_hints() can be a useful function as well.
41121 // Note the inherent danger of setting any fixed size - themes,
41122 // translations into other languages, different fonts, and user action
41123 // can all change the appropriate size for a given widget. So, it's
41124 // basically impossible to hardcode a size that will always be
41125 // correct.
41127 // The size request of a widget is the smallest size a widget can
41128 // accept while still functioning well and drawing itself correctly.
41129 // However in some strange cases a widget may be allocated less than
41130 // its requested size, and in many cases a widget may be allocated more
41131 // space than it requested.
41133 // If the size request in a given direction is -1 (unset), then
41134 // the "natural" size request of the widget will be used instead.
41136 // Widgets can't actually be allocated a size less than 1 by 1, but
41137 // you can pass 0,0 to this function to mean "as small as possible."
41138 // <width>: width @widget should request, or -1 to unset
41139 // <height>: height @widget should request, or -1 to unset
41140 void set_size_request()(int width, int height) nothrow {
41141 gtk_widget_set_size_request(&this, width, height);
41144 // This function is for use in widget implementations. Sets the state
41145 // of a widget (insensitive, prelighted, etc.) Usually you should set
41146 // the state using wrapper functions such as gtk_widget_set_sensitive().
41147 // <state>: new state for @widget
41148 void set_state()(StateType state) nothrow {
41149 gtk_widget_set_state(&this, state);
41152 // Sets the #GtkStyle for a widget (@widget->style). You probably don't
41153 // want to use this function; it interacts badly with themes, because
41154 // themes work by replacing the #GtkStyle. Instead, use
41155 // gtk_widget_modify_style().
41156 // <style>: a #GtkStyle, or %NULL to remove the effect of a previous gtk_widget_set_style() and go back to the default style
41157 void set_style(AT0)(AT0 /*Style*/ style=null) nothrow {
41158 gtk_widget_set_style(&this, UpCast!(Style*)(style));
41161 // VERSION: 2.12
41162 // Sets @markup as the contents of the tooltip, which is marked up with
41163 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
41165 // This function will take care of setting GtkWidget:has-tooltip to %TRUE
41166 // and of the default handler for the GtkWidget::query-tooltip signal.
41168 // See also the GtkWidget:tooltip-markup property and
41169 // gtk_tooltip_set_markup().
41170 // <markup>: the contents of the tooltip for @widget, or %NULL
41171 void set_tooltip_markup(AT0)(AT0 /*char*/ markup=null) nothrow {
41172 gtk_widget_set_tooltip_markup(&this, toCString!(char*)(markup));
41175 // VERSION: 2.12
41176 // Sets @text as the contents of the tooltip. This function will take
41177 // care of setting GtkWidget:has-tooltip to %TRUE and of the default
41178 // handler for the GtkWidget::query-tooltip signal.
41180 // See also the GtkWidget:tooltip-text property and gtk_tooltip_set_text().
41181 // <text>: the contents of the tooltip for @widget
41182 void set_tooltip_text(AT0)(AT0 /*char*/ text) nothrow {
41183 gtk_widget_set_tooltip_text(&this, toCString!(char*)(text));
41186 // VERSION: 2.12
41187 // Replaces the default, usually yellow, window used for displaying
41188 // tooltips with @custom_window. GTK+ will take care of showing and
41189 // hiding @custom_window at the right moment, to behave likewise as
41190 // the default tooltip window. If @custom_window is %NULL, the default
41191 // tooltip window will be used.
41193 // If the custom window should have the default theming it needs to
41194 // have the name "gtk-tooltip", see gtk_widget_set_name().
41195 // <custom_window>: a #GtkWindow, or %NULL
41196 void set_tooltip_window(AT0)(AT0 /*Window*/ custom_window=null) nothrow {
41197 gtk_widget_set_tooltip_window(&this, UpCast!(Window*)(custom_window));
41200 // Sets the position of a widget. The funny "u" in the name comes from
41201 // the "user position" hint specified by the X Window System, and
41202 // exists for legacy reasons. This function doesn't work if a widget
41203 // is inside a container; it's only really useful on #GtkWindow.
41205 // Don't use this function to center dialogs over the main application
41206 // window; most window managers will do the centering on your behalf
41207 // if you call gtk_window_set_transient_for(), and it's really not
41208 // possible to get the centering to work correctly in all cases from
41209 // application code. But if you insist, use gtk_window_set_position()
41210 // to set #GTK_WIN_POS_CENTER_ON_PARENT, don't do the centering
41211 // manually.
41213 // Note that although @x and @y can be individually unset, the position
41214 // is not honoured unless both @x and @y are set.
41215 // <x>: x position; -1 to unset x; -2 to leave x unchanged
41216 // <y>: y position; -1 to unset y; -2 to leave y unchanged
41217 void set_uposition()(int x, int y) nothrow {
41218 gtk_widget_set_uposition(&this, x, y);
41221 // DEPRECATED (v2.2) method: set_usize - Use gtk_widget_set_size_request() instead.
41222 // Sets the minimum size of a widget; that is, the widget's size
41223 // request will be @width by @height. You can use this function to
41224 // force a widget to be either larger or smaller than it is. The
41225 // strange "usize" name dates from the early days of GTK+, and derives
41226 // from X Window System terminology. In many cases,
41227 // gtk_window_set_default_size() is a better choice for toplevel
41228 // windows than this function; setting the default size will still
41229 // allow users to shrink the window. Setting the usize will force them
41230 // to leave the window at least as large as the usize. When dealing
41231 // with window sizes, gtk_window_set_geometry_hints() can be a useful
41232 // function as well.
41234 // Note the inherent danger of setting any fixed size - themes,
41235 // translations into other languages, different fonts, and user action
41236 // can all change the appropriate size for a given widget. So, it's
41237 // basically impossible to hardcode a size that will always be
41238 // correct.
41239 // <width>: minimum width, or -1 to unset
41240 // <height>: minimum height, or -1 to unset
41241 void set_usize()(int width, int height) nothrow {
41242 gtk_widget_set_usize(&this, width, height);
41245 // VERSION: 2.18
41246 // Sets the visibility state of @widget. Note that setting this to
41247 // %TRUE doesn't mean the widget is actually viewable, see
41248 // gtk_widget_get_visible().
41250 // This function simply calls gtk_widget_show() or gtk_widget_hide()
41251 // but is nicer to use when the visibility of the widget depends on
41252 // some condition.
41253 // <visible>: whether the widget should be shown or not
41254 void set_visible()(int visible) nothrow {
41255 gtk_widget_set_visible(&this, visible);
41258 // VERSION: 2.18
41259 // Sets a widget's window. This function should only be used in a
41260 // widget's GtkWidget::realize() implementation. The %window passed is
41261 // usually either new window created with gdk_window_new(), or the
41262 // window of its parent widget as returned by
41263 // gtk_widget_get_parent_window().
41265 // Widgets must indicate whether they will create their own #GdkWindow
41266 // by calling gtk_widget_set_has_window(). This is usually done in the
41267 // widget's init() function.
41268 // <window>: a #GdkWindow
41269 void set_window(AT0)(AT0 /*Gdk2.Window*/ window) nothrow {
41270 gtk_widget_set_window(&this, UpCast!(Gdk2.Window*)(window));
41273 // Sets a shape for this widget's GDK window. This allows for
41274 // transparent windows etc., see gdk_window_shape_combine_mask()
41275 // for more information.
41276 // <shape_mask>: shape to be added, or %NULL to remove an existing shape
41277 // <offset_x>: X position of shape mask with respect to @window
41278 // <offset_y>: Y position of shape mask with respect to @window
41279 void shape_combine_mask(AT0)(AT0 /*Gdk2.Bitmap*/ shape_mask, int offset_x, int offset_y) nothrow {
41280 gtk_widget_shape_combine_mask(&this, UpCast!(Gdk2.Bitmap*)(shape_mask), offset_x, offset_y);
41283 // Flags a widget to be displayed. Any widget that isn't shown will
41284 // not appear on the screen. If you want to show all the widgets in a
41285 // container, it's easier to call gtk_widget_show_all() on the
41286 // container, instead of individually showing the widgets.
41288 // Remember that you have to show the containers containing a widget,
41289 // in addition to the widget itself, before it will appear onscreen.
41291 // When a toplevel container is shown, it is immediately realized and
41292 // mapped; other shown widgets are realized and mapped when their
41293 // toplevel container is realized and mapped.
41294 void show()() nothrow {
41295 gtk_widget_show(&this);
41298 // Recursively shows a widget, and any child widgets (if the widget is
41299 // a container).
41300 void show_all()() nothrow {
41301 gtk_widget_show_all(&this);
41304 // Shows a widget. If the widget is an unmapped toplevel widget
41305 // (i.e. a #GtkWindow that has not yet been shown), enter the main
41306 // loop and wait for the window to actually be mapped. Be careful;
41307 // because the main loop is running, anything can happen during
41308 // this function.
41309 void show_now()() nothrow {
41310 gtk_widget_show_now(&this);
41313 // This function is only used by #GtkContainer subclasses, to assign a size
41314 // and position to their child widgets.
41315 // <allocation>: position and size to be allocated to @widget
41316 void size_allocate(AT0)(AT0 /*Allocation*/ allocation) nothrow {
41317 gtk_widget_size_allocate(&this, UpCast!(Allocation*)(allocation));
41320 // This function is typically used when implementing a #GtkContainer
41321 // subclass. Obtains the preferred size of a widget. The container
41322 // uses this information to arrange its child widgets and decide what
41323 // size allocations to give them with gtk_widget_size_allocate().
41325 // You can also call this function from an application, with some
41326 // caveats. Most notably, getting a size request requires the widget
41327 // to be associated with a screen, because font information may be
41328 // needed. Multihead-aware applications should keep this in mind.
41330 // Also remember that the size request is not necessarily the size
41331 // a widget will actually be allocated.
41333 // See also gtk_widget_get_child_requisition().
41334 // <requisition>: a #GtkRequisition to be filled in
41335 void size_request(AT0)(AT0 /*Requisition*/ requisition) nothrow {
41336 gtk_widget_size_request(&this, UpCast!(Requisition*)(requisition));
41339 // VERSION: 2.20
41340 // This function attaches the widget's #GtkStyle to the widget's
41341 // #GdkWindow. It is a replacement for
41343 // <programlisting>
41344 // widget->style = gtk_style_attach (widget->style, widget->window);
41345 // </programlisting>
41347 // and should only ever be called in a derived widget's "realize"
41348 // implementation which does not chain up to its parent class'
41349 // "realize" implementation, because one of the parent classes
41350 // (finally #GtkWidget) would attach the style itself.
41351 void style_attach()() nothrow {
41352 gtk_widget_style_attach(&this);
41355 // Unintrospectable method: style_get() / gtk_widget_style_get()
41356 // Gets the values of a multiple style properties of @widget.
41357 // <first_property_name>: the name of the first property to get
41358 /+ Not available -- variadic methods unsupported - use the C function directly.
41359 alias gtk_widget_style_get style_get; // Variadic
41362 // Gets the value of a style property of @widget.
41363 // <property_name>: the name of a style property
41364 // <value>: location to return the property value
41365 void style_get_property(AT0, AT1)(AT0 /*char*/ property_name, AT1 /*GObject2.Value*/ value) nothrow {
41366 gtk_widget_style_get_property(&this, toCString!(char*)(property_name), UpCast!(GObject2.Value*)(value));
41369 // Unintrospectable method: style_get_valist() / gtk_widget_style_get_valist()
41370 // Non-vararg variant of gtk_widget_style_get(). Used primarily by language
41371 // bindings.
41372 // <first_property_name>: the name of the first property to get
41373 // <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.
41374 void style_get_valist(AT0)(AT0 /*char*/ first_property_name, va_list var_args) nothrow {
41375 gtk_widget_style_get_valist(&this, toCString!(char*)(first_property_name), var_args);
41378 // Reverts the effect of a previous call to gtk_widget_freeze_child_notify().
41379 // This causes all queued #GtkWidget::child-notify signals on @widget to be
41380 // emitted.
41381 void thaw_child_notify()() nothrow {
41382 gtk_widget_thaw_child_notify(&this);
41385 // Translate coordinates relative to @src_widget's allocation to coordinates
41386 // relative to @dest_widget's allocations. In order to perform this
41387 // operation, both widgets must be realized, and must share a common
41388 // toplevel.
41390 // was no common ancestor. In this case, nothing is stored in
41391 // *@dest_x and *@dest_y. Otherwise %TRUE.
41392 // RETURNS: %FALSE if either widget was not realized, or there
41393 // <dest_widget>: a #GtkWidget
41394 // <src_x>: X position relative to @src_widget
41395 // <src_y>: Y position relative to @src_widget
41396 // <dest_x>: location to store X position relative to @dest_widget
41397 // <dest_y>: location to store Y position relative to @dest_widget
41398 int translate_coordinates(AT0)(AT0 /*Widget*/ dest_widget, int src_x, int src_y, /*out*/ int* dest_x, /*out*/ int* dest_y) nothrow {
41399 return gtk_widget_translate_coordinates(&this, UpCast!(Widget*)(dest_widget), src_x, src_y, dest_x, dest_y);
41402 // VERSION: 2.12
41403 // Triggers a tooltip query on the display where the toplevel of @widget
41404 // is located. See gtk_tooltip_trigger_tooltip_query() for more
41405 // information.
41406 void trigger_tooltip_query()() nothrow {
41407 gtk_widget_trigger_tooltip_query(&this);
41410 // This function is only for use in widget implementations. Causes
41411 // a widget to be unmapped if it's currently mapped.
41412 void unmap()() nothrow {
41413 gtk_widget_unmap(&this);
41416 // This function is only for use in widget implementations.
41417 // Should be called by implementations of the remove method
41418 // on #GtkContainer, to dissociate a child from the container.
41419 void unparent()() nothrow {
41420 gtk_widget_unparent(&this);
41423 // This function is only useful in widget implementations.
41424 // Causes a widget to be unrealized (frees all GDK resources
41425 // associated with the widget, such as @widget->window).
41426 void unrealize()() nothrow {
41427 gtk_widget_unrealize(&this);
41430 // DEPRECATED (v2.12) method: unref - Use g_object_unref() instead.
41431 // Inverse of gtk_widget_ref(). Equivalent to g_object_unref().
41432 void unref()() nothrow {
41433 gtk_widget_unref(&this);
41435 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_accel_closures_changed;
41437 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
41438 return super_.signal_connect!name(cb, data, cf);
41441 ulong signal_connect(string name:"accel-closures-changed", CB/*:signal_accel_closures_changed*/)
41442 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41443 if (is(typeof(cb)==signal_accel_closures_changed)||_ttmm!(CB, signal_accel_closures_changed)()) {
41444 return signal_connect_data!()(&this, cast(char*)"accel-closures-changed",
41445 cast(GObject2.Callback)cb, data, null, cf);
41448 // The ::button-press-event signal will be emitted when a button
41449 // (typically from a mouse) is pressed.
41451 // To receive this signal, the #GdkWindow associated to the
41452 // widget needs to enable the #GDK_BUTTON_PRESS_MASK mask.
41454 // This signal will be sent to the grab widget if there is one.
41456 // %FALSE to propagate the event further.
41457 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41458 // <event>: the #GdkEventButton which triggered this signal.
41459 extern (C) alias static c_int function (Widget* this_, Gdk2.EventButton* event, void* user_data=null) nothrow signal_button_press_event;
41460 ulong signal_connect(string name:"button-press-event", CB/*:signal_button_press_event*/)
41461 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41462 if (is(typeof(cb)==signal_button_press_event)||_ttmm!(CB, signal_button_press_event)()) {
41463 return signal_connect_data!()(&this, cast(char*)"button-press-event",
41464 cast(GObject2.Callback)cb, data, null, cf);
41467 // The ::button-release-event signal will be emitted when a button
41468 // (typically from a mouse) is released.
41470 // To receive this signal, the #GdkWindow associated to the
41471 // widget needs to enable the #GDK_BUTTON_RELEASE_MASK mask.
41473 // This signal will be sent to the grab widget if there is one.
41475 // %FALSE to propagate the event further.
41476 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41477 // <event>: the #GdkEventButton which triggered this signal.
41478 extern (C) alias static c_int function (Widget* this_, Gdk2.EventButton* event, void* user_data=null) nothrow signal_button_release_event;
41479 ulong signal_connect(string name:"button-release-event", CB/*:signal_button_release_event*/)
41480 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41481 if (is(typeof(cb)==signal_button_release_event)||_ttmm!(CB, signal_button_release_event)()) {
41482 return signal_connect_data!()(&this, cast(char*)"button-release-event",
41483 cast(GObject2.Callback)cb, data, null, cf);
41486 // Determines whether an accelerator that activates the signal
41487 // identified by @signal_id can currently be activated.
41488 // This signal is present to allow applications and derived
41489 // widgets to override the default #GtkWidget handling
41490 // for determining whether an accelerator can be activated.
41491 // RETURNS: %TRUE if the signal can be activated.
41492 // <signal_id>: the ID of a signal installed on @widget
41493 extern (C) alias static c_int function (Widget* this_, c_uint signal_id, void* user_data=null) nothrow signal_can_activate_accel;
41494 ulong signal_connect(string name:"can-activate-accel", CB/*:signal_can_activate_accel*/)
41495 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41496 if (is(typeof(cb)==signal_can_activate_accel)||_ttmm!(CB, signal_can_activate_accel)()) {
41497 return signal_connect_data!()(&this, cast(char*)"can-activate-accel",
41498 cast(GObject2.Callback)cb, data, null, cf);
41501 // The ::child-notify signal is emitted for each
41502 // <link linkend="child-properties">child property</link> that has
41503 // changed on an object. The signal's detail holds the property name.
41504 // <pspec>: the #GParamSpec of the changed child property
41505 extern (C) alias static void function (Widget* this_, GObject2.ParamSpec* pspec, void* user_data=null) nothrow signal_child_notify;
41506 ulong signal_connect(string name:"child-notify", CB/*:signal_child_notify*/)
41507 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41508 if (is(typeof(cb)==signal_child_notify)||_ttmm!(CB, signal_child_notify)()) {
41509 return signal_connect_data!()(&this, cast(char*)"child-notify",
41510 cast(GObject2.Callback)cb, data, null, cf);
41513 // The ::client-event will be emitted when the @widget's window
41514 // receives a message (via a ClientMessage event) from another
41515 // application.
41517 // the event. %FALSE to propagate the event further.
41518 // RETURNS: %TRUE to stop other handlers from being invoked for
41519 // <event>: the #GdkEventClient which triggered this signal.
41520 extern (C) alias static c_int function (Widget* this_, Gdk2.EventClient* event, void* user_data=null) nothrow signal_client_event;
41521 ulong signal_connect(string name:"client-event", CB/*:signal_client_event*/)
41522 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41523 if (is(typeof(cb)==signal_client_event)||_ttmm!(CB, signal_client_event)()) {
41524 return signal_connect_data!()(&this, cast(char*)"client-event",
41525 cast(GObject2.Callback)cb, data, null, cf);
41528 // The ::composited-changed signal is emitted when the composited
41529 // status of @widget<!-- -->s screen changes.
41530 // See gdk_screen_is_composited().
41531 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_composited_changed;
41532 ulong signal_connect(string name:"composited-changed", CB/*:signal_composited_changed*/)
41533 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41534 if (is(typeof(cb)==signal_composited_changed)||_ttmm!(CB, signal_composited_changed)()) {
41535 return signal_connect_data!()(&this, cast(char*)"composited-changed",
41536 cast(GObject2.Callback)cb, data, null, cf);
41539 // The ::configure-event signal will be emitted when the size, position or
41540 // stacking of the @widget's window has changed.
41542 // To receive this signal, the #GdkWindow associated to the widget needs
41543 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
41544 // automatically for all new windows.
41546 // %FALSE to propagate the event further.
41547 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41548 // <event>: the #GdkEventConfigure which triggered this signal.
41549 extern (C) alias static c_int function (Widget* this_, Gdk2.EventConfigure* event, void* user_data=null) nothrow signal_configure_event;
41550 ulong signal_connect(string name:"configure-event", CB/*:signal_configure_event*/)
41551 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41552 if (is(typeof(cb)==signal_configure_event)||_ttmm!(CB, signal_configure_event)()) {
41553 return signal_connect_data!()(&this, cast(char*)"configure-event",
41554 cast(GObject2.Callback)cb, data, null, cf);
41557 // VERSION: 2.14
41558 // Emitted when a redirected window belonging to @widget gets drawn into.
41559 // The region/area members of the event shows what area of the redirected
41560 // drawable was drawn into.
41562 // %FALSE to propagate the event further.
41563 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41564 // <event>: the #GdkEventExpose event
41565 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_damage_event;
41566 ulong signal_connect(string name:"damage-event", CB/*:signal_damage_event*/)
41567 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41568 if (is(typeof(cb)==signal_damage_event)||_ttmm!(CB, signal_damage_event)()) {
41569 return signal_connect_data!()(&this, cast(char*)"damage-event",
41570 cast(GObject2.Callback)cb, data, null, cf);
41573 // The ::delete-event signal is emitted if a user requests that
41574 // a toplevel window is closed. The default handler for this signal
41575 // destroys the window. Connecting gtk_widget_hide_on_delete() to
41576 // this signal will cause the window to be hidden instead, so that
41577 // it can later be shown again without reconstructing it.
41579 // %FALSE to propagate the event further.
41580 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41581 // <event>: the event which triggered this signal
41582 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_delete_event;
41583 ulong signal_connect(string name:"delete-event", CB/*:signal_delete_event*/)
41584 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41585 if (is(typeof(cb)==signal_delete_event)||_ttmm!(CB, signal_delete_event)()) {
41586 return signal_connect_data!()(&this, cast(char*)"delete-event",
41587 cast(GObject2.Callback)cb, data, null, cf);
41590 // The ::destroy-event signal is emitted when a #GdkWindow is destroyed.
41591 // You rarely get this signal, because most widgets disconnect themselves
41592 // from their window before they destroy it, so no widget owns the
41593 // window at destroy time.
41595 // To receive this signal, the #GdkWindow associated to the widget needs
41596 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
41597 // automatically for all new windows.
41599 // %FALSE to propagate the event further.
41600 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41601 // <event>: the event which triggered this signal
41602 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_destroy_event;
41603 ulong signal_connect(string name:"destroy-event", CB/*:signal_destroy_event*/)
41604 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41605 if (is(typeof(cb)==signal_destroy_event)||_ttmm!(CB, signal_destroy_event)()) {
41606 return signal_connect_data!()(&this, cast(char*)"destroy-event",
41607 cast(GObject2.Callback)cb, data, null, cf);
41610 // The ::direction-changed signal is emitted when the text direction
41611 // of a widget changes.
41612 // <previous_direction>: the previous text direction of @widget
41613 extern (C) alias static void function (Widget* this_, TextDirection* previous_direction, void* user_data=null) nothrow signal_direction_changed;
41614 ulong signal_connect(string name:"direction-changed", CB/*:signal_direction_changed*/)
41615 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41616 if (is(typeof(cb)==signal_direction_changed)||_ttmm!(CB, signal_direction_changed)()) {
41617 return signal_connect_data!()(&this, cast(char*)"direction-changed",
41618 cast(GObject2.Callback)cb, data, null, cf);
41621 // The ::drag-begin signal is emitted on the drag source when a drag is
41622 // started. A typical reason to connect to this signal is to set up a
41623 // custom drag icon with gtk_drag_source_set_icon().
41625 // Note that some widgets set up a drag icon in the default handler of
41626 // this signal, so you may have to use g_signal_connect_after() to
41627 // override what the default handler did.
41628 // <drag_context>: the drag context
41629 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) nothrow signal_drag_begin;
41630 ulong signal_connect(string name:"drag-begin", CB/*:signal_drag_begin*/)
41631 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41632 if (is(typeof(cb)==signal_drag_begin)||_ttmm!(CB, signal_drag_begin)()) {
41633 return signal_connect_data!()(&this, cast(char*)"drag-begin",
41634 cast(GObject2.Callback)cb, data, null, cf);
41637 // The ::drag-data-delete signal is emitted on the drag source when a drag
41638 // with the action %GDK_ACTION_MOVE is successfully completed. The signal
41639 // handler is responsible for deleting the data that has been dropped. What
41640 // "delete" means depends on the context of the drag operation.
41641 // <drag_context>: the drag context
41642 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) nothrow signal_drag_data_delete;
41643 ulong signal_connect(string name:"drag-data-delete", CB/*:signal_drag_data_delete*/)
41644 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41645 if (is(typeof(cb)==signal_drag_data_delete)||_ttmm!(CB, signal_drag_data_delete)()) {
41646 return signal_connect_data!()(&this, cast(char*)"drag-data-delete",
41647 cast(GObject2.Callback)cb, data, null, cf);
41650 // The ::drag-data-get signal is emitted on the drag source when the drop
41651 // site requests the data which is dragged. It is the responsibility of
41652 // the signal handler to fill @data with the data in the format which
41653 // is indicated by @info. See gtk_selection_data_set() and
41654 // gtk_selection_data_set_text().
41655 // <drag_context>: the drag context
41656 // <data>: the #GtkSelectionData to be filled with the dragged data
41657 // <info>: the info that has been registered with the target in the #GtkTargetList
41658 // <time>: the timestamp at which the data was requested
41659 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, SelectionData* data, c_uint info, c_uint time, void* user_data=null) nothrow signal_drag_data_get;
41660 ulong signal_connect(string name:"drag-data-get", CB/*:signal_drag_data_get*/)
41661 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41662 if (is(typeof(cb)==signal_drag_data_get)||_ttmm!(CB, signal_drag_data_get)()) {
41663 return signal_connect_data!()(&this, cast(char*)"drag-data-get",
41664 cast(GObject2.Callback)cb, data, null, cf);
41667 // The ::drag-data-received signal is emitted on the drop site when the
41668 // dragged data has been received. If the data was received in order to
41669 // determine whether the drop will be accepted, the handler is expected
41670 // to call gdk_drag_status() and <emphasis>not</emphasis> finish the drag.
41671 // If the data was received in response to a #GtkWidget::drag-drop signal
41672 // (and this is the last target to be received), the handler for this
41673 // signal is expected to process the received data and then call
41674 // gtk_drag_finish(), setting the @success parameter depending on whether
41675 // the data was processed successfully.
41677 // The handler may inspect and modify @drag_context->action before calling
41678 // gtk_drag_finish(), e.g. to implement %GDK_ACTION_ASK as shown in the
41679 // following example:
41680 // |[
41681 // void
41682 // drag_data_received (GtkWidget *widget,
41683 // GdkDragContext *drag_context,
41684 // gint x,
41685 // gint y,
41686 // GtkSelectionData *data,
41687 // guint info,
41688 // guint time)
41689 // {
41690 // if ((data->length >= 0) && (data->format == 8))
41691 // {
41692 // if (drag_context->action == GDK_ACTION_ASK)
41693 // {
41694 // GtkWidget *dialog;
41695 // gint response;
41697 // dialog = gtk_message_dialog_new (NULL,
41698 // GTK_DIALOG_MODAL |
41699 // GTK_DIALOG_DESTROY_WITH_PARENT,
41700 // GTK_MESSAGE_INFO,
41701 // GTK_BUTTONS_YES_NO,
41702 // "Move the data ?\n");
41703 // response = gtk_dialog_run (GTK_DIALOG (dialog));
41704 // gtk_widget_destroy (dialog);
41706 // if (response == GTK_RESPONSE_YES)
41707 // drag_context->action = GDK_ACTION_MOVE;
41708 // else
41709 // drag_context->action = GDK_ACTION_COPY;
41710 // }
41712 // gtk_drag_finish (drag_context, TRUE, FALSE, time);
41713 // return;
41714 // }
41716 // gtk_drag_finish (drag_context, FALSE, FALSE, time);
41717 // }
41718 // ]|
41719 // <drag_context>: the drag context
41720 // <x>: where the drop happened
41721 // <y>: where the drop happened
41722 // <data>: the received data
41723 // <info>: the info that has been registered with the target in the #GtkTargetList
41724 // <time>: the timestamp at which the data was received
41725 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) nothrow signal_drag_data_received;
41726 ulong signal_connect(string name:"drag-data-received", CB/*:signal_drag_data_received*/)
41727 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41728 if (is(typeof(cb)==signal_drag_data_received)||_ttmm!(CB, signal_drag_data_received)()) {
41729 return signal_connect_data!()(&this, cast(char*)"drag-data-received",
41730 cast(GObject2.Callback)cb, data, null, cf);
41733 // The ::drag-drop signal is emitted on the drop site when the user drops
41734 // the data onto the widget. The signal handler must determine whether
41735 // the cursor position is in a drop zone or not. If it is not in a drop
41736 // zone, it returns %FALSE and no further processing is necessary.
41737 // Otherwise, the handler returns %TRUE. In this case, the handler must
41738 // ensure that gtk_drag_finish() is called to let the source know that
41739 // the drop is done. The call to gtk_drag_finish() can be done either
41740 // directly or in a #GtkWidget::drag-data-received handler which gets
41741 // triggered by calling gtk_drag_get_data() to receive the data for one
41742 // or more of the supported targets.
41743 // RETURNS: whether the cursor position is in a drop zone
41744 // <drag_context>: the drag context
41745 // <x>: the x coordinate of the current cursor position
41746 // <y>: the y coordinate of the current cursor position
41747 // <time>: the timestamp of the motion event
41748 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, c_uint time, void* user_data=null) nothrow signal_drag_drop;
41749 ulong signal_connect(string name:"drag-drop", CB/*:signal_drag_drop*/)
41750 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41751 if (is(typeof(cb)==signal_drag_drop)||_ttmm!(CB, signal_drag_drop)()) {
41752 return signal_connect_data!()(&this, cast(char*)"drag-drop",
41753 cast(GObject2.Callback)cb, data, null, cf);
41756 // The ::drag-end signal is emitted on the drag source when a drag is
41757 // finished. A typical reason to connect to this signal is to undo
41758 // things done in #GtkWidget::drag-begin.
41759 // <drag_context>: the drag context
41760 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) nothrow signal_drag_end;
41761 ulong signal_connect(string name:"drag-end", CB/*:signal_drag_end*/)
41762 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41763 if (is(typeof(cb)==signal_drag_end)||_ttmm!(CB, signal_drag_end)()) {
41764 return signal_connect_data!()(&this, cast(char*)"drag-end",
41765 cast(GObject2.Callback)cb, data, null, cf);
41768 // VERSION: 2.12
41769 // The ::drag-failed signal is emitted on the drag source when a drag has
41770 // failed. The signal handler may hook custom code to handle a failed DND
41771 // operation based on the type of error, it returns %TRUE is the failure has
41772 // been already handled (not showing the default "drag operation failed"
41773 // animation), otherwise it returns %FALSE.
41774 // RETURNS: %TRUE if the failed drag operation has been already handled.
41775 // <drag_context>: the drag context
41776 // <result>: the result of the drag operation
41777 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, DragResult* result, void* user_data=null) nothrow signal_drag_failed;
41778 ulong signal_connect(string name:"drag-failed", CB/*:signal_drag_failed*/)
41779 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41780 if (is(typeof(cb)==signal_drag_failed)||_ttmm!(CB, signal_drag_failed)()) {
41781 return signal_connect_data!()(&this, cast(char*)"drag-failed",
41782 cast(GObject2.Callback)cb, data, null, cf);
41785 // The ::drag-leave signal is emitted on the drop site when the cursor
41786 // leaves the widget. A typical reason to connect to this signal is to
41787 // undo things done in #GtkWidget::drag-motion, e.g. undo highlighting
41788 // with gtk_drag_unhighlight()
41789 // <drag_context>: the drag context
41790 // <time>: the timestamp of the motion event
41791 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, c_uint time, void* user_data=null) nothrow signal_drag_leave;
41792 ulong signal_connect(string name:"drag-leave", CB/*:signal_drag_leave*/)
41793 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41794 if (is(typeof(cb)==signal_drag_leave)||_ttmm!(CB, signal_drag_leave)()) {
41795 return signal_connect_data!()(&this, cast(char*)"drag-leave",
41796 cast(GObject2.Callback)cb, data, null, cf);
41799 // The drag-motion signal is emitted on the drop site when the user
41800 // moves the cursor over the widget during a drag. The signal handler
41801 // must determine whether the cursor position is in a drop zone or not.
41802 // If it is not in a drop zone, it returns %FALSE and no further processing
41803 // is necessary. Otherwise, the handler returns %TRUE. In this case, the
41804 // handler is responsible for providing the necessary information for
41805 // displaying feedback to the user, by calling gdk_drag_status().
41807 // If the decision whether the drop will be accepted or rejected can't be
41808 // made based solely on the cursor position and the type of the data, the
41809 // handler may inspect the dragged data by calling gtk_drag_get_data() and
41810 // defer the gdk_drag_status() call to the #GtkWidget::drag-data-received
41811 // handler. Note that you cannot not pass #GTK_DEST_DEFAULT_DROP,
41812 // #GTK_DEST_DEFAULT_MOTION or #GTK_DEST_DEFAULT_ALL to gtk_drag_dest_set()
41813 // when using the drag-motion signal that way.
41815 // Also note that there is no drag-enter signal. The drag receiver has to
41816 // keep track of whether he has received any drag-motion signals since the
41817 // last #GtkWidget::drag-leave and if not, treat the drag-motion signal as
41818 // an "enter" signal. Upon an "enter", the handler will typically highlight
41819 // the drop site with gtk_drag_highlight().
41820 // |[
41821 // static void
41822 // drag_motion (GtkWidget *widget,
41823 // GdkDragContext *context,
41824 // gint x,
41825 // gint y,
41826 // guint time)
41827 // {
41828 // GdkAtom target;
41830 // PrivateData *private_data = GET_PRIVATE_DATA (widget);
41832 // if (!private_data->drag_highlight)
41833 // {
41834 // private_data->drag_highlight = 1;
41835 // gtk_drag_highlight (widget);
41836 // }
41838 // target = gtk_drag_dest_find_target (widget, context, NULL);
41839 // if (target == GDK_NONE)
41840 // gdk_drag_status (context, 0, time);
41841 // else
41842 // {
41843 // private_data->pending_status = context->suggested_action;
41844 // gtk_drag_get_data (widget, context, target, time);
41845 // }
41847 // return TRUE;
41848 // }
41850 // static void
41851 // drag_data_received (GtkWidget *widget,
41852 // GdkDragContext *context,
41853 // gint x,
41854 // gint y,
41855 // GtkSelectionData *selection_data,
41856 // guint info,
41857 // guint time)
41858 // {
41859 // PrivateData *private_data = GET_PRIVATE_DATA (widget);
41861 // if (private_data->suggested_action)
41862 // {
41863 // private_data->suggested_action = 0;
41865 // /&ast; We are getting this data due to a request in drag_motion,
41866 // * rather than due to a request in drag_drop, so we are just
41867 // * supposed to call gdk_drag_status (), not actually paste in
41868 // * the data.
41869 // &ast;/
41870 // str = gtk_selection_data_get_text (selection_data);
41871 // if (!data_is_acceptable (str))
41872 // gdk_drag_status (context, 0, time);
41873 // else
41874 // gdk_drag_status (context, private_data->suggested_action, time);
41875 // }
41876 // else
41877 // {
41878 // /&ast; accept the drop &ast;/
41879 // }
41880 // }
41881 // ]|
41882 // RETURNS: whether the cursor position is in a drop zone
41883 // <drag_context>: the drag context
41884 // <x>: the x coordinate of the current cursor position
41885 // <y>: the y coordinate of the current cursor position
41886 // <time>: the timestamp of the motion event
41887 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, c_uint time, void* user_data=null) nothrow signal_drag_motion;
41888 ulong signal_connect(string name:"drag-motion", CB/*:signal_drag_motion*/)
41889 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41890 if (is(typeof(cb)==signal_drag_motion)||_ttmm!(CB, signal_drag_motion)()) {
41891 return signal_connect_data!()(&this, cast(char*)"drag-motion",
41892 cast(GObject2.Callback)cb, data, null, cf);
41895 // The ::enter-notify-event will be emitted when the pointer enters
41896 // the @widget's window.
41898 // To receive this signal, the #GdkWindow associated to the widget needs
41899 // to enable the #GDK_ENTER_NOTIFY_MASK mask.
41901 // This signal will be sent to the grab widget if there is one.
41903 // %FALSE to propagate the event further.
41904 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41905 // <event>: the #GdkEventCrossing which triggered this signal.
41906 extern (C) alias static c_int function (Widget* this_, Gdk2.EventCrossing* event, void* user_data=null) nothrow signal_enter_notify_event;
41907 ulong signal_connect(string name:"enter-notify-event", CB/*:signal_enter_notify_event*/)
41908 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41909 if (is(typeof(cb)==signal_enter_notify_event)||_ttmm!(CB, signal_enter_notify_event)()) {
41910 return signal_connect_data!()(&this, cast(char*)"enter-notify-event",
41911 cast(GObject2.Callback)cb, data, null, cf);
41914 // The GTK+ main loop will emit three signals for each GDK event delivered
41915 // to a widget: one generic ::event signal, another, more specific,
41916 // signal that matches the type of event delivered (e.g.
41917 // #GtkWidget::key-press-event) and finally a generic
41918 // #GtkWidget::event-after signal.
41920 // and to cancel the emission of the second specific ::event signal.
41921 // %FALSE to propagate the event further and to allow the emission of
41922 // the second signal. The ::event-after signal is emitted regardless of
41923 // the return value.
41924 // RETURNS: %TRUE to stop other handlers from being invoked for the event
41925 // <event>: the #GdkEvent which triggered this signal
41926 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_event;
41927 ulong signal_connect(string name:"event", CB/*:signal_event*/)
41928 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41929 if (is(typeof(cb)==signal_event)||_ttmm!(CB, signal_event)()) {
41930 return signal_connect_data!()(&this, cast(char*)"event",
41931 cast(GObject2.Callback)cb, data, null, cf);
41934 // After the emission of the #GtkWidget::event signal and (optionally)
41935 // the second more specific signal, ::event-after will be emitted
41936 // regardless of the previous two signals handlers return values.
41937 // <event>: the #GdkEvent which triggered this signal
41938 extern (C) alias static void function (Widget* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_event_after;
41939 ulong signal_connect(string name:"event-after", CB/*:signal_event_after*/)
41940 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41941 if (is(typeof(cb)==signal_event_after)||_ttmm!(CB, signal_event_after)()) {
41942 return signal_connect_data!()(&this, cast(char*)"event-after",
41943 cast(GObject2.Callback)cb, data, null, cf);
41946 // The ::expose-event signal is emitted when an area of a previously
41947 // obscured #GdkWindow is made visible and needs to be redrawn.
41948 // #GTK_NO_WINDOW widgets will get a synthesized event from their parent
41949 // widget.
41951 // To receive this signal, the #GdkWindow associated to the widget needs
41952 // to enable the #GDK_EXPOSURE_MASK mask.
41954 // Note that the ::expose-event signal has been replaced by a ::draw
41955 // 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>
41956 // for hints on how to port from ::expose-event to ::draw.
41958 // %FALSE to propagate the event further.
41959 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41960 // <event>: the #GdkEventExpose which triggered this signal.
41961 extern (C) alias static c_int function (Widget* this_, Gdk2.EventExpose* event, void* user_data=null) nothrow signal_expose_event;
41962 ulong signal_connect(string name:"expose-event", CB/*:signal_expose_event*/)
41963 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41964 if (is(typeof(cb)==signal_expose_event)||_ttmm!(CB, signal_expose_event)()) {
41965 return signal_connect_data!()(&this, cast(char*)"expose-event",
41966 cast(GObject2.Callback)cb, data, null, cf);
41969 // RETURNS: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
41970 // <returns>: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
41971 extern (C) alias static c_int function (Widget* this_, DirectionType* returns, void* user_data=null) nothrow signal_focus;
41972 ulong signal_connect(string name:"focus", CB/*:signal_focus*/)
41973 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41974 if (is(typeof(cb)==signal_focus)||_ttmm!(CB, signal_focus)()) {
41975 return signal_connect_data!()(&this, cast(char*)"focus",
41976 cast(GObject2.Callback)cb, data, null, cf);
41979 // The ::focus-in-event signal will be emitted when the keyboard focus
41980 // enters the @widget's window.
41982 // To receive this signal, the #GdkWindow associated to the widget needs
41983 // to enable the #GDK_FOCUS_CHANGE_MASK mask.
41985 // %FALSE to propagate the event further.
41986 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
41987 // <event>: the #GdkEventFocus which triggered this signal.
41988 extern (C) alias static c_int function (Widget* this_, Gdk2.EventFocus* event, void* user_data=null) nothrow signal_focus_in_event;
41989 ulong signal_connect(string name:"focus-in-event", CB/*:signal_focus_in_event*/)
41990 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
41991 if (is(typeof(cb)==signal_focus_in_event)||_ttmm!(CB, signal_focus_in_event)()) {
41992 return signal_connect_data!()(&this, cast(char*)"focus-in-event",
41993 cast(GObject2.Callback)cb, data, null, cf);
41996 // The ::focus-out-event signal will be emitted when the keyboard focus
41997 // leaves the @widget's window.
41999 // To receive this signal, the #GdkWindow associated to the widget needs
42000 // to enable the #GDK_FOCUS_CHANGE_MASK mask.
42002 // %FALSE to propagate the event further.
42003 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42004 // <event>: the #GdkEventFocus which triggered this signal.
42005 extern (C) alias static c_int function (Widget* this_, Gdk2.EventFocus* event, void* user_data=null) nothrow signal_focus_out_event;
42006 ulong signal_connect(string name:"focus-out-event", CB/*:signal_focus_out_event*/)
42007 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42008 if (is(typeof(cb)==signal_focus_out_event)||_ttmm!(CB, signal_focus_out_event)()) {
42009 return signal_connect_data!()(&this, cast(char*)"focus-out-event",
42010 cast(GObject2.Callback)cb, data, null, cf);
42013 // VERSION: 2.8
42014 // Emitted when a pointer or keyboard grab on a window belonging
42015 // to @widget gets broken.
42017 // On X11, this happens when the grab window becomes unviewable
42018 // (i.e. it or one of its ancestors is unmapped), or if the same
42019 // application grabs the pointer or keyboard again.
42021 // the event. %FALSE to propagate the event further.
42022 // RETURNS: %TRUE to stop other handlers from being invoked for
42023 // <event>: the #GdkEventGrabBroken event
42024 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) nothrow signal_grab_broken_event;
42025 ulong signal_connect(string name:"grab-broken-event", CB/*:signal_grab_broken_event*/)
42026 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42027 if (is(typeof(cb)==signal_grab_broken_event)||_ttmm!(CB, signal_grab_broken_event)()) {
42028 return signal_connect_data!()(&this, cast(char*)"grab-broken-event",
42029 cast(GObject2.Callback)cb, data, null, cf);
42031 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_grab_focus;
42032 ulong signal_connect(string name:"grab-focus", CB/*:signal_grab_focus*/)
42033 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42034 if (is(typeof(cb)==signal_grab_focus)||_ttmm!(CB, signal_grab_focus)()) {
42035 return signal_connect_data!()(&this, cast(char*)"grab-focus",
42036 cast(GObject2.Callback)cb, data, null, cf);
42039 // The ::grab-notify signal is emitted when a widget becomes
42040 // shadowed by a GTK+ grab (not a pointer or keyboard grab) on
42041 // another widget, or when it becomes unshadowed due to a grab
42042 // being removed.
42044 // A widget is shadowed by a gtk_grab_add() when the topmost
42045 // grab widget in the grab stack of its window group is not
42046 // its ancestor.
42047 // <was_grabbed>: %FALSE if the widget becomes shadowed, %TRUE if it becomes unshadowed
42048 extern (C) alias static void function (Widget* this_, c_int was_grabbed, void* user_data=null) nothrow signal_grab_notify;
42049 ulong signal_connect(string name:"grab-notify", CB/*:signal_grab_notify*/)
42050 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42051 if (is(typeof(cb)==signal_grab_notify)||_ttmm!(CB, signal_grab_notify)()) {
42052 return signal_connect_data!()(&this, cast(char*)"grab-notify",
42053 cast(GObject2.Callback)cb, data, null, cf);
42055 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_hide;
42056 ulong signal_connect(string name:"hide", CB/*:signal_hide*/)
42057 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42058 if (is(typeof(cb)==signal_hide)||_ttmm!(CB, signal_hide)()) {
42059 return signal_connect_data!()(&this, cast(char*)"hide",
42060 cast(GObject2.Callback)cb, data, null, cf);
42063 // The ::hierarchy-changed signal is emitted when the
42064 // anchored state of a widget changes. A widget is
42065 // <firstterm>anchored</firstterm> when its toplevel
42066 // ancestor is a #GtkWindow. This signal is emitted when
42067 // a widget changes from un-anchored to anchored or vice-versa.
42068 // <previous_toplevel>: the previous toplevel ancestor, or %NULL if the widget was previously unanchored
42069 extern (C) alias static void function (Widget* this_, Widget* previous_toplevel=null, void* user_data=null) nothrow signal_hierarchy_changed;
42070 ulong signal_connect(string name:"hierarchy-changed", CB/*:signal_hierarchy_changed*/)
42071 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42072 if (is(typeof(cb)==signal_hierarchy_changed)||_ttmm!(CB, signal_hierarchy_changed)()) {
42073 return signal_connect_data!()(&this, cast(char*)"hierarchy-changed",
42074 cast(GObject2.Callback)cb, data, null, cf);
42077 // The ::key-press-event signal is emitted when a key is pressed.
42079 // To receive this signal, the #GdkWindow associated to the widget needs
42080 // to enable the #GDK_KEY_PRESS_MASK mask.
42082 // This signal will be sent to the grab widget if there is one.
42084 // %FALSE to propagate the event further.
42085 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42086 // <event>: the #GdkEventKey which triggered this signal.
42087 extern (C) alias static c_int function (Widget* this_, Gdk2.EventKey* event, void* user_data=null) nothrow signal_key_press_event;
42088 ulong signal_connect(string name:"key-press-event", CB/*:signal_key_press_event*/)
42089 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42090 if (is(typeof(cb)==signal_key_press_event)||_ttmm!(CB, signal_key_press_event)()) {
42091 return signal_connect_data!()(&this, cast(char*)"key-press-event",
42092 cast(GObject2.Callback)cb, data, null, cf);
42095 // The ::key-release-event signal is emitted when a key is pressed.
42097 // To receive this signal, the #GdkWindow associated to the widget needs
42098 // to enable the #GDK_KEY_RELEASE_MASK mask.
42100 // This signal will be sent to the grab widget if there is one.
42102 // %FALSE to propagate the event further.
42103 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42104 // <event>: the #GdkEventKey which triggered this signal.
42105 extern (C) alias static c_int function (Widget* this_, Gdk2.EventKey* event, void* user_data=null) nothrow signal_key_release_event;
42106 ulong signal_connect(string name:"key-release-event", CB/*:signal_key_release_event*/)
42107 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42108 if (is(typeof(cb)==signal_key_release_event)||_ttmm!(CB, signal_key_release_event)()) {
42109 return signal_connect_data!()(&this, cast(char*)"key-release-event",
42110 cast(GObject2.Callback)cb, data, null, cf);
42113 // VERSION: 2.12
42114 // Gets emitted if keyboard navigation fails.
42115 // See gtk_widget_keynav_failed() for details.
42117 // if the emitting widget should try to handle the keyboard
42118 // navigation attempt in its parent container(s).
42119 // RETURNS: %TRUE if stopping keyboard navigation is fine, %FALSE
42120 // <direction>: the direction of movement
42121 extern (C) alias static c_int function (Widget* this_, DirectionType* direction, void* user_data=null) nothrow signal_keynav_failed;
42122 ulong signal_connect(string name:"keynav-failed", CB/*:signal_keynav_failed*/)
42123 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42124 if (is(typeof(cb)==signal_keynav_failed)||_ttmm!(CB, signal_keynav_failed)()) {
42125 return signal_connect_data!()(&this, cast(char*)"keynav-failed",
42126 cast(GObject2.Callback)cb, data, null, cf);
42129 // The ::leave-notify-event will be emitted when the pointer leaves
42130 // the @widget's window.
42132 // To receive this signal, the #GdkWindow associated to the widget needs
42133 // to enable the #GDK_LEAVE_NOTIFY_MASK mask.
42135 // This signal will be sent to the grab widget if there is one.
42137 // %FALSE to propagate the event further.
42138 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42139 // <event>: the #GdkEventCrossing which triggered this signal.
42140 extern (C) alias static c_int function (Widget* this_, Gdk2.EventCrossing* event, void* user_data=null) nothrow signal_leave_notify_event;
42141 ulong signal_connect(string name:"leave-notify-event", CB/*:signal_leave_notify_event*/)
42142 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42143 if (is(typeof(cb)==signal_leave_notify_event)||_ttmm!(CB, signal_leave_notify_event)()) {
42144 return signal_connect_data!()(&this, cast(char*)"leave-notify-event",
42145 cast(GObject2.Callback)cb, data, null, cf);
42147 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_map;
42148 ulong signal_connect(string name:"map", CB/*:signal_map*/)
42149 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42150 if (is(typeof(cb)==signal_map)||_ttmm!(CB, signal_map)()) {
42151 return signal_connect_data!()(&this, cast(char*)"map",
42152 cast(GObject2.Callback)cb, data, null, cf);
42155 // The ::map-event signal will be emitted when the @widget's window is
42156 // mapped. A window is mapped when it becomes visible on the screen.
42158 // To receive this signal, the #GdkWindow associated to the widget needs
42159 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
42160 // automatically for all new windows.
42162 // %FALSE to propagate the event further.
42163 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42164 // <event>: the #GdkEventAny which triggered this signal.
42165 extern (C) alias static c_int function (Widget* this_, Gdk2.EventAny* event, void* user_data=null) nothrow signal_map_event;
42166 ulong signal_connect(string name:"map-event", CB/*:signal_map_event*/)
42167 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42168 if (is(typeof(cb)==signal_map_event)||_ttmm!(CB, signal_map_event)()) {
42169 return signal_connect_data!()(&this, cast(char*)"map-event",
42170 cast(GObject2.Callback)cb, data, null, cf);
42172 extern (C) alias static c_int function (Widget* this_, c_int object, void* user_data=null) nothrow signal_mnemonic_activate;
42173 ulong signal_connect(string name:"mnemonic-activate", CB/*:signal_mnemonic_activate*/)
42174 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42175 if (is(typeof(cb)==signal_mnemonic_activate)||_ttmm!(CB, signal_mnemonic_activate)()) {
42176 return signal_connect_data!()(&this, cast(char*)"mnemonic-activate",
42177 cast(GObject2.Callback)cb, data, null, cf);
42180 // The ::motion-notify-event signal is emitted when the pointer moves
42181 // over the widget's #GdkWindow.
42183 // To receive this signal, the #GdkWindow associated to the widget
42184 // needs to enable the #GDK_POINTER_MOTION_MASK mask.
42186 // This signal will be sent to the grab widget if there is one.
42188 // %FALSE to propagate the event further.
42189 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42190 // <event>: the #GdkEventMotion which triggered this signal.
42191 extern (C) alias static c_int function (Widget* this_, Gdk2.EventMotion* event, void* user_data=null) nothrow signal_motion_notify_event;
42192 ulong signal_connect(string name:"motion-notify-event", CB/*:signal_motion_notify_event*/)
42193 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42194 if (is(typeof(cb)==signal_motion_notify_event)||_ttmm!(CB, signal_motion_notify_event)()) {
42195 return signal_connect_data!()(&this, cast(char*)"motion-notify-event",
42196 cast(GObject2.Callback)cb, data, null, cf);
42198 extern (C) alias static void function (Widget* this_, DirectionType* object, void* user_data=null) nothrow signal_move_focus;
42199 ulong signal_connect(string name:"move-focus", CB/*:signal_move_focus*/)
42200 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42201 if (is(typeof(cb)==signal_move_focus)||_ttmm!(CB, signal_move_focus)()) {
42202 return signal_connect_data!()(&this, cast(char*)"move-focus",
42203 cast(GObject2.Callback)cb, data, null, cf);
42206 // The ::no-expose-event will be emitted when the @widget's window is
42207 // drawn as a copy of another #GdkDrawable (with gdk_draw_drawable() or
42208 // gdk_window_copy_area()) which was completely unobscured. If the source
42209 // window was partially obscured #GdkEventExpose events will be generated
42210 // for those areas.
42212 // %FALSE to propagate the event further.
42213 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42214 // <event>: the #GdkEventNoExpose which triggered this signal.
42215 extern (C) alias static c_int function (Widget* this_, Gdk2.EventNoExpose* event, void* user_data=null) nothrow signal_no_expose_event;
42216 ulong signal_connect(string name:"no-expose-event", CB/*:signal_no_expose_event*/)
42217 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42218 if (is(typeof(cb)==signal_no_expose_event)||_ttmm!(CB, signal_no_expose_event)()) {
42219 return signal_connect_data!()(&this, cast(char*)"no-expose-event",
42220 cast(GObject2.Callback)cb, data, null, cf);
42223 // The ::parent-set signal is emitted when a new parent
42224 // has been set on a widget.
42225 // <old_parent>: the previous parent, or %NULL if the widget just got its initial parent.
42226 extern (C) alias static void function (Widget* this_, Widget* old_parent=null, void* user_data=null) nothrow signal_parent_set;
42227 ulong signal_connect(string name:"parent-set", CB/*:signal_parent_set*/)
42228 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42229 if (is(typeof(cb)==signal_parent_set)||_ttmm!(CB, signal_parent_set)()) {
42230 return signal_connect_data!()(&this, cast(char*)"parent-set",
42231 cast(GObject2.Callback)cb, data, null, cf);
42234 // This signal gets emitted whenever a widget should pop up a context
42235 // menu. This usually happens through the standard key binding mechanism;
42236 // by pressing a certain key while a widget is focused, the user can cause
42237 // the widget to pop up a menu. For example, the #GtkEntry widget creates
42238 // a menu with clipboard commands. See <xref linkend="checklist-popup-menu"/>
42239 // for an example of how to use this signal.
42240 // RETURNS: %TRUE if a menu was activated
42241 extern (C) alias static c_int function (Widget* this_, void* user_data=null) nothrow signal_popup_menu;
42242 ulong signal_connect(string name:"popup-menu", CB/*:signal_popup_menu*/)
42243 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42244 if (is(typeof(cb)==signal_popup_menu)||_ttmm!(CB, signal_popup_menu)()) {
42245 return signal_connect_data!()(&this, cast(char*)"popup-menu",
42246 cast(GObject2.Callback)cb, data, null, cf);
42249 // The ::property-notify-event signal will be emitted when a property on
42250 // the @widget's window has been changed or deleted.
42252 // To receive this signal, the #GdkWindow associated to the widget needs
42253 // to enable the #GDK_PROPERTY_CHANGE_MASK mask.
42255 // %FALSE to propagate the event further.
42256 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42257 // <event>: the #GdkEventProperty which triggered this signal.
42258 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProperty* event, void* user_data=null) nothrow signal_property_notify_event;
42259 ulong signal_connect(string name:"property-notify-event", CB/*:signal_property_notify_event*/)
42260 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42261 if (is(typeof(cb)==signal_property_notify_event)||_ttmm!(CB, signal_property_notify_event)()) {
42262 return signal_connect_data!()(&this, cast(char*)"property-notify-event",
42263 cast(GObject2.Callback)cb, data, null, cf);
42266 // To receive this signal the #GdkWindow associated to the widget needs
42267 // to enable the #GDK_PROXIMITY_IN_MASK mask.
42269 // This signal will be sent to the grab widget if there is one.
42271 // %FALSE to propagate the event further.
42272 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42273 // <event>: the #GdkEventProximity which triggered this signal.
42274 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProximity* event, void* user_data=null) nothrow signal_proximity_in_event;
42275 ulong signal_connect(string name:"proximity-in-event", CB/*:signal_proximity_in_event*/)
42276 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42277 if (is(typeof(cb)==signal_proximity_in_event)||_ttmm!(CB, signal_proximity_in_event)()) {
42278 return signal_connect_data!()(&this, cast(char*)"proximity-in-event",
42279 cast(GObject2.Callback)cb, data, null, cf);
42282 // To receive this signal the #GdkWindow associated to the widget needs
42283 // to enable the #GDK_PROXIMITY_OUT_MASK mask.
42285 // This signal will be sent to the grab widget if there is one.
42287 // %FALSE to propagate the event further.
42288 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42289 // <event>: the #GdkEventProximity which triggered this signal.
42290 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProximity* event, void* user_data=null) nothrow signal_proximity_out_event;
42291 ulong signal_connect(string name:"proximity-out-event", CB/*:signal_proximity_out_event*/)
42292 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42293 if (is(typeof(cb)==signal_proximity_out_event)||_ttmm!(CB, signal_proximity_out_event)()) {
42294 return signal_connect_data!()(&this, cast(char*)"proximity-out-event",
42295 cast(GObject2.Callback)cb, data, null, cf);
42298 // VERSION: 2.12
42299 // Emitted when #GtkWidget:has-tooltip is %TRUE and the #GtkSettings:gtk-tooltip-timeout
42300 // has expired with the cursor hovering "above" @widget; or emitted when @widget got
42301 // focus in keyboard mode.
42303 // Using the given coordinates, the signal handler should determine
42304 // whether a tooltip should be shown for @widget. If this is the case
42305 // %TRUE should be returned, %FALSE otherwise. Note that if
42306 // @keyboard_mode is %TRUE, the values of @x and @y are undefined and
42307 // should not be used.
42309 // The signal handler is free to manipulate @tooltip with the therefore
42310 // destined function calls.
42311 // RETURNS: %TRUE if @tooltip should be shown right now, %FALSE otherwise.
42312 // <x>: the x coordinate of the cursor position where the request has been emitted, relative to @widget->window
42313 // <y>: the y coordinate of the cursor position where the request has been emitted, relative to @widget->window
42314 // <keyboard_mode>: %TRUE if the tooltip was trigged using the keyboard
42315 // <tooltip>: a #GtkTooltip
42316 extern (C) alias static c_int function (Widget* this_, int x, int y, c_int keyboard_mode, Tooltip* tooltip, void* user_data=null) nothrow signal_query_tooltip;
42317 ulong signal_connect(string name:"query-tooltip", CB/*:signal_query_tooltip*/)
42318 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42319 if (is(typeof(cb)==signal_query_tooltip)||_ttmm!(CB, signal_query_tooltip)()) {
42320 return signal_connect_data!()(&this, cast(char*)"query-tooltip",
42321 cast(GObject2.Callback)cb, data, null, cf);
42323 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_realize;
42324 ulong signal_connect(string name:"realize", CB/*:signal_realize*/)
42325 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42326 if (is(typeof(cb)==signal_realize)||_ttmm!(CB, signal_realize)()) {
42327 return signal_connect_data!()(&this, cast(char*)"realize",
42328 cast(GObject2.Callback)cb, data, null, cf);
42331 // The ::screen-changed signal gets emitted when the
42332 // screen of a widget has changed.
42333 // <previous_screen>: the previous screen, or %NULL if the widget was not associated with a screen before
42334 extern (C) alias static void function (Widget* this_, Gdk2.Screen* previous_screen=null, void* user_data=null) nothrow signal_screen_changed;
42335 ulong signal_connect(string name:"screen-changed", CB/*:signal_screen_changed*/)
42336 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42337 if (is(typeof(cb)==signal_screen_changed)||_ttmm!(CB, signal_screen_changed)()) {
42338 return signal_connect_data!()(&this, cast(char*)"screen-changed",
42339 cast(GObject2.Callback)cb, data, null, cf);
42342 // The ::scroll-event signal is emitted when a button in the 4 to 7
42343 // range is pressed. Wheel mice are usually configured to generate
42344 // button press events for buttons 4 and 5 when the wheel is turned.
42346 // To receive this signal, the #GdkWindow associated to the widget needs
42347 // to enable the #GDK_BUTTON_PRESS_MASK mask.
42349 // This signal will be sent to the grab widget if there is one.
42351 // %FALSE to propagate the event further.
42352 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42353 // <event>: the #GdkEventScroll which triggered this signal.
42354 extern (C) alias static c_int function (Widget* this_, Gdk2.EventScroll* event, void* user_data=null) nothrow signal_scroll_event;
42355 ulong signal_connect(string name:"scroll-event", CB/*:signal_scroll_event*/)
42356 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42357 if (is(typeof(cb)==signal_scroll_event)||_ttmm!(CB, signal_scroll_event)()) {
42358 return signal_connect_data!()(&this, cast(char*)"scroll-event",
42359 cast(GObject2.Callback)cb, data, null, cf);
42362 // The ::selection-clear-event signal will be emitted when the
42363 // the @widget's window has lost ownership of a selection.
42365 // %FALSE to propagate the event further.
42366 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42367 // <event>: the #GdkEventSelection which triggered this signal.
42368 extern (C) alias static c_int function (Widget* this_, Gdk2.EventSelection* event, void* user_data=null) nothrow signal_selection_clear_event;
42369 ulong signal_connect(string name:"selection-clear-event", CB/*:signal_selection_clear_event*/)
42370 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42371 if (is(typeof(cb)==signal_selection_clear_event)||_ttmm!(CB, signal_selection_clear_event)()) {
42372 return signal_connect_data!()(&this, cast(char*)"selection-clear-event",
42373 cast(GObject2.Callback)cb, data, null, cf);
42375 extern (C) alias static void function (Widget* this_, SelectionData* object, c_uint p0, c_uint p1, void* user_data=null) nothrow signal_selection_get;
42376 ulong signal_connect(string name:"selection-get", CB/*:signal_selection_get*/)
42377 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42378 if (is(typeof(cb)==signal_selection_get)||_ttmm!(CB, signal_selection_get)()) {
42379 return signal_connect_data!()(&this, cast(char*)"selection-get",
42380 cast(GObject2.Callback)cb, data, null, cf);
42383 // RETURNS: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
42384 // <returns>: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
42385 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* returns, void* user_data=null) nothrow signal_selection_notify_event;
42386 ulong signal_connect(string name:"selection-notify-event", CB/*:signal_selection_notify_event*/)
42387 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42388 if (is(typeof(cb)==signal_selection_notify_event)||_ttmm!(CB, signal_selection_notify_event)()) {
42389 return signal_connect_data!()(&this, cast(char*)"selection-notify-event",
42390 cast(GObject2.Callback)cb, data, null, cf);
42392 extern (C) alias static void function (Widget* this_, SelectionData* object, c_uint p0, void* user_data=null) nothrow signal_selection_received;
42393 ulong signal_connect(string name:"selection-received", CB/*:signal_selection_received*/)
42394 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42395 if (is(typeof(cb)==signal_selection_received)||_ttmm!(CB, signal_selection_received)()) {
42396 return signal_connect_data!()(&this, cast(char*)"selection-received",
42397 cast(GObject2.Callback)cb, data, null, cf);
42400 // The ::selection-request-event signal will be emitted when
42401 // another client requests ownership of the selection owned by
42402 // the @widget's window.
42404 // %FALSE to propagate the event further.
42405 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42406 // <event>: the #GdkEventSelection which triggered this signal.
42407 extern (C) alias static c_int function (Widget* this_, Gdk2.EventSelection* event, void* user_data=null) nothrow signal_selection_request_event;
42408 ulong signal_connect(string name:"selection-request-event", CB/*:signal_selection_request_event*/)
42409 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42410 if (is(typeof(cb)==signal_selection_request_event)||_ttmm!(CB, signal_selection_request_event)()) {
42411 return signal_connect_data!()(&this, cast(char*)"selection-request-event",
42412 cast(GObject2.Callback)cb, data, null, cf);
42414 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_show;
42415 ulong signal_connect(string name:"show", CB/*:signal_show*/)
42416 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42417 if (is(typeof(cb)==signal_show)||_ttmm!(CB, signal_show)()) {
42418 return signal_connect_data!()(&this, cast(char*)"show",
42419 cast(GObject2.Callback)cb, data, null, cf);
42421 extern (C) alias static c_int function (Widget* this_, WidgetHelpType* object, void* user_data=null) nothrow signal_show_help;
42422 ulong signal_connect(string name:"show-help", CB/*:signal_show_help*/)
42423 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42424 if (is(typeof(cb)==signal_show_help)||_ttmm!(CB, signal_show_help)()) {
42425 return signal_connect_data!()(&this, cast(char*)"show-help",
42426 cast(GObject2.Callback)cb, data, null, cf);
42428 extern (C) alias static void function (Widget* this_, cairo.RectangleInt* object, void* user_data=null) nothrow signal_size_allocate;
42429 ulong signal_connect(string name:"size-allocate", CB/*:signal_size_allocate*/)
42430 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42431 if (is(typeof(cb)==signal_size_allocate)||_ttmm!(CB, signal_size_allocate)()) {
42432 return signal_connect_data!()(&this, cast(char*)"size-allocate",
42433 cast(GObject2.Callback)cb, data, null, cf);
42435 extern (C) alias static void function (Widget* this_, Requisition* object, void* user_data=null) nothrow signal_size_request;
42436 ulong signal_connect(string name:"size-request", CB/*:signal_size_request*/)
42437 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42438 if (is(typeof(cb)==signal_size_request)||_ttmm!(CB, signal_size_request)()) {
42439 return signal_connect_data!()(&this, cast(char*)"size-request",
42440 cast(GObject2.Callback)cb, data, null, cf);
42443 // The ::state-changed signal is emitted when the widget state changes.
42444 // See gtk_widget_get_state().
42445 // <state>: the previous state
42446 extern (C) alias static void function (Widget* this_, StateType* state, void* user_data=null) nothrow signal_state_changed;
42447 ulong signal_connect(string name:"state-changed", CB/*:signal_state_changed*/)
42448 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42449 if (is(typeof(cb)==signal_state_changed)||_ttmm!(CB, signal_state_changed)()) {
42450 return signal_connect_data!()(&this, cast(char*)"state-changed",
42451 cast(GObject2.Callback)cb, data, null, cf);
42454 // The ::style-set signal is emitted when a new style has been set
42455 // on a widget. Note that style-modifying functions like
42456 // gtk_widget_modify_base() also cause this signal to be emitted.
42457 // <previous_style>: the previous style, or %NULL if the widget just got its initial style
42458 extern (C) alias static void function (Widget* this_, Style* previous_style=null, void* user_data=null) nothrow signal_style_set;
42459 ulong signal_connect(string name:"style-set", CB/*:signal_style_set*/)
42460 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42461 if (is(typeof(cb)==signal_style_set)||_ttmm!(CB, signal_style_set)()) {
42462 return signal_connect_data!()(&this, cast(char*)"style-set",
42463 cast(GObject2.Callback)cb, data, null, cf);
42465 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_unmap;
42466 ulong signal_connect(string name:"unmap", CB/*:signal_unmap*/)
42467 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42468 if (is(typeof(cb)==signal_unmap)||_ttmm!(CB, signal_unmap)()) {
42469 return signal_connect_data!()(&this, cast(char*)"unmap",
42470 cast(GObject2.Callback)cb, data, null, cf);
42473 // The ::unmap-event signal will be emitted when the @widget's window is
42474 // unmapped. A window is unmapped when it becomes invisible on the screen.
42476 // To receive this signal, the #GdkWindow associated to the widget needs
42477 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
42478 // automatically for all new windows.
42480 // %FALSE to propagate the event further.
42481 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42482 // <event>: the #GdkEventAny which triggered this signal
42483 extern (C) alias static c_int function (Widget* this_, Gdk2.EventAny* event, void* user_data=null) nothrow signal_unmap_event;
42484 ulong signal_connect(string name:"unmap-event", CB/*:signal_unmap_event*/)
42485 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42486 if (is(typeof(cb)==signal_unmap_event)||_ttmm!(CB, signal_unmap_event)()) {
42487 return signal_connect_data!()(&this, cast(char*)"unmap-event",
42488 cast(GObject2.Callback)cb, data, null, cf);
42490 extern (C) alias static void function (Widget* this_, void* user_data=null) nothrow signal_unrealize;
42491 ulong signal_connect(string name:"unrealize", CB/*:signal_unrealize*/)
42492 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42493 if (is(typeof(cb)==signal_unrealize)||_ttmm!(CB, signal_unrealize)()) {
42494 return signal_connect_data!()(&this, cast(char*)"unrealize",
42495 cast(GObject2.Callback)cb, data, null, cf);
42498 // The ::visibility-notify-event will be emitted when the @widget's window
42499 // is obscured or unobscured.
42501 // To receive this signal the #GdkWindow associated to the widget needs
42502 // to enable the #GDK_VISIBILITY_NOTIFY_MASK mask.
42504 // %FALSE to propagate the event further.
42505 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
42506 // <event>: the #GdkEventVisibility which triggered this signal.
42507 extern (C) alias static c_int function (Widget* this_, Gdk2.EventVisibility* event, void* user_data=null) nothrow signal_visibility_notify_event;
42508 ulong signal_connect(string name:"visibility-notify-event", CB/*:signal_visibility_notify_event*/)
42509 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42510 if (is(typeof(cb)==signal_visibility_notify_event)||_ttmm!(CB, signal_visibility_notify_event)()) {
42511 return signal_connect_data!()(&this, cast(char*)"visibility-notify-event",
42512 cast(GObject2.Callback)cb, data, null, cf);
42515 // The ::window-state-event will be emitted when the state of the
42516 // toplevel window associated to the @widget changes.
42518 // To receive this signal the #GdkWindow associated to the widget
42519 // needs to enable the #GDK_STRUCTURE_MASK mask. GDK will enable
42520 // this mask automatically for all new windows.
42522 // event. %FALSE to propagate the event further.
42523 // RETURNS: %TRUE to stop other handlers from being invoked for the
42524 // <event>: the #GdkEventWindowState which triggered this signal.
42525 extern (C) alias static c_int function (Widget* this_, Gdk2.EventWindowState* event, void* user_data=null) nothrow signal_window_state_event;
42526 ulong signal_connect(string name:"window-state-event", CB/*:signal_window_state_event*/)
42527 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
42528 if (is(typeof(cb)==signal_window_state_event)||_ttmm!(CB, signal_window_state_event)()) {
42529 return signal_connect_data!()(&this, cast(char*)"window-state-event",
42530 cast(GObject2.Callback)cb, data, null, cf);
42534 struct WidgetAuxInfo {
42535 int x, y, width, height;
42536 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
42537 uint, "x_set", 1,
42538 uint, "y_set", 1,
42539 uint, "__dummy32A", 30));
42543 // <structfield>activate_signal</structfield>
42544 // The signal to emit when a widget of this class is activated,
42545 // gtk_widget_activate() handles the emission. Implementation of this
42546 // signal is optional.
42549 // <structfield>set_scroll_adjustment_signal</structfield>
42550 // This signal is emitted when a widget of this class is added
42551 // to a scrolling aware parent, gtk_widget_set_scroll_adjustments()
42552 // handles the emission.
42553 // Implementation of this signal is optional.
42554 struct WidgetClass {
42555 ObjectClass parent_class;
42556 uint activate_signal, set_scroll_adjustments_signal;
42557 extern (C) void function (Widget* widget, uint n_pspecs, GObject2.ParamSpec** pspecs) nothrow dispatch_child_properties_changed;
42558 extern (C) void function (Widget* widget) nothrow show;
42559 extern (C) void function (Widget* widget) nothrow show_all;
42560 extern (C) void function (Widget* widget) nothrow hide;
42561 extern (C) void function (Widget* widget) nothrow hide_all;
42562 extern (C) void function (Widget* widget) nothrow map;
42563 extern (C) void function (Widget* widget) nothrow unmap;
42564 extern (C) void function (Widget* widget) nothrow realize;
42565 extern (C) void function (Widget* widget) nothrow unrealize;
42566 // <requisition>: a #GtkRequisition to be filled in
42567 extern (C) void function (Widget* widget, Requisition* requisition) nothrow size_request;
42568 // <allocation>: position and size to be allocated to @widget
42569 extern (C) void function (Widget* widget, Allocation* allocation) nothrow size_allocate;
42570 extern (C) void function (Widget* widget, StateType previous_state) nothrow state_changed;
42571 extern (C) void function (Widget* widget, Widget* previous_parent) nothrow parent_set;
42572 extern (C) void function (Widget* widget, Widget* previous_toplevel) nothrow hierarchy_changed;
42573 extern (C) void function (Widget* widget, Style* previous_style) nothrow style_set;
42574 extern (C) void function (Widget* widget, TextDirection previous_direction) nothrow direction_changed;
42575 extern (C) void function (Widget* widget, int was_grabbed) nothrow grab_notify;
42576 extern (C) void function (Widget* widget, GObject2.ParamSpec* pspec) nothrow child_notify;
42578 // RETURNS: %TRUE if the signal has been handled
42579 // <group_cycling>: %TRUE if there are other widgets with the same mnemonic
42580 extern (C) int function (Widget* widget, int group_cycling) nothrow mnemonic_activate;
42581 extern (C) void function (Widget* widget) nothrow grab_focus;
42582 extern (C) int function (Widget* widget, DirectionType direction) nothrow focus;
42584 // RETURNS: return from the event signal emission (%TRUE if
42585 // <event>: a #GdkEvent
42586 extern (C) int function (Widget* widget, Gdk2.Event* event) nothrow event;
42587 extern (C) int function (Widget* widget, Gdk2.EventButton* event) nothrow button_press_event;
42588 extern (C) int function (Widget* widget, Gdk2.EventButton* event) nothrow button_release_event;
42589 extern (C) int function (Widget* widget, Gdk2.EventScroll* event) nothrow scroll_event;
42590 extern (C) int function (Widget* widget, Gdk2.EventMotion* event) nothrow motion_notify_event;
42591 extern (C) int function (Widget* widget, Gdk2.EventAny* event) nothrow delete_event;
42592 extern (C) int function (Widget* widget, Gdk2.EventAny* event) nothrow destroy_event;
42593 extern (C) int function (Widget* widget, Gdk2.EventExpose* event) nothrow expose_event;
42594 extern (C) int function (Widget* widget, Gdk2.EventKey* event) nothrow key_press_event;
42595 extern (C) int function (Widget* widget, Gdk2.EventKey* event) nothrow key_release_event;
42596 extern (C) int function (Widget* widget, Gdk2.EventCrossing* event) nothrow enter_notify_event;
42597 extern (C) int function (Widget* widget, Gdk2.EventCrossing* event) nothrow leave_notify_event;
42598 extern (C) int function (Widget* widget, Gdk2.EventConfigure* event) nothrow configure_event;
42599 extern (C) int function (Widget* widget, Gdk2.EventFocus* event) nothrow focus_in_event;
42600 extern (C) int function (Widget* widget, Gdk2.EventFocus* event) nothrow focus_out_event;
42601 extern (C) int function (Widget* widget, Gdk2.EventAny* event) nothrow map_event;
42602 extern (C) int function (Widget* widget, Gdk2.EventAny* event) nothrow unmap_event;
42603 extern (C) int function (Widget* widget, Gdk2.EventProperty* event) nothrow property_notify_event;
42604 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) nothrow selection_clear_event;
42605 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) nothrow selection_request_event;
42606 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) nothrow selection_notify_event;
42607 extern (C) int function (Widget* widget, Gdk2.EventProximity* event) nothrow proximity_in_event;
42608 extern (C) int function (Widget* widget, Gdk2.EventProximity* event) nothrow proximity_out_event;
42609 extern (C) int function (Widget* widget, Gdk2.EventVisibility* event) nothrow visibility_notify_event;
42610 extern (C) int function (Widget* widget, Gdk2.EventClient* event) nothrow client_event;
42611 extern (C) int function (Widget* widget, Gdk2.EventAny* event) nothrow no_expose_event;
42612 extern (C) int function (Widget* widget, Gdk2.EventWindowState* event) nothrow window_state_event;
42613 extern (C) void function (Widget* widget, SelectionData* selection_data, uint info, uint time_) nothrow selection_get;
42614 extern (C) void function (Widget* widget, SelectionData* selection_data, uint time_) nothrow selection_received;
42615 extern (C) void function (Widget* widget, Gdk2.DragContext* context) nothrow drag_begin;
42616 extern (C) void function (Widget* widget, Gdk2.DragContext* context) nothrow drag_end;
42617 extern (C) void function (Widget* widget, Gdk2.DragContext* context, SelectionData* selection_data, uint info, uint time_) nothrow drag_data_get;
42618 extern (C) void function (Widget* widget, Gdk2.DragContext* context) nothrow drag_data_delete;
42619 extern (C) void function (Widget* widget, Gdk2.DragContext* context, uint time_) nothrow drag_leave;
42620 extern (C) int function (Widget* widget, Gdk2.DragContext* context, int x, int y, uint time_) nothrow drag_motion;
42621 extern (C) int function (Widget* widget, Gdk2.DragContext* context, int x, int y, uint time_) nothrow drag_drop;
42622 extern (C) void function (Widget* widget, Gdk2.DragContext* context, int x, int y, SelectionData* selection_data, uint info, uint time_) nothrow drag_data_received;
42623 extern (C) int function (Widget* widget) nothrow popup_menu;
42624 extern (C) int function (Widget* widget, WidgetHelpType help_type) nothrow show_help;
42625 // RETURNS: the #AtkObject associated with @widget
42626 extern (C) Atk.Object* function (Widget* widget) nothrow get_accessible;
42627 extern (C) void function (Widget* widget, Gdk2.Screen* previous_screen) nothrow screen_changed;
42629 // RETURNS: %TRUE if the accelerator can be activated.
42630 // <signal_id>: the ID of a signal installed on @widget
42631 extern (C) int function (Widget* widget, uint signal_id) nothrow can_activate_accel;
42632 extern (C) int function (Widget* widget, Gdk2.EventGrabBroken* event) nothrow grab_broken_event;
42633 extern (C) void function (Widget* widget) nothrow composited_changed;
42634 extern (C) int function (Widget* widget, int x, int y, int keyboard_tooltip, Tooltip* tooltip) nothrow query_tooltip;
42635 extern (C) void function () nothrow _gtk_reserved5;
42636 extern (C) void function () nothrow _gtk_reserved6;
42637 extern (C) void function () nothrow _gtk_reserved7;
42640 // VERSION: 2.2
42641 // Finds a style property of a widget class by name.
42642 // RETURNS: the #GParamSpec of the style property or %NULL if @class has no style property with that name.
42643 // <property_name>: the name of the style property to find
42644 GObject2.ParamSpec* find_style_property(AT0)(AT0 /*char*/ property_name) nothrow {
42645 return gtk_widget_class_find_style_property(&this, toCString!(char*)(property_name));
42648 // Installs a style property on a widget class. The parser for the
42649 // style property is determined by the value type of @pspec.
42650 // <pspec>: the #GParamSpec for the property
42651 void install_style_property(AT0)(AT0 /*GObject2.ParamSpec*/ pspec) nothrow {
42652 gtk_widget_class_install_style_property(&this, UpCast!(GObject2.ParamSpec*)(pspec));
42655 // Unintrospectable method: install_style_property_parser() / gtk_widget_class_install_style_property_parser()
42656 // Installs a style property on a widget class.
42657 // <pspec>: the #GParamSpec for the style property
42658 // <parser>: the parser for the style property
42659 void install_style_property_parser(AT0)(AT0 /*GObject2.ParamSpec*/ pspec, RcPropertyParser parser) nothrow {
42660 gtk_widget_class_install_style_property_parser(&this, UpCast!(GObject2.ParamSpec*)(pspec), parser);
42663 // VERSION: 2.2
42664 // Returns all style properties of a widget class.
42665 // RETURNS: an newly allocated array of #GParamSpec*. The array must be freed with g_free().
42666 // <n_properties>: location to return the number of style properties found
42667 GObject2.ParamSpec** /*new container*/ list_style_properties(AT0)(/*out*/ AT0 /*uint*/ n_properties) nothrow {
42668 return gtk_widget_class_list_style_properties(&this, UpCast!(uint*)(n_properties));
42672 // Tells about certain properties of the widget.
42673 enum WidgetFlags {
42674 TOPLEVEL = 16,
42675 NO_WINDOW = 32,
42676 REALIZED = 64,
42677 MAPPED = 128,
42678 VISIBLE = 256,
42679 SENSITIVE = 512,
42680 PARENT_SENSITIVE = 1024,
42681 CAN_FOCUS = 2048,
42682 HAS_FOCUS = 4096,
42683 CAN_DEFAULT = 8192,
42684 HAS_DEFAULT = 16384,
42685 HAS_GRAB = 32768,
42686 RC_STYLE = 65536,
42687 COMPOSITE_CHILD = 131072,
42688 NO_REPARENT = 262144,
42689 APP_PAINTABLE = 524288,
42690 RECEIVES_DEFAULT = 1048576,
42691 DOUBLE_BUFFERED = 2097152,
42692 NO_SHOW_ALL = 4194304
42694 enum WidgetHelpType {
42695 TOOLTIP = 0,
42696 WHATS_THIS = 1
42698 struct WidgetShapeInfo {
42699 short offset_x, offset_y;
42700 Gdk2.Bitmap* shape_mask;
42703 struct Window /* : Bin */ {
42704 mixin Atk.ImplementorIface.__interface__;
42705 mixin Buildable.__interface__;
42706 alias bin this;
42707 alias bin super_;
42708 Bin bin;
42709 char* title, wmclass_name, wmclass_class, wm_role;
42710 Widget* focus_widget, default_widget;
42711 Window* transient_parent;
42712 WindowGeometryInfo* geometry_info;
42713 Gdk2.Window* frame;
42714 WindowGroup* group;
42715 ushort configure_request_count;
42716 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
42717 uint, "allow_shrink", 1,
42718 uint, "allow_grow", 1,
42719 uint, "configure_notify_received", 1,
42720 uint, "need_default_position", 1,
42721 uint, "need_default_size", 1,
42722 uint, "position", 3,
42723 uint, "type", 4,
42724 uint, "has_user_ref_count", 1,
42725 uint, "has_focus", 1,
42726 uint, "modal", 1,
42727 uint, "destroy_with_parent", 1,
42728 uint, "has_frame", 1,
42729 uint, "iconify_initially", 1,
42730 uint, "stick_initially", 1,
42731 uint, "maximize_initially", 1,
42732 uint, "decorated", 1,
42733 uint, "type_hint", 3,
42734 uint, "gravity", 5,
42735 uint, "is_active_", 1,
42736 uint, "has_toplevel_focus_", 1,
42737 uint, "__dummy32A", 1));
42738 uint frame_left, frame_top, frame_right, frame_bottom, keys_changed_handler;
42739 Gdk2.ModifierType mnemonic_modifier;
42740 Gdk2.Screen* screen;
42743 // Creates a new #GtkWindow, which is a toplevel window that can
42744 // contain other widgets. Nearly always, the type of the window should
42745 // be #GTK_WINDOW_TOPLEVEL. If you're implementing something like a
42746 // popup menu from scratch (which is a bad idea, just use #GtkMenu),
42747 // you might use #GTK_WINDOW_POPUP. #GTK_WINDOW_POPUP is not for
42748 // dialogs, though in some other toolkits dialogs are called "popups".
42749 // In GTK+, #GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip.
42750 // On X11, popup windows are not controlled by the <link
42751 // linkend="gtk-X11-arch">window manager</link>.
42753 // If you simply want an undecorated window (no window borders), use
42754 // gtk_window_set_decorated(), don't use #GTK_WINDOW_POPUP.
42755 // RETURNS: a new #GtkWindow.
42756 // <type>: type of window
42757 static Window* new_()(WindowType type) nothrow {
42758 return gtk_window_new(type);
42760 static auto opCall()(WindowType type) {
42761 return gtk_window_new(type);
42764 // Gets the value set by gtk_window_set_default_icon_list().
42765 // The list is a copy and should be freed with g_list_free(),
42766 // but the pixbufs in the list have not had their reference count
42767 // incremented.
42768 // RETURNS: copy of default icon list
42769 static GLib2.List* /*new container*/ get_default_icon_list()() nothrow {
42770 return gtk_window_get_default_icon_list();
42773 // VERSION: 2.16
42774 // Returns the fallback icon name for windows that has been set
42775 // with gtk_window_set_default_icon_name(). The returned
42776 // string is owned by GTK+ and should not be modified. It
42777 // is only valid until the next call to
42778 // gtk_window_set_default_icon_name().
42779 // RETURNS: the fallback icon name for windows
42780 static char* get_default_icon_name()() nothrow {
42781 return gtk_window_get_default_icon_name();
42784 // Returns a list of all existing toplevel windows. The widgets
42785 // in the list are not individually referenced. If you want
42786 // to iterate through the list and perform actions involving
42787 // callbacks that might destroy the widgets, you <emphasis>must</emphasis> call
42788 // <literal>g_list_foreach (result, (GFunc)g_object_ref, NULL)</literal> first, and
42789 // then unref all the widgets afterwards.
42790 // RETURNS: list of toplevel widgets
42791 static GLib2.List* /*new container*/ list_toplevels()() nothrow {
42792 return gtk_window_list_toplevels();
42795 // VERSION: 2.2
42796 // By default, after showing the first #GtkWindow, GTK+ calls
42797 // gdk_notify_startup_complete(). Call this function to disable
42798 // the automatic startup notification. You might do this if your
42799 // first window is a splash screen, and you want to delay notification
42800 // until after your real main window has been shown, for example.
42802 // In that example, you would disable startup notification
42803 // temporarily, show your splash screen, then re-enable it so that
42804 // showing the main window would automatically result in notification.
42805 // <setting>: %TRUE to automatically do startup notification
42806 static void set_auto_startup_notification()(int setting) nothrow {
42807 gtk_window_set_auto_startup_notification(setting);
42810 // VERSION: 2.4
42811 // Sets an icon to be used as fallback for windows that haven't
42812 // had gtk_window_set_icon() called on them from a pixbuf.
42813 // <icon>: the icon
42814 static void set_default_icon(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ icon) nothrow {
42815 gtk_window_set_default_icon(UpCast!(GdkPixbuf2.Pixbuf*)(icon));
42818 // VERSION: 2.2
42819 // Sets an icon to be used as fallback for windows that haven't
42820 // had gtk_window_set_icon_list() called on them from a file
42821 // on disk. Warns on failure if @err is %NULL.
42822 // RETURNS: %TRUE if setting the icon succeeded.
42823 // <filename>: location of icon file
42824 static int set_default_icon_from_file(AT0, AT1)(AT0 /*char*/ filename, AT1 /*GLib2.Error**/ error=null) nothrow {
42825 return gtk_window_set_default_icon_from_file(toCString!(char*)(filename), UpCast!(GLib2.Error**)(error));
42828 // Sets an icon list to be used as fallback for windows that haven't
42829 // had gtk_window_set_icon_list() called on them to set up a
42830 // window-specific icon list. This function allows you to set up the
42831 // icon for all windows in your app at once.
42833 // See gtk_window_set_icon_list() for more details.
42834 // <list>: a list of #GdkPixbuf
42835 static void set_default_icon_list(AT0)(AT0 /*GLib2.List*/ list) nothrow {
42836 gtk_window_set_default_icon_list(UpCast!(GLib2.List*)(list));
42839 // VERSION: 2.6
42840 // Sets an icon to be used as fallback for windows that haven't
42841 // had gtk_window_set_icon_list() called on them from a named
42842 // themed icon, see gtk_window_set_icon_name().
42843 // <name>: the name of the themed icon
42844 static void set_default_icon_name(AT0)(AT0 /*char*/ name) nothrow {
42845 gtk_window_set_default_icon_name(toCString!(char*)(name));
42848 // Activates the default widget for the window, unless the current
42849 // focused widget has been configured to receive the default action
42850 // (see gtk_widget_set_receives_default()), in which case the
42851 // focused widget is activated.
42852 // RETURNS: %TRUE if a widget got activated.
42853 int activate_default()() nothrow {
42854 return gtk_window_activate_default(&this);
42857 // Activates the current focused widget within the window.
42858 // RETURNS: %TRUE if a widget got activated.
42859 int activate_focus()() nothrow {
42860 return gtk_window_activate_focus(&this);
42863 // VERSION: 2.4
42864 // Activates mnemonics and accelerators for this #GtkWindow. This is normally
42865 // called by the default ::key_press_event handler for toplevel windows,
42866 // however in some cases it may be useful to call this directly when
42867 // overriding the standard key handling for a toplevel window.
42868 // RETURNS: %TRUE if a mnemonic or accelerator was found and activated.
42869 // <event>: a #GdkEventKey
42870 int activate_key(AT0)(AT0 /*Gdk2.EventKey*/ event) nothrow {
42871 return gtk_window_activate_key(&this, UpCast!(Gdk2.EventKey*)(event));
42874 // Associate @accel_group with @window, such that calling
42875 // gtk_accel_groups_activate() on @window will activate accelerators
42876 // in @accel_group.
42877 // <accel_group>: a #GtkAccelGroup
42878 void add_accel_group(AT0)(AT0 /*AccelGroup*/ accel_group) nothrow {
42879 gtk_window_add_accel_group(&this, UpCast!(AccelGroup*)(accel_group));
42881 void add_embedded_xid()(Gdk2.NativeWindow xid) nothrow {
42882 gtk_window_add_embedded_xid(&this, xid);
42885 // Adds a mnemonic to this window.
42886 // <keyval>: the mnemonic
42887 // <target>: the widget that gets activated by the mnemonic
42888 void add_mnemonic(AT0)(uint keyval, AT0 /*Widget*/ target) nothrow {
42889 gtk_window_add_mnemonic(&this, keyval, UpCast!(Widget*)(target));
42892 // Starts moving a window. This function is used if an application has
42893 // window movement grips. When GDK can support it, the window movement
42894 // will be done using the standard mechanism for the <link
42895 // linkend="gtk-X11-arch">window manager</link> or windowing
42896 // system. Otherwise, GDK will try to emulate window movement,
42897 // potentially not all that well, depending on the windowing system.
42898 // <button>: mouse button that initiated the drag
42899 // <root_x>: X position where the user clicked to initiate the drag, in root window coordinates
42900 // <root_y>: Y position where the user clicked to initiate the drag
42901 // <timestamp>: timestamp from the click event that initiated the drag
42902 void begin_move_drag()(int button, int root_x, int root_y, uint timestamp) nothrow {
42903 gtk_window_begin_move_drag(&this, button, root_x, root_y, timestamp);
42906 // Starts resizing a window. This function is used if an application
42907 // has window resizing controls. When GDK can support it, the resize
42908 // will be done using the standard mechanism for the <link
42909 // linkend="gtk-X11-arch">window manager</link> or windowing
42910 // system. Otherwise, GDK will try to emulate window resizing,
42911 // potentially not all that well, depending on the windowing system.
42912 // <edge>: position of the resize control
42913 // <button>: mouse button that initiated the drag
42914 // <root_x>: X position where the user clicked to initiate the drag, in root window coordinates
42915 // <root_y>: Y position where the user clicked to initiate the drag
42916 // <timestamp>: timestamp from the click event that initiated the drag
42917 void begin_resize_drag()(Gdk2.WindowEdge edge, int button, int root_x, int root_y, uint timestamp) nothrow {
42918 gtk_window_begin_resize_drag(&this, edge, button, root_x, root_y, timestamp);
42921 // Asks to deiconify (i.e. unminimize) the specified @window. Note
42922 // that you shouldn't assume the window is definitely deiconified
42923 // afterward, because other entities (e.g. the user or <link
42924 // linkend="gtk-X11-arch">window manager</link>) could iconify it
42925 // again before your code which assumes deiconification gets to run.
42927 // You can track iconification via the "window-state-event" signal
42928 // on #GtkWidget.
42929 void deiconify()() nothrow {
42930 gtk_window_deiconify(&this);
42933 // VERSION: 2.2
42934 // Asks to place @window in the fullscreen state. Note that you
42935 // shouldn't assume the window is definitely full screen afterward,
42936 // because other entities (e.g. the user or <link
42937 // linkend="gtk-X11-arch">window manager</link>) could unfullscreen it
42938 // again, and not all window managers honor requests to fullscreen
42939 // windows. But normally the window will end up fullscreen. Just
42940 // don't write code that crashes if not.
42942 // You can track the fullscreen state via the "window-state-event" signal
42943 // on #GtkWidget.
42944 void fullscreen()() nothrow {
42945 gtk_window_fullscreen(&this);
42948 // VERSION: 2.4
42949 // Gets the value set by gtk_window_set_accept_focus().
42950 // RETURNS: %TRUE if window should receive the input focus
42951 int get_accept_focus()() nothrow {
42952 return gtk_window_get_accept_focus(&this);
42955 // Returns whether the window has been set to have decorations
42956 // such as a title bar via gtk_window_set_decorated().
42957 // RETURNS: %TRUE if the window has been set to have decorations
42958 int get_decorated()() nothrow {
42959 return gtk_window_get_decorated(&this);
42962 // Gets the default size of the window. A value of -1 for the width or
42963 // height indicates that a default size has not been explicitly set
42964 // for that dimension, so the "natural" size of the window will be
42965 // used.
42966 // <width>: location to store the default width, or %NULL
42967 // <height>: location to store the default height, or %NULL
42968 void get_default_size()(int* width=null, int* height=null) nothrow {
42969 gtk_window_get_default_size(&this, width, height);
42972 // VERSION: 2.14
42973 // Returns the default widget for @window. See gtk_window_set_default()
42974 // for more details.
42975 // RETURNS: the default widget, or %NULL if there is none.
42976 Widget* get_default_widget()() nothrow {
42977 return gtk_window_get_default_widget(&this);
42980 // VERSION: 2.10
42981 // Returns whether the window has been set to have a close button
42982 // via gtk_window_set_deletable().
42983 // RETURNS: %TRUE if the window has been set to have a close button
42984 int get_deletable()() nothrow {
42985 return gtk_window_get_deletable(&this);
42988 // Returns whether the window will be destroyed with its transient parent. See
42989 // gtk_window_set_destroy_with_parent ().
42990 // RETURNS: %TRUE if the window will be destroyed with its transient parent.
42991 int get_destroy_with_parent()() nothrow {
42992 return gtk_window_get_destroy_with_parent(&this);
42995 // Retrieves the current focused widget within the window.
42996 // Note that this is the widget that would have the focus
42997 // if the toplevel window focused; if the toplevel window
42998 // is not focused then <literal>gtk_widget_has_focus (widget)</literal> will
42999 // not be %TRUE for the widget.
43000 // RETURNS: the currently focused widget, or %NULL if there is none.
43001 Widget* get_focus()() nothrow {
43002 return gtk_window_get_focus(&this);
43005 // VERSION: 2.6
43006 // Gets the value set by gtk_window_set_focus_on_map().
43008 // mapped.
43009 // RETURNS: %TRUE if window should receive the input focus when
43010 int get_focus_on_map()() nothrow {
43011 return gtk_window_get_focus_on_map(&this);
43014 // DEPRECATED (v2.24) method: get_frame_dimensions - This function will be removed in GTK+ 3
43015 // (Note: this is a special-purpose function intended for the
43016 // framebuffer port; see gtk_window_set_has_frame(). It will not
43017 // return the size of the window border drawn by the <link
43018 // linkend="gtk-X11-arch">window manager</link>, which is the normal
43019 // case when using a windowing system. See
43020 // gdk_window_get_frame_extents() to get the standard window border
43021 // extents.)
43023 // Retrieves the dimensions of the frame window for this toplevel.
43024 // See gtk_window_set_has_frame(), gtk_window_set_frame_dimensions().
43025 // <left>: location to store the width of the frame at the left, or %NULL
43026 // <top>: location to store the height of the frame at the top, or %NULL
43027 // <right>: location to store the width of the frame at the returns, or %NULL
43028 // <bottom>: location to store the height of the frame at the bottom, or %NULL
43029 void get_frame_dimensions()(/*out*/ int* left=null, /*out*/ int* top=null, /*out*/ int* right=null, /*out*/ int* bottom=null) nothrow {
43030 gtk_window_get_frame_dimensions(&this, left, top, right, bottom);
43033 // Gets the value set by gtk_window_set_gravity().
43034 // RETURNS: window gravity
43035 Gdk2.Gravity get_gravity()() nothrow {
43036 return gtk_window_get_gravity(&this);
43039 // VERSION: 2.10
43040 // Returns the group for @window or the default group, if
43041 // @window is %NULL or if @window does not have an explicit
43042 // window group.
43043 // RETURNS: the #GtkWindowGroup for a window or the default group
43044 WindowGroup* get_group()() nothrow {
43045 return gtk_window_get_group(&this);
43048 // DEPRECATED (v2.24) method: get_has_frame - This function will be removed in GTK+ 3
43049 // Accessor for whether the window has a frame window exterior to
43050 // @window->window. Gets the value set by gtk_window_set_has_frame ().
43052 // via gtk_window_set_has_frame().
43053 // RETURNS: %TRUE if a frame has been added to the window
43054 int get_has_frame()() nothrow {
43055 return gtk_window_get_has_frame(&this);
43058 // Gets the value set by gtk_window_set_icon() (or if you've
43059 // called gtk_window_set_icon_list(), gets the first icon in
43060 // the icon list).
43061 // RETURNS: icon for window
43062 GdkPixbuf2.Pixbuf* get_icon()() nothrow {
43063 return gtk_window_get_icon(&this);
43066 // Retrieves the list of icons set by gtk_window_set_icon_list().
43067 // The list is copied, but the reference count on each
43068 // member won't be incremented.
43069 // RETURNS: copy of window's icon list
43070 GLib2.List* /*new container*/ get_icon_list()() nothrow {
43071 return gtk_window_get_icon_list(&this);
43074 // VERSION: 2.6
43075 // Returns the name of the themed icon for the window,
43076 // see gtk_window_set_icon_name().
43078 // no themed icon
43079 // RETURNS: the icon name or %NULL if the window has
43080 char* get_icon_name()() nothrow {
43081 return gtk_window_get_icon_name(&this);
43084 // Returns the mnemonic modifier for this window. See
43085 // gtk_window_set_mnemonic_modifier().
43087 // mnemonics on this window.
43088 // RETURNS: the modifier mask used to activate
43089 Gdk2.ModifierType get_mnemonic_modifier()() nothrow {
43090 return gtk_window_get_mnemonic_modifier(&this);
43092 int get_mnemonics_visible()() nothrow {
43093 return gtk_window_get_mnemonics_visible(&this);
43096 // Returns whether the window is modal. See gtk_window_set_modal().
43098 // establishes a grab when shown
43099 // RETURNS: %TRUE if the window is set to be modal and
43100 int get_modal()() nothrow {
43101 return gtk_window_get_modal(&this);
43104 // VERSION: 2.12
43105 // Fetches the requested opacity for this window. See
43106 // gtk_window_set_opacity().
43107 // RETURNS: the requested opacity for this window.
43108 double get_opacity()() nothrow {
43109 return gtk_window_get_opacity(&this);
43112 // This function returns the position you need to pass to
43113 // gtk_window_move() to keep @window in its current position. This
43114 // means that the meaning of the returned value varies with window
43115 // gravity. See gtk_window_move() for more details.
43117 // If you haven't changed the window gravity, its gravity will be
43118 // #GDK_GRAVITY_NORTH_WEST. This means that gtk_window_get_position()
43119 // gets the position of the top-left corner of the window manager
43120 // frame for the window. gtk_window_move() sets the position of this
43121 // same top-left corner.
43123 // gtk_window_get_position() is not 100% reliable because the X Window System
43124 // does not specify a way to obtain the geometry of the
43125 // decorations placed on a window by the window manager.
43126 // Thus GTK+ is using a "best guess" that works with most
43127 // window managers.
43129 // Moreover, nearly all window managers are historically broken with
43130 // respect to their handling of window gravity. So moving a window to
43131 // its current position as returned by gtk_window_get_position() tends
43132 // to result in moving the window slightly. Window managers are
43133 // slowly getting better over time.
43135 // If a window has gravity #GDK_GRAVITY_STATIC the window manager
43136 // frame is not relevant, and thus gtk_window_get_position() will
43137 // always produce accurate results. However you can't use static
43138 // gravity to do things like place a window in a corner of the screen,
43139 // because static gravity ignores the window manager decorations.
43141 // If you are saving and restoring your application's window
43142 // positions, you should know that it's impossible for applications to
43143 // do this without getting it somewhat wrong because applications do
43144 // not have sufficient knowledge of window manager state. The Correct
43145 // Mechanism is to support the session management protocol (see the
43146 // "GnomeClient" object in the GNOME libraries for example) and allow
43147 // the window manager to save your window sizes and positions.
43148 // <root_x>: return location for X coordinate of gravity-determined reference point
43149 // <root_y>: return location for Y coordinate of gravity-determined reference point
43150 void get_position()(/*out*/ int* root_x=null, /*out*/ int* root_y=null) nothrow {
43151 gtk_window_get_position(&this, root_x, root_y);
43154 // Gets the value set by gtk_window_set_resizable().
43155 // RETURNS: %TRUE if the user can resize the window
43156 int get_resizable()() nothrow {
43157 return gtk_window_get_resizable(&this);
43160 // Returns the role of the window. See gtk_window_set_role() for
43161 // further explanation.
43163 // returned is owned by the widget and must not be modified
43164 // or freed.
43165 // RETURNS: the role of the window if set, or %NULL. The
43166 char* get_role()() nothrow {
43167 return gtk_window_get_role(&this);
43170 // VERSION: 2.2
43171 // Returns the #GdkScreen associated with @window.
43172 // RETURNS: a #GdkScreen.
43173 Gdk2.Screen* get_screen()() nothrow {
43174 return gtk_window_get_screen(&this);
43177 // Obtains the current size of @window. If @window is not onscreen,
43178 // it returns the size GTK+ will suggest to the <link
43179 // linkend="gtk-X11-arch">window manager</link> for the initial window
43180 // size (but this is not reliably the same as the size the window
43181 // manager will actually select). The size obtained by
43182 // gtk_window_get_size() is the last size received in a
43183 // #GdkEventConfigure, that is, GTK+ uses its locally-stored size,
43184 // rather than querying the X server for the size. As a result, if you
43185 // call gtk_window_resize() then immediately call
43186 // gtk_window_get_size(), the size won't have taken effect yet. After
43187 // the window manager processes the resize request, GTK+ receives
43188 // notification that the size has changed via a configure event, and
43189 // the size of the window gets updated.
43191 // Note 1: Nearly any use of this function creates a race condition,
43192 // because the size of the window may change between the time that you
43193 // get the size and the time that you perform some action assuming
43194 // that size is the current size. To avoid race conditions, connect to
43195 // "configure-event" on the window and adjust your size-dependent
43196 // state to match the size delivered in the #GdkEventConfigure.
43198 // Note 2: The returned size does <emphasis>not</emphasis> include the
43199 // size of the window manager decorations (aka the window frame or
43200 // border). Those are not drawn by GTK+ and GTK+ has no reliable
43201 // method of determining their size.
43203 // Note 3: If you are getting a window size in order to position
43204 // the window onscreen, there may be a better way. The preferred
43205 // way is to simply set the window's semantic type with
43206 // gtk_window_set_type_hint(), which allows the window manager to
43207 // e.g. center dialogs. Also, if you set the transient parent of
43208 // dialogs with gtk_window_set_transient_for() window managers
43209 // will often center the dialog over its parent window. It's
43210 // much preferred to let the window manager handle these
43211 // things rather than doing it yourself, because all apps will
43212 // behave consistently and according to user prefs if the window
43213 // manager handles it. Also, the window manager can take the size
43214 // of the window decorations/border into account, while your
43215 // application cannot.
43217 // In any case, if you insist on application-specified window
43218 // positioning, there's <emphasis>still</emphasis> a better way than
43219 // doing it yourself - gtk_window_set_position() will frequently
43220 // handle the details for you.
43221 // <width>: return location for width, or %NULL
43222 // <height>: return location for height, or %NULL
43223 void get_size()(/*out*/ int* width=null, /*out*/ int* height=null) nothrow {
43224 gtk_window_get_size(&this, width, height);
43227 // VERSION: 2.2
43228 // Gets the value set by gtk_window_set_skip_pager_hint().
43229 // RETURNS: %TRUE if window shouldn't be in pager
43230 int get_skip_pager_hint()() nothrow {
43231 return gtk_window_get_skip_pager_hint(&this);
43234 // VERSION: 2.2
43235 // Gets the value set by gtk_window_set_skip_taskbar_hint()
43236 // RETURNS: %TRUE if window shouldn't be in taskbar
43237 int get_skip_taskbar_hint()() nothrow {
43238 return gtk_window_get_skip_taskbar_hint(&this);
43241 // Retrieves the title of the window. See gtk_window_set_title().
43243 // been set explicitely. The returned string is owned by the widget
43244 // and must not be modified or freed.
43245 // RETURNS: the title of the window, or %NULL if none has
43246 char* get_title()() nothrow {
43247 return gtk_window_get_title(&this);
43250 // Fetches the transient parent for this window. See
43251 // gtk_window_set_transient_for().
43253 // if no transient parent has been set.
43254 // RETURNS: the transient parent for this window, or %NULL
43255 Window* get_transient_for()() nothrow {
43256 return gtk_window_get_transient_for(&this);
43259 // Gets the type hint for this window. See gtk_window_set_type_hint().
43260 // RETURNS: the type hint for @window.
43261 Gdk2.WindowTypeHint get_type_hint()() nothrow {
43262 return gtk_window_get_type_hint(&this);
43265 // VERSION: 2.8
43266 // Gets the value set by gtk_window_set_urgency_hint()
43267 // RETURNS: %TRUE if window is urgent
43268 int get_urgency_hint()() nothrow {
43269 return gtk_window_get_urgency_hint(&this);
43272 // VERSION: 2.20
43273 // Gets the type of the window. See #GtkWindowType.
43274 // RETURNS: the type of the window
43275 WindowType get_window_type()() nothrow {
43276 return gtk_window_get_window_type(&this);
43279 // Returns whether @window has an explicit window group.
43282 // Since 2.22
43283 // RETURNS: %TRUE if @window has an explicit window group.
43284 int has_group()() nothrow {
43285 return gtk_window_has_group(&this);
43288 // VERSION: 2.4
43289 // Returns whether the input focus is within this GtkWindow.
43290 // For real toplevel windows, this is identical to gtk_window_is_active(),
43291 // but for embedded windows, like #GtkPlug, the results will differ.
43292 // RETURNS: %TRUE if the input focus is within this GtkWindow
43293 int has_toplevel_focus()() nothrow {
43294 return gtk_window_has_toplevel_focus(&this);
43297 // Asks to iconify (i.e. minimize) the specified @window. Note that
43298 // you shouldn't assume the window is definitely iconified afterward,
43299 // because other entities (e.g. the user or <link
43300 // linkend="gtk-X11-arch">window manager</link>) could deiconify it
43301 // again, or there may not be a window manager in which case
43302 // iconification isn't possible, etc. But normally the window will end
43303 // up iconified. Just don't write code that crashes if not.
43305 // It's permitted to call this function before showing a window,
43306 // in which case the window will be iconified before it ever appears
43307 // onscreen.
43309 // You can track iconification via the "window-state-event" signal
43310 // on #GtkWidget.
43311 void iconify()() nothrow {
43312 gtk_window_iconify(&this);
43315 // VERSION: 2.4
43316 // Returns whether the window is part of the current active toplevel.
43317 // (That is, the toplevel window receiving keystrokes.)
43318 // The return value is %TRUE if the window is active toplevel
43319 // itself, but also if it is, say, a #GtkPlug embedded in the active toplevel.
43320 // You might use this function if you wanted to draw a widget
43321 // differently in an active window from a widget in an inactive window.
43322 // See gtk_window_has_toplevel_focus()
43323 // RETURNS: %TRUE if the window part of the current active window.
43324 int is_active()() nothrow {
43325 return gtk_window_is_active(&this);
43328 // Asks to maximize @window, so that it becomes full-screen. Note that
43329 // you shouldn't assume the window is definitely maximized afterward,
43330 // because other entities (e.g. the user or <link
43331 // linkend="gtk-X11-arch">window manager</link>) could unmaximize it
43332 // again, and not all window managers support maximization. But
43333 // normally the window will end up maximized. Just don't write code
43334 // that crashes if not.
43336 // It's permitted to call this function before showing a window,
43337 // in which case the window will be maximized when it appears onscreen
43338 // initially.
43340 // You can track maximization via the "window-state-event" signal
43341 // on #GtkWidget.
43342 void maximize()() nothrow {
43343 gtk_window_maximize(&this);
43346 // Activates the targets associated with the mnemonic.
43347 // RETURNS: %TRUE if the activation is done.
43348 // <keyval>: the mnemonic
43349 // <modifier>: the modifiers
43350 int mnemonic_activate()(uint keyval, Gdk2.ModifierType modifier) nothrow {
43351 return gtk_window_mnemonic_activate(&this, keyval, modifier);
43354 // Asks the <link linkend="gtk-X11-arch">window manager</link> to move
43355 // @window to the given position. Window managers are free to ignore
43356 // this; most window managers ignore requests for initial window
43357 // positions (instead using a user-defined placement algorithm) and
43358 // honor requests after the window has already been shown.
43360 // Note: the position is the position of the gravity-determined
43361 // reference point for the window. The gravity determines two things:
43362 // first, the location of the reference point in root window
43363 // coordinates; and second, which point on the window is positioned at
43364 // the reference point.
43366 // By default the gravity is #GDK_GRAVITY_NORTH_WEST, so the reference
43367 // point is simply the @x, @y supplied to gtk_window_move(). The
43368 // top-left corner of the window decorations (aka window frame or
43369 // border) will be placed at @x, @y. Therefore, to position a window
43370 // at the top left of the screen, you want to use the default gravity
43371 // (which is #GDK_GRAVITY_NORTH_WEST) and move the window to 0,0.
43373 // To position a window at the bottom right corner of the screen, you
43374 // would set #GDK_GRAVITY_SOUTH_EAST, which means that the reference
43375 // point is at @x + the window width and @y + the window height, and
43376 // the bottom-right corner of the window border will be placed at that
43377 // reference point. So, to place a window in the bottom right corner
43378 // you would first set gravity to south east, then write:
43379 // <literal>gtk_window_move (window, gdk_screen_width () - window_width,
43380 // gdk_screen_height () - window_height)</literal> (note that this
43381 // example does not take multi-head scenarios into account).
43383 // The Extended Window Manager Hints specification at <ulink
43384 // url="http://www.freedesktop.org/Standards/wm-spec">
43385 // http://www.freedesktop.org/Standards/wm-spec</ulink> has a
43386 // nice table of gravities in the "implementation notes" section.
43388 // The gtk_window_get_position() documentation may also be relevant.
43389 // <x>: X coordinate to move window to
43390 // <y>: Y coordinate to move window to
43391 void move()(int x, int y) nothrow {
43392 gtk_window_move(&this, x, y);
43395 // Parses a standard X Window System geometry string - see the
43396 // manual page for X (type 'man X') for details on this.
43397 // gtk_window_parse_geometry() does work on all GTK+ ports
43398 // including Win32 but is primarily intended for an X environment.
43400 // If either a size or a position can be extracted from the
43401 // geometry string, gtk_window_parse_geometry() returns %TRUE
43402 // and calls gtk_window_set_default_size() and/or gtk_window_move()
43403 // to resize/move the window.
43405 // If gtk_window_parse_geometry() returns %TRUE, it will also
43406 // set the #GDK_HINT_USER_POS and/or #GDK_HINT_USER_SIZE hints
43407 // indicating to the window manager that the size/position of
43408 // the window was user-specified. This causes most window
43409 // managers to honor the geometry.
43411 // Note that for gtk_window_parse_geometry() to work as expected, it has
43412 // to be called when the window has its "final" size, i.e. after calling
43413 // gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints()
43414 // on the window.
43415 // |[
43416 // #include <gtk/gtk.h>
43418 // static void
43419 // fill_with_content (GtkWidget *vbox)
43420 // {
43421 // /&ast; fill with content... &ast;/
43422 // }
43424 // int
43425 // main (int argc, char *argv[])
43426 // {
43427 // GtkWidget *window, *vbox;
43428 // GdkGeometry size_hints = {
43429 // 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST
43430 // };
43432 // gtk_init (&argc, &argv);
43434 // window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
43435 // vbox = gtk_vbox_new (FALSE, 0);
43437 // gtk_container_add (GTK_CONTAINER (window), vbox);
43438 // fill_with_content (vbox);
43439 // gtk_widget_show_all (vbox);
43441 // gtk_window_set_geometry_hints (GTK_WINDOW (window),
43442 // window,
43443 // &size_hints,
43444 // GDK_HINT_MIN_SIZE |
43445 // GDK_HINT_BASE_SIZE |
43446 // GDK_HINT_RESIZE_INC);
43448 // if (argc &gt; 1)
43449 // {
43450 // if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
43451 // fprintf (stderr, "Failed to parse '%s'\n", argv[1]);
43452 // }
43454 // gtk_widget_show_all (window);
43455 // gtk_main ();
43457 // return 0;
43458 // }
43459 // ]|
43460 // RETURNS: %TRUE if string was parsed successfully
43461 // <geometry>: geometry string
43462 int parse_geometry(AT0)(AT0 /*char*/ geometry) nothrow {
43463 return gtk_window_parse_geometry(&this, toCString!(char*)(geometry));
43466 // Presents a window to the user. This may mean raising the window
43467 // in the stacking order, deiconifying it, moving it to the current
43468 // desktop, and/or giving it the keyboard focus, possibly dependent
43469 // on the user's platform, window manager, and preferences.
43471 // If @window is hidden, this function calls gtk_widget_show()
43472 // as well.
43474 // This function should be used when the user tries to open a window
43475 // that's already open. Say for example the preferences dialog is
43476 // currently open, and the user chooses Preferences from the menu
43477 // a second time; use gtk_window_present() to move the already-open dialog
43478 // where the user can see it.
43480 // If you are calling this function in response to a user interaction,
43481 // it is preferable to use gtk_window_present_with_time().
43482 void present()() nothrow {
43483 gtk_window_present(&this);
43486 // VERSION: 2.8
43487 // Presents a window to the user in response to a user interaction.
43488 // If you need to present a window without a timestamp, use
43489 // gtk_window_present(). See gtk_window_present() for details.
43490 // <timestamp>: the timestamp of the user interaction (typically a button or key press event) which triggered this call
43491 void present_with_time()(uint timestamp) nothrow {
43492 gtk_window_present_with_time(&this, timestamp);
43495 // VERSION: 2.4
43496 // Propagate a key press or release event to the focus widget and
43497 // up the focus container chain until a widget handles @event.
43498 // This is normally called by the default ::key_press_event and
43499 // ::key_release_event handlers for toplevel windows,
43500 // however in some cases it may be useful to call this directly when
43501 // overriding the standard key handling for a toplevel window.
43502 // RETURNS: %TRUE if a widget in the focus chain handled the event.
43503 // <event>: a #GdkEventKey
43504 int propagate_key_event(AT0)(AT0 /*Gdk2.EventKey*/ event) nothrow {
43505 return gtk_window_propagate_key_event(&this, UpCast!(Gdk2.EventKey*)(event));
43508 // Reverses the effects of gtk_window_add_accel_group().
43509 // <accel_group>: a #GtkAccelGroup
43510 void remove_accel_group(AT0)(AT0 /*AccelGroup*/ accel_group) nothrow {
43511 gtk_window_remove_accel_group(&this, UpCast!(AccelGroup*)(accel_group));
43513 void remove_embedded_xid()(Gdk2.NativeWindow xid) nothrow {
43514 gtk_window_remove_embedded_xid(&this, xid);
43517 // Removes a mnemonic from this window.
43518 // <keyval>: the mnemonic
43519 // <target>: the widget that gets activated by the mnemonic
43520 void remove_mnemonic(AT0)(uint keyval, AT0 /*Widget*/ target) nothrow {
43521 gtk_window_remove_mnemonic(&this, keyval, UpCast!(Widget*)(target));
43524 // Hides @window, then reshows it, resetting the
43525 // default size and position of the window. Used
43526 // by GUI builders only.
43527 void reshow_with_initial_size()() nothrow {
43528 gtk_window_reshow_with_initial_size(&this);
43531 // Resizes the window as if the user had done so, obeying geometry
43532 // constraints. The default geometry constraint is that windows may
43533 // not be smaller than their size request; to override this
43534 // constraint, call gtk_widget_set_size_request() to set the window's
43535 // request to a smaller value.
43537 // If gtk_window_resize() is called before showing a window for the
43538 // first time, it overrides any default size set with
43539 // gtk_window_set_default_size().
43541 // Windows may not be resized smaller than 1 by 1 pixels.
43542 // <width>: width in pixels to resize the window to
43543 // <height>: height in pixels to resize the window to
43544 void resize()(int width, int height) nothrow {
43545 gtk_window_resize(&this, width, height);
43548 // VERSION: 2.4
43549 // Windows may set a hint asking the desktop environment not to receive
43550 // the input focus. This function sets this hint.
43551 // <setting>: %TRUE to let this window receive input focus
43552 void set_accept_focus()(int setting) nothrow {
43553 gtk_window_set_accept_focus(&this, setting);
43556 // By default, windows are decorated with a title bar, resize
43557 // controls, etc. Some <link linkend="gtk-X11-arch">window
43558 // managers</link> allow GTK+ to disable these decorations, creating a
43559 // borderless window. If you set the decorated property to %FALSE
43560 // using this function, GTK+ will do its best to convince the window
43561 // manager not to decorate the window. Depending on the system, this
43562 // function may not have any effect when called on a window that is
43563 // already visible, so you should call it before calling gtk_window_show().
43565 // On Windows, this function always works, since there's no window manager
43566 // policy involved.
43567 // <setting>: %TRUE to decorate the window
43568 void set_decorated()(int setting) nothrow {
43569 gtk_window_set_decorated(&this, setting);
43572 // The default widget is the widget that's activated when the user
43573 // presses Enter in a dialog (for example). This function sets or
43574 // unsets the default widget for a #GtkWindow about. When setting
43575 // (rather than unsetting) the default widget it's generally easier to
43576 // call gtk_widget_grab_focus() on the widget. Before making a widget
43577 // the default widget, you must set the #GTK_CAN_DEFAULT flag on the
43578 // widget you'd like to make the default using GTK_WIDGET_SET_FLAGS().
43579 // <default_widget>: widget to be the default, or %NULL to unset the default widget for the toplevel.
43580 void set_default(AT0)(AT0 /*Widget*/ default_widget=null) nothrow {
43581 gtk_window_set_default(&this, UpCast!(Widget*)(default_widget));
43584 // Sets the default size of a window. If the window's "natural" size
43585 // (its size request) is larger than the default, the default will be
43586 // ignored. More generally, if the default size does not obey the
43587 // geometry hints for the window (gtk_window_set_geometry_hints() can
43588 // be used to set these explicitly), the default size will be clamped
43589 // to the nearest permitted size.
43591 // Unlike gtk_widget_set_size_request(), which sets a size request for
43592 // a widget and thus would keep users from shrinking the window, this
43593 // function only sets the initial size, just as if the user had
43594 // resized the window themselves. Users can still shrink the window
43595 // again as they normally would. Setting a default size of -1 means to
43596 // use the "natural" default size (the size request of the window).
43598 // For more control over a window's initial size and how resizing works,
43599 // investigate gtk_window_set_geometry_hints().
43601 // For some uses, gtk_window_resize() is a more appropriate function.
43602 // gtk_window_resize() changes the current size of the window, rather
43603 // than the size to be used on initial display. gtk_window_resize() always
43604 // affects the window itself, not the geometry widget.
43606 // The default size of a window only affects the first time a window is
43607 // shown; if a window is hidden and re-shown, it will remember the size
43608 // it had prior to hiding, rather than using the default size.
43610 // Windows can't actually be 0x0 in size, they must be at least 1x1, but
43611 // passing 0 for @width and @height is OK, resulting in a 1x1 default size.
43612 // <width>: width in pixels, or -1 to unset the default width
43613 // <height>: height in pixels, or -1 to unset the default height
43614 void set_default_size()(int width, int height) nothrow {
43615 gtk_window_set_default_size(&this, width, height);
43618 // VERSION: 2.10
43619 // By default, windows have a close button in the window frame. Some
43620 // <link linkend="gtk-X11-arch">window managers</link> allow GTK+ to
43621 // disable this button. If you set the deletable property to %FALSE
43622 // using this function, GTK+ will do its best to convince the window
43623 // manager not to show a close button. Depending on the system, this
43624 // function may not have any effect when called on a window that is
43625 // already visible, so you should call it before calling gtk_window_show().
43627 // On Windows, this function always works, since there's no window manager
43628 // policy involved.
43629 // <setting>: %TRUE to decorate the window as deletable
43630 void set_deletable()(int setting) nothrow {
43631 gtk_window_set_deletable(&this, setting);
43634 // If @setting is %TRUE, then destroying the transient parent of @window
43635 // will also destroy @window itself. This is useful for dialogs that
43636 // shouldn't persist beyond the lifetime of the main window they're
43637 // associated with, for example.
43638 // <setting>: whether to destroy @window with its transient parent
43639 void set_destroy_with_parent()(int setting) nothrow {
43640 gtk_window_set_destroy_with_parent(&this, setting);
43643 // If @focus is not the current focus widget, and is focusable, sets
43644 // it as the focus widget for the window. If @focus is %NULL, unsets
43645 // the focus widget for this window. To set the focus to a particular
43646 // widget in the toplevel, it is usually more convenient to use
43647 // gtk_widget_grab_focus() instead of this function.
43648 // <focus>: widget to be the new focus widget, or %NULL to unset any focus widget for the toplevel window.
43649 void set_focus(AT0)(AT0 /*Widget*/ focus=null) nothrow {
43650 gtk_window_set_focus(&this, UpCast!(Widget*)(focus));
43653 // VERSION: 2.6
43654 // Windows may set a hint asking the desktop environment not to receive
43655 // the input focus when the window is mapped. This function sets this
43656 // hint.
43657 // <setting>: %TRUE to let this window receive input focus on map
43658 void set_focus_on_map()(int setting) nothrow {
43659 gtk_window_set_focus_on_map(&this, setting);
43662 // DEPRECATED (v2.24) method: set_frame_dimensions - This function will be removed in GTK+ 3
43663 // (Note: this is a special-purpose function intended for the framebuffer
43664 // port; see gtk_window_set_has_frame(). It will have no effect on the
43665 // window border drawn by the window manager, which is the normal
43666 // case when using the X Window system.)
43668 // For windows with frames (see gtk_window_set_has_frame()) this function
43669 // can be used to change the size of the frame border.
43670 // <left>: The width of the left border
43671 // <top>: The height of the top border
43672 // <right>: The width of the right border
43673 // <bottom>: The height of the bottom border
43674 void set_frame_dimensions()(int left, int top, int right, int bottom) nothrow {
43675 gtk_window_set_frame_dimensions(&this, left, top, right, bottom);
43678 // This function sets up hints about how a window can be resized by
43679 // the user. You can set a minimum and maximum size; allowed resize
43680 // increments (e.g. for xterm, you can only resize by the size of a
43681 // character); aspect ratios; and more. See the #GdkGeometry struct.
43682 // <geometry_widget>: widget the geometry hints will be applied to
43683 // <geometry>: struct containing geometry information
43684 // <geom_mask>: mask indicating which struct fields should be paid attention to
43685 void set_geometry_hints(AT0, AT1)(AT0 /*Widget*/ geometry_widget, AT1 /*Gdk2.Geometry*/ geometry, Gdk2.WindowHints geom_mask) nothrow {
43686 gtk_window_set_geometry_hints(&this, UpCast!(Widget*)(geometry_widget), UpCast!(Gdk2.Geometry*)(geometry), geom_mask);
43689 // Window gravity defines the meaning of coordinates passed to
43690 // gtk_window_move(). See gtk_window_move() and #GdkGravity for
43691 // more details.
43693 // The default window gravity is #GDK_GRAVITY_NORTH_WEST which will
43694 // typically "do what you mean."
43695 // <gravity>: window gravity
43696 void set_gravity()(Gdk2.Gravity gravity) nothrow {
43697 gtk_window_set_gravity(&this, gravity);
43700 // DEPRECATED (v2.24) method: set_has_frame - This function will be removed in GTK+ 3
43701 // (Note: this is a special-purpose function for the framebuffer port,
43702 // that causes GTK+ to draw its own window border. For most applications,
43703 // you want gtk_window_set_decorated() instead, which tells the window
43704 // manager whether to draw the window border.)
43706 // If this function is called on a window with setting of %TRUE, before
43707 // it is realized or showed, it will have a "frame" window around
43708 // @window->window, accessible in @window->frame. Using the signal
43709 // frame_event you can receive all events targeted at the frame.
43711 // This function is used by the linux-fb port to implement managed
43712 // windows, but it could conceivably be used by X-programs that
43713 // want to do their own window decorations.
43714 // <setting>: a boolean
43715 void set_has_frame()(int setting) nothrow {
43716 gtk_window_set_has_frame(&this, setting);
43719 // Sets up the icon representing a #GtkWindow. This icon is used when
43720 // the window is minimized (also known as iconified). Some window
43721 // managers or desktop environments may also place it in the window
43722 // frame, or display it in other contexts.
43724 // The icon should be provided in whatever size it was naturally
43725 // drawn; that is, don't scale the image before passing it to
43726 // GTK+. Scaling is postponed until the last minute, when the desired
43727 // final size is known, to allow best quality.
43729 // If you have your icon hand-drawn in multiple sizes, use
43730 // gtk_window_set_icon_list(). Then the best size will be used.
43732 // This function is equivalent to calling gtk_window_set_icon_list()
43733 // with a 1-element list.
43735 // See also gtk_window_set_default_icon_list() to set the icon
43736 // for all windows in your application in one go.
43737 // <icon>: icon image, or %NULL
43738 void set_icon(AT0)(AT0 /*GdkPixbuf2.Pixbuf*/ icon=null) nothrow {
43739 gtk_window_set_icon(&this, UpCast!(GdkPixbuf2.Pixbuf*)(icon));
43742 // VERSION: 2.2
43743 // Sets the icon for @window.
43744 // Warns on failure if @err is %NULL.
43746 // This function is equivalent to calling gtk_window_set_icon()
43747 // with a pixbuf created by loading the image from @filename.
43748 // RETURNS: %TRUE if setting the icon succeeded.
43749 // <filename>: location of icon file
43750 int set_icon_from_file(AT0, AT1)(AT0 /*char*/ filename, AT1 /*GLib2.Error**/ error=null) nothrow {
43751 return gtk_window_set_icon_from_file(&this, toCString!(char*)(filename), UpCast!(GLib2.Error**)(error));
43754 // Unintrospectable method: set_icon_list() / gtk_window_set_icon_list()
43755 // Sets up the icon representing a #GtkWindow. The icon is used when
43756 // the window is minimized (also known as iconified). Some window
43757 // managers or desktop environments may also place it in the window
43758 // frame, or display it in other contexts.
43760 // gtk_window_set_icon_list() allows you to pass in the same icon in
43761 // several hand-drawn sizes. The list should contain the natural sizes
43762 // your icon is available in; that is, don't scale the image before
43763 // passing it to GTK+. Scaling is postponed until the last minute,
43764 // when the desired final size is known, to allow best quality.
43766 // By passing several sizes, you may improve the final image quality
43767 // of the icon, by reducing or eliminating automatic image scaling.
43769 // Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
43770 // larger images (64x64, 128x128) if you have them.
43772 // See also gtk_window_set_default_icon_list() to set the icon
43773 // for all windows in your application in one go.
43775 // Note that transient windows (those who have been set transient for another
43776 // window using gtk_window_set_transient_for()) will inherit their
43777 // icon from their transient parent. So there's no need to explicitly
43778 // set the icon on transient windows.
43779 // <list>: list of #GdkPixbuf
43780 void set_icon_list(AT0)(AT0 /*GLib2.List*/ list) nothrow {
43781 gtk_window_set_icon_list(&this, UpCast!(GLib2.List*)(list));
43784 // VERSION: 2.6
43785 // Sets the icon for the window from a named themed icon. See
43786 // the docs for #GtkIconTheme for more details.
43788 // Note that this has nothing to do with the WM_ICON_NAME
43789 // property which is mentioned in the ICCCM.
43790 // <name>: the name of the themed icon
43791 void set_icon_name(AT0)(AT0 /*char*/ name=null) nothrow {
43792 gtk_window_set_icon_name(&this, toCString!(char*)(name));
43795 // VERSION: 2.4
43796 // Asks to keep @window above, so that it stays on top. Note that
43797 // you shouldn't assume the window is definitely above afterward,
43798 // because other entities (e.g. the user or <link
43799 // linkend="gtk-X11-arch">window manager</link>) could not keep it above,
43800 // and not all window managers support keeping windows above. But
43801 // normally the window will end kept above. Just don't write code
43802 // that crashes if not.
43804 // It's permitted to call this function before showing a window,
43805 // in which case the window will be kept above when it appears onscreen
43806 // initially.
43808 // You can track the above state via the "window-state-event" signal
43809 // on #GtkWidget.
43811 // Note that, according to the <ulink
43812 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
43813 // Manager Hints</ulink> specification, the above state is mainly meant
43814 // for user preferences and should not be used by applications e.g. for
43815 // drawing attention to their dialogs.
43816 // <setting>: whether to keep @window above other windows
43817 void set_keep_above()(int setting) nothrow {
43818 gtk_window_set_keep_above(&this, setting);
43821 // VERSION: 2.4
43822 // Asks to keep @window below, so that it stays in bottom. Note that
43823 // you shouldn't assume the window is definitely below afterward,
43824 // because other entities (e.g. the user or <link
43825 // linkend="gtk-X11-arch">window manager</link>) could not keep it below,
43826 // and not all window managers support putting windows below. But
43827 // normally the window will be kept below. Just don't write code
43828 // that crashes if not.
43830 // It's permitted to call this function before showing a window,
43831 // in which case the window will be kept below when it appears onscreen
43832 // initially.
43834 // You can track the below state via the "window-state-event" signal
43835 // on #GtkWidget.
43837 // Note that, according to the <ulink
43838 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
43839 // Manager Hints</ulink> specification, the above state is mainly meant
43840 // for user preferences and should not be used by applications e.g. for
43841 // drawing attention to their dialogs.
43842 // <setting>: whether to keep @window below other windows
43843 void set_keep_below()(int setting) nothrow {
43844 gtk_window_set_keep_below(&this, setting);
43847 // Sets the mnemonic modifier for this window.
43848 // <modifier>: the modifier mask used to activate mnemonics on this window.
43849 void set_mnemonic_modifier()(Gdk2.ModifierType modifier) nothrow {
43850 gtk_window_set_mnemonic_modifier(&this, modifier);
43853 // VERSION: 2.20
43854 // Sets the #GtkWindow:mnemonics-visible property.
43855 // <setting>: the new value
43856 void set_mnemonics_visible()(int setting) nothrow {
43857 gtk_window_set_mnemonics_visible(&this, setting);
43860 // Sets a window modal or non-modal. Modal windows prevent interaction
43861 // with other windows in the same application. To keep modal dialogs
43862 // on top of main application windows, use
43863 // gtk_window_set_transient_for() to make the dialog transient for the
43864 // parent; most <link linkend="gtk-X11-arch">window managers</link>
43865 // will then disallow lowering the dialog below the parent.
43866 // <modal>: whether the window is modal
43867 void set_modal()(int modal) nothrow {
43868 gtk_window_set_modal(&this, modal);
43871 // VERSION: 2.12
43872 // Request the windowing system to make @window partially transparent,
43873 // with opacity 0 being fully transparent and 1 fully opaque. (Values
43874 // of the opacity parameter are clamped to the [0,1] range.) On X11
43875 // this has any effect only on X screens with a compositing manager
43876 // running. See gtk_widget_is_composited(). On Windows it should work
43877 // always.
43879 // Note that setting a window's opacity after the window has been
43880 // shown causes it to flicker once on Windows.
43881 // <opacity>: desired opacity, between 0 and 1
43882 void set_opacity()(double opacity) nothrow {
43883 gtk_window_set_opacity(&this, opacity);
43885 void set_policy()(int allow_shrink, int allow_grow, int auto_shrink) nothrow {
43886 gtk_window_set_policy(&this, allow_shrink, allow_grow, auto_shrink);
43889 // Sets a position constraint for this window. If the old or new
43890 // constraint is %GTK_WIN_POS_CENTER_ALWAYS, this will also cause
43891 // the window to be repositioned to satisfy the new constraint.
43892 // <position>: a position constraint.
43893 void set_position()(WindowPosition position) nothrow {
43894 gtk_window_set_position(&this, position);
43897 // Sets whether the user can resize a window. Windows are user resizable
43898 // by default.
43899 // <resizable>: %TRUE if the user can resize this window
43900 void set_resizable()(int resizable) nothrow {
43901 gtk_window_set_resizable(&this, resizable);
43904 // This function is only useful on X11, not with other GTK+ targets.
43906 // In combination with the window title, the window role allows a
43907 // <link linkend="gtk-X11-arch">window manager</link> to identify "the
43908 // same" window when an application is restarted. So for example you
43909 // might set the "toolbox" role on your app's toolbox window, so that
43910 // when the user restarts their session, the window manager can put
43911 // the toolbox back in the same place.
43913 // If a window already has a unique title, you don't need to set the
43914 // role, since the WM can use the title to identify the window when
43915 // restoring the session.
43916 // <role>: unique identifier for the window to be used when restoring a session
43917 void set_role(AT0)(AT0 /*char*/ role) nothrow {
43918 gtk_window_set_role(&this, toCString!(char*)(role));
43921 // VERSION: 2.2
43922 // Sets the #GdkScreen where the @window is displayed; if
43923 // the window is already mapped, it will be unmapped, and
43924 // then remapped on the new screen.
43925 // <screen>: a #GdkScreen.
43926 void set_screen(AT0)(AT0 /*Gdk2.Screen*/ screen) nothrow {
43927 gtk_window_set_screen(&this, UpCast!(Gdk2.Screen*)(screen));
43930 // VERSION: 2.2
43931 // Windows may set a hint asking the desktop environment not to display
43932 // the window in the pager. This function sets this hint.
43933 // (A "pager" is any desktop navigation tool such as a workspace
43934 // switcher that displays a thumbnail representation of the windows
43935 // on the screen.)
43936 // <setting>: %TRUE to keep this window from appearing in the pager
43937 void set_skip_pager_hint()(int setting) nothrow {
43938 gtk_window_set_skip_pager_hint(&this, setting);
43941 // VERSION: 2.2
43942 // Windows may set a hint asking the desktop environment not to display
43943 // the window in the task bar. This function sets this hint.
43944 // <setting>: %TRUE to keep this window from appearing in the task bar
43945 void set_skip_taskbar_hint()(int setting) nothrow {
43946 gtk_window_set_skip_taskbar_hint(&this, setting);
43949 // VERSION: 2.12
43950 // Startup notification identifiers are used by desktop environment to
43951 // track application startup, to provide user feedback and other
43952 // features. This function changes the corresponding property on the
43953 // underlying GdkWindow. Normally, startup identifier is managed
43954 // automatically and you should only use this function in special cases
43955 // like transferring focus from other processes. You should use this
43956 // function before calling gtk_window_present() or any equivalent
43957 // function generating a window map event.
43959 // This function is only useful on X11, not with other GTK+ targets.
43960 // <startup_id>: a string with startup-notification identifier
43961 void set_startup_id(AT0)(AT0 /*char*/ startup_id) nothrow {
43962 gtk_window_set_startup_id(&this, toCString!(char*)(startup_id));
43965 // Sets the title of the #GtkWindow. The title of a window will be
43966 // displayed in its title bar; on the X Window System, the title bar
43967 // is rendered by the <link linkend="gtk-X11-arch">window
43968 // manager</link>, so exactly how the title appears to users may vary
43969 // according to a user's exact configuration. The title should help a
43970 // user distinguish this window from other windows they may have
43971 // open. A good title might include the application name and current
43972 // document filename, for example.
43973 // <title>: title of the window
43974 void set_title(AT0)(AT0 /*char*/ title) nothrow {
43975 gtk_window_set_title(&this, toCString!(char*)(title));
43978 // Dialog windows should be set transient for the main application
43979 // window they were spawned from. This allows <link
43980 // linkend="gtk-X11-arch">window managers</link> to e.g. keep the
43981 // dialog on top of the main window, or center the dialog over the
43982 // main window. gtk_dialog_new_with_buttons() and other convenience
43983 // functions in GTK+ will sometimes call
43984 // gtk_window_set_transient_for() on your behalf.
43986 // Passing %NULL for @parent unsets the current transient window.
43988 // On Windows, this function puts the child window on top of the parent,
43989 // much as the window manager would have done on X.
43990 // <parent>: parent window, or %NULL
43991 void set_transient_for(AT0)(AT0 /*Window*/ parent=null) nothrow {
43992 gtk_window_set_transient_for(&this, UpCast!(Window*)(parent));
43995 // By setting the type hint for the window, you allow the window
43996 // manager to decorate and handle the window in a way which is
43997 // suitable to the function of the window in your application.
43999 // This function should be called before the window becomes visible.
44001 // gtk_dialog_new_with_buttons() and other convenience functions in GTK+
44002 // will sometimes call gtk_window_set_type_hint() on your behalf.
44003 // <hint>: the window type
44004 void set_type_hint()(Gdk2.WindowTypeHint hint) nothrow {
44005 gtk_window_set_type_hint(&this, hint);
44008 // VERSION: 2.8
44009 // Windows may set a hint asking the desktop environment to draw
44010 // the users attention to the window. This function sets this hint.
44011 // <setting>: %TRUE to mark this window as urgent
44012 void set_urgency_hint()(int setting) nothrow {
44013 gtk_window_set_urgency_hint(&this, setting);
44016 // Don't use this function. It sets the X Window System "class" and
44017 // "name" hints for a window. According to the ICCCM, you should
44018 // always set these to the same value for all windows in an
44019 // application, and GTK+ sets them to that value by default, so calling
44020 // this function is sort of pointless. However, you may want to call
44021 // gtk_window_set_role() on each window in your application, for the
44022 // benefit of the session manager. Setting the role allows the window
44023 // manager to restore window positions when loading a saved session.
44024 // <wmclass_name>: window name hint
44025 // <wmclass_class>: window class hint
44026 void set_wmclass(AT0, AT1)(AT0 /*char*/ wmclass_name, AT1 /*char*/ wmclass_class) nothrow {
44027 gtk_window_set_wmclass(&this, toCString!(char*)(wmclass_name), toCString!(char*)(wmclass_class));
44030 // Asks to stick @window, which means that it will appear on all user
44031 // desktops. Note that you shouldn't assume the window is definitely
44032 // stuck afterward, because other entities (e.g. the user or <link
44033 // linkend="gtk-X11-arch">window manager</link>) could unstick it
44034 // again, and some window managers do not support sticking
44035 // windows. But normally the window will end up stuck. Just don't
44036 // write code that crashes if not.
44038 // It's permitted to call this function before showing a window.
44040 // You can track stickiness via the "window-state-event" signal
44041 // on #GtkWidget.
44042 void stick()() nothrow {
44043 gtk_window_stick(&this);
44046 // VERSION: 2.2
44047 // Asks to toggle off the fullscreen state for @window. Note that you
44048 // shouldn't assume the window is definitely not full screen
44049 // afterward, because other entities (e.g. the user or <link
44050 // linkend="gtk-X11-arch">window manager</link>) could fullscreen it
44051 // again, and not all window managers honor requests to unfullscreen
44052 // windows. But normally the window will end up restored to its normal
44053 // state. Just don't write code that crashes if not.
44055 // You can track the fullscreen state via the "window-state-event" signal
44056 // on #GtkWidget.
44057 void unfullscreen()() nothrow {
44058 gtk_window_unfullscreen(&this);
44061 // Asks to unmaximize @window. Note that you shouldn't assume the
44062 // window is definitely unmaximized afterward, because other entities
44063 // (e.g. the user or <link linkend="gtk-X11-arch">window
44064 // manager</link>) could maximize it again, and not all window
44065 // managers honor requests to unmaximize. But normally the window will
44066 // end up unmaximized. Just don't write code that crashes if not.
44068 // You can track maximization via the "window-state-event" signal
44069 // on #GtkWidget.
44070 void unmaximize()() nothrow {
44071 gtk_window_unmaximize(&this);
44074 // Asks to unstick @window, which means that it will appear on only
44075 // one of the user's desktops. Note that you shouldn't assume the
44076 // window is definitely unstuck afterward, because other entities
44077 // (e.g. the user or <link linkend="gtk-X11-arch">window
44078 // manager</link>) could stick it again. But normally the window will
44079 // end up stuck. Just don't write code that crashes if not.
44081 // You can track stickiness via the "window-state-event" signal
44082 // on #GtkWidget.
44083 void unstick()() nothrow {
44084 gtk_window_unstick(&this);
44087 // The ::activate-default signal is a
44088 // <link linkend="keybinding-signals">keybinding signal</link>
44089 // which gets emitted when the user activates the default widget
44090 // of @window.
44091 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_activate_default;
44093 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
44094 return super_.signal_connect!name(cb, data, cf);
44097 ulong signal_connect(string name:"activate-default", CB/*:signal_activate_default*/)
44098 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
44099 if (is(typeof(cb)==signal_activate_default)||_ttmm!(CB, signal_activate_default)()) {
44100 return signal_connect_data!()(&this, cast(char*)"activate-default",
44101 cast(GObject2.Callback)cb, data, null, cf);
44104 // The ::activate-focus signal is a
44105 // <link linkend="keybinding-signals">keybinding signal</link>
44106 // which gets emitted when the user activates the currently
44107 // focused widget of @window.
44108 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_activate_focus;
44109 ulong signal_connect(string name:"activate-focus", CB/*:signal_activate_focus*/)
44110 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
44111 if (is(typeof(cb)==signal_activate_focus)||_ttmm!(CB, signal_activate_focus)()) {
44112 return signal_connect_data!()(&this, cast(char*)"activate-focus",
44113 cast(GObject2.Callback)cb, data, null, cf);
44115 extern (C) alias static c_int function (Window* this_, Gdk2.Event* object, void* user_data=null) nothrow signal_frame_event;
44116 ulong signal_connect(string name:"frame-event", CB/*:signal_frame_event*/)
44117 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
44118 if (is(typeof(cb)==signal_frame_event)||_ttmm!(CB, signal_frame_event)()) {
44119 return signal_connect_data!()(&this, cast(char*)"frame-event",
44120 cast(GObject2.Callback)cb, data, null, cf);
44123 // The ::keys-changed signal gets emitted when the set of accelerators
44124 // or mnemonics that are associated with @window changes.
44125 extern (C) alias static void function (Window* this_, void* user_data=null) nothrow signal_keys_changed;
44126 ulong signal_connect(string name:"keys-changed", CB/*:signal_keys_changed*/)
44127 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
44128 if (is(typeof(cb)==signal_keys_changed)||_ttmm!(CB, signal_keys_changed)()) {
44129 return signal_connect_data!()(&this, cast(char*)"keys-changed",
44130 cast(GObject2.Callback)cb, data, null, cf);
44132 extern (C) alias static void function (Window* this_, Widget* object, void* user_data=null) nothrow signal_set_focus;
44133 ulong signal_connect(string name:"set-focus", CB/*:signal_set_focus*/)
44134 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
44135 if (is(typeof(cb)==signal_set_focus)||_ttmm!(CB, signal_set_focus)()) {
44136 return signal_connect_data!()(&this, cast(char*)"set-focus",
44137 cast(GObject2.Callback)cb, data, null, cf);
44141 struct WindowClass {
44142 BinClass parent_class;
44143 // <focus>: widget to be the new focus widget, or %NULL to unset any focus widget for the toplevel window.
44144 extern (C) void function (Window* window, Widget* focus=null) nothrow set_focus;
44145 extern (C) int function (Window* window, Gdk2.Event* event) nothrow frame_event;
44146 extern (C) void function (Window* window) nothrow activate_focus;
44147 extern (C) void function (Window* window) nothrow activate_default;
44148 extern (C) void function (Window* window, DirectionType direction) nothrow move_focus;
44149 extern (C) void function (Window* window) nothrow keys_changed;
44150 extern (C) void function () nothrow _gtk_reserved1;
44151 extern (C) void function () nothrow _gtk_reserved2;
44152 extern (C) void function () nothrow _gtk_reserved3;
44153 extern (C) void function () nothrow _gtk_reserved4;
44156 struct WindowGeometryInfo {
44159 struct WindowGroup /* : GObject.Object */ {
44160 alias parent_instance this;
44161 alias parent_instance super_;
44162 alias parent_instance object;
44163 GObject2.Object parent_instance;
44164 GLib2.SList* grabs;
44167 // Creates a new #GtkWindowGroup object. Grabs added with
44168 // gtk_grab_add() only affect windows within the same #GtkWindowGroup.
44169 // RETURNS: a new #GtkWindowGroup.
44170 static WindowGroup* /*new*/ new_()() nothrow {
44171 return gtk_window_group_new();
44173 static auto opCall()() {
44174 return gtk_window_group_new();
44177 // Adds a window to a #GtkWindowGroup.
44178 // <window>: the #GtkWindow to add
44179 void add_window(AT0)(AT0 /*Window*/ window) nothrow {
44180 gtk_window_group_add_window(&this, UpCast!(Window*)(window));
44182 // Unintrospectable method: get_current_grab() / gtk_window_group_get_current_grab()
44183 Widget* get_current_grab()() nothrow {
44184 return gtk_window_group_get_current_grab(&this);
44187 // VERSION: 2.14
44188 // Returns a list of the #GtkWindows that belong to @window_group.
44190 // windows inside the group.
44191 // RETURNS: A newly-allocated list of
44192 GLib2.List* /*new container*/ list_windows()() nothrow {
44193 return gtk_window_group_list_windows(&this);
44196 // Removes a window from a #GtkWindowGroup.
44197 // <window>: the #GtkWindow to remove
44198 void remove_window(AT0)(AT0 /*Window*/ window) nothrow {
44199 gtk_window_group_remove_window(&this, UpCast!(Window*)(window));
44203 struct WindowGroupClass {
44204 GObject2.ObjectClass parent_class;
44205 extern (C) void function () nothrow _gtk_reserved1;
44206 extern (C) void function () nothrow _gtk_reserved2;
44207 extern (C) void function () nothrow _gtk_reserved3;
44208 extern (C) void function () nothrow _gtk_reserved4;
44211 extern (C) alias void function (Window* window, uint keyval, Gdk2.ModifierType modifiers, int is_mnemonic, void* data) nothrow WindowKeysForeachFunc;
44213 enum WindowPosition {
44214 NONE = 0,
44215 CENTER = 1,
44216 MOUSE = 2,
44217 CENTER_ALWAYS = 3,
44218 CENTER_ON_PARENT = 4
44220 enum WindowType {
44221 TOPLEVEL = 0,
44222 POPUP = 1
44224 enum WrapMode {
44225 NONE = 0,
44226 CHAR = 1,
44227 WORD = 2,
44228 WORD_CHAR = 3
44231 // Finds the first accelerator in any #GtkAccelGroup attached
44232 // to @object that matches @accel_key and @accel_mods, and
44233 // activates that accelerator.
44234 // RETURNS: %TRUE if an accelerator was activated and handled this keypress
44235 // <object>: the #GObject, usually a #GtkWindow, on which to activate the accelerator.
44236 // <accel_key>: accelerator keyval from a key event
44237 // <accel_mods>: keyboard state mask from a key event
44238 static int accel_groups_activate(AT0)(AT0 /*GObject2.Object*/ object, uint accel_key, Gdk2.ModifierType accel_mods) nothrow {
44239 return gtk_accel_groups_activate(UpCast!(GObject2.Object*)(object), accel_key, accel_mods);
44243 // Gets a list of all accel groups which are attached to @object.
44244 // RETURNS: a list of all accel groups which are attached to @object
44245 // <object>: a #GObject, usually a #GtkWindow
44246 static GLib2.SList* accel_groups_from_object(AT0)(AT0 /*GObject2.Object*/ object) nothrow {
44247 return gtk_accel_groups_from_object(UpCast!(GObject2.Object*)(object));
44251 // Gets the value set by gtk_accelerator_set_default_mod_mask().
44252 // RETURNS: the default accelerator modifier mask
44253 static uint accelerator_get_default_mod_mask()() nothrow {
44254 return gtk_accelerator_get_default_mod_mask();
44258 // VERSION: 2.6
44259 // Converts an accelerator keyval and modifier mask into a string
44260 // which can be used to represent the accelerator to the user.
44261 // RETURNS: a newly-allocated string representing the accelerator.
44262 // <accelerator_key>: accelerator keyval
44263 // <accelerator_mods>: accelerator modifier mask
44264 static char* /*new*/ accelerator_get_label()(uint accelerator_key, Gdk2.ModifierType accelerator_mods) nothrow {
44265 return gtk_accelerator_get_label(accelerator_key, accelerator_mods);
44269 // Converts an accelerator keyval and modifier mask
44270 // into a string parseable by gtk_accelerator_parse().
44271 // For example, if you pass in #GDK_q and #GDK_CONTROL_MASK,
44272 // this function returns "&lt;Control&gt;q".
44274 // If you need to display accelerators in the user interface,
44275 // see gtk_accelerator_get_label().
44276 // RETURNS: a newly-allocated accelerator name
44277 // <accelerator_key>: accelerator keyval
44278 // <accelerator_mods>: accelerator modifier mask
44279 static char* /*new*/ accelerator_name()(uint accelerator_key, Gdk2.ModifierType accelerator_mods) nothrow {
44280 return gtk_accelerator_name(accelerator_key, accelerator_mods);
44284 // Parses a string representing an accelerator. The
44285 // format looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
44286 // "&lt;Release&gt;z" (the last one is for key release).
44287 // The parser is fairly liberal and allows lower or upper case,
44288 // and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
44289 // Key names are parsed using gdk_keyval_from_name(). For character keys the
44290 // name is not the symbol, but the lowercase name, e.g. one would use
44291 // "&lt;Ctrl&gt;minus" instead of "&lt;Ctrl&gt;-".
44293 // If the parse fails, @accelerator_key and @accelerator_mods will
44294 // be set to 0 (zero).
44295 // <accelerator>: string representing an accelerator
44296 // <accelerator_key>: return location for accelerator keyval
44297 // <accelerator_mods>: return location for accelerator modifier mask
44298 static void accelerator_parse(AT0, AT1, AT2)(AT0 /*char*/ accelerator, /*out*/ AT1 /*uint*/ accelerator_key=null, /*out*/ AT2 /*Gdk2.ModifierType*/ accelerator_mods=null) nothrow {
44299 gtk_accelerator_parse(toCString!(char*)(accelerator), UpCast!(uint*)(accelerator_key), UpCast!(Gdk2.ModifierType*)(accelerator_mods));
44303 // Sets the modifiers that will be considered significant for keyboard
44304 // accelerators. The default mod mask is #GDK_CONTROL_MASK |
44305 // #GDK_SHIFT_MASK | #GDK_MOD1_MASK | #GDK_SUPER_MASK |
44306 // #GDK_HYPER_MASK | #GDK_META_MASK, that is, Control, Shift, Alt,
44307 // Super, Hyper and Meta. Other modifiers will by default be ignored
44308 // by #GtkAccelGroup.
44309 // You must include at least the three modifiers Control, Shift
44310 // and Alt in any value you pass to this function.
44312 // The default mod mask should be changed on application startup,
44313 // before using any accelerator groups.
44314 // <default_mod_mask>: accelerator modifier mask
44315 static void accelerator_set_default_mod_mask()(Gdk2.ModifierType default_mod_mask) nothrow {
44316 gtk_accelerator_set_default_mod_mask(default_mod_mask);
44320 // Determines whether a given keyval and modifier mask constitute
44321 // a valid keyboard accelerator. For example, the #GDK_a keyval
44322 // plus #GDK_CONTROL_MASK is valid - this is a "Ctrl+a" accelerator.
44323 // But, you can't, for instance, use the #GDK_Control_L keyval
44324 // as an accelerator.
44325 // RETURNS: %TRUE if the accelerator is valid
44326 // <keyval>: a GDK keyval
44327 // <modifiers>: modifier mask
44328 static int accelerator_valid()(uint keyval, Gdk2.ModifierType modifiers) nothrow {
44329 return gtk_accelerator_valid(keyval, modifiers);
44333 // VERSION: 2.6
44334 // Returns %TRUE if dialogs are expected to use an alternative
44335 // button order on the screen @screen. See
44336 // gtk_dialog_set_alternative_button_order() for more details
44337 // about alternative button order.
44339 // If you need to use this function, you should probably connect
44340 // to the ::notify:gtk-alternative-button-order signal on the
44341 // #GtkSettings object associated to @screen, in order to be
44342 // notified if the button order setting changes.
44343 // RETURNS: Whether the alternative button order should be used
44344 // <screen>: a #GdkScreen, or %NULL to use the default screen
44345 static int alternative_dialog_button_order(AT0)(AT0 /*Gdk2.Screen*/ screen=null) nothrow {
44346 return gtk_alternative_dialog_button_order(UpCast!(Gdk2.Screen*)(screen));
44350 // MOVED TO: BindingEntry.add_signall
44351 // Override or install a new key binding for @keyval with @modifiers on
44352 // @binding_set.
44353 // <binding_set>: a #GtkBindingSet to add a signal to
44354 // <keyval>: key value
44355 // <modifiers>: key modifier
44356 // <signal_name>: signal name to be bound
44357 // <binding_args>: list of #GtkBindingArg signal arguments
44358 static void binding_entry_add_signall(AT0, AT1, AT2)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers, AT1 /*char*/ signal_name, AT2 /*GLib2.SList*/ binding_args) nothrow {
44359 gtk_binding_entry_add_signall(UpCast!(BindingSet*)(binding_set), keyval, modifiers, toCString!(char*)(signal_name), UpCast!(GLib2.SList*)(binding_args));
44363 // DEPRECATED (v2.12) function: binding_entry_clear - Use gtk_binding_entry_remove() instead.
44364 // MOVED TO: BindingEntry.clear
44365 // Clears a binding entry.
44366 // <binding_set>: binding set to clear an entry of
44367 // <keyval>: key value of binding to clear
44368 // <modifiers>: key modifier of binding to clear
44369 static void binding_entry_clear(AT0)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow {
44370 gtk_binding_entry_clear(UpCast!(BindingSet*)(binding_set), keyval, modifiers);
44374 // MOVED TO: BindingEntry.remove
44375 // Remove a binding previously installed via
44376 // gtk_binding_entry_add_signal() on @binding_set.
44377 // <binding_set>: a #GtkBindingSet to remove an entry of
44378 // <keyval>: key value of binding to remove
44379 // <modifiers>: key modifier of binding to remove
44380 static void binding_entry_remove(AT0)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow {
44381 gtk_binding_entry_remove(UpCast!(BindingSet*)(binding_set), keyval, modifiers);
44385 // VERSION: 2.12
44386 // MOVED TO: BindingEntry.skip
44387 // Install a binding on @binding_set which causes key lookups
44388 // to be aborted, to prevent bindings from lower priority sets
44389 // to be activated.
44390 // <binding_set>: a #GtkBindingSet to skip an entry of
44391 // <keyval>: key value of binding to skip
44392 // <modifiers>: key modifier of binding to skip
44393 static void binding_entry_skip(AT0)(AT0 /*BindingSet*/ binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow {
44394 gtk_binding_entry_skip(UpCast!(BindingSet*)(binding_set), keyval, modifiers);
44398 // DEPRECATED (v2.12) function: binding_parse_binding - There should be no need to call this function outside GTK+.
44399 // Parse a binding entry from a gtkrc file.
44400 // RETURNS: expected token upon errors, %G_TOKEN_NONE on success.
44401 // <scanner>: GtkRC scanner
44402 static uint binding_parse_binding(AT0)(AT0 /*GLib2.Scanner*/ scanner) nothrow {
44403 return gtk_binding_parse_binding(UpCast!(GLib2.Scanner*)(scanner));
44407 // MOVED TO: BindingSet.find
44408 // Find a binding set by its globally unique name. The @set_name can
44409 // either be a name used for gtk_binding_set_new() or the type name of
44410 // a class used in gtk_binding_set_by_class().
44411 // RETURNS: %NULL or the specified binding set
44412 // <set_name>: unique binding set name
44413 static BindingSet* binding_set_find(AT0)(AT0 /*char*/ set_name) nothrow {
44414 return gtk_binding_set_find(toCString!(char*)(set_name));
44418 // Find a key binding matching @keyval and @modifiers and activate the
44419 // binding on @object.
44420 // RETURNS: %TRUE if a binding was found and activated
44421 // <object>: object to activate when binding found
44422 // <keyval>: key value of the binding
44423 // <modifiers>: key modifier of the binding
44424 static int bindings_activate(AT0)(AT0 /*Object*/ object, uint keyval, Gdk2.ModifierType modifiers) nothrow {
44425 return gtk_bindings_activate(UpCast!(Object*)(object), keyval, modifiers);
44429 // VERSION: 2.4
44430 // Looks up key bindings for @object to find one matching
44431 // @event, and if one was found, activate it.
44432 // RETURNS: %TRUE if a matching key binding was found
44433 // <object>: a #GtkObject (generally must be a widget)
44434 // <event>: a #GdkEventKey
44435 static int bindings_activate_event(AT0, AT1)(AT0 /*Object*/ object, AT1 /*Gdk2.EventKey*/ event) nothrow {
44436 return gtk_bindings_activate_event(UpCast!(Object*)(object), UpCast!(Gdk2.EventKey*)(event));
44439 // MOVED TO: BuilderError.quark
44440 static GLib2.Quark builder_error_quark()() nothrow {
44441 return gtk_builder_error_quark();
44445 // Checks that the GTK+ library in use is compatible with the
44446 // given version. Generally you would pass in the constants
44447 // #GTK_MAJOR_VERSION, #GTK_MINOR_VERSION, #GTK_MICRO_VERSION
44448 // as the three arguments to this function; that produces
44449 // a check that the library in use is compatible with
44450 // the version of GTK+ the application or module was compiled
44451 // against.
44453 // Compatibility is defined by two things: first the version
44454 // of the running library is newer than the version
44455 // @required_major.required_minor.@required_micro. Second
44456 // the running library must be binary compatible with the
44457 // version @required_major.required_minor.@required_micro
44458 // (same major version.)
44460 // This function is primarily for GTK+ modules; the module
44461 // can call this function to check that it wasn't loaded
44462 // into an incompatible version of GTK+. However, such a
44463 // a check isn't completely reliable, since the module may be
44464 // linked against an old version of GTK+ and calling the
44465 // old version of gtk_check_version(), but still get loaded
44466 // into an application using a newer version of GTK+.
44468 // given version, or a string describing the version mismatch.
44469 // The returned string is owned by GTK+ and should not be modified
44470 // or freed.
44471 // RETURNS: %NULL if the GTK+ library is compatible with the
44472 // <required_major>: the required major version.
44473 // <required_minor>: the required minor version.
44474 // <required_micro>: the required micro version.
44475 static char* check_version()(uint required_major, uint required_minor, uint required_micro) nothrow {
44476 return gtk_check_version(required_major, required_minor, required_micro);
44479 static Type ctree_node_get_type()() nothrow {
44480 return gtk_ctree_node_get_type();
44484 // Prevents gtk_init(), gtk_init_check(), gtk_init_with_args() and
44485 // gtk_parse_args() from automatically
44486 // calling <literal>setlocale (LC_ALL, "")</literal>. You would
44487 // want to use this function if you wanted to set the locale for
44488 // your program to something other than the user's locale, or if
44489 // you wanted to set different values for different locale categories.
44491 // Most programs should not need to call this function.
44492 static void disable_setlocale()() nothrow {
44493 gtk_disable_setlocale();
44497 // Initiates a drag on the source side. The function
44498 // only needs to be used when the application is
44499 // starting drags itself, and is not needed when
44500 // gtk_drag_source_set() is used.
44502 // The @event is used to retrieve the timestamp that will be used internally to
44503 // grab the pointer. If @event is #NULL, then GDK_CURRENT_TIME will be used.
44504 // However, you should try to pass a real event in all cases, since that can be
44505 // used by GTK+ to get information about the start position of the drag, for
44506 // example if the @event is a GDK_MOTION_NOTIFY.
44508 // Generally there are three cases when you want to start a drag by hand by calling
44509 // this function:
44511 // 1. During a button-press-event handler, if you want to start a drag immediately
44512 // when the user presses the mouse button. Pass the @event that you have in your
44513 // button-press-event handler.
44515 // 2. During a motion-notify-event handler, if you want to start a drag when the mouse
44516 // moves past a certain threshold distance after a button-press. Pass the @event that you
44517 // have in your motion-notify-event handler.
44519 // 3. During a timeout handler, if you want to start a drag after the mouse
44520 // button is held down for some time. Try to save the last event that you got
44521 // from the mouse, using gdk_event_copy(), and pass it to this function
44522 // (remember to free the event with gdk_event_free() when you are done). If you
44523 // can really not pass a real event, pass #NULL instead.
44524 // RETURNS: the context for this drag.
44525 // <widget>: the source widget.
44526 // <targets>: The targets (data formats) in which the source can provide the data.
44527 // <actions>: A bitmask of the allowed drag actions for this drag.
44528 // <button>: The button the user clicked to start the drag.
44529 // <event>: The event that triggered the start of the drag.
44530 static Gdk2.DragContext* drag_begin(AT0, AT1, AT2)(AT0 /*Widget*/ widget, AT1 /*TargetList*/ targets, Gdk2.DragAction actions, int button, AT2 /*Gdk2.Event*/ event) nothrow {
44531 return gtk_drag_begin(UpCast!(Widget*)(widget), UpCast!(TargetList*)(targets), actions, button, UpCast!(Gdk2.Event*)(event));
44535 // Checks to see if a mouse drag starting at (@start_x, @start_y) and ending
44536 // at (@current_x, @current_y) has passed the GTK+ drag threshold, and thus
44537 // should trigger the beginning of a drag-and-drop operation.
44538 // RETURNS: %TRUE if the drag threshold has been passed.
44539 // <widget>: a #GtkWidget
44540 // <start_x>: X coordinate of start of drag
44541 // <start_y>: Y coordinate of start of drag
44542 // <current_x>: current X coordinate
44543 // <current_y>: current Y coordinate
44544 static int drag_check_threshold(AT0)(AT0 /*Widget*/ widget, int start_x, int start_y, int current_x, int current_y) nothrow {
44545 return gtk_drag_check_threshold(UpCast!(Widget*)(widget), start_x, start_y, current_x, current_y);
44549 // VERSION: 2.6
44550 // Add the image targets supported by #GtkSelection to
44551 // the target list of the drag destination. The targets
44552 // are added with @info = 0. If you need another value,
44553 // use gtk_target_list_add_image_targets() and
44554 // gtk_drag_dest_set_target_list().
44555 // <widget>: a #GtkWidget that's a drag destination
44556 static void drag_dest_add_image_targets(AT0)(AT0 /*Widget*/ widget) nothrow {
44557 gtk_drag_dest_add_image_targets(UpCast!(Widget*)(widget));
44561 // VERSION: 2.6
44562 // Add the text targets supported by #GtkSelection to
44563 // the target list of the drag destination. The targets
44564 // are added with @info = 0. If you need another value,
44565 // use gtk_target_list_add_text_targets() and
44566 // gtk_drag_dest_set_target_list().
44567 // <widget>: a #GtkWidget that's a drag destination
44568 static void drag_dest_add_text_targets(AT0)(AT0 /*Widget*/ widget) nothrow {
44569 gtk_drag_dest_add_text_targets(UpCast!(Widget*)(widget));
44573 // VERSION: 2.6
44574 // Add the URI targets supported by #GtkSelection to
44575 // the target list of the drag destination. The targets
44576 // are added with @info = 0. If you need another value,
44577 // use gtk_target_list_add_uri_targets() and
44578 // gtk_drag_dest_set_target_list().
44579 // <widget>: a #GtkWidget that's a drag destination
44580 static void drag_dest_add_uri_targets(AT0)(AT0 /*Widget*/ widget) nothrow {
44581 gtk_drag_dest_add_uri_targets(UpCast!(Widget*)(widget));
44585 // and the dest can accept, or %GDK_NONE
44586 // RETURNS: first target that the source offers
44587 // <widget>: drag destination widget
44588 // <context>: drag context
44589 // <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.
44590 static Gdk2.Atom drag_dest_find_target(AT0, AT1, AT2)(AT0 /*Widget*/ widget, AT1 /*Gdk2.DragContext*/ context, AT2 /*TargetList*/ target_list=null) nothrow {
44591 return gtk_drag_dest_find_target(UpCast!(Widget*)(widget), UpCast!(Gdk2.DragContext*)(context), UpCast!(TargetList*)(target_list));
44595 // Returns the list of targets this widget can accept from
44596 // drag-and-drop.
44597 // RETURNS: the #GtkTargetList, or %NULL if none
44598 // <widget>: a #GtkWidget
44599 static TargetList* drag_dest_get_target_list(AT0)(AT0 /*Widget*/ widget) nothrow {
44600 return gtk_drag_dest_get_target_list(UpCast!(Widget*)(widget));
44604 // VERSION: 2.10
44605 // Returns whether the widget has been configured to always
44606 // emit ::drag-motion signals.
44607 // RETURNS: %TRUE if the widget always emits ::drag-motion events
44608 // <widget>: a #GtkWidget that's a drag destination
44609 static int drag_dest_get_track_motion(AT0)(AT0 /*Widget*/ widget) nothrow {
44610 return gtk_drag_dest_get_track_motion(UpCast!(Widget*)(widget));
44614 // Sets a widget as a potential drop destination, and adds default behaviors.
44616 // The default behaviors listed in @flags have an effect similar
44617 // to installing default handlers for the widget's drag-and-drop signals
44618 // (#GtkWidget:drag-motion, #GtkWidget:drag-drop, ...). They all exist
44619 // for convenience. When passing #GTK_DEST_DEFAULT_ALL for instance it is
44620 // sufficient to connect to the widget's #GtkWidget::drag-data-received
44621 // signal to get primitive, but consistent drag-and-drop support.
44623 // Things become more complicated when you try to preview the dragged data,
44624 // as described in the documentation for #GtkWidget:drag-motion. The default
44625 // behaviors described by @flags make some assumptions, that can conflict
44626 // with your own signal handlers. For instance #GTK_DEST_DEFAULT_DROP causes
44627 // invokations of gdk_drag_status() in the context of #GtkWidget:drag-motion,
44628 // and invokations of gtk_drag_finish() in #GtkWidget:drag-data-received.
44629 // Especially the later is dramatic, when your own #GtkWidget:drag-motion
44630 // handler calls gtk_drag_get_data() to inspect the dragged data.
44632 // There's no way to set a default action here, you can use the
44633 // #GtkWidget:drag-motion callback for that. Here's an example which selects
44634 // the action to use depending on whether the control key is pressed or not:
44635 // |[
44636 // static void
44637 // drag_motion (GtkWidget *widget,
44638 // GdkDragContext *context,
44639 // gint x,
44640 // gint y,
44641 // guint time)
44642 // {
44643 // GdkModifierType mask;
44645 // gdk_window_get_pointer (gtk_widget_get_window (widget),
44646 // NULL, NULL, &mask);
44647 // if (mask & GDK_CONTROL_MASK)
44648 // gdk_drag_status (context, GDK_ACTION_COPY, time);
44649 // else
44650 // gdk_drag_status (context, GDK_ACTION_MOVE, time);
44651 // }
44652 // ]|
44653 // <widget>: a #GtkWidget
44654 // <flags>: which types of default drag behavior to use
44655 // <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().
44656 // <n_targets>: the number of entries in @targets
44657 // <actions>: a bitmask of possible actions for a drop onto this @widget.
44658 static void drag_dest_set(AT0, AT1)(AT0 /*Widget*/ widget, DestDefaults flags, AT1 /*TargetEntry*/ targets, int n_targets, Gdk2.DragAction actions) nothrow {
44659 gtk_drag_dest_set(UpCast!(Widget*)(widget), flags, UpCast!(TargetEntry*)(targets), n_targets, actions);
44662 static void drag_dest_set_proxy(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*Gdk2.Window*/ proxy_window, Gdk2.DragProtocol protocol, int use_coordinates) nothrow {
44663 gtk_drag_dest_set_proxy(UpCast!(Widget*)(widget), UpCast!(Gdk2.Window*)(proxy_window), protocol, use_coordinates);
44667 // Sets the target types that this widget can accept from drag-and-drop.
44668 // The widget must first be made into a drag destination with
44669 // gtk_drag_dest_set().
44670 // <widget>: a #GtkWidget that's a drag destination
44671 // <target_list>: list of droppable targets, or %NULL for none
44672 static void drag_dest_set_target_list(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*TargetList*/ target_list=null) nothrow {
44673 gtk_drag_dest_set_target_list(UpCast!(Widget*)(widget), UpCast!(TargetList*)(target_list));
44677 // VERSION: 2.10
44678 // Tells the widget to emit ::drag-motion and ::drag-leave
44679 // events regardless of the targets and the %GTK_DEST_DEFAULT_MOTION
44680 // flag.
44682 // This may be used when a widget wants to do generic
44683 // actions regardless of the targets that the source offers.
44684 // <widget>: a #GtkWidget that's a drag destination
44685 // <track_motion>: whether to accept all targets
44686 static void drag_dest_set_track_motion(AT0)(AT0 /*Widget*/ widget, int track_motion) nothrow {
44687 gtk_drag_dest_set_track_motion(UpCast!(Widget*)(widget), track_motion);
44690 static void drag_dest_unset(AT0)(AT0 /*Widget*/ widget) nothrow {
44691 gtk_drag_dest_unset(UpCast!(Widget*)(widget));
44694 static void drag_finish(AT0)(AT0 /*Gdk2.DragContext*/ context, int success, int del, uint time_) nothrow {
44695 gtk_drag_finish(UpCast!(Gdk2.DragContext*)(context), success, del, time_);
44698 static void drag_get_data(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*Gdk2.DragContext*/ context, Gdk2.Atom target, uint time_) nothrow {
44699 gtk_drag_get_data(UpCast!(Widget*)(widget), UpCast!(Gdk2.DragContext*)(context), target, time_);
44703 // Determines the source widget for a drag.
44705 // within a single application, a pointer to the source widget.
44706 // Otherwise, %NULL.
44707 // RETURNS: if the drag is occurring
44708 // <context>: a (destination side) drag context
44709 static Widget* drag_get_source_widget(AT0)(AT0 /*Gdk2.DragContext*/ context) nothrow {
44710 return gtk_drag_get_source_widget(UpCast!(Gdk2.DragContext*)(context));
44713 static void drag_highlight(AT0)(AT0 /*Widget*/ widget) nothrow {
44714 gtk_drag_highlight(UpCast!(Widget*)(widget));
44718 // DEPRECATED function: drag_set_default_icon - Change the default drag icon via the stock system by
44719 // Changes the default drag icon. GTK+ retains references for the
44720 // arguments, and will release them when they are no longer needed.
44722 // changing the stock pixbuf for #GTK_STOCK_DND instead.
44723 // <colormap>: the colormap of the icon
44724 // <pixmap>: the image data for the icon
44725 // <mask>: the transparency mask for an image, or %NULL
44726 // <hot_x>: The X offset within @widget of the hotspot.
44727 // <hot_y>: The Y offset within @widget of the hotspot.
44728 static void drag_set_default_icon(AT0, AT1, AT2)(AT0 /*Gdk2.Colormap*/ colormap, AT1 /*Gdk2.Pixmap*/ pixmap, AT2 /*Gdk2.Bitmap*/ mask, int hot_x, int hot_y) nothrow {
44729 gtk_drag_set_default_icon(UpCast!(Gdk2.Colormap*)(colormap), UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask), hot_x, hot_y);
44733 // Sets the icon for a particular drag to the default
44734 // icon.
44735 // <context>: the context for a drag. (This must be called
44736 static void drag_set_icon_default(AT0)(AT0 /*Gdk2.DragContext*/ context) nothrow {
44737 gtk_drag_set_icon_default(UpCast!(Gdk2.DragContext*)(context));
44741 // VERSION: 2.8
44742 // Sets the icon for a given drag from a named themed icon. See
44743 // the docs for #GtkIconTheme for more details. Note that the
44744 // size of the icon depends on the icon theme (the icon is
44745 // loaded at the symbolic size #GTK_ICON_SIZE_DND), thus
44746 // @hot_x and @hot_y have to be used with care.
44747 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
44748 // <icon_name>: name of icon to use
44749 // <hot_x>: the X offset of the hotspot within the icon
44750 // <hot_y>: the Y offset of the hotspot within the icon
44751 static void drag_set_icon_name(AT0, AT1)(AT0 /*Gdk2.DragContext*/ context, AT1 /*char*/ icon_name, int hot_x, int hot_y) nothrow {
44752 gtk_drag_set_icon_name(UpCast!(Gdk2.DragContext*)(context), toCString!(char*)(icon_name), hot_x, hot_y);
44756 // Sets @pixbuf as the icon for a given drag.
44757 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
44758 // <pixbuf>: the #GdkPixbuf to use as the drag icon.
44759 // <hot_x>: the X offset within @widget of the hotspot.
44760 // <hot_y>: the Y offset within @widget of the hotspot.
44761 static void drag_set_icon_pixbuf(AT0, AT1)(AT0 /*Gdk2.DragContext*/ context, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf, int hot_x, int hot_y) nothrow {
44762 gtk_drag_set_icon_pixbuf(UpCast!(Gdk2.DragContext*)(context), UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf), hot_x, hot_y);
44766 // Sets @pixmap as the icon for a given drag. GTK+ retains
44767 // references for the arguments, and will release them when
44768 // they are no longer needed. In general, gtk_drag_set_icon_pixbuf()
44769 // will be more convenient to use.
44770 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
44771 // <colormap>: the colormap of the icon
44772 // <pixmap>: the image data for the icon
44773 // <mask>: the transparency mask for the icon or %NULL for none.
44774 // <hot_x>: the X offset within @pixmap of the hotspot.
44775 // <hot_y>: the Y offset within @pixmap of the hotspot.
44776 static void drag_set_icon_pixmap(AT0, AT1, AT2, AT3)(AT0 /*Gdk2.DragContext*/ context, AT1 /*Gdk2.Colormap*/ colormap, AT2 /*Gdk2.Pixmap*/ pixmap, AT3 /*Gdk2.Bitmap*/ mask, int hot_x, int hot_y) nothrow {
44777 gtk_drag_set_icon_pixmap(UpCast!(Gdk2.DragContext*)(context), UpCast!(Gdk2.Colormap*)(colormap), UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask), hot_x, hot_y);
44781 // Sets the icon for a given drag from a stock ID.
44782 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
44783 // <stock_id>: the ID of the stock icon to use for the drag.
44784 // <hot_x>: the X offset within the icon of the hotspot.
44785 // <hot_y>: the Y offset within the icon of the hotspot.
44786 static void drag_set_icon_stock(AT0, AT1)(AT0 /*Gdk2.DragContext*/ context, AT1 /*char*/ stock_id, int hot_x, int hot_y) nothrow {
44787 gtk_drag_set_icon_stock(UpCast!(Gdk2.DragContext*)(context), toCString!(char*)(stock_id), hot_x, hot_y);
44791 // Changes the icon for a widget to a given widget. GTK+
44792 // will not destroy the icon, so if you don't want
44793 // it to persist, you should connect to the "drag-end"
44794 // signal and destroy it yourself.
44795 // <context>: the context for a drag. (This must be called
44796 // <widget>: a toplevel window to use as an icon.
44797 // <hot_x>: the X offset within @widget of the hotspot.
44798 // <hot_y>: the Y offset within @widget of the hotspot.
44799 static void drag_set_icon_widget(AT0, AT1)(AT0 /*Gdk2.DragContext*/ context, AT1 /*Widget*/ widget, int hot_x, int hot_y) nothrow {
44800 gtk_drag_set_icon_widget(UpCast!(Gdk2.DragContext*)(context), UpCast!(Widget*)(widget), hot_x, hot_y);
44804 // VERSION: 2.6
44805 // Add the writable image targets supported by #GtkSelection to
44806 // the target list of the drag source. The targets
44807 // are added with @info = 0. If you need another value,
44808 // use gtk_target_list_add_image_targets() and
44809 // gtk_drag_source_set_target_list().
44810 // <widget>: a #GtkWidget that's is a drag source
44811 static void drag_source_add_image_targets(AT0)(AT0 /*Widget*/ widget) nothrow {
44812 gtk_drag_source_add_image_targets(UpCast!(Widget*)(widget));
44816 // VERSION: 2.6
44817 // Add the text targets supported by #GtkSelection to
44818 // the target list of the drag source. The targets
44819 // are added with @info = 0. If you need another value,
44820 // use gtk_target_list_add_text_targets() and
44821 // gtk_drag_source_set_target_list().
44822 // <widget>: a #GtkWidget that's is a drag source
44823 static void drag_source_add_text_targets(AT0)(AT0 /*Widget*/ widget) nothrow {
44824 gtk_drag_source_add_text_targets(UpCast!(Widget*)(widget));
44828 // VERSION: 2.6
44829 // Add the URI targets supported by #GtkSelection to
44830 // the target list of the drag source. The targets
44831 // are added with @info = 0. If you need another value,
44832 // use gtk_target_list_add_uri_targets() and
44833 // gtk_drag_source_set_target_list().
44834 // <widget>: a #GtkWidget that's is a drag source
44835 static void drag_source_add_uri_targets(AT0)(AT0 /*Widget*/ widget) nothrow {
44836 gtk_drag_source_add_uri_targets(UpCast!(Widget*)(widget));
44840 // VERSION: 2.4
44841 // Gets the list of targets this widget can provide for
44842 // drag-and-drop.
44843 // RETURNS: the #GtkTargetList, or %NULL if none
44844 // <widget>: a #GtkWidget
44845 static TargetList* drag_source_get_target_list(AT0)(AT0 /*Widget*/ widget) nothrow {
44846 return gtk_drag_source_get_target_list(UpCast!(Widget*)(widget));
44850 // Sets up a widget so that GTK+ will start a drag operation when the user
44851 // clicks and drags on the widget. The widget must have a window.
44852 // <widget>: a #GtkWidget
44853 // <start_button_mask>: the bitmask of buttons that can start the drag
44854 // <targets>: the table of targets that the drag will support, may be %NULL
44855 // <n_targets>: the number of items in @targets
44856 // <actions>: the bitmask of possible actions for a drag from this widget
44857 static void drag_source_set(AT0, AT1)(AT0 /*Widget*/ widget, Gdk2.ModifierType start_button_mask, AT1 /*TargetEntry*/ targets, int n_targets, Gdk2.DragAction actions) nothrow {
44858 gtk_drag_source_set(UpCast!(Widget*)(widget), start_button_mask, UpCast!(TargetEntry*)(targets), n_targets, actions);
44862 // Sets the icon that will be used for drags from a particular widget
44863 // from a pixmap/mask. GTK+ retains references for the arguments, and
44864 // will release them when they are no longer needed.
44865 // Use gtk_drag_source_set_icon_pixbuf() instead.
44866 // <widget>: a #GtkWidget
44867 // <colormap>: the colormap of the icon
44868 // <pixmap>: the image data for the icon
44869 // <mask>: the transparency mask for an image.
44870 static void drag_source_set_icon(AT0, AT1, AT2, AT3)(AT0 /*Widget*/ widget, AT1 /*Gdk2.Colormap*/ colormap, AT2 /*Gdk2.Pixmap*/ pixmap, AT3 /*Gdk2.Bitmap*/ mask=null) nothrow {
44871 gtk_drag_source_set_icon(UpCast!(Widget*)(widget), UpCast!(Gdk2.Colormap*)(colormap), UpCast!(Gdk2.Pixmap*)(pixmap), UpCast!(Gdk2.Bitmap*)(mask));
44875 // VERSION: 2.8
44876 // Sets the icon that will be used for drags from a particular source
44877 // to a themed icon. See the docs for #GtkIconTheme for more details.
44878 // <widget>: a #GtkWidget
44879 // <icon_name>: name of icon to use
44880 static void drag_source_set_icon_name(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*char*/ icon_name) nothrow {
44881 gtk_drag_source_set_icon_name(UpCast!(Widget*)(widget), toCString!(char*)(icon_name));
44885 // Sets the icon that will be used for drags from a particular widget
44886 // from a #GdkPixbuf. GTK+ retains a reference for @pixbuf and will
44887 // release it when it is no longer needed.
44888 // <widget>: a #GtkWidget
44889 // <pixbuf>: the #GdkPixbuf for the drag icon
44890 static void drag_source_set_icon_pixbuf(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*GdkPixbuf2.Pixbuf*/ pixbuf) nothrow {
44891 gtk_drag_source_set_icon_pixbuf(UpCast!(Widget*)(widget), UpCast!(GdkPixbuf2.Pixbuf*)(pixbuf));
44895 // Sets the icon that will be used for drags from a particular source
44896 // to a stock icon.
44897 // <widget>: a #GtkWidget
44898 // <stock_id>: the ID of the stock icon to use
44899 static void drag_source_set_icon_stock(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*char*/ stock_id) nothrow {
44900 gtk_drag_source_set_icon_stock(UpCast!(Widget*)(widget), toCString!(char*)(stock_id));
44904 // VERSION: 2.4
44905 // Changes the target types that this widget offers for drag-and-drop.
44906 // The widget must first be made into a drag source with
44907 // gtk_drag_source_set().
44908 // <widget>: a #GtkWidget that's a drag source
44909 // <target_list>: list of draggable targets, or %NULL for none
44910 static void drag_source_set_target_list(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*TargetList*/ target_list=null) nothrow {
44911 gtk_drag_source_set_target_list(UpCast!(Widget*)(widget), UpCast!(TargetList*)(target_list));
44914 static void drag_source_unset(AT0)(AT0 /*Widget*/ widget) nothrow {
44915 gtk_drag_source_unset(UpCast!(Widget*)(widget));
44918 static void drag_unhighlight(AT0)(AT0 /*Widget*/ widget) nothrow {
44919 gtk_drag_unhighlight(UpCast!(Widget*)(widget));
44923 // DEPRECATED (v2.0) function: draw_arrow - Use gtk_paint_arrow() instead.
44924 // Draws an arrow in the given rectangle on @window using the given
44925 // parameters. @arrow_type determines the direction of the arrow.
44926 // <style>: a #GtkStyle
44927 // <window>: a #GdkWindow
44928 // <state_type>: a state
44929 // <shadow_type>: the type of shadow to draw
44930 // <arrow_type>: the type of arrow to draw
44931 // <fill>: %TRUE if the arrow tip should be filled
44932 // <x>: x origin of the rectangle to draw the arrow in
44933 // <y>: y origin of the rectangle to draw the arrow in
44934 // <width>: width of the rectangle to draw the arrow in
44935 // <height>: height of the rectangle to draw the arrow in
44936 static void draw_arrow(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, ArrowType arrow_type, int fill, int x, int y, int width, int height) nothrow {
44937 gtk_draw_arrow(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, arrow_type, fill, x, y, width, height);
44941 // DEPRECATED (v2.0) function: draw_box - Use gtk_paint_box() instead.
44942 // Draws a box on @window with the given parameters.
44943 // <style>: a #GtkStyle
44944 // <window>: a #GdkWindow
44945 // <state_type>: a state
44946 // <shadow_type>: the type of shadow to draw
44947 // <x>: x origin of the box
44948 // <y>: y origin of the box
44949 // <width>: the width of the box
44950 // <height>: the height of the box
44951 static void draw_box(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow {
44952 gtk_draw_box(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height);
44956 // DEPRECATED (v2.0) function: draw_box_gap - Use gtk_paint_box_gap() instead.
44957 // Draws a box in @window using the given style and state and shadow type,
44958 // leaving a gap in one side.
44959 // <style>: a #GtkStyle
44960 // <window>: a #GdkWindow
44961 // <state_type>: a state
44962 // <shadow_type>: type of shadow to draw
44963 // <x>: x origin of the rectangle
44964 // <y>: y origin of the rectangle
44965 // <width>: width of the rectangle
44966 // <height>: width of the rectangle
44967 // <gap_side>: side in which to leave the gap
44968 // <gap_x>: starting position of the gap
44969 // <gap_width>: width of the gap
44970 static void draw_box_gap(AT0, AT1)(AT0 /*Style*/ style, AT1 /*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) nothrow {
44971 gtk_draw_box_gap(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height, gap_side, gap_x, gap_width);
44975 // DEPRECATED (v2.0) function: draw_check - Use gtk_paint_check() instead.
44976 // Draws a check button indicator in the given rectangle on @window with
44977 // the given parameters.
44978 // <style>: a #GtkStyle
44979 // <window>: a #GdkWindow
44980 // <state_type>: a state
44981 // <shadow_type>: the type of shadow to draw
44982 // <x>: x origin of the rectangle to draw the check in
44983 // <y>: y origin of the rectangle to draw the check in
44984 // <width>: the width of the rectangle to draw the check in
44985 // <height>: the height of the rectangle to draw the check in
44986 static void draw_check(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow {
44987 gtk_draw_check(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height);
44991 // DEPRECATED (v2.0) function: draw_diamond - Use gtk_paint_diamond() instead.
44992 // Draws a diamond in the given rectangle on @window using the given
44993 // parameters.
44994 // <style>: a #GtkStyle
44995 // <window>: a #GdkWindow
44996 // <state_type>: a state
44997 // <shadow_type>: the type of shadow to draw
44998 // <x>: x origin of the rectangle to draw the diamond in
44999 // <y>: y origin of the rectangle to draw the diamond in
45000 // <width>: width of the rectangle to draw the diamond in
45001 // <height>: height of the rectangle to draw the diamond in
45002 static void draw_diamond(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow {
45003 gtk_draw_diamond(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height);
45007 // DEPRECATED (v2.0) function: draw_expander - Use gtk_paint_expander() instead.
45008 // Draws an expander as used in #GtkTreeView.
45009 // <style>: a #GtkStyle
45010 // <window>: a #GdkWindow
45011 // <state_type>: a state
45012 // <x>: the x position to draw the expander at
45013 // <y>: the y position to draw the expander at
45014 // <expander_style>: the style to draw the expander in
45015 static void draw_expander(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, int x, int y, ExpanderStyle expander_style) nothrow {
45016 gtk_draw_expander(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, x, y, expander_style);
45020 // DEPRECATED (v2.0) function: draw_extension - Use gtk_paint_extension() instead.
45021 // Draws an extension, i.e. a notebook tab.
45022 // <style>: a #GtkStyle
45023 // <window>: a #GdkWindow
45024 // <state_type>: a state
45025 // <shadow_type>: type of shadow to draw
45026 // <x>: x origin of the extension
45027 // <y>: y origin of the extension
45028 // <width>: width of the extension
45029 // <height>: width of the extension
45030 // <gap_side>: the side on to which the extension is attached
45031 static void draw_extension(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side) nothrow {
45032 gtk_draw_extension(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height, gap_side);
45036 // DEPRECATED (v2.0) function: draw_flat_box - Use gtk_paint_flat_box() instead.
45037 // Draws a flat box on @window with the given parameters.
45038 // <style>: a #GtkStyle
45039 // <window>: a #GdkWindow
45040 // <state_type>: a state
45041 // <shadow_type>: the type of shadow to draw
45042 // <x>: x origin of the box
45043 // <y>: y origin of the box
45044 // <width>: the width of the box
45045 // <height>: the height of the box
45046 static void draw_flat_box(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow {
45047 gtk_draw_flat_box(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height);
45051 // DEPRECATED (v2.0) function: draw_focus - Use gtk_paint_focus() instead.
45052 // Draws a focus indicator around the given rectangle on @window using the
45053 // given style.
45054 // <style>: a #GtkStyle
45055 // <window>: a #GdkWindow
45056 // <x>: the x origin of the rectangle around which to draw a focus indicator
45057 // <y>: the y origin of the rectangle around which to draw a focus indicator
45058 // <width>: the width of the rectangle around which to draw a focus indicator
45059 // <height>: the height of the rectangle around which to draw a focus indicator
45060 static void draw_focus(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, int x, int y, int width, int height) nothrow {
45061 gtk_draw_focus(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), x, y, width, height);
45065 // DEPRECATED (v2.0) function: draw_handle - Use gtk_paint_handle() instead.
45066 // Draws a handle as used in #GtkHandleBox and #GtkPaned.
45067 // <style>: a #GtkStyle
45068 // <window>: a #GdkWindow
45069 // <state_type>: a state
45070 // <shadow_type>: type of shadow to draw
45071 // <x>: x origin of the handle
45072 // <y>: y origin of the handle
45073 // <width>: with of the handle
45074 // <height>: height of the handle
45075 // <orientation>: the orientation of the handle
45076 static void draw_handle(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation) nothrow {
45077 gtk_draw_handle(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height, orientation);
45081 // DEPRECATED (v2.0) function: draw_hline - Use gtk_paint_hline() instead.
45082 // Draws a horizontal line from (@x1, @y) to (@x2, @y) in @window
45083 // using the given style and state.
45084 // <style>: a #GtkStyle
45085 // <window>: a #GdkWindow
45086 // <state_type>: a state
45087 // <x1>: the starting x coordinate
45088 // <x2>: the ending x coordinate
45089 // <y>: the y coordinate
45090 static void draw_hline(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, int x1, int x2, int y) nothrow {
45091 gtk_draw_hline(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, x1, x2, y);
45095 // VERSION: 2.4
45096 // Draws a text caret on @drawable at @location. This is not a style function
45097 // but merely a convenience function for drawing the standard cursor shape.
45098 // <widget>: a #GtkWidget
45099 // <drawable>: a #GdkDrawable
45100 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
45101 // <location>: location where to draw the cursor (@location->width is ignored)
45102 // <is_primary>: if the cursor should be the primary cursor color.
45103 // <direction>: whether the cursor is left-to-right or right-to-left. Should never be #GTK_TEXT_DIR_NONE
45104 // <draw_arrow>: %TRUE to draw a directional arrow on the cursor. Should be %FALSE unless the cursor is split.
45105 static void draw_insertion_cursor(AT0, AT1, AT2, AT3)(AT0 /*Widget*/ widget, AT1 /*Gdk2.Drawable*/ drawable, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Gdk2.Rectangle*/ location, int is_primary, TextDirection direction, int draw_arrow) nothrow {
45106 gtk_draw_insertion_cursor(UpCast!(Widget*)(widget), UpCast!(Gdk2.Drawable*)(drawable), UpCast!(Gdk2.Rectangle*)(area), UpCast!(Gdk2.Rectangle*)(location), is_primary, direction, draw_arrow);
45110 // Draws a layout on @window using the given parameters.
45111 // <style>: a #GtkStyle
45112 // <window>: a #GdkWindow
45113 // <state_type>: a state
45114 // <use_text>: whether to use the text or foreground graphics context of @style
45115 // <x>: x origin
45116 // <y>: y origin
45117 // <layout>: the layout to draw
45118 static void draw_layout(AT0, AT1, AT2)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, int use_text, int x, int y, AT2 /*Pango.Layout*/ layout) nothrow {
45119 gtk_draw_layout(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, use_text, x, y, UpCast!(Pango.Layout*)(layout));
45123 // DEPRECATED (v2.0) function: draw_option - Use gtk_paint_option() instead.
45124 // Draws a radio button indicator in the given rectangle on @window with
45125 // the given parameters.
45126 // <style>: a #GtkStyle
45127 // <window>: a #GdkWindow
45128 // <state_type>: a state
45129 // <shadow_type>: the type of shadow to draw
45130 // <x>: x origin of the rectangle to draw the option in
45131 // <y>: y origin of the rectangle to draw the option in
45132 // <width>: the width of the rectangle to draw the option in
45133 // <height>: the height of the rectangle to draw the option in
45134 static void draw_option(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow {
45135 gtk_draw_option(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height);
45139 // DEPRECATED (v2.0) function: draw_polygon - Use gtk_paint_polygon() instead.
45140 // Draws a polygon on @window with the given parameters.
45141 // <style>: a #GtkStyle
45142 // <window>: a #GdkWindow
45143 // <state_type>: a state
45144 // <shadow_type>: type of shadow to draw
45145 // <points>: an array of #GdkPoint<!-- -->s
45146 // <npoints>: length of @points
45147 // <fill>: %TRUE if the polygon should be filled
45148 static void draw_polygon(AT0, AT1, AT2)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Point*/ points, int npoints, int fill) nothrow {
45149 gtk_draw_polygon(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Point*)(points), npoints, fill);
45153 // DEPRECATED (v2.0) function: draw_resize_grip - Use gtk_paint_resize_grip() instead.
45154 // Draws a resize grip in the given rectangle on @window using the given
45155 // parameters.
45156 // <style>: a #GtkStyle
45157 // <window>: a #GdkWindow
45158 // <state_type>: a state
45159 // <edge>: the edge in which to draw the resize grip
45160 // <x>: the x origin of the rectangle in which to draw the resize grip
45161 // <y>: the y origin of the rectangle in which to draw the resize grip
45162 // <width>: the width of the rectangle in which to draw the resize grip
45163 // <height>: the height of the rectangle in which to draw the resize grip
45164 static void draw_resize_grip(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, Gdk2.WindowEdge edge, int x, int y, int width, int height) nothrow {
45165 gtk_draw_resize_grip(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, edge, x, y, width, height);
45169 // DEPRECATED (v2.0) function: draw_shadow - Use gtk_paint_shadow() instead.
45170 // Draws a shadow around the given rectangle in @window
45171 // using the given style and state and shadow type.
45172 // <style>: a #GtkStyle
45173 // <window>: a #GdkWindow
45174 // <state_type>: a state
45175 // <shadow_type>: type of shadow to draw
45176 // <x>: x origin of the rectangle
45177 // <y>: y origin of the rectangle
45178 // <width>: width of the rectangle
45179 // <height>: width of the rectangle
45180 static void draw_shadow(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow {
45181 gtk_draw_shadow(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height);
45185 // DEPRECATED (v2.0) function: draw_shadow_gap - Use gtk_paint_shadow_gap() instead.
45186 // Draws a shadow around the given rectangle in @window
45187 // using the given style and state and shadow type, leaving a
45188 // gap in one side.
45189 // <style>: a #GtkStyle
45190 // <window>: a #GdkWindow
45191 // <state_type>: a state
45192 // <shadow_type>: type of shadow to draw
45193 // <x>: x origin of the rectangle
45194 // <y>: y origin of the rectangle
45195 // <width>: width of the rectangle
45196 // <height>: width of the rectangle
45197 // <gap_side>: side in which to leave the gap
45198 // <gap_x>: starting position of the gap
45199 // <gap_width>: width of the gap
45200 static void draw_shadow_gap(AT0, AT1)(AT0 /*Style*/ style, AT1 /*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) nothrow {
45201 gtk_draw_shadow_gap(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height, gap_side, gap_x, gap_width);
45205 // Draws a slider in the given rectangle on @window using the
45206 // given style and orientation.
45207 // <style>: a #GtkStyle
45208 // <state_type>: a state
45209 // <shadow_type>: a shadow
45210 // <x>: the x origin of the rectangle in which to draw a slider
45211 // <y>: the y origin of the rectangle in which to draw a slider
45212 // <width>: the width of the rectangle in which to draw a slider
45213 // <height>: the height of the rectangle in which to draw a slider
45214 // <orientation>: the orientation to be used
45215 static void draw_slider(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation) nothrow {
45216 gtk_draw_slider(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height, orientation);
45220 // DEPRECATED (v2.0) function: draw_string - Use gtk_paint_layout() instead.
45221 // Draws a text string on @window with the given parameters.
45222 // <style>: a #GtkStyle
45223 // <window>: a #GdkWindow
45224 // <state_type>: a state
45225 // <x>: x origin
45226 // <y>: y origin
45227 // <string>: the string to draw
45228 static void draw_string(AT0, AT1, AT2)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, int x, int y, AT2 /*char*/ string_) nothrow {
45229 gtk_draw_string(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, x, y, toCString!(char*)(string_));
45233 // DEPRECATED (v2.0) function: draw_tab - Use gtk_paint_tab() instead.
45234 // Draws an option menu tab (i.e. the up and down pointing arrows)
45235 // in the given rectangle on @window using the given parameters.
45236 // <style>: a #GtkStyle
45237 // <window>: a #GdkWindow
45238 // <state_type>: a state
45239 // <shadow_type>: the type of shadow to draw
45240 // <x>: x origin of the rectangle to draw the tab in
45241 // <y>: y origin of the rectangle to draw the tab in
45242 // <width>: the width of the rectangle to draw the tab in
45243 // <height>: the height of the rectangle to draw the tab in
45244 static void draw_tab(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow {
45245 gtk_draw_tab(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, x, y, width, height);
45249 // DEPRECATED (v2.0) function: draw_vline - Use gtk_paint_vline() instead.
45250 // Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @window
45251 // using the given style and state.
45252 // <style>: a #GtkStyle
45253 // <window>: a #GdkWindow
45254 // <state_type>: a state
45255 // <y1_>: the starting y coordinate
45256 // <y2_>: the ending y coordinate
45257 // <x>: the x coordinate
45258 static void draw_vline(AT0, AT1)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, int y1_, int y2_, int x) nothrow {
45259 gtk_draw_vline(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, y1_, y2_, x);
45262 static int events_pending()() nothrow {
45263 return gtk_events_pending();
45266 static void exit()(int error_code) nothrow {
45267 gtk_exit(error_code);
45270 static int false_()() nothrow {
45271 return gtk_false();
45275 // VERSION: 2.4
45276 // MOVED TO: FileChooserError.quark
45277 // Registers an error quark for #GtkFileChooser if necessary.
45278 // RETURNS: The error quark used for #GtkFileChooser errors.
45279 static GLib2.Quark file_chooser_error_quark()() nothrow {
45280 return gtk_file_chooser_error_quark();
45283 // Unintrospectable function: gc_get() / gtk_gc_get()
45284 static Gdk2.GC* gc_get(AT0, AT1)(int depth, AT0 /*Gdk2.Colormap*/ colormap, AT1 /*Gdk2.GCValues*/ values, Gdk2.GCValuesMask values_mask) nothrow {
45285 return gtk_gc_get(depth, UpCast!(Gdk2.Colormap*)(colormap), UpCast!(Gdk2.GCValues*)(values), values_mask);
45288 static void gc_release(AT0)(AT0 /*Gdk2.GC*/ gc) nothrow {
45289 gtk_gc_release(UpCast!(Gdk2.GC*)(gc));
45293 // Obtains a copy of the event currently being processed by GTK+. For
45294 // example, if you get a "clicked" signal from #GtkButton, the current
45295 // event will be the #GdkEventButton that triggered the "clicked"
45296 // signal. The returned event must be freed with gdk_event_free().
45297 // If there is no current event, the function returns %NULL.
45299 // current event.
45300 // RETURNS: a copy of the current event, or %NULL if no
45301 static Gdk2.Event* /*new*/ get_current_event()() nothrow {
45302 return gtk_get_current_event();
45306 // If there is a current event and it has a state field, place
45307 // that state field in @state and return %TRUE, otherwise return
45308 // %FALSE.
45309 // RETURNS: %TRUE if there was a current event and it had a state field
45310 // <state>: a location to store the state of the current event
45311 static int get_current_event_state(AT0)(/*out*/ AT0 /*Gdk2.ModifierType*/ state) nothrow {
45312 return gtk_get_current_event_state(UpCast!(Gdk2.ModifierType*)(state));
45316 // If there is a current event and it has a timestamp, return that
45317 // timestamp, otherwise return %GDK_CURRENT_TIME.
45318 // RETURNS: the timestamp from the current event, or %GDK_CURRENT_TIME.
45319 static uint get_current_event_time()() nothrow {
45320 return gtk_get_current_event_time();
45324 // Returns the #PangoLanguage for the default language currently in
45325 // effect. (Note that this can change over the life of an
45326 // application.) The default language is derived from the current
45327 // locale. It determines, for example, whether GTK+ uses the
45328 // right-to-left or left-to-right text direction.
45330 // This function is equivalent to pango_language_get_default(). See
45331 // that function for details.
45333 // freed
45334 // RETURNS: the default language as a #PangoLanguage, must not be
45335 static Pango.Language* /*new*/ get_default_language()() nothrow {
45336 return gtk_get_default_language();
45340 // If @event is %NULL or the event was not associated with any widget,
45341 // returns %NULL, otherwise returns the widget that received the event
45342 // originally.
45344 // received @event, or %NULL
45345 // RETURNS: the widget that originally
45346 // <event>: a #GdkEvent
45347 static Widget* get_event_widget(AT0)(AT0 /*Gdk2.Event*/ event) nothrow {
45348 return gtk_get_event_widget(UpCast!(Gdk2.Event*)(event));
45352 // Unintrospectable function: get_option_group() / gtk_get_option_group()
45353 // VERSION: 2.6
45354 // Returns a #GOptionGroup for the commandline arguments recognized
45355 // by GTK+ and GDK. You should add this group to your #GOptionContext
45356 // with g_option_context_add_group(), if you are using
45357 // g_option_context_parse() to parse your commandline arguments.
45359 // by GTK+
45360 // RETURNS: a #GOptionGroup for the commandline arguments recognized
45361 // <open_default_display>: whether to open the default display when parsing the commandline arguments
45362 static GLib2.OptionGroup* get_option_group()(int open_default_display) nothrow {
45363 return gtk_get_option_group(open_default_display);
45366 static void grab_add(AT0)(AT0 /*Widget*/ widget) nothrow {
45367 gtk_grab_add(UpCast!(Widget*)(widget));
45371 // Queries the current grab of the default window group.
45373 // has the grab or %NULL if no grab is active
45374 // RETURNS: The widget which currently
45375 static Widget* grab_get_current()() nothrow {
45376 return gtk_grab_get_current();
45379 static void grab_remove(AT0)(AT0 /*Widget*/ widget) nothrow {
45380 gtk_grab_remove(UpCast!(Widget*)(widget));
45384 // MOVED TO: IconSize.from_name
45385 // Looks up the icon size associated with @name.
45386 // RETURNS: the icon size
45387 // <name>: the name to look up.
45388 static IconSize icon_size_from_name(AT0)(AT0 /*char*/ name) nothrow {
45389 return gtk_icon_size_from_name(toCString!(char*)(name));
45393 // MOVED TO: IconSize.get_name
45394 // Gets the canonical name of the given icon size. The returned string
45395 // is statically allocated and should not be freed.
45396 // RETURNS: the name of the given icon size.
45397 // <size>: a #GtkIconSize.
45398 static char* icon_size_get_name()(IconSize size) nothrow {
45399 return gtk_icon_size_get_name(size);
45403 // MOVED TO: IconSize.lookup
45404 // Obtains the pixel size of a semantic icon size, possibly
45405 // modified by user preferences for the default #GtkSettings.
45406 // (See gtk_icon_size_lookup_for_settings().)
45407 // Normally @size would be
45408 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function
45409 // isn't normally needed, gtk_widget_render_icon() is the usual
45410 // way to get an icon for rendering, then just look at the size of
45411 // the rendered pixbuf. The rendered pixbuf may not even correspond to
45412 // the width/height returned by gtk_icon_size_lookup(), because themes
45413 // are free to render the pixbuf however they like, including changing
45414 // the usual size.
45415 // RETURNS: %TRUE if @size was a valid size
45416 // <size>: an icon size
45417 // <width>: location to store icon width
45418 // <height>: location to store icon height
45419 static int icon_size_lookup()(IconSize size, /*out*/ int* width, /*out*/ int* height) nothrow {
45420 return gtk_icon_size_lookup(size, width, height);
45424 // VERSION: 2.2
45425 // MOVED TO: IconSize.lookup_for_settings
45426 // Obtains the pixel size of a semantic icon size, possibly
45427 // modified by user preferences for a particular
45428 // #GtkSettings. Normally @size would be
45429 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function
45430 // isn't normally needed, gtk_widget_render_icon() is the usual
45431 // way to get an icon for rendering, then just look at the size of
45432 // the rendered pixbuf. The rendered pixbuf may not even correspond to
45433 // the width/height returned by gtk_icon_size_lookup(), because themes
45434 // are free to render the pixbuf however they like, including changing
45435 // the usual size.
45436 // RETURNS: %TRUE if @size was a valid size
45437 // <settings>: a #GtkSettings object, used to determine which set of user preferences to used.
45438 // <size>: an icon size
45439 // <width>: location to store icon width
45440 // <height>: location to store icon height
45441 static int icon_size_lookup_for_settings(AT0)(AT0 /*Settings*/ settings, IconSize size, /*out*/ int* width, /*out*/ int* height) nothrow {
45442 return gtk_icon_size_lookup_for_settings(UpCast!(Settings*)(settings), size, width, height);
45446 // MOVED TO: IconSize.register
45447 // Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU,
45448 // etc. Returns the integer value for the size.
45449 // RETURNS: integer value representing the size
45450 // <name>: name of the icon size
45451 // <width>: the icon width
45452 // <height>: the icon height
45453 static IconSize icon_size_register(AT0)(AT0 /*char*/ name, int width, int height) nothrow {
45454 return gtk_icon_size_register(toCString!(char*)(name), width, height);
45458 // MOVED TO: IconSize.register_alias
45459 // Registers @alias as another name for @target.
45460 // So calling gtk_icon_size_from_name() with @alias as argument
45461 // will return @target.
45462 // <alias>: an alias for @target
45463 // <target>: an existing icon size
45464 static void icon_size_register_alias(AT0)(AT0 /*char*/ alias_, IconSize target) nothrow {
45465 gtk_icon_size_register_alias(toCString!(char*)(alias_), target);
45468 // MOVED TO: IconThemeError.quark
45469 static GLib2.Quark icon_theme_error_quark()() nothrow {
45470 return gtk_icon_theme_error_quark();
45473 // Unintrospectable function: idle_add() / gtk_idle_add()
45474 static uint idle_add(AT0)(Function function_, AT0 /*void*/ data) nothrow {
45475 return gtk_idle_add(function_, UpCast!(void*)(data));
45478 // Unintrospectable function: idle_add_full() / gtk_idle_add_full()
45479 static uint idle_add_full(AT0)(int priority, Function function_, CallbackMarshal marshal, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
45480 return gtk_idle_add_full(priority, function_, marshal, UpCast!(void*)(data), destroy);
45483 // Unintrospectable function: idle_add_priority() / gtk_idle_add_priority()
45484 static uint idle_add_priority(AT0)(int priority, Function function_, AT0 /*void*/ data) nothrow {
45485 return gtk_idle_add_priority(priority, function_, UpCast!(void*)(data));
45488 static void idle_remove()(uint idle_handler_id) nothrow {
45489 gtk_idle_remove(idle_handler_id);
45492 static void idle_remove_by_data(AT0)(AT0 /*void*/ data) nothrow {
45493 gtk_idle_remove_by_data(UpCast!(void*)(data));
45497 // Call this function before using any other GTK+ functions in your GUI
45498 // applications. It will initialize everything needed to operate the
45499 // toolkit and parses some standard command line options.
45501 // @argc and @argv are adjusted accordingly so your own code will
45502 // never see those standard arguments.
45504 // Note that there are some alternative ways to initialize GTK+:
45505 // if you are calling gtk_parse_args(), gtk_init_check(),
45506 // gtk_init_with_args() or g_option_context_parse() with
45507 // the option group returned by gtk_get_option_group(),
45508 // you <emphasis>don't</emphasis> have to call gtk_init().
45510 // <note><para>
45511 // This function will terminate your program if it was unable to
45512 // initialize the windowing system for some reason. If you want
45513 // your program to fall back to a textual interface you want to
45514 // call gtk_init_check() instead.
45515 // </para></note>
45517 // <note><para>
45518 // Since 2.18, GTK+ calls <literal>signal (SIGPIPE, SIG_IGN)</literal>
45519 // during initialization, to ignore SIGPIPE signals, since these are
45520 // almost never wanted in graphical applications. If you do need to
45521 // handle SIGPIPE for some reason, reset the handler after gtk_init(),
45522 // but notice that other libraries (e.g. libdbus or gvfs) might do
45523 // similar things.
45524 // </para></note>
45525 // <argc>: Address of the <parameter>argc</parameter> parameter of your main() function. Changed if any arguments were handled
45526 // <argv>: Address of the <parameter>argv</parameter> parameter of main(). Any options understood by GTK+ are stripped before return.
45527 static void init(AT0)(/*inout*/ int* argc, /*inout*/ AT0 /*char***/ argv=null) nothrow {
45528 gtk_init(argc, toCString!(char***)(argv));
45531 // Unintrospectable function: init_add() / gtk_init_add()
45532 static void init_add(AT0)(Function function_, AT0 /*void*/ data) nothrow {
45533 gtk_init_add(function_, UpCast!(void*)(data));
45537 // This function does the same work as gtk_init() with only
45538 // a single change: It does not terminate the program if the GUI can't be
45539 // initialized. Instead it returns %FALSE on failure.
45541 // This way the application can fall back to some other means of communication
45542 // with the user - for example a curses or command line interface.
45544 // %FALSE otherwise.
45545 // RETURNS: %TRUE if the GUI has been successfully initialized,
45546 // <argc>: Address of the <parameter>argc</parameter> parameter of your main() function. Changed if any arguments were handled.
45547 // <argv>: Address of the <parameter>argv</parameter> parameter of main(). Any parameters understood by gtk_init() are stripped before return.
45548 static int init_check(AT0)(/*inout*/ int* argc, /*inout*/ AT0 /*char***/ argv=null) nothrow {
45549 return gtk_init_check(argc, toCString!(char***)(argv));
45553 // VERSION: 2.6
45554 // This function does the same work as gtk_init_check().
45555 // Additionally, it allows you to add your own commandline options,
45556 // and it automatically generates nicely formatted
45557 // <option>--help</option> output. Note that your program will
45558 // be terminated after writing out the help output.
45560 // %FALSE otherwise.
45561 // RETURNS: %TRUE if the GUI has been successfully initialized,
45562 // <argc>: a pointer to the number of command line arguments.
45563 // <argv>: a pointer to the array of command line arguments.
45564 // <parameter_string>: a string which is displayed in the first line of <option>--help</option> output, after <literal><replaceable>programname</replaceable> [OPTION...]</literal>
45565 // <entries>: a %NULL-terminated array of #GOptionEntry<!-- -->s describing the options of your program
45566 // <translation_domain>: a translation domain to use for translating the <option>--help</option> output for the options in @entries with gettext(), or %NULL
45567 static int init_with_args(AT0, AT1, AT2, AT3, AT4)(/*inout*/ int* argc, /*inout*/ AT0 /*char***/ argv, AT1 /*char*/ parameter_string, AT2 /*GLib2.OptionEntry*/ entries, AT3 /*char*/ translation_domain, AT4 /*GLib2.Error**/ error=null) nothrow {
45568 return gtk_init_with_args(argc, toCString!(char***)(argv), toCString!(char*)(parameter_string), UpCast!(GLib2.OptionEntry*)(entries), toCString!(char*)(translation_domain), UpCast!(GLib2.Error**)(error));
45571 // Unintrospectable function: input_add_full() / gtk_input_add_full()
45572 static uint input_add_full(AT0)(int source, Gdk2.InputCondition condition, Gdk2.InputFunction function_, CallbackMarshal marshal, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
45573 return gtk_input_add_full(source, condition, function_, marshal, UpCast!(void*)(data), destroy);
45576 static void input_remove()(uint input_handler_id) nothrow {
45577 gtk_input_remove(input_handler_id);
45580 // Unintrospectable function: key_snooper_install() / gtk_key_snooper_install()
45581 static uint key_snooper_install(AT0)(KeySnoopFunc snooper, AT0 /*void*/ func_data) nothrow {
45582 return gtk_key_snooper_install(snooper, UpCast!(void*)(func_data));
45585 static void key_snooper_remove()(uint snooper_handler_id) nothrow {
45586 gtk_key_snooper_remove(snooper_handler_id);
45589 static void main_()() nothrow {
45590 gtk_main();
45593 static void main_do_event(AT0)(AT0 /*Gdk2.Event*/ event) nothrow {
45594 gtk_main_do_event(UpCast!(Gdk2.Event*)(event));
45597 static int main_iteration()() nothrow {
45598 return gtk_main_iteration();
45601 static int main_iteration_do()(int blocking) nothrow {
45602 return gtk_main_iteration_do(blocking);
45605 static uint main_level()() nothrow {
45606 return gtk_main_level();
45609 static void main_quit()() nothrow {
45610 gtk_main_quit();
45613 static void marshal_BOOLEAN__POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45614 gtk_marshal_BOOLEAN__POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45617 static void marshal_BOOLEAN__POINTER_INT_INT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45618 gtk_marshal_BOOLEAN__POINTER_INT_INT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45621 static void marshal_BOOLEAN__POINTER_INT_INT_UINT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45622 gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45625 static void marshal_BOOLEAN__POINTER_POINTER_INT_INT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45626 gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45629 static void marshal_BOOLEAN__POINTER_STRING_STRING_POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45630 gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45633 static void marshal_BOOLEAN__VOID(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45634 gtk_marshal_BOOLEAN__VOID(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45637 static void marshal_ENUM__ENUM(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45638 gtk_marshal_ENUM__ENUM(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45641 static void marshal_INT__POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45642 gtk_marshal_INT__POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45645 static void marshal_INT__POINTER_CHAR_CHAR(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45646 gtk_marshal_INT__POINTER_CHAR_CHAR(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45649 static void marshal_VOID__ENUM_FLOAT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45650 gtk_marshal_VOID__ENUM_FLOAT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45653 static void marshal_VOID__ENUM_FLOAT_BOOLEAN(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45654 gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45657 static void marshal_VOID__INT_INT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45658 gtk_marshal_VOID__INT_INT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45661 static void marshal_VOID__INT_INT_POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45662 gtk_marshal_VOID__INT_INT_POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45665 static void marshal_VOID__POINTER_INT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45666 gtk_marshal_VOID__POINTER_INT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45669 static void marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45670 gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45673 static void marshal_VOID__POINTER_POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45674 gtk_marshal_VOID__POINTER_POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45677 static void marshal_VOID__POINTER_POINTER_POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45678 gtk_marshal_VOID__POINTER_POINTER_POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45681 static void marshal_VOID__POINTER_POINTER_UINT_UINT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45682 gtk_marshal_VOID__POINTER_POINTER_UINT_UINT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45685 static void marshal_VOID__POINTER_STRING_STRING(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45686 gtk_marshal_VOID__POINTER_STRING_STRING(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45689 static void marshal_VOID__POINTER_UINT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45690 gtk_marshal_VOID__POINTER_UINT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45693 static void marshal_VOID__POINTER_UINT_ENUM(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45694 gtk_marshal_VOID__POINTER_UINT_ENUM(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45697 static void marshal_VOID__POINTER_UINT_UINT(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45698 gtk_marshal_VOID__POINTER_UINT_UINT(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45701 static void marshal_VOID__STRING_INT_POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45702 gtk_marshal_VOID__STRING_INT_POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45705 static void marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45706 gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45709 static void marshal_VOID__UINT_POINTER_UINT_UINT_ENUM(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45710 gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45713 static void marshal_VOID__UINT_STRING(AT0, AT1, AT2, AT3, AT4)(AT0 /*GObject2.Closure*/ closure, AT1 /*GObject2.Value*/ return_value, uint n_param_values, AT2 /*GObject2.Value*/ param_values, AT3 /*void*/ invocation_hint, AT4 /*void*/ marshal_data) nothrow {
45714 gtk_marshal_VOID__UINT_STRING(UpCast!(GObject2.Closure*)(closure), UpCast!(GObject2.Value*)(return_value), n_param_values, UpCast!(GObject2.Value*)(param_values), UpCast!(void*)(invocation_hint), UpCast!(void*)(marshal_data));
45718 // Draws an arrow in the given rectangle on @window using the given
45719 // parameters. @arrow_type determines the direction of the arrow.
45720 // <style>: a #GtkStyle
45721 // <window>: a #GdkWindow
45722 // <state_type>: a state
45723 // <shadow_type>: the type of shadow to draw
45724 // <area>: clip rectangle, or %NULL if the output should not be clipped
45725 // <widget>: the widget
45726 // <detail>: a style detail
45727 // <arrow_type>: the type of arrow to draw
45728 // <fill>: %TRUE if the arrow tip should be filled
45729 // <x>: x origin of the rectangle to draw the arrow in
45730 // <y>: y origin of the rectangle to draw the arrow in
45731 // <width>: width of the rectangle to draw the arrow in
45732 // <height>: height of the rectangle to draw the arrow in
45733 static void paint_arrow(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, ArrowType arrow_type, int fill, int x, int y, int width, int height) nothrow {
45734 gtk_paint_arrow(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), arrow_type, fill, x, y, width, height);
45738 // Draws a box on @window with the given parameters.
45739 // <style>: a #GtkStyle
45740 // <window>: a #GdkWindow
45741 // <state_type>: a state
45742 // <shadow_type>: the type of shadow to draw
45743 // <area>: clip rectangle, or %NULL if the output should not be clipped
45744 // <widget>: the widget
45745 // <detail>: a style detail
45746 // <x>: x origin of the box
45747 // <y>: y origin of the box
45748 // <width>: the width of the box
45749 // <height>: the height of the box
45750 static void paint_box(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
45751 gtk_paint_box(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
45755 // Draws a box in @window using the given style and state and shadow type,
45756 // leaving a gap in one side.
45757 // <style>: a #GtkStyle
45758 // <window>: a #GdkWindow
45759 // <state_type>: a state
45760 // <shadow_type>: type of shadow to draw
45761 // <area>: clip rectangle, or %NULL if the output should not be clipped
45762 // <widget>: the widget
45763 // <detail>: a style detail
45764 // <x>: x origin of the rectangle
45765 // <y>: y origin of the rectangle
45766 // <width>: width of the rectangle
45767 // <height>: width of the rectangle
45768 // <gap_side>: side in which to leave the gap
45769 // <gap_x>: starting position of the gap
45770 // <gap_width>: width of the gap
45771 static void paint_box_gap(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) nothrow {
45772 gtk_paint_box_gap(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height, gap_side, gap_x, gap_width);
45776 // Draws a check button indicator in the given rectangle on @window with
45777 // the given parameters.
45778 // <style>: a #GtkStyle
45779 // <window>: a #GdkWindow
45780 // <state_type>: a state
45781 // <shadow_type>: the type of shadow to draw
45782 // <area>: clip rectangle, or %NULL if the output should not be clipped
45783 // <widget>: the widget
45784 // <detail>: a style detail
45785 // <x>: x origin of the rectangle to draw the check in
45786 // <y>: y origin of the rectangle to draw the check in
45787 // <width>: the width of the rectangle to draw the check in
45788 // <height>: the height of the rectangle to draw the check in
45789 static void paint_check(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
45790 gtk_paint_check(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
45794 // Draws a diamond in the given rectangle on @window using the given
45795 // parameters.
45796 // <style>: a #GtkStyle
45797 // <window>: a #GdkWindow
45798 // <state_type>: a state
45799 // <shadow_type>: the type of shadow to draw
45800 // <area>: clip rectangle, or %NULL if the output should not be clipped
45801 // <widget>: the widget
45802 // <detail>: a style detail
45803 // <x>: x origin of the rectangle to draw the diamond in
45804 // <y>: y origin of the rectangle to draw the diamond in
45805 // <width>: width of the rectangle to draw the diamond in
45806 // <height>: height of the rectangle to draw the diamond in
45807 static void paint_diamond(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
45808 gtk_paint_diamond(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
45812 // Draws an expander as used in #GtkTreeView. @x and @y specify the
45813 // center the expander. The size of the expander is determined by the
45814 // "expander-size" style property of @widget. (If widget is not
45815 // specified or doesn't have an "expander-size" property, an
45816 // unspecified default size will be used, since the caller doesn't
45817 // have sufficient information to position the expander, this is
45818 // likely not useful.) The expander is expander_size pixels tall
45819 // in the collapsed position and expander_size pixels wide in the
45820 // expanded position.
45821 // <style>: a #GtkStyle
45822 // <window>: a #GdkWindow
45823 // <state_type>: a state
45824 // <area>: clip rectangle, or %NULL if the output should not be clipped
45825 // <widget>: the widget
45826 // <detail>: a style detail
45827 // <x>: the x position to draw the expander at
45828 // <y>: the y position to draw the expander at
45829 // <expander_style>: the style to draw the expander in; determines whether the expander is collapsed, expanded, or in an intermediate state.
45830 static void paint_expander(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, ExpanderStyle expander_style) nothrow {
45831 gtk_paint_expander(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, expander_style);
45835 // Draws an extension, i.e. a notebook tab.
45836 // <style>: a #GtkStyle
45837 // <window>: a #GdkWindow
45838 // <state_type>: a state
45839 // <shadow_type>: type of shadow to draw
45840 // <area>: clip rectangle, or %NULL if the output should not be clipped
45841 // <widget>: the widget
45842 // <detail>: a style detail
45843 // <x>: x origin of the extension
45844 // <y>: y origin of the extension
45845 // <width>: width of the extension
45846 // <height>: width of the extension
45847 // <gap_side>: the side on to which the extension is attached
45848 static void paint_extension(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height, PositionType gap_side) nothrow {
45849 gtk_paint_extension(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height, gap_side);
45853 // Draws a flat box on @window with the given parameters.
45854 // <style>: a #GtkStyle
45855 // <window>: a #GdkWindow
45856 // <state_type>: a state
45857 // <shadow_type>: the type of shadow to draw
45858 // <area>: clip rectangle, or %NULL if the output should not be clipped
45859 // <widget>: the widget
45860 // <detail>: a style detail
45861 // <x>: x origin of the box
45862 // <y>: y origin of the box
45863 // <width>: the width of the box
45864 // <height>: the height of the box
45865 static void paint_flat_box(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
45866 gtk_paint_flat_box(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
45870 // Draws a focus indicator around the given rectangle on @window using the
45871 // given style.
45872 // <style>: a #GtkStyle
45873 // <window>: a #GdkWindow
45874 // <state_type>: a state
45875 // <area>: clip rectangle, or %NULL if the output should not be clipped
45876 // <widget>: the widget
45877 // <detail>: a style detail
45878 // <x>: the x origin of the rectangle around which to draw a focus indicator
45879 // <y>: the y origin of the rectangle around which to draw a focus indicator
45880 // <width>: the width of the rectangle around which to draw a focus indicator
45881 // <height>: the height of the rectangle around which to draw a focus indicator
45882 static void paint_focus(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
45883 gtk_paint_focus(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
45887 // Draws a handle as used in #GtkHandleBox and #GtkPaned.
45888 // <style>: a #GtkStyle
45889 // <window>: a #GdkWindow
45890 // <state_type>: a state
45891 // <shadow_type>: type of shadow to draw
45892 // <area>: clip rectangle, or %NULL if the output should not be clipped
45893 // <widget>: the widget
45894 // <detail>: a style detail
45895 // <x>: x origin of the handle
45896 // <y>: y origin of the handle
45897 // <width>: with of the handle
45898 // <height>: height of the handle
45899 // <orientation>: the orientation of the handle
45900 static void paint_handle(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height, Orientation orientation) nothrow {
45901 gtk_paint_handle(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height, orientation);
45905 // Draws a horizontal line from (@x1, @y) to (@x2, @y) in @window
45906 // using the given style and state.
45907 // <style>: a #GtkStyle
45908 // <window>: a #GdkWindow
45909 // <state_type>: a state
45910 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
45911 // <widget>: the widget
45912 // <detail>: a style detail
45913 // <x1>: the starting x coordinate
45914 // <x2>: the ending x coordinate
45915 // <y>: the y coordinate
45916 static void paint_hline(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x1, int x2, int y) nothrow {
45917 gtk_paint_hline(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x1, x2, y);
45921 // Draws a layout on @window using the given parameters.
45922 // <style>: a #GtkStyle
45923 // <window>: a #GdkWindow
45924 // <state_type>: a state
45925 // <use_text>: whether to use the text or foreground graphics context of @style
45926 // <area>: clip rectangle, or %NULL if the output should not be clipped
45927 // <widget>: the widget
45928 // <detail>: a style detail
45929 // <x>: x origin
45930 // <y>: y origin
45931 // <layout>: the layout to draw
45932 static void paint_layout(AT0, AT1, AT2, AT3, AT4, AT5)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, int use_text, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, AT5 /*Pango.Layout*/ layout) nothrow {
45933 gtk_paint_layout(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, use_text, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, UpCast!(Pango.Layout*)(layout));
45937 // Draws a radio button indicator in the given rectangle on @window with
45938 // the given parameters.
45939 // <style>: a #GtkStyle
45940 // <window>: a #GdkWindow
45941 // <state_type>: a state
45942 // <shadow_type>: the type of shadow to draw
45943 // <area>: clip rectangle, or %NULL if the output should not be clipped
45944 // <widget>: the widget
45945 // <detail>: a style detail
45946 // <x>: x origin of the rectangle to draw the option in
45947 // <y>: y origin of the rectangle to draw the option in
45948 // <width>: the width of the rectangle to draw the option in
45949 // <height>: the height of the rectangle to draw the option in
45950 static void paint_option(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
45951 gtk_paint_option(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
45955 // Draws a polygon on @window with the given parameters.
45956 // <style>: a #GtkStyle
45957 // <window>: a #GdkWindow
45958 // <state_type>: a state
45959 // <shadow_type>: type of shadow to draw
45960 // <area>: clip rectangle, or %NULL if the output should not be clipped
45961 // <widget>: the widget
45962 // <detail>: a style detail
45963 // <points>: an array of #GdkPoint<!-- -->s
45964 // <n_points>: length of @points
45965 // <fill>: %TRUE if the polygon should be filled
45966 static void paint_polygon(AT0, AT1, AT2, AT3, AT4, AT5)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, AT5 /*Gdk2.Point*/ points, int n_points, int fill) nothrow {
45967 gtk_paint_polygon(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), UpCast!(Gdk2.Point*)(points), n_points, fill);
45971 // Draws a resize grip in the given rectangle on @window using the given
45972 // parameters.
45973 // <style>: a #GtkStyle
45974 // <window>: a #GdkWindow
45975 // <state_type>: a state
45976 // <area>: clip rectangle, or %NULL if the output should not be clipped
45977 // <widget>: the widget
45978 // <detail>: a style detail
45979 // <edge>: the edge in which to draw the resize grip
45980 // <x>: the x origin of the rectangle in which to draw the resize grip
45981 // <y>: the y origin of the rectangle in which to draw the resize grip
45982 // <width>: the width of the rectangle in which to draw the resize grip
45983 // <height>: the height of the rectangle in which to draw the resize grip
45984 static void paint_resize_grip(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, Gdk2.WindowEdge edge, int x, int y, int width, int height) nothrow {
45985 gtk_paint_resize_grip(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), edge, x, y, width, height);
45989 // Draws a shadow around the given rectangle in @window
45990 // using the given style and state and shadow type.
45991 // <style>: a #GtkStyle
45992 // <window>: a #GdkWindow
45993 // <state_type>: a state
45994 // <shadow_type>: type of shadow to draw
45995 // <area>: clip rectangle or %NULL if the output should not be clipped
45996 // <widget>: the widget
45997 // <detail>: a style detail
45998 // <x>: x origin of the rectangle
45999 // <y>: y origin of the rectangle
46000 // <width>: width of the rectangle
46001 // <height>: width of the rectangle
46002 static void paint_shadow(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
46003 gtk_paint_shadow(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
46007 // Draws a shadow around the given rectangle in @window
46008 // using the given style and state and shadow type, leaving a
46009 // gap in one side.
46010 // <style>: a #GtkStyle
46011 // <window>: a #GdkWindow
46012 // <state_type>: a state
46013 // <shadow_type>: type of shadow to draw
46014 // <area>: clip rectangle, or %NULL if the output should not be clipped
46015 // <widget>: the widget
46016 // <detail>: a style detail
46017 // <x>: x origin of the rectangle
46018 // <y>: y origin of the rectangle
46019 // <width>: width of the rectangle
46020 // <height>: width of the rectangle
46021 // <gap_side>: side in which to leave the gap
46022 // <gap_x>: starting position of the gap
46023 // <gap_width>: width of the gap
46024 static void paint_shadow_gap(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) nothrow {
46025 gtk_paint_shadow_gap(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height, gap_side, gap_x, gap_width);
46029 // Draws a slider in the given rectangle on @window using the
46030 // given style and orientation.
46031 // <style>: a #GtkStyle
46032 // <window>: a #GdkWindow
46033 // <state_type>: a state
46034 // <shadow_type>: a shadow
46035 // <area>: clip rectangle, or %NULL if the output should not be clipped
46036 // <widget>: the widget
46037 // <detail>: a style detail
46038 // <x>: the x origin of the rectangle in which to draw a slider
46039 // <y>: the y origin of the rectangle in which to draw a slider
46040 // <width>: the width of the rectangle in which to draw a slider
46041 // <height>: the height of the rectangle in which to draw a slider
46042 // <orientation>: the orientation to be used
46043 static void paint_slider(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height, Orientation orientation) nothrow {
46044 gtk_paint_slider(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height, orientation);
46048 // VERSION: 2.20
46049 // Draws a spinner on @window using the given parameters.
46050 // <style>: a #GtkStyle
46051 // <window>: a #GdkWindow
46052 // <state_type>: a state
46053 // <area>: clip rectangle, or %NULL if the output should not be clipped
46054 // <widget>: the widget (may be %NULL)
46055 // <detail>: a style detail (may be %NULL)
46056 // <step>: the nth step, a value between 0 and #GtkSpinner:num-steps
46057 // <x>: the x origin of the rectangle in which to draw the spinner
46058 // <y>: the y origin of the rectangle in which to draw the spinner
46059 // <width>: the width of the rectangle in which to draw the spinner
46060 // <height>: the height of the rectangle in which to draw the spinner
46061 static void paint_spinner(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, uint step, int x, int y, int width, int height) nothrow {
46062 gtk_paint_spinner(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), step, x, y, width, height);
46066 // DEPRECATED (v2.0) function: paint_string - Use gtk_paint_layout() instead.
46067 // Draws a text string on @window with the given parameters.
46068 // <style>: a #GtkStyle
46069 // <window>: a #GdkWindow
46070 // <state_type>: a state
46071 // <area>: clip rectangle, or %NULL if the output should not be clipped
46072 // <widget>: the widget
46073 // <detail>: a style detail
46074 // <x>: x origin
46075 // <y>: y origin
46076 // <string>: the string to draw
46077 static void paint_string(AT0, AT1, AT2, AT3, AT4, AT5)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, AT5 /*char*/ string_) nothrow {
46078 gtk_paint_string(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, toCString!(char*)(string_));
46082 // Draws an option menu tab (i.e. the up and down pointing arrows)
46083 // in the given rectangle on @window using the given parameters.
46084 // <style>: a #GtkStyle
46085 // <window>: a #GdkWindow
46086 // <state_type>: a state
46087 // <shadow_type>: the type of shadow to draw
46088 // <area>: clip rectangle, or %NULL if the output should not be clipped
46089 // <widget>: the widget
46090 // <detail>: a style detail
46091 // <x>: x origin of the rectangle to draw the tab in
46092 // <y>: y origin of the rectangle to draw the tab in
46093 // <width>: the width of the rectangle to draw the tab in
46094 // <height>: the height of the rectangle to draw the tab in
46095 static void paint_tab(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, ShadowType shadow_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int x, int y, int width, int height) nothrow {
46096 gtk_paint_tab(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, shadow_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), x, y, width, height);
46100 // Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @window
46101 // using the given style and state.
46102 // <style>: a #GtkStyle
46103 // <window>: a #GdkWindow
46104 // <state_type>: a state
46105 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
46106 // <widget>: the widget
46107 // <detail>: a style detail
46108 // <y1_>: the starting y coordinate
46109 // <y2_>: the ending y coordinate
46110 // <x>: the x coordinate
46111 static void paint_vline(AT0, AT1, AT2, AT3, AT4)(AT0 /*Style*/ style, AT1 /*Gdk2.Window*/ window, StateType state_type, AT2 /*Gdk2.Rectangle*/ area, AT3 /*Widget*/ widget, AT4 /*char*/ detail, int y1_, int y2_, int x) nothrow {
46112 gtk_paint_vline(UpCast!(Style*)(style), UpCast!(Gdk2.Window*)(window), state_type, UpCast!(Gdk2.Rectangle*)(area), UpCast!(Widget*)(widget), toCString!(char*)(detail), y1_, y2_, x);
46116 // VERSION: 2.10
46117 // MOVED TO: PaperSize.get_default
46118 // Returns the name of the default paper size, which
46119 // depends on the current locale.
46121 // is owned by GTK+ and should not be modified.
46122 // RETURNS: the name of the default paper size. The string
46123 static char* paper_size_get_default()() nothrow {
46124 return gtk_paper_size_get_default();
46128 // VERSION: 2.12
46129 // MOVED TO: PaperSize.get_paper_sizes
46130 // Creates a list of known paper sizes.
46132 // allocated #GtkPaperSize objects
46133 // RETURNS: a newly allocated list of newly
46134 // <include_custom>: whether to include custom paper sizes as defined in the page setup dialog
46135 static GLib2.List* /*new*/ paper_size_get_paper_sizes()(int include_custom) nothrow {
46136 return gtk_paper_size_get_paper_sizes(include_custom);
46140 // Parses command line arguments, and initializes global
46141 // attributes of GTK+, but does not actually open a connection
46142 // to a display. (See gdk_display_open(), gdk_get_display_arg_name())
46144 // Any arguments used by GTK+ or GDK are removed from the array and
46145 // @argc and @argv are updated accordingly.
46147 // There is no need to call this function explicitely if you are using
46148 // gtk_init(), or gtk_init_check().
46149 // RETURNS: %TRUE if initialization succeeded, otherwise %FALSE.
46150 // <argc>: a pointer to the number of command line arguments
46151 // <argv>: a pointer to the array of command line arguments
46152 static int parse_args(AT0)(/*inout*/ int* argc, /*inout*/ AT0 /*char***/ argv) nothrow {
46153 return gtk_parse_args(argc, toCString!(char***)(argv));
46157 // VERSION: 2.10
46158 // MOVED TO: PrintError.quark
46159 // Registers an error quark for #GtkPrintOperation if necessary.
46160 // RETURNS: The error quark used for #GtkPrintOperation errors.
46161 static GLib2.Quark print_error_quark()() nothrow {
46162 return gtk_print_error_quark();
46166 // VERSION: 2.10
46167 // Runs a page setup dialog, letting the user modify the values from
46168 // @page_setup. If the user cancels the dialog, the returned #GtkPageSetup
46169 // is identical to the passed in @page_setup, otherwise it contains the
46170 // modifications done in the dialog.
46172 // Note that this function may use a recursive mainloop to show the page
46173 // setup dialog. See gtk_print_run_page_setup_dialog_async() if this is
46174 // a problem.
46175 // RETURNS: a new #GtkPageSetup
46176 // <parent>: transient parent
46177 // <page_setup>: an existing #GtkPageSetup
46178 // <settings>: a #GtkPrintSettings
46179 static PageSetup* /*new*/ print_run_page_setup_dialog(AT0, AT1, AT2)(AT0 /*Window*/ parent, AT1 /*PageSetup*/ page_setup, AT2 /*PrintSettings*/ settings) nothrow {
46180 return gtk_print_run_page_setup_dialog(UpCast!(Window*)(parent), UpCast!(PageSetup*)(page_setup), UpCast!(PrintSettings*)(settings));
46184 // Unintrospectable function: print_run_page_setup_dialog_async() / gtk_print_run_page_setup_dialog_async()
46185 // VERSION: 2.10
46186 // Runs a page setup dialog, letting the user modify the values from @page_setup.
46188 // In contrast to gtk_print_run_page_setup_dialog(), this function returns after
46189 // showing the page setup dialog on platforms that support this, and calls @done_cb
46190 // from a signal handler for the ::response signal of the dialog.
46191 // <parent>: transient parent, or %NULL
46192 // <page_setup>: an existing #GtkPageSetup, or %NULL
46193 // <settings>: a #GtkPrintSettings
46194 // <done_cb>: a function to call when the user saves the modified page setup
46195 // <data>: user data to pass to @done_cb
46196 static void print_run_page_setup_dialog_async(AT0, AT1, AT2, AT3)(AT0 /*Window*/ parent, AT1 /*PageSetup*/ page_setup, AT2 /*PrintSettings*/ settings, PageSetupDoneFunc done_cb, AT3 /*void*/ data) nothrow {
46197 gtk_print_run_page_setup_dialog_async(UpCast!(Window*)(parent), UpCast!(PageSetup*)(page_setup), UpCast!(PrintSettings*)(settings), done_cb, UpCast!(void*)(data));
46201 // Sends an event to a widget, propagating the event to parent widgets
46202 // if the event remains unhandled. Events received by GTK+ from GDK
46203 // normally begin in gtk_main_do_event(). Depending on the type of
46204 // event, existence of modal dialogs, grabs, etc., the event may be
46205 // propagated; if so, this function is used. gtk_propagate_event()
46206 // calls gtk_widget_event() on each widget it decides to send the
46207 // event to. So gtk_widget_event() is the lowest-level function; it
46208 // simply emits the "event" and possibly an event-specific signal on a
46209 // widget. gtk_propagate_event() is a bit higher-level, and
46210 // gtk_main_do_event() is the highest level.
46212 // All that said, you most likely don't want to use any of these
46213 // functions; synthesizing events is rarely needed. Consider asking on
46214 // the mailing list for better ways to achieve your goals. For
46215 // example, use gdk_window_invalidate_rect() or
46216 // gtk_widget_queue_draw() instead of making up expose events.
46217 // <widget>: a #GtkWidget
46218 // <event>: an event
46219 static void propagate_event(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*Gdk2.Event*/ event) nothrow {
46220 gtk_propagate_event(UpCast!(Widget*)(widget), UpCast!(Gdk2.Event*)(event));
46223 // Unintrospectable function: quit_add() / gtk_quit_add()
46224 static uint quit_add(AT0)(uint main_level, Function function_, AT0 /*void*/ data) nothrow {
46225 return gtk_quit_add(main_level, function_, UpCast!(void*)(data));
46228 static void quit_add_destroy(AT0)(uint main_level, AT0 /*Object*/ object) nothrow {
46229 gtk_quit_add_destroy(main_level, UpCast!(Object*)(object));
46232 // Unintrospectable function: quit_add_full() / gtk_quit_add_full()
46233 static uint quit_add_full(AT0)(uint main_level, Function function_, CallbackMarshal marshal, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
46234 return gtk_quit_add_full(main_level, function_, marshal, UpCast!(void*)(data), destroy);
46237 static void quit_remove()(uint quit_handler_id) nothrow {
46238 gtk_quit_remove(quit_handler_id);
46241 static void quit_remove_by_data(AT0)(AT0 /*void*/ data) nothrow {
46242 gtk_quit_remove_by_data(UpCast!(void*)(data));
46245 static void rc_add_class_style(AT0, AT1)(AT0 /*RcStyle*/ rc_style, AT1 /*char*/ pattern) nothrow {
46246 gtk_rc_add_class_style(UpCast!(RcStyle*)(rc_style), toCString!(char*)(pattern));
46250 // Adds a file to the list of files to be parsed at the
46251 // end of gtk_init().
46252 // <filename>: the pathname to the file. If @filename is not absolute, it is searched in the current directory.
46253 static void rc_add_default_file(AT0)(AT0 /*char*/ filename) nothrow {
46254 gtk_rc_add_default_file(toCString!(char*)(filename));
46257 static void rc_add_widget_class_style(AT0, AT1)(AT0 /*RcStyle*/ rc_style, AT1 /*char*/ pattern) nothrow {
46258 gtk_rc_add_widget_class_style(UpCast!(RcStyle*)(rc_style), toCString!(char*)(pattern));
46261 static void rc_add_widget_name_style(AT0, AT1)(AT0 /*RcStyle*/ rc_style, AT1 /*char*/ pattern) nothrow {
46262 gtk_rc_add_widget_name_style(UpCast!(RcStyle*)(rc_style), toCString!(char*)(pattern));
46266 // Searches for a theme engine in the GTK+ search path. This function
46267 // is not useful for applications and should not be used.
46269 // otherwise %NULL.
46270 // RETURNS: The filename, if found (must be freed with g_free()),
46271 // <module_file>: name of a theme engine
46272 static char* /*new*/ rc_find_module_in_path(AT0)(AT0 /*char*/ module_file) nothrow {
46273 return gtk_rc_find_module_in_path(toCString!(char*)(module_file));
46277 // Looks up a file in pixmap path for the specified #GtkSettings.
46278 // If the file is not found, it outputs a warning message using
46279 // g_warning() and returns %NULL.
46280 // RETURNS: the filename.
46281 // <settings>: a #GtkSettings
46282 // <scanner>: Scanner used to get line number information for the warning message, or %NULL
46283 // <pixmap_file>: name of the pixmap file to locate.
46284 static char* /*new*/ rc_find_pixmap_in_path(AT0, AT1, AT2)(AT0 /*Settings*/ settings, AT1 /*GLib2.Scanner*/ scanner, AT2 /*char*/ pixmap_file) nothrow {
46285 return gtk_rc_find_pixmap_in_path(UpCast!(Settings*)(settings), UpCast!(GLib2.Scanner*)(scanner), toCString!(char*)(pixmap_file));
46289 // Retrieves the current list of RC files that will be parsed
46290 // at the end of gtk_init().
46292 // A %NULL-terminated array of filenames.
46293 // This memory is owned by GTK+ and must not be freed by the application.
46294 // If you want to store this information, you should make a copy.
46295 static char** rc_get_default_files()() nothrow {
46296 return gtk_rc_get_default_files();
46300 // Obtains the path to the IM modules file. See the documentation
46301 // of the <link linkend="im-module-file"><envar>GTK_IM_MODULE_FILE</envar></link>
46302 // environment variable for more details.
46303 // RETURNS: a newly-allocated string containing the name of the file listing the IM modules available for loading
46304 static char* /*new*/ rc_get_im_module_file()() nothrow {
46305 return gtk_rc_get_im_module_file();
46309 // Obtains the path in which to look for IM modules. See the documentation
46310 // of the <link linkend="im-module-path"><envar>GTK_PATH</envar></link>
46311 // environment variable for more details about looking up modules. This
46312 // function is useful solely for utilities supplied with GTK+ and should
46313 // not be used by applications under normal circumstances.
46314 // RETURNS: a newly-allocated string containing the path in which to look for IM modules.
46315 static char* /*new*/ rc_get_im_module_path()() nothrow {
46316 return gtk_rc_get_im_module_path();
46320 // Returns a directory in which GTK+ looks for theme engines.
46321 // For full information about the search for theme engines,
46322 // see the docs for <envar>GTK_PATH</envar> in
46323 // <xref linkend="gtk-running"/>.
46324 // RETURNS: the directory. (Must be freed with g_free())
46325 static char* /*new*/ rc_get_module_dir()() nothrow {
46326 return gtk_rc_get_module_dir();
46330 // Finds all matching RC styles for a given widget,
46331 // composites them together, and then creates a
46332 // #GtkStyle representing the composite appearance.
46333 // (GTK+ actually keeps a cache of previously
46334 // created styles, so a new style may not be
46335 // created.)
46337 // to the returned style, so if you want to save this
46338 // style around, you should add a reference yourself.
46339 // RETURNS: the resulting style. No refcount is added
46340 // <widget>: a #GtkWidget
46341 static Style* rc_get_style(AT0)(AT0 /*Widget*/ widget) nothrow {
46342 return gtk_rc_get_style(UpCast!(Widget*)(widget));
46346 // Creates up a #GtkStyle from styles defined in a RC file by providing
46347 // the raw components used in matching. This function may be useful
46348 // when creating pseudo-widgets that should be themed like widgets but
46349 // don't actually have corresponding GTK+ widgets. An example of this
46350 // would be items inside a GNOME canvas widget.
46352 // The action of gtk_rc_get_style() is similar to:
46353 // |[
46354 // gtk_widget_path (widget, NULL, &path, NULL);
46355 // gtk_widget_class_path (widget, NULL, &class_path, NULL);
46356 // gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget),
46357 // path, class_path,
46358 // G_OBJECT_TYPE (widget));
46359 // ]|
46361 // supplied paths, or %NULL if nothing matching was specified and the
46362 // default style should be used. The returned value is owned by GTK+
46363 // as part of an internal cache, so you must call g_object_ref() on
46364 // the returned value if you want to keep a reference to it.
46365 // RETURNS: A style created by matching with the
46366 // <settings>: a #GtkSettings object
46367 // <widget_path>: the widget path to use when looking up the style, or %NULL if no matching against the widget path should be done
46368 // <class_path>: the class path to use when looking up the style, or %NULL if no matching against the class path should be done.
46369 // <type>: a type that will be used along with parent types of this type when matching against class styles, or #G_TYPE_NONE
46370 static Style* rc_get_style_by_paths(AT0, AT1, AT2)(AT0 /*Settings*/ settings, AT1 /*char*/ widget_path, AT2 /*char*/ class_path, Type type) nothrow {
46371 return gtk_rc_get_style_by_paths(UpCast!(Settings*)(settings), toCString!(char*)(widget_path), toCString!(char*)(class_path), type);
46374 static char* /*new*/ rc_get_theme_dir()() nothrow {
46375 return gtk_rc_get_theme_dir();
46378 static void rc_parse(AT0)(AT0 /*char*/ filename) nothrow {
46379 gtk_rc_parse(toCString!(char*)(filename));
46383 // Parses a color in the <link linkend="color=format">format</link> expected
46384 // in a RC file.
46386 // Note that theme engines should use gtk_rc_parse_color_full() in
46387 // order to support symbolic colors.
46389 // that was expected but not found
46390 // RETURNS: %G_TOKEN_NONE if parsing succeeded, otherwise the token
46391 // <scanner>: a #GScanner
46392 // <color>: a pointer to a #GdkColor structure in which to store the result
46393 static uint rc_parse_color(AT0, AT1)(AT0 /*GLib2.Scanner*/ scanner, /*out*/ AT1 /*Gdk2.Color*/ color) nothrow {
46394 return gtk_rc_parse_color(UpCast!(GLib2.Scanner*)(scanner), UpCast!(Gdk2.Color*)(color));
46398 // VERSION: 2.12
46399 // Parses a color in the <link linkend="color=format">format</link> expected
46400 // in a RC file. If @style is not %NULL, it will be consulted to resolve
46401 // references to symbolic colors.
46403 // that was expected but not found
46404 // RETURNS: %G_TOKEN_NONE if parsing succeeded, otherwise the token
46405 // <scanner>: a #GScanner
46406 // <style>: a #GtkRcStyle, or %NULL
46407 // <color>: a pointer to a #GdkColor structure in which to store the result
46408 static uint rc_parse_color_full(AT0, AT1, AT2)(AT0 /*GLib2.Scanner*/ scanner, AT1 /*RcStyle*/ style, /*out*/ AT2 /*Gdk2.Color*/ color) nothrow {
46409 return gtk_rc_parse_color_full(UpCast!(GLib2.Scanner*)(scanner), UpCast!(RcStyle*)(style), UpCast!(Gdk2.Color*)(color));
46412 static uint rc_parse_priority(AT0, AT1)(AT0 /*GLib2.Scanner*/ scanner, AT1 /*PathPriorityType*/ priority) nothrow {
46413 return gtk_rc_parse_priority(UpCast!(GLib2.Scanner*)(scanner), UpCast!(PathPriorityType*)(priority));
46416 static uint rc_parse_state(AT0, AT1)(AT0 /*GLib2.Scanner*/ scanner, AT1 /*StateType*/ state) nothrow {
46417 return gtk_rc_parse_state(UpCast!(GLib2.Scanner*)(scanner), UpCast!(StateType*)(state));
46420 static void rc_parse_string(AT0)(AT0 /*char*/ rc_string) nothrow {
46421 gtk_rc_parse_string(toCString!(char*)(rc_string));
46425 // MOVED TO: RcProperty.parse_border
46426 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
46427 // or gtk_widget_class_install_style_property_parser() which parses
46428 // borders in the form
46429 // <literal>"{ left, right, top, bottom }"</literal> for integers
46430 // %left, %right, %top and %bottom.
46432 // has been set to the resulting #GtkBorder.
46433 // RETURNS: %TRUE if @gstring could be parsed and @property_value
46434 // <pspec>: a #GParamSpec
46435 // <gstring>: the #GString to be parsed
46436 // <property_value>: a #GValue which must hold boxed values.
46437 static int rc_property_parse_border(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
46438 return gtk_rc_property_parse_border(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
46442 // MOVED TO: RcProperty.parse_color
46443 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
46444 // or gtk_widget_class_install_style_property_parser() which parses a
46445 // color given either by its name or in the form
46446 // <literal>{ red, green, blue }</literal> where %red, %green and
46447 // %blue are integers between 0 and 65535 or floating-point numbers
46448 // between 0 and 1.
46450 // has been set to the resulting #GdkColor.
46451 // RETURNS: %TRUE if @gstring could be parsed and @property_value
46452 // <pspec>: a #GParamSpec
46453 // <gstring>: the #GString to be parsed
46454 // <property_value>: a #GValue which must hold #GdkColor values.
46455 static int rc_property_parse_color(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
46456 return gtk_rc_property_parse_color(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
46460 // MOVED TO: RcProperty.parse_enum
46461 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
46462 // or gtk_widget_class_install_style_property_parser() which parses a single
46463 // enumeration value.
46465 // The enumeration value can be specified by its name, its nickname or
46466 // its numeric value. For consistency with flags parsing, the value
46467 // may be surrounded by parentheses.
46469 // has been set to the resulting #GEnumValue.
46470 // RETURNS: %TRUE if @gstring could be parsed and @property_value
46471 // <pspec>: a #GParamSpec
46472 // <gstring>: the #GString to be parsed
46473 // <property_value>: a #GValue which must hold enum values.
46474 static int rc_property_parse_enum(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
46475 return gtk_rc_property_parse_enum(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
46479 // MOVED TO: RcProperty.parse_flags
46480 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
46481 // or gtk_widget_class_install_style_property_parser() which parses flags.
46483 // Flags can be specified by their name, their nickname or
46484 // numerically. Multiple flags can be specified in the form
46485 // <literal>"( flag1 | flag2 | ... )"</literal>.
46487 // has been set to the resulting flags value.
46488 // RETURNS: %TRUE if @gstring could be parsed and @property_value
46489 // <pspec>: a #GParamSpec
46490 // <gstring>: the #GString to be parsed
46491 // <property_value>: a #GValue which must hold flags values.
46492 static int rc_property_parse_flags(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
46493 return gtk_rc_property_parse_flags(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
46497 // MOVED TO: RcProperty.parse_requisition
46498 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
46499 // or gtk_widget_class_install_style_property_parser() which parses a
46500 // requisition in the form
46501 // <literal>"{ width, height }"</literal> for integers %width and %height.
46503 // has been set to the resulting #GtkRequisition.
46504 // RETURNS: %TRUE if @gstring could be parsed and @property_value
46505 // <pspec>: a #GParamSpec
46506 // <gstring>: the #GString to be parsed
46507 // <property_value>: a #GValue which must hold boxed values.
46508 static int rc_property_parse_requisition(AT0, AT1, AT2)(AT0 /*GObject2.ParamSpec*/ pspec, AT1 /*GLib2.String*/ gstring, AT2 /*GObject2.Value*/ property_value) nothrow {
46509 return gtk_rc_property_parse_requisition(UpCast!(GObject2.ParamSpec*)(pspec), UpCast!(GLib2.String*)(gstring), UpCast!(GObject2.Value*)(property_value));
46513 // If the modification time on any previously read file for the
46514 // default #GtkSettings has changed, discard all style information
46515 // and then reread all previously read RC files.
46516 // RETURNS: %TRUE if the files were reread.
46517 static int rc_reparse_all()() nothrow {
46518 return gtk_rc_reparse_all();
46522 // If the modification time on any previously read file
46523 // for the given #GtkSettings has changed, discard all style information
46524 // and then reread all previously read RC files.
46525 // RETURNS: %TRUE if the files were reread.
46526 // <settings>: a #GtkSettings
46527 // <force_load>: load whether or not anything changed
46528 static int rc_reparse_all_for_settings(AT0)(AT0 /*Settings*/ settings, int force_load) nothrow {
46529 return gtk_rc_reparse_all_for_settings(UpCast!(Settings*)(settings), force_load);
46533 // VERSION: 2.4
46534 // This function recomputes the styles for all widgets that use a
46535 // particular #GtkSettings object. (There is one #GtkSettings object
46536 // per #GdkScreen, see gtk_settings_get_for_screen()); It is useful
46537 // when some global parameter has changed that affects the appearance
46538 // of all widgets, because when a widget gets a new style, it will
46539 // both redraw and recompute any cached information about its
46540 // appearance. As an example, it is used when the default font size
46541 // set by the operating system changes. Note that this function
46542 // doesn't affect widgets that have a style set explicitely on them
46543 // with gtk_widget_set_style().
46544 // <settings>: a #GtkSettings
46545 static void rc_reset_styles(AT0)(AT0 /*Settings*/ settings) nothrow {
46546 gtk_rc_reset_styles(UpCast!(Settings*)(settings));
46549 // Unintrospectable function: rc_scanner_new() / gtk_rc_scanner_new()
46550 static GLib2.Scanner* rc_scanner_new()() nothrow {
46551 return gtk_rc_scanner_new();
46555 // Sets the list of files that GTK+ will read at the
46556 // end of gtk_init().
46557 // <filenames>: A %NULL-terminated list of filenames.
46558 static void rc_set_default_files(AT0)(AT0 /*char**/ filenames) nothrow {
46559 gtk_rc_set_default_files(toCString!(char**)(filenames));
46562 // MOVED TO: RecentChooserError.quark
46563 static GLib2.Quark recent_chooser_error_quark()() nothrow {
46564 return gtk_recent_chooser_error_quark();
46567 // MOVED TO: RecentManagerError.quark
46568 static GLib2.Quark recent_manager_error_quark()() nothrow {
46569 return gtk_recent_manager_error_quark();
46573 // VERSION: 2.14
46574 // Converts a color from RGB space to HSV.
46575 // Input values must be in the [0.0, 1.0] range;
46576 // output values will be in the same range.
46577 // <r>: Red
46578 // <g>: Green
46579 // <b>: Blue
46580 // <h>: Return value for the hue component
46581 // <s>: Return value for the saturation component
46582 // <v>: Return value for the value component
46583 static void rgb_to_hsv(AT0, AT1, AT2)(double r, double g, double b, /*out*/ AT0 /*double*/ h, /*out*/ AT1 /*double*/ s, /*out*/ AT2 /*double*/ v) nothrow {
46584 gtk_rgb_to_hsv(r, g, b, UpCast!(double*)(h), UpCast!(double*)(s), UpCast!(double*)(v));
46588 // Appends a specified target to the list of supported targets for a
46589 // given widget and selection.
46590 // <widget>: a #GtkTarget
46591 // <selection>: the selection
46592 // <target>: target to add.
46593 // <info>: A unsigned integer which will be passed back to the application.
46594 static void selection_add_target(AT0)(AT0 /*Widget*/ widget, Gdk2.Atom selection, Gdk2.Atom target, uint info) nothrow {
46595 gtk_selection_add_target(UpCast!(Widget*)(widget), selection, target, info);
46599 // Prepends a table of targets to the list of supported targets
46600 // for a given widget and selection.
46601 // <widget>: a #GtkWidget
46602 // <selection>: the selection
46603 // <targets>: a table of targets to add
46604 // <ntargets>: number of entries in @targets
46605 static void selection_add_targets(AT0, AT1)(AT0 /*Widget*/ widget, Gdk2.Atom selection, AT1 /*TargetEntry*/ targets, uint ntargets) nothrow {
46606 gtk_selection_add_targets(UpCast!(Widget*)(widget), selection, UpCast!(TargetEntry*)(targets), ntargets);
46610 // VERSION: 2.2
46611 // DEPRECATED (v2.4) function: selection_clear - Instead of calling this function, chain up from
46612 // The default handler for the #GtkWidget::selection-clear-event
46613 // signal.
46617 // your selection-clear-event handler. Calling this function
46618 // from any other context is illegal.
46619 // RETURNS: %TRUE if the event was handled, otherwise false
46620 // <widget>: a #GtkWidget
46621 // <event>: the event
46622 static int selection_clear(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*Gdk2.EventSelection*/ event) nothrow {
46623 return gtk_selection_clear(UpCast!(Widget*)(widget), UpCast!(Gdk2.EventSelection*)(event));
46627 // Remove all targets registered for the given selection for the
46628 // widget.
46629 // <widget>: a #GtkWidget
46630 // <selection>: an atom representing a selection
46631 static void selection_clear_targets(AT0)(AT0 /*Widget*/ widget, Gdk2.Atom selection) nothrow {
46632 gtk_selection_clear_targets(UpCast!(Widget*)(widget), selection);
46636 // Requests the contents of a selection. When received,
46637 // a "selection-received" signal will be generated.
46639 // request. (e.g., there was already a request in process for
46640 // this widget).
46641 // RETURNS: %TRUE if requested succeeded. %FALSE if we could not process
46642 // <widget>: The widget which acts as requestor
46643 // <selection>: Which selection to get
46644 // <target>: Form of information desired (e.g., STRING)
46645 // <time_>: Time of request (usually of triggering event)
46646 static int selection_convert(AT0)(AT0 /*Widget*/ widget, Gdk2.Atom selection, Gdk2.Atom target, uint time_) nothrow {
46647 return gtk_selection_convert(UpCast!(Widget*)(widget), selection, target, time_);
46651 // Claims ownership of a given selection for a particular widget,
46652 // or, if @widget is %NULL, release ownership of the selection.
46653 // RETURNS: %TRUE if the operation succeeded
46654 // <widget>: a #GtkWidget, or %NULL.
46655 // <selection>: an interned atom representing the selection to claim
46656 // <time_>: timestamp with which to claim the selection
46657 static int selection_owner_set(AT0)(AT0 /*Widget*/ widget, Gdk2.Atom selection, uint time_) nothrow {
46658 return gtk_selection_owner_set(UpCast!(Widget*)(widget), selection, time_);
46662 // VERSION: 2.2
46663 // Claim ownership of a given selection for a particular widget, or,
46664 // if @widget is %NULL, release ownership of the selection.
46665 // RETURNS: TRUE if the operation succeeded
46666 // <display>: the #Gdkdisplay where the selection is set
46667 // <widget>: new selection owner (a #GdkWidget), or %NULL.
46668 // <selection>: an interned atom representing the selection to claim.
46669 // <time_>: timestamp with which to claim the selection
46670 static int selection_owner_set_for_display(AT0, AT1)(AT0 /*Gdk2.Display*/ display, AT1 /*Widget*/ widget, Gdk2.Atom selection, uint time_) nothrow {
46671 return gtk_selection_owner_set_for_display(UpCast!(Gdk2.Display*)(display), UpCast!(Widget*)(widget), selection, time_);
46675 // Removes all handlers and unsets ownership of all
46676 // selections for a widget. Called when widget is being
46677 // destroyed. This function will not generally be
46678 // called by applications.
46679 // <widget>: a #GtkWidget
46680 static void selection_remove_all(AT0)(AT0 /*Widget*/ widget) nothrow {
46681 gtk_selection_remove_all(UpCast!(Widget*)(widget));
46685 // DEPRECATED (v2.24) function: set_locale - Use setlocale() directly
46686 // Initializes internationalization support for GTK+. gtk_init()
46687 // automatically does this, so there is typically no point
46688 // in calling this function.
46690 // If you are calling this function because you changed the locale
46691 // after GTK+ is was initialized, then calling this function
46692 // may help a bit. (Note, however, that changing the locale
46693 // after GTK+ is initialized may produce inconsistent results and
46694 // is not really supported.)
46696 // In detail - sets the current locale according to the
46697 // program environment. This is the same as calling the C library function
46698 // <literal>setlocale (LC_ALL, "")</literal> but also takes care of the
46699 // locale specific setup of the windowing system used by GDK.
46701 // form lang_COUNTRY, where lang is an ISO-639 language code, and
46702 // COUNTRY is an ISO-3166 country code. On Unix, this form matches the
46703 // result of the setlocale(); it is also used on other machines, such as
46704 // Windows, where the C library returns a different result. The string is
46705 // owned by GTK+ and should not be modified or freed.
46706 // RETURNS: a string corresponding to the locale set, typically in the
46707 static char* /*new*/ set_locale()() nothrow {
46708 return gtk_set_locale();
46712 // Unintrospectable function: show_about_dialog() / gtk_show_about_dialog()
46713 // VERSION: 2.6
46714 // This is a convenience function for showing an application's about box.
46715 // The constructed dialog is associated with the parent window and
46716 // reused for future invocations of this function.
46717 // <parent>: transient parent, or %NULL for none
46718 // <first_property_name>: the name of the first property
46719 alias gtk_show_about_dialog show_about_dialog; // Variadic
46722 // VERSION: 2.14
46723 // This is a convenience function for launching the default application
46724 // to show the uri. The uri must be of a form understood by GIO (i.e. you
46725 // need to install gvfs to get support for uri schemes such as http://
46726 // or ftp://, as only local files are handled by GIO itself).
46727 // Typical examples are
46728 // <simplelist>
46729 // <member><filename>file:///home/gnome/pict.jpg</filename></member>
46730 // <member><filename>http://www.gnome.org</filename></member>
46731 // <member><filename>mailto:me&commat;gnome.org</filename></member>
46732 // </simplelist>
46733 // Ideally the timestamp is taken from the event triggering
46734 // the gtk_show_uri() call. If timestamp is not known you can take
46735 // %GDK_CURRENT_TIME.
46737 // This function can be used as a replacement for gnome_vfs_url_show()
46738 // and gnome_url_show().
46739 // RETURNS: %TRUE on success, %FALSE on error.
46740 // <screen>: screen to show the uri on or %NULL for the default screen
46741 // <uri>: the uri to show
46742 // <timestamp>: a timestamp to prevent focus stealing.
46743 static int show_uri(AT0, AT1, AT2)(AT0 /*Gdk2.Screen*/ screen, AT1 /*char*/ uri, uint timestamp, AT2 /*GLib2.Error**/ error=null) nothrow {
46744 return gtk_show_uri(UpCast!(Gdk2.Screen*)(screen), toCString!(char*)(uri), timestamp, UpCast!(GLib2.Error**)(error));
46747 // Unintrospectable function: signal_compat_matched() / gtk_signal_compat_matched()
46748 static void signal_compat_matched(AT0, AT1)(AT0 /*Object*/ object, GObject2.Callback func, AT1 /*void*/ data, GObject2.SignalMatchType match, uint action) nothrow {
46749 gtk_signal_compat_matched(UpCast!(Object*)(object), func, UpCast!(void*)(data), match, action);
46752 // Unintrospectable function: signal_connect_full() / gtk_signal_connect_full()
46753 static c_ulong signal_connect_full(AT0, AT1, AT2)(AT0 /*Object*/ object, AT1 /*char*/ name, GObject2.Callback func, CallbackMarshal unsupported, AT2 /*void*/ data, GLib2.DestroyNotify destroy_func, int object_signal, int after) nothrow {
46754 return gtk_signal_connect_full(UpCast!(Object*)(object), toCString!(char*)(name), func, unsupported, UpCast!(void*)(data), destroy_func, object_signal, after);
46757 // Unintrospectable function: signal_connect_object_while_alive() / gtk_signal_connect_object_while_alive()
46758 static void signal_connect_object_while_alive(AT0, AT1, AT2)(AT0 /*Object*/ object, AT1 /*char*/ name, GObject2.Callback func, AT2 /*Object*/ alive_object) nothrow {
46759 gtk_signal_connect_object_while_alive(UpCast!(Object*)(object), toCString!(char*)(name), func, UpCast!(Object*)(alive_object));
46762 // Unintrospectable function: signal_connect_while_alive() / gtk_signal_connect_while_alive()
46763 static void signal_connect_while_alive(AT0, AT1, AT2, AT3)(AT0 /*Object*/ object, AT1 /*char*/ name, GObject2.Callback func, AT2 /*void*/ func_data, AT3 /*Object*/ alive_object) nothrow {
46764 gtk_signal_connect_while_alive(UpCast!(Object*)(object), toCString!(char*)(name), func, UpCast!(void*)(func_data), UpCast!(Object*)(alive_object));
46767 // Unintrospectable function: signal_emit() / gtk_signal_emit()
46768 alias gtk_signal_emit signal_emit; // Variadic
46770 // Unintrospectable function: signal_emit_by_name() / gtk_signal_emit_by_name()
46771 alias gtk_signal_emit_by_name signal_emit_by_name; // Variadic
46773 static void signal_emit_stop_by_name(AT0, AT1)(AT0 /*Object*/ object, AT1 /*char*/ name) nothrow {
46774 gtk_signal_emit_stop_by_name(UpCast!(Object*)(object), toCString!(char*)(name));
46777 static void signal_emitv(AT0, AT1)(AT0 /*Object*/ object, uint signal_id, AT1 /*Arg*/ args) nothrow {
46778 gtk_signal_emitv(UpCast!(Object*)(object), signal_id, UpCast!(Arg*)(args));
46781 static void signal_emitv_by_name(AT0, AT1, AT2)(AT0 /*Object*/ object, AT1 /*char*/ name, AT2 /*Arg*/ args) nothrow {
46782 gtk_signal_emitv_by_name(UpCast!(Object*)(object), toCString!(char*)(name), UpCast!(Arg*)(args));
46785 // Unintrospectable function: signal_new() / gtk_signal_new()
46786 alias gtk_signal_new signal_new; // Variadic
46788 static uint signal_newv(AT0, AT1)(AT0 /*char*/ name, SignalRunType signal_flags, Type object_type, uint function_offset, GObject2.SignalCMarshaller marshaller, Type return_val, uint n_args, AT1 /*Type*/ args) nothrow {
46789 return gtk_signal_newv(toCString!(char*)(name), signal_flags, object_type, function_offset, marshaller, return_val, n_args, UpCast!(Type*)(args));
46793 // Registers each of the stock items in @items. If an item already
46794 // exists with the same stock ID as one of the @items, the old item
46795 // gets replaced. The stock items are copied, so GTK+ does not hold
46796 // any pointer into @items and @items can be freed. Use
46797 // gtk_stock_add_static() if @items is persistent and GTK+ need not
46798 // copy the array.
46799 // <items>: a #GtkStockItem or array of items
46800 // <n_items>: number of #GtkStockItem in @items
46801 static void stock_add(AT0)(AT0 /*StockItem*/ items, uint n_items) nothrow {
46802 gtk_stock_add(UpCast!(StockItem*)(items), n_items);
46806 // Same as gtk_stock_add(), but doesn't copy @items, so
46807 // @items must persist until application exit.
46808 // <items>: a #GtkStockItem or array of #GtkStockItem
46809 // <n_items>: number of items
46810 static void stock_add_static(AT0)(AT0 /*StockItem*/ items, uint n_items) nothrow {
46811 gtk_stock_add_static(UpCast!(StockItem*)(items), n_items);
46815 // Retrieves a list of all known stock IDs added to a #GtkIconFactory
46816 // or registered with gtk_stock_add(). The list must be freed with g_slist_free(),
46817 // and each string in the list must be freed with g_free().
46818 // RETURNS: a list of known stock IDs
46819 static GLib2.SList* /*new*/ stock_list_ids()() nothrow {
46820 return gtk_stock_list_ids();
46824 // Fills @item with the registered values for @stock_id, returning %TRUE
46825 // if @stock_id was known.
46826 // RETURNS: %TRUE if @item was initialized
46827 // <stock_id>: a stock item name
46828 // <item>: stock item to initialize with values
46829 static int stock_lookup(AT0, AT1)(AT0 /*char*/ stock_id, /*out*/ AT1 /*StockItem*/ item) nothrow {
46830 return gtk_stock_lookup(toCString!(char*)(stock_id), UpCast!(StockItem*)(item));
46834 // VERSION: 2.8
46835 // Sets a function to be used for translating the @label of
46836 // a stock item.
46838 // If no function is registered for a translation domain,
46839 // g_dgettext() is used.
46841 // The function is used for all stock items whose
46842 // @translation_domain matches @domain. Note that it is possible
46843 // to use strings different from the actual gettext translation domain
46844 // of your application for this, as long as your #GtkTranslateFunc uses
46845 // the correct domain when calling dgettext(). This can be useful, e.g.
46846 // when dealing with message contexts:
46848 // |[
46849 // GtkStockItem items[] = {
46850 // { MY_ITEM1, NC_("odd items", "Item 1"), 0, 0, "odd-item-domain" },
46851 // { MY_ITEM2, NC_("even items", "Item 2"), 0, 0, "even-item-domain" },
46852 // };
46854 // gchar *
46855 // my_translate_func (const gchar *msgid,
46856 // gpointer data)
46857 // {
46858 // gchar *msgctxt = data;
46860 // return (gchar*)g_dpgettext2 (GETTEXT_PACKAGE, msgctxt, msgid);
46861 // }
46863 // /&ast; ... &ast;/
46865 // gtk_stock_add (items, G_N_ELEMENTS (items));
46866 // gtk_stock_set_translate_func ("odd-item-domain", my_translate_func, "odd items");
46867 // gtk_stock_set_translate_func ("even-item-domain", my_translate_func, "even items");
46868 // ]|
46869 // <domain>: the translation domain for which @func shall be used
46870 // <func>: a #GtkTranslateFunc
46871 // <data>: data to pass to @func
46872 // <notify>: a #GDestroyNotify that is called when @data is no longer needed
46873 static void stock_set_translate_func(AT0, AT1)(AT0 /*char*/ domain, TranslateFunc func, AT1 /*void*/ data, GLib2.DestroyNotify notify) nothrow {
46874 gtk_stock_set_translate_func(toCString!(char*)(domain), func, UpCast!(void*)(data), notify);
46878 // VERSION: 2.10
46879 // This function frees a target table as returned by
46880 // gtk_target_table_new_from_list()
46881 // <targets>: a #GtkTargetEntry array
46882 // <n_targets>: the number of entries in the array
46883 static void target_table_free(AT0)(AT0 /*TargetEntry*/ targets, int n_targets) nothrow {
46884 gtk_target_table_free(UpCast!(TargetEntry*)(targets), n_targets);
46888 // VERSION: 2.10
46889 // This function creates an #GtkTargetEntry array that contains the
46890 // same targets as the passed %list. The returned table is newly
46891 // allocated and should be freed using gtk_target_table_free() when no
46892 // longer needed.
46893 // RETURNS: the new table.
46894 // <list>: a #GtkTargetList
46895 // <n_targets>: return location for the number ot targets in the table
46896 static TargetEntry* /*new*/ target_table_new_from_list(AT0)(AT0 /*TargetList*/ list, /*out*/ int* n_targets) nothrow {
46897 return gtk_target_table_new_from_list(UpCast!(TargetList*)(list), n_targets);
46901 // VERSION: 2.10
46902 // Determines if any of the targets in @targets can be used to
46903 // provide a #GdkPixbuf.
46905 // otherwise %FALSE.
46906 // RETURNS: %TRUE if @targets include a suitable target for images,
46907 // <targets>: an array of #GdkAtom<!-- -->s
46908 // <n_targets>: the length of @targets
46909 // <writable>: whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format
46910 static int targets_include_image(AT0)(AT0 /*Gdk2.Atom*/ targets, int n_targets, int writable) nothrow {
46911 return gtk_targets_include_image(UpCast!(Gdk2.Atom*)(targets), n_targets, writable);
46915 // VERSION: 2.10
46916 // Determines if any of the targets in @targets can be used to
46917 // provide rich text.
46919 // otherwise %FALSE.
46920 // RETURNS: %TRUE if @targets include a suitable target for rich text,
46921 // <targets>: an array of #GdkAtom<!-- -->s
46922 // <n_targets>: the length of @targets
46923 // <buffer>: a #GtkTextBuffer
46924 static int targets_include_rich_text(AT0, AT1)(AT0 /*Gdk2.Atom*/ targets, int n_targets, AT1 /*TextBuffer*/ buffer) nothrow {
46925 return gtk_targets_include_rich_text(UpCast!(Gdk2.Atom*)(targets), n_targets, UpCast!(TextBuffer*)(buffer));
46929 // VERSION: 2.10
46930 // Determines if any of the targets in @targets can be used to
46931 // provide text.
46933 // otherwise %FALSE.
46934 // RETURNS: %TRUE if @targets include a suitable target for text,
46935 // <targets>: an array of #GdkAtom<!-- -->s
46936 // <n_targets>: the length of @targets
46937 static int targets_include_text(AT0)(AT0 /*Gdk2.Atom*/ targets, int n_targets) nothrow {
46938 return gtk_targets_include_text(UpCast!(Gdk2.Atom*)(targets), n_targets);
46942 // VERSION: 2.10
46943 // Determines if any of the targets in @targets can be used to
46944 // provide an uri list.
46946 // otherwise %FALSE.
46947 // RETURNS: %TRUE if @targets include a suitable target for uri lists,
46948 // <targets>: an array of #GdkAtom<!-- -->s
46949 // <n_targets>: the length of @targets
46950 static int targets_include_uri(AT0)(AT0 /*Gdk2.Atom*/ targets, int n_targets) nothrow {
46951 return gtk_targets_include_uri(UpCast!(Gdk2.Atom*)(targets), n_targets);
46955 // VERSION: 2.14
46956 // Create a simple window with window title @window_title and
46957 // text contents @dialog_text.
46958 // The window will quit any running gtk_main()-loop when destroyed, and it
46959 // will automatically be destroyed upon test function teardown.
46960 // RETURNS: a widget pointer to the newly created GtkWindow.
46961 // <window_title>: Title of the window to be displayed.
46962 // <dialog_text>: Text inside the window to be displayed.
46963 static Widget* test_create_simple_window(AT0, AT1)(AT0 /*char*/ window_title, AT1 /*char*/ dialog_text) nothrow {
46964 return gtk_test_create_simple_window(toCString!(char*)(window_title), toCString!(char*)(dialog_text));
46968 // Unintrospectable function: test_create_widget() / gtk_test_create_widget()
46969 // VERSION: 2.14
46970 // This function wraps g_object_new() for widget types.
46971 // It'll automatically show all created non window widgets, also
46972 // g_object_ref_sink() them (to keep them alive across a running test)
46973 // and set them up for destruction during the next test teardown phase.
46974 // RETURNS: a newly created widget.
46975 // <widget_type>: a valid widget type.
46976 // <first_property_name>: Name of first property to set or %NULL
46977 alias gtk_test_create_widget test_create_widget; // Variadic
46980 // Unintrospectable function: test_display_button_window() / gtk_test_display_button_window()
46981 // VERSION: 2.14
46982 // Create a window with window title @window_title, text contents @dialog_text,
46983 // and a number of buttons, according to the paired argument list given
46984 // as @... parameters.
46985 // Each button is created with a @label and a ::clicked signal handler that
46986 // incremrents the integer stored in @nump.
46987 // The window will be automatically shown with gtk_widget_show_now() after
46988 // creation, so when this function returns it has already been mapped,
46989 // resized and positioned on screen.
46990 // The window will quit any running gtk_main()-loop when destroyed, and it
46991 // will automatically be destroyed upon test function teardown.
46992 // RETURNS: a widget pointer to the newly created GtkWindow.
46993 // <window_title>: Title of the window to be displayed.
46994 // <dialog_text>: Text inside the window to be displayed.
46995 alias gtk_test_display_button_window test_display_button_window; // Variadic
46998 // VERSION: 2.14
46999 // This function will search @widget and all its descendants for a GtkLabel
47000 // widget with a text string matching @label_pattern.
47001 // The @label_pattern may contain asterisks '*' and question marks '?' as
47002 // placeholders, g_pattern_match() is used for the matching.
47003 // Note that locales other than "C" tend to alter (translate" label strings,
47004 // so this function is genrally only useful in test programs with
47005 // predetermined locales, see gtk_test_init() for more details.
47006 // RETURNS: a GtkLabel widget if any is found.
47007 // <widget>: Valid label or container widget.
47008 // <label_pattern>: Shell-glob pattern to match a label string.
47009 static Widget* test_find_label(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*char*/ label_pattern) nothrow {
47010 return gtk_test_find_label(UpCast!(Widget*)(widget), toCString!(char*)(label_pattern));
47014 // VERSION: 2.14
47015 // This function will search siblings of @base_widget and siblings of its
47016 // ancestors for all widgets matching @widget_type.
47017 // Of the matching widgets, the one that is geometrically closest to
47018 // @base_widget will be returned.
47019 // The general purpose of this function is to find the most likely "action"
47020 // widget, relative to another labeling widget. Such as finding a
47021 // button or text entry widget, given it's corresponding label widget.
47022 // RETURNS: a widget of type @widget_type if any is found.
47023 // <base_widget>: Valid widget, part of a widget hierarchy
47024 // <widget_type>: Type of a aearched for sibling widget
47025 static Widget* test_find_sibling(AT0)(AT0 /*Widget*/ base_widget, Type widget_type) nothrow {
47026 return gtk_test_find_sibling(UpCast!(Widget*)(base_widget), widget_type);
47030 // VERSION: 2.14
47031 // This function will search the descendants of @widget for a widget
47032 // of type @widget_type that has a label matching @label_pattern next
47033 // to it. This is most useful for automated GUI testing, e.g. to find
47034 // the "OK" button in a dialog and synthesize clicks on it.
47035 // However see gtk_test_find_label(), gtk_test_find_sibling() and
47036 // gtk_test_widget_click() for possible caveats involving the search of
47037 // such widgets and synthesizing widget events.
47038 // RETURNS: a valid widget if any is found or %NULL.
47039 // <widget>: Container widget, usually a GtkWindow.
47040 // <label_pattern>: Shell-glob pattern to match a label string.
47041 // <widget_type>: Type of a aearched for label sibling widget.
47042 static Widget* test_find_widget(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*char*/ label_pattern, Type widget_type) nothrow {
47043 return gtk_test_find_widget(UpCast!(Widget*)(widget), toCString!(char*)(label_pattern), widget_type);
47047 // Unintrospectable function: test_init() / gtk_test_init()
47048 // VERSION: 2.14
47049 // This function is used to initialize a GTK+ test program.
47051 // It will in turn call g_test_init() and gtk_init() to properly
47052 // initialize the testing framework and graphical toolkit. It'll
47053 // also set the program's locale to "C" and prevent loading of rc
47054 // files and Gtk+ modules. This is done to make tets program
47055 // environments as deterministic as possible.
47057 // Like gtk_init() and g_test_init(), any known arguments will be
47058 // processed and stripped from @argc and @argv.
47059 // <argcp>: Address of the <parameter>argc</parameter> parameter of the main() function. Changed if any arguments were handled.
47060 // <argvp>: Address of the <parameter>argv</parameter> parameter of main(). Any parameters understood by g_test_init() or gtk_init() are stripped before return.
47061 alias gtk_test_init test_init; // Variadic
47064 // VERSION: 2.14
47065 // Return the type ids that have been registered after
47066 // calling gtk_test_register_all_types().
47067 // RETURNS: 0-terminated array of type ids
47068 // <n_types>: location to store number of types
47069 static Type* test_list_all_types(AT0)(/*out*/ AT0 /*uint*/ n_types) nothrow {
47070 return gtk_test_list_all_types(UpCast!(uint*)(n_types));
47074 // VERSION: 2.14
47075 // Force registration of all core Gtk+ and Gdk object types.
47076 // This allowes to refer to any of those object types via
47077 // g_type_from_name() after calling this function.
47078 static void test_register_all_types()() nothrow {
47079 gtk_test_register_all_types();
47083 // VERSION: 2.14
47084 // Retrive the literal adjustment value for GtkRange based
47085 // widgets and spin buttons. Note that the value returned by
47086 // this function is anything between the lower and upper bounds
47087 // of the adjustment belonging to @widget, and is not a percentage
47088 // as passed in to gtk_test_slider_set_perc().
47089 // RETURNS: adjustment->value for an adjustment belonging to @widget.
47090 // <widget>: valid widget pointer.
47091 static double test_slider_get_value(AT0)(AT0 /*Widget*/ widget) nothrow {
47092 return gtk_test_slider_get_value(UpCast!(Widget*)(widget));
47096 // VERSION: 2.14
47097 // This function will adjust the slider position of all GtkRange
47098 // based widgets, such as scrollbars or scales, it'll also adjust
47099 // spin buttons. The adjustment value of these widgets is set to
47100 // a value between the lower and upper limits, according to the
47101 // @percentage argument.
47102 // <widget>: valid widget pointer.
47103 // <percentage>: value between 0 and 100.
47104 static void test_slider_set_perc(AT0)(AT0 /*Widget*/ widget, double percentage) nothrow {
47105 gtk_test_slider_set_perc(UpCast!(Widget*)(widget), percentage);
47109 // VERSION: 2.14
47110 // This function will generate a @button click in the upwards or downwards
47111 // spin button arrow areas, usually leading to an increase or decrease of
47112 // spin button's value.
47113 // RETURNS: wether all actions neccessary for the button click simulation were carried out successfully.
47114 // <spinner>: valid GtkSpinButton widget.
47115 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
47116 // <upwards>: %TRUE for upwards arrow click, %FALSE for downwards arrow click.
47117 static int test_spin_button_click(AT0)(AT0 /*SpinButton*/ spinner, uint button, int upwards) nothrow {
47118 return gtk_test_spin_button_click(UpCast!(SpinButton*)(spinner), button, upwards);
47122 // VERSION: 2.14
47123 // Retrive the text string of @widget if it is a GtkLabel,
47124 // GtkEditable (entry and text widgets) or GtkTextView.
47125 // RETURNS: new 0-terminated C string, needs to be released with g_free().
47126 // <widget>: valid widget pointer.
47127 static char* /*new*/ test_text_get(AT0)(AT0 /*Widget*/ widget) nothrow {
47128 return gtk_test_text_get(UpCast!(Widget*)(widget));
47132 // VERSION: 2.14
47133 // Set the text string of @widget to @string if it is a GtkLabel,
47134 // GtkEditable (entry and text widgets) or GtkTextView.
47135 // <widget>: valid widget pointer.
47136 // <string>: a 0-terminated C string
47137 static void test_text_set(AT0, AT1)(AT0 /*Widget*/ widget, AT1 /*char*/ string_) nothrow {
47138 gtk_test_text_set(UpCast!(Widget*)(widget), toCString!(char*)(string_));
47142 // VERSION: 2.14
47143 // This function will generate a @button click (button press and button
47144 // release event) in the middle of the first GdkWindow found that belongs
47145 // to @widget.
47146 // For %GTK_NO_WINDOW widgets like GtkButton, this will often be an
47147 // input-only event window. For other widgets, this is usually widget->window.
47148 // Certain caveats should be considered when using this function, in
47149 // particular because the mouse pointer is warped to the button click
47150 // location, see gdk_test_simulate_button() for details.
47151 // RETURNS: wether all actions neccessary for the button click simulation were carried out successfully.
47152 // <widget>: Widget to generate a button click on.
47153 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
47154 // <modifiers>: Keyboard modifiers the event is setup with.
47155 static int test_widget_click(AT0)(AT0 /*Widget*/ widget, uint button, Gdk2.ModifierType modifiers) nothrow {
47156 return gtk_test_widget_click(UpCast!(Widget*)(widget), button, modifiers);
47160 // VERSION: 2.14
47161 // This function will generate keyboard press and release events in
47162 // the middle of the first GdkWindow found that belongs to @widget.
47163 // For %GTK_NO_WINDOW widgets like GtkButton, this will often be an
47164 // input-only event window. For other widgets, this is usually widget->window.
47165 // Certain caveats should be considered when using this function, in
47166 // particular because the mouse pointer is warped to the key press
47167 // location, see gdk_test_simulate_key() for details.
47168 // RETURNS: wether all actions neccessary for the key event simulation were carried out successfully.
47169 // <widget>: Widget to generate a key press and release on.
47170 // <keyval>: A Gdk keyboard value.
47171 // <modifiers>: Keyboard modifiers the event is setup with.
47172 static int test_widget_send_key(AT0)(AT0 /*Widget*/ widget, uint keyval, Gdk2.ModifierType modifiers) nothrow {
47173 return gtk_test_widget_send_key(UpCast!(Widget*)(widget), keyval, modifiers);
47176 static void text_anchored_child_set_layout(AT0, AT1)(AT0 /*Widget*/ child, AT1 /*TextLayout*/ layout) nothrow {
47177 gtk_text_anchored_child_set_layout(UpCast!(Widget*)(child), UpCast!(TextLayout*)(layout));
47180 // Unintrospectable function: timeout_add() / gtk_timeout_add()
47181 static uint timeout_add(AT0)(uint interval, Function function_, AT0 /*void*/ data) nothrow {
47182 return gtk_timeout_add(interval, function_, UpCast!(void*)(data));
47185 // Unintrospectable function: timeout_add_full() / gtk_timeout_add_full()
47186 static uint timeout_add_full(AT0)(uint interval, Function function_, CallbackMarshal marshal, AT0 /*void*/ data, GLib2.DestroyNotify destroy) nothrow {
47187 return gtk_timeout_add_full(interval, function_, marshal, UpCast!(void*)(data), destroy);
47190 static void timeout_remove()(uint timeout_handler_id) nothrow {
47191 gtk_timeout_remove(timeout_handler_id);
47195 // Obtains a @tree_model and @path from selection data of target type
47196 // %GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler.
47197 // This function can only be used if @selection_data originates from the same
47198 // process that's calling this function, because a pointer to the tree model
47199 // is being passed around. If you aren't in the same process, then you'll
47200 // get memory corruption. In the #GtkTreeDragDest drag_data_received handler,
47201 // you can assume that selection data of type %GTK_TREE_MODEL_ROW is
47202 // in from the current process. The returned path must be freed with
47203 // gtk_tree_path_free().
47205 // is otherwise valid
47206 // RETURNS: %TRUE if @selection_data had target type %GTK_TREE_MODEL_ROW and
47207 // <selection_data>: a #GtkSelectionData
47208 // <tree_model>: a #GtkTreeModel
47209 // <path>: row in @tree_model
47210 static int tree_get_row_drag_data(AT0, AT1, AT2)(AT0 /*SelectionData*/ selection_data, /*out*/ AT1 /*TreeModel**/ tree_model, /*out*/ AT2 /*TreePath**/ path) nothrow {
47211 return gtk_tree_get_row_drag_data(UpCast!(SelectionData*)(selection_data), UpCast!(TreeModel**)(tree_model), UpCast!(TreePath**)(path));
47215 // MOVED TO: TreeRowReference.deleted
47216 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
47217 // know that the model emitted the "row_deleted" signal.
47218 // <proxy>: A #GObject
47219 // <path>: The path position that was deleted
47220 static void tree_row_reference_deleted(AT0, AT1)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreePath*/ path) nothrow {
47221 gtk_tree_row_reference_deleted(UpCast!(GObject2.Object*)(proxy), UpCast!(TreePath*)(path));
47225 // MOVED TO: TreeRowReference.inserted
47226 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
47227 // know that the model emitted the "row_inserted" signal.
47228 // <proxy>: A #GObject
47229 // <path>: The row position that was inserted
47230 static void tree_row_reference_inserted(AT0, AT1)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreePath*/ path) nothrow {
47231 gtk_tree_row_reference_inserted(UpCast!(GObject2.Object*)(proxy), UpCast!(TreePath*)(path));
47235 // MOVED TO: TreeRowReference.reordered
47236 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
47237 // know that the model emitted the "rows_reordered" signal.
47238 // <proxy>: A #GObject
47239 // <path>: The parent path of the reordered signal
47240 // <iter>: The iter pointing to the parent of the reordered
47241 // <new_order>: The new order of rows
47242 static void tree_row_reference_reordered(AT0, AT1, AT2)(AT0 /*GObject2.Object*/ proxy, AT1 /*TreePath*/ path, AT2 /*TreeIter*/ iter, int* new_order) nothrow {
47243 gtk_tree_row_reference_reordered(UpCast!(GObject2.Object*)(proxy), UpCast!(TreePath*)(path), UpCast!(TreeIter*)(iter), new_order);
47247 // Sets selection data of target type %GTK_TREE_MODEL_ROW. Normally used
47248 // in a drag_data_get handler.
47249 // RETURNS: %TRUE if the #GtkSelectionData had the proper target type to allow us to set a tree row
47250 // <selection_data>: some #GtkSelectionData
47251 // <tree_model>: a #GtkTreeModel
47252 // <path>: a row in @tree_model
47253 static int tree_set_row_drag_data(AT0, AT1, AT2)(AT0 /*SelectionData*/ selection_data, AT1 /*TreeModel*/ tree_model, AT2 /*TreePath*/ path) nothrow {
47254 return gtk_tree_set_row_drag_data(UpCast!(SelectionData*)(selection_data), UpCast!(TreeModel*)(tree_model), UpCast!(TreePath*)(path));
47257 static int true_()() nothrow {
47258 return gtk_true();
47262 // Unintrospectable function: type_class() / gtk_type_class()
47263 // DEPRECATED (v2.14) function: type_class - Use g_type_class_peek() or g_type_class_ref() instead.
47264 // Returns a pointer pointing to the class of @type or %NULL if there
47265 // was any trouble identifying @type. Initializes the class if
47266 // necessary.
47267 // RETURNS: pointer to the class.
47268 // <type>: a #GtkType.
47269 static void* type_class()(Type type) nothrow {
47270 return gtk_type_class(type);
47273 // Unintrospectable function: type_enum_find_value() / gtk_type_enum_find_value()
47274 static EnumValue* type_enum_find_value(AT0)(Type enum_type, AT0 /*char*/ value_name) nothrow {
47275 return gtk_type_enum_find_value(enum_type, toCString!(char*)(value_name));
47278 // Unintrospectable function: type_enum_get_values() / gtk_type_enum_get_values()
47279 static EnumValue* type_enum_get_values()(Type enum_type) nothrow {
47280 return gtk_type_enum_get_values(enum_type);
47283 // Unintrospectable function: type_flags_find_value() / gtk_type_flags_find_value()
47284 static FlagValue* type_flags_find_value(AT0)(Type flags_type, AT0 /*char*/ value_name) nothrow {
47285 return gtk_type_flags_find_value(flags_type, toCString!(char*)(value_name));
47288 // Unintrospectable function: type_flags_get_values() / gtk_type_flags_get_values()
47289 static FlagValue* type_flags_get_values()(Type flags_type) nothrow {
47290 return gtk_type_flags_get_values(flags_type);
47293 static void type_init()(GObject2.TypeDebugFlags debug_flags) nothrow {
47294 gtk_type_init(debug_flags);
47297 // Unintrospectable function: type_new() / gtk_type_new()
47298 static void* type_new()(Type type) nothrow {
47299 return gtk_type_new(type);
47302 static Type type_unique(AT0)(Type parent_type, AT0 /*GTypeInfo*/ gtkinfo) nothrow {
47303 return gtk_type_unique(parent_type, UpCast!(GTypeInfo*)(gtkinfo));
47307 // --- mixin/Gtk2__MODULE.d --->
47310 // An overload of gtk.init() that works with D strings.
47311 // Unlike the original, it does not need to modify the inputs.
47312 // Returns a new string array (that can be assigned to the argv
47313 // array in the caller).
47315 string[] init()(string argv[]) {
47316 // init() wants 'argc' as 'int*'...
47317 c_int argc = cast(c_int)argv.length;
47318 auto c_argv = argvToC(argv);
47319 init(&argc, &c_argv);
47320 return argvFromC(argc, c_argv);
47324 // <--- mixin/Gtk2__MODULE.d ---
47326 // C prototypes:
47328 extern (C) {
47329 AboutDialog* gtk_about_dialog_new() nothrow;
47330 AboutDialogActivateLinkFunc gtk_about_dialog_set_email_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy) nothrow;
47331 AboutDialogActivateLinkFunc gtk_about_dialog_set_url_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy) nothrow;
47332 char** gtk_about_dialog_get_artists(AboutDialog* this_) nothrow;
47333 char** gtk_about_dialog_get_authors(AboutDialog* this_) nothrow;
47334 char* gtk_about_dialog_get_comments(AboutDialog* this_) nothrow;
47335 char* gtk_about_dialog_get_copyright(AboutDialog* this_) nothrow;
47336 char** gtk_about_dialog_get_documenters(AboutDialog* this_) nothrow;
47337 char* gtk_about_dialog_get_license(AboutDialog* this_) nothrow;
47338 GdkPixbuf2.Pixbuf* gtk_about_dialog_get_logo(AboutDialog* this_) nothrow;
47339 char* gtk_about_dialog_get_logo_icon_name(AboutDialog* this_) nothrow;
47340 char* gtk_about_dialog_get_name(AboutDialog* this_) nothrow;
47341 char* gtk_about_dialog_get_program_name(AboutDialog* this_) nothrow;
47342 char* gtk_about_dialog_get_translator_credits(AboutDialog* this_) nothrow;
47343 char* gtk_about_dialog_get_version(AboutDialog* this_) nothrow;
47344 char* gtk_about_dialog_get_website(AboutDialog* this_) nothrow;
47345 char* gtk_about_dialog_get_website_label(AboutDialog* this_) nothrow;
47346 int gtk_about_dialog_get_wrap_license(AboutDialog* this_) nothrow;
47347 void gtk_about_dialog_set_artists(AboutDialog* this_, char** artists) nothrow;
47348 void gtk_about_dialog_set_authors(AboutDialog* this_, char** authors) nothrow;
47349 void gtk_about_dialog_set_comments(AboutDialog* this_, char* comments=null) nothrow;
47350 void gtk_about_dialog_set_copyright(AboutDialog* this_, char* copyright) nothrow;
47351 void gtk_about_dialog_set_documenters(AboutDialog* this_, char** documenters) nothrow;
47352 void gtk_about_dialog_set_license(AboutDialog* this_, char* license=null) nothrow;
47353 void gtk_about_dialog_set_logo(AboutDialog* this_, GdkPixbuf2.Pixbuf* logo=null) nothrow;
47354 void gtk_about_dialog_set_logo_icon_name(AboutDialog* this_, char* icon_name=null) nothrow;
47355 void gtk_about_dialog_set_name(AboutDialog* this_, char* name=null) nothrow;
47356 void gtk_about_dialog_set_program_name(AboutDialog* this_, char* name) nothrow;
47357 void gtk_about_dialog_set_translator_credits(AboutDialog* this_, char* translator_credits=null) nothrow;
47358 void gtk_about_dialog_set_version(AboutDialog* this_, char* version_=null) nothrow;
47359 void gtk_about_dialog_set_website(AboutDialog* this_, char* website=null) nothrow;
47360 void gtk_about_dialog_set_website_label(AboutDialog* this_, char* website_label) nothrow;
47361 void gtk_about_dialog_set_wrap_license(AboutDialog* this_, int wrap_license) nothrow;
47362 AccelGroup* /*new*/ gtk_accel_group_new() nothrow;
47363 AccelGroup* gtk_accel_group_from_accel_closure(GObject2.Closure* closure) nothrow;
47364 int gtk_accel_group_activate(AccelGroup* this_, GLib2.Quark accel_quark, GObject2.Object* acceleratable, uint accel_key, Gdk2.ModifierType accel_mods) nothrow;
47365 void gtk_accel_group_connect(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags, GObject2.Closure* closure) nothrow;
47366 void gtk_accel_group_connect_by_path(AccelGroup* this_, char* accel_path, GObject2.Closure* closure) nothrow;
47367 int gtk_accel_group_disconnect(AccelGroup* this_, GObject2.Closure* closure=null) nothrow;
47368 int gtk_accel_group_disconnect_key(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods) nothrow;
47369 AccelKey* gtk_accel_group_find(AccelGroup* this_, AccelGroupFindFunc find_func, void* data) nothrow;
47370 int gtk_accel_group_get_is_locked(AccelGroup* this_) nothrow;
47371 Gdk2.ModifierType gtk_accel_group_get_modifier_mask(AccelGroup* this_) nothrow;
47372 void gtk_accel_group_lock(AccelGroup* this_) nothrow;
47373 AccelGroupEntry* gtk_accel_group_query(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods, uint* n_entries=null) nothrow;
47374 void gtk_accel_group_unlock(AccelGroup* this_) nothrow;
47375 AccelLabel* gtk_accel_label_new(char* string_) nothrow;
47376 Widget* gtk_accel_label_get_accel_widget(AccelLabel* this_) nothrow;
47377 uint gtk_accel_label_get_accel_width(AccelLabel* this_) nothrow;
47378 int gtk_accel_label_refetch(AccelLabel* this_) nothrow;
47379 void gtk_accel_label_set_accel_closure(AccelLabel* this_, GObject2.Closure* accel_closure) nothrow;
47380 void gtk_accel_label_set_accel_widget(AccelLabel* this_, Widget* accel_widget) nothrow;
47381 void gtk_accel_map_add_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods) nothrow;
47382 void gtk_accel_map_add_filter(char* filter_pattern) nothrow;
47383 int gtk_accel_map_change_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int replace) nothrow;
47384 void gtk_accel_map_foreach(void* data, AccelMapForeach foreach_func) nothrow;
47385 void gtk_accel_map_foreach_unfiltered(void* data, AccelMapForeach foreach_func) nothrow;
47386 AccelMap* gtk_accel_map_get() nothrow;
47387 void gtk_accel_map_load(char* file_name) nothrow;
47388 void gtk_accel_map_load_fd(int fd) nothrow;
47389 void gtk_accel_map_load_scanner(GLib2.Scanner* scanner) nothrow;
47390 void gtk_accel_map_lock_path(char* accel_path) nothrow;
47391 int gtk_accel_map_lookup_entry(char* accel_path, AccelKey* key) nothrow;
47392 void gtk_accel_map_save(char* file_name) nothrow;
47393 void gtk_accel_map_save_fd(int fd) nothrow;
47394 void gtk_accel_map_unlock_path(char* accel_path) nothrow;
47395 void gtk_accessible_connect_widget_destroyed(Accessible* this_) nothrow;
47396 Widget* gtk_accessible_get_widget(Accessible* this_) nothrow;
47397 void gtk_accessible_set_widget(Accessible* this_, Widget* widget) nothrow;
47398 Action* /*new*/ gtk_action_new(char* name, char* label, char* tooltip, char* stock_id) nothrow;
47399 void gtk_action_activate(Action* this_) nothrow;
47400 void gtk_action_block_activate(Action* this_) nothrow;
47401 void gtk_action_block_activate_from(Action* this_, Widget* proxy) nothrow;
47402 void gtk_action_connect_accelerator(Action* this_) nothrow;
47403 void gtk_action_connect_proxy(Action* this_, Widget* proxy) nothrow;
47404 Widget* gtk_action_create_icon(Action* this_, IconSize icon_size) nothrow;
47405 Widget* gtk_action_create_menu(Action* this_) nothrow;
47406 Widget* gtk_action_create_menu_item(Action* this_) nothrow;
47407 Widget* gtk_action_create_tool_item(Action* this_) nothrow;
47408 void gtk_action_disconnect_accelerator(Action* this_) nothrow;
47409 void gtk_action_disconnect_proxy(Action* this_, Widget* proxy) nothrow;
47410 GObject2.Closure* gtk_action_get_accel_closure(Action* this_) nothrow;
47411 char* gtk_action_get_accel_path(Action* this_) nothrow;
47412 int gtk_action_get_always_show_image(Action* this_) nothrow;
47413 Gio2.Icon* gtk_action_get_gicon(Action* this_) nothrow;
47414 char* gtk_action_get_icon_name(Action* this_) nothrow;
47415 int gtk_action_get_is_important(Action* this_) nothrow;
47416 char* gtk_action_get_label(Action* this_) nothrow;
47417 char* gtk_action_get_name(Action* this_) nothrow;
47418 GLib2.SList* gtk_action_get_proxies(Action* this_) nothrow;
47419 int gtk_action_get_sensitive(Action* this_) nothrow;
47420 char* gtk_action_get_short_label(Action* this_) nothrow;
47421 char* gtk_action_get_stock_id(Action* this_) nothrow;
47422 char* gtk_action_get_tooltip(Action* this_) nothrow;
47423 int gtk_action_get_visible(Action* this_) nothrow;
47424 int gtk_action_get_visible_horizontal(Action* this_) nothrow;
47425 int gtk_action_get_visible_vertical(Action* this_) nothrow;
47426 int gtk_action_is_sensitive(Action* this_) nothrow;
47427 int gtk_action_is_visible(Action* this_) nothrow;
47428 void gtk_action_set_accel_group(Action* this_, AccelGroup* accel_group=null) nothrow;
47429 void gtk_action_set_accel_path(Action* this_, char* accel_path) nothrow;
47430 void gtk_action_set_always_show_image(Action* this_, int always_show) nothrow;
47431 void gtk_action_set_gicon(Action* this_, Gio2.Icon* icon) nothrow;
47432 void gtk_action_set_icon_name(Action* this_, char* icon_name) nothrow;
47433 void gtk_action_set_is_important(Action* this_, int is_important) nothrow;
47434 void gtk_action_set_label(Action* this_, char* label) nothrow;
47435 void gtk_action_set_sensitive(Action* this_, int sensitive) nothrow;
47436 void gtk_action_set_short_label(Action* this_, char* short_label) nothrow;
47437 void gtk_action_set_stock_id(Action* this_, char* stock_id) nothrow;
47438 void gtk_action_set_tooltip(Action* this_, char* tooltip) nothrow;
47439 void gtk_action_set_visible(Action* this_, int visible) nothrow;
47440 void gtk_action_set_visible_horizontal(Action* this_, int visible_horizontal) nothrow;
47441 void gtk_action_set_visible_vertical(Action* this_, int visible_vertical) nothrow;
47442 void gtk_action_unblock_activate(Action* this_) nothrow;
47443 void gtk_action_unblock_activate_from(Action* this_, Widget* proxy) nothrow;
47444 ActionGroup* /*new*/ gtk_action_group_new(char* name) nothrow;
47445 void gtk_action_group_add_action(ActionGroup* this_, Action* action) nothrow;
47446 void gtk_action_group_add_action_with_accel(ActionGroup* this_, Action* action, char* accelerator=null) nothrow;
47447 void gtk_action_group_add_actions(ActionGroup* this_, ActionEntry* entries, uint n_entries, void* user_data) nothrow;
47448 void gtk_action_group_add_actions_full(ActionGroup* this_, ActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy) nothrow;
47449 void gtk_action_group_add_radio_actions(ActionGroup* this_, RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data) nothrow;
47450 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) nothrow;
47451 void gtk_action_group_add_toggle_actions(ActionGroup* this_, ToggleActionEntry* entries, uint n_entries, void* user_data) nothrow;
47452 void gtk_action_group_add_toggle_actions_full(ActionGroup* this_, ToggleActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy) nothrow;
47453 Action* gtk_action_group_get_action(ActionGroup* this_, char* action_name) nothrow;
47454 char* gtk_action_group_get_name(ActionGroup* this_) nothrow;
47455 int gtk_action_group_get_sensitive(ActionGroup* this_) nothrow;
47456 int gtk_action_group_get_visible(ActionGroup* this_) nothrow;
47457 GLib2.List* /*new container*/ gtk_action_group_list_actions(ActionGroup* this_) nothrow;
47458 void gtk_action_group_remove_action(ActionGroup* this_, Action* action) nothrow;
47459 void gtk_action_group_set_sensitive(ActionGroup* this_, int sensitive) nothrow;
47460 void gtk_action_group_set_translate_func(ActionGroup* this_, TranslateFunc func, void* data, GLib2.DestroyNotify notify) nothrow;
47461 void gtk_action_group_set_translation_domain(ActionGroup* this_, char* domain) nothrow;
47462 void gtk_action_group_set_visible(ActionGroup* this_, int visible) nothrow;
47463 char* gtk_action_group_translate_string(ActionGroup* this_, char* string_) nothrow;
47464 void gtk_activatable_do_set_related_action(Activatable* this_, Action* action) nothrow;
47465 Action* gtk_activatable_get_related_action(Activatable* this_) nothrow;
47466 int gtk_activatable_get_use_action_appearance(Activatable* this_) nothrow;
47467 void gtk_activatable_set_related_action(Activatable* this_, Action* action) nothrow;
47468 void gtk_activatable_set_use_action_appearance(Activatable* this_, int use_appearance) nothrow;
47469 void gtk_activatable_sync_action_properties(Activatable* this_, Action* action=null) nothrow;
47470 Adjustment* gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size) nothrow;
47471 void gtk_adjustment_changed(Adjustment* this_) nothrow;
47472 void gtk_adjustment_clamp_page(Adjustment* this_, double lower, double upper) nothrow;
47473 void gtk_adjustment_configure(Adjustment* this_, double value, double lower, double upper, double step_increment, double page_increment, double page_size) nothrow;
47474 double gtk_adjustment_get_lower(Adjustment* this_) nothrow;
47475 double gtk_adjustment_get_page_increment(Adjustment* this_) nothrow;
47476 double gtk_adjustment_get_page_size(Adjustment* this_) nothrow;
47477 double gtk_adjustment_get_step_increment(Adjustment* this_) nothrow;
47478 double gtk_adjustment_get_upper(Adjustment* this_) nothrow;
47479 double gtk_adjustment_get_value(Adjustment* this_) nothrow;
47480 void gtk_adjustment_set_lower(Adjustment* this_, double lower) nothrow;
47481 void gtk_adjustment_set_page_increment(Adjustment* this_, double page_increment) nothrow;
47482 void gtk_adjustment_set_page_size(Adjustment* this_, double page_size) nothrow;
47483 void gtk_adjustment_set_step_increment(Adjustment* this_, double step_increment) nothrow;
47484 void gtk_adjustment_set_upper(Adjustment* this_, double upper) nothrow;
47485 void gtk_adjustment_set_value(Adjustment* this_, double value) nothrow;
47486 void gtk_adjustment_value_changed(Adjustment* this_) nothrow;
47487 Alignment* gtk_alignment_new(float xalign, float yalign, float xscale, float yscale) nothrow;
47488 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) nothrow;
47489 void gtk_alignment_set(Alignment* this_, float xalign, float yalign, float xscale, float yscale) nothrow;
47490 void gtk_alignment_set_padding(Alignment* this_, uint padding_top, uint padding_bottom, uint padding_left, uint padding_right) nothrow;
47491 Arrow* gtk_arrow_new(ArrowType arrow_type, ShadowType shadow_type) nothrow;
47492 void gtk_arrow_set(Arrow* this_, ArrowType arrow_type, ShadowType shadow_type) nothrow;
47493 AspectFrame* gtk_aspect_frame_new(char* label, float xalign, float yalign, float ratio, int obey_child) nothrow;
47494 void gtk_aspect_frame_set(AspectFrame* this_, float xalign, float yalign, float ratio, int obey_child) nothrow;
47495 Assistant* gtk_assistant_new() nothrow;
47496 void gtk_assistant_add_action_widget(Assistant* this_, Widget* child) nothrow;
47497 int gtk_assistant_append_page(Assistant* this_, Widget* page) nothrow;
47498 void gtk_assistant_commit(Assistant* this_) nothrow;
47499 int gtk_assistant_get_current_page(Assistant* this_) nothrow;
47500 int gtk_assistant_get_n_pages(Assistant* this_) nothrow;
47501 Widget* gtk_assistant_get_nth_page(Assistant* this_, int page_num) nothrow;
47502 int gtk_assistant_get_page_complete(Assistant* this_, Widget* page) nothrow;
47503 GdkPixbuf2.Pixbuf* gtk_assistant_get_page_header_image(Assistant* this_, Widget* page) nothrow;
47504 GdkPixbuf2.Pixbuf* gtk_assistant_get_page_side_image(Assistant* this_, Widget* page) nothrow;
47505 char* gtk_assistant_get_page_title(Assistant* this_, Widget* page) nothrow;
47506 AssistantPageType gtk_assistant_get_page_type(Assistant* this_, Widget* page) nothrow;
47507 int gtk_assistant_insert_page(Assistant* this_, Widget* page, int position) nothrow;
47508 int gtk_assistant_prepend_page(Assistant* this_, Widget* page) nothrow;
47509 void gtk_assistant_remove_action_widget(Assistant* this_, Widget* child) nothrow;
47510 void gtk_assistant_set_current_page(Assistant* this_, int page_num) nothrow;
47511 void gtk_assistant_set_forward_page_func(Assistant* this_, AssistantPageFunc page_func, void* data, GLib2.DestroyNotify destroy) nothrow;
47512 void gtk_assistant_set_page_complete(Assistant* this_, Widget* page, int complete) nothrow;
47513 void gtk_assistant_set_page_header_image(Assistant* this_, Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null) nothrow;
47514 void gtk_assistant_set_page_side_image(Assistant* this_, Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null) nothrow;
47515 void gtk_assistant_set_page_title(Assistant* this_, Widget* page, char* title) nothrow;
47516 void gtk_assistant_set_page_type(Assistant* this_, Widget* page, AssistantPageType type) nothrow;
47517 void gtk_assistant_update_buttons_state(Assistant* this_) nothrow;
47518 Widget* gtk_bin_get_child(Bin* this_) nothrow;
47519 void gtk_binding_entry_add_signal(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, uint n_args, ...) nothrow;
47520 void gtk_binding_entry_add_signall(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, GLib2.SList* binding_args) nothrow;
47521 void gtk_binding_entry_clear(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow;
47522 void gtk_binding_entry_remove(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow;
47523 void gtk_binding_entry_skip(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) nothrow;
47524 int gtk_binding_set_activate(BindingSet* this_, uint keyval, Gdk2.ModifierType modifiers, Object* object) nothrow;
47525 void gtk_binding_set_add_path(BindingSet* this_, PathType path_type, char* path_pattern, PathPriorityType priority) nothrow;
47526 BindingSet* gtk_binding_set_by_class(void* object_class) nothrow;
47527 BindingSet* gtk_binding_set_find(char* set_name) nothrow;
47528 BindingSet* gtk_binding_set_new(char* set_name) nothrow;
47529 Border* /*new*/ gtk_border_new() nothrow;
47530 Border* /*new*/ gtk_border_copy(Border* this_) nothrow;
47531 void gtk_border_free(Border* this_) nothrow;
47532 int gtk_box_get_homogeneous(Box* this_) nothrow;
47533 int gtk_box_get_spacing(Box* this_) nothrow;
47534 void gtk_box_pack_end(Box* this_, Widget* child, int expand, int fill, uint padding) nothrow;
47535 void gtk_box_pack_end_defaults(Box* this_, Widget* widget) nothrow;
47536 void gtk_box_pack_start(Box* this_, Widget* child, int expand, int fill, uint padding) nothrow;
47537 void gtk_box_pack_start_defaults(Box* this_, Widget* widget) nothrow;
47538 void gtk_box_query_child_packing(Box* this_, Widget* child, int* expand, int* fill, uint* padding, PackType* pack_type) nothrow;
47539 void gtk_box_reorder_child(Box* this_, Widget* child, int position) nothrow;
47540 void gtk_box_set_child_packing(Box* this_, Widget* child, int expand, int fill, uint padding, PackType pack_type) nothrow;
47541 void gtk_box_set_homogeneous(Box* this_, int homogeneous) nothrow;
47542 void gtk_box_set_spacing(Box* this_, int spacing) nothrow;
47543 void gtk_buildable_add_child(Buildable* this_, Builder* builder, GObject2.Object* child, char* type=null) nothrow;
47544 GObject2.Object* /*new*/ gtk_buildable_construct_child(Buildable* this_, Builder* builder, char* name) nothrow;
47545 void gtk_buildable_custom_finished(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, void* data) nothrow;
47546 void gtk_buildable_custom_tag_end(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, void** data) nothrow;
47547 int gtk_buildable_custom_tag_start(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data) nothrow;
47548 GObject2.Object* gtk_buildable_get_internal_child(Buildable* this_, Builder* builder, char* childname) nothrow;
47549 char* gtk_buildable_get_name(Buildable* this_) nothrow;
47550 void gtk_buildable_parser_finished(Buildable* this_, Builder* builder) nothrow;
47551 void gtk_buildable_set_buildable_property(Buildable* this_, Builder* builder, char* name, GObject2.Value* value) nothrow;
47552 void gtk_buildable_set_name(Buildable* this_, char* name) nothrow;
47553 Builder* /*new*/ gtk_builder_new() nothrow;
47554 uint gtk_builder_add_from_file(Builder* this_, char* filename, GLib2.Error** error) nothrow;
47555 uint gtk_builder_add_from_string(Builder* this_, char* buffer, size_t length, GLib2.Error** error) nothrow;
47556 uint gtk_builder_add_objects_from_file(Builder* this_, char* filename, char** object_ids, GLib2.Error** error) nothrow;
47557 uint gtk_builder_add_objects_from_string(Builder* this_, char* buffer, size_t length, char** object_ids, GLib2.Error** error) nothrow;
47558 void gtk_builder_connect_signals(Builder* this_, void* user_data) nothrow;
47559 void gtk_builder_connect_signals_full(Builder* this_, BuilderConnectFunc func, void* user_data) nothrow;
47560 GObject2.Object* gtk_builder_get_object(Builder* this_, char* name) nothrow;
47561 GLib2.SList* /*new container*/ gtk_builder_get_objects(Builder* this_) nothrow;
47562 char* gtk_builder_get_translation_domain(Builder* this_) nothrow;
47563 Type gtk_builder_get_type_from_name(Builder* this_, char* type_name) nothrow;
47564 void gtk_builder_set_translation_domain(Builder* this_, char* domain=null) nothrow;
47565 int gtk_builder_value_from_string(Builder* this_, GObject2.ParamSpec* pspec, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error) nothrow;
47566 int gtk_builder_value_from_string_type(Builder* this_, Type type, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error) nothrow;
47567 Button* gtk_button_new() nothrow;
47568 Button* gtk_button_new_from_stock(char* stock_id) nothrow;
47569 Button* gtk_button_new_with_label(char* label) nothrow;
47570 Button* gtk_button_new_with_mnemonic(char* label) nothrow;
47571 void gtk_button_clicked(Button* this_) nothrow;
47572 void gtk_button_enter(Button* this_) nothrow;
47573 void gtk_button_get_alignment(Button* this_, /*out*/ float* xalign, /*out*/ float* yalign) nothrow;
47574 Gdk2.Window* gtk_button_get_event_window(Button* this_) nothrow;
47575 int gtk_button_get_focus_on_click(Button* this_) nothrow;
47576 Widget* gtk_button_get_image(Button* this_) nothrow;
47577 PositionType gtk_button_get_image_position(Button* this_) nothrow;
47578 char* gtk_button_get_label(Button* this_) nothrow;
47579 ReliefStyle gtk_button_get_relief(Button* this_) nothrow;
47580 int gtk_button_get_use_stock(Button* this_) nothrow;
47581 int gtk_button_get_use_underline(Button* this_) nothrow;
47582 void gtk_button_leave(Button* this_) nothrow;
47583 void gtk_button_pressed(Button* this_) nothrow;
47584 void gtk_button_released(Button* this_) nothrow;
47585 void gtk_button_set_alignment(Button* this_, float xalign, float yalign) nothrow;
47586 void gtk_button_set_focus_on_click(Button* this_, int focus_on_click) nothrow;
47587 void gtk_button_set_image(Button* this_, Widget* image) nothrow;
47588 void gtk_button_set_image_position(Button* this_, PositionType position) nothrow;
47589 void gtk_button_set_label(Button* this_, char* label) nothrow;
47590 void gtk_button_set_relief(Button* this_, ReliefStyle newstyle) nothrow;
47591 void gtk_button_set_use_stock(Button* this_, int use_stock) nothrow;
47592 void gtk_button_set_use_underline(Button* this_, int use_underline) nothrow;
47593 void gtk_button_box_get_child_ipadding(ButtonBox* this_, int* ipad_x, int* ipad_y) nothrow;
47594 int gtk_button_box_get_child_secondary(ButtonBox* this_, Widget* child) nothrow;
47595 void gtk_button_box_get_child_size(ButtonBox* this_, int* min_width, int* min_height) nothrow;
47596 ButtonBoxStyle gtk_button_box_get_layout(ButtonBox* this_) nothrow;
47597 void gtk_button_box_set_child_ipadding(ButtonBox* this_, int ipad_x, int ipad_y) nothrow;
47598 void gtk_button_box_set_child_secondary(ButtonBox* this_, Widget* child, int is_secondary) nothrow;
47599 void gtk_button_box_set_child_size(ButtonBox* this_, int min_width, int min_height) nothrow;
47600 void gtk_button_box_set_layout(ButtonBox* this_, ButtonBoxStyle layout_style) nothrow;
47601 CList* gtk_clist_new(int columns) nothrow;
47602 CList* gtk_clist_new_with_titles(int columns, char* titles) nothrow;
47603 int gtk_clist_append(CList* this_, char* text) nothrow;
47604 void gtk_clist_clear(CList* this_) nothrow;
47605 void gtk_clist_column_title_active(CList* this_, int column) nothrow;
47606 void gtk_clist_column_title_passive(CList* this_, int column) nothrow;
47607 void gtk_clist_column_titles_active(CList* this_) nothrow;
47608 void gtk_clist_column_titles_hide(CList* this_) nothrow;
47609 void gtk_clist_column_titles_passive(CList* this_) nothrow;
47610 void gtk_clist_column_titles_show(CList* this_) nothrow;
47611 int gtk_clist_columns_autosize(CList* this_) nothrow;
47612 int gtk_clist_find_row_from_data(CList* this_, void* data) nothrow;
47613 void gtk_clist_freeze(CList* this_) nothrow;
47614 Style* gtk_clist_get_cell_style(CList* this_, int row, int column) nothrow;
47615 CellType gtk_clist_get_cell_type(CList* this_, int row, int column) nothrow;
47616 char* /*new*/ gtk_clist_get_column_title(CList* this_, int column) nothrow;
47617 Widget* gtk_clist_get_column_widget(CList* this_, int column) nothrow;
47618 Adjustment* gtk_clist_get_hadjustment(CList* this_) nothrow;
47619 int gtk_clist_get_pixmap(CList* this_, int row, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) nothrow;
47620 int gtk_clist_get_pixtext(CList* this_, int row, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) nothrow;
47621 void* gtk_clist_get_row_data(CList* this_, int row) nothrow;
47622 Style* gtk_clist_get_row_style(CList* this_, int row) nothrow;
47623 int gtk_clist_get_selectable(CList* this_, int row) nothrow;
47624 int gtk_clist_get_selection_info(CList* this_, int x, int y, int* row, int* column) nothrow;
47625 int gtk_clist_get_text(CList* this_, int row, int column, char** text) nothrow;
47626 Adjustment* gtk_clist_get_vadjustment(CList* this_) nothrow;
47627 int gtk_clist_insert(CList* this_, int row, char* text) nothrow;
47628 void gtk_clist_moveto(CList* this_, int row, int column, float row_align, float col_align) nothrow;
47629 int gtk_clist_optimal_column_width(CList* this_, int column) nothrow;
47630 int gtk_clist_prepend(CList* this_, char* text) nothrow;
47631 void gtk_clist_remove(CList* this_, int row) nothrow;
47632 Visibility gtk_clist_row_is_visible(CList* this_, int row) nothrow;
47633 void gtk_clist_row_move(CList* this_, int source_row, int dest_row) nothrow;
47634 void gtk_clist_select_all(CList* this_) nothrow;
47635 void gtk_clist_select_row(CList* this_, int row, int column) nothrow;
47636 void gtk_clist_set_auto_sort(CList* this_, int auto_sort) nothrow;
47637 void gtk_clist_set_background(CList* this_, int row, Gdk2.Color* color) nothrow;
47638 void gtk_clist_set_button_actions(CList* this_, uint button, ubyte button_actions) nothrow;
47639 void gtk_clist_set_cell_style(CList* this_, int row, int column, Style* style) nothrow;
47640 void gtk_clist_set_column_auto_resize(CList* this_, int column, int auto_resize) nothrow;
47641 void gtk_clist_set_column_justification(CList* this_, int column, Justification justification) nothrow;
47642 void gtk_clist_set_column_max_width(CList* this_, int column, int max_width) nothrow;
47643 void gtk_clist_set_column_min_width(CList* this_, int column, int min_width) nothrow;
47644 void gtk_clist_set_column_resizeable(CList* this_, int column, int resizeable) nothrow;
47645 void gtk_clist_set_column_title(CList* this_, int column, char* title) nothrow;
47646 void gtk_clist_set_column_visibility(CList* this_, int column, int visible) nothrow;
47647 void gtk_clist_set_column_widget(CList* this_, int column, Widget* widget) nothrow;
47648 void gtk_clist_set_column_width(CList* this_, int column, int width) nothrow;
47649 void gtk_clist_set_compare_func(CList* this_, CListCompareFunc cmp_func) nothrow;
47650 void gtk_clist_set_foreground(CList* this_, int row, Gdk2.Color* color) nothrow;
47651 void gtk_clist_set_hadjustment(CList* this_, Adjustment* adjustment) nothrow;
47652 void gtk_clist_set_pixmap(CList* this_, int row, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) nothrow;
47653 void gtk_clist_set_pixtext(CList* this_, int row, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask) nothrow;
47654 void gtk_clist_set_reorderable(CList* this_, int reorderable) nothrow;
47655 void gtk_clist_set_row_data(CList* this_, int row, void* data) nothrow;
47656 void gtk_clist_set_row_data_full(CList* this_, int row, void* data, GLib2.DestroyNotify destroy) nothrow;
47657 void gtk_clist_set_row_height(CList* this_, uint height) nothrow;
47658 void gtk_clist_set_row_style(CList* this_, int row, Style* style) nothrow;
47659 void gtk_clist_set_selectable(CList* this_, int row, int selectable) nothrow;
47660 void gtk_clist_set_selection_mode(CList* this_, SelectionMode mode) nothrow;
47661 void gtk_clist_set_shadow_type(CList* this_, ShadowType type) nothrow;
47662 void gtk_clist_set_shift(CList* this_, int row, int column, int vertical, int horizontal) nothrow;
47663 void gtk_clist_set_sort_column(CList* this_, int column) nothrow;
47664 void gtk_clist_set_sort_type(CList* this_, SortType sort_type) nothrow;
47665 void gtk_clist_set_text(CList* this_, int row, int column, char* text) nothrow;
47666 void gtk_clist_set_use_drag_icons(CList* this_, int use_icons) nothrow;
47667 void gtk_clist_set_vadjustment(CList* this_, Adjustment* adjustment) nothrow;
47668 void gtk_clist_sort(CList* this_) nothrow;
47669 void gtk_clist_swap_rows(CList* this_, int row1, int row2) nothrow;
47670 void gtk_clist_thaw(CList* this_) nothrow;
47671 void gtk_clist_undo_selection(CList* this_) nothrow;
47672 void gtk_clist_unselect_all(CList* this_) nothrow;
47673 void gtk_clist_unselect_row(CList* this_, int row, int column) nothrow;
47674 CTree* gtk_ctree_new(int columns, int tree_column) nothrow;
47675 CTree* gtk_ctree_new_with_titles(int columns, int tree_column, char* titles) nothrow;
47676 void gtk_ctree_collapse(CTree* this_, CTreeNode* node) nothrow;
47677 void gtk_ctree_collapse_recursive(CTree* this_, CTreeNode* node) nothrow;
47678 void gtk_ctree_collapse_to_depth(CTree* this_, CTreeNode* node, int depth) nothrow;
47679 void gtk_ctree_expand(CTree* this_, CTreeNode* node) nothrow;
47680 void gtk_ctree_expand_recursive(CTree* this_, CTreeNode* node) nothrow;
47681 void gtk_ctree_expand_to_depth(CTree* this_, CTreeNode* node, int depth) nothrow;
47682 GLib2.Node* gtk_ctree_export_to_gnode(CTree* this_, GLib2.Node* parent, GLib2.Node* sibling, CTreeNode* node, CTreeGNodeFunc func, void* data) nothrow;
47683 int gtk_ctree_find(CTree* this_, CTreeNode* node, CTreeNode* child) nothrow;
47684 GLib2.List* gtk_ctree_find_all_by_row_data(CTree* this_, CTreeNode* node, void* data) nothrow;
47685 GLib2.List* gtk_ctree_find_all_by_row_data_custom(CTree* this_, CTreeNode* node, void* data, GLib2.CompareFunc func) nothrow;
47686 CTreeNode* gtk_ctree_find_by_row_data(CTree* this_, CTreeNode* node, void* data) nothrow;
47687 CTreeNode* gtk_ctree_find_by_row_data_custom(CTree* this_, CTreeNode* node, void* data, GLib2.CompareFunc func) nothrow;
47688 CTreeNode* gtk_ctree_find_node_ptr(CTree* this_, CTreeRow* ctree_row) nothrow;
47689 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) nothrow;
47690 CTreeNode* gtk_ctree_insert_gnode(CTree* this_, CTreeNode* parent, CTreeNode* sibling, GLib2.Node* gnode, CTreeGNodeFunc func, void* data) nothrow;
47691 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) nothrow;
47692 int gtk_ctree_is_ancestor(CTree* this_, CTreeNode* node, CTreeNode* child) nothrow;
47693 int gtk_ctree_is_hot_spot(CTree* this_, int x, int y) nothrow;
47694 int gtk_ctree_is_viewable(CTree* this_, CTreeNode* node) nothrow;
47695 CTreeNode* gtk_ctree_last(CTree* this_, CTreeNode* node) nothrow;
47696 void gtk_ctree_move(CTree* this_, CTreeNode* node, CTreeNode* new_parent=null, CTreeNode* new_sibling=null) nothrow;
47697 Style* gtk_ctree_node_get_cell_style(CTree* this_, CTreeNode* node, int column) nothrow;
47698 CellType gtk_ctree_node_get_cell_type(CTree* this_, CTreeNode* node, int column) nothrow;
47699 int gtk_ctree_node_get_pixmap(CTree* this_, CTreeNode* node, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) nothrow;
47700 int gtk_ctree_node_get_pixtext(CTree* this_, CTreeNode* node, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) nothrow;
47701 void* gtk_ctree_node_get_row_data(CTree* this_, CTreeNode* node) nothrow;
47702 Style* gtk_ctree_node_get_row_style(CTree* this_, CTreeNode* node) nothrow;
47703 int gtk_ctree_node_get_selectable(CTree* this_, CTreeNode* node) nothrow;
47704 int gtk_ctree_node_get_text(CTree* this_, CTreeNode* node, int column, char** text) nothrow;
47705 Visibility gtk_ctree_node_is_visible(CTree* this_, CTreeNode* node) nothrow;
47706 void gtk_ctree_node_moveto(CTree* this_, CTreeNode* node, int column, float row_align, float col_align) nothrow;
47707 CTreeNode* gtk_ctree_node_nth(CTree* this_, uint row) nothrow;
47708 void gtk_ctree_node_set_background(CTree* this_, CTreeNode* node, Gdk2.Color* color) nothrow;
47709 void gtk_ctree_node_set_cell_style(CTree* this_, CTreeNode* node, int column, Style* style) nothrow;
47710 void gtk_ctree_node_set_foreground(CTree* this_, CTreeNode* node, Gdk2.Color* color) nothrow;
47711 void gtk_ctree_node_set_pixmap(CTree* this_, CTreeNode* node, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) nothrow;
47712 void gtk_ctree_node_set_pixtext(CTree* this_, CTreeNode* node, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) nothrow;
47713 void gtk_ctree_node_set_row_data(CTree* this_, CTreeNode* node, void* data) nothrow;
47714 void gtk_ctree_node_set_row_data_full(CTree* this_, CTreeNode* node, void* data, GLib2.DestroyNotify destroy) nothrow;
47715 void gtk_ctree_node_set_row_style(CTree* this_, CTreeNode* node, Style* style) nothrow;
47716 void gtk_ctree_node_set_selectable(CTree* this_, CTreeNode* node, int selectable) nothrow;
47717 void gtk_ctree_node_set_shift(CTree* this_, CTreeNode* node, int column, int vertical, int horizontal) nothrow;
47718 void gtk_ctree_node_set_text(CTree* this_, CTreeNode* node, int column, char* text) nothrow;
47719 void gtk_ctree_post_recursive(CTree* this_, CTreeNode* node, CTreeFunc func, void* data) nothrow;
47720 void gtk_ctree_post_recursive_to_depth(CTree* this_, CTreeNode* node, int depth, CTreeFunc func, void* data) nothrow;
47721 void gtk_ctree_pre_recursive(CTree* this_, CTreeNode* node, CTreeFunc func, void* data) nothrow;
47722 void gtk_ctree_pre_recursive_to_depth(CTree* this_, CTreeNode* node, int depth, CTreeFunc func, void* data) nothrow;
47723 void gtk_ctree_real_select_recursive(CTree* this_, CTreeNode* node, int state) nothrow;
47724 void gtk_ctree_remove_node(CTree* this_, CTreeNode* node) nothrow;
47725 void gtk_ctree_select(CTree* this_, CTreeNode* node) nothrow;
47726 void gtk_ctree_select_recursive(CTree* this_, CTreeNode* node) nothrow;
47727 void gtk_ctree_set_drag_compare_func(CTree* this_, CTreeCompareDragFunc cmp_func) nothrow;
47728 void gtk_ctree_set_expander_style(CTree* this_, CTreeExpanderStyle expander_style) nothrow;
47729 void gtk_ctree_set_indent(CTree* this_, int indent) nothrow;
47730 void gtk_ctree_set_line_style(CTree* this_, CTreeLineStyle line_style) nothrow;
47731 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) nothrow;
47732 void gtk_ctree_set_show_stub(CTree* this_, int show_stub) nothrow;
47733 void gtk_ctree_set_spacing(CTree* this_, int spacing) nothrow;
47734 void gtk_ctree_sort_node(CTree* this_, CTreeNode* node) nothrow;
47735 void gtk_ctree_sort_recursive(CTree* this_, CTreeNode* node) nothrow;
47736 void gtk_ctree_toggle_expansion(CTree* this_, CTreeNode* node) nothrow;
47737 void gtk_ctree_toggle_expansion_recursive(CTree* this_, CTreeNode* node) nothrow;
47738 void gtk_ctree_unselect(CTree* this_, CTreeNode* node) nothrow;
47739 void gtk_ctree_unselect_recursive(CTree* this_, CTreeNode* node) nothrow;
47740 Calendar* gtk_calendar_new() nothrow;
47741 void gtk_calendar_clear_marks(Calendar* this_) nothrow;
47742 void gtk_calendar_display_options(Calendar* this_, CalendarDisplayOptions flags) nothrow;
47743 void gtk_calendar_freeze(Calendar* this_) nothrow;
47744 void gtk_calendar_get_date(Calendar* this_, /*out*/ uint* year=null, /*out*/ uint* month=null, /*out*/ uint* day=null) nothrow;
47745 int gtk_calendar_get_detail_height_rows(Calendar* this_) nothrow;
47746 int gtk_calendar_get_detail_width_chars(Calendar* this_) nothrow;
47747 CalendarDisplayOptions gtk_calendar_get_display_options(Calendar* this_) nothrow;
47748 int gtk_calendar_mark_day(Calendar* this_, uint day) nothrow;
47749 void gtk_calendar_select_day(Calendar* this_, uint day) nothrow;
47750 int gtk_calendar_select_month(Calendar* this_, uint month, uint year) nothrow;
47751 void gtk_calendar_set_detail_func(Calendar* this_, CalendarDetailFunc func, void* data, GLib2.DestroyNotify destroy) nothrow;
47752 void gtk_calendar_set_detail_height_rows(Calendar* this_, int rows) nothrow;
47753 void gtk_calendar_set_detail_width_chars(Calendar* this_, int chars) nothrow;
47754 void gtk_calendar_set_display_options(Calendar* this_, CalendarDisplayOptions flags) nothrow;
47755 void gtk_calendar_thaw(Calendar* this_) nothrow;
47756 int gtk_calendar_unmark_day(Calendar* this_, uint day) nothrow;
47757 void gtk_cell_editable_editing_done(CellEditable* this_) nothrow;
47758 void gtk_cell_editable_remove_widget(CellEditable* this_) nothrow;
47759 void gtk_cell_editable_start_editing(CellEditable* this_, Gdk2.Event* event=null) nothrow;
47760 void gtk_cell_layout_add_attribute(CellLayout* this_, CellRenderer* cell, char* attribute, int column) nothrow;
47761 void gtk_cell_layout_clear(CellLayout* this_) nothrow;
47762 void gtk_cell_layout_clear_attributes(CellLayout* this_, CellRenderer* cell) nothrow;
47763 GLib2.List* /*new container*/ gtk_cell_layout_get_cells(CellLayout* this_) nothrow;
47764 void gtk_cell_layout_pack_end(CellLayout* this_, CellRenderer* cell, int expand) nothrow;
47765 void gtk_cell_layout_pack_start(CellLayout* this_, CellRenderer* cell, int expand) nothrow;
47766 void gtk_cell_layout_reorder(CellLayout* this_, CellRenderer* cell, int position) nothrow;
47767 void gtk_cell_layout_set_attributes(CellLayout* this_, CellRenderer* cell, ...) nothrow;
47768 void gtk_cell_layout_set_cell_data_func(CellLayout* this_, CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy) nothrow;
47769 int gtk_cell_renderer_activate(CellRenderer* this_, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) nothrow;
47770 void gtk_cell_renderer_editing_canceled(CellRenderer* this_) nothrow;
47771 void gtk_cell_renderer_get_alignment(CellRenderer* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null) nothrow;
47772 void gtk_cell_renderer_get_fixed_size(CellRenderer* this_, /*out*/ int* width=null, /*out*/ int* height=null) nothrow;
47773 void gtk_cell_renderer_get_padding(CellRenderer* this_, /*out*/ int* xpad=null, /*out*/ int* ypad=null) nothrow;
47774 int gtk_cell_renderer_get_sensitive(CellRenderer* this_) nothrow;
47775 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) nothrow;
47776 int gtk_cell_renderer_get_visible(CellRenderer* this_) nothrow;
47777 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) nothrow;
47778 void gtk_cell_renderer_set_alignment(CellRenderer* this_, float xalign, float yalign) nothrow;
47779 void gtk_cell_renderer_set_fixed_size(CellRenderer* this_, int width, int height) nothrow;
47780 void gtk_cell_renderer_set_padding(CellRenderer* this_, int xpad, int ypad) nothrow;
47781 void gtk_cell_renderer_set_sensitive(CellRenderer* this_, int sensitive) nothrow;
47782 void gtk_cell_renderer_set_visible(CellRenderer* this_, int visible) nothrow;
47783 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) nothrow;
47784 void gtk_cell_renderer_stop_editing(CellRenderer* this_, int canceled) nothrow;
47785 CellRendererAccel* gtk_cell_renderer_accel_new() nothrow;
47786 CellRendererCombo* gtk_cell_renderer_combo_new() nothrow;
47787 CellRendererPixbuf* gtk_cell_renderer_pixbuf_new() nothrow;
47788 CellRendererProgress* gtk_cell_renderer_progress_new() nothrow;
47789 CellRendererSpin* gtk_cell_renderer_spin_new() nothrow;
47790 CellRendererSpinner* gtk_cell_renderer_spinner_new() nothrow;
47791 CellRendererText* gtk_cell_renderer_text_new() nothrow;
47792 void gtk_cell_renderer_text_set_fixed_height_from_font(CellRendererText* this_, int number_of_rows) nothrow;
47793 CellRendererToggle* gtk_cell_renderer_toggle_new() nothrow;
47794 int gtk_cell_renderer_toggle_get_activatable(CellRendererToggle* this_) nothrow;
47795 int gtk_cell_renderer_toggle_get_active(CellRendererToggle* this_) nothrow;
47796 int gtk_cell_renderer_toggle_get_radio(CellRendererToggle* this_) nothrow;
47797 void gtk_cell_renderer_toggle_set_activatable(CellRendererToggle* this_, int setting) nothrow;
47798 void gtk_cell_renderer_toggle_set_active(CellRendererToggle* this_, int setting) nothrow;
47799 void gtk_cell_renderer_toggle_set_radio(CellRendererToggle* this_, int radio) nothrow;
47800 CellView* gtk_cell_view_new() nothrow;
47801 CellView* gtk_cell_view_new_with_markup(char* markup) nothrow;
47802 CellView* gtk_cell_view_new_with_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) nothrow;
47803 CellView* gtk_cell_view_new_with_text(char* text) nothrow;
47804 GLib2.List* gtk_cell_view_get_cell_renderers(CellView* this_) nothrow;
47805 TreePath* /*new*/ gtk_cell_view_get_displayed_row(CellView* this_) nothrow;
47806 TreeModel* gtk_cell_view_get_model(CellView* this_) nothrow;
47807 int gtk_cell_view_get_size_of_row(CellView* this_, TreePath* path, /*out*/ Requisition* requisition) nothrow;
47808 void gtk_cell_view_set_background_color(CellView* this_, Gdk2.Color* color) nothrow;
47809 void gtk_cell_view_set_displayed_row(CellView* this_, TreePath* path=null) nothrow;
47810 void gtk_cell_view_set_model(CellView* this_, TreeModel* model=null) nothrow;
47811 CheckButton* gtk_check_button_new() nothrow;
47812 CheckButton* gtk_check_button_new_with_label(char* label) nothrow;
47813 CheckButton* gtk_check_button_new_with_mnemonic(char* label) nothrow;
47814 CheckMenuItem* gtk_check_menu_item_new() nothrow;
47815 CheckMenuItem* gtk_check_menu_item_new_with_label(char* label) nothrow;
47816 CheckMenuItem* gtk_check_menu_item_new_with_mnemonic(char* label) nothrow;
47817 int gtk_check_menu_item_get_active(CheckMenuItem* this_) nothrow;
47818 int gtk_check_menu_item_get_draw_as_radio(CheckMenuItem* this_) nothrow;
47819 int gtk_check_menu_item_get_inconsistent(CheckMenuItem* this_) nothrow;
47820 void gtk_check_menu_item_set_active(CheckMenuItem* this_, int is_active) nothrow;
47821 void gtk_check_menu_item_set_draw_as_radio(CheckMenuItem* this_, int draw_as_radio) nothrow;
47822 void gtk_check_menu_item_set_inconsistent(CheckMenuItem* this_, int setting) nothrow;
47823 void gtk_check_menu_item_set_show_toggle(CheckMenuItem* this_, int always) nothrow;
47824 void gtk_check_menu_item_toggled(CheckMenuItem* this_) nothrow;
47825 Clipboard* gtk_clipboard_get(Gdk2.Atom selection) nothrow;
47826 Clipboard* gtk_clipboard_get_for_display(Gdk2.Display* display, Gdk2.Atom selection) nothrow;
47827 void gtk_clipboard_clear(Clipboard* this_) nothrow;
47828 Gdk2.Display* gtk_clipboard_get_display(Clipboard* this_) nothrow;
47829 GObject2.Object* gtk_clipboard_get_owner(Clipboard* this_) nothrow;
47830 void gtk_clipboard_request_contents(Clipboard* this_, Gdk2.Atom target, ClipboardReceivedFunc callback, void* user_data) nothrow;
47831 void gtk_clipboard_request_image(Clipboard* this_, ClipboardImageReceivedFunc callback, void* user_data) nothrow;
47832 void gtk_clipboard_request_rich_text(Clipboard* this_, TextBuffer* buffer, ClipboardRichTextReceivedFunc callback, void* user_data) nothrow;
47833 void gtk_clipboard_request_targets(Clipboard* this_, ClipboardTargetsReceivedFunc callback, void* user_data) nothrow;
47834 void gtk_clipboard_request_text(Clipboard* this_, ClipboardTextReceivedFunc callback, void* user_data) nothrow;
47835 void gtk_clipboard_request_uris(Clipboard* this_, ClipboardURIReceivedFunc callback, void* user_data) nothrow;
47836 void gtk_clipboard_set_can_store(Clipboard* this_, TargetEntry* targets, int n_targets) nothrow;
47837 void gtk_clipboard_set_image(Clipboard* this_, GdkPixbuf2.Pixbuf* pixbuf) nothrow;
47838 void gtk_clipboard_set_text(Clipboard* this_, char* text, int len) nothrow;
47839 int gtk_clipboard_set_with_data(Clipboard* this_, TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, void* user_data) nothrow;
47840 int gtk_clipboard_set_with_owner(Clipboard* this_, TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, GObject2.Object* owner) nothrow;
47841 void gtk_clipboard_store(Clipboard* this_) nothrow;
47842 SelectionData* /*new*/ gtk_clipboard_wait_for_contents(Clipboard* this_, Gdk2.Atom target) nothrow;
47843 GdkPixbuf2.Pixbuf* /*new*/ gtk_clipboard_wait_for_image(Clipboard* this_) nothrow;
47844 ubyte* /*new*/ gtk_clipboard_wait_for_rich_text(Clipboard* this_, TextBuffer* buffer, Gdk2.Atom* format, /*out*/ size_t* length) nothrow;
47845 int gtk_clipboard_wait_for_targets(Clipboard* this_, /*out*/ Gdk2.Atom** targets, /*out*/ int* n_targets) nothrow;
47846 char* /*new*/ gtk_clipboard_wait_for_text(Clipboard* this_) nothrow;
47847 char** /*new*/ gtk_clipboard_wait_for_uris(Clipboard* this_) nothrow;
47848 int gtk_clipboard_wait_is_image_available(Clipboard* this_) nothrow;
47849 int gtk_clipboard_wait_is_rich_text_available(Clipboard* this_, TextBuffer* buffer) nothrow;
47850 int gtk_clipboard_wait_is_target_available(Clipboard* this_, Gdk2.Atom target) nothrow;
47851 int gtk_clipboard_wait_is_text_available(Clipboard* this_) nothrow;
47852 int gtk_clipboard_wait_is_uris_available(Clipboard* this_) nothrow;
47853 ColorButton* gtk_color_button_new() nothrow;
47854 ColorButton* gtk_color_button_new_with_color(Gdk2.Color* color) nothrow;
47855 ushort gtk_color_button_get_alpha(ColorButton* this_) nothrow;
47856 void gtk_color_button_get_color(ColorButton* this_, Gdk2.Color* color) nothrow;
47857 char* gtk_color_button_get_title(ColorButton* this_) nothrow;
47858 int gtk_color_button_get_use_alpha(ColorButton* this_) nothrow;
47859 void gtk_color_button_set_alpha(ColorButton* this_, ushort alpha) nothrow;
47860 void gtk_color_button_set_color(ColorButton* this_, Gdk2.Color* color) nothrow;
47861 void gtk_color_button_set_title(ColorButton* this_, char* title) nothrow;
47862 void gtk_color_button_set_use_alpha(ColorButton* this_, int use_alpha) nothrow;
47863 ColorSelection* gtk_color_selection_new() nothrow;
47864 int gtk_color_selection_palette_from_string(char* str, /*out*/ Gdk2.Color** colors, /*out*/ int* n_colors) nothrow;
47865 char* /*new*/ gtk_color_selection_palette_to_string(Gdk2.Color* colors, int n_colors) nothrow;
47866 ColorSelectionChangePaletteFunc gtk_color_selection_set_change_palette_hook(ColorSelectionChangePaletteFunc func) nothrow;
47867 ColorSelectionChangePaletteWithScreenFunc gtk_color_selection_set_change_palette_with_screen_hook(ColorSelectionChangePaletteWithScreenFunc func) nothrow;
47868 void gtk_color_selection_get_color(ColorSelection* this_, double* color) nothrow;
47869 ushort gtk_color_selection_get_current_alpha(ColorSelection* this_) nothrow;
47870 void gtk_color_selection_get_current_color(ColorSelection* this_, /*out*/ Gdk2.Color* color) nothrow;
47871 int gtk_color_selection_get_has_opacity_control(ColorSelection* this_) nothrow;
47872 int gtk_color_selection_get_has_palette(ColorSelection* this_) nothrow;
47873 ushort gtk_color_selection_get_previous_alpha(ColorSelection* this_) nothrow;
47874 void gtk_color_selection_get_previous_color(ColorSelection* this_, /*out*/ Gdk2.Color* color) nothrow;
47875 int gtk_color_selection_is_adjusting(ColorSelection* this_) nothrow;
47876 void gtk_color_selection_set_color(ColorSelection* this_, double* color) nothrow;
47877 void gtk_color_selection_set_current_alpha(ColorSelection* this_, ushort alpha) nothrow;
47878 void gtk_color_selection_set_current_color(ColorSelection* this_, Gdk2.Color* color) nothrow;
47879 void gtk_color_selection_set_has_opacity_control(ColorSelection* this_, int has_opacity) nothrow;
47880 void gtk_color_selection_set_has_palette(ColorSelection* this_, int has_palette) nothrow;
47881 void gtk_color_selection_set_previous_alpha(ColorSelection* this_, ushort alpha) nothrow;
47882 void gtk_color_selection_set_previous_color(ColorSelection* this_, Gdk2.Color* color) nothrow;
47883 void gtk_color_selection_set_update_policy(ColorSelection* this_, UpdateType policy) nothrow;
47884 ColorSelectionDialog* gtk_color_selection_dialog_new(char* title) nothrow;
47885 Widget* gtk_color_selection_dialog_get_color_selection(ColorSelectionDialog* this_) nothrow;
47886 Combo* gtk_combo_new() nothrow;
47887 void gtk_combo_disable_activate(Combo* this_) nothrow;
47888 void gtk_combo_set_case_sensitive(Combo* this_, int val) nothrow;
47889 void gtk_combo_set_item_string(Combo* this_, Item* item, char* item_value) nothrow;
47890 void gtk_combo_set_popdown_strings(Combo* this_, GLib2.List* strings) nothrow;
47891 void gtk_combo_set_use_arrows(Combo* this_, int val) nothrow;
47892 void gtk_combo_set_use_arrows_always(Combo* this_, int val) nothrow;
47893 void gtk_combo_set_value_in_list(Combo* this_, int val, int ok_if_empty) nothrow;
47894 ComboBox* gtk_combo_box_new() nothrow;
47895 ComboBox* gtk_combo_box_new_text() nothrow;
47896 ComboBox* gtk_combo_box_new_with_entry() nothrow;
47897 ComboBox* gtk_combo_box_new_with_model(TreeModel* model) nothrow;
47898 ComboBox* gtk_combo_box_new_with_model_and_entry(TreeModel* model) nothrow;
47899 void gtk_combo_box_append_text(ComboBox* this_, char* text) nothrow;
47900 int gtk_combo_box_get_active(ComboBox* this_) nothrow;
47901 int gtk_combo_box_get_active_iter(ComboBox* this_, /*out*/ TreeIter* iter) nothrow;
47902 char* /*new*/ gtk_combo_box_get_active_text(ComboBox* this_) nothrow;
47903 int gtk_combo_box_get_add_tearoffs(ComboBox* this_) nothrow;
47904 SensitivityType gtk_combo_box_get_button_sensitivity(ComboBox* this_) nothrow;
47905 int gtk_combo_box_get_column_span_column(ComboBox* this_) nothrow;
47906 int gtk_combo_box_get_entry_text_column(ComboBox* this_) nothrow;
47907 int gtk_combo_box_get_focus_on_click(ComboBox* this_) nothrow;
47908 int gtk_combo_box_get_has_entry(ComboBox* this_) nothrow;
47909 TreeModel* gtk_combo_box_get_model(ComboBox* this_) nothrow;
47910 Atk.Object* gtk_combo_box_get_popup_accessible(ComboBox* this_) nothrow;
47911 TreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func(ComboBox* this_) nothrow;
47912 int gtk_combo_box_get_row_span_column(ComboBox* this_) nothrow;
47913 char* gtk_combo_box_get_title(ComboBox* this_) nothrow;
47914 int gtk_combo_box_get_wrap_width(ComboBox* this_) nothrow;
47915 void gtk_combo_box_insert_text(ComboBox* this_, int position, char* text) nothrow;
47916 void gtk_combo_box_popdown(ComboBox* this_) nothrow;
47917 void gtk_combo_box_popup(ComboBox* this_) nothrow;
47918 void gtk_combo_box_prepend_text(ComboBox* this_, char* text) nothrow;
47919 void gtk_combo_box_remove_text(ComboBox* this_, int position) nothrow;
47920 void gtk_combo_box_set_active(ComboBox* this_, int index_) nothrow;
47921 void gtk_combo_box_set_active_iter(ComboBox* this_, TreeIter* iter=null) nothrow;
47922 void gtk_combo_box_set_add_tearoffs(ComboBox* this_, int add_tearoffs) nothrow;
47923 void gtk_combo_box_set_button_sensitivity(ComboBox* this_, SensitivityType sensitivity) nothrow;
47924 void gtk_combo_box_set_column_span_column(ComboBox* this_, int column_span) nothrow;
47925 void gtk_combo_box_set_entry_text_column(ComboBox* this_, int text_column) nothrow;
47926 void gtk_combo_box_set_focus_on_click(ComboBox* this_, int focus_on_click) nothrow;
47927 void gtk_combo_box_set_model(ComboBox* this_, TreeModel* model=null) nothrow;
47928 void gtk_combo_box_set_row_separator_func(ComboBox* this_, TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null) nothrow;
47929 void gtk_combo_box_set_row_span_column(ComboBox* this_, int row_span) nothrow;
47930 void gtk_combo_box_set_title(ComboBox* this_, char* title) nothrow;
47931 void gtk_combo_box_set_wrap_width(ComboBox* this_, int width) nothrow;
47932 ComboBoxEntry* gtk_combo_box_entry_new() nothrow;
47933 ComboBoxEntry* gtk_combo_box_entry_new_text() nothrow;
47934 ComboBoxEntry* gtk_combo_box_entry_new_with_model(TreeModel* model, int text_column) nothrow;
47935 int gtk_combo_box_entry_get_text_column(ComboBoxEntry* this_) nothrow;
47936 void gtk_combo_box_entry_set_text_column(ComboBoxEntry* this_, int text_column) nothrow;
47937 ComboBoxText* gtk_combo_box_text_new() nothrow;
47938 ComboBoxText* gtk_combo_box_text_new_with_entry() nothrow;
47939 void gtk_combo_box_text_append_text(ComboBoxText* this_, char* text) nothrow;
47940 char* /*new*/ gtk_combo_box_text_get_active_text(ComboBoxText* this_) nothrow;
47941 void gtk_combo_box_text_insert_text(ComboBoxText* this_, int position, char* text) nothrow;
47942 void gtk_combo_box_text_prepend_text(ComboBoxText* this_, char* text) nothrow;
47943 void gtk_combo_box_text_remove(ComboBoxText* this_, int position) nothrow;
47944 void gtk_container_add(Container* this_, Widget* widget) nothrow;
47945 void gtk_container_add_with_properties(Container* this_, Widget* widget, char* first_prop_name, ...) nothrow;
47946 void gtk_container_check_resize(Container* this_) nothrow;
47947 void gtk_container_child_get(Container* this_, Widget* child, char* first_prop_name, ...) nothrow;
47948 void gtk_container_child_get_property(Container* this_, Widget* child, char* property_name, GObject2.Value* value) nothrow;
47949 void gtk_container_child_get_valist(Container* this_, Widget* child, char* first_property_name, va_list var_args) nothrow;
47950 void gtk_container_child_set(Container* this_, Widget* child, char* first_prop_name, ...) nothrow;
47951 void gtk_container_child_set_property(Container* this_, Widget* child, char* property_name, GObject2.Value* value) nothrow;
47952 void gtk_container_child_set_valist(Container* this_, Widget* child, char* first_property_name, va_list var_args) nothrow;
47953 Type gtk_container_child_type(Container* this_) nothrow;
47954 void gtk_container_forall(Container* this_, Callback callback, void* callback_data) nothrow;
47955 void gtk_container_foreach(Container* this_, Callback callback, void* callback_data) nothrow;
47956 void gtk_container_foreach_full(Container* this_, Callback callback, CallbackMarshal marshal, void* callback_data, GLib2.DestroyNotify notify) nothrow;
47957 uint gtk_container_get_border_width(Container* this_) nothrow;
47958 GLib2.List* /*new container*/ gtk_container_get_children(Container* this_) nothrow;
47959 int gtk_container_get_focus_chain(Container* this_, /*out*/ GLib2.List** focusable_widgets) nothrow;
47960 Widget* gtk_container_get_focus_child(Container* this_) nothrow;
47961 Adjustment* gtk_container_get_focus_hadjustment(Container* this_) nothrow;
47962 Adjustment* gtk_container_get_focus_vadjustment(Container* this_) nothrow;
47963 ResizeMode gtk_container_get_resize_mode(Container* this_) nothrow;
47964 void gtk_container_propagate_expose(Container* this_, Widget* child, Gdk2.EventExpose* event) nothrow;
47965 void gtk_container_remove(Container* this_, Widget* widget) nothrow;
47966 void gtk_container_resize_children(Container* this_) nothrow;
47967 void gtk_container_set_border_width(Container* this_, uint border_width) nothrow;
47968 void gtk_container_set_focus_chain(Container* this_, GLib2.List* focusable_widgets) nothrow;
47969 void gtk_container_set_focus_child(Container* this_, Widget* child=null) nothrow;
47970 void gtk_container_set_focus_hadjustment(Container* this_, Adjustment* adjustment) nothrow;
47971 void gtk_container_set_focus_vadjustment(Container* this_, Adjustment* adjustment) nothrow;
47972 void gtk_container_set_reallocate_redraws(Container* this_, int needs_redraws) nothrow;
47973 void gtk_container_set_resize_mode(Container* this_, ResizeMode resize_mode) nothrow;
47974 void gtk_container_unset_focus_chain(Container* this_) nothrow;
47975 GObject2.ParamSpec* gtk_container_class_find_child_property(ContainerClass* this_, char* property_name) nothrow;
47976 void gtk_container_class_install_child_property(ContainerClass* this_, uint property_id, GObject2.ParamSpec* pspec) nothrow;
47977 GObject2.ParamSpec** /*new container*/ gtk_container_class_list_child_properties(ContainerClass* this_, /*out*/ uint* n_properties) nothrow;
47978 Curve* gtk_curve_new() nothrow;
47979 void gtk_curve_get_vector(Curve* this_, int veclen, float vector) nothrow;
47980 void gtk_curve_reset(Curve* this_) nothrow;
47981 void gtk_curve_set_curve_type(Curve* this_, CurveType type) nothrow;
47982 void gtk_curve_set_gamma(Curve* this_, float gamma_) nothrow;
47983 void gtk_curve_set_range(Curve* this_, float min_x, float max_x, float min_y, float max_y) nothrow;
47984 void gtk_curve_set_vector(Curve* this_, int veclen, float vector) nothrow;
47985 Dialog* gtk_dialog_new() nothrow;
47986 Dialog* gtk_dialog_new_with_buttons(char* title, Window* parent, DialogFlags flags, char* first_button_text=null, ...) nothrow;
47987 void gtk_dialog_add_action_widget(Dialog* this_, Widget* child, int response_id) nothrow;
47988 Widget* gtk_dialog_add_button(Dialog* this_, char* button_text, int response_id) nothrow;
47989 void gtk_dialog_add_buttons(Dialog* this_, char* first_button_text, ...) nothrow;
47990 Widget* gtk_dialog_get_action_area(Dialog* this_) nothrow;
47991 Widget* gtk_dialog_get_content_area(Dialog* this_) nothrow;
47992 int gtk_dialog_get_has_separator(Dialog* this_) nothrow;
47993 int gtk_dialog_get_response_for_widget(Dialog* this_, Widget* widget) nothrow;
47994 Widget* gtk_dialog_get_widget_for_response(Dialog* this_, int response_id) nothrow;
47995 void gtk_dialog_response(Dialog* this_, int response_id) nothrow;
47996 int gtk_dialog_run(Dialog* this_) nothrow;
47997 void gtk_dialog_set_alternative_button_order(Dialog* this_, int first_response_id, ...) nothrow;
47998 void gtk_dialog_set_alternative_button_order_from_array(Dialog* this_, int n_params, int* new_order) nothrow;
47999 void gtk_dialog_set_default_response(Dialog* this_, int response_id) nothrow;
48000 void gtk_dialog_set_has_separator(Dialog* this_, int setting) nothrow;
48001 void gtk_dialog_set_response_sensitive(Dialog* this_, int response_id, int setting) nothrow;
48002 DrawingArea* gtk_drawing_area_new() nothrow;
48003 void gtk_drawing_area_size(DrawingArea* this_, int width, int height) nothrow;
48004 void gtk_editable_copy_clipboard(Editable* this_) nothrow;
48005 void gtk_editable_cut_clipboard(Editable* this_) nothrow;
48006 void gtk_editable_delete_selection(Editable* this_) nothrow;
48007 void gtk_editable_delete_text(Editable* this_, int start_pos, int end_pos) nothrow;
48008 char* /*new*/ gtk_editable_get_chars(Editable* this_, int start_pos, int end_pos) nothrow;
48009 int gtk_editable_get_editable(Editable* this_) nothrow;
48010 int gtk_editable_get_position(Editable* this_) nothrow;
48011 int gtk_editable_get_selection_bounds(Editable* this_, /*out*/ int* start_pos=null, /*out*/ int* end_pos=null) nothrow;
48012 void gtk_editable_insert_text(Editable* this_, char* new_text, int new_text_length, /*inout*/ int* position) nothrow;
48013 void gtk_editable_paste_clipboard(Editable* this_) nothrow;
48014 void gtk_editable_select_region(Editable* this_, int start_pos, int end_pos) nothrow;
48015 void gtk_editable_set_editable(Editable* this_, int is_editable) nothrow;
48016 void gtk_editable_set_position(Editable* this_, int position) nothrow;
48017 Entry* gtk_entry_new() nothrow;
48018 Entry* gtk_entry_new_with_buffer(EntryBuffer* buffer) nothrow;
48019 Entry* gtk_entry_new_with_max_length(int max) nothrow;
48020 void gtk_entry_append_text(Entry* this_, char* text) nothrow;
48021 int gtk_entry_get_activates_default(Entry* this_) nothrow;
48022 float gtk_entry_get_alignment(Entry* this_) nothrow;
48023 EntryBuffer* gtk_entry_get_buffer(Entry* this_) nothrow;
48024 EntryCompletion* gtk_entry_get_completion(Entry* this_) nothrow;
48025 int gtk_entry_get_current_icon_drag_source(Entry* this_) nothrow;
48026 Adjustment* gtk_entry_get_cursor_hadjustment(Entry* this_) nothrow;
48027 int gtk_entry_get_has_frame(Entry* this_) nothrow;
48028 int gtk_entry_get_icon_activatable(Entry* this_, EntryIconPosition icon_pos) nothrow;
48029 int gtk_entry_get_icon_at_pos(Entry* this_, int x, int y) nothrow;
48030 Gio2.Icon* gtk_entry_get_icon_gicon(Entry* this_, EntryIconPosition icon_pos) nothrow;
48031 char* gtk_entry_get_icon_name(Entry* this_, EntryIconPosition icon_pos) nothrow;
48032 GdkPixbuf2.Pixbuf* gtk_entry_get_icon_pixbuf(Entry* this_, EntryIconPosition icon_pos) nothrow;
48033 int gtk_entry_get_icon_sensitive(Entry* this_, EntryIconPosition icon_pos) nothrow;
48034 char* gtk_entry_get_icon_stock(Entry* this_, EntryIconPosition icon_pos) nothrow;
48035 ImageType gtk_entry_get_icon_storage_type(Entry* this_, EntryIconPosition icon_pos) nothrow;
48036 char* /*new*/ gtk_entry_get_icon_tooltip_markup(Entry* this_, EntryIconPosition icon_pos) nothrow;
48037 char* /*new*/ gtk_entry_get_icon_tooltip_text(Entry* this_, EntryIconPosition icon_pos) nothrow;
48038 Gdk2.Window* gtk_entry_get_icon_window(Entry* this_, EntryIconPosition icon_pos) nothrow;
48039 Border* gtk_entry_get_inner_border(Entry* this_) nothrow;
48040 dchar gtk_entry_get_invisible_char(Entry* this_) nothrow;
48041 Pango.Layout* gtk_entry_get_layout(Entry* this_) nothrow;
48042 void gtk_entry_get_layout_offsets(Entry* this_, /*out*/ int* x=null, /*out*/ int* y=null) nothrow;
48043 int gtk_entry_get_max_length(Entry* this_) nothrow;
48044 int gtk_entry_get_overwrite_mode(Entry* this_) nothrow;
48045 double gtk_entry_get_progress_fraction(Entry* this_) nothrow;
48046 double gtk_entry_get_progress_pulse_step(Entry* this_) nothrow;
48047 char* gtk_entry_get_text(Entry* this_) nothrow;
48048 ushort gtk_entry_get_text_length(Entry* this_) nothrow;
48049 Gdk2.Window* gtk_entry_get_text_window(Entry* this_) nothrow;
48050 int gtk_entry_get_visibility(Entry* this_) nothrow;
48051 int gtk_entry_get_width_chars(Entry* this_) nothrow;
48052 int gtk_entry_im_context_filter_keypress(Entry* this_, Gdk2.EventKey* event) nothrow;
48053 int gtk_entry_layout_index_to_text_index(Entry* this_, int layout_index) nothrow;
48054 void gtk_entry_prepend_text(Entry* this_, char* text) nothrow;
48055 void gtk_entry_progress_pulse(Entry* this_) nothrow;
48056 void gtk_entry_reset_im_context(Entry* this_) nothrow;
48057 void gtk_entry_select_region(Entry* this_, int start, int end) nothrow;
48058 void gtk_entry_set_activates_default(Entry* this_, int setting) nothrow;
48059 void gtk_entry_set_alignment(Entry* this_, float xalign) nothrow;
48060 void gtk_entry_set_buffer(Entry* this_, EntryBuffer* buffer) nothrow;
48061 void gtk_entry_set_completion(Entry* this_, EntryCompletion* completion=null) nothrow;
48062 void gtk_entry_set_cursor_hadjustment(Entry* this_, Adjustment* adjustment) nothrow;
48063 void gtk_entry_set_editable(Entry* this_, int editable) nothrow;
48064 void gtk_entry_set_has_frame(Entry* this_, int setting) nothrow;
48065 void gtk_entry_set_icon_activatable(Entry* this_, EntryIconPosition icon_pos, int activatable) nothrow;
48066 void gtk_entry_set_icon_drag_source(Entry* this_, EntryIconPosition icon_pos, TargetList* target_list, Gdk2.DragAction actions) nothrow;
48067 void gtk_entry_set_icon_from_gicon(Entry* this_, EntryIconPosition icon_pos, Gio2.Icon* icon=null) nothrow;
48068 void gtk_entry_set_icon_from_icon_name(Entry* this_, EntryIconPosition icon_pos, char* icon_name=null) nothrow;
48069 void gtk_entry_set_icon_from_pixbuf(Entry* this_, EntryIconPosition icon_pos, GdkPixbuf2.Pixbuf* pixbuf=null) nothrow;
48070 void gtk_entry_set_icon_from_stock(Entry* this_, EntryIconPosition icon_pos, char* stock_id=null) nothrow;
48071 void gtk_entry_set_icon_sensitive(Entry* this_, EntryIconPosition icon_pos, int sensitive) nothrow;
48072 void gtk_entry_set_icon_tooltip_markup(Entry* this_, EntryIconPosition icon_pos, char* tooltip=null) nothrow;
48073 void gtk_entry_set_icon_tooltip_text(Entry* this_, EntryIconPosition icon_pos, char* tooltip=null) nothrow;
48074 void gtk_entry_set_inner_border(Entry* this_, Border* border=null) nothrow;
48075 void gtk_entry_set_invisible_char(Entry* this_, dchar ch) nothrow;
48076 void gtk_entry_set_max_length(Entry* this_, int max) nothrow;
48077 void gtk_entry_set_overwrite_mode(Entry* this_, int overwrite) nothrow;
48078 void gtk_entry_set_position(Entry* this_, int position) nothrow;
48079 void gtk_entry_set_progress_fraction(Entry* this_, double fraction) nothrow;
48080 void gtk_entry_set_progress_pulse_step(Entry* this_, double fraction) nothrow;
48081 void gtk_entry_set_text(Entry* this_, char* text) nothrow;
48082 void gtk_entry_set_visibility(Entry* this_, int visible) nothrow;
48083 void gtk_entry_set_width_chars(Entry* this_, int n_chars) nothrow;
48084 int gtk_entry_text_index_to_layout_index(Entry* this_, int text_index) nothrow;
48085 void gtk_entry_unset_invisible_char(Entry* this_) nothrow;
48086 EntryBuffer* /*new*/ gtk_entry_buffer_new(char* initial_chars, int n_initial_chars) nothrow;
48087 uint gtk_entry_buffer_delete_text(EntryBuffer* this_, uint position, int n_chars) nothrow;
48088 void gtk_entry_buffer_emit_deleted_text(EntryBuffer* this_, uint position, uint n_chars) nothrow;
48089 void gtk_entry_buffer_emit_inserted_text(EntryBuffer* this_, uint position, char* chars, uint n_chars) nothrow;
48090 size_t gtk_entry_buffer_get_bytes(EntryBuffer* this_) nothrow;
48091 uint gtk_entry_buffer_get_length(EntryBuffer* this_) nothrow;
48092 int gtk_entry_buffer_get_max_length(EntryBuffer* this_) nothrow;
48093 char* gtk_entry_buffer_get_text(EntryBuffer* this_) nothrow;
48094 uint gtk_entry_buffer_insert_text(EntryBuffer* this_, uint position, char* chars, int n_chars) nothrow;
48095 void gtk_entry_buffer_set_max_length(EntryBuffer* this_, int max_length) nothrow;
48096 void gtk_entry_buffer_set_text(EntryBuffer* this_, char* chars, int n_chars) nothrow;
48097 EntryCompletion* /*new*/ gtk_entry_completion_new() nothrow;
48098 void gtk_entry_completion_complete(EntryCompletion* this_) nothrow;
48099 void gtk_entry_completion_delete_action(EntryCompletion* this_, int index_) nothrow;
48100 char* gtk_entry_completion_get_completion_prefix(EntryCompletion* this_) nothrow;
48101 Widget* gtk_entry_completion_get_entry(EntryCompletion* this_) nothrow;
48102 int gtk_entry_completion_get_inline_completion(EntryCompletion* this_) nothrow;
48103 int gtk_entry_completion_get_inline_selection(EntryCompletion* this_) nothrow;
48104 int gtk_entry_completion_get_minimum_key_length(EntryCompletion* this_) nothrow;
48105 TreeModel* gtk_entry_completion_get_model(EntryCompletion* this_) nothrow;
48106 int gtk_entry_completion_get_popup_completion(EntryCompletion* this_) nothrow;
48107 int gtk_entry_completion_get_popup_set_width(EntryCompletion* this_) nothrow;
48108 int gtk_entry_completion_get_popup_single_match(EntryCompletion* this_) nothrow;
48109 int gtk_entry_completion_get_text_column(EntryCompletion* this_) nothrow;
48110 void gtk_entry_completion_insert_action_markup(EntryCompletion* this_, int index_, char* markup) nothrow;
48111 void gtk_entry_completion_insert_action_text(EntryCompletion* this_, int index_, char* text) nothrow;
48112 void gtk_entry_completion_insert_prefix(EntryCompletion* this_) nothrow;
48113 void gtk_entry_completion_set_inline_completion(EntryCompletion* this_, int inline_completion) nothrow;
48114 void gtk_entry_completion_set_inline_selection(EntryCompletion* this_, int inline_selection) nothrow;
48115 void gtk_entry_completion_set_match_func(EntryCompletion* this_, EntryCompletionMatchFunc func, void* func_data, GLib2.DestroyNotify func_notify) nothrow;
48116 void gtk_entry_completion_set_minimum_key_length(EntryCompletion* this_, int length) nothrow;
48117 void gtk_entry_completion_set_model(EntryCompletion* this_, TreeModel* model=null) nothrow;
48118 void gtk_entry_completion_set_popup_completion(EntryCompletion* this_, int popup_completion) nothrow;
48119 void gtk_entry_completion_set_popup_set_width(EntryCompletion* this_, int popup_set_width) nothrow;
48120 void gtk_entry_completion_set_popup_single_match(EntryCompletion* this_, int popup_single_match) nothrow;
48121 void gtk_entry_completion_set_text_column(EntryCompletion* this_, int column) nothrow;
48122 EventBox* gtk_event_box_new() nothrow;
48123 int gtk_event_box_get_above_child(EventBox* this_) nothrow;
48124 int gtk_event_box_get_visible_window(EventBox* this_) nothrow;
48125 void gtk_event_box_set_above_child(EventBox* this_, int above_child) nothrow;
48126 void gtk_event_box_set_visible_window(EventBox* this_, int visible_window) nothrow;
48127 Expander* gtk_expander_new(char* label) nothrow;
48128 Expander* gtk_expander_new_with_mnemonic(char* label=null) nothrow;
48129 int gtk_expander_get_expanded(Expander* this_) nothrow;
48130 char* gtk_expander_get_label(Expander* this_) nothrow;
48131 int gtk_expander_get_label_fill(Expander* this_) nothrow;
48132 Widget* gtk_expander_get_label_widget(Expander* this_) nothrow;
48133 int gtk_expander_get_spacing(Expander* this_) nothrow;
48134 int gtk_expander_get_use_markup(Expander* this_) nothrow;
48135 int gtk_expander_get_use_underline(Expander* this_) nothrow;
48136 void gtk_expander_set_expanded(Expander* this_, int expanded) nothrow;
48137 void gtk_expander_set_label(Expander* this_, char* label=null) nothrow;
48138 void gtk_expander_set_label_fill(Expander* this_, int label_fill) nothrow;
48139 void gtk_expander_set_label_widget(Expander* this_, Widget* label_widget=null) nothrow;
48140 void gtk_expander_set_spacing(Expander* this_, int spacing) nothrow;
48141 void gtk_expander_set_use_markup(Expander* this_, int use_markup) nothrow;
48142 void gtk_expander_set_use_underline(Expander* this_, int use_underline) nothrow;
48143 void gtk_file_chooser_add_filter(FileChooser* this_, FileFilter* filter) nothrow;
48144 int gtk_file_chooser_add_shortcut_folder(FileChooser* this_, char* folder, GLib2.Error** error) nothrow;
48145 int gtk_file_chooser_add_shortcut_folder_uri(FileChooser* this_, char* uri, GLib2.Error** error) nothrow;
48146 FileChooserAction gtk_file_chooser_get_action(FileChooser* this_) nothrow;
48147 int gtk_file_chooser_get_create_folders(FileChooser* this_) nothrow;
48148 char* /*new*/ gtk_file_chooser_get_current_folder(FileChooser* this_) nothrow;
48149 Gio2.File* /*new*/ gtk_file_chooser_get_current_folder_file(FileChooser* this_) nothrow;
48150 char* /*new*/ gtk_file_chooser_get_current_folder_uri(FileChooser* this_) nothrow;
48151 int gtk_file_chooser_get_do_overwrite_confirmation(FileChooser* this_) nothrow;
48152 Widget* gtk_file_chooser_get_extra_widget(FileChooser* this_) nothrow;
48153 Gio2.File* /*new*/ gtk_file_chooser_get_file(FileChooser* this_) nothrow;
48154 char* /*new*/ gtk_file_chooser_get_filename(FileChooser* this_) nothrow;
48155 GLib2.SList* /*new*/ gtk_file_chooser_get_filenames(FileChooser* this_) nothrow;
48156 GLib2.SList* /*new*/ gtk_file_chooser_get_files(FileChooser* this_) nothrow;
48157 FileFilter* gtk_file_chooser_get_filter(FileChooser* this_) nothrow;
48158 int gtk_file_chooser_get_local_only(FileChooser* this_) nothrow;
48159 Gio2.File* /*new*/ gtk_file_chooser_get_preview_file(FileChooser* this_) nothrow;
48160 char* /*new*/ gtk_file_chooser_get_preview_filename(FileChooser* this_) nothrow;
48161 char* /*new*/ gtk_file_chooser_get_preview_uri(FileChooser* this_) nothrow;
48162 Widget* gtk_file_chooser_get_preview_widget(FileChooser* this_) nothrow;
48163 int gtk_file_chooser_get_preview_widget_active(FileChooser* this_) nothrow;
48164 int gtk_file_chooser_get_select_multiple(FileChooser* this_) nothrow;
48165 int gtk_file_chooser_get_show_hidden(FileChooser* this_) nothrow;
48166 char* /*new*/ gtk_file_chooser_get_uri(FileChooser* this_) nothrow;
48167 GLib2.SList* /*new*/ gtk_file_chooser_get_uris(FileChooser* this_) nothrow;
48168 int gtk_file_chooser_get_use_preview_label(FileChooser* this_) nothrow;
48169 GLib2.SList* /*new container*/ gtk_file_chooser_list_filters(FileChooser* this_) nothrow;
48170 GLib2.SList* /*new*/ gtk_file_chooser_list_shortcut_folder_uris(FileChooser* this_) nothrow;
48171 GLib2.SList* /*new*/ gtk_file_chooser_list_shortcut_folders(FileChooser* this_) nothrow;
48172 void gtk_file_chooser_remove_filter(FileChooser* this_, FileFilter* filter) nothrow;
48173 int gtk_file_chooser_remove_shortcut_folder(FileChooser* this_, char* folder, GLib2.Error** error) nothrow;
48174 int gtk_file_chooser_remove_shortcut_folder_uri(FileChooser* this_, char* uri, GLib2.Error** error) nothrow;
48175 void gtk_file_chooser_select_all(FileChooser* this_) nothrow;
48176 int gtk_file_chooser_select_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error) nothrow;
48177 int gtk_file_chooser_select_filename(FileChooser* this_, char* filename) nothrow;
48178 int gtk_file_chooser_select_uri(FileChooser* this_, char* uri) nothrow;
48179 void gtk_file_chooser_set_action(FileChooser* this_, FileChooserAction action) nothrow;
48180 void gtk_file_chooser_set_create_folders(FileChooser* this_, int create_folders) nothrow;
48181 int gtk_file_chooser_set_current_folder(FileChooser* this_, char* filename) nothrow;
48182 int gtk_file_chooser_set_current_folder_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error) nothrow;
48183 int gtk_file_chooser_set_current_folder_uri(FileChooser* this_, char* uri) nothrow;
48184 void gtk_file_chooser_set_current_name(FileChooser* this_, char* name) nothrow;
48185 void gtk_file_chooser_set_do_overwrite_confirmation(FileChooser* this_, int do_overwrite_confirmation) nothrow;
48186 void gtk_file_chooser_set_extra_widget(FileChooser* this_, Widget* extra_widget) nothrow;
48187 int gtk_file_chooser_set_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error) nothrow;
48188 int gtk_file_chooser_set_filename(FileChooser* this_, char* filename) nothrow;
48189 void gtk_file_chooser_set_filter(FileChooser* this_, FileFilter* filter) nothrow;
48190 void gtk_file_chooser_set_local_only(FileChooser* this_, int local_only) nothrow;
48191 void gtk_file_chooser_set_preview_widget(FileChooser* this_, Widget* preview_widget) nothrow;
48192 void gtk_file_chooser_set_preview_widget_active(FileChooser* this_, int active) nothrow;
48193 void gtk_file_chooser_set_select_multiple(FileChooser* this_, int select_multiple) nothrow;
48194 void gtk_file_chooser_set_show_hidden(FileChooser* this_, int show_hidden) nothrow;
48195 int gtk_file_chooser_set_uri(FileChooser* this_, char* uri) nothrow;
48196 void gtk_file_chooser_set_use_preview_label(FileChooser* this_, int use_label) nothrow;
48197 void gtk_file_chooser_unselect_all(FileChooser* this_) nothrow;
48198 void gtk_file_chooser_unselect_file(FileChooser* this_, Gio2.File* file) nothrow;
48199 void gtk_file_chooser_unselect_filename(FileChooser* this_, char* filename) nothrow;
48200 void gtk_file_chooser_unselect_uri(FileChooser* this_, char* uri) nothrow;
48201 FileChooserButton* gtk_file_chooser_button_new(char* title, FileChooserAction action) nothrow;
48202 FileChooserButton* gtk_file_chooser_button_new_with_backend(char* title, FileChooserAction action, char* backend) nothrow;
48203 FileChooserButton* gtk_file_chooser_button_new_with_dialog(Widget* dialog) nothrow;
48204 int gtk_file_chooser_button_get_focus_on_click(FileChooserButton* this_) nothrow;
48205 char* gtk_file_chooser_button_get_title(FileChooserButton* this_) nothrow;
48206 int gtk_file_chooser_button_get_width_chars(FileChooserButton* this_) nothrow;
48207 void gtk_file_chooser_button_set_focus_on_click(FileChooserButton* this_, int focus_on_click) nothrow;
48208 void gtk_file_chooser_button_set_title(FileChooserButton* this_, char* title) nothrow;
48209 void gtk_file_chooser_button_set_width_chars(FileChooserButton* this_, int n_chars) nothrow;
48210 FileChooserDialog* gtk_file_chooser_dialog_new(char* title, Window* parent, FileChooserAction action, char* first_button_text=null, ...) nothrow;
48211 FileChooserDialog* gtk_file_chooser_dialog_new_with_backend(char* title, Window* parent, FileChooserAction action, char* backend, char* first_button_text=null, ...) nothrow;
48212 FileChooserWidget* gtk_file_chooser_widget_new(FileChooserAction action) nothrow;
48213 FileChooserWidget* gtk_file_chooser_widget_new_with_backend(FileChooserAction action, char* backend) nothrow;
48214 FileFilter* gtk_file_filter_new() nothrow;
48215 void gtk_file_filter_add_custom(FileFilter* this_, FileFilterFlags needed, FileFilterFunc func, void* data, GLib2.DestroyNotify notify) nothrow;
48216 void gtk_file_filter_add_mime_type(FileFilter* this_, char* mime_type) nothrow;
48217 void gtk_file_filter_add_pattern(FileFilter* this_, char* pattern) nothrow;
48218 void gtk_file_filter_add_pixbuf_formats(FileFilter* this_) nothrow;
48219 int gtk_file_filter_filter(FileFilter* this_, FileFilterInfo* filter_info) nothrow;
48220 char* gtk_file_filter_get_name(FileFilter* this_) nothrow;
48221 FileFilterFlags gtk_file_filter_get_needed(FileFilter* this_) nothrow;
48222 void gtk_file_filter_set_name(FileFilter* this_, char* name=null) nothrow;
48223 FileSelection* gtk_file_selection_new(char* title) nothrow;
48224 void gtk_file_selection_complete(FileSelection* this_, char* pattern) nothrow;
48225 char* gtk_file_selection_get_filename(FileSelection* this_) nothrow;
48226 int gtk_file_selection_get_select_multiple(FileSelection* this_) nothrow;
48227 char** gtk_file_selection_get_selections(FileSelection* this_) nothrow;
48228 void gtk_file_selection_hide_fileop_buttons(FileSelection* this_) nothrow;
48229 void gtk_file_selection_set_filename(FileSelection* this_, char* filename) nothrow;
48230 void gtk_file_selection_set_select_multiple(FileSelection* this_, int select_multiple) nothrow;
48231 void gtk_file_selection_show_fileop_buttons(FileSelection* this_) nothrow;
48232 Fixed* gtk_fixed_new() nothrow;
48233 int gtk_fixed_get_has_window(Fixed* this_) nothrow;
48234 void gtk_fixed_move(Fixed* this_, Widget* widget, int x, int y) nothrow;
48235 void gtk_fixed_put(Fixed* this_, Widget* widget, int x, int y) nothrow;
48236 void gtk_fixed_set_has_window(Fixed* this_, int has_window) nothrow;
48237 FontButton* gtk_font_button_new() nothrow;
48238 FontButton* gtk_font_button_new_with_font(char* fontname) nothrow;
48239 char* gtk_font_button_get_font_name(FontButton* this_) nothrow;
48240 int gtk_font_button_get_show_size(FontButton* this_) nothrow;
48241 int gtk_font_button_get_show_style(FontButton* this_) nothrow;
48242 char* gtk_font_button_get_title(FontButton* this_) nothrow;
48243 int gtk_font_button_get_use_font(FontButton* this_) nothrow;
48244 int gtk_font_button_get_use_size(FontButton* this_) nothrow;
48245 int gtk_font_button_set_font_name(FontButton* this_, char* fontname) nothrow;
48246 void gtk_font_button_set_show_size(FontButton* this_, int show_size) nothrow;
48247 void gtk_font_button_set_show_style(FontButton* this_, int show_style) nothrow;
48248 void gtk_font_button_set_title(FontButton* this_, char* title) nothrow;
48249 void gtk_font_button_set_use_font(FontButton* this_, int use_font) nothrow;
48250 void gtk_font_button_set_use_size(FontButton* this_, int use_size) nothrow;
48251 FontSelection* gtk_font_selection_new() nothrow;
48252 Pango.FontFace* gtk_font_selection_get_face(FontSelection* this_) nothrow;
48253 Widget* gtk_font_selection_get_face_list(FontSelection* this_) nothrow;
48254 Pango.FontFamily* gtk_font_selection_get_family(FontSelection* this_) nothrow;
48255 Widget* gtk_font_selection_get_family_list(FontSelection* this_) nothrow;
48256 Gdk2.Font* /*new*/ gtk_font_selection_get_font(FontSelection* this_) nothrow;
48257 char* /*new*/ gtk_font_selection_get_font_name(FontSelection* this_) nothrow;
48258 Widget* gtk_font_selection_get_preview_entry(FontSelection* this_) nothrow;
48259 char* gtk_font_selection_get_preview_text(FontSelection* this_) nothrow;
48260 int gtk_font_selection_get_size(FontSelection* this_) nothrow;
48261 Widget* gtk_font_selection_get_size_entry(FontSelection* this_) nothrow;
48262 Widget* gtk_font_selection_get_size_list(FontSelection* this_) nothrow;
48263 int gtk_font_selection_set_font_name(FontSelection* this_, char* fontname) nothrow;
48264 void gtk_font_selection_set_preview_text(FontSelection* this_, char* text) nothrow;
48265 FontSelectionDialog* gtk_font_selection_dialog_new(char* title) nothrow;
48266 Widget* gtk_font_selection_dialog_get_apply_button(FontSelectionDialog* this_) nothrow;
48267 Widget* gtk_font_selection_dialog_get_cancel_button(FontSelectionDialog* this_) nothrow;
48268 Gdk2.Font* /*new*/ gtk_font_selection_dialog_get_font(FontSelectionDialog* this_) nothrow;
48269 char* /*new*/ gtk_font_selection_dialog_get_font_name(FontSelectionDialog* this_) nothrow;
48270 Widget* gtk_font_selection_dialog_get_font_selection(FontSelectionDialog* this_) nothrow;
48271 Widget* gtk_font_selection_dialog_get_ok_button(FontSelectionDialog* this_) nothrow;
48272 char* gtk_font_selection_dialog_get_preview_text(FontSelectionDialog* this_) nothrow;
48273 int gtk_font_selection_dialog_set_font_name(FontSelectionDialog* this_, char* fontname) nothrow;
48274 void gtk_font_selection_dialog_set_preview_text(FontSelectionDialog* this_, char* text) nothrow;
48275 Frame* gtk_frame_new(char* label) nothrow;
48276 char* gtk_frame_get_label(Frame* this_) nothrow;
48277 void gtk_frame_get_label_align(Frame* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null) nothrow;
48278 Widget* gtk_frame_get_label_widget(Frame* this_) nothrow;
48279 ShadowType gtk_frame_get_shadow_type(Frame* this_) nothrow;
48280 void gtk_frame_set_label(Frame* this_, char* label=null) nothrow;
48281 void gtk_frame_set_label_align(Frame* this_, float xalign, float yalign) nothrow;
48282 void gtk_frame_set_label_widget(Frame* this_, Widget* label_widget) nothrow;
48283 void gtk_frame_set_shadow_type(Frame* this_, ShadowType type) nothrow;
48284 GammaCurve* gtk_gamma_curve_new() nothrow;
48285 HBox* gtk_hbox_new(int homogeneous, int spacing) nothrow;
48286 HButtonBox* gtk_hbutton_box_new() nothrow;
48287 ButtonBoxStyle gtk_hbutton_box_get_layout_default() nothrow;
48288 int gtk_hbutton_box_get_spacing_default() nothrow;
48289 void gtk_hbutton_box_set_layout_default(ButtonBoxStyle layout) nothrow;
48290 void gtk_hbutton_box_set_spacing_default(int spacing) nothrow;
48291 HPaned* gtk_hpaned_new() nothrow;
48292 HRuler* gtk_hruler_new() nothrow;
48293 HSV* gtk_hsv_new() nothrow;
48294 void gtk_hsv_to_rgb(double h, double s, double v, /*out*/ double* r, /*out*/ double* g, /*out*/ double* b) nothrow;
48295 void gtk_hsv_get_color(HSV* this_, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v) nothrow;
48296 void gtk_hsv_get_metrics(HSV* this_, /*out*/ int* size, /*out*/ int* ring_width) nothrow;
48297 int gtk_hsv_is_adjusting(HSV* this_) nothrow;
48298 void gtk_hsv_set_color(HSV* this_, double h, double s, double v) nothrow;
48299 void gtk_hsv_set_metrics(HSV* this_, int size, int ring_width) nothrow;
48300 HScale* gtk_hscale_new(Adjustment* adjustment) nothrow;
48301 HScale* gtk_hscale_new_with_range(double min, double max, double step) nothrow;
48302 HScrollbar* gtk_hscrollbar_new(Adjustment* adjustment=null) nothrow;
48303 HSeparator* gtk_hseparator_new() nothrow;
48304 HandleBox* gtk_handle_box_new() nothrow;
48305 int gtk_handle_box_get_child_detached(HandleBox* this_) nothrow;
48306 PositionType gtk_handle_box_get_handle_position(HandleBox* this_) nothrow;
48307 ShadowType gtk_handle_box_get_shadow_type(HandleBox* this_) nothrow;
48308 PositionType gtk_handle_box_get_snap_edge(HandleBox* this_) nothrow;
48309 void gtk_handle_box_set_handle_position(HandleBox* this_, PositionType position) nothrow;
48310 void gtk_handle_box_set_shadow_type(HandleBox* this_, ShadowType type) nothrow;
48311 void gtk_handle_box_set_snap_edge(HandleBox* this_, PositionType edge) nothrow;
48312 int gtk_im_context_delete_surrounding(IMContext* this_, int offset, int n_chars) nothrow;
48313 int gtk_im_context_filter_keypress(IMContext* this_, Gdk2.EventKey* event) nothrow;
48314 void gtk_im_context_focus_in(IMContext* this_) nothrow;
48315 void gtk_im_context_focus_out(IMContext* this_) nothrow;
48316 void gtk_im_context_get_preedit_string(IMContext* this_, /*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos) nothrow;
48317 int gtk_im_context_get_surrounding(IMContext* this_, /*out*/ char** text, int* cursor_index) nothrow;
48318 void gtk_im_context_reset(IMContext* this_) nothrow;
48319 void gtk_im_context_set_client_window(IMContext* this_, Gdk2.Window* window=null) nothrow;
48320 void gtk_im_context_set_cursor_location(IMContext* this_, Gdk2.Rectangle* area) nothrow;
48321 void gtk_im_context_set_surrounding(IMContext* this_, char* text, int len, int cursor_index) nothrow;
48322 void gtk_im_context_set_use_preedit(IMContext* this_, int use_preedit) nothrow;
48323 IMContextSimple* /*new*/ gtk_im_context_simple_new() nothrow;
48324 void gtk_im_context_simple_add_table(IMContextSimple* this_, ushort* data, int max_seq_len, int n_seqs) nothrow;
48325 IMMulticontext* /*new*/ gtk_im_multicontext_new() nothrow;
48326 void gtk_im_multicontext_append_menuitems(IMMulticontext* this_, MenuShell* menushell) nothrow;
48327 char* gtk_im_multicontext_get_context_id(IMMulticontext* this_) nothrow;
48328 void gtk_im_multicontext_set_context_id(IMMulticontext* this_, char* context_id) nothrow;
48329 IconFactory* /*new*/ gtk_icon_factory_new() nothrow;
48330 IconSet* gtk_icon_factory_lookup_default(char* stock_id) nothrow;
48331 void gtk_icon_factory_add(IconFactory* this_, char* stock_id, IconSet* icon_set) nothrow;
48332 void gtk_icon_factory_add_default(IconFactory* this_) nothrow;
48333 IconSet* gtk_icon_factory_lookup(IconFactory* this_, char* stock_id) nothrow;
48334 void gtk_icon_factory_remove_default(IconFactory* this_) nothrow;
48335 IconInfo* /*new*/ gtk_icon_info_new_for_pixbuf(IconTheme* icon_theme, GdkPixbuf2.Pixbuf* pixbuf) nothrow;
48336 IconInfo* /*new*/ gtk_icon_info_copy(IconInfo* this_) nothrow;
48337 void gtk_icon_info_free(IconInfo* this_) nothrow;
48338 int gtk_icon_info_get_attach_points(IconInfo* this_, Gdk2.Point** points=null, int* n_points=null) nothrow;
48339 int gtk_icon_info_get_base_size(IconInfo* this_) nothrow;
48340 GdkPixbuf2.Pixbuf* gtk_icon_info_get_builtin_pixbuf(IconInfo* this_) nothrow;
48341 char* gtk_icon_info_get_display_name(IconInfo* this_) nothrow;
48342 int gtk_icon_info_get_embedded_rect(IconInfo* this_, /*out*/ Gdk2.Rectangle* rectangle) nothrow;
48343 char* gtk_icon_info_get_filename(IconInfo* this_) nothrow;
48344 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_info_load_icon(IconInfo* this_, GLib2.Error** error) nothrow;
48345 void gtk_icon_info_set_raw_coordinates(IconInfo* this_, int raw_coordinates) nothrow;
48346 IconSet* /*new*/ gtk_icon_set_new() nothrow;
48347 IconSet* /*new*/ gtk_icon_set_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) nothrow;
48348 void gtk_icon_set_add_source(IconSet* this_, IconSource* source) nothrow;
48349 IconSet* /*new*/ gtk_icon_set_copy(IconSet* this_) nothrow;
48350 void gtk_icon_set_get_sizes(IconSet* this_, /*out*/ IconSize** sizes, /*out*/ int* n_sizes) nothrow;
48351 IconSet* /*new*/ gtk_icon_set_ref(IconSet* this_) nothrow;
48352 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_set_render_icon(IconSet* this_, Style* style, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null) nothrow;
48353 void gtk_icon_set_unref(IconSet* this_) nothrow;
48354 IconSource* /*new*/ gtk_icon_source_new() nothrow;
48355 IconSource* /*new*/ gtk_icon_source_copy(IconSource* this_) nothrow;
48356 void gtk_icon_source_free(IconSource* this_) nothrow;
48357 TextDirection gtk_icon_source_get_direction(IconSource* this_) nothrow;
48358 int gtk_icon_source_get_direction_wildcarded(IconSource* this_) nothrow;
48359 char* gtk_icon_source_get_filename(IconSource* this_) nothrow;
48360 char* gtk_icon_source_get_icon_name(IconSource* this_) nothrow;
48361 GdkPixbuf2.Pixbuf* gtk_icon_source_get_pixbuf(IconSource* this_) nothrow;
48362 IconSize gtk_icon_source_get_size(IconSource* this_) nothrow;
48363 int gtk_icon_source_get_size_wildcarded(IconSource* this_) nothrow;
48364 StateType gtk_icon_source_get_state(IconSource* this_) nothrow;
48365 int gtk_icon_source_get_state_wildcarded(IconSource* this_) nothrow;
48366 void gtk_icon_source_set_direction(IconSource* this_, TextDirection direction) nothrow;
48367 void gtk_icon_source_set_direction_wildcarded(IconSource* this_, int setting) nothrow;
48368 void gtk_icon_source_set_filename(IconSource* this_, char* filename) nothrow;
48369 void gtk_icon_source_set_icon_name(IconSource* this_, char* icon_name=null) nothrow;
48370 void gtk_icon_source_set_pixbuf(IconSource* this_, GdkPixbuf2.Pixbuf* pixbuf) nothrow;
48371 void gtk_icon_source_set_size(IconSource* this_, IconSize size) nothrow;
48372 void gtk_icon_source_set_size_wildcarded(IconSource* this_, int setting) nothrow;
48373 void gtk_icon_source_set_state(IconSource* this_, StateType state) nothrow;
48374 void gtk_icon_source_set_state_wildcarded(IconSource* this_, int setting) nothrow;
48375 IconTheme* /*new*/ gtk_icon_theme_new() nothrow;
48376 void gtk_icon_theme_add_builtin_icon(char* icon_name, int size, GdkPixbuf2.Pixbuf* pixbuf) nothrow;
48377 IconTheme* gtk_icon_theme_get_default() nothrow;
48378 IconTheme* gtk_icon_theme_get_for_screen(Gdk2.Screen* screen) nothrow;
48379 void gtk_icon_theme_append_search_path(IconTheme* this_, char* path) nothrow;
48380 IconInfo* /*new*/ gtk_icon_theme_choose_icon(IconTheme* this_, char* icon_names, int size, IconLookupFlags flags) nothrow;
48381 char* /*new*/ gtk_icon_theme_get_example_icon_name(IconTheme* this_) nothrow;
48382 int* gtk_icon_theme_get_icon_sizes(IconTheme* this_, char* icon_name) nothrow;
48383 void gtk_icon_theme_get_search_path(IconTheme* this_, char** path, int* n_elements) nothrow;
48384 int gtk_icon_theme_has_icon(IconTheme* this_, char* icon_name) nothrow;
48385 GLib2.List* /*new*/ gtk_icon_theme_list_contexts(IconTheme* this_) nothrow;
48386 GLib2.List* /*new*/ gtk_icon_theme_list_icons(IconTheme* this_, char* context) nothrow;
48387 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_theme_load_icon(IconTheme* this_, char* icon_name, int size, IconLookupFlags flags, GLib2.Error** error) nothrow;
48388 IconInfo* /*new*/ gtk_icon_theme_lookup_by_gicon(IconTheme* this_, Gio2.Icon* icon, int size, IconLookupFlags flags) nothrow;
48389 IconInfo* /*new*/ gtk_icon_theme_lookup_icon(IconTheme* this_, char* icon_name, int size, IconLookupFlags flags) nothrow;
48390 void gtk_icon_theme_prepend_search_path(IconTheme* this_, char* path) nothrow;
48391 int gtk_icon_theme_rescan_if_needed(IconTheme* this_) nothrow;
48392 void gtk_icon_theme_set_custom_theme(IconTheme* this_, char* theme_name) nothrow;
48393 void gtk_icon_theme_set_screen(IconTheme* this_, Gdk2.Screen* screen) nothrow;
48394 void gtk_icon_theme_set_search_path(IconTheme* this_, char* path, int n_elements) nothrow;
48395 IconView* gtk_icon_view_new() nothrow;
48396 IconView* gtk_icon_view_new_with_model(TreeModel* model) nothrow;
48397 void gtk_icon_view_convert_widget_to_bin_window_coords(IconView* this_, int wx, int wy, /*out*/ int* bx, /*out*/ int* by) nothrow;
48398 Gdk2.Pixmap* /*new*/ gtk_icon_view_create_drag_icon(IconView* this_, TreePath* path) nothrow;
48399 void gtk_icon_view_enable_model_drag_dest(IconView* this_, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) nothrow;
48400 void gtk_icon_view_enable_model_drag_source(IconView* this_, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) nothrow;
48401 int gtk_icon_view_get_column_spacing(IconView* this_) nothrow;
48402 int gtk_icon_view_get_columns(IconView* this_) nothrow;
48403 int gtk_icon_view_get_cursor(IconView* this_, TreePath** path=null, CellRenderer** cell=null) nothrow;
48404 int gtk_icon_view_get_dest_item_at_pos(IconView* this_, int drag_x, int drag_y, TreePath** path=null, IconViewDropPosition* pos=null) nothrow;
48405 void gtk_icon_view_get_drag_dest_item(IconView* this_, TreePath** path=null, IconViewDropPosition* pos=null) nothrow;
48406 int gtk_icon_view_get_item_at_pos(IconView* this_, int x, int y, TreePath** path, CellRenderer** cell) nothrow;
48407 int gtk_icon_view_get_item_column(IconView* this_, TreePath* path) nothrow;
48408 Orientation gtk_icon_view_get_item_orientation(IconView* this_) nothrow;
48409 int gtk_icon_view_get_item_padding(IconView* this_) nothrow;
48410 int gtk_icon_view_get_item_row(IconView* this_, TreePath* path) nothrow;
48411 int gtk_icon_view_get_item_width(IconView* this_) nothrow;
48412 int gtk_icon_view_get_margin(IconView* this_) nothrow;
48413 int gtk_icon_view_get_markup_column(IconView* this_) nothrow;
48414 TreeModel* gtk_icon_view_get_model(IconView* this_) nothrow;
48415 Orientation gtk_icon_view_get_orientation(IconView* this_) nothrow;
48416 TreePath* /*new*/ gtk_icon_view_get_path_at_pos(IconView* this_, int x, int y) nothrow;
48417 int gtk_icon_view_get_pixbuf_column(IconView* this_) nothrow;
48418 int gtk_icon_view_get_reorderable(IconView* this_) nothrow;
48419 int gtk_icon_view_get_row_spacing(IconView* this_) nothrow;
48420 GLib2.List* /*new*/ gtk_icon_view_get_selected_items(IconView* this_) nothrow;
48421 SelectionMode gtk_icon_view_get_selection_mode(IconView* this_) nothrow;
48422 int gtk_icon_view_get_spacing(IconView* this_) nothrow;
48423 int gtk_icon_view_get_text_column(IconView* this_) nothrow;
48424 int gtk_icon_view_get_tooltip_column(IconView* this_) nothrow;
48425 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) nothrow;
48426 int gtk_icon_view_get_visible_range(IconView* this_, TreePath** start_path=null, TreePath** end_path=null) nothrow;
48427 void gtk_icon_view_item_activated(IconView* this_, TreePath* path) nothrow;
48428 int gtk_icon_view_path_is_selected(IconView* this_, TreePath* path) nothrow;
48429 void gtk_icon_view_scroll_to_path(IconView* this_, TreePath* path, int use_align, float row_align, float col_align) nothrow;
48430 void gtk_icon_view_select_all(IconView* this_) nothrow;
48431 void gtk_icon_view_select_path(IconView* this_, TreePath* path) nothrow;
48432 void gtk_icon_view_selected_foreach(IconView* this_, IconViewForeachFunc func, void* data) nothrow;
48433 void gtk_icon_view_set_column_spacing(IconView* this_, int column_spacing) nothrow;
48434 void gtk_icon_view_set_columns(IconView* this_, int columns) nothrow;
48435 void gtk_icon_view_set_cursor(IconView* this_, TreePath* path, CellRenderer* cell, int start_editing) nothrow;
48436 void gtk_icon_view_set_drag_dest_item(IconView* this_, TreePath* path, IconViewDropPosition pos) nothrow;
48437 void gtk_icon_view_set_item_orientation(IconView* this_, Orientation orientation) nothrow;
48438 void gtk_icon_view_set_item_padding(IconView* this_, int item_padding) nothrow;
48439 void gtk_icon_view_set_item_width(IconView* this_, int item_width) nothrow;
48440 void gtk_icon_view_set_margin(IconView* this_, int margin) nothrow;
48441 void gtk_icon_view_set_markup_column(IconView* this_, int column) nothrow;
48442 void gtk_icon_view_set_model(IconView* this_, TreeModel* model=null) nothrow;
48443 void gtk_icon_view_set_orientation(IconView* this_, Orientation orientation) nothrow;
48444 void gtk_icon_view_set_pixbuf_column(IconView* this_, int column) nothrow;
48445 void gtk_icon_view_set_reorderable(IconView* this_, int reorderable) nothrow;
48446 void gtk_icon_view_set_row_spacing(IconView* this_, int row_spacing) nothrow;
48447 void gtk_icon_view_set_selection_mode(IconView* this_, SelectionMode mode) nothrow;
48448 void gtk_icon_view_set_spacing(IconView* this_, int spacing) nothrow;
48449 void gtk_icon_view_set_text_column(IconView* this_, int column) nothrow;
48450 void gtk_icon_view_set_tooltip_cell(IconView* this_, Tooltip* tooltip, TreePath* path, CellRenderer* cell=null) nothrow;
48451 void gtk_icon_view_set_tooltip_column(IconView* this_, int column) nothrow;
48452 void gtk_icon_view_set_tooltip_item(IconView* this_, Tooltip* tooltip, TreePath* path) nothrow;
48453 void gtk_icon_view_unselect_all(IconView* this_) nothrow;
48454 void gtk_icon_view_unselect_path(IconView* this_, TreePath* path) nothrow;
48455 void gtk_icon_view_unset_model_drag_dest(IconView* this_) nothrow;
48456 void gtk_icon_view_unset_model_drag_source(IconView* this_) nothrow;
48457 Image* gtk_image_new() nothrow;
48458 Image* gtk_image_new_from_animation(GdkPixbuf2.PixbufAnimation* animation) nothrow;
48459 Image* gtk_image_new_from_file(char* filename) nothrow;
48460 Image* gtk_image_new_from_gicon(Gio2.Icon* icon, IconSize size) nothrow;
48461 Image* gtk_image_new_from_icon_name(char* icon_name, IconSize size) nothrow;
48462 Image* gtk_image_new_from_icon_set(IconSet* icon_set, IconSize size) nothrow;
48463 Image* gtk_image_new_from_image(Gdk2.Image* image=null, Gdk2.Bitmap* mask=null) nothrow;
48464 Image* gtk_image_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf=null) nothrow;
48465 Image* gtk_image_new_from_pixmap(Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null) nothrow;
48466 Image* gtk_image_new_from_stock(char* stock_id, IconSize size) nothrow;
48467 void gtk_image_clear(Image* this_) nothrow;
48468 void gtk_image_get(Image* this_, Gdk2.Image** val, Gdk2.Bitmap** mask) nothrow;
48469 GdkPixbuf2.PixbufAnimation* gtk_image_get_animation(Image* this_) nothrow;
48470 void gtk_image_get_gicon(Image* this_, /*out*/ Gio2.Icon** gicon=null, /*out*/ IconSize* size=null) nothrow;
48471 void gtk_image_get_icon_name(Image* this_, /*out*/ char** icon_name=null, /*out*/ IconSize* size=null) nothrow;
48472 void gtk_image_get_icon_set(Image* this_, /*out*/ IconSet** icon_set=null, /*out*/ IconSize* size=null) nothrow;
48473 void gtk_image_get_image(Image* this_, /*out*/ Gdk2.Image** gdk_image=null, /*out*/ Gdk2.Bitmap** mask=null) nothrow;
48474 GdkPixbuf2.Pixbuf* gtk_image_get_pixbuf(Image* this_) nothrow;
48475 int gtk_image_get_pixel_size(Image* this_) nothrow;
48476 void gtk_image_get_pixmap(Image* this_, /*out*/ Gdk2.Pixmap** pixmap=null, /*out*/ Gdk2.Bitmap** mask=null) nothrow;
48477 void gtk_image_get_stock(Image* this_, /*out*/ char** stock_id=null, /*out*/ IconSize* size=null) nothrow;
48478 ImageType gtk_image_get_storage_type(Image* this_) nothrow;
48479 void gtk_image_set(Image* this_, Gdk2.Image* val, Gdk2.Bitmap* mask) nothrow;
48480 void gtk_image_set_from_animation(Image* this_, GdkPixbuf2.PixbufAnimation* animation) nothrow;
48481 void gtk_image_set_from_file(Image* this_, char* filename=null) nothrow;
48482 void gtk_image_set_from_gicon(Image* this_, Gio2.Icon* icon, IconSize size) nothrow;
48483 void gtk_image_set_from_icon_name(Image* this_, char* icon_name, IconSize size) nothrow;
48484 void gtk_image_set_from_icon_set(Image* this_, IconSet* icon_set, IconSize size) nothrow;
48485 void gtk_image_set_from_image(Image* this_, Gdk2.Image* gdk_image=null, Gdk2.Bitmap* mask=null) nothrow;
48486 void gtk_image_set_from_pixbuf(Image* this_, GdkPixbuf2.Pixbuf* pixbuf=null) nothrow;
48487 void gtk_image_set_from_pixmap(Image* this_, Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null) nothrow;
48488 void gtk_image_set_from_stock(Image* this_, char* stock_id, IconSize size) nothrow;
48489 void gtk_image_set_pixel_size(Image* this_, int pixel_size) nothrow;
48490 ImageMenuItem* gtk_image_menu_item_new() nothrow;
48491 ImageMenuItem* gtk_image_menu_item_new_from_stock(char* stock_id, AccelGroup* accel_group=null) nothrow;
48492 ImageMenuItem* gtk_image_menu_item_new_with_label(char* label) nothrow;
48493 ImageMenuItem* gtk_image_menu_item_new_with_mnemonic(char* label) nothrow;
48494 int gtk_image_menu_item_get_always_show_image(ImageMenuItem* this_) nothrow;
48495 Widget* gtk_image_menu_item_get_image(ImageMenuItem* this_) nothrow;
48496 int gtk_image_menu_item_get_use_stock(ImageMenuItem* this_) nothrow;
48497 void gtk_image_menu_item_set_accel_group(ImageMenuItem* this_, AccelGroup* accel_group) nothrow;
48498 void gtk_image_menu_item_set_always_show_image(ImageMenuItem* this_, int always_show) nothrow;
48499 void gtk_image_menu_item_set_image(ImageMenuItem* this_, Widget* image=null) nothrow;
48500 void gtk_image_menu_item_set_use_stock(ImageMenuItem* this_, int use_stock) nothrow;
48501 InfoBar* gtk_info_bar_new() nothrow;
48502 InfoBar* gtk_info_bar_new_with_buttons(char* first_button_text=null, ...) nothrow;
48503 void gtk_info_bar_add_action_widget(InfoBar* this_, Widget* child, int response_id) nothrow;
48504 Widget* gtk_info_bar_add_button(InfoBar* this_, char* button_text, int response_id) nothrow;
48505 void gtk_info_bar_add_buttons(InfoBar* this_, char* first_button_text, ...) nothrow;
48506 Widget* gtk_info_bar_get_action_area(InfoBar* this_) nothrow;
48507 Widget* gtk_info_bar_get_content_area(InfoBar* this_) nothrow;
48508 MessageType gtk_info_bar_get_message_type(InfoBar* this_) nothrow;
48509 void gtk_info_bar_response(InfoBar* this_, int response_id) nothrow;
48510 void gtk_info_bar_set_default_response(InfoBar* this_, int response_id) nothrow;
48511 void gtk_info_bar_set_message_type(InfoBar* this_, MessageType message_type) nothrow;
48512 void gtk_info_bar_set_response_sensitive(InfoBar* this_, int response_id, int setting) nothrow;
48513 InputDialog* gtk_input_dialog_new() nothrow;
48514 Invisible* gtk_invisible_new() nothrow;
48515 Invisible* gtk_invisible_new_for_screen(Gdk2.Screen* screen) nothrow;
48516 Gdk2.Screen* gtk_invisible_get_screen(Invisible* this_) nothrow;
48517 void gtk_invisible_set_screen(Invisible* this_, Gdk2.Screen* screen) nothrow;
48518 void gtk_item_factories_path_delete(char* ifactory_path, char* path) nothrow;
48519 void gtk_item_deselect(Item* this_) nothrow;
48520 void gtk_item_select(Item* this_) nothrow;
48521 void gtk_item_toggle(Item* this_) nothrow;
48522 ItemFactory* gtk_item_factory_new(Type container_type, char* path, AccelGroup* accel_group=null) nothrow;
48523 void gtk_item_factory_add_foreign(Widget* accel_widget, char* full_path, AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifiers) nothrow;
48524 void gtk_item_factory_create_menu_entries(uint n_entries, MenuEntry* entries) nothrow;
48525 ItemFactory* gtk_item_factory_from_path(char* path) nothrow;
48526 ItemFactory* gtk_item_factory_from_widget(Widget* widget) nothrow;
48527 char* gtk_item_factory_path_from_widget(Widget* widget) nothrow;
48528 void* gtk_item_factory_popup_data_from_widget(Widget* widget) nothrow;
48529 void gtk_item_factory_construct(ItemFactory* this_, Type container_type, char* path, AccelGroup* accel_group) nothrow;
48530 void gtk_item_factory_create_item(ItemFactory* this_, ItemFactoryEntry* entry, void* callback_data, uint callback_type) nothrow;
48531 void gtk_item_factory_create_items(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries, void* callback_data) nothrow;
48532 void gtk_item_factory_create_items_ac(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries, void* callback_data, uint callback_type) nothrow;
48533 void gtk_item_factory_delete_entries(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries) nothrow;
48534 void gtk_item_factory_delete_entry(ItemFactory* this_, ItemFactoryEntry* entry) nothrow;
48535 void gtk_item_factory_delete_item(ItemFactory* this_, char* path) nothrow;
48536 Widget* gtk_item_factory_get_item(ItemFactory* this_, char* path) nothrow;
48537 Widget* gtk_item_factory_get_item_by_action(ItemFactory* this_, uint action) nothrow;
48538 Widget* gtk_item_factory_get_widget(ItemFactory* this_, char* path) nothrow;
48539 Widget* gtk_item_factory_get_widget_by_action(ItemFactory* this_, uint action) nothrow;
48540 void gtk_item_factory_popup(ItemFactory* this_, uint x, uint y, uint mouse_button, uint time_) nothrow;
48541 void* gtk_item_factory_popup_data(ItemFactory* this_) nothrow;
48542 void gtk_item_factory_popup_with_data(ItemFactory* this_, void* popup_data, GLib2.DestroyNotify destroy, uint x, uint y, uint mouse_button, uint time_) nothrow;
48543 void gtk_item_factory_set_translate_func(ItemFactory* this_, TranslateFunc func, void* data, GLib2.DestroyNotify notify) nothrow;
48544 Label* gtk_label_new(char* str) nothrow;
48545 Label* gtk_label_new_with_mnemonic(char* str) nothrow;
48546 void gtk_label_get(Label* this_, char** str) nothrow;
48547 double gtk_label_get_angle(Label* this_) nothrow;
48548 Pango.AttrList* gtk_label_get_attributes(Label* this_) nothrow;
48549 char* gtk_label_get_current_uri(Label* this_) nothrow;
48550 Pango.EllipsizeMode gtk_label_get_ellipsize(Label* this_) nothrow;
48551 Justification gtk_label_get_justify(Label* this_) nothrow;
48552 char* gtk_label_get_label(Label* this_) nothrow;
48553 Pango.Layout* gtk_label_get_layout(Label* this_) nothrow;
48554 void gtk_label_get_layout_offsets(Label* this_, /*out*/ int* x=null, /*out*/ int* y=null) nothrow;
48555 int gtk_label_get_line_wrap(Label* this_) nothrow;
48556 Pango.WrapMode gtk_label_get_line_wrap_mode(Label* this_) nothrow;
48557 int gtk_label_get_max_width_chars(Label* this_) nothrow;
48558 uint gtk_label_get_mnemonic_keyval(Label* this_) nothrow;
48559 Widget* gtk_label_get_mnemonic_widget(Label* this_) nothrow;
48560 int gtk_label_get_selectable(Label* this_) nothrow;
48561 int gtk_label_get_selection_bounds(Label* this_, /*out*/ int* start, /*out*/ int* end) nothrow;
48562 int gtk_label_get_single_line_mode(Label* this_) nothrow;
48563 char* gtk_label_get_text(Label* this_) nothrow;
48564 int gtk_label_get_track_visited_links(Label* this_) nothrow;
48565 int gtk_label_get_use_markup(Label* this_) nothrow;
48566 int gtk_label_get_use_underline(Label* this_) nothrow;
48567 int gtk_label_get_width_chars(Label* this_) nothrow;
48568 uint gtk_label_parse_uline(Label* this_, char* string_) nothrow;
48569 void gtk_label_select_region(Label* this_, int start_offset, int end_offset) nothrow;
48570 void gtk_label_set_angle(Label* this_, double angle) nothrow;
48571 void gtk_label_set_attributes(Label* this_, Pango.AttrList* attrs) nothrow;
48572 void gtk_label_set_ellipsize(Label* this_, Pango.EllipsizeMode mode) nothrow;
48573 void gtk_label_set_justify(Label* this_, Justification jtype) nothrow;
48574 void gtk_label_set_label(Label* this_, char* str) nothrow;
48575 void gtk_label_set_line_wrap(Label* this_, int wrap) nothrow;
48576 void gtk_label_set_line_wrap_mode(Label* this_, Pango.WrapMode wrap_mode) nothrow;
48577 void gtk_label_set_markup(Label* this_, char* str) nothrow;
48578 void gtk_label_set_markup_with_mnemonic(Label* this_, char* str) nothrow;
48579 void gtk_label_set_max_width_chars(Label* this_, int n_chars) nothrow;
48580 void gtk_label_set_mnemonic_widget(Label* this_, Widget* widget=null) nothrow;
48581 void gtk_label_set_pattern(Label* this_, char* pattern) nothrow;
48582 void gtk_label_set_selectable(Label* this_, int setting) nothrow;
48583 void gtk_label_set_single_line_mode(Label* this_, int single_line_mode) nothrow;
48584 void gtk_label_set_text(Label* this_, char* str) nothrow;
48585 void gtk_label_set_text_with_mnemonic(Label* this_, char* str) nothrow;
48586 void gtk_label_set_track_visited_links(Label* this_, int track_links) nothrow;
48587 void gtk_label_set_use_markup(Label* this_, int setting) nothrow;
48588 void gtk_label_set_use_underline(Label* this_, int setting) nothrow;
48589 void gtk_label_set_width_chars(Label* this_, int n_chars) nothrow;
48590 Layout* gtk_layout_new(Adjustment* hadjustment=null, Adjustment* vadjustment=null) nothrow;
48591 void gtk_layout_freeze(Layout* this_) nothrow;
48592 Gdk2.Window* gtk_layout_get_bin_window(Layout* this_) nothrow;
48593 Adjustment* gtk_layout_get_hadjustment(Layout* this_) nothrow;
48594 void gtk_layout_get_size(Layout* this_, /*out*/ uint* width=null, /*out*/ uint* height=null) nothrow;
48595 Adjustment* gtk_layout_get_vadjustment(Layout* this_) nothrow;
48596 void gtk_layout_move(Layout* this_, Widget* child_widget, int x, int y) nothrow;
48597 void gtk_layout_put(Layout* this_, Widget* child_widget, int x, int y) nothrow;
48598 void gtk_layout_set_hadjustment(Layout* this_, Adjustment* adjustment=null) nothrow;
48599 void gtk_layout_set_size(Layout* this_, uint width, uint height) nothrow;
48600 void gtk_layout_set_vadjustment(Layout* this_, Adjustment* adjustment=null) nothrow;
48601 void gtk_layout_thaw(Layout* this_) nothrow;
48602 LinkButton* gtk_link_button_new(char* uri) nothrow;
48603 LinkButton* gtk_link_button_new_with_label(char* uri, char* label=null) nothrow;
48604 LinkButtonUriFunc gtk_link_button_set_uri_hook(LinkButtonUriFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) nothrow;
48605 char* gtk_link_button_get_uri(LinkButton* this_) nothrow;
48606 int gtk_link_button_get_visited(LinkButton* this_) nothrow;
48607 void gtk_link_button_set_uri(LinkButton* this_, char* uri) nothrow;
48608 void gtk_link_button_set_visited(LinkButton* this_, int visited) nothrow;
48609 List* gtk_list_new() nothrow;
48610 void gtk_list_append_items(List* this_, GLib2.List* items) nothrow;
48611 int gtk_list_child_position(List* this_, Widget* child) nothrow;
48612 void gtk_list_clear_items(List* this_, int start, int end) nothrow;
48613 void gtk_list_end_drag_selection(List* this_) nothrow;
48614 void gtk_list_end_selection(List* this_) nothrow;
48615 void gtk_list_extend_selection(List* this_, ScrollType scroll_type, float position, int auto_start_selection) nothrow;
48616 void gtk_list_insert_items(List* this_, GLib2.List* items, int position) nothrow;
48617 void gtk_list_prepend_items(List* this_, GLib2.List* items) nothrow;
48618 void gtk_list_remove_items(List* this_, GLib2.List* items) nothrow;
48619 void gtk_list_remove_items_no_unref(List* this_, GLib2.List* items) nothrow;
48620 void gtk_list_scroll_horizontal(List* this_, ScrollType scroll_type, float position) nothrow;
48621 void gtk_list_scroll_vertical(List* this_, ScrollType scroll_type, float position) nothrow;
48622 void gtk_list_select_all(List* this_) nothrow;
48623 void gtk_list_select_child(List* this_, Widget* child) nothrow;
48624 void gtk_list_select_item(List* this_, int item) nothrow;
48625 void gtk_list_set_selection_mode(List* this_, SelectionMode mode) nothrow;
48626 void gtk_list_start_selection(List* this_) nothrow;
48627 void gtk_list_toggle_add_mode(List* this_) nothrow;
48628 void gtk_list_toggle_focus_row(List* this_) nothrow;
48629 void gtk_list_toggle_row(List* this_, Widget* item) nothrow;
48630 void gtk_list_undo_selection(List* this_) nothrow;
48631 void gtk_list_unselect_all(List* this_) nothrow;
48632 void gtk_list_unselect_child(List* this_, Widget* child) nothrow;
48633 void gtk_list_unselect_item(List* this_, int item) nothrow;
48634 ListItem* gtk_list_item_new() nothrow;
48635 ListItem* gtk_list_item_new_with_label(char* label) nothrow;
48636 void gtk_list_item_deselect(ListItem* this_) nothrow;
48637 void gtk_list_item_select(ListItem* this_) nothrow;
48638 ListStore* /*new*/ gtk_list_store_new(int n_columns, ...) nothrow;
48639 ListStore* gtk_list_store_newv(int n_columns, Type* types) nothrow;
48640 void gtk_list_store_append(ListStore* this_, /*out*/ TreeIter* iter) nothrow;
48641 void gtk_list_store_clear(ListStore* this_) nothrow;
48642 void gtk_list_store_insert(ListStore* this_, /*out*/ TreeIter* iter, int position) nothrow;
48643 void gtk_list_store_insert_after(ListStore* this_, /*out*/ TreeIter* iter, TreeIter* sibling=null) nothrow;
48644 void gtk_list_store_insert_before(ListStore* this_, /*out*/ TreeIter* iter, TreeIter* sibling=null) nothrow;
48645 void gtk_list_store_insert_with_values(ListStore* this_, /*out*/ TreeIter* iter, int position, ...) nothrow;
48646 void gtk_list_store_insert_with_valuesv(ListStore* this_, /*out*/ TreeIter* iter, int position, int* columns, GObject2.Value* values, int n_values) nothrow;
48647 int gtk_list_store_iter_is_valid(ListStore* this_, TreeIter* iter) nothrow;
48648 void gtk_list_store_move_after(ListStore* this_, TreeIter* iter, TreeIter* position=null) nothrow;
48649 void gtk_list_store_move_before(ListStore* this_, TreeIter* iter, TreeIter* position=null) nothrow;
48650 void gtk_list_store_prepend(ListStore* this_, /*out*/ TreeIter* iter) nothrow;
48651 int gtk_list_store_remove(ListStore* this_, TreeIter* iter) nothrow;
48652 void gtk_list_store_reorder(ListStore* this_, int* new_order) nothrow;
48653 void gtk_list_store_set(ListStore* this_, TreeIter* iter, ...) nothrow;
48654 void gtk_list_store_set_column_types(ListStore* this_, int n_columns, Type* types) nothrow;
48655 void gtk_list_store_set_valist(ListStore* this_, TreeIter* iter, va_list var_args) nothrow;
48656 void gtk_list_store_set_value(ListStore* this_, TreeIter* iter, int column, GObject2.Value* value) nothrow;
48657 void gtk_list_store_set_valuesv(ListStore* this_, TreeIter* iter, int* columns, GObject2.Value* values, int n_values) nothrow;
48658 void gtk_list_store_swap(ListStore* this_, TreeIter* a, TreeIter* b) nothrow;
48659 Menu* gtk_menu_new() nothrow;
48660 GLib2.List* gtk_menu_get_for_attach_widget(Widget* widget) nothrow;
48661 void gtk_menu_attach(Menu* this_, Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) nothrow;
48662 void gtk_menu_attach_to_widget(Menu* this_, Widget* attach_widget, MenuDetachFunc detacher) nothrow;
48663 void gtk_menu_detach(Menu* this_) nothrow;
48664 AccelGroup* gtk_menu_get_accel_group(Menu* this_) nothrow;
48665 char* gtk_menu_get_accel_path(Menu* this_) nothrow;
48666 Widget* gtk_menu_get_active(Menu* this_) nothrow;
48667 Widget* gtk_menu_get_attach_widget(Menu* this_) nothrow;
48668 int gtk_menu_get_monitor(Menu* this_) nothrow;
48669 int gtk_menu_get_reserve_toggle_size(Menu* this_) nothrow;
48670 int gtk_menu_get_tearoff_state(Menu* this_) nothrow;
48671 char* gtk_menu_get_title(Menu* this_) nothrow;
48672 void gtk_menu_popdown(Menu* this_) nothrow;
48673 void gtk_menu_popup(Menu* this_, Widget* parent_menu_shell, Widget* parent_menu_item, MenuPositionFunc func, void* data, uint button, uint activate_time) nothrow;
48674 void gtk_menu_reorder_child(Menu* this_, Widget* child, int position) nothrow;
48675 void gtk_menu_reposition(Menu* this_) nothrow;
48676 void gtk_menu_set_accel_group(Menu* this_, AccelGroup* accel_group=null) nothrow;
48677 void gtk_menu_set_accel_path(Menu* this_, char* accel_path=null) nothrow;
48678 void gtk_menu_set_active(Menu* this_, uint index_) nothrow;
48679 void gtk_menu_set_monitor(Menu* this_, int monitor_num) nothrow;
48680 void gtk_menu_set_reserve_toggle_size(Menu* this_, int reserve_toggle_size) nothrow;
48681 void gtk_menu_set_screen(Menu* this_, Gdk2.Screen* screen=null) nothrow;
48682 void gtk_menu_set_tearoff_state(Menu* this_, int torn_off) nothrow;
48683 void gtk_menu_set_title(Menu* this_, char* title) nothrow;
48684 MenuBar* gtk_menu_bar_new() nothrow;
48685 PackDirection gtk_menu_bar_get_child_pack_direction(MenuBar* this_) nothrow;
48686 PackDirection gtk_menu_bar_get_pack_direction(MenuBar* this_) nothrow;
48687 void gtk_menu_bar_set_child_pack_direction(MenuBar* this_, PackDirection child_pack_dir) nothrow;
48688 void gtk_menu_bar_set_pack_direction(MenuBar* this_, PackDirection pack_dir) nothrow;
48689 MenuItem* gtk_menu_item_new() nothrow;
48690 MenuItem* gtk_menu_item_new_with_label(char* label) nothrow;
48691 MenuItem* gtk_menu_item_new_with_mnemonic(char* label) nothrow;
48692 void gtk_menu_item_activate(MenuItem* this_) nothrow;
48693 void gtk_menu_item_deselect(MenuItem* this_) nothrow;
48694 char* gtk_menu_item_get_accel_path(MenuItem* this_) nothrow;
48695 char* gtk_menu_item_get_label(MenuItem* this_) nothrow;
48696 int gtk_menu_item_get_right_justified(MenuItem* this_) nothrow;
48697 Widget* gtk_menu_item_get_submenu(MenuItem* this_) nothrow;
48698 int gtk_menu_item_get_use_underline(MenuItem* this_) nothrow;
48699 void gtk_menu_item_remove_submenu(MenuItem* this_) nothrow;
48700 void gtk_menu_item_select(MenuItem* this_) nothrow;
48701 void gtk_menu_item_set_accel_path(MenuItem* this_, char* accel_path=null) nothrow;
48702 void gtk_menu_item_set_label(MenuItem* this_, char* label) nothrow;
48703 void gtk_menu_item_set_right_justified(MenuItem* this_, int right_justified) nothrow;
48704 void gtk_menu_item_set_submenu(MenuItem* this_, Widget* submenu=null) nothrow;
48705 void gtk_menu_item_set_use_underline(MenuItem* this_, int setting) nothrow;
48706 void gtk_menu_item_toggle_size_allocate(MenuItem* this_, int allocation) nothrow;
48707 void gtk_menu_item_toggle_size_request(MenuItem* this_, int* requisition) nothrow;
48708 void gtk_menu_shell_activate_item(MenuShell* this_, Widget* menu_item, int force_deactivate) nothrow;
48709 void gtk_menu_shell_append(MenuShell* this_, Widget* child) nothrow;
48710 void gtk_menu_shell_cancel(MenuShell* this_) nothrow;
48711 void gtk_menu_shell_deactivate(MenuShell* this_) nothrow;
48712 void gtk_menu_shell_deselect(MenuShell* this_) nothrow;
48713 int gtk_menu_shell_get_take_focus(MenuShell* this_) nothrow;
48714 void gtk_menu_shell_insert(MenuShell* this_, Widget* child, int position) nothrow;
48715 void gtk_menu_shell_prepend(MenuShell* this_, Widget* child) nothrow;
48716 void gtk_menu_shell_select_first(MenuShell* this_, int search_sensitive) nothrow;
48717 void gtk_menu_shell_select_item(MenuShell* this_, Widget* menu_item) nothrow;
48718 void gtk_menu_shell_set_take_focus(MenuShell* this_, int take_focus) nothrow;
48719 MenuToolButton* gtk_menu_tool_button_new(Widget* icon_widget=null, char* label=null) nothrow;
48720 MenuToolButton* gtk_menu_tool_button_new_from_stock(char* stock_id) nothrow;
48721 Widget* gtk_menu_tool_button_get_menu(MenuToolButton* this_) nothrow;
48722 void gtk_menu_tool_button_set_arrow_tooltip(MenuToolButton* this_, Tooltips* tooltips, char* tip_text=null, char* tip_private=null) nothrow;
48723 void gtk_menu_tool_button_set_arrow_tooltip_markup(MenuToolButton* this_, char* markup) nothrow;
48724 void gtk_menu_tool_button_set_arrow_tooltip_text(MenuToolButton* this_, char* text) nothrow;
48725 void gtk_menu_tool_button_set_menu(MenuToolButton* this_, Widget* menu) nothrow;
48726 MessageDialog* gtk_message_dialog_new(Window* parent, DialogFlags flags, MessageType type, ButtonsType buttons, char* message_format=null, ...) nothrow;
48727 MessageDialog* gtk_message_dialog_new_with_markup(Window* parent, DialogFlags flags, MessageType type, ButtonsType buttons, char* message_format=null, ...) nothrow;
48728 void gtk_message_dialog_format_secondary_markup(MessageDialog* this_, char* message_format, ...) nothrow;
48729 void gtk_message_dialog_format_secondary_text(MessageDialog* this_, char* message_format=null, ...) nothrow;
48730 Widget* gtk_message_dialog_get_image(MessageDialog* this_) nothrow;
48731 Widget* gtk_message_dialog_get_message_area(MessageDialog* this_) nothrow;
48732 void gtk_message_dialog_set_image(MessageDialog* this_, Widget* image) nothrow;
48733 void gtk_message_dialog_set_markup(MessageDialog* this_, char* str) nothrow;
48734 void gtk_misc_get_alignment(Misc* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null) nothrow;
48735 void gtk_misc_get_padding(Misc* this_, /*out*/ int* xpad=null, /*out*/ int* ypad=null) nothrow;
48736 void gtk_misc_set_alignment(Misc* this_, float xalign, float yalign) nothrow;
48737 void gtk_misc_set_padding(Misc* this_, int xpad, int ypad) nothrow;
48738 MountOperation* /*new*/ gtk_mount_operation_new(Window* parent=null) nothrow;
48739 Window* gtk_mount_operation_get_parent(MountOperation* this_) nothrow;
48740 Gdk2.Screen* gtk_mount_operation_get_screen(MountOperation* this_) nothrow;
48741 int gtk_mount_operation_is_showing(MountOperation* this_) nothrow;
48742 void gtk_mount_operation_set_parent(MountOperation* this_, Window* parent=null) nothrow;
48743 void gtk_mount_operation_set_screen(MountOperation* this_, Gdk2.Screen* screen) nothrow;
48744 Notebook* gtk_notebook_new() nothrow;
48745 void gtk_notebook_set_window_creation_hook(NotebookWindowCreationFunc func, void* data, GLib2.DestroyNotify destroy=null) nothrow;
48746 int gtk_notebook_append_page(Notebook* this_, Widget* child, Widget* tab_label=null) nothrow;
48747 int gtk_notebook_append_page_menu(Notebook* this_, Widget* child, Widget* tab_label=null, Widget* menu_label=null) nothrow;
48748 Widget* gtk_notebook_get_action_widget(Notebook* this_, PackType pack_type) nothrow;
48749 int gtk_notebook_get_current_page(Notebook* this_) nothrow;
48750 void* gtk_notebook_get_group(Notebook* this_) nothrow;
48751 int gtk_notebook_get_group_id(Notebook* this_) nothrow;
48752 char* gtk_notebook_get_group_name(Notebook* this_) nothrow;
48753 Widget* gtk_notebook_get_menu_label(Notebook* this_, Widget* child) nothrow;
48754 char* gtk_notebook_get_menu_label_text(Notebook* this_, Widget* child) nothrow;
48755 int gtk_notebook_get_n_pages(Notebook* this_) nothrow;
48756 Widget* gtk_notebook_get_nth_page(Notebook* this_, int page_num) nothrow;
48757 int gtk_notebook_get_scrollable(Notebook* this_) nothrow;
48758 int gtk_notebook_get_show_border(Notebook* this_) nothrow;
48759 int gtk_notebook_get_show_tabs(Notebook* this_) nothrow;
48760 int gtk_notebook_get_tab_detachable(Notebook* this_, Widget* child) nothrow;
48761 ushort gtk_notebook_get_tab_hborder(Notebook* this_) nothrow;
48762 Widget* gtk_notebook_get_tab_label(Notebook* this_, Widget* child) nothrow;
48763 char* gtk_notebook_get_tab_label_text(Notebook* this_, Widget* child) nothrow;
48764 PositionType gtk_notebook_get_tab_pos(Notebook* this_) nothrow;
48765 int gtk_notebook_get_tab_reorderable(Notebook* this_, Widget* child) nothrow;
48766 ushort gtk_notebook_get_tab_vborder(Notebook* this_) nothrow;
48767 int gtk_notebook_insert_page(Notebook* this_, Widget* child, Widget* tab_label, int position) nothrow;
48768 int gtk_notebook_insert_page_menu(Notebook* this_, Widget* child, Widget* tab_label, Widget* menu_label, int position) nothrow;
48769 void gtk_notebook_next_page(Notebook* this_) nothrow;
48770 int gtk_notebook_page_num(Notebook* this_, Widget* child) nothrow;
48771 void gtk_notebook_popup_disable(Notebook* this_) nothrow;
48772 void gtk_notebook_popup_enable(Notebook* this_) nothrow;
48773 int gtk_notebook_prepend_page(Notebook* this_, Widget* child, Widget* tab_label=null) nothrow;
48774 int gtk_notebook_prepend_page_menu(Notebook* this_, Widget* child, Widget* tab_label=null, Widget* menu_label=null) nothrow;
48775 void gtk_notebook_prev_page(Notebook* this_) nothrow;
48776 void gtk_notebook_query_tab_label_packing(Notebook* this_, Widget* child, int* expand, int* fill, PackType* pack_type) nothrow;
48777 void gtk_notebook_remove_page(Notebook* this_, int page_num) nothrow;
48778 void gtk_notebook_reorder_child(Notebook* this_, Widget* child, int position) nothrow;
48779 void gtk_notebook_set_action_widget(Notebook* this_, Widget* widget, PackType pack_type) nothrow;
48780 void gtk_notebook_set_current_page(Notebook* this_, int page_num) nothrow;
48781 void gtk_notebook_set_group(Notebook* this_, void* group=null) nothrow;
48782 void gtk_notebook_set_group_id(Notebook* this_, int group_id) nothrow;
48783 void gtk_notebook_set_group_name(Notebook* this_, char* group_name) nothrow;
48784 void gtk_notebook_set_homogeneous_tabs(Notebook* this_, int homogeneous) nothrow;
48785 void gtk_notebook_set_menu_label(Notebook* this_, Widget* child, Widget* menu_label=null) nothrow;
48786 void gtk_notebook_set_menu_label_text(Notebook* this_, Widget* child, char* menu_text) nothrow;
48787 void gtk_notebook_set_scrollable(Notebook* this_, int scrollable) nothrow;
48788 void gtk_notebook_set_show_border(Notebook* this_, int show_border) nothrow;
48789 void gtk_notebook_set_show_tabs(Notebook* this_, int show_tabs) nothrow;
48790 void gtk_notebook_set_tab_border(Notebook* this_, uint border_width) nothrow;
48791 void gtk_notebook_set_tab_detachable(Notebook* this_, Widget* child, int detachable) nothrow;
48792 void gtk_notebook_set_tab_hborder(Notebook* this_, uint tab_hborder) nothrow;
48793 void gtk_notebook_set_tab_label(Notebook* this_, Widget* child, Widget* tab_label=null) nothrow;
48794 void gtk_notebook_set_tab_label_packing(Notebook* this_, Widget* child, int expand, int fill, PackType pack_type) nothrow;
48795 void gtk_notebook_set_tab_label_text(Notebook* this_, Widget* child, char* tab_text) nothrow;
48796 void gtk_notebook_set_tab_pos(Notebook* this_, PositionType pos) nothrow;
48797 void gtk_notebook_set_tab_reorderable(Notebook* this_, Widget* child, int reorderable) nothrow;
48798 void gtk_notebook_set_tab_vborder(Notebook* this_, uint tab_vborder) nothrow;
48799 Object* gtk_object_new(Type type, char* first_property_name, ...) nothrow;
48800 void gtk_object_add_arg_type(char* arg_name, Type arg_type, uint arg_flags, uint arg_id) nothrow;
48801 void gtk_object_destroy(Object* this_) nothrow;
48802 void gtk_object_get(Object* this_, char* first_property_name, ...) nothrow;
48803 void* gtk_object_get_data(Object* this_, char* key) nothrow;
48804 void* gtk_object_get_data_by_id(Object* this_, GLib2.Quark data_id) nothrow;
48805 void* gtk_object_get_user_data(Object* this_) nothrow;
48806 Object* gtk_object_ref(Object* this_) nothrow;
48807 void gtk_object_remove_data(Object* this_, char* key) nothrow;
48808 void gtk_object_remove_data_by_id(Object* this_, GLib2.Quark data_id) nothrow;
48809 void gtk_object_remove_no_notify(Object* this_, char* key) nothrow;
48810 void gtk_object_remove_no_notify_by_id(Object* this_, GLib2.Quark key_id) nothrow;
48811 void gtk_object_set(Object* this_, char* first_property_name, ...) nothrow;
48812 void gtk_object_set_data(Object* this_, char* key, void* data) nothrow;
48813 void gtk_object_set_data_by_id(Object* this_, GLib2.Quark data_id, void* data) nothrow;
48814 void gtk_object_set_data_by_id_full(Object* this_, GLib2.Quark data_id, void* data, GLib2.DestroyNotify destroy) nothrow;
48815 void gtk_object_set_data_full(Object* this_, char* key, void* data, GLib2.DestroyNotify destroy) nothrow;
48816 void gtk_object_set_user_data(Object* this_, void* data) nothrow;
48817 void gtk_object_sink(Object* this_) nothrow;
48818 void gtk_object_unref(Object* this_) nothrow;
48819 void gtk_object_weakref(Object* this_, GLib2.DestroyNotify notify, void* data) nothrow;
48820 void gtk_object_weakunref(Object* this_, GLib2.DestroyNotify notify, void* data) nothrow;
48821 OffscreenWindow* gtk_offscreen_window_new() nothrow;
48822 GdkPixbuf2.Pixbuf* /*new*/ gtk_offscreen_window_get_pixbuf(OffscreenWindow* this_) nothrow;
48823 Gdk2.Pixmap* gtk_offscreen_window_get_pixmap(OffscreenWindow* this_) nothrow;
48824 void gtk_old_editable_changed(OldEditable* this_) nothrow;
48825 void gtk_old_editable_claim_selection(OldEditable* this_, int claim, uint time_) nothrow;
48826 OptionMenu* gtk_option_menu_new() nothrow;
48827 int gtk_option_menu_get_history(OptionMenu* this_) nothrow;
48828 Widget* gtk_option_menu_get_menu(OptionMenu* this_) nothrow;
48829 void gtk_option_menu_remove_menu(OptionMenu* this_) nothrow;
48830 void gtk_option_menu_set_history(OptionMenu* this_, uint index_) nothrow;
48831 void gtk_option_menu_set_menu(OptionMenu* this_, Widget* menu) nothrow;
48832 Orientation gtk_orientable_get_orientation(Orientable* this_) nothrow;
48833 void gtk_orientable_set_orientation(Orientable* this_, Orientation orientation) nothrow;
48834 PageSetup* /*new*/ gtk_page_setup_new() nothrow;
48835 PageSetup* /*new*/ gtk_page_setup_new_from_file(char* file_name, GLib2.Error** error) nothrow;
48836 PageSetup* /*new*/ gtk_page_setup_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error) nothrow;
48837 PageSetup* /*new*/ gtk_page_setup_copy(PageSetup* this_) nothrow;
48838 double gtk_page_setup_get_bottom_margin(PageSetup* this_, Unit unit) nothrow;
48839 double gtk_page_setup_get_left_margin(PageSetup* this_, Unit unit) nothrow;
48840 PageOrientation gtk_page_setup_get_orientation(PageSetup* this_) nothrow;
48841 double gtk_page_setup_get_page_height(PageSetup* this_, Unit unit) nothrow;
48842 double gtk_page_setup_get_page_width(PageSetup* this_, Unit unit) nothrow;
48843 double gtk_page_setup_get_paper_height(PageSetup* this_, Unit unit) nothrow;
48844 PaperSize* /*new*/ gtk_page_setup_get_paper_size(PageSetup* this_) nothrow;
48845 double gtk_page_setup_get_paper_width(PageSetup* this_, Unit unit) nothrow;
48846 double gtk_page_setup_get_right_margin(PageSetup* this_, Unit unit) nothrow;
48847 double gtk_page_setup_get_top_margin(PageSetup* this_, Unit unit) nothrow;
48848 int gtk_page_setup_load_file(PageSetup* this_, char* file_name, GLib2.Error** error) nothrow;
48849 int gtk_page_setup_load_key_file(PageSetup* this_, GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error) nothrow;
48850 void gtk_page_setup_set_bottom_margin(PageSetup* this_, double margin, Unit unit) nothrow;
48851 void gtk_page_setup_set_left_margin(PageSetup* this_, double margin, Unit unit) nothrow;
48852 void gtk_page_setup_set_orientation(PageSetup* this_, PageOrientation orientation) nothrow;
48853 void gtk_page_setup_set_paper_size(PageSetup* this_, PaperSize* size) nothrow;
48854 void gtk_page_setup_set_paper_size_and_default_margins(PageSetup* this_, PaperSize* size) nothrow;
48855 void gtk_page_setup_set_right_margin(PageSetup* this_, double margin, Unit unit) nothrow;
48856 void gtk_page_setup_set_top_margin(PageSetup* this_, double margin, Unit unit) nothrow;
48857 int gtk_page_setup_to_file(PageSetup* this_, char* file_name, GLib2.Error** error) nothrow;
48858 void gtk_page_setup_to_key_file(PageSetup* this_, GLib2.KeyFile* key_file, char* group_name) nothrow;
48859 void gtk_paned_add1(Paned* this_, Widget* child) nothrow;
48860 void gtk_paned_add2(Paned* this_, Widget* child) nothrow;
48861 void gtk_paned_compute_position(Paned* this_, int allocation, int child1_req, int child2_req) nothrow;
48862 Widget* gtk_paned_get_child1(Paned* this_) nothrow;
48863 Widget* gtk_paned_get_child2(Paned* this_) nothrow;
48864 Gdk2.Window* gtk_paned_get_handle_window(Paned* this_) nothrow;
48865 int gtk_paned_get_position(Paned* this_) nothrow;
48866 void gtk_paned_pack1(Paned* this_, Widget* child, int resize, int shrink) nothrow;
48867 void gtk_paned_pack2(Paned* this_, Widget* child, int resize, int shrink) nothrow;
48868 void gtk_paned_set_position(Paned* this_, int position) nothrow;
48869 PaperSize* /*new*/ gtk_paper_size_new(char* name=null) nothrow;
48870 PaperSize* /*new*/ gtk_paper_size_new_custom(char* name, char* display_name, double width, double height, Unit unit) nothrow;
48871 PaperSize* /*new*/ gtk_paper_size_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error) nothrow;
48872 PaperSize* /*new*/ gtk_paper_size_new_from_ppd(char* ppd_name, char* ppd_display_name, double width, double height) nothrow;
48873 PaperSize* /*new*/ gtk_paper_size_copy(PaperSize* this_) nothrow;
48874 void gtk_paper_size_free(PaperSize* this_) nothrow;
48875 double gtk_paper_size_get_default_bottom_margin(PaperSize* this_, Unit unit) nothrow;
48876 double gtk_paper_size_get_default_left_margin(PaperSize* this_, Unit unit) nothrow;
48877 double gtk_paper_size_get_default_right_margin(PaperSize* this_, Unit unit) nothrow;
48878 double gtk_paper_size_get_default_top_margin(PaperSize* this_, Unit unit) nothrow;
48879 char* gtk_paper_size_get_display_name(PaperSize* this_) nothrow;
48880 double gtk_paper_size_get_height(PaperSize* this_, Unit unit) nothrow;
48881 char* gtk_paper_size_get_name(PaperSize* this_) nothrow;
48882 char* gtk_paper_size_get_ppd_name(PaperSize* this_) nothrow;
48883 double gtk_paper_size_get_width(PaperSize* this_, Unit unit) nothrow;
48884 int gtk_paper_size_is_custom(PaperSize* this_) nothrow;
48885 int gtk_paper_size_is_equal(PaperSize* this_, PaperSize* size2) nothrow;
48886 void gtk_paper_size_set_size(PaperSize* this_, double width, double height, Unit unit) nothrow;
48887 void gtk_paper_size_to_key_file(PaperSize* this_, GLib2.KeyFile* key_file, char* group_name) nothrow;
48888 char* gtk_paper_size_get_default() nothrow;
48889 GLib2.List* /*new*/ gtk_paper_size_get_paper_sizes(int include_custom) nothrow;
48890 Pixmap* gtk_pixmap_new(Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) nothrow;
48891 void gtk_pixmap_get(Pixmap* this_, Gdk2.Pixmap** val, Gdk2.Bitmap** mask) nothrow;
48892 void gtk_pixmap_set(Pixmap* this_, Gdk2.Pixmap* val, Gdk2.Bitmap* mask) nothrow;
48893 void gtk_pixmap_set_build_insensitive(Pixmap* this_, int build) nothrow;
48894 Plug* gtk_plug_new(Gdk2.NativeWindow socket_id) nothrow;
48895 Plug* gtk_plug_new_for_display(Gdk2.Display* display, Gdk2.NativeWindow socket_id) nothrow;
48896 void gtk_plug_construct(Plug* this_, Gdk2.NativeWindow socket_id) nothrow;
48897 void gtk_plug_construct_for_display(Plug* this_, Gdk2.Display* display, Gdk2.NativeWindow socket_id) nothrow;
48898 int gtk_plug_get_embedded(Plug* this_) nothrow;
48899 Gdk2.NativeWindow gtk_plug_get_id(Plug* this_) nothrow;
48900 Gdk2.Window* gtk_plug_get_socket_window(Plug* this_) nothrow;
48901 Preview* gtk_preview_new(PreviewType type) nothrow;
48902 Gdk2.Colormap* gtk_preview_get_cmap() nothrow;
48903 PreviewInfo* gtk_preview_get_info() nothrow;
48904 Gdk2.Visual* gtk_preview_get_visual() nothrow;
48905 void gtk_preview_reset() nothrow;
48906 void gtk_preview_set_color_cube(uint nred_shades, uint ngreen_shades, uint nblue_shades, uint ngray_shades) nothrow;
48907 void gtk_preview_set_gamma(double gamma_) nothrow;
48908 void gtk_preview_set_install_cmap(int install_cmap) nothrow;
48909 void gtk_preview_set_reserved(int nreserved) nothrow;
48910 void gtk_preview_uninit() nothrow;
48911 void gtk_preview_draw_row(Preview* this_, ubyte* data, int x, int y, int w) nothrow;
48912 void gtk_preview_put(Preview* this_, Gdk2.Window* window, Gdk2.GC* gc, int srcx, int srcy, int destx, int desty, int width, int height) nothrow;
48913 void gtk_preview_set_dither(Preview* this_, Gdk2.RgbDither dither) nothrow;
48914 void gtk_preview_set_expand(Preview* this_, int expand) nothrow;
48915 void gtk_preview_size(Preview* this_, int width, int height) nothrow;
48916 Pango.Context* /*new*/ gtk_print_context_create_pango_context(PrintContext* this_) nothrow;
48917 Pango.Layout* /*new*/ gtk_print_context_create_pango_layout(PrintContext* this_) nothrow;
48918 cairo.Context* gtk_print_context_get_cairo_context(PrintContext* this_) nothrow;
48919 double gtk_print_context_get_dpi_x(PrintContext* this_) nothrow;
48920 double gtk_print_context_get_dpi_y(PrintContext* this_) nothrow;
48921 int gtk_print_context_get_hard_margins(PrintContext* this_, /*out*/ double* top, /*out*/ double* bottom, /*out*/ double* left, /*out*/ double* right) nothrow;
48922 double gtk_print_context_get_height(PrintContext* this_) nothrow;
48923 PageSetup* gtk_print_context_get_page_setup(PrintContext* this_) nothrow;
48924 Pango.FontMap* gtk_print_context_get_pango_fontmap(PrintContext* this_) nothrow;
48925 double gtk_print_context_get_width(PrintContext* this_) nothrow;
48926 void gtk_print_context_set_cairo_context(PrintContext* this_, cairo.Context* cr, double dpi_x, double dpi_y) nothrow;
48927 PrintOperation* /*new*/ gtk_print_operation_new() nothrow;
48928 void gtk_print_operation_cancel(PrintOperation* this_) nothrow;
48929 void gtk_print_operation_draw_page_finish(PrintOperation* this_) nothrow;
48930 PageSetup* gtk_print_operation_get_default_page_setup(PrintOperation* this_) nothrow;
48931 int gtk_print_operation_get_embed_page_setup(PrintOperation* this_) nothrow;
48932 void gtk_print_operation_get_error(PrintOperation* this_, GLib2.Error** error) nothrow;
48933 int gtk_print_operation_get_has_selection(PrintOperation* this_) nothrow;
48934 int gtk_print_operation_get_n_pages_to_print(PrintOperation* this_) nothrow;
48935 PrintSettings* gtk_print_operation_get_print_settings(PrintOperation* this_) nothrow;
48936 PrintStatus gtk_print_operation_get_status(PrintOperation* this_) nothrow;
48937 char* gtk_print_operation_get_status_string(PrintOperation* this_) nothrow;
48938 int gtk_print_operation_get_support_selection(PrintOperation* this_) nothrow;
48939 int gtk_print_operation_is_finished(PrintOperation* this_) nothrow;
48940 PrintOperationResult gtk_print_operation_run(PrintOperation* this_, PrintOperationAction action, Window* parent, GLib2.Error** error) nothrow;
48941 void gtk_print_operation_set_allow_async(PrintOperation* this_, int allow_async) nothrow;
48942 void gtk_print_operation_set_current_page(PrintOperation* this_, int current_page) nothrow;
48943 void gtk_print_operation_set_custom_tab_label(PrintOperation* this_, char* label=null) nothrow;
48944 void gtk_print_operation_set_default_page_setup(PrintOperation* this_, PageSetup* default_page_setup=null) nothrow;
48945 void gtk_print_operation_set_defer_drawing(PrintOperation* this_) nothrow;
48946 void gtk_print_operation_set_embed_page_setup(PrintOperation* this_, int embed) nothrow;
48947 void gtk_print_operation_set_export_filename(PrintOperation* this_, char* filename) nothrow;
48948 void gtk_print_operation_set_has_selection(PrintOperation* this_, int has_selection) nothrow;
48949 void gtk_print_operation_set_job_name(PrintOperation* this_, char* job_name) nothrow;
48950 void gtk_print_operation_set_n_pages(PrintOperation* this_, int n_pages) nothrow;
48951 void gtk_print_operation_set_print_settings(PrintOperation* this_, PrintSettings* print_settings=null) nothrow;
48952 void gtk_print_operation_set_show_progress(PrintOperation* this_, int show_progress) nothrow;
48953 void gtk_print_operation_set_support_selection(PrintOperation* this_, int support_selection) nothrow;
48954 void gtk_print_operation_set_track_print_status(PrintOperation* this_, int track_status) nothrow;
48955 void gtk_print_operation_set_unit(PrintOperation* this_, Unit unit) nothrow;
48956 void gtk_print_operation_set_use_full_page(PrintOperation* this_, int full_page) nothrow;
48957 void gtk_print_operation_preview_end_preview(PrintOperationPreview* this_) nothrow;
48958 int gtk_print_operation_preview_is_selected(PrintOperationPreview* this_, int page_nr) nothrow;
48959 void gtk_print_operation_preview_render_page(PrintOperationPreview* this_, int page_nr) nothrow;
48960 PrintSettings* /*new*/ gtk_print_settings_new() nothrow;
48961 PrintSettings* /*new*/ gtk_print_settings_new_from_file(char* file_name, GLib2.Error** error) nothrow;
48962 PrintSettings* /*new*/ gtk_print_settings_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error) nothrow;
48963 PrintSettings* /*new*/ gtk_print_settings_copy(PrintSettings* this_) nothrow;
48964 void gtk_print_settings_foreach(PrintSettings* this_, PrintSettingsFunc func, void* user_data) nothrow;
48965 char* gtk_print_settings_get(PrintSettings* this_, char* key) nothrow;
48966 int gtk_print_settings_get_bool(PrintSettings* this_, char* key) nothrow;
48967 int gtk_print_settings_get_collate(PrintSettings* this_) nothrow;
48968 char* gtk_print_settings_get_default_source(PrintSettings* this_) nothrow;
48969 char* gtk_print_settings_get_dither(PrintSettings* this_) nothrow;
48970 double gtk_print_settings_get_double(PrintSettings* this_, char* key) nothrow;
48971 double gtk_print_settings_get_double_with_default(PrintSettings* this_, char* key, double def) nothrow;
48972 PrintDuplex gtk_print_settings_get_duplex(PrintSettings* this_) nothrow;
48973 char* gtk_print_settings_get_finishings(PrintSettings* this_) nothrow;
48974 int gtk_print_settings_get_int(PrintSettings* this_, char* key) nothrow;
48975 int gtk_print_settings_get_int_with_default(PrintSettings* this_, char* key, int def) nothrow;
48976 double gtk_print_settings_get_length(PrintSettings* this_, char* key, Unit unit) nothrow;
48977 char* gtk_print_settings_get_media_type(PrintSettings* this_) nothrow;
48978 int gtk_print_settings_get_n_copies(PrintSettings* this_) nothrow;
48979 int gtk_print_settings_get_number_up(PrintSettings* this_) nothrow;
48980 NumberUpLayout gtk_print_settings_get_number_up_layout(PrintSettings* this_) nothrow;
48981 PageOrientation gtk_print_settings_get_orientation(PrintSettings* this_) nothrow;
48982 char* gtk_print_settings_get_output_bin(PrintSettings* this_) nothrow;
48983 PageRange* /*new*/ gtk_print_settings_get_page_ranges(PrintSettings* this_, /*out*/ int* num_ranges) nothrow;
48984 PageSet gtk_print_settings_get_page_set(PrintSettings* this_) nothrow;
48985 double gtk_print_settings_get_paper_height(PrintSettings* this_, Unit unit) nothrow;
48986 PaperSize* /*new*/ gtk_print_settings_get_paper_size(PrintSettings* this_) nothrow;
48987 double gtk_print_settings_get_paper_width(PrintSettings* this_, Unit unit) nothrow;
48988 PrintPages gtk_print_settings_get_print_pages(PrintSettings* this_) nothrow;
48989 char* gtk_print_settings_get_printer(PrintSettings* this_) nothrow;
48990 double gtk_print_settings_get_printer_lpi(PrintSettings* this_) nothrow;
48991 PrintQuality gtk_print_settings_get_quality(PrintSettings* this_) nothrow;
48992 int gtk_print_settings_get_resolution(PrintSettings* this_) nothrow;
48993 int gtk_print_settings_get_resolution_x(PrintSettings* this_) nothrow;
48994 int gtk_print_settings_get_resolution_y(PrintSettings* this_) nothrow;
48995 int gtk_print_settings_get_reverse(PrintSettings* this_) nothrow;
48996 double gtk_print_settings_get_scale(PrintSettings* this_) nothrow;
48997 int gtk_print_settings_get_use_color(PrintSettings* this_) nothrow;
48998 int gtk_print_settings_has_key(PrintSettings* this_, char* key) nothrow;
48999 int gtk_print_settings_load_file(PrintSettings* this_, char* file_name, GLib2.Error** error) nothrow;
49000 int gtk_print_settings_load_key_file(PrintSettings* this_, GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error) nothrow;
49001 void gtk_print_settings_set(PrintSettings* this_, char* key, char* value=null) nothrow;
49002 void gtk_print_settings_set_bool(PrintSettings* this_, char* key, int value) nothrow;
49003 void gtk_print_settings_set_collate(PrintSettings* this_, int collate) nothrow;
49004 void gtk_print_settings_set_default_source(PrintSettings* this_, char* default_source) nothrow;
49005 void gtk_print_settings_set_dither(PrintSettings* this_, char* dither) nothrow;
49006 void gtk_print_settings_set_double(PrintSettings* this_, char* key, double value) nothrow;
49007 void gtk_print_settings_set_duplex(PrintSettings* this_, PrintDuplex duplex) nothrow;
49008 void gtk_print_settings_set_finishings(PrintSettings* this_, char* finishings) nothrow;
49009 void gtk_print_settings_set_int(PrintSettings* this_, char* key, int value) nothrow;
49010 void gtk_print_settings_set_length(PrintSettings* this_, char* key, double value, Unit unit) nothrow;
49011 void gtk_print_settings_set_media_type(PrintSettings* this_, char* media_type) nothrow;
49012 void gtk_print_settings_set_n_copies(PrintSettings* this_, int num_copies) nothrow;
49013 void gtk_print_settings_set_number_up(PrintSettings* this_, int number_up) nothrow;
49014 void gtk_print_settings_set_number_up_layout(PrintSettings* this_, NumberUpLayout number_up_layout) nothrow;
49015 void gtk_print_settings_set_orientation(PrintSettings* this_, PageOrientation orientation) nothrow;
49016 void gtk_print_settings_set_output_bin(PrintSettings* this_, char* output_bin) nothrow;
49017 void gtk_print_settings_set_page_ranges(PrintSettings* this_, PageRange* page_ranges, int num_ranges) nothrow;
49018 void gtk_print_settings_set_page_set(PrintSettings* this_, PageSet page_set) nothrow;
49019 void gtk_print_settings_set_paper_height(PrintSettings* this_, double height, Unit unit) nothrow;
49020 void gtk_print_settings_set_paper_size(PrintSettings* this_, PaperSize* paper_size) nothrow;
49021 void gtk_print_settings_set_paper_width(PrintSettings* this_, double width, Unit unit) nothrow;
49022 void gtk_print_settings_set_print_pages(PrintSettings* this_, PrintPages pages) nothrow;
49023 void gtk_print_settings_set_printer(PrintSettings* this_, char* printer) nothrow;
49024 void gtk_print_settings_set_printer_lpi(PrintSettings* this_, double lpi) nothrow;
49025 void gtk_print_settings_set_quality(PrintSettings* this_, PrintQuality quality) nothrow;
49026 void gtk_print_settings_set_resolution(PrintSettings* this_, int resolution) nothrow;
49027 void gtk_print_settings_set_resolution_xy(PrintSettings* this_, int resolution_x, int resolution_y) nothrow;
49028 void gtk_print_settings_set_reverse(PrintSettings* this_, int reverse) nothrow;
49029 void gtk_print_settings_set_scale(PrintSettings* this_, double scale) nothrow;
49030 void gtk_print_settings_set_use_color(PrintSettings* this_, int use_color) nothrow;
49031 int gtk_print_settings_to_file(PrintSettings* this_, char* file_name, GLib2.Error** error) nothrow;
49032 void gtk_print_settings_to_key_file(PrintSettings* this_, GLib2.KeyFile* key_file, char* group_name) nothrow;
49033 void gtk_print_settings_unset(PrintSettings* this_, char* key) nothrow;
49034 void gtk_progress_configure(Progress* this_, double value, double min, double max) nothrow;
49035 double gtk_progress_get_current_percentage(Progress* this_) nothrow;
49036 char* /*new*/ gtk_progress_get_current_text(Progress* this_) nothrow;
49037 double gtk_progress_get_percentage_from_value(Progress* this_, double value) nothrow;
49038 char* /*new*/ gtk_progress_get_text_from_value(Progress* this_, double value) nothrow;
49039 double gtk_progress_get_value(Progress* this_) nothrow;
49040 void gtk_progress_set_activity_mode(Progress* this_, int activity_mode) nothrow;
49041 void gtk_progress_set_adjustment(Progress* this_, Adjustment* adjustment) nothrow;
49042 void gtk_progress_set_format_string(Progress* this_, char* format) nothrow;
49043 void gtk_progress_set_percentage(Progress* this_, double percentage) nothrow;
49044 void gtk_progress_set_show_text(Progress* this_, int show_text) nothrow;
49045 void gtk_progress_set_text_alignment(Progress* this_, float x_align, float y_align) nothrow;
49046 void gtk_progress_set_value(Progress* this_, double value) nothrow;
49047 ProgressBar* gtk_progress_bar_new() nothrow;
49048 ProgressBar* gtk_progress_bar_new_with_adjustment(Adjustment* adjustment=null) nothrow;
49049 Pango.EllipsizeMode gtk_progress_bar_get_ellipsize(ProgressBar* this_) nothrow;
49050 double gtk_progress_bar_get_fraction(ProgressBar* this_) nothrow;
49051 ProgressBarOrientation gtk_progress_bar_get_orientation(ProgressBar* this_) nothrow;
49052 double gtk_progress_bar_get_pulse_step(ProgressBar* this_) nothrow;
49053 char* gtk_progress_bar_get_text(ProgressBar* this_) nothrow;
49054 void gtk_progress_bar_pulse(ProgressBar* this_) nothrow;
49055 void gtk_progress_bar_set_activity_blocks(ProgressBar* this_, uint blocks) nothrow;
49056 void gtk_progress_bar_set_activity_step(ProgressBar* this_, uint step) nothrow;
49057 void gtk_progress_bar_set_bar_style(ProgressBar* this_, ProgressBarStyle style) nothrow;
49058 void gtk_progress_bar_set_discrete_blocks(ProgressBar* this_, uint blocks) nothrow;
49059 void gtk_progress_bar_set_ellipsize(ProgressBar* this_, Pango.EllipsizeMode mode) nothrow;
49060 void gtk_progress_bar_set_fraction(ProgressBar* this_, double fraction) nothrow;
49061 void gtk_progress_bar_set_orientation(ProgressBar* this_, ProgressBarOrientation orientation) nothrow;
49062 void gtk_progress_bar_set_pulse_step(ProgressBar* this_, double fraction) nothrow;
49063 void gtk_progress_bar_set_text(ProgressBar* this_, char* text=null) nothrow;
49064 void gtk_progress_bar_update(ProgressBar* this_, double percentage) nothrow;
49065 RadioAction* /*new*/ gtk_radio_action_new(char* name, char* label, char* tooltip, char* stock_id, int value) nothrow;
49066 int gtk_radio_action_get_current_value(RadioAction* this_) nothrow;
49067 GLib2.SList* gtk_radio_action_get_group(RadioAction* this_) nothrow;
49068 void gtk_radio_action_set_current_value(RadioAction* this_, int current_value) nothrow;
49069 void gtk_radio_action_set_group(RadioAction* this_, GLib2.SList* group) nothrow;
49070 RadioButton* gtk_radio_button_new(GLib2.SList* group=null) nothrow;
49071 RadioButton* gtk_radio_button_new_with_label(GLib2.SList* group, char* label) nothrow;
49072 RadioButton* gtk_radio_button_new_with_label_from_widget(RadioButton* radio_group_member, char* label) nothrow;
49073 RadioButton* gtk_radio_button_new_with_mnemonic(GLib2.SList* group, char* label) nothrow;
49074 RadioButton* gtk_radio_button_new_with_mnemonic_from_widget(RadioButton* radio_group_member, char* label) nothrow;
49075 GLib2.SList* gtk_radio_button_get_group(RadioButton* this_) nothrow;
49076 Widget* gtk_radio_button_new_from_widget(RadioButton* this_) nothrow;
49077 void gtk_radio_button_set_group(RadioButton* this_, GLib2.SList* group) nothrow;
49078 RadioMenuItem* gtk_radio_menu_item_new(GLib2.SList* group) nothrow;
49079 RadioMenuItem* gtk_radio_menu_item_new_with_label(GLib2.SList* group, char* label) nothrow;
49080 RadioMenuItem* gtk_radio_menu_item_new_with_mnemonic(GLib2.SList* group, char* label) nothrow;
49081 GLib2.SList* gtk_radio_menu_item_get_group(RadioMenuItem* this_) nothrow;
49082 Widget* gtk_radio_menu_item_new_from_widget(RadioMenuItem* this_) nothrow;
49083 Widget* gtk_radio_menu_item_new_with_label_from_widget(RadioMenuItem* this_, char* label) nothrow;
49084 Widget* gtk_radio_menu_item_new_with_mnemonic_from_widget(RadioMenuItem* this_, char* label) nothrow;
49085 void gtk_radio_menu_item_set_group(RadioMenuItem* this_, GLib2.SList* group) nothrow;
49086 RadioToolButton* gtk_radio_tool_button_new(GLib2.SList* group=null) nothrow;
49087 RadioToolButton* gtk_radio_tool_button_new_from_stock(GLib2.SList* group, char* stock_id) nothrow;
49088 GLib2.SList* gtk_radio_tool_button_get_group(RadioToolButton* this_) nothrow;
49089 ToolItem* gtk_radio_tool_button_new_from_widget(RadioToolButton* this_) nothrow;
49090 ToolItem* gtk_radio_tool_button_new_with_stock_from_widget(RadioToolButton* this_, char* stock_id) nothrow;
49091 void gtk_radio_tool_button_set_group(RadioToolButton* this_, GLib2.SList* group) nothrow;
49092 Adjustment* gtk_range_get_adjustment(Range* this_) nothrow;
49093 double gtk_range_get_fill_level(Range* this_) nothrow;
49094 int gtk_range_get_flippable(Range* this_) nothrow;
49095 int gtk_range_get_inverted(Range* this_) nothrow;
49096 SensitivityType gtk_range_get_lower_stepper_sensitivity(Range* this_) nothrow;
49097 int gtk_range_get_min_slider_size(Range* this_) nothrow;
49098 void gtk_range_get_range_rect(Range* this_, /*out*/ Gdk2.Rectangle* range_rect) nothrow;
49099 int gtk_range_get_restrict_to_fill_level(Range* this_) nothrow;
49100 int gtk_range_get_round_digits(Range* this_) nothrow;
49101 int gtk_range_get_show_fill_level(Range* this_) nothrow;
49102 void gtk_range_get_slider_range(Range* this_, /*out*/ int* slider_start=null, /*out*/ int* slider_end=null) nothrow;
49103 int gtk_range_get_slider_size_fixed(Range* this_) nothrow;
49104 UpdateType gtk_range_get_update_policy(Range* this_) nothrow;
49105 SensitivityType gtk_range_get_upper_stepper_sensitivity(Range* this_) nothrow;
49106 double gtk_range_get_value(Range* this_) nothrow;
49107 void gtk_range_set_adjustment(Range* this_, Adjustment* adjustment) nothrow;
49108 void gtk_range_set_fill_level(Range* this_, double fill_level) nothrow;
49109 void gtk_range_set_flippable(Range* this_, int flippable) nothrow;
49110 void gtk_range_set_increments(Range* this_, double step, double page) nothrow;
49111 void gtk_range_set_inverted(Range* this_, int setting) nothrow;
49112 void gtk_range_set_lower_stepper_sensitivity(Range* this_, SensitivityType sensitivity) nothrow;
49113 void gtk_range_set_min_slider_size(Range* this_, int min_size) nothrow;
49114 void gtk_range_set_range(Range* this_, double min, double max) nothrow;
49115 void gtk_range_set_restrict_to_fill_level(Range* this_, int restrict_to_fill_level) nothrow;
49116 void gtk_range_set_round_digits(Range* this_, int round_digits) nothrow;
49117 void gtk_range_set_show_fill_level(Range* this_, int show_fill_level) nothrow;
49118 void gtk_range_set_slider_size_fixed(Range* this_, int size_fixed) nothrow;
49119 void gtk_range_set_update_policy(Range* this_, UpdateType policy) nothrow;
49120 void gtk_range_set_upper_stepper_sensitivity(Range* this_, SensitivityType sensitivity) nothrow;
49121 void gtk_range_set_value(Range* this_, double value) nothrow;
49122 int gtk_rc_property_parse_border(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) nothrow;
49123 int gtk_rc_property_parse_color(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) nothrow;
49124 int gtk_rc_property_parse_enum(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) nothrow;
49125 int gtk_rc_property_parse_flags(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) nothrow;
49126 int gtk_rc_property_parse_requisition(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) nothrow;
49127 RcStyle* /*new*/ gtk_rc_style_new() nothrow;
49128 RcStyle* /*new*/ gtk_rc_style_copy(RcStyle* this_) nothrow;
49129 void gtk_rc_style_ref(RcStyle* this_) nothrow;
49130 void gtk_rc_style_unref(RcStyle* this_) nothrow;
49131 RecentAction* /*new*/ gtk_recent_action_new(char* name, char* label, char* tooltip, char* stock_id) nothrow;
49132 RecentAction* /*new*/ gtk_recent_action_new_for_manager(char* name, char* label, char* tooltip, char* stock_id, RecentManager* manager=null) nothrow;
49133 int gtk_recent_action_get_show_numbers(RecentAction* this_) nothrow;
49134 void gtk_recent_action_set_show_numbers(RecentAction* this_, int show_numbers) nothrow;
49135 void gtk_recent_chooser_add_filter(RecentChooser* this_, RecentFilter* filter) nothrow;
49136 RecentInfo* /*new*/ gtk_recent_chooser_get_current_item(RecentChooser* this_) nothrow;
49137 char* /*new*/ gtk_recent_chooser_get_current_uri(RecentChooser* this_) nothrow;
49138 RecentFilter* gtk_recent_chooser_get_filter(RecentChooser* this_) nothrow;
49139 GLib2.List* /*new*/ gtk_recent_chooser_get_items(RecentChooser* this_) nothrow;
49140 int gtk_recent_chooser_get_limit(RecentChooser* this_) nothrow;
49141 int gtk_recent_chooser_get_local_only(RecentChooser* this_) nothrow;
49142 int gtk_recent_chooser_get_select_multiple(RecentChooser* this_) nothrow;
49143 int gtk_recent_chooser_get_show_icons(RecentChooser* this_) nothrow;
49144 int gtk_recent_chooser_get_show_not_found(RecentChooser* this_) nothrow;
49145 int gtk_recent_chooser_get_show_numbers(RecentChooser* this_) nothrow;
49146 int gtk_recent_chooser_get_show_private(RecentChooser* this_) nothrow;
49147 int gtk_recent_chooser_get_show_tips(RecentChooser* this_) nothrow;
49148 RecentSortType gtk_recent_chooser_get_sort_type(RecentChooser* this_) nothrow;
49149 char** /*new*/ gtk_recent_chooser_get_uris(RecentChooser* this_, /*out*/ size_t* length=null) nothrow;
49150 GLib2.SList* /*new container*/ gtk_recent_chooser_list_filters(RecentChooser* this_) nothrow;
49151 void gtk_recent_chooser_remove_filter(RecentChooser* this_, RecentFilter* filter) nothrow;
49152 void gtk_recent_chooser_select_all(RecentChooser* this_) nothrow;
49153 int gtk_recent_chooser_select_uri(RecentChooser* this_, char* uri, GLib2.Error** error) nothrow;
49154 int gtk_recent_chooser_set_current_uri(RecentChooser* this_, char* uri, GLib2.Error** error) nothrow;
49155 void gtk_recent_chooser_set_filter(RecentChooser* this_, RecentFilter* filter) nothrow;
49156 void gtk_recent_chooser_set_limit(RecentChooser* this_, int limit) nothrow;
49157 void gtk_recent_chooser_set_local_only(RecentChooser* this_, int local_only) nothrow;
49158 void gtk_recent_chooser_set_select_multiple(RecentChooser* this_, int select_multiple) nothrow;
49159 void gtk_recent_chooser_set_show_icons(RecentChooser* this_, int show_icons) nothrow;
49160 void gtk_recent_chooser_set_show_not_found(RecentChooser* this_, int show_not_found) nothrow;
49161 void gtk_recent_chooser_set_show_numbers(RecentChooser* this_, int show_numbers) nothrow;
49162 void gtk_recent_chooser_set_show_private(RecentChooser* this_, int show_private) nothrow;
49163 void gtk_recent_chooser_set_show_tips(RecentChooser* this_, int show_tips) nothrow;
49164 void gtk_recent_chooser_set_sort_func(RecentChooser* this_, RecentSortFunc sort_func, void* sort_data=null, GLib2.DestroyNotify data_destroy=null) nothrow;
49165 void gtk_recent_chooser_set_sort_type(RecentChooser* this_, RecentSortType sort_type) nothrow;
49166 void gtk_recent_chooser_unselect_all(RecentChooser* this_) nothrow;
49167 void gtk_recent_chooser_unselect_uri(RecentChooser* this_, char* uri) nothrow;
49168 RecentChooserDialog* gtk_recent_chooser_dialog_new(char* title=null, Window* parent=null, char* first_button_text=null, ...) nothrow;
49169 RecentChooserDialog* gtk_recent_chooser_dialog_new_for_manager(char* title, Window* parent, RecentManager* manager, char* first_button_text=null, ...) nothrow;
49170 RecentChooserMenu* gtk_recent_chooser_menu_new() nothrow;
49171 RecentChooserMenu* gtk_recent_chooser_menu_new_for_manager(RecentManager* manager) nothrow;
49172 int gtk_recent_chooser_menu_get_show_numbers(RecentChooserMenu* this_) nothrow;
49173 void gtk_recent_chooser_menu_set_show_numbers(RecentChooserMenu* this_, int show_numbers) nothrow;
49174 RecentChooserWidget* gtk_recent_chooser_widget_new() nothrow;
49175 RecentChooserWidget* gtk_recent_chooser_widget_new_for_manager(RecentManager* manager) nothrow;
49176 RecentFilter* gtk_recent_filter_new() nothrow;
49177 void gtk_recent_filter_add_age(RecentFilter* this_, int days) nothrow;
49178 void gtk_recent_filter_add_application(RecentFilter* this_, char* application) nothrow;
49179 void gtk_recent_filter_add_custom(RecentFilter* this_, RecentFilterFlags needed, RecentFilterFunc func, void* data, GLib2.DestroyNotify data_destroy) nothrow;
49180 void gtk_recent_filter_add_group(RecentFilter* this_, char* group) nothrow;
49181 void gtk_recent_filter_add_mime_type(RecentFilter* this_, char* mime_type) nothrow;
49182 void gtk_recent_filter_add_pattern(RecentFilter* this_, char* pattern) nothrow;
49183 void gtk_recent_filter_add_pixbuf_formats(RecentFilter* this_) nothrow;
49184 int gtk_recent_filter_filter(RecentFilter* this_, RecentFilterInfo* filter_info) nothrow;
49185 char* gtk_recent_filter_get_name(RecentFilter* this_) nothrow;
49186 RecentFilterFlags gtk_recent_filter_get_needed(RecentFilter* this_) nothrow;
49187 void gtk_recent_filter_set_name(RecentFilter* this_, char* name) nothrow;
49188 int gtk_recent_info_exists(RecentInfo* this_) nothrow;
49189 time_t gtk_recent_info_get_added(RecentInfo* this_) nothrow;
49190 int gtk_recent_info_get_age(RecentInfo* this_) nothrow;
49191 int gtk_recent_info_get_application_info(RecentInfo* this_, char* app_name, /*out*/ char** app_exec, /*out*/ uint* count, /*out*/ time_t* time_) nothrow;
49192 char** /*new*/ gtk_recent_info_get_applications(RecentInfo* this_, /*out*/ size_t* length=null) nothrow;
49193 char* gtk_recent_info_get_description(RecentInfo* this_) nothrow;
49194 char* gtk_recent_info_get_display_name(RecentInfo* this_) nothrow;
49195 char** /*new*/ gtk_recent_info_get_groups(RecentInfo* this_, /*out*/ size_t* length=null) nothrow;
49196 GdkPixbuf2.Pixbuf* /*new*/ gtk_recent_info_get_icon(RecentInfo* this_, int size) nothrow;
49197 char* gtk_recent_info_get_mime_type(RecentInfo* this_) nothrow;
49198 time_t gtk_recent_info_get_modified(RecentInfo* this_) nothrow;
49199 int gtk_recent_info_get_private_hint(RecentInfo* this_) nothrow;
49200 char* /*new*/ gtk_recent_info_get_short_name(RecentInfo* this_) nothrow;
49201 char* gtk_recent_info_get_uri(RecentInfo* this_) nothrow;
49202 char* /*new*/ gtk_recent_info_get_uri_display(RecentInfo* this_) nothrow;
49203 time_t gtk_recent_info_get_visited(RecentInfo* this_) nothrow;
49204 int gtk_recent_info_has_application(RecentInfo* this_, char* app_name) nothrow;
49205 int gtk_recent_info_has_group(RecentInfo* this_, char* group_name) nothrow;
49206 int gtk_recent_info_is_local(RecentInfo* this_) nothrow;
49207 char* /*new*/ gtk_recent_info_last_application(RecentInfo* this_) nothrow;
49208 int gtk_recent_info_match(RecentInfo* this_, RecentInfo* info_b) nothrow;
49209 RecentInfo* /*new*/ gtk_recent_info_ref(RecentInfo* this_) nothrow;
49210 void gtk_recent_info_unref(RecentInfo* this_) nothrow;
49211 RecentManager* /*new*/ gtk_recent_manager_new() nothrow;
49212 RecentManager* gtk_recent_manager_get_default() nothrow;
49213 RecentManager* gtk_recent_manager_get_for_screen(Gdk2.Screen* screen) nothrow;
49214 int gtk_recent_manager_add_full(RecentManager* this_, char* uri, RecentData* recent_data) nothrow;
49215 int gtk_recent_manager_add_item(RecentManager* this_, char* uri) nothrow;
49216 GLib2.List* /*new*/ gtk_recent_manager_get_items(RecentManager* this_) nothrow;
49217 int gtk_recent_manager_get_limit(RecentManager* this_) nothrow;
49218 int gtk_recent_manager_has_item(RecentManager* this_, char* uri) nothrow;
49219 RecentInfo* /*new*/ gtk_recent_manager_lookup_item(RecentManager* this_, char* uri, GLib2.Error** error) nothrow;
49220 int gtk_recent_manager_move_item(RecentManager* this_, char* uri, char* new_uri, GLib2.Error** error) nothrow;
49221 int gtk_recent_manager_purge_items(RecentManager* this_, GLib2.Error** error) nothrow;
49222 int gtk_recent_manager_remove_item(RecentManager* this_, char* uri, GLib2.Error** error) nothrow;
49223 void gtk_recent_manager_set_limit(RecentManager* this_, int limit) nothrow;
49224 void gtk_recent_manager_set_screen(RecentManager* this_, Gdk2.Screen* screen) nothrow;
49225 Requisition* /*new*/ gtk_requisition_copy(Requisition* this_) nothrow;
49226 void gtk_requisition_free(Requisition* this_) nothrow;
49227 void gtk_ruler_draw_pos(Ruler* this_) nothrow;
49228 void gtk_ruler_draw_ticks(Ruler* this_) nothrow;
49229 MetricType gtk_ruler_get_metric(Ruler* this_) nothrow;
49230 void gtk_ruler_get_range(Ruler* this_, double* lower, double* upper, double* position, double* max_size) nothrow;
49231 void gtk_ruler_set_metric(Ruler* this_, MetricType metric) nothrow;
49232 void gtk_ruler_set_range(Ruler* this_, double lower, double upper, double position, double max_size) nothrow;
49233 void gtk_scale_add_mark(Scale* this_, double value, PositionType position, char* markup=null) nothrow;
49234 void gtk_scale_clear_marks(Scale* this_) nothrow;
49235 int gtk_scale_get_digits(Scale* this_) nothrow;
49236 int gtk_scale_get_draw_value(Scale* this_) nothrow;
49237 Pango.Layout* gtk_scale_get_layout(Scale* this_) nothrow;
49238 void gtk_scale_get_layout_offsets(Scale* this_, /*out*/ int* x=null, /*out*/ int* y=null) nothrow;
49239 PositionType gtk_scale_get_value_pos(Scale* this_) nothrow;
49240 void gtk_scale_set_digits(Scale* this_, int digits) nothrow;
49241 void gtk_scale_set_draw_value(Scale* this_, int draw_value) nothrow;
49242 void gtk_scale_set_value_pos(Scale* this_, PositionType pos) nothrow;
49243 ScaleButton* gtk_scale_button_new(IconSize size, double min, double max, double step, char** icons=null) nothrow;
49244 Adjustment* gtk_scale_button_get_adjustment(ScaleButton* this_) nothrow;
49245 Widget* gtk_scale_button_get_minus_button(ScaleButton* this_) nothrow;
49246 Orientation gtk_scale_button_get_orientation(ScaleButton* this_) nothrow;
49247 Widget* gtk_scale_button_get_plus_button(ScaleButton* this_) nothrow;
49248 Widget* gtk_scale_button_get_popup(ScaleButton* this_) nothrow;
49249 double gtk_scale_button_get_value(ScaleButton* this_) nothrow;
49250 void gtk_scale_button_set_adjustment(ScaleButton* this_, Adjustment* adjustment) nothrow;
49251 void gtk_scale_button_set_icons(ScaleButton* this_, char** icons) nothrow;
49252 void gtk_scale_button_set_orientation(ScaleButton* this_, Orientation orientation) nothrow;
49253 void gtk_scale_button_set_value(ScaleButton* this_, double value) nothrow;
49254 ScrolledWindow* gtk_scrolled_window_new(Adjustment* hadjustment=null, Adjustment* vadjustment=null) nothrow;
49255 void gtk_scrolled_window_add_with_viewport(ScrolledWindow* this_, Widget* child) nothrow;
49256 Adjustment* gtk_scrolled_window_get_hadjustment(ScrolledWindow* this_) nothrow;
49257 Widget* gtk_scrolled_window_get_hscrollbar(ScrolledWindow* this_) nothrow;
49258 CornerType gtk_scrolled_window_get_placement(ScrolledWindow* this_) nothrow;
49259 void gtk_scrolled_window_get_policy(ScrolledWindow* this_, /*out*/ PolicyType* hscrollbar_policy=null, /*out*/ PolicyType* vscrollbar_policy=null) nothrow;
49260 ShadowType gtk_scrolled_window_get_shadow_type(ScrolledWindow* this_) nothrow;
49261 Adjustment* gtk_scrolled_window_get_vadjustment(ScrolledWindow* this_) nothrow;
49262 Widget* gtk_scrolled_window_get_vscrollbar(ScrolledWindow* this_) nothrow;
49263 void gtk_scrolled_window_set_hadjustment(ScrolledWindow* this_, Adjustment* hadjustment) nothrow;
49264 void gtk_scrolled_window_set_placement(ScrolledWindow* this_, CornerType window_placement) nothrow;
49265 void gtk_scrolled_window_set_policy(ScrolledWindow* this_, PolicyType hscrollbar_policy, PolicyType vscrollbar_policy) nothrow;
49266 void gtk_scrolled_window_set_shadow_type(ScrolledWindow* this_, ShadowType type) nothrow;
49267 void gtk_scrolled_window_set_vadjustment(ScrolledWindow* this_, Adjustment* vadjustment) nothrow;
49268 void gtk_scrolled_window_unset_placement(ScrolledWindow* this_) nothrow;
49269 SelectionData* /*new*/ gtk_selection_data_copy(SelectionData* this_) nothrow;
49270 void gtk_selection_data_free(SelectionData* this_) nothrow;
49271 ubyte* gtk_selection_data_get_data(SelectionData* this_) nothrow;
49272 Gdk2.Atom gtk_selection_data_get_data_type(SelectionData* this_) nothrow;
49273 Gdk2.Display* gtk_selection_data_get_display(SelectionData* this_) nothrow;
49274 int gtk_selection_data_get_format(SelectionData* this_) nothrow;
49275 int gtk_selection_data_get_length(SelectionData* this_) nothrow;
49276 GdkPixbuf2.Pixbuf* /*new*/ gtk_selection_data_get_pixbuf(SelectionData* this_) nothrow;
49277 Gdk2.Atom gtk_selection_data_get_selection(SelectionData* this_) nothrow;
49278 Gdk2.Atom gtk_selection_data_get_target(SelectionData* this_) nothrow;
49279 int gtk_selection_data_get_targets(SelectionData* this_, /*out*/ Gdk2.Atom** targets, /*out*/ int* n_atoms) nothrow;
49280 ubyte* gtk_selection_data_get_text(SelectionData* this_) nothrow;
49281 char** /*new*/ gtk_selection_data_get_uris(SelectionData* this_) nothrow;
49282 void gtk_selection_data_set(SelectionData* this_, Gdk2.Atom type, int format, ubyte* data, int length) nothrow;
49283 int gtk_selection_data_set_pixbuf(SelectionData* this_, GdkPixbuf2.Pixbuf* pixbuf) nothrow;
49284 int gtk_selection_data_set_text(SelectionData* this_, char* str, int len) nothrow;
49285 int gtk_selection_data_set_uris(SelectionData* this_, char** uris) nothrow;
49286 int gtk_selection_data_targets_include_image(SelectionData* this_, int writable) nothrow;
49287 int gtk_selection_data_targets_include_rich_text(SelectionData* this_, TextBuffer* buffer) nothrow;
49288 int gtk_selection_data_targets_include_text(SelectionData* this_) nothrow;
49289 int gtk_selection_data_targets_include_uri(SelectionData* this_) nothrow;
49290 SeparatorMenuItem* gtk_separator_menu_item_new() nothrow;
49291 SeparatorToolItem* gtk_separator_tool_item_new() nothrow;
49292 int gtk_separator_tool_item_get_draw(SeparatorToolItem* this_) nothrow;
49293 void gtk_separator_tool_item_set_draw(SeparatorToolItem* this_, int draw) nothrow;
49294 Settings* gtk_settings_get_default() nothrow;
49295 Settings* gtk_settings_get_for_screen(Gdk2.Screen* screen) nothrow;
49296 void gtk_settings_install_property(GObject2.ParamSpec* pspec) nothrow;
49297 void gtk_settings_install_property_parser(GObject2.ParamSpec* pspec, RcPropertyParser parser) nothrow;
49298 void gtk_settings_set_double_property(Settings* this_, char* name, double v_double, char* origin) nothrow;
49299 void gtk_settings_set_long_property(Settings* this_, char* name, c_long v_long, char* origin) nothrow;
49300 void gtk_settings_set_property_value(Settings* this_, char* name, SettingsValue* svalue) nothrow;
49301 void gtk_settings_set_string_property(Settings* this_, char* name, char* v_string, char* origin) nothrow;
49302 SizeGroup* /*new*/ gtk_size_group_new(SizeGroupMode mode) nothrow;
49303 void gtk_size_group_add_widget(SizeGroup* this_, Widget* widget) nothrow;
49304 int gtk_size_group_get_ignore_hidden(SizeGroup* this_) nothrow;
49305 SizeGroupMode gtk_size_group_get_mode(SizeGroup* this_) nothrow;
49306 GLib2.SList* gtk_size_group_get_widgets(SizeGroup* this_) nothrow;
49307 void gtk_size_group_remove_widget(SizeGroup* this_, Widget* widget) nothrow;
49308 void gtk_size_group_set_ignore_hidden(SizeGroup* this_, int ignore_hidden) nothrow;
49309 void gtk_size_group_set_mode(SizeGroup* this_, SizeGroupMode mode) nothrow;
49310 Socket* gtk_socket_new() nothrow;
49311 void gtk_socket_add_id(Socket* this_, Gdk2.NativeWindow window_id) nothrow;
49312 Gdk2.NativeWindow gtk_socket_get_id(Socket* this_) nothrow;
49313 Gdk2.Window* gtk_socket_get_plug_window(Socket* this_) nothrow;
49314 void gtk_socket_steal(Socket* this_, Gdk2.NativeWindow wid) nothrow;
49315 SpinButton* gtk_spin_button_new(Adjustment* adjustment, double climb_rate, uint digits) nothrow;
49316 SpinButton* gtk_spin_button_new_with_range(double min, double max, double step) nothrow;
49317 void gtk_spin_button_configure(SpinButton* this_, Adjustment* adjustment, double climb_rate, uint digits) nothrow;
49318 Adjustment* gtk_spin_button_get_adjustment(SpinButton* this_) nothrow;
49319 uint gtk_spin_button_get_digits(SpinButton* this_) nothrow;
49320 void gtk_spin_button_get_increments(SpinButton* this_, /*out*/ double* step=null, /*out*/ double* page=null) nothrow;
49321 int gtk_spin_button_get_numeric(SpinButton* this_) nothrow;
49322 void gtk_spin_button_get_range(SpinButton* this_, /*out*/ double* min=null, /*out*/ double* max=null) nothrow;
49323 int gtk_spin_button_get_snap_to_ticks(SpinButton* this_) nothrow;
49324 SpinButtonUpdatePolicy gtk_spin_button_get_update_policy(SpinButton* this_) nothrow;
49325 double gtk_spin_button_get_value(SpinButton* this_) nothrow;
49326 int gtk_spin_button_get_value_as_int(SpinButton* this_) nothrow;
49327 int gtk_spin_button_get_wrap(SpinButton* this_) nothrow;
49328 void gtk_spin_button_set_adjustment(SpinButton* this_, Adjustment* adjustment) nothrow;
49329 void gtk_spin_button_set_digits(SpinButton* this_, uint digits) nothrow;
49330 void gtk_spin_button_set_increments(SpinButton* this_, double step, double page) nothrow;
49331 void gtk_spin_button_set_numeric(SpinButton* this_, int numeric) nothrow;
49332 void gtk_spin_button_set_range(SpinButton* this_, double min, double max) nothrow;
49333 void gtk_spin_button_set_snap_to_ticks(SpinButton* this_, int snap_to_ticks) nothrow;
49334 void gtk_spin_button_set_update_policy(SpinButton* this_, SpinButtonUpdatePolicy policy) nothrow;
49335 void gtk_spin_button_set_value(SpinButton* this_, double value) nothrow;
49336 void gtk_spin_button_set_wrap(SpinButton* this_, int wrap) nothrow;
49337 void gtk_spin_button_spin(SpinButton* this_, SpinType direction, double increment) nothrow;
49338 void gtk_spin_button_update(SpinButton* this_) nothrow;
49339 Spinner* gtk_spinner_new() nothrow;
49340 void gtk_spinner_start(Spinner* this_) nothrow;
49341 void gtk_spinner_stop(Spinner* this_) nothrow;
49342 StatusIcon* /*new*/ gtk_status_icon_new() nothrow;
49343 StatusIcon* /*new*/ gtk_status_icon_new_from_file(char* filename) nothrow;
49344 StatusIcon* /*new*/ gtk_status_icon_new_from_gicon(Gio2.Icon* icon) nothrow;
49345 StatusIcon* /*new*/ gtk_status_icon_new_from_icon_name(char* icon_name) nothrow;
49346 StatusIcon* /*new*/ gtk_status_icon_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf) nothrow;
49347 StatusIcon* /*new*/ gtk_status_icon_new_from_stock(char* stock_id) nothrow;
49348 void gtk_status_icon_position_menu(Menu* menu, int* x, int* y, int* push_in, void* user_data) nothrow;
49349 int gtk_status_icon_get_blinking(StatusIcon* this_) nothrow;
49350 int gtk_status_icon_get_geometry(StatusIcon* this_, /*out*/ Gdk2.Screen** screen=null, /*out*/ Gdk2.Rectangle* area=null, /*out*/ Orientation* orientation=null) nothrow;
49351 Gio2.Icon* gtk_status_icon_get_gicon(StatusIcon* this_) nothrow;
49352 int gtk_status_icon_get_has_tooltip(StatusIcon* this_) nothrow;
49353 char* gtk_status_icon_get_icon_name(StatusIcon* this_) nothrow;
49354 GdkPixbuf2.Pixbuf* gtk_status_icon_get_pixbuf(StatusIcon* this_) nothrow;
49355 Gdk2.Screen* gtk_status_icon_get_screen(StatusIcon* this_) nothrow;
49356 int gtk_status_icon_get_size(StatusIcon* this_) nothrow;
49357 char* gtk_status_icon_get_stock(StatusIcon* this_) nothrow;
49358 ImageType gtk_status_icon_get_storage_type(StatusIcon* this_) nothrow;
49359 char* gtk_status_icon_get_title(StatusIcon* this_) nothrow;
49360 char* /*new*/ gtk_status_icon_get_tooltip_markup(StatusIcon* this_) nothrow;
49361 char* /*new*/ gtk_status_icon_get_tooltip_text(StatusIcon* this_) nothrow;
49362 int gtk_status_icon_get_visible(StatusIcon* this_) nothrow;
49363 uint gtk_status_icon_get_x11_window_id(StatusIcon* this_) nothrow;
49364 int gtk_status_icon_is_embedded(StatusIcon* this_) nothrow;
49365 void gtk_status_icon_set_blinking(StatusIcon* this_, int blinking) nothrow;
49366 void gtk_status_icon_set_from_file(StatusIcon* this_, char* filename) nothrow;
49367 void gtk_status_icon_set_from_gicon(StatusIcon* this_, Gio2.Icon* icon) nothrow;
49368 void gtk_status_icon_set_from_icon_name(StatusIcon* this_, char* icon_name) nothrow;
49369 void gtk_status_icon_set_from_pixbuf(StatusIcon* this_, GdkPixbuf2.Pixbuf* pixbuf=null) nothrow;
49370 void gtk_status_icon_set_from_stock(StatusIcon* this_, char* stock_id) nothrow;
49371 void gtk_status_icon_set_has_tooltip(StatusIcon* this_, int has_tooltip) nothrow;
49372 void gtk_status_icon_set_name(StatusIcon* this_, char* name) nothrow;
49373 void gtk_status_icon_set_screen(StatusIcon* this_, Gdk2.Screen* screen) nothrow;
49374 void gtk_status_icon_set_title(StatusIcon* this_, char* title) nothrow;
49375 void gtk_status_icon_set_tooltip(StatusIcon* this_, char* tooltip_text=null) nothrow;
49376 void gtk_status_icon_set_tooltip_markup(StatusIcon* this_, char* markup=null) nothrow;
49377 void gtk_status_icon_set_tooltip_text(StatusIcon* this_, char* text) nothrow;
49378 void gtk_status_icon_set_visible(StatusIcon* this_, int visible) nothrow;
49379 Statusbar* gtk_statusbar_new() nothrow;
49380 uint gtk_statusbar_get_context_id(Statusbar* this_, char* context_description) nothrow;
49381 int gtk_statusbar_get_has_resize_grip(Statusbar* this_) nothrow;
49382 Widget* gtk_statusbar_get_message_area(Statusbar* this_) nothrow;
49383 void gtk_statusbar_pop(Statusbar* this_, uint context_id) nothrow;
49384 uint gtk_statusbar_push(Statusbar* this_, uint context_id, char* text) nothrow;
49385 void gtk_statusbar_remove(Statusbar* this_, uint context_id, uint message_id) nothrow;
49386 void gtk_statusbar_remove_all(Statusbar* this_, uint context_id) nothrow;
49387 void gtk_statusbar_set_has_resize_grip(Statusbar* this_, int setting) nothrow;
49388 StockItem* gtk_stock_item_copy(StockItem* this_) nothrow;
49389 void gtk_stock_item_free(StockItem* this_) nothrow;
49390 Style* /*new*/ gtk_style_new() nothrow;
49391 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) nothrow;
49392 Style* gtk_style_attach(Style* this_, Gdk2.Window* window) nothrow;
49393 Style* /*new*/ gtk_style_copy(Style* this_) nothrow;
49394 void gtk_style_detach(Style* this_) nothrow;
49395 void gtk_style_get(Style* this_, Type widget_type, char* first_property_name, ...) nothrow;
49396 Gdk2.Font* /*new*/ gtk_style_get_font(Style* this_) nothrow;
49397 void gtk_style_get_style_property(Style* this_, Type widget_type, char* property_name, GObject2.Value* value) nothrow;
49398 void gtk_style_get_valist(Style* this_, Type widget_type, char* first_property_name, va_list var_args) nothrow;
49399 int gtk_style_lookup_color(Style* this_, char* color_name, /*out*/ Gdk2.Color* color) nothrow;
49400 IconSet* gtk_style_lookup_icon_set(Style* this_, char* stock_id) nothrow;
49401 Style* gtk_style_ref(Style* this_) nothrow;
49402 GdkPixbuf2.Pixbuf* /*new*/ gtk_style_render_icon(Style* this_, IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null) nothrow;
49403 void gtk_style_set_background(Style* this_, Gdk2.Window* window, StateType state_type) nothrow;
49404 void gtk_style_set_font(Style* this_, Gdk2.Font* font=null) nothrow;
49405 void gtk_style_unref(Style* this_) nothrow;
49406 Table* gtk_table_new(uint rows, uint columns, int homogeneous) nothrow;
49407 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) nothrow;
49408 void gtk_table_attach_defaults(Table* this_, Widget* widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) nothrow;
49409 uint gtk_table_get_col_spacing(Table* this_, uint column) nothrow;
49410 uint gtk_table_get_default_col_spacing(Table* this_) nothrow;
49411 uint gtk_table_get_default_row_spacing(Table* this_) nothrow;
49412 int gtk_table_get_homogeneous(Table* this_) nothrow;
49413 uint gtk_table_get_row_spacing(Table* this_, uint row) nothrow;
49414 void gtk_table_get_size(Table* this_, /*out*/ uint* rows=null, /*out*/ uint* columns=null) nothrow;
49415 void gtk_table_resize(Table* this_, uint rows, uint columns) nothrow;
49416 void gtk_table_set_col_spacing(Table* this_, uint column, uint spacing) nothrow;
49417 void gtk_table_set_col_spacings(Table* this_, uint spacing) nothrow;
49418 void gtk_table_set_homogeneous(Table* this_, int homogeneous) nothrow;
49419 void gtk_table_set_row_spacing(Table* this_, uint row, uint spacing) nothrow;
49420 void gtk_table_set_row_spacings(Table* this_, uint spacing) nothrow;
49421 TargetList* /*new*/ gtk_target_list_new(TargetEntry* targets, uint ntargets) nothrow;
49422 void gtk_target_list_add(TargetList* this_, Gdk2.Atom target, uint flags, uint info) nothrow;
49423 void gtk_target_list_add_image_targets(TargetList* this_, uint info, int writable) nothrow;
49424 void gtk_target_list_add_rich_text_targets(TargetList* this_, uint info, int deserializable, TextBuffer* buffer) nothrow;
49425 void gtk_target_list_add_table(TargetList* this_, TargetEntry* targets, uint ntargets) nothrow;
49426 void gtk_target_list_add_text_targets(TargetList* this_, uint info) nothrow;
49427 void gtk_target_list_add_uri_targets(TargetList* this_, uint info) nothrow;
49428 int gtk_target_list_find(TargetList* this_, Gdk2.Atom target, uint* info) nothrow;
49429 TargetList* /*new*/ gtk_target_list_ref(TargetList* this_) nothrow;
49430 void gtk_target_list_remove(TargetList* this_, Gdk2.Atom target) nothrow;
49431 void gtk_target_list_unref(TargetList* this_) nothrow;
49432 TearoffMenuItem* gtk_tearoff_menu_item_new() nothrow;
49433 TextAttributes* /*new*/ gtk_text_attributes_new() nothrow;
49434 TextAttributes* /*new*/ gtk_text_attributes_copy(TextAttributes* this_) nothrow;
49435 void gtk_text_attributes_copy_values(TextAttributes* this_, TextAttributes* dest) nothrow;
49436 TextAttributes* /*new*/ gtk_text_attributes_ref(TextAttributes* this_) nothrow;
49437 void gtk_text_attributes_unref(TextAttributes* this_) nothrow;
49438 TextBuffer* /*new*/ gtk_text_buffer_new(TextTagTable* table=null) nothrow;
49439 void gtk_text_buffer_add_mark(TextBuffer* this_, TextMark* mark, TextIter* where) nothrow;
49440 void gtk_text_buffer_add_selection_clipboard(TextBuffer* this_, Clipboard* clipboard) nothrow;
49441 void gtk_text_buffer_apply_tag(TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end) nothrow;
49442 void gtk_text_buffer_apply_tag_by_name(TextBuffer* this_, char* name, TextIter* start, TextIter* end) nothrow;
49443 int gtk_text_buffer_backspace(TextBuffer* this_, TextIter* iter, int interactive, int default_editable) nothrow;
49444 void gtk_text_buffer_begin_user_action(TextBuffer* this_) nothrow;
49445 void gtk_text_buffer_copy_clipboard(TextBuffer* this_, Clipboard* clipboard) nothrow;
49446 TextChildAnchor* gtk_text_buffer_create_child_anchor(TextBuffer* this_, TextIter* iter) nothrow;
49447 TextMark* gtk_text_buffer_create_mark(TextBuffer* this_, char* mark_name, TextIter* where, int left_gravity) nothrow;
49448 TextTag* gtk_text_buffer_create_tag(TextBuffer* this_, char* tag_name=null, char* first_property_name=null, ...) nothrow;
49449 void gtk_text_buffer_cut_clipboard(TextBuffer* this_, Clipboard* clipboard, int default_editable) nothrow;
49450 void gtk_text_buffer_delete(TextBuffer* this_, TextIter* start, TextIter* end) nothrow;
49451 int gtk_text_buffer_delete_interactive(TextBuffer* this_, TextIter* start_iter, TextIter* end_iter, int default_editable) nothrow;
49452 void gtk_text_buffer_delete_mark(TextBuffer* this_, TextMark* mark) nothrow;
49453 void gtk_text_buffer_delete_mark_by_name(TextBuffer* this_, char* name) nothrow;
49454 int gtk_text_buffer_delete_selection(TextBuffer* this_, int interactive, int default_editable) nothrow;
49455 int gtk_text_buffer_deserialize(TextBuffer* this_, TextBuffer* content_buffer, Gdk2.Atom format, TextIter* iter, ubyte* data, size_t length, GLib2.Error** error) nothrow;
49456 int gtk_text_buffer_deserialize_get_can_create_tags(TextBuffer* this_, Gdk2.Atom format) nothrow;
49457 void gtk_text_buffer_deserialize_set_can_create_tags(TextBuffer* this_, Gdk2.Atom format, int can_create_tags) nothrow;
49458 void gtk_text_buffer_end_user_action(TextBuffer* this_) nothrow;
49459 void gtk_text_buffer_get_bounds(TextBuffer* this_, /*out*/ TextIter* start, /*out*/ TextIter* end) nothrow;
49460 int gtk_text_buffer_get_char_count(TextBuffer* this_) nothrow;
49461 TargetList* gtk_text_buffer_get_copy_target_list(TextBuffer* this_) nothrow;
49462 Gdk2.Atom* /*new container*/ gtk_text_buffer_get_deserialize_formats(TextBuffer* this_, /*out*/ int* n_formats) nothrow;
49463 void gtk_text_buffer_get_end_iter(TextBuffer* this_, /*out*/ TextIter* iter) nothrow;
49464 int gtk_text_buffer_get_has_selection(TextBuffer* this_) nothrow;
49465 TextMark* gtk_text_buffer_get_insert(TextBuffer* this_) nothrow;
49466 void gtk_text_buffer_get_iter_at_child_anchor(TextBuffer* this_, /*out*/ TextIter* iter, TextChildAnchor* anchor) nothrow;
49467 void gtk_text_buffer_get_iter_at_line(TextBuffer* this_, /*out*/ TextIter* iter, int line_number) nothrow;
49468 void gtk_text_buffer_get_iter_at_line_index(TextBuffer* this_, /*out*/ TextIter* iter, int line_number, int byte_index) nothrow;
49469 void gtk_text_buffer_get_iter_at_line_offset(TextBuffer* this_, /*out*/ TextIter* iter, int line_number, int char_offset) nothrow;
49470 void gtk_text_buffer_get_iter_at_mark(TextBuffer* this_, /*out*/ TextIter* iter, TextMark* mark) nothrow;
49471 void gtk_text_buffer_get_iter_at_offset(TextBuffer* this_, /*out*/ TextIter* iter, int char_offset) nothrow;
49472 int gtk_text_buffer_get_line_count(TextBuffer* this_) nothrow;
49473 TextMark* gtk_text_buffer_get_mark(TextBuffer* this_, char* name) nothrow;
49474 int gtk_text_buffer_get_modified(TextBuffer* this_) nothrow;
49475 TargetList* gtk_text_buffer_get_paste_target_list(TextBuffer* this_) nothrow;
49476 TextMark* gtk_text_buffer_get_selection_bound(TextBuffer* this_) nothrow;
49477 int gtk_text_buffer_get_selection_bounds(TextBuffer* this_, /*out*/ TextIter* start, /*out*/ TextIter* end) nothrow;
49478 Gdk2.Atom* /*new container*/ gtk_text_buffer_get_serialize_formats(TextBuffer* this_, /*out*/ int* n_formats) nothrow;
49479 char* /*new*/ gtk_text_buffer_get_slice(TextBuffer* this_, TextIter* start, TextIter* end, int include_hidden_chars) nothrow;
49480 void gtk_text_buffer_get_start_iter(TextBuffer* this_, /*out*/ TextIter* iter) nothrow;
49481 TextTagTable* gtk_text_buffer_get_tag_table(TextBuffer* this_) nothrow;
49482 char* /*new*/ gtk_text_buffer_get_text(TextBuffer* this_, TextIter* start, TextIter* end, int include_hidden_chars) nothrow;
49483 void gtk_text_buffer_insert(TextBuffer* this_, TextIter* iter, char* text, int len) nothrow;
49484 void gtk_text_buffer_insert_at_cursor(TextBuffer* this_, char* text, int len) nothrow;
49485 void gtk_text_buffer_insert_child_anchor(TextBuffer* this_, TextIter* iter, TextChildAnchor* anchor) nothrow;
49486 int gtk_text_buffer_insert_interactive(TextBuffer* this_, TextIter* iter, char* text, int len, int default_editable) nothrow;
49487 int gtk_text_buffer_insert_interactive_at_cursor(TextBuffer* this_, char* text, int len, int default_editable) nothrow;
49488 void gtk_text_buffer_insert_pixbuf(TextBuffer* this_, TextIter* iter, GdkPixbuf2.Pixbuf* pixbuf) nothrow;
49489 void gtk_text_buffer_insert_range(TextBuffer* this_, TextIter* iter, TextIter* start, TextIter* end) nothrow;
49490 int gtk_text_buffer_insert_range_interactive(TextBuffer* this_, TextIter* iter, TextIter* start, TextIter* end, int default_editable) nothrow;
49491 void gtk_text_buffer_insert_with_tags(TextBuffer* this_, TextIter* iter, char* text, int len, TextTag* first_tag, ...) nothrow;
49492 void gtk_text_buffer_insert_with_tags_by_name(TextBuffer* this_, TextIter* iter, char* text, int len, char* first_tag_name, ...) nothrow;
49493 void gtk_text_buffer_move_mark(TextBuffer* this_, TextMark* mark, TextIter* where) nothrow;
49494 void gtk_text_buffer_move_mark_by_name(TextBuffer* this_, char* name, TextIter* where) nothrow;
49495 void gtk_text_buffer_paste_clipboard(TextBuffer* this_, Clipboard* clipboard, TextIter* override_location, int default_editable) nothrow;
49496 void gtk_text_buffer_place_cursor(TextBuffer* this_, TextIter* where) nothrow;
49497 Gdk2.Atom gtk_text_buffer_register_deserialize_format(TextBuffer* this_, char* mime_type, TextBufferDeserializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy) nothrow;
49498 Gdk2.Atom gtk_text_buffer_register_deserialize_tagset(TextBuffer* this_, char* tagset_name=null) nothrow;
49499 Gdk2.Atom gtk_text_buffer_register_serialize_format(TextBuffer* this_, char* mime_type, TextBufferSerializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy) nothrow;
49500 Gdk2.Atom gtk_text_buffer_register_serialize_tagset(TextBuffer* this_, char* tagset_name=null) nothrow;
49501 void gtk_text_buffer_remove_all_tags(TextBuffer* this_, TextIter* start, TextIter* end) nothrow;
49502 void gtk_text_buffer_remove_selection_clipboard(TextBuffer* this_, Clipboard* clipboard) nothrow;
49503 void gtk_text_buffer_remove_tag(TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end) nothrow;
49504 void gtk_text_buffer_remove_tag_by_name(TextBuffer* this_, char* name, TextIter* start, TextIter* end) nothrow;
49505 void gtk_text_buffer_select_range(TextBuffer* this_, TextIter* ins, TextIter* bound) nothrow;
49506 ubyte* /*new*/ gtk_text_buffer_serialize(TextBuffer* this_, TextBuffer* content_buffer, Gdk2.Atom format, TextIter* start, TextIter* end, /*out*/ size_t* length) nothrow;
49507 void gtk_text_buffer_set_modified(TextBuffer* this_, int setting) nothrow;
49508 void gtk_text_buffer_set_text(TextBuffer* this_, char* text, int len) nothrow;
49509 void gtk_text_buffer_unregister_deserialize_format(TextBuffer* this_, Gdk2.Atom format) nothrow;
49510 void gtk_text_buffer_unregister_serialize_format(TextBuffer* this_, Gdk2.Atom format) nothrow;
49511 TextChildAnchor* /*new*/ gtk_text_child_anchor_new() nothrow;
49512 int gtk_text_child_anchor_get_deleted(TextChildAnchor* this_) nothrow;
49513 GLib2.List* /*new container*/ gtk_text_child_anchor_get_widgets(TextChildAnchor* this_) nothrow;
49514 void gtk_text_child_anchor_queue_resize(TextChildAnchor* this_, TextLayout* layout) nothrow;
49515 void gtk_text_child_anchor_register_child(TextChildAnchor* this_, Widget* child, TextLayout* layout) nothrow;
49516 void gtk_text_child_anchor_unregister_child(TextChildAnchor* this_, Widget* child) nothrow;
49517 int gtk_text_iter_backward_char(TextIter* this_) nothrow;
49518 int gtk_text_iter_backward_chars(TextIter* this_, int count) nothrow;
49519 int gtk_text_iter_backward_cursor_position(TextIter* this_) nothrow;
49520 int gtk_text_iter_backward_cursor_positions(TextIter* this_, int count) nothrow;
49521 int gtk_text_iter_backward_find_char(TextIter* this_, TextCharPredicate pred, void* user_data, TextIter* limit=null) nothrow;
49522 int gtk_text_iter_backward_line(TextIter* this_) nothrow;
49523 int gtk_text_iter_backward_lines(TextIter* this_, int count) nothrow;
49524 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) nothrow;
49525 int gtk_text_iter_backward_sentence_start(TextIter* this_) nothrow;
49526 int gtk_text_iter_backward_sentence_starts(TextIter* this_, int count) nothrow;
49527 int gtk_text_iter_backward_to_tag_toggle(TextIter* this_, TextTag* tag=null) nothrow;
49528 int gtk_text_iter_backward_visible_cursor_position(TextIter* this_) nothrow;
49529 int gtk_text_iter_backward_visible_cursor_positions(TextIter* this_, int count) nothrow;
49530 int gtk_text_iter_backward_visible_line(TextIter* this_) nothrow;
49531 int gtk_text_iter_backward_visible_lines(TextIter* this_, int count) nothrow;
49532 int gtk_text_iter_backward_visible_word_start(TextIter* this_) nothrow;
49533 int gtk_text_iter_backward_visible_word_starts(TextIter* this_, int count) nothrow;
49534 int gtk_text_iter_backward_word_start(TextIter* this_) nothrow;
49535 int gtk_text_iter_backward_word_starts(TextIter* this_, int count) nothrow;
49536 int gtk_text_iter_begins_tag(TextIter* this_, TextTag* tag=null) nothrow;
49537 int gtk_text_iter_can_insert(TextIter* this_, int default_editability) nothrow;
49538 int gtk_text_iter_compare(TextIter* this_, TextIter* rhs) nothrow;
49539 TextIter* /*new*/ gtk_text_iter_copy(TextIter* this_) nothrow;
49540 int gtk_text_iter_editable(TextIter* this_, int default_setting) nothrow;
49541 int gtk_text_iter_ends_line(TextIter* this_) nothrow;
49542 int gtk_text_iter_ends_sentence(TextIter* this_) nothrow;
49543 int gtk_text_iter_ends_tag(TextIter* this_, TextTag* tag=null) nothrow;
49544 int gtk_text_iter_ends_word(TextIter* this_) nothrow;
49545 int gtk_text_iter_equal(TextIter* this_, TextIter* rhs) nothrow;
49546 int gtk_text_iter_forward_char(TextIter* this_) nothrow;
49547 int gtk_text_iter_forward_chars(TextIter* this_, int count) nothrow;
49548 int gtk_text_iter_forward_cursor_position(TextIter* this_) nothrow;
49549 int gtk_text_iter_forward_cursor_positions(TextIter* this_, int count) nothrow;
49550 int gtk_text_iter_forward_find_char(TextIter* this_, TextCharPredicate pred, void* user_data, TextIter* limit=null) nothrow;
49551 int gtk_text_iter_forward_line(TextIter* this_) nothrow;
49552 int gtk_text_iter_forward_lines(TextIter* this_, int count) nothrow;
49553 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) nothrow;
49554 int gtk_text_iter_forward_sentence_end(TextIter* this_) nothrow;
49555 int gtk_text_iter_forward_sentence_ends(TextIter* this_, int count) nothrow;
49556 void gtk_text_iter_forward_to_end(TextIter* this_) nothrow;
49557 int gtk_text_iter_forward_to_line_end(TextIter* this_) nothrow;
49558 int gtk_text_iter_forward_to_tag_toggle(TextIter* this_, TextTag* tag=null) nothrow;
49559 int gtk_text_iter_forward_visible_cursor_position(TextIter* this_) nothrow;
49560 int gtk_text_iter_forward_visible_cursor_positions(TextIter* this_, int count) nothrow;
49561 int gtk_text_iter_forward_visible_line(TextIter* this_) nothrow;
49562 int gtk_text_iter_forward_visible_lines(TextIter* this_, int count) nothrow;
49563 int gtk_text_iter_forward_visible_word_end(TextIter* this_) nothrow;
49564 int gtk_text_iter_forward_visible_word_ends(TextIter* this_, int count) nothrow;
49565 int gtk_text_iter_forward_word_end(TextIter* this_) nothrow;
49566 int gtk_text_iter_forward_word_ends(TextIter* this_, int count) nothrow;
49567 void gtk_text_iter_free(TextIter* this_) nothrow;
49568 int gtk_text_iter_get_attributes(TextIter* this_, /*out*/ TextAttributes* values) nothrow;
49569 TextBuffer* gtk_text_iter_get_buffer(TextIter* this_) nothrow;
49570 int gtk_text_iter_get_bytes_in_line(TextIter* this_) nothrow;
49571 dchar gtk_text_iter_get_char(TextIter* this_) nothrow;
49572 int gtk_text_iter_get_chars_in_line(TextIter* this_) nothrow;
49573 TextChildAnchor* gtk_text_iter_get_child_anchor(TextIter* this_) nothrow;
49574 Pango.Language* /*new*/ gtk_text_iter_get_language(TextIter* this_) nothrow;
49575 int gtk_text_iter_get_line(TextIter* this_) nothrow;
49576 int gtk_text_iter_get_line_index(TextIter* this_) nothrow;
49577 int gtk_text_iter_get_line_offset(TextIter* this_) nothrow;
49578 GLib2.SList* /*new container*/ gtk_text_iter_get_marks(TextIter* this_) nothrow;
49579 int gtk_text_iter_get_offset(TextIter* this_) nothrow;
49580 GdkPixbuf2.Pixbuf* gtk_text_iter_get_pixbuf(TextIter* this_) nothrow;
49581 char* /*new*/ gtk_text_iter_get_slice(TextIter* this_, TextIter* end) nothrow;
49582 GLib2.SList* /*new container*/ gtk_text_iter_get_tags(TextIter* this_) nothrow;
49583 char* /*new*/ gtk_text_iter_get_text(TextIter* this_, TextIter* end) nothrow;
49584 GLib2.SList* /*new container*/ gtk_text_iter_get_toggled_tags(TextIter* this_, int toggled_on) nothrow;
49585 int gtk_text_iter_get_visible_line_index(TextIter* this_) nothrow;
49586 int gtk_text_iter_get_visible_line_offset(TextIter* this_) nothrow;
49587 char* /*new*/ gtk_text_iter_get_visible_slice(TextIter* this_, TextIter* end) nothrow;
49588 char* /*new*/ gtk_text_iter_get_visible_text(TextIter* this_, TextIter* end) nothrow;
49589 int gtk_text_iter_has_tag(TextIter* this_, TextTag* tag) nothrow;
49590 int gtk_text_iter_in_range(TextIter* this_, TextIter* start, TextIter* end) nothrow;
49591 int gtk_text_iter_inside_sentence(TextIter* this_) nothrow;
49592 int gtk_text_iter_inside_word(TextIter* this_) nothrow;
49593 int gtk_text_iter_is_cursor_position(TextIter* this_) nothrow;
49594 int gtk_text_iter_is_end(TextIter* this_) nothrow;
49595 int gtk_text_iter_is_start(TextIter* this_) nothrow;
49596 void gtk_text_iter_order(TextIter* this_, TextIter* second) nothrow;
49597 void gtk_text_iter_set_line(TextIter* this_, int line_number) nothrow;
49598 void gtk_text_iter_set_line_index(TextIter* this_, int byte_on_line) nothrow;
49599 void gtk_text_iter_set_line_offset(TextIter* this_, int char_on_line) nothrow;
49600 void gtk_text_iter_set_offset(TextIter* this_, int char_offset) nothrow;
49601 void gtk_text_iter_set_visible_line_index(TextIter* this_, int byte_on_line) nothrow;
49602 void gtk_text_iter_set_visible_line_offset(TextIter* this_, int char_on_line) nothrow;
49603 int gtk_text_iter_starts_line(TextIter* this_) nothrow;
49604 int gtk_text_iter_starts_sentence(TextIter* this_) nothrow;
49605 int gtk_text_iter_starts_word(TextIter* this_) nothrow;
49606 int gtk_text_iter_toggles_tag(TextIter* this_, TextTag* tag=null) nothrow;
49607 TextLayout* /*new*/ gtk_text_layout_new() nothrow;
49608 void gtk_text_layout_changed(TextLayout* this_, int y, int old_height, int new_height) nothrow;
49609 int gtk_text_layout_clamp_iter_to_vrange(TextLayout* this_, TextIter* iter, int top, int bottom) nothrow;
49610 void gtk_text_layout_cursors_changed(TextLayout* this_, int y, int old_height, int new_height) nothrow;
49611 void gtk_text_layout_default_style_changed(TextLayout* this_) nothrow;
49612 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) nothrow;
49613 void gtk_text_layout_free_line_data(TextLayout* this_, TextLine* line, TextLineData* line_data) nothrow;
49614 void gtk_text_layout_free_line_display(TextLayout* this_, TextLineDisplay* display) nothrow;
49615 TextBuffer* gtk_text_layout_get_buffer(TextLayout* this_) nothrow;
49616 void gtk_text_layout_get_cursor_locations(TextLayout* this_, TextIter* iter, Gdk2.Rectangle* strong_pos=null, Gdk2.Rectangle* weak_pos=null) nothrow;
49617 int gtk_text_layout_get_cursor_visible(TextLayout* this_) nothrow;
49618 void gtk_text_layout_get_iter_at_line(TextLayout* this_, TextIter* iter, TextLine* line, int byte_offset) nothrow;
49619 void gtk_text_layout_get_iter_at_pixel(TextLayout* this_, TextIter* iter, int x, int y) nothrow;
49620 void gtk_text_layout_get_iter_at_position(TextLayout* this_, TextIter* iter, int* trailing, int x, int y) nothrow;
49621 void gtk_text_layout_get_iter_location(TextLayout* this_, TextIter* iter, Gdk2.Rectangle* rect) nothrow;
49622 void gtk_text_layout_get_line_at_y(TextLayout* this_, TextIter* target_iter, int y, int* line_top) nothrow;
49623 TextLineDisplay* gtk_text_layout_get_line_display(TextLayout* this_, TextLine* line, int size_only) nothrow;
49624 void gtk_text_layout_get_line_yrange(TextLayout* this_, TextIter* iter, int* y, int* height) nothrow;
49625 GLib2.SList* /*new container*/ gtk_text_layout_get_lines(TextLayout* this_, int top_y, int bottom_y, int* first_line_y) nothrow;
49626 void gtk_text_layout_get_size(TextLayout* this_, int* width, int* height) nothrow;
49627 void gtk_text_layout_invalidate(TextLayout* this_, TextIter* start, TextIter* end) nothrow;
49628 void gtk_text_layout_invalidate_cursors(TextLayout* this_, TextIter* start, TextIter* end) nothrow;
49629 int gtk_text_layout_is_valid(TextLayout* this_) nothrow;
49630 int gtk_text_layout_iter_starts_line(TextLayout* this_, TextIter* iter) nothrow;
49631 int gtk_text_layout_move_iter_to_line_end(TextLayout* this_, TextIter* iter, int direction) nothrow;
49632 int gtk_text_layout_move_iter_to_next_line(TextLayout* this_, TextIter* iter) nothrow;
49633 int gtk_text_layout_move_iter_to_previous_line(TextLayout* this_, TextIter* iter) nothrow;
49634 void gtk_text_layout_move_iter_to_x(TextLayout* this_, TextIter* iter, int x) nothrow;
49635 int gtk_text_layout_move_iter_visually(TextLayout* this_, TextIter* iter, int count) nothrow;
49636 void gtk_text_layout_set_buffer(TextLayout* this_, TextBuffer* buffer=null) nothrow;
49637 void gtk_text_layout_set_contexts(TextLayout* this_, Pango.Context* ltr_context, Pango.Context* rtl_context) nothrow;
49638 void gtk_text_layout_set_cursor_direction(TextLayout* this_, TextDirection direction) nothrow;
49639 void gtk_text_layout_set_cursor_visible(TextLayout* this_, int cursor_visible) nothrow;
49640 void gtk_text_layout_set_default_style(TextLayout* this_, TextAttributes* values) nothrow;
49641 void gtk_text_layout_set_keyboard_direction(TextLayout* this_, TextDirection keyboard_dir) nothrow;
49642 void gtk_text_layout_set_overwrite_mode(TextLayout* this_, int overwrite) nothrow;
49643 void gtk_text_layout_set_preedit_string(TextLayout* this_, char* preedit_string, Pango.AttrList* preedit_attrs, int cursor_pos) nothrow;
49644 void gtk_text_layout_set_screen_width(TextLayout* this_, int width) nothrow;
49645 void gtk_text_layout_spew(TextLayout* this_) nothrow;
49646 void gtk_text_layout_validate(TextLayout* this_, int max_pixels) nothrow;
49647 void gtk_text_layout_validate_yrange(TextLayout* this_, TextIter* anchor_line, int y0_, int y1_) nothrow;
49648 TextLineData* gtk_text_layout_wrap(TextLayout* this_, TextLine* line, TextLineData* line_data) nothrow;
49649 void gtk_text_layout_wrap_loop_end(TextLayout* this_) nothrow;
49650 void gtk_text_layout_wrap_loop_start(TextLayout* this_) nothrow;
49651 TextMark* /*new*/ gtk_text_mark_new(char* name, int left_gravity) nothrow;
49652 TextBuffer* gtk_text_mark_get_buffer(TextMark* this_) nothrow;
49653 int gtk_text_mark_get_deleted(TextMark* this_) nothrow;
49654 int gtk_text_mark_get_left_gravity(TextMark* this_) nothrow;
49655 char* gtk_text_mark_get_name(TextMark* this_) nothrow;
49656 int gtk_text_mark_get_visible(TextMark* this_) nothrow;
49657 void gtk_text_mark_set_visible(TextMark* this_, int setting) nothrow;
49658 TextTag* /*new*/ gtk_text_tag_new(char* name=null) nothrow;
49659 int gtk_text_tag_event(TextTag* this_, GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter) nothrow;
49660 int gtk_text_tag_get_priority(TextTag* this_) nothrow;
49661 void gtk_text_tag_set_priority(TextTag* this_, int priority) nothrow;
49662 TextTagTable* /*new*/ gtk_text_tag_table_new() nothrow;
49663 void gtk_text_tag_table_add(TextTagTable* this_, TextTag* tag) nothrow;
49664 void gtk_text_tag_table_foreach(TextTagTable* this_, TextTagTableForeach func, void* data) nothrow;
49665 int gtk_text_tag_table_get_size(TextTagTable* this_) nothrow;
49666 TextTag* gtk_text_tag_table_lookup(TextTagTable* this_, char* name) nothrow;
49667 void gtk_text_tag_table_remove(TextTagTable* this_, TextTag* tag) nothrow;
49668 TextView* gtk_text_view_new() nothrow;
49669 TextView* gtk_text_view_new_with_buffer(TextBuffer* buffer) nothrow;
49670 void gtk_text_view_add_child_at_anchor(TextView* this_, Widget* child, TextChildAnchor* anchor) nothrow;
49671 void gtk_text_view_add_child_in_window(TextView* this_, Widget* child, TextWindowType which_window, int xpos, int ypos) nothrow;
49672 int gtk_text_view_backward_display_line(TextView* this_, TextIter* iter) nothrow;
49673 int gtk_text_view_backward_display_line_start(TextView* this_, TextIter* iter) nothrow;
49674 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) nothrow;
49675 int gtk_text_view_forward_display_line(TextView* this_, TextIter* iter) nothrow;
49676 int gtk_text_view_forward_display_line_end(TextView* this_, TextIter* iter) nothrow;
49677 int gtk_text_view_get_accepts_tab(TextView* this_) nothrow;
49678 int gtk_text_view_get_border_window_size(TextView* this_, TextWindowType type) nothrow;
49679 TextBuffer* gtk_text_view_get_buffer(TextView* this_) nothrow;
49680 int gtk_text_view_get_cursor_visible(TextView* this_) nothrow;
49681 TextAttributes* /*new*/ gtk_text_view_get_default_attributes(TextView* this_) nothrow;
49682 int gtk_text_view_get_editable(TextView* this_) nothrow;
49683 Adjustment* gtk_text_view_get_hadjustment(TextView* this_) nothrow;
49684 int gtk_text_view_get_indent(TextView* this_) nothrow;
49685 void gtk_text_view_get_iter_at_location(TextView* this_, /*out*/ TextIter* iter, int x, int y) nothrow;
49686 void gtk_text_view_get_iter_at_position(TextView* this_, /*out*/ TextIter* iter, /*out*/ int* trailing, int x, int y) nothrow;
49687 void gtk_text_view_get_iter_location(TextView* this_, TextIter* iter, /*out*/ Gdk2.Rectangle* location) nothrow;
49688 Justification gtk_text_view_get_justification(TextView* this_) nothrow;
49689 int gtk_text_view_get_left_margin(TextView* this_) nothrow;
49690 void gtk_text_view_get_line_at_y(TextView* this_, /*out*/ TextIter* target_iter, int y, /*out*/ int* line_top) nothrow;
49691 void gtk_text_view_get_line_yrange(TextView* this_, TextIter* iter, /*out*/ int* y, /*out*/ int* height) nothrow;
49692 int gtk_text_view_get_overwrite(TextView* this_) nothrow;
49693 int gtk_text_view_get_pixels_above_lines(TextView* this_) nothrow;
49694 int gtk_text_view_get_pixels_below_lines(TextView* this_) nothrow;
49695 int gtk_text_view_get_pixels_inside_wrap(TextView* this_) nothrow;
49696 int gtk_text_view_get_right_margin(TextView* this_) nothrow;
49697 Pango.TabArray* /*new*/ gtk_text_view_get_tabs(TextView* this_) nothrow;
49698 Adjustment* gtk_text_view_get_vadjustment(TextView* this_) nothrow;
49699 void gtk_text_view_get_visible_rect(TextView* this_, /*out*/ Gdk2.Rectangle* visible_rect) nothrow;
49700 Gdk2.Window* gtk_text_view_get_window(TextView* this_, TextWindowType win) nothrow;
49701 TextWindowType gtk_text_view_get_window_type(TextView* this_, Gdk2.Window* window) nothrow;
49702 WrapMode gtk_text_view_get_wrap_mode(TextView* this_) nothrow;
49703 int gtk_text_view_im_context_filter_keypress(TextView* this_, Gdk2.EventKey* event) nothrow;
49704 void gtk_text_view_move_child(TextView* this_, Widget* child, int xpos, int ypos) nothrow;
49705 int gtk_text_view_move_mark_onscreen(TextView* this_, TextMark* mark) nothrow;
49706 int gtk_text_view_move_visually(TextView* this_, TextIter* iter, int count) nothrow;
49707 int gtk_text_view_place_cursor_onscreen(TextView* this_) nothrow;
49708 void gtk_text_view_reset_im_context(TextView* this_) nothrow;
49709 void gtk_text_view_scroll_mark_onscreen(TextView* this_, TextMark* mark) nothrow;
49710 int gtk_text_view_scroll_to_iter(TextView* this_, TextIter* iter, double within_margin, int use_align, double xalign, double yalign) nothrow;
49711 void gtk_text_view_scroll_to_mark(TextView* this_, TextMark* mark, double within_margin, int use_align, double xalign, double yalign) nothrow;
49712 void gtk_text_view_set_accepts_tab(TextView* this_, int accepts_tab) nothrow;
49713 void gtk_text_view_set_border_window_size(TextView* this_, TextWindowType type, int size) nothrow;
49714 void gtk_text_view_set_buffer(TextView* this_, TextBuffer* buffer=null) nothrow;
49715 void gtk_text_view_set_cursor_visible(TextView* this_, int setting) nothrow;
49716 void gtk_text_view_set_editable(TextView* this_, int setting) nothrow;
49717 void gtk_text_view_set_indent(TextView* this_, int indent) nothrow;
49718 void gtk_text_view_set_justification(TextView* this_, Justification justification) nothrow;
49719 void gtk_text_view_set_left_margin(TextView* this_, int left_margin) nothrow;
49720 void gtk_text_view_set_overwrite(TextView* this_, int overwrite) nothrow;
49721 void gtk_text_view_set_pixels_above_lines(TextView* this_, int pixels_above_lines) nothrow;
49722 void gtk_text_view_set_pixels_below_lines(TextView* this_, int pixels_below_lines) nothrow;
49723 void gtk_text_view_set_pixels_inside_wrap(TextView* this_, int pixels_inside_wrap) nothrow;
49724 void gtk_text_view_set_right_margin(TextView* this_, int right_margin) nothrow;
49725 void gtk_text_view_set_tabs(TextView* this_, Pango.TabArray* tabs) nothrow;
49726 void gtk_text_view_set_wrap_mode(TextView* this_, WrapMode wrap_mode) nothrow;
49727 int gtk_text_view_starts_display_line(TextView* this_, TextIter* iter) nothrow;
49728 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) nothrow;
49729 TipsQuery* gtk_tips_query_new() nothrow;
49730 void gtk_tips_query_set_caller(TipsQuery* this_, Widget* caller) nothrow;
49731 void gtk_tips_query_set_labels(TipsQuery* this_, char* label_inactive, char* label_no_tip) nothrow;
49732 void gtk_tips_query_start_query(TipsQuery* this_) nothrow;
49733 void gtk_tips_query_stop_query(TipsQuery* this_) nothrow;
49734 ToggleAction* /*new*/ gtk_toggle_action_new(char* name, char* label, char* tooltip, char* stock_id) nothrow;
49735 int gtk_toggle_action_get_active(ToggleAction* this_) nothrow;
49736 int gtk_toggle_action_get_draw_as_radio(ToggleAction* this_) nothrow;
49737 void gtk_toggle_action_set_active(ToggleAction* this_, int is_active) nothrow;
49738 void gtk_toggle_action_set_draw_as_radio(ToggleAction* this_, int draw_as_radio) nothrow;
49739 void gtk_toggle_action_toggled(ToggleAction* this_) nothrow;
49740 ToggleButton* gtk_toggle_button_new() nothrow;
49741 ToggleButton* gtk_toggle_button_new_with_label(char* label) nothrow;
49742 ToggleButton* gtk_toggle_button_new_with_mnemonic(char* label) nothrow;
49743 int gtk_toggle_button_get_active(ToggleButton* this_) nothrow;
49744 int gtk_toggle_button_get_inconsistent(ToggleButton* this_) nothrow;
49745 int gtk_toggle_button_get_mode(ToggleButton* this_) nothrow;
49746 void gtk_toggle_button_set_active(ToggleButton* this_, int is_active) nothrow;
49747 void gtk_toggle_button_set_inconsistent(ToggleButton* this_, int setting) nothrow;
49748 void gtk_toggle_button_set_mode(ToggleButton* this_, int draw_indicator) nothrow;
49749 void gtk_toggle_button_toggled(ToggleButton* this_) nothrow;
49750 ToggleToolButton* gtk_toggle_tool_button_new() nothrow;
49751 ToggleToolButton* gtk_toggle_tool_button_new_from_stock(char* stock_id) nothrow;
49752 int gtk_toggle_tool_button_get_active(ToggleToolButton* this_) nothrow;
49753 void gtk_toggle_tool_button_set_active(ToggleToolButton* this_, int is_active) nothrow;
49754 ToolButton* gtk_tool_button_new(Widget* icon_widget=null, char* label=null) nothrow;
49755 ToolButton* gtk_tool_button_new_from_stock(char* stock_id) nothrow;
49756 char* gtk_tool_button_get_icon_name(ToolButton* this_) nothrow;
49757 Widget* gtk_tool_button_get_icon_widget(ToolButton* this_) nothrow;
49758 char* gtk_tool_button_get_label(ToolButton* this_) nothrow;
49759 Widget* gtk_tool_button_get_label_widget(ToolButton* this_) nothrow;
49760 char* gtk_tool_button_get_stock_id(ToolButton* this_) nothrow;
49761 int gtk_tool_button_get_use_underline(ToolButton* this_) nothrow;
49762 void gtk_tool_button_set_icon_name(ToolButton* this_, char* icon_name=null) nothrow;
49763 void gtk_tool_button_set_icon_widget(ToolButton* this_, Widget* icon_widget=null) nothrow;
49764 void gtk_tool_button_set_label(ToolButton* this_, char* label=null) nothrow;
49765 void gtk_tool_button_set_label_widget(ToolButton* this_, Widget* label_widget=null) nothrow;
49766 void gtk_tool_button_set_stock_id(ToolButton* this_, char* stock_id=null) nothrow;
49767 void gtk_tool_button_set_use_underline(ToolButton* this_, int use_underline) nothrow;
49768 ToolItem* gtk_tool_item_new() nothrow;
49769 Pango.EllipsizeMode gtk_tool_item_get_ellipsize_mode(ToolItem* this_) nothrow;
49770 int gtk_tool_item_get_expand(ToolItem* this_) nothrow;
49771 int gtk_tool_item_get_homogeneous(ToolItem* this_) nothrow;
49772 IconSize gtk_tool_item_get_icon_size(ToolItem* this_) nothrow;
49773 int gtk_tool_item_get_is_important(ToolItem* this_) nothrow;
49774 Orientation gtk_tool_item_get_orientation(ToolItem* this_) nothrow;
49775 Widget* gtk_tool_item_get_proxy_menu_item(ToolItem* this_, char* menu_item_id) nothrow;
49776 ReliefStyle gtk_tool_item_get_relief_style(ToolItem* this_) nothrow;
49777 float gtk_tool_item_get_text_alignment(ToolItem* this_) nothrow;
49778 Orientation gtk_tool_item_get_text_orientation(ToolItem* this_) nothrow;
49779 SizeGroup* gtk_tool_item_get_text_size_group(ToolItem* this_) nothrow;
49780 ToolbarStyle gtk_tool_item_get_toolbar_style(ToolItem* this_) nothrow;
49781 int gtk_tool_item_get_use_drag_window(ToolItem* this_) nothrow;
49782 int gtk_tool_item_get_visible_horizontal(ToolItem* this_) nothrow;
49783 int gtk_tool_item_get_visible_vertical(ToolItem* this_) nothrow;
49784 void gtk_tool_item_rebuild_menu(ToolItem* this_) nothrow;
49785 Widget* gtk_tool_item_retrieve_proxy_menu_item(ToolItem* this_) nothrow;
49786 void gtk_tool_item_set_expand(ToolItem* this_, int expand) nothrow;
49787 void gtk_tool_item_set_homogeneous(ToolItem* this_, int homogeneous) nothrow;
49788 void gtk_tool_item_set_is_important(ToolItem* this_, int is_important) nothrow;
49789 void gtk_tool_item_set_proxy_menu_item(ToolItem* this_, char* menu_item_id, Widget* menu_item) nothrow;
49790 void gtk_tool_item_set_tooltip(ToolItem* this_, Tooltips* tooltips, char* tip_text=null, char* tip_private=null) nothrow;
49791 void gtk_tool_item_set_tooltip_markup(ToolItem* this_, char* markup) nothrow;
49792 void gtk_tool_item_set_tooltip_text(ToolItem* this_, char* text) nothrow;
49793 void gtk_tool_item_set_use_drag_window(ToolItem* this_, int use_drag_window) nothrow;
49794 void gtk_tool_item_set_visible_horizontal(ToolItem* this_, int visible_horizontal) nothrow;
49795 void gtk_tool_item_set_visible_vertical(ToolItem* this_, int visible_vertical) nothrow;
49796 void gtk_tool_item_toolbar_reconfigured(ToolItem* this_) nothrow;
49797 ToolItemGroup* gtk_tool_item_group_new(char* label) nothrow;
49798 int gtk_tool_item_group_get_collapsed(ToolItemGroup* this_) nothrow;
49799 ToolItem* gtk_tool_item_group_get_drop_item(ToolItemGroup* this_, int x, int y) nothrow;
49800 Pango.EllipsizeMode gtk_tool_item_group_get_ellipsize(ToolItemGroup* this_) nothrow;
49801 ReliefStyle gtk_tool_item_group_get_header_relief(ToolItemGroup* this_) nothrow;
49802 int gtk_tool_item_group_get_item_position(ToolItemGroup* this_, ToolItem* item) nothrow;
49803 char* gtk_tool_item_group_get_label(ToolItemGroup* this_) nothrow;
49804 Widget* gtk_tool_item_group_get_label_widget(ToolItemGroup* this_) nothrow;
49805 uint gtk_tool_item_group_get_n_items(ToolItemGroup* this_) nothrow;
49806 ToolItem* gtk_tool_item_group_get_nth_item(ToolItemGroup* this_, uint index) nothrow;
49807 void gtk_tool_item_group_insert(ToolItemGroup* this_, ToolItem* item, int position) nothrow;
49808 void gtk_tool_item_group_set_collapsed(ToolItemGroup* this_, int collapsed) nothrow;
49809 void gtk_tool_item_group_set_ellipsize(ToolItemGroup* this_, Pango.EllipsizeMode ellipsize) nothrow;
49810 void gtk_tool_item_group_set_header_relief(ToolItemGroup* this_, ReliefStyle style) nothrow;
49811 void gtk_tool_item_group_set_item_position(ToolItemGroup* this_, ToolItem* item, int position) nothrow;
49812 void gtk_tool_item_group_set_label(ToolItemGroup* this_, char* label) nothrow;
49813 void gtk_tool_item_group_set_label_widget(ToolItemGroup* this_, Widget* label_widget) nothrow;
49814 ToolPalette* gtk_tool_palette_new() nothrow;
49815 TargetEntry* gtk_tool_palette_get_drag_target_group() nothrow;
49816 TargetEntry* gtk_tool_palette_get_drag_target_item() nothrow;
49817 void gtk_tool_palette_add_drag_dest(ToolPalette* this_, Widget* widget, DestDefaults flags, ToolPaletteDragTargets targets, Gdk2.DragAction actions) nothrow;
49818 Widget* gtk_tool_palette_get_drag_item(ToolPalette* this_, SelectionData* selection) nothrow;
49819 ToolItemGroup* gtk_tool_palette_get_drop_group(ToolPalette* this_, int x, int y) nothrow;
49820 ToolItem* gtk_tool_palette_get_drop_item(ToolPalette* this_, int x, int y) nothrow;
49821 int gtk_tool_palette_get_exclusive(ToolPalette* this_, ToolItemGroup* group) nothrow;
49822 int gtk_tool_palette_get_expand(ToolPalette* this_, ToolItemGroup* group) nothrow;
49823 int gtk_tool_palette_get_group_position(ToolPalette* this_, ToolItemGroup* group) nothrow;
49824 Adjustment* gtk_tool_palette_get_hadjustment(ToolPalette* this_) nothrow;
49825 IconSize gtk_tool_palette_get_icon_size(ToolPalette* this_) nothrow;
49826 ToolbarStyle gtk_tool_palette_get_style(ToolPalette* this_) nothrow;
49827 Adjustment* gtk_tool_palette_get_vadjustment(ToolPalette* this_) nothrow;
49828 void gtk_tool_palette_set_drag_source(ToolPalette* this_, ToolPaletteDragTargets targets) nothrow;
49829 void gtk_tool_palette_set_exclusive(ToolPalette* this_, ToolItemGroup* group, int exclusive) nothrow;
49830 void gtk_tool_palette_set_expand(ToolPalette* this_, ToolItemGroup* group, int expand) nothrow;
49831 void gtk_tool_palette_set_group_position(ToolPalette* this_, ToolItemGroup* group, int position) nothrow;
49832 void gtk_tool_palette_set_icon_size(ToolPalette* this_, IconSize icon_size) nothrow;
49833 void gtk_tool_palette_set_style(ToolPalette* this_, ToolbarStyle style) nothrow;
49834 void gtk_tool_palette_unset_icon_size(ToolPalette* this_) nothrow;
49835 void gtk_tool_palette_unset_style(ToolPalette* this_) nothrow;
49836 Pango.EllipsizeMode gtk_tool_shell_get_ellipsize_mode(ToolShell* this_) nothrow;
49837 IconSize gtk_tool_shell_get_icon_size(ToolShell* this_) nothrow;
49838 Orientation gtk_tool_shell_get_orientation(ToolShell* this_) nothrow;
49839 ReliefStyle gtk_tool_shell_get_relief_style(ToolShell* this_) nothrow;
49840 ToolbarStyle gtk_tool_shell_get_style(ToolShell* this_) nothrow;
49841 float gtk_tool_shell_get_text_alignment(ToolShell* this_) nothrow;
49842 Orientation gtk_tool_shell_get_text_orientation(ToolShell* this_) nothrow;
49843 SizeGroup* gtk_tool_shell_get_text_size_group(ToolShell* this_) nothrow;
49844 void gtk_tool_shell_rebuild_menu(ToolShell* this_) nothrow;
49845 Toolbar* gtk_toolbar_new() nothrow;
49846 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) nothrow;
49847 Widget* gtk_toolbar_append_item(Toolbar* this_, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) nothrow;
49848 void gtk_toolbar_append_space(Toolbar* this_) nothrow;
49849 void gtk_toolbar_append_widget(Toolbar* this_, Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null) nothrow;
49850 int gtk_toolbar_get_drop_index(Toolbar* this_, int x, int y) nothrow;
49851 IconSize gtk_toolbar_get_icon_size(Toolbar* this_) nothrow;
49852 int gtk_toolbar_get_item_index(Toolbar* this_, ToolItem* item) nothrow;
49853 int gtk_toolbar_get_n_items(Toolbar* this_) nothrow;
49854 ToolItem* gtk_toolbar_get_nth_item(Toolbar* this_, int n) nothrow;
49855 Orientation gtk_toolbar_get_orientation(Toolbar* this_) nothrow;
49856 ReliefStyle gtk_toolbar_get_relief_style(Toolbar* this_) nothrow;
49857 int gtk_toolbar_get_show_arrow(Toolbar* this_) nothrow;
49858 ToolbarStyle gtk_toolbar_get_style(Toolbar* this_) nothrow;
49859 int gtk_toolbar_get_tooltips(Toolbar* this_) nothrow;
49860 void gtk_toolbar_insert(Toolbar* this_, ToolItem* item, int pos) nothrow;
49861 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) nothrow;
49862 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) nothrow;
49863 void gtk_toolbar_insert_space(Toolbar* this_, int position) nothrow;
49864 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) nothrow;
49865 void gtk_toolbar_insert_widget(Toolbar* this_, Widget* widget, char* tooltip_text, char* tooltip_private_text, int position) nothrow;
49866 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) nothrow;
49867 Widget* gtk_toolbar_prepend_item(Toolbar* this_, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) nothrow;
49868 void gtk_toolbar_prepend_space(Toolbar* this_) nothrow;
49869 void gtk_toolbar_prepend_widget(Toolbar* this_, Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null) nothrow;
49870 void gtk_toolbar_remove_space(Toolbar* this_, int position) nothrow;
49871 void gtk_toolbar_set_drop_highlight_item(Toolbar* this_, ToolItem* tool_item, int index_) nothrow;
49872 void gtk_toolbar_set_icon_size(Toolbar* this_, IconSize icon_size) nothrow;
49873 void gtk_toolbar_set_orientation(Toolbar* this_, Orientation orientation) nothrow;
49874 void gtk_toolbar_set_show_arrow(Toolbar* this_, int show_arrow) nothrow;
49875 void gtk_toolbar_set_style(Toolbar* this_, ToolbarStyle style) nothrow;
49876 void gtk_toolbar_set_tooltips(Toolbar* this_, int enable) nothrow;
49877 void gtk_toolbar_unset_icon_size(Toolbar* this_) nothrow;
49878 void gtk_toolbar_unset_style(Toolbar* this_) nothrow;
49879 void gtk_tooltip_trigger_tooltip_query(Gdk2.Display* display) nothrow;
49880 void gtk_tooltip_set_custom(Tooltip* this_, Widget* custom_widget=null) nothrow;
49881 void gtk_tooltip_set_icon(Tooltip* this_, GdkPixbuf2.Pixbuf* pixbuf=null) nothrow;
49882 void gtk_tooltip_set_icon_from_gicon(Tooltip* this_, Gio2.Icon* gicon, IconSize size) nothrow;
49883 void gtk_tooltip_set_icon_from_icon_name(Tooltip* this_, char* icon_name, IconSize size) nothrow;
49884 void gtk_tooltip_set_icon_from_stock(Tooltip* this_, char* stock_id, IconSize size) nothrow;
49885 void gtk_tooltip_set_markup(Tooltip* this_, char* markup=null) nothrow;
49886 void gtk_tooltip_set_text(Tooltip* this_, char* text=null) nothrow;
49887 void gtk_tooltip_set_tip_area(Tooltip* this_, Gdk2.Rectangle* rect) nothrow;
49888 Tooltips* gtk_tooltips_new() nothrow;
49889 int gtk_tooltips_get_info_from_tip_window(Window* tip_window, Tooltips** tooltips, Widget** current_widget) nothrow;
49890 void gtk_tooltips_disable(Tooltips* this_) nothrow;
49891 void gtk_tooltips_enable(Tooltips* this_) nothrow;
49892 void gtk_tooltips_force_window(Tooltips* this_) nothrow;
49893 void gtk_tooltips_set_delay(Tooltips* this_, uint delay) nothrow;
49894 void gtk_tooltips_set_tip(Tooltips* this_, Widget* widget, char* tip_text=null, char* tip_private=null) nothrow;
49895 TooltipsData* gtk_tooltips_data_get(Widget* widget) nothrow;
49896 int gtk_tree_drag_dest_drag_data_received(TreeDragDest* this_, TreePath* dest, SelectionData* selection_data) nothrow;
49897 int gtk_tree_drag_dest_row_drop_possible(TreeDragDest* this_, TreePath* dest_path, SelectionData* selection_data) nothrow;
49898 int gtk_tree_drag_source_drag_data_delete(TreeDragSource* this_, TreePath* path) nothrow;
49899 int gtk_tree_drag_source_drag_data_get(TreeDragSource* this_, TreePath* path, /*out*/ SelectionData* selection_data) nothrow;
49900 int gtk_tree_drag_source_row_draggable(TreeDragSource* this_, TreePath* path) nothrow;
49901 TreeIter* /*new*/ gtk_tree_iter_copy(TreeIter* this_) nothrow;
49902 void gtk_tree_iter_free(TreeIter* this_) nothrow;
49903 TreeModel* /*new*/ gtk_tree_model_filter_new(TreeModel* this_, TreePath* root=null) nothrow;
49904 void gtk_tree_model_foreach(TreeModel* this_, TreeModelForeachFunc func, void* user_data) nothrow;
49905 void gtk_tree_model_get(TreeModel* this_, TreeIter* iter, ...) nothrow;
49906 Type gtk_tree_model_get_column_type(TreeModel* this_, int index_) nothrow;
49907 TreeModelFlags gtk_tree_model_get_flags(TreeModel* this_) nothrow;
49908 int gtk_tree_model_get_iter(TreeModel* this_, /*out*/ TreeIter* iter, TreePath* path) nothrow;
49909 int gtk_tree_model_get_iter_first(TreeModel* this_, /*out*/ TreeIter* iter) nothrow;
49910 int gtk_tree_model_get_iter_from_string(TreeModel* this_, /*out*/ TreeIter* iter, char* path_string) nothrow;
49911 int gtk_tree_model_get_n_columns(TreeModel* this_) nothrow;
49912 TreePath* /*new*/ gtk_tree_model_get_path(TreeModel* this_, TreeIter* iter) nothrow;
49913 char* /*new*/ gtk_tree_model_get_string_from_iter(TreeModel* this_, TreeIter* iter) nothrow;
49914 void gtk_tree_model_get_valist(TreeModel* this_, TreeIter* iter, va_list var_args) nothrow;
49915 void gtk_tree_model_get_value(TreeModel* this_, TreeIter* iter, int column, /*out*/ GObject2.Value* value) nothrow;
49916 int gtk_tree_model_iter_children(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* parent=null) nothrow;
49917 int gtk_tree_model_iter_has_child(TreeModel* this_, TreeIter* iter) nothrow;
49918 int gtk_tree_model_iter_n_children(TreeModel* this_, TreeIter* iter=null) nothrow;
49919 int gtk_tree_model_iter_next(TreeModel* this_, TreeIter* iter) nothrow;
49920 int gtk_tree_model_iter_nth_child(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* parent, int n) nothrow;
49921 int gtk_tree_model_iter_parent(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* child) nothrow;
49922 void gtk_tree_model_ref_node(TreeModel* this_, TreeIter* iter) nothrow;
49923 void gtk_tree_model_row_changed(TreeModel* this_, TreePath* path, TreeIter* iter) nothrow;
49924 void gtk_tree_model_row_deleted(TreeModel* this_, TreePath* path) nothrow;
49925 void gtk_tree_model_row_has_child_toggled(TreeModel* this_, TreePath* path, TreeIter* iter) nothrow;
49926 void gtk_tree_model_row_inserted(TreeModel* this_, TreePath* path, TreeIter* iter) nothrow;
49927 void gtk_tree_model_rows_reordered(TreeModel* this_, TreePath* path, TreeIter* iter, int* new_order) nothrow;
49928 TreeModel* /*new*/ gtk_tree_model_sort_new_with_model(TreeModel* this_) nothrow;
49929 void gtk_tree_model_unref_node(TreeModel* this_, TreeIter* iter) nothrow;
49930 void gtk_tree_model_filter_clear_cache(TreeModelFilter* this_) nothrow;
49931 int gtk_tree_model_filter_convert_child_iter_to_iter(TreeModelFilter* this_, /*out*/ TreeIter* filter_iter, TreeIter* child_iter) nothrow;
49932 TreePath* /*new*/ gtk_tree_model_filter_convert_child_path_to_path(TreeModelFilter* this_, TreePath* child_path) nothrow;
49933 void gtk_tree_model_filter_convert_iter_to_child_iter(TreeModelFilter* this_, /*out*/ TreeIter* child_iter, TreeIter* filter_iter) nothrow;
49934 TreePath* /*new*/ gtk_tree_model_filter_convert_path_to_child_path(TreeModelFilter* this_, TreePath* filter_path) nothrow;
49935 TreeModel* gtk_tree_model_filter_get_model(TreeModelFilter* this_) nothrow;
49936 void gtk_tree_model_filter_refilter(TreeModelFilter* this_) nothrow;
49937 void gtk_tree_model_filter_set_modify_func(TreeModelFilter* this_, int n_columns, Type* types, TreeModelFilterModifyFunc func, void* data=null, GLib2.DestroyNotify destroy=null) nothrow;
49938 void gtk_tree_model_filter_set_visible_column(TreeModelFilter* this_, int column) nothrow;
49939 void gtk_tree_model_filter_set_visible_func(TreeModelFilter* this_, TreeModelFilterVisibleFunc func, void* data=null, GLib2.DestroyNotify destroy=null) nothrow;
49940 void gtk_tree_model_sort_clear_cache(TreeModelSort* this_) nothrow;
49941 int gtk_tree_model_sort_convert_child_iter_to_iter(TreeModelSort* this_, /*out*/ TreeIter* sort_iter, TreeIter* child_iter) nothrow;
49942 TreePath* /*new*/ gtk_tree_model_sort_convert_child_path_to_path(TreeModelSort* this_, TreePath* child_path) nothrow;
49943 void gtk_tree_model_sort_convert_iter_to_child_iter(TreeModelSort* this_, /*out*/ TreeIter* child_iter, TreeIter* sorted_iter) nothrow;
49944 TreePath* /*new*/ gtk_tree_model_sort_convert_path_to_child_path(TreeModelSort* this_, TreePath* sorted_path) nothrow;
49945 TreeModel* gtk_tree_model_sort_get_model(TreeModelSort* this_) nothrow;
49946 int gtk_tree_model_sort_iter_is_valid(TreeModelSort* this_, TreeIter* iter) nothrow;
49947 void gtk_tree_model_sort_reset_default_sort_func(TreeModelSort* this_) nothrow;
49948 TreePath* /*new*/ gtk_tree_path_new() nothrow;
49949 TreePath* /*new*/ gtk_tree_path_new_first() nothrow;
49950 TreePath* /*new*/ gtk_tree_path_new_from_indices(int first_index, ...) nothrow;
49951 TreePath* /*new*/ gtk_tree_path_new_from_string(char* path) nothrow;
49952 void gtk_tree_path_append_index(TreePath* this_, int index_) nothrow;
49953 int gtk_tree_path_compare(TreePath* this_, TreePath* b) nothrow;
49954 TreePath* /*new*/ gtk_tree_path_copy(TreePath* this_) nothrow;
49955 void gtk_tree_path_down(TreePath* this_) nothrow;
49956 void gtk_tree_path_free(TreePath* this_) nothrow;
49957 int gtk_tree_path_get_depth(TreePath* this_) nothrow;
49958 int* gtk_tree_path_get_indices(TreePath* this_) nothrow;
49959 int* gtk_tree_path_get_indices_with_depth(TreePath* this_, /*out*/ int* depth) nothrow;
49960 int gtk_tree_path_is_ancestor(TreePath* this_, TreePath* descendant) nothrow;
49961 int gtk_tree_path_is_descendant(TreePath* this_, TreePath* ancestor) nothrow;
49962 void gtk_tree_path_next(TreePath* this_) nothrow;
49963 void gtk_tree_path_prepend_index(TreePath* this_, int index_) nothrow;
49964 int gtk_tree_path_prev(TreePath* this_) nothrow;
49965 char* /*new*/ gtk_tree_path_to_string(TreePath* this_) nothrow;
49966 int gtk_tree_path_up(TreePath* this_) nothrow;
49967 TreeRowReference* /*new*/ gtk_tree_row_reference_new(TreeModel* model, TreePath* path) nothrow;
49968 TreeRowReference* /*new*/ gtk_tree_row_reference_new_proxy(GObject2.Object* proxy, TreeModel* model, TreePath* path) nothrow;
49969 TreeRowReference* /*new*/ gtk_tree_row_reference_copy(TreeRowReference* this_) nothrow;
49970 void gtk_tree_row_reference_free(TreeRowReference* this_) nothrow;
49971 TreeModel* gtk_tree_row_reference_get_model(TreeRowReference* this_) nothrow;
49972 TreePath* /*new*/ gtk_tree_row_reference_get_path(TreeRowReference* this_) nothrow;
49973 int gtk_tree_row_reference_valid(TreeRowReference* this_) nothrow;
49974 void gtk_tree_row_reference_deleted(GObject2.Object* proxy, TreePath* path) nothrow;
49975 void gtk_tree_row_reference_inserted(GObject2.Object* proxy, TreePath* path) nothrow;
49976 void gtk_tree_row_reference_reordered(GObject2.Object* proxy, TreePath* path, TreeIter* iter, int* new_order) nothrow;
49977 int gtk_tree_selection_count_selected_rows(TreeSelection* this_) nothrow;
49978 SelectionMode gtk_tree_selection_get_mode(TreeSelection* this_) nothrow;
49979 TreeSelectionFunc gtk_tree_selection_get_select_function(TreeSelection* this_) nothrow;
49980 int gtk_tree_selection_get_selected(TreeSelection* this_, /*out*/ TreeModel** model=null, /*out*/ TreeIter* iter=null) nothrow;
49981 GLib2.List* /*new*/ gtk_tree_selection_get_selected_rows(TreeSelection* this_, /*out*/ TreeModel** model=null) nothrow;
49982 TreeView* gtk_tree_selection_get_tree_view(TreeSelection* this_) nothrow;
49983 void* gtk_tree_selection_get_user_data(TreeSelection* this_) nothrow;
49984 int gtk_tree_selection_iter_is_selected(TreeSelection* this_, TreeIter* iter) nothrow;
49985 int gtk_tree_selection_path_is_selected(TreeSelection* this_, TreePath* path) nothrow;
49986 void gtk_tree_selection_select_all(TreeSelection* this_) nothrow;
49987 void gtk_tree_selection_select_iter(TreeSelection* this_, TreeIter* iter) nothrow;
49988 void gtk_tree_selection_select_path(TreeSelection* this_, TreePath* path) nothrow;
49989 void gtk_tree_selection_select_range(TreeSelection* this_, TreePath* start_path, TreePath* end_path) nothrow;
49990 void gtk_tree_selection_selected_foreach(TreeSelection* this_, TreeSelectionForeachFunc func, void* data) nothrow;
49991 void gtk_tree_selection_set_mode(TreeSelection* this_, SelectionMode type) nothrow;
49992 void gtk_tree_selection_set_select_function(TreeSelection* this_, TreeSelectionFunc func, void* data, GLib2.DestroyNotify destroy) nothrow;
49993 void gtk_tree_selection_unselect_all(TreeSelection* this_) nothrow;
49994 void gtk_tree_selection_unselect_iter(TreeSelection* this_, TreeIter* iter) nothrow;
49995 void gtk_tree_selection_unselect_path(TreeSelection* this_, TreePath* path) nothrow;
49996 void gtk_tree_selection_unselect_range(TreeSelection* this_, TreePath* start_path, TreePath* end_path) nothrow;
49997 int gtk_tree_sortable_get_sort_column_id(TreeSortable* this_, int* sort_column_id, SortType* order) nothrow;
49998 int gtk_tree_sortable_has_default_sort_func(TreeSortable* this_) nothrow;
49999 void gtk_tree_sortable_set_default_sort_func(TreeSortable* this_, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null) nothrow;
50000 void gtk_tree_sortable_set_sort_column_id(TreeSortable* this_, int sort_column_id, SortType order) nothrow;
50001 void gtk_tree_sortable_set_sort_func(TreeSortable* this_, int sort_column_id, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null) nothrow;
50002 void gtk_tree_sortable_sort_column_changed(TreeSortable* this_) nothrow;
50003 TreeStore* /*new*/ gtk_tree_store_new(int n_columns, ...) nothrow;
50004 TreeStore* /*new*/ gtk_tree_store_newv(int n_columns, Type* types) nothrow;
50005 void gtk_tree_store_append(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null) nothrow;
50006 void gtk_tree_store_clear(TreeStore* this_) nothrow;
50007 void gtk_tree_store_insert(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position) nothrow;
50008 void gtk_tree_store_insert_after(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null) nothrow;
50009 void gtk_tree_store_insert_before(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null) nothrow;
50010 void gtk_tree_store_insert_with_values(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position, ...) nothrow;
50011 void gtk_tree_store_insert_with_valuesv(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position, int* columns, GObject2.Value* values, int n_values) nothrow;
50012 int gtk_tree_store_is_ancestor(TreeStore* this_, TreeIter* iter, TreeIter* descendant) nothrow;
50013 int gtk_tree_store_iter_depth(TreeStore* this_, TreeIter* iter) nothrow;
50014 int gtk_tree_store_iter_is_valid(TreeStore* this_, TreeIter* iter) nothrow;
50015 void gtk_tree_store_move_after(TreeStore* this_, TreeIter* iter, TreeIter* position=null) nothrow;
50016 void gtk_tree_store_move_before(TreeStore* this_, TreeIter* iter, TreeIter* position=null) nothrow;
50017 void gtk_tree_store_prepend(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null) nothrow;
50018 int gtk_tree_store_remove(TreeStore* this_, TreeIter* iter) nothrow;
50019 void gtk_tree_store_reorder(TreeStore* this_, TreeIter* parent, int* new_order) nothrow;
50020 void gtk_tree_store_set(TreeStore* this_, TreeIter* iter, ...) nothrow;
50021 void gtk_tree_store_set_column_types(TreeStore* this_, int n_columns, Type* types) nothrow;
50022 void gtk_tree_store_set_valist(TreeStore* this_, TreeIter* iter, va_list var_args) nothrow;
50023 void gtk_tree_store_set_value(TreeStore* this_, TreeIter* iter, int column, GObject2.Value* value) nothrow;
50024 void gtk_tree_store_set_valuesv(TreeStore* this_, TreeIter* iter, int* columns, GObject2.Value* values, int n_values) nothrow;
50025 void gtk_tree_store_swap(TreeStore* this_, TreeIter* a, TreeIter* b) nothrow;
50026 TreeView* gtk_tree_view_new() nothrow;
50027 TreeView* gtk_tree_view_new_with_model(TreeModel* model) nothrow;
50028 int gtk_tree_view_append_column(TreeView* this_, TreeViewColumn* column) nothrow;
50029 void gtk_tree_view_collapse_all(TreeView* this_) nothrow;
50030 int gtk_tree_view_collapse_row(TreeView* this_, TreePath* path) nothrow;
50031 void gtk_tree_view_columns_autosize(TreeView* this_) nothrow;
50032 void gtk_tree_view_convert_bin_window_to_tree_coords(TreeView* this_, int bx, int by, /*out*/ int* tx, /*out*/ int* ty) nothrow;
50033 void gtk_tree_view_convert_bin_window_to_widget_coords(TreeView* this_, int bx, int by, /*out*/ int* wx, /*out*/ int* wy) nothrow;
50034 void gtk_tree_view_convert_tree_to_bin_window_coords(TreeView* this_, int tx, int ty, /*out*/ int* bx, /*out*/ int* by) nothrow;
50035 void gtk_tree_view_convert_tree_to_widget_coords(TreeView* this_, int tx, int ty, /*out*/ int* wx, /*out*/ int* wy) nothrow;
50036 void gtk_tree_view_convert_widget_to_bin_window_coords(TreeView* this_, int wx, int wy, /*out*/ int* bx, /*out*/ int* by) nothrow;
50037 void gtk_tree_view_convert_widget_to_tree_coords(TreeView* this_, int wx, int wy, /*out*/ int* tx, /*out*/ int* ty) nothrow;
50038 Gdk2.Pixmap* gtk_tree_view_create_row_drag_icon(TreeView* this_, TreePath* path) nothrow;
50039 void gtk_tree_view_enable_model_drag_dest(TreeView* this_, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) nothrow;
50040 void gtk_tree_view_enable_model_drag_source(TreeView* this_, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) nothrow;
50041 void gtk_tree_view_expand_all(TreeView* this_) nothrow;
50042 int gtk_tree_view_expand_row(TreeView* this_, TreePath* path, int open_all) nothrow;
50043 void gtk_tree_view_expand_to_path(TreeView* this_, TreePath* path) nothrow;
50044 void gtk_tree_view_get_background_area(TreeView* this_, TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect) nothrow;
50045 Gdk2.Window* gtk_tree_view_get_bin_window(TreeView* this_) nothrow;
50046 void gtk_tree_view_get_cell_area(TreeView* this_, TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect) nothrow;
50047 TreeViewColumn* gtk_tree_view_get_column(TreeView* this_, int n) nothrow;
50048 GLib2.List* /*new container*/ gtk_tree_view_get_columns(TreeView* this_) nothrow;
50049 void gtk_tree_view_get_cursor(TreeView* this_, /*out*/ TreePath** path=null, /*out*/ TreeViewColumn** focus_column=null) nothrow;
50050 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) nothrow;
50051 void gtk_tree_view_get_drag_dest_row(TreeView* this_, /*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null) nothrow;
50052 int gtk_tree_view_get_enable_search(TreeView* this_) nothrow;
50053 int gtk_tree_view_get_enable_tree_lines(TreeView* this_) nothrow;
50054 TreeViewColumn* gtk_tree_view_get_expander_column(TreeView* this_) nothrow;
50055 int gtk_tree_view_get_fixed_height_mode(TreeView* this_) nothrow;
50056 TreeViewGridLines gtk_tree_view_get_grid_lines(TreeView* this_) nothrow;
50057 Adjustment* gtk_tree_view_get_hadjustment(TreeView* this_) nothrow;
50058 int gtk_tree_view_get_headers_clickable(TreeView* this_) nothrow;
50059 int gtk_tree_view_get_headers_visible(TreeView* this_) nothrow;
50060 int gtk_tree_view_get_hover_expand(TreeView* this_) nothrow;
50061 int gtk_tree_view_get_hover_selection(TreeView* this_) nothrow;
50062 int gtk_tree_view_get_level_indentation(TreeView* this_) nothrow;
50063 TreeModel* gtk_tree_view_get_model(TreeView* this_) nothrow;
50064 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) nothrow;
50065 int gtk_tree_view_get_reorderable(TreeView* this_) nothrow;
50066 TreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func(TreeView* this_) nothrow;
50067 int gtk_tree_view_get_rubber_banding(TreeView* this_) nothrow;
50068 int gtk_tree_view_get_rules_hint(TreeView* this_) nothrow;
50069 int gtk_tree_view_get_search_column(TreeView* this_) nothrow;
50070 Entry* gtk_tree_view_get_search_entry(TreeView* this_) nothrow;
50071 TreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func(TreeView* this_) nothrow;
50072 TreeViewSearchPositionFunc gtk_tree_view_get_search_position_func(TreeView* this_) nothrow;
50073 TreeSelection* gtk_tree_view_get_selection(TreeView* this_) nothrow;
50074 int gtk_tree_view_get_show_expanders(TreeView* this_) nothrow;
50075 int gtk_tree_view_get_tooltip_column(TreeView* this_) nothrow;
50076 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) nothrow;
50077 Adjustment* gtk_tree_view_get_vadjustment(TreeView* this_) nothrow;
50078 int gtk_tree_view_get_visible_range(TreeView* this_, /*out*/ TreePath** start_path=null, /*out*/ TreePath** end_path=null) nothrow;
50079 void gtk_tree_view_get_visible_rect(TreeView* this_, /*out*/ Gdk2.Rectangle* visible_rect) nothrow;
50080 int gtk_tree_view_insert_column(TreeView* this_, TreeViewColumn* column, int position) nothrow;
50081 int gtk_tree_view_insert_column_with_attributes(TreeView* this_, int position, char* title, CellRenderer* cell, ...) nothrow;
50082 int gtk_tree_view_insert_column_with_data_func(TreeView* this_, int position, char* title, CellRenderer* cell, TreeCellDataFunc func, void* data, GLib2.DestroyNotify dnotify) nothrow;
50083 int gtk_tree_view_is_rubber_banding_active(TreeView* this_) nothrow;
50084 void gtk_tree_view_map_expanded_rows(TreeView* this_, TreeViewMappingFunc func, void* data) nothrow;
50085 void gtk_tree_view_move_column_after(TreeView* this_, TreeViewColumn* column, TreeViewColumn* base_column=null) nothrow;
50086 int gtk_tree_view_remove_column(TreeView* this_, TreeViewColumn* column) nothrow;
50087 void gtk_tree_view_row_activated(TreeView* this_, TreePath* path, TreeViewColumn* column) nothrow;
50088 int gtk_tree_view_row_expanded(TreeView* this_, TreePath* path) nothrow;
50089 void gtk_tree_view_scroll_to_cell(TreeView* this_, TreePath* path, TreeViewColumn* column, int use_align, float row_align, float col_align) nothrow;
50090 void gtk_tree_view_scroll_to_point(TreeView* this_, int tree_x, int tree_y) nothrow;
50091 void gtk_tree_view_set_column_drag_function(TreeView* this_, TreeViewColumnDropFunc func=null, void* user_data=null, GLib2.DestroyNotify destroy=null) nothrow;
50092 void gtk_tree_view_set_cursor(TreeView* this_, TreePath* path, TreeViewColumn* focus_column, int start_editing) nothrow;
50093 void gtk_tree_view_set_cursor_on_cell(TreeView* this_, TreePath* path, TreeViewColumn* focus_column, CellRenderer* focus_cell, int start_editing) nothrow;
50094 void gtk_tree_view_set_destroy_count_func(TreeView* this_, TreeDestroyCountFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) nothrow;
50095 void gtk_tree_view_set_drag_dest_row(TreeView* this_, TreePath* path, TreeViewDropPosition pos) nothrow;
50096 void gtk_tree_view_set_enable_search(TreeView* this_, int enable_search) nothrow;
50097 void gtk_tree_view_set_enable_tree_lines(TreeView* this_, int enabled) nothrow;
50098 void gtk_tree_view_set_expander_column(TreeView* this_, TreeViewColumn* column) nothrow;
50099 void gtk_tree_view_set_fixed_height_mode(TreeView* this_, int enable) nothrow;
50100 void gtk_tree_view_set_grid_lines(TreeView* this_, TreeViewGridLines grid_lines) nothrow;
50101 void gtk_tree_view_set_hadjustment(TreeView* this_, Adjustment* adjustment=null) nothrow;
50102 void gtk_tree_view_set_headers_clickable(TreeView* this_, int setting) nothrow;
50103 void gtk_tree_view_set_headers_visible(TreeView* this_, int headers_visible) nothrow;
50104 void gtk_tree_view_set_hover_expand(TreeView* this_, int expand) nothrow;
50105 void gtk_tree_view_set_hover_selection(TreeView* this_, int hover) nothrow;
50106 void gtk_tree_view_set_level_indentation(TreeView* this_, int indentation) nothrow;
50107 void gtk_tree_view_set_model(TreeView* this_, TreeModel* model=null) nothrow;
50108 void gtk_tree_view_set_reorderable(TreeView* this_, int reorderable) nothrow;
50109 void gtk_tree_view_set_row_separator_func(TreeView* this_, TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null) nothrow;
50110 void gtk_tree_view_set_rubber_banding(TreeView* this_, int enable) nothrow;
50111 void gtk_tree_view_set_rules_hint(TreeView* this_, int setting) nothrow;
50112 void gtk_tree_view_set_search_column(TreeView* this_, int column) nothrow;
50113 void gtk_tree_view_set_search_entry(TreeView* this_, Entry* entry=null) nothrow;
50114 void gtk_tree_view_set_search_equal_func(TreeView* this_, TreeViewSearchEqualFunc search_equal_func, void* search_user_data=null, GLib2.DestroyNotify search_destroy=null) nothrow;
50115 void gtk_tree_view_set_search_position_func(TreeView* this_, TreeViewSearchPositionFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) nothrow;
50116 void gtk_tree_view_set_show_expanders(TreeView* this_, int enabled) nothrow;
50117 void gtk_tree_view_set_tooltip_cell(TreeView* this_, Tooltip* tooltip, TreePath* path=null, TreeViewColumn* column=null, CellRenderer* cell=null) nothrow;
50118 void gtk_tree_view_set_tooltip_column(TreeView* this_, int column) nothrow;
50119 void gtk_tree_view_set_tooltip_row(TreeView* this_, Tooltip* tooltip, TreePath* path) nothrow;
50120 void gtk_tree_view_set_vadjustment(TreeView* this_, Adjustment* adjustment=null) nothrow;
50121 void gtk_tree_view_tree_to_widget_coords(TreeView* this_, int tx, int ty, int* wx, int* wy) nothrow;
50122 void gtk_tree_view_unset_rows_drag_dest(TreeView* this_) nothrow;
50123 void gtk_tree_view_unset_rows_drag_source(TreeView* this_) nothrow;
50124 void gtk_tree_view_widget_to_tree_coords(TreeView* this_, int wx, int wy, int* tx, int* ty) nothrow;
50125 TreeViewColumn* gtk_tree_view_column_new() nothrow;
50126 TreeViewColumn* gtk_tree_view_column_new_with_attributes(char* title, CellRenderer* cell, ...) nothrow;
50127 void gtk_tree_view_column_add_attribute(TreeViewColumn* this_, CellRenderer* cell_renderer, char* attribute, int column) nothrow;
50128 int gtk_tree_view_column_cell_get_position(TreeViewColumn* this_, CellRenderer* cell_renderer, int* start_pos, int* width) nothrow;
50129 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) nothrow;
50130 int gtk_tree_view_column_cell_is_visible(TreeViewColumn* this_) nothrow;
50131 void gtk_tree_view_column_cell_set_cell_data(TreeViewColumn* this_, TreeModel* tree_model, TreeIter* iter, int is_expander, int is_expanded) nothrow;
50132 void gtk_tree_view_column_clear(TreeViewColumn* this_) nothrow;
50133 void gtk_tree_view_column_clear_attributes(TreeViewColumn* this_, CellRenderer* cell_renderer) nothrow;
50134 void gtk_tree_view_column_clicked(TreeViewColumn* this_) nothrow;
50135 void gtk_tree_view_column_focus_cell(TreeViewColumn* this_, CellRenderer* cell) nothrow;
50136 float gtk_tree_view_column_get_alignment(TreeViewColumn* this_) nothrow;
50137 GLib2.List* gtk_tree_view_column_get_cell_renderers(TreeViewColumn* this_) nothrow;
50138 int gtk_tree_view_column_get_clickable(TreeViewColumn* this_) nothrow;
50139 int gtk_tree_view_column_get_expand(TreeViewColumn* this_) nothrow;
50140 int gtk_tree_view_column_get_fixed_width(TreeViewColumn* this_) nothrow;
50141 int gtk_tree_view_column_get_max_width(TreeViewColumn* this_) nothrow;
50142 int gtk_tree_view_column_get_min_width(TreeViewColumn* this_) nothrow;
50143 int gtk_tree_view_column_get_reorderable(TreeViewColumn* this_) nothrow;
50144 int gtk_tree_view_column_get_resizable(TreeViewColumn* this_) nothrow;
50145 TreeViewColumnSizing gtk_tree_view_column_get_sizing(TreeViewColumn* this_) nothrow;
50146 int gtk_tree_view_column_get_sort_column_id(TreeViewColumn* this_) nothrow;
50147 int gtk_tree_view_column_get_sort_indicator(TreeViewColumn* this_) nothrow;
50148 SortType gtk_tree_view_column_get_sort_order(TreeViewColumn* this_) nothrow;
50149 int gtk_tree_view_column_get_spacing(TreeViewColumn* this_) nothrow;
50150 char* gtk_tree_view_column_get_title(TreeViewColumn* this_) nothrow;
50151 Widget* gtk_tree_view_column_get_tree_view(TreeViewColumn* this_) nothrow;
50152 int gtk_tree_view_column_get_visible(TreeViewColumn* this_) nothrow;
50153 Widget* gtk_tree_view_column_get_widget(TreeViewColumn* this_) nothrow;
50154 int gtk_tree_view_column_get_width(TreeViewColumn* this_) nothrow;
50155 void gtk_tree_view_column_pack_end(TreeViewColumn* this_, CellRenderer* cell, int expand) nothrow;
50156 void gtk_tree_view_column_pack_start(TreeViewColumn* this_, CellRenderer* cell, int expand) nothrow;
50157 void gtk_tree_view_column_queue_resize(TreeViewColumn* this_) nothrow;
50158 void gtk_tree_view_column_set_alignment(TreeViewColumn* this_, float xalign) nothrow;
50159 void gtk_tree_view_column_set_attributes(TreeViewColumn* this_, CellRenderer* cell_renderer, ...) nothrow;
50160 void gtk_tree_view_column_set_cell_data_func(TreeViewColumn* this_, CellRenderer* cell_renderer, TreeCellDataFunc func, void* func_data, GLib2.DestroyNotify destroy) nothrow;
50161 void gtk_tree_view_column_set_clickable(TreeViewColumn* this_, int clickable) nothrow;
50162 void gtk_tree_view_column_set_expand(TreeViewColumn* this_, int expand) nothrow;
50163 void gtk_tree_view_column_set_fixed_width(TreeViewColumn* this_, int fixed_width) nothrow;
50164 void gtk_tree_view_column_set_max_width(TreeViewColumn* this_, int max_width) nothrow;
50165 void gtk_tree_view_column_set_min_width(TreeViewColumn* this_, int min_width) nothrow;
50166 void gtk_tree_view_column_set_reorderable(TreeViewColumn* this_, int reorderable) nothrow;
50167 void gtk_tree_view_column_set_resizable(TreeViewColumn* this_, int resizable) nothrow;
50168 void gtk_tree_view_column_set_sizing(TreeViewColumn* this_, TreeViewColumnSizing type) nothrow;
50169 void gtk_tree_view_column_set_sort_column_id(TreeViewColumn* this_, int sort_column_id) nothrow;
50170 void gtk_tree_view_column_set_sort_indicator(TreeViewColumn* this_, int setting) nothrow;
50171 void gtk_tree_view_column_set_sort_order(TreeViewColumn* this_, SortType order) nothrow;
50172 void gtk_tree_view_column_set_spacing(TreeViewColumn* this_, int spacing) nothrow;
50173 void gtk_tree_view_column_set_title(TreeViewColumn* this_, char* title) nothrow;
50174 void gtk_tree_view_column_set_visible(TreeViewColumn* this_, int visible) nothrow;
50175 void gtk_tree_view_column_set_widget(TreeViewColumn* this_, Widget* widget=null) nothrow;
50176 UIManager* /*new*/ gtk_ui_manager_new() nothrow;
50177 void gtk_ui_manager_add_ui(UIManager* this_, uint merge_id, char* path, char* name, char* action, UIManagerItemType type, int top) nothrow;
50178 uint gtk_ui_manager_add_ui_from_file(UIManager* this_, char* filename, GLib2.Error** error) nothrow;
50179 uint gtk_ui_manager_add_ui_from_string(UIManager* this_, char* buffer, ssize_t length, GLib2.Error** error) nothrow;
50180 void gtk_ui_manager_ensure_update(UIManager* this_) nothrow;
50181 AccelGroup* gtk_ui_manager_get_accel_group(UIManager* this_) nothrow;
50182 Action* gtk_ui_manager_get_action(UIManager* this_, char* path) nothrow;
50183 GLib2.List* gtk_ui_manager_get_action_groups(UIManager* this_) nothrow;
50184 int gtk_ui_manager_get_add_tearoffs(UIManager* this_) nothrow;
50185 GLib2.SList* /*new container*/ gtk_ui_manager_get_toplevels(UIManager* this_, UIManagerItemType types) nothrow;
50186 char* /*new*/ gtk_ui_manager_get_ui(UIManager* this_) nothrow;
50187 Widget* gtk_ui_manager_get_widget(UIManager* this_, char* path) nothrow;
50188 void gtk_ui_manager_insert_action_group(UIManager* this_, ActionGroup* action_group, int pos) nothrow;
50189 uint gtk_ui_manager_new_merge_id(UIManager* this_) nothrow;
50190 void gtk_ui_manager_remove_action_group(UIManager* this_, ActionGroup* action_group) nothrow;
50191 void gtk_ui_manager_remove_ui(UIManager* this_, uint merge_id) nothrow;
50192 void gtk_ui_manager_set_add_tearoffs(UIManager* this_, int add_tearoffs) nothrow;
50193 VBox* gtk_vbox_new(int homogeneous, int spacing) nothrow;
50194 VButtonBox* gtk_vbutton_box_new() nothrow;
50195 ButtonBoxStyle gtk_vbutton_box_get_layout_default() nothrow;
50196 int gtk_vbutton_box_get_spacing_default() nothrow;
50197 void gtk_vbutton_box_set_layout_default(ButtonBoxStyle layout) nothrow;
50198 void gtk_vbutton_box_set_spacing_default(int spacing) nothrow;
50199 VPaned* gtk_vpaned_new() nothrow;
50200 VRuler* gtk_vruler_new() nothrow;
50201 VScale* gtk_vscale_new(Adjustment* adjustment) nothrow;
50202 VScale* gtk_vscale_new_with_range(double min, double max, double step) nothrow;
50203 VScrollbar* gtk_vscrollbar_new(Adjustment* adjustment=null) nothrow;
50204 VSeparator* gtk_vseparator_new() nothrow;
50205 Viewport* gtk_viewport_new(Adjustment* hadjustment, Adjustment* vadjustment) nothrow;
50206 Gdk2.Window* gtk_viewport_get_bin_window(Viewport* this_) nothrow;
50207 Adjustment* gtk_viewport_get_hadjustment(Viewport* this_) nothrow;
50208 ShadowType gtk_viewport_get_shadow_type(Viewport* this_) nothrow;
50209 Adjustment* gtk_viewport_get_vadjustment(Viewport* this_) nothrow;
50210 Gdk2.Window* gtk_viewport_get_view_window(Viewport* this_) nothrow;
50211 void gtk_viewport_set_hadjustment(Viewport* this_, Adjustment* adjustment=null) nothrow;
50212 void gtk_viewport_set_shadow_type(Viewport* this_, ShadowType type) nothrow;
50213 void gtk_viewport_set_vadjustment(Viewport* this_, Adjustment* adjustment=null) nothrow;
50214 VolumeButton* gtk_volume_button_new() nothrow;
50215 Widget* gtk_widget_new(Type type, char* first_property_name, ...) nothrow;
50216 Gdk2.Colormap* gtk_widget_get_default_colormap() nothrow;
50217 TextDirection gtk_widget_get_default_direction() nothrow;
50218 Style* gtk_widget_get_default_style() nothrow;
50219 Gdk2.Visual* gtk_widget_get_default_visual() nothrow;
50220 void gtk_widget_pop_colormap() nothrow;
50221 void gtk_widget_pop_composite_child() nothrow;
50222 void gtk_widget_push_colormap(Gdk2.Colormap* cmap) nothrow;
50223 void gtk_widget_push_composite_child() nothrow;
50224 void gtk_widget_set_default_colormap(Gdk2.Colormap* colormap) nothrow;
50225 void gtk_widget_set_default_direction(TextDirection dir) nothrow;
50226 int gtk_widget_activate(Widget* this_) nothrow;
50227 void gtk_widget_add_accelerator(Widget* this_, char* accel_signal, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags) nothrow;
50228 void gtk_widget_add_events(Widget* this_, int events) nothrow;
50229 void gtk_widget_add_mnemonic_label(Widget* this_, Widget* label) nothrow;
50230 int gtk_widget_can_activate_accel(Widget* this_, uint signal_id) nothrow;
50231 int gtk_widget_child_focus(Widget* this_, DirectionType direction) nothrow;
50232 void gtk_widget_child_notify(Widget* this_, char* child_property) nothrow;
50233 void gtk_widget_class_path(Widget* this_, /*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null) nothrow;
50234 Pango.Context* /*new*/ gtk_widget_create_pango_context(Widget* this_) nothrow;
50235 Pango.Layout* /*new*/ gtk_widget_create_pango_layout(Widget* this_, char* text) nothrow;
50236 void gtk_widget_destroy(Widget* this_) nothrow;
50237 void gtk_widget_destroyed(Widget* this_, /*inout*/ Widget** widget_pointer) nothrow;
50238 void gtk_widget_draw(Widget* this_, Gdk2.Rectangle* area) nothrow;
50239 void gtk_widget_ensure_style(Widget* this_) nothrow;
50240 void gtk_widget_error_bell(Widget* this_) nothrow;
50241 int gtk_widget_event(Widget* this_, Gdk2.Event* event) nothrow;
50242 void gtk_widget_freeze_child_notify(Widget* this_) nothrow;
50243 Atk.Object* gtk_widget_get_accessible(Widget* this_) nothrow;
50244 Action* gtk_widget_get_action(Widget* this_) nothrow;
50245 void gtk_widget_get_allocation(Widget* this_, /*out*/ Allocation* allocation) nothrow;
50246 Widget* gtk_widget_get_ancestor(Widget* this_, Type widget_type) nothrow;
50247 int gtk_widget_get_app_paintable(Widget* this_) nothrow;
50248 int gtk_widget_get_can_default(Widget* this_) nothrow;
50249 int gtk_widget_get_can_focus(Widget* this_) nothrow;
50250 void gtk_widget_get_child_requisition(Widget* this_, Requisition* requisition) nothrow;
50251 int gtk_widget_get_child_visible(Widget* this_) nothrow;
50252 Clipboard* gtk_widget_get_clipboard(Widget* this_, Gdk2.Atom selection) nothrow;
50253 Gdk2.Colormap* gtk_widget_get_colormap(Widget* this_) nothrow;
50254 char* /*new*/ gtk_widget_get_composite_name(Widget* this_) nothrow;
50255 TextDirection gtk_widget_get_direction(Widget* this_) nothrow;
50256 Gdk2.Display* gtk_widget_get_display(Widget* this_) nothrow;
50257 int gtk_widget_get_double_buffered(Widget* this_) nothrow;
50258 int gtk_widget_get_events(Widget* this_) nothrow;
50259 Gdk2.ExtensionMode gtk_widget_get_extension_events(Widget* this_) nothrow;
50260 int gtk_widget_get_has_tooltip(Widget* this_) nothrow;
50261 int gtk_widget_get_has_window(Widget* this_) nothrow;
50262 int gtk_widget_get_mapped(Widget* this_) nothrow;
50263 RcStyle* gtk_widget_get_modifier_style(Widget* this_) nothrow;
50264 char* gtk_widget_get_name(Widget* this_) nothrow;
50265 int gtk_widget_get_no_show_all(Widget* this_) nothrow;
50266 Pango.Context* gtk_widget_get_pango_context(Widget* this_) nothrow;
50267 Widget* gtk_widget_get_parent(Widget* this_) nothrow;
50268 Gdk2.Window* gtk_widget_get_parent_window(Widget* this_) nothrow;
50269 void gtk_widget_get_pointer(Widget* this_, /*out*/ int* x=null, /*out*/ int* y=null) nothrow;
50270 int gtk_widget_get_realized(Widget* this_) nothrow;
50271 int gtk_widget_get_receives_default(Widget* this_) nothrow;
50272 void gtk_widget_get_requisition(Widget* this_, /*out*/ Requisition* requisition) nothrow;
50273 Gdk2.Window* gtk_widget_get_root_window(Widget* this_) nothrow;
50274 Gdk2.Screen* gtk_widget_get_screen(Widget* this_) nothrow;
50275 int gtk_widget_get_sensitive(Widget* this_) nothrow;
50276 Settings* gtk_widget_get_settings(Widget* this_) nothrow;
50277 void gtk_widget_get_size_request(Widget* this_, /*out*/ int* width=null, /*out*/ int* height=null) nothrow;
50278 Gdk2.Pixmap* gtk_widget_get_snapshot(Widget* this_, Gdk2.Rectangle* clip_rect=null) nothrow;
50279 StateType gtk_widget_get_state(Widget* this_) nothrow;
50280 Style* gtk_widget_get_style(Widget* this_) nothrow;
50281 char* /*new*/ gtk_widget_get_tooltip_markup(Widget* this_) nothrow;
50282 char* /*new*/ gtk_widget_get_tooltip_text(Widget* this_) nothrow;
50283 Window* gtk_widget_get_tooltip_window(Widget* this_) nothrow;
50284 Widget* gtk_widget_get_toplevel(Widget* this_) nothrow;
50285 int gtk_widget_get_visible(Widget* this_) nothrow;
50286 Gdk2.Visual* gtk_widget_get_visual(Widget* this_) nothrow;
50287 Gdk2.Window* gtk_widget_get_window(Widget* this_) nothrow;
50288 void gtk_widget_grab_default(Widget* this_) nothrow;
50289 void gtk_widget_grab_focus(Widget* this_) nothrow;
50290 int gtk_widget_has_default(Widget* this_) nothrow;
50291 int gtk_widget_has_focus(Widget* this_) nothrow;
50292 int gtk_widget_has_grab(Widget* this_) nothrow;
50293 int gtk_widget_has_rc_style(Widget* this_) nothrow;
50294 int gtk_widget_has_screen(Widget* this_) nothrow;
50295 void gtk_widget_hide(Widget* this_) nothrow;
50296 void gtk_widget_hide_all(Widget* this_) nothrow;
50297 int gtk_widget_hide_on_delete(Widget* this_) nothrow;
50298 void gtk_widget_input_shape_combine_mask(Widget* this_, Gdk2.Bitmap* shape_mask, int offset_x, int offset_y) nothrow;
50299 int gtk_widget_intersect(Widget* this_, Gdk2.Rectangle* area, Gdk2.Rectangle* intersection) nothrow;
50300 int gtk_widget_is_ancestor(Widget* this_, Widget* ancestor) nothrow;
50301 int gtk_widget_is_composited(Widget* this_) nothrow;
50302 int gtk_widget_is_drawable(Widget* this_) nothrow;
50303 int gtk_widget_is_focus(Widget* this_) nothrow;
50304 int gtk_widget_is_sensitive(Widget* this_) nothrow;
50305 int gtk_widget_is_toplevel(Widget* this_) nothrow;
50306 int gtk_widget_keynav_failed(Widget* this_, DirectionType direction) nothrow;
50307 GLib2.List* /*new container*/ gtk_widget_list_accel_closures(Widget* this_) nothrow;
50308 GLib2.List* /*new container*/ gtk_widget_list_mnemonic_labels(Widget* this_) nothrow;
50309 void gtk_widget_map(Widget* this_) nothrow;
50310 int gtk_widget_mnemonic_activate(Widget* this_, int group_cycling) nothrow;
50311 void gtk_widget_modify_base(Widget* this_, StateType state, Gdk2.Color* color=null) nothrow;
50312 void gtk_widget_modify_bg(Widget* this_, StateType state, Gdk2.Color* color=null) nothrow;
50313 void gtk_widget_modify_cursor(Widget* this_, Gdk2.Color* primary, Gdk2.Color* secondary) nothrow;
50314 void gtk_widget_modify_fg(Widget* this_, StateType state, Gdk2.Color* color=null) nothrow;
50315 void gtk_widget_modify_font(Widget* this_, Pango.FontDescription* font_desc=null) nothrow;
50316 void gtk_widget_modify_style(Widget* this_, RcStyle* style) nothrow;
50317 void gtk_widget_modify_text(Widget* this_, StateType state, Gdk2.Color* color=null) nothrow;
50318 void gtk_widget_path(Widget* this_, /*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null) nothrow;
50319 void gtk_widget_queue_clear(Widget* this_) nothrow;
50320 void gtk_widget_queue_clear_area(Widget* this_, int x, int y, int width, int height) nothrow;
50321 void gtk_widget_queue_draw(Widget* this_) nothrow;
50322 void gtk_widget_queue_draw_area(Widget* this_, int x, int y, int width, int height) nothrow;
50323 void gtk_widget_queue_resize(Widget* this_) nothrow;
50324 void gtk_widget_queue_resize_no_redraw(Widget* this_) nothrow;
50325 void gtk_widget_realize(Widget* this_) nothrow;
50326 Widget* gtk_widget_ref(Widget* this_) nothrow;
50327 Gdk2.Region* gtk_widget_region_intersect(Widget* this_, Gdk2.Region* region) nothrow;
50328 int gtk_widget_remove_accelerator(Widget* this_, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods) nothrow;
50329 void gtk_widget_remove_mnemonic_label(Widget* this_, Widget* label) nothrow;
50330 GdkPixbuf2.Pixbuf* /*new*/ gtk_widget_render_icon(Widget* this_, char* stock_id, IconSize size, char* detail=null) nothrow;
50331 void gtk_widget_reparent(Widget* this_, Widget* new_parent) nothrow;
50332 void gtk_widget_reset_rc_styles(Widget* this_) nothrow;
50333 void gtk_widget_reset_shapes(Widget* this_) nothrow;
50334 int gtk_widget_send_expose(Widget* this_, Gdk2.Event* event) nothrow;
50335 int gtk_widget_send_focus_change(Widget* this_, Gdk2.Event* event) nothrow;
50336 void gtk_widget_set(Widget* this_, char* first_property_name, ...) nothrow;
50337 void gtk_widget_set_accel_path(Widget* this_, char* accel_path=null, AccelGroup* accel_group=null) nothrow;
50338 void gtk_widget_set_allocation(Widget* this_, Allocation* allocation) nothrow;
50339 void gtk_widget_set_app_paintable(Widget* this_, int app_paintable) nothrow;
50340 void gtk_widget_set_can_default(Widget* this_, int can_default) nothrow;
50341 void gtk_widget_set_can_focus(Widget* this_, int can_focus) nothrow;
50342 void gtk_widget_set_child_visible(Widget* this_, int is_visible) nothrow;
50343 void gtk_widget_set_colormap(Widget* this_, Gdk2.Colormap* colormap) nothrow;
50344 void gtk_widget_set_composite_name(Widget* this_, char* name) nothrow;
50345 void gtk_widget_set_direction(Widget* this_, TextDirection dir) nothrow;
50346 void gtk_widget_set_double_buffered(Widget* this_, int double_buffered) nothrow;
50347 void gtk_widget_set_events(Widget* this_, int events) nothrow;
50348 void gtk_widget_set_extension_events(Widget* this_, Gdk2.ExtensionMode mode) nothrow;
50349 void gtk_widget_set_has_tooltip(Widget* this_, int has_tooltip) nothrow;
50350 void gtk_widget_set_has_window(Widget* this_, int has_window) nothrow;
50351 void gtk_widget_set_mapped(Widget* this_, int mapped) nothrow;
50352 void gtk_widget_set_name(Widget* this_, char* name) nothrow;
50353 void gtk_widget_set_no_show_all(Widget* this_, int no_show_all) nothrow;
50354 void gtk_widget_set_parent(Widget* this_, Widget* parent) nothrow;
50355 void gtk_widget_set_parent_window(Widget* this_, Gdk2.Window* parent_window) nothrow;
50356 void gtk_widget_set_realized(Widget* this_, int realized) nothrow;
50357 void gtk_widget_set_receives_default(Widget* this_, int receives_default) nothrow;
50358 void gtk_widget_set_redraw_on_allocate(Widget* this_, int redraw_on_allocate) nothrow;
50359 int gtk_widget_set_scroll_adjustments(Widget* this_, Adjustment* hadjustment=null, Adjustment* vadjustment=null) nothrow;
50360 void gtk_widget_set_sensitive(Widget* this_, int sensitive) nothrow;
50361 void gtk_widget_set_size_request(Widget* this_, int width, int height) nothrow;
50362 void gtk_widget_set_state(Widget* this_, StateType state) nothrow;
50363 void gtk_widget_set_style(Widget* this_, Style* style=null) nothrow;
50364 void gtk_widget_set_tooltip_markup(Widget* this_, char* markup=null) nothrow;
50365 void gtk_widget_set_tooltip_text(Widget* this_, char* text) nothrow;
50366 void gtk_widget_set_tooltip_window(Widget* this_, Window* custom_window=null) nothrow;
50367 void gtk_widget_set_uposition(Widget* this_, int x, int y) nothrow;
50368 void gtk_widget_set_usize(Widget* this_, int width, int height) nothrow;
50369 void gtk_widget_set_visible(Widget* this_, int visible) nothrow;
50370 void gtk_widget_set_window(Widget* this_, Gdk2.Window* window) nothrow;
50371 void gtk_widget_shape_combine_mask(Widget* this_, Gdk2.Bitmap* shape_mask, int offset_x, int offset_y) nothrow;
50372 void gtk_widget_show(Widget* this_) nothrow;
50373 void gtk_widget_show_all(Widget* this_) nothrow;
50374 void gtk_widget_show_now(Widget* this_) nothrow;
50375 void gtk_widget_size_allocate(Widget* this_, Allocation* allocation) nothrow;
50376 void gtk_widget_size_request(Widget* this_, Requisition* requisition) nothrow;
50377 void gtk_widget_style_attach(Widget* this_) nothrow;
50378 void gtk_widget_style_get(Widget* this_, char* first_property_name, ...) nothrow;
50379 void gtk_widget_style_get_property(Widget* this_, char* property_name, GObject2.Value* value) nothrow;
50380 void gtk_widget_style_get_valist(Widget* this_, char* first_property_name, va_list var_args) nothrow;
50381 void gtk_widget_thaw_child_notify(Widget* this_) nothrow;
50382 int gtk_widget_translate_coordinates(Widget* this_, Widget* dest_widget, int src_x, int src_y, /*out*/ int* dest_x, /*out*/ int* dest_y) nothrow;
50383 void gtk_widget_trigger_tooltip_query(Widget* this_) nothrow;
50384 void gtk_widget_unmap(Widget* this_) nothrow;
50385 void gtk_widget_unparent(Widget* this_) nothrow;
50386 void gtk_widget_unrealize(Widget* this_) nothrow;
50387 void gtk_widget_unref(Widget* this_) nothrow;
50388 GObject2.ParamSpec* gtk_widget_class_find_style_property(WidgetClass* this_, char* property_name) nothrow;
50389 void gtk_widget_class_install_style_property(WidgetClass* this_, GObject2.ParamSpec* pspec) nothrow;
50390 void gtk_widget_class_install_style_property_parser(WidgetClass* this_, GObject2.ParamSpec* pspec, RcPropertyParser parser) nothrow;
50391 GObject2.ParamSpec** /*new container*/ gtk_widget_class_list_style_properties(WidgetClass* this_, /*out*/ uint* n_properties) nothrow;
50392 Window* gtk_window_new(WindowType type) nothrow;
50393 GLib2.List* /*new container*/ gtk_window_get_default_icon_list() nothrow;
50394 char* gtk_window_get_default_icon_name() nothrow;
50395 GLib2.List* /*new container*/ gtk_window_list_toplevels() nothrow;
50396 void gtk_window_set_auto_startup_notification(int setting) nothrow;
50397 void gtk_window_set_default_icon(GdkPixbuf2.Pixbuf* icon) nothrow;
50398 int gtk_window_set_default_icon_from_file(char* filename, GLib2.Error** error) nothrow;
50399 void gtk_window_set_default_icon_list(GLib2.List* list) nothrow;
50400 void gtk_window_set_default_icon_name(char* name) nothrow;
50401 int gtk_window_activate_default(Window* this_) nothrow;
50402 int gtk_window_activate_focus(Window* this_) nothrow;
50403 int gtk_window_activate_key(Window* this_, Gdk2.EventKey* event) nothrow;
50404 void gtk_window_add_accel_group(Window* this_, AccelGroup* accel_group) nothrow;
50405 void gtk_window_add_embedded_xid(Window* this_, Gdk2.NativeWindow xid) nothrow;
50406 void gtk_window_add_mnemonic(Window* this_, uint keyval, Widget* target) nothrow;
50407 void gtk_window_begin_move_drag(Window* this_, int button, int root_x, int root_y, uint timestamp) nothrow;
50408 void gtk_window_begin_resize_drag(Window* this_, Gdk2.WindowEdge edge, int button, int root_x, int root_y, uint timestamp) nothrow;
50409 void gtk_window_deiconify(Window* this_) nothrow;
50410 void gtk_window_fullscreen(Window* this_) nothrow;
50411 int gtk_window_get_accept_focus(Window* this_) nothrow;
50412 int gtk_window_get_decorated(Window* this_) nothrow;
50413 void gtk_window_get_default_size(Window* this_, int* width=null, int* height=null) nothrow;
50414 Widget* gtk_window_get_default_widget(Window* this_) nothrow;
50415 int gtk_window_get_deletable(Window* this_) nothrow;
50416 int gtk_window_get_destroy_with_parent(Window* this_) nothrow;
50417 Widget* gtk_window_get_focus(Window* this_) nothrow;
50418 int gtk_window_get_focus_on_map(Window* this_) nothrow;
50419 void gtk_window_get_frame_dimensions(Window* this_, /*out*/ int* left=null, /*out*/ int* top=null, /*out*/ int* right=null, /*out*/ int* bottom=null) nothrow;
50420 Gdk2.Gravity gtk_window_get_gravity(Window* this_) nothrow;
50421 WindowGroup* gtk_window_get_group(Window* this_) nothrow;
50422 int gtk_window_get_has_frame(Window* this_) nothrow;
50423 GdkPixbuf2.Pixbuf* gtk_window_get_icon(Window* this_) nothrow;
50424 GLib2.List* /*new container*/ gtk_window_get_icon_list(Window* this_) nothrow;
50425 char* gtk_window_get_icon_name(Window* this_) nothrow;
50426 Gdk2.ModifierType gtk_window_get_mnemonic_modifier(Window* this_) nothrow;
50427 int gtk_window_get_mnemonics_visible(Window* this_) nothrow;
50428 int gtk_window_get_modal(Window* this_) nothrow;
50429 double gtk_window_get_opacity(Window* this_) nothrow;
50430 void gtk_window_get_position(Window* this_, /*out*/ int* root_x=null, /*out*/ int* root_y=null) nothrow;
50431 int gtk_window_get_resizable(Window* this_) nothrow;
50432 char* gtk_window_get_role(Window* this_) nothrow;
50433 Gdk2.Screen* gtk_window_get_screen(Window* this_) nothrow;
50434 void gtk_window_get_size(Window* this_, /*out*/ int* width=null, /*out*/ int* height=null) nothrow;
50435 int gtk_window_get_skip_pager_hint(Window* this_) nothrow;
50436 int gtk_window_get_skip_taskbar_hint(Window* this_) nothrow;
50437 char* gtk_window_get_title(Window* this_) nothrow;
50438 Window* gtk_window_get_transient_for(Window* this_) nothrow;
50439 Gdk2.WindowTypeHint gtk_window_get_type_hint(Window* this_) nothrow;
50440 int gtk_window_get_urgency_hint(Window* this_) nothrow;
50441 WindowType gtk_window_get_window_type(Window* this_) nothrow;
50442 int gtk_window_has_group(Window* this_) nothrow;
50443 int gtk_window_has_toplevel_focus(Window* this_) nothrow;
50444 void gtk_window_iconify(Window* this_) nothrow;
50445 int gtk_window_is_active(Window* this_) nothrow;
50446 void gtk_window_maximize(Window* this_) nothrow;
50447 int gtk_window_mnemonic_activate(Window* this_, uint keyval, Gdk2.ModifierType modifier) nothrow;
50448 void gtk_window_move(Window* this_, int x, int y) nothrow;
50449 int gtk_window_parse_geometry(Window* this_, char* geometry) nothrow;
50450 void gtk_window_present(Window* this_) nothrow;
50451 void gtk_window_present_with_time(Window* this_, uint timestamp) nothrow;
50452 int gtk_window_propagate_key_event(Window* this_, Gdk2.EventKey* event) nothrow;
50453 void gtk_window_remove_accel_group(Window* this_, AccelGroup* accel_group) nothrow;
50454 void gtk_window_remove_embedded_xid(Window* this_, Gdk2.NativeWindow xid) nothrow;
50455 void gtk_window_remove_mnemonic(Window* this_, uint keyval, Widget* target) nothrow;
50456 void gtk_window_reshow_with_initial_size(Window* this_) nothrow;
50457 void gtk_window_resize(Window* this_, int width, int height) nothrow;
50458 void gtk_window_set_accept_focus(Window* this_, int setting) nothrow;
50459 void gtk_window_set_decorated(Window* this_, int setting) nothrow;
50460 void gtk_window_set_default(Window* this_, Widget* default_widget=null) nothrow;
50461 void gtk_window_set_default_size(Window* this_, int width, int height) nothrow;
50462 void gtk_window_set_deletable(Window* this_, int setting) nothrow;
50463 void gtk_window_set_destroy_with_parent(Window* this_, int setting) nothrow;
50464 void gtk_window_set_focus(Window* this_, Widget* focus=null) nothrow;
50465 void gtk_window_set_focus_on_map(Window* this_, int setting) nothrow;
50466 void gtk_window_set_frame_dimensions(Window* this_, int left, int top, int right, int bottom) nothrow;
50467 void gtk_window_set_geometry_hints(Window* this_, Widget* geometry_widget, Gdk2.Geometry* geometry, Gdk2.WindowHints geom_mask) nothrow;
50468 void gtk_window_set_gravity(Window* this_, Gdk2.Gravity gravity) nothrow;
50469 void gtk_window_set_has_frame(Window* this_, int setting) nothrow;
50470 void gtk_window_set_icon(Window* this_, GdkPixbuf2.Pixbuf* icon=null) nothrow;
50471 int gtk_window_set_icon_from_file(Window* this_, char* filename, GLib2.Error** error) nothrow;
50472 void gtk_window_set_icon_list(Window* this_, GLib2.List* list) nothrow;
50473 void gtk_window_set_icon_name(Window* this_, char* name=null) nothrow;
50474 void gtk_window_set_keep_above(Window* this_, int setting) nothrow;
50475 void gtk_window_set_keep_below(Window* this_, int setting) nothrow;
50476 void gtk_window_set_mnemonic_modifier(Window* this_, Gdk2.ModifierType modifier) nothrow;
50477 void gtk_window_set_mnemonics_visible(Window* this_, int setting) nothrow;
50478 void gtk_window_set_modal(Window* this_, int modal) nothrow;
50479 void gtk_window_set_opacity(Window* this_, double opacity) nothrow;
50480 void gtk_window_set_policy(Window* this_, int allow_shrink, int allow_grow, int auto_shrink) nothrow;
50481 void gtk_window_set_position(Window* this_, WindowPosition position) nothrow;
50482 void gtk_window_set_resizable(Window* this_, int resizable) nothrow;
50483 void gtk_window_set_role(Window* this_, char* role) nothrow;
50484 void gtk_window_set_screen(Window* this_, Gdk2.Screen* screen) nothrow;
50485 void gtk_window_set_skip_pager_hint(Window* this_, int setting) nothrow;
50486 void gtk_window_set_skip_taskbar_hint(Window* this_, int setting) nothrow;
50487 void gtk_window_set_startup_id(Window* this_, char* startup_id) nothrow;
50488 void gtk_window_set_title(Window* this_, char* title) nothrow;
50489 void gtk_window_set_transient_for(Window* this_, Window* parent=null) nothrow;
50490 void gtk_window_set_type_hint(Window* this_, Gdk2.WindowTypeHint hint) nothrow;
50491 void gtk_window_set_urgency_hint(Window* this_, int setting) nothrow;
50492 void gtk_window_set_wmclass(Window* this_, char* wmclass_name, char* wmclass_class) nothrow;
50493 void gtk_window_stick(Window* this_) nothrow;
50494 void gtk_window_unfullscreen(Window* this_) nothrow;
50495 void gtk_window_unmaximize(Window* this_) nothrow;
50496 void gtk_window_unstick(Window* this_) nothrow;
50497 WindowGroup* /*new*/ gtk_window_group_new() nothrow;
50498 void gtk_window_group_add_window(WindowGroup* this_, Window* window) nothrow;
50499 Widget* gtk_window_group_get_current_grab(WindowGroup* this_) nothrow;
50500 GLib2.List* /*new container*/ gtk_window_group_list_windows(WindowGroup* this_) nothrow;
50501 void gtk_window_group_remove_window(WindowGroup* this_, Window* window) nothrow;
50502 int gtk_accel_groups_activate(GObject2.Object* object, uint accel_key, Gdk2.ModifierType accel_mods) nothrow;
50503 GLib2.SList* gtk_accel_groups_from_object(GObject2.Object* object) nothrow;
50504 uint gtk_accelerator_get_default_mod_mask() nothrow;
50505 char* /*new*/ gtk_accelerator_get_label(uint accelerator_key, Gdk2.ModifierType accelerator_mods) nothrow;
50506 char* /*new*/ gtk_accelerator_name(uint accelerator_key, Gdk2.ModifierType accelerator_mods) nothrow;
50507 void gtk_accelerator_parse(char* accelerator, /*out*/ uint* accelerator_key=null, /*out*/ Gdk2.ModifierType* accelerator_mods=null) nothrow;
50508 void gtk_accelerator_set_default_mod_mask(Gdk2.ModifierType default_mod_mask) nothrow;
50509 int gtk_accelerator_valid(uint keyval, Gdk2.ModifierType modifiers) nothrow;
50510 int gtk_alternative_dialog_button_order(Gdk2.Screen* screen=null) nothrow;
50511 uint gtk_binding_parse_binding(GLib2.Scanner* scanner) nothrow;
50512 int gtk_bindings_activate(Object* object, uint keyval, Gdk2.ModifierType modifiers) nothrow;
50513 int gtk_bindings_activate_event(Object* object, Gdk2.EventKey* event) nothrow;
50514 GLib2.Quark gtk_builder_error_quark() nothrow;
50515 char* gtk_check_version(uint required_major, uint required_minor, uint required_micro) nothrow;
50516 Type gtk_ctree_node_get_type() nothrow;
50517 void gtk_disable_setlocale() nothrow;
50518 Gdk2.DragContext* gtk_drag_begin(Widget* widget, TargetList* targets, Gdk2.DragAction actions, int button, Gdk2.Event* event) nothrow;
50519 int gtk_drag_check_threshold(Widget* widget, int start_x, int start_y, int current_x, int current_y) nothrow;
50520 void gtk_drag_dest_add_image_targets(Widget* widget) nothrow;
50521 void gtk_drag_dest_add_text_targets(Widget* widget) nothrow;
50522 void gtk_drag_dest_add_uri_targets(Widget* widget) nothrow;
50523 Gdk2.Atom gtk_drag_dest_find_target(Widget* widget, Gdk2.DragContext* context, TargetList* target_list=null) nothrow;
50524 TargetList* gtk_drag_dest_get_target_list(Widget* widget) nothrow;
50525 int gtk_drag_dest_get_track_motion(Widget* widget) nothrow;
50526 void gtk_drag_dest_set(Widget* widget, DestDefaults flags, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) nothrow;
50527 void gtk_drag_dest_set_proxy(Widget* widget, Gdk2.Window* proxy_window, Gdk2.DragProtocol protocol, int use_coordinates) nothrow;
50528 void gtk_drag_dest_set_target_list(Widget* widget, TargetList* target_list=null) nothrow;
50529 void gtk_drag_dest_set_track_motion(Widget* widget, int track_motion) nothrow;
50530 void gtk_drag_dest_unset(Widget* widget) nothrow;
50531 void gtk_drag_finish(Gdk2.DragContext* context, int success, int del, uint time_) nothrow;
50532 void gtk_drag_get_data(Widget* widget, Gdk2.DragContext* context, Gdk2.Atom target, uint time_) nothrow;
50533 Widget* gtk_drag_get_source_widget(Gdk2.DragContext* context) nothrow;
50534 void gtk_drag_highlight(Widget* widget) nothrow;
50535 void gtk_drag_set_default_icon(Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y) nothrow;
50536 void gtk_drag_set_icon_default(Gdk2.DragContext* context) nothrow;
50537 void gtk_drag_set_icon_name(Gdk2.DragContext* context, char* icon_name, int hot_x, int hot_y) nothrow;
50538 void gtk_drag_set_icon_pixbuf(Gdk2.DragContext* context, GdkPixbuf2.Pixbuf* pixbuf, int hot_x, int hot_y) nothrow;
50539 void gtk_drag_set_icon_pixmap(Gdk2.DragContext* context, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y) nothrow;
50540 void gtk_drag_set_icon_stock(Gdk2.DragContext* context, char* stock_id, int hot_x, int hot_y) nothrow;
50541 void gtk_drag_set_icon_widget(Gdk2.DragContext* context, Widget* widget, int hot_x, int hot_y) nothrow;
50542 void gtk_drag_source_add_image_targets(Widget* widget) nothrow;
50543 void gtk_drag_source_add_text_targets(Widget* widget) nothrow;
50544 void gtk_drag_source_add_uri_targets(Widget* widget) nothrow;
50545 TargetList* gtk_drag_source_get_target_list(Widget* widget) nothrow;
50546 void gtk_drag_source_set(Widget* widget, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) nothrow;
50547 void gtk_drag_source_set_icon(Widget* widget, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) nothrow;
50548 void gtk_drag_source_set_icon_name(Widget* widget, char* icon_name) nothrow;
50549 void gtk_drag_source_set_icon_pixbuf(Widget* widget, GdkPixbuf2.Pixbuf* pixbuf) nothrow;
50550 void gtk_drag_source_set_icon_stock(Widget* widget, char* stock_id) nothrow;
50551 void gtk_drag_source_set_target_list(Widget* widget, TargetList* target_list=null) nothrow;
50552 void gtk_drag_source_unset(Widget* widget) nothrow;
50553 void gtk_drag_unhighlight(Widget* widget) nothrow;
50554 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) nothrow;
50555 void gtk_draw_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow;
50556 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) nothrow;
50557 void gtk_draw_check(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow;
50558 void gtk_draw_diamond(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow;
50559 void gtk_draw_expander(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, ExpanderStyle expander_style) nothrow;
50560 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) nothrow;
50561 void gtk_draw_flat_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow;
50562 void gtk_draw_focus(Style* style, Gdk2.Window* window, int x, int y, int width, int height) nothrow;
50563 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) nothrow;
50564 void gtk_draw_hline(Style* style, Gdk2.Window* window, StateType state_type, int x1, int x2, int y) nothrow;
50565 void gtk_draw_insertion_cursor(Widget* widget, Gdk2.Drawable* drawable, Gdk2.Rectangle* area, Gdk2.Rectangle* location, int is_primary, TextDirection direction, int draw_arrow) nothrow;
50566 void gtk_draw_layout(Style* style, Gdk2.Window* window, StateType state_type, int use_text, int x, int y, Pango.Layout* layout) nothrow;
50567 void gtk_draw_option(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow;
50568 void gtk_draw_polygon(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Point* points, int npoints, int fill) nothrow;
50569 void gtk_draw_resize_grip(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.WindowEdge edge, int x, int y, int width, int height) nothrow;
50570 void gtk_draw_shadow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow;
50571 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) nothrow;
50572 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) nothrow;
50573 void gtk_draw_string(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, char* string_) nothrow;
50574 void gtk_draw_tab(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) nothrow;
50575 void gtk_draw_vline(Style* style, Gdk2.Window* window, StateType state_type, int y1_, int y2_, int x) nothrow;
50576 int gtk_events_pending() nothrow;
50577 void gtk_exit(int error_code) nothrow;
50578 int gtk_false() nothrow;
50579 GLib2.Quark gtk_file_chooser_error_quark() nothrow;
50580 Gdk2.GC* gtk_gc_get(int depth, Gdk2.Colormap* colormap, Gdk2.GCValues* values, Gdk2.GCValuesMask values_mask) nothrow;
50581 void gtk_gc_release(Gdk2.GC* gc) nothrow;
50582 Gdk2.Event* /*new*/ gtk_get_current_event() nothrow;
50583 int gtk_get_current_event_state(/*out*/ Gdk2.ModifierType* state) nothrow;
50584 uint gtk_get_current_event_time() nothrow;
50585 Pango.Language* /*new*/ gtk_get_default_language() nothrow;
50586 Widget* gtk_get_event_widget(Gdk2.Event* event) nothrow;
50587 GLib2.OptionGroup* gtk_get_option_group(int open_default_display) nothrow;
50588 void gtk_grab_add(Widget* widget) nothrow;
50589 Widget* gtk_grab_get_current() nothrow;
50590 void gtk_grab_remove(Widget* widget) nothrow;
50591 IconSize gtk_icon_size_from_name(char* name) nothrow;
50592 char* gtk_icon_size_get_name(IconSize size) nothrow;
50593 int gtk_icon_size_lookup(IconSize size, /*out*/ int* width, /*out*/ int* height) nothrow;
50594 int gtk_icon_size_lookup_for_settings(Settings* settings, IconSize size, /*out*/ int* width, /*out*/ int* height) nothrow;
50595 IconSize gtk_icon_size_register(char* name, int width, int height) nothrow;
50596 void gtk_icon_size_register_alias(char* alias_, IconSize target) nothrow;
50597 GLib2.Quark gtk_icon_theme_error_quark() nothrow;
50598 uint gtk_idle_add(Function function_, void* data) nothrow;
50599 uint gtk_idle_add_full(int priority, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) nothrow;
50600 uint gtk_idle_add_priority(int priority, Function function_, void* data) nothrow;
50601 void gtk_idle_remove(uint idle_handler_id) nothrow;
50602 void gtk_idle_remove_by_data(void* data) nothrow;
50603 void gtk_init(/*inout*/ int* argc, /*inout*/ char*** argv=null) nothrow;
50604 void gtk_init_add(Function function_, void* data) nothrow;
50605 int gtk_init_check(/*inout*/ int* argc, /*inout*/ char*** argv=null) nothrow;
50606 int gtk_init_with_args(/*inout*/ int* argc, /*inout*/ char*** argv, char* parameter_string, GLib2.OptionEntry* entries, char* translation_domain, GLib2.Error** error) nothrow;
50607 uint gtk_input_add_full(int source, Gdk2.InputCondition condition, Gdk2.InputFunction function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) nothrow;
50608 void gtk_input_remove(uint input_handler_id) nothrow;
50609 uint gtk_key_snooper_install(KeySnoopFunc snooper, void* func_data) nothrow;
50610 void gtk_key_snooper_remove(uint snooper_handler_id) nothrow;
50611 void gtk_main() nothrow;
50612 void gtk_main_do_event(Gdk2.Event* event) nothrow;
50613 int gtk_main_iteration() nothrow;
50614 int gtk_main_iteration_do(int blocking) nothrow;
50615 uint gtk_main_level() nothrow;
50616 void gtk_main_quit() nothrow;
50617 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) nothrow;
50618 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) nothrow;
50619 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) nothrow;
50620 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) nothrow;
50621 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) nothrow;
50622 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) nothrow;
50623 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) nothrow;
50624 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) nothrow;
50625 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) nothrow;
50626 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) nothrow;
50627 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) nothrow;
50628 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) nothrow;
50629 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) nothrow;
50630 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) nothrow;
50631 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) nothrow;
50632 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) nothrow;
50633 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) nothrow;
50634 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) nothrow;
50635 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) nothrow;
50636 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) nothrow;
50637 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) nothrow;
50638 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) nothrow;
50639 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) nothrow;
50640 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) nothrow;
50641 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) nothrow;
50642 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) nothrow;
50643 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) nothrow;
50644 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) nothrow;
50645 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) nothrow;
50646 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) nothrow;
50647 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) nothrow;
50648 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) nothrow;
50649 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) nothrow;
50650 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) nothrow;
50651 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) nothrow;
50652 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) nothrow;
50653 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) nothrow;
50654 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) nothrow;
50655 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) nothrow;
50656 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) nothrow;
50657 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) nothrow;
50658 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) nothrow;
50659 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) nothrow;
50660 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) nothrow;
50661 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) nothrow;
50662 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_) nothrow;
50663 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) nothrow;
50664 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) nothrow;
50665 int gtk_parse_args(/*inout*/ int* argc, /*inout*/ char*** argv) nothrow;
50666 GLib2.Quark gtk_print_error_quark() nothrow;
50667 PageSetup* /*new*/ gtk_print_run_page_setup_dialog(Window* parent, PageSetup* page_setup, PrintSettings* settings) nothrow;
50668 void gtk_print_run_page_setup_dialog_async(Window* parent, PageSetup* page_setup, PrintSettings* settings, PageSetupDoneFunc done_cb, void* data) nothrow;
50669 void gtk_propagate_event(Widget* widget, Gdk2.Event* event) nothrow;
50670 uint gtk_quit_add(uint main_level, Function function_, void* data) nothrow;
50671 void gtk_quit_add_destroy(uint main_level, Object* object) nothrow;
50672 uint gtk_quit_add_full(uint main_level, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) nothrow;
50673 void gtk_quit_remove(uint quit_handler_id) nothrow;
50674 void gtk_quit_remove_by_data(void* data) nothrow;
50675 void gtk_rc_add_class_style(RcStyle* rc_style, char* pattern) nothrow;
50676 void gtk_rc_add_default_file(char* filename) nothrow;
50677 void gtk_rc_add_widget_class_style(RcStyle* rc_style, char* pattern) nothrow;
50678 void gtk_rc_add_widget_name_style(RcStyle* rc_style, char* pattern) nothrow;
50679 char* /*new*/ gtk_rc_find_module_in_path(char* module_file) nothrow;
50680 char* /*new*/ gtk_rc_find_pixmap_in_path(Settings* settings, GLib2.Scanner* scanner, char* pixmap_file) nothrow;
50681 char** gtk_rc_get_default_files() nothrow;
50682 char* /*new*/ gtk_rc_get_im_module_file() nothrow;
50683 char* /*new*/ gtk_rc_get_im_module_path() nothrow;
50684 char* /*new*/ gtk_rc_get_module_dir() nothrow;
50685 Style* gtk_rc_get_style(Widget* widget) nothrow;
50686 Style* gtk_rc_get_style_by_paths(Settings* settings, char* widget_path, char* class_path, Type type) nothrow;
50687 char* /*new*/ gtk_rc_get_theme_dir() nothrow;
50688 void gtk_rc_parse(char* filename) nothrow;
50689 uint gtk_rc_parse_color(GLib2.Scanner* scanner, /*out*/ Gdk2.Color* color) nothrow;
50690 uint gtk_rc_parse_color_full(GLib2.Scanner* scanner, RcStyle* style, /*out*/ Gdk2.Color* color) nothrow;
50691 uint gtk_rc_parse_priority(GLib2.Scanner* scanner, PathPriorityType* priority) nothrow;
50692 uint gtk_rc_parse_state(GLib2.Scanner* scanner, StateType* state) nothrow;
50693 void gtk_rc_parse_string(char* rc_string) nothrow;
50694 int gtk_rc_reparse_all() nothrow;
50695 int gtk_rc_reparse_all_for_settings(Settings* settings, int force_load) nothrow;
50696 void gtk_rc_reset_styles(Settings* settings) nothrow;
50697 GLib2.Scanner* gtk_rc_scanner_new() nothrow;
50698 void gtk_rc_set_default_files(char** filenames) nothrow;
50699 GLib2.Quark gtk_recent_chooser_error_quark() nothrow;
50700 GLib2.Quark gtk_recent_manager_error_quark() nothrow;
50701 void gtk_rgb_to_hsv(double r, double g, double b, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v) nothrow;
50702 void gtk_selection_add_target(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint info) nothrow;
50703 void gtk_selection_add_targets(Widget* widget, Gdk2.Atom selection, TargetEntry* targets, uint ntargets) nothrow;
50704 int gtk_selection_clear(Widget* widget, Gdk2.EventSelection* event) nothrow;
50705 void gtk_selection_clear_targets(Widget* widget, Gdk2.Atom selection) nothrow;
50706 int gtk_selection_convert(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint time_) nothrow;
50707 int gtk_selection_owner_set(Widget* widget, Gdk2.Atom selection, uint time_) nothrow;
50708 int gtk_selection_owner_set_for_display(Gdk2.Display* display, Widget* widget, Gdk2.Atom selection, uint time_) nothrow;
50709 void gtk_selection_remove_all(Widget* widget) nothrow;
50710 char* /*new*/ gtk_set_locale() nothrow;
50711 void gtk_show_about_dialog(Window* parent, char* first_property_name, ...) nothrow;
50712 int gtk_show_uri(Gdk2.Screen* screen, char* uri, uint timestamp, GLib2.Error** error) nothrow;
50713 void gtk_signal_compat_matched(Object* object, GObject2.Callback func, void* data, GObject2.SignalMatchType match, uint action) nothrow;
50714 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) nothrow;
50715 void gtk_signal_connect_object_while_alive(Object* object, char* name, GObject2.Callback func, Object* alive_object) nothrow;
50716 void gtk_signal_connect_while_alive(Object* object, char* name, GObject2.Callback func, void* func_data, Object* alive_object) nothrow;
50717 void gtk_signal_emit(Object* object, uint signal_id, ...) nothrow;
50718 void gtk_signal_emit_by_name(Object* object, char* name, ...) nothrow;
50719 void gtk_signal_emit_stop_by_name(Object* object, char* name) nothrow;
50720 void gtk_signal_emitv(Object* object, uint signal_id, Arg* args) nothrow;
50721 void gtk_signal_emitv_by_name(Object* object, char* name, Arg* args) nothrow;
50722 uint gtk_signal_new(char* name, SignalRunType signal_flags, Type object_type, uint function_offset, GObject2.SignalCMarshaller marshaller, Type return_val, uint n_args, ...) nothrow;
50723 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) nothrow;
50724 void gtk_stock_add(StockItem* items, uint n_items) nothrow;
50725 void gtk_stock_add_static(StockItem* items, uint n_items) nothrow;
50726 GLib2.SList* /*new*/ gtk_stock_list_ids() nothrow;
50727 int gtk_stock_lookup(char* stock_id, /*out*/ StockItem* item) nothrow;
50728 void gtk_stock_set_translate_func(char* domain, TranslateFunc func, void* data, GLib2.DestroyNotify notify) nothrow;
50729 void gtk_target_table_free(TargetEntry* targets, int n_targets) nothrow;
50730 TargetEntry* /*new*/ gtk_target_table_new_from_list(TargetList* list, /*out*/ int* n_targets) nothrow;
50731 int gtk_targets_include_image(Gdk2.Atom* targets, int n_targets, int writable) nothrow;
50732 int gtk_targets_include_rich_text(Gdk2.Atom* targets, int n_targets, TextBuffer* buffer) nothrow;
50733 int gtk_targets_include_text(Gdk2.Atom* targets, int n_targets) nothrow;
50734 int gtk_targets_include_uri(Gdk2.Atom* targets, int n_targets) nothrow;
50735 Widget* gtk_test_create_simple_window(char* window_title, char* dialog_text) nothrow;
50736 Widget* gtk_test_create_widget(Type widget_type, char* first_property_name=null, ...) nothrow;
50737 Widget* gtk_test_display_button_window(char* window_title, char* dialog_text, ...) nothrow;
50738 Widget* gtk_test_find_label(Widget* widget, char* label_pattern) nothrow;
50739 Widget* gtk_test_find_sibling(Widget* base_widget, Type widget_type) nothrow;
50740 Widget* gtk_test_find_widget(Widget* widget, char* label_pattern, Type widget_type) nothrow;
50741 void gtk_test_init(/*inout*/ int* argcp, /*inout*/ char*** argvp, ...) nothrow;
50742 Type* gtk_test_list_all_types(/*out*/ uint* n_types) nothrow;
50743 void gtk_test_register_all_types() nothrow;
50744 double gtk_test_slider_get_value(Widget* widget) nothrow;
50745 void gtk_test_slider_set_perc(Widget* widget, double percentage) nothrow;
50746 int gtk_test_spin_button_click(SpinButton* spinner, uint button, int upwards) nothrow;
50747 char* /*new*/ gtk_test_text_get(Widget* widget) nothrow;
50748 void gtk_test_text_set(Widget* widget, char* string_) nothrow;
50749 int gtk_test_widget_click(Widget* widget, uint button, Gdk2.ModifierType modifiers) nothrow;
50750 int gtk_test_widget_send_key(Widget* widget, uint keyval, Gdk2.ModifierType modifiers) nothrow;
50751 void gtk_text_anchored_child_set_layout(Widget* child, TextLayout* layout) nothrow;
50752 uint gtk_timeout_add(uint interval, Function function_, void* data) nothrow;
50753 uint gtk_timeout_add_full(uint interval, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) nothrow;
50754 void gtk_timeout_remove(uint timeout_handler_id) nothrow;
50755 int gtk_tree_get_row_drag_data(SelectionData* selection_data, /*out*/ TreeModel** tree_model, /*out*/ TreePath** path) nothrow;
50756 int gtk_tree_set_row_drag_data(SelectionData* selection_data, TreeModel* tree_model, TreePath* path) nothrow;
50757 int gtk_true() nothrow;
50758 void* gtk_type_class(Type type) nothrow;
50759 EnumValue* gtk_type_enum_find_value(Type enum_type, char* value_name) nothrow;
50760 EnumValue* gtk_type_enum_get_values(Type enum_type) nothrow;
50761 FlagValue* gtk_type_flags_find_value(Type flags_type, char* value_name) nothrow;
50762 FlagValue* gtk_type_flags_get_values(Type flags_type) nothrow;
50763 void gtk_type_init(GObject2.TypeDebugFlags debug_flags) nothrow;
50764 void* gtk_type_new(Type type) nothrow;
50765 Type gtk_type_unique(Type parent_type, GTypeInfo* gtkinfo) nothrow;