Regenerate. Cogl works now.
[girtod.git] / gtk2 / gtk2.d
blobf75fde0ed99378c1a195c756adb669528257d683
1 // *** DO NOT EDIT ***
2 // Automatically generated from "/usr/share/gir-1.0/Gtk-2.0.gir"
4 module Gtk2;
5 public import gtk2.atk;
6 alias gtk2.atk Atk;
7 public import gtk2.glib2;
8 alias gtk2.glib2 GLib2;
9 public import gtk2.gmodule2;
10 alias gtk2.gmodule2 GModule2;
11 public import gtk2.gobject2;
12 alias gtk2.gobject2 GObject2;
13 public import gtk2.gdk2;
14 alias gtk2.gdk2 Gdk2;
15 public import gtk2.gdkpixbuf2;
16 alias gtk2.gdkpixbuf2 GdkPixbuf2;
17 public import gtk2.gio2;
18 alias gtk2.gio2 Gio2;
19 public import gtk2.pango;
20 alias gtk2.pango Pango;
21 public import gtk2.cairo;
22 alias gtk2.cairo cairo;
24 // c:symbol-prefixes: ["gtk"]
25 // c:identifier-prefixes: ["Gtk"]
27 // module Gtk2;
30 // A <structname>GtkAllocation</structname> of a widget represents region which has been allocated to the
31 // widget by its parent. It is a subregion of its parents allocation. See
32 // <xref linkend="size-allocation"/> for more information.
33 alias Gdk2.Rectangle Allocation;
34 alias GObject2.BaseInitFunc ClassInitFunc;
35 alias GObject2.EnumValue EnumValue;
36 alias GObject2.FlagsValue FlagValue;
37 alias Type FundamentalType;
38 alias GObject2.InstanceInitFunc ObjectInitFunc;
39 alias GObject2.SignalCMarshaller SignalMarshaller;
40 /* alias Type Type; */
41 alias GObject2.TypeClass TypeClass;
42 alias GObject2.TypeInstance TypeObject;
43 enum int ARG_READWRITE = 0;
45 // The #GtkAboutDialog offers a simple way to display information about
46 // a program like its logo, name, copyright, website and license. It is
47 // also possible to give credits to the authors, documenters, translators
48 // and artists who have worked on the program. An about dialog is typically
49 // opened when the user selects the <literal>About</literal> option from
50 // the <literal>Help</literal> menu. All parts of the dialog are optional.
51 // About dialog often contain links and email addresses. #GtkAboutDialog
52 // supports this by offering global hooks, which are called when the user
53 // clicks on a link or email address, see gtk_about_dialog_set_email_hook()
54 // and gtk_about_dialog_set_url_hook(). Email addresses in the
55 // authors, documenters and artists properties are recognized by looking for
56 // <literal>&lt;user@<!-- -->host&gt;</literal>, URLs are
57 // recognized by looking for <literal>http://url</literal>, with
58 // <literal>url</literal> extending to the next space, tab or line break.
59 // <para id="gtk-about-dialog-hook-setup">
60 // Since 2.18 #GtkAboutDialog provides default website and email hooks that
61 // use gtk_show_uri().
62 // </para>
63 // If you want provide your own hooks overriding the default ones, it is
64 // important to do so before setting the website and email URL properties,
65 // like this:
66 // <informalexample><programlisting>
67 // gtk_about_dialog_set_url_hook (GTK_ABOUT_DIALOG (dialog), launch_url, NULL, NULL);
68 // gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), app_url);
69 // </programlisting></informalexample>
70 // To disable the default hooks, you can pass %NULL as the hook func. Then,
71 // the #GtkAboutDialog widget will not display the website or the
72 // email addresses as clickable.
73 // To make constructing a #GtkAboutDialog as convenient as possible, you can
74 // use the function gtk_show_about_dialog() which constructs and shows a dialog
75 // and keeps it around so that it can be shown again.
76 // Note that GTK+ sets a default title of <literal>_("About &percnt;s")</literal>
77 // on the dialog window (where &percnt;s is replaced by the name of the
78 // application, but in order to ensure proper translation of the title,
79 // applications should set the title property explicitly when constructing
80 // a #GtkAboutDialog, as shown in the following example:
81 // <informalexample><programlisting>
82 // gtk_show_about_dialog (NULL,
83 // "program-name", "ExampleCode",
84 // "logo", example_logo,
85 // "title" _("About ExampleCode"),
86 // NULL);
87 // </programlisting></informalexample>
88 // Note that prior to GTK+ 2.12, the #GtkAboutDialog:program-name property
89 // was called "name". This was changed to avoid the conflict with the
90 // #GtkWidget:name property.
91 struct AboutDialog /* : Dialog */ {
92 mixin Atk.ImplementorIface.__interface__;
93 mixin Buildable.__interface__;
94 alias parent_instance this;
95 alias parent_instance super_;
96 alias parent_instance dialog;
97 Dialog parent_instance;
98 private void* private_data;
101 // VERSION: 2.6
102 // Creates a new #GtkAboutDialog.
103 // RETURNS: a newly created #GtkAboutDialog
104 static AboutDialog* new_()() {
105 return gtk_about_dialog_new();
108 // Unintrospectable function: set_email_hook() / gtk_about_dialog_set_email_hook()
109 // VERSION: 2.6
110 // DEPRECATED (v2.24) function: set_email_hook - Use the #GtkAboutDialog::activate-link signal
111 // Installs a global function to be called whenever the user activates an
112 // email link in an about dialog.
113 // Since 2.18 there exists a default function which uses gtk_show_uri(). To
114 // deactivate it, you can pass %NULL for @func.
115 // RETURNS: the previous email hook.
116 // <func>: a function to call when an email link is activated.
117 // <data>: data to pass to @func
118 // <destroy>: #GDestroyNotify for @data
119 static AboutDialogActivateLinkFunc set_email_hook()(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy) {
120 return gtk_about_dialog_set_email_hook(func, data, destroy);
123 // Unintrospectable function: set_url_hook() / gtk_about_dialog_set_url_hook()
124 // VERSION: 2.6
125 // DEPRECATED (v2.24) function: set_url_hook - Use the #GtkAboutDialog::activate-link signal
126 // Installs a global function to be called whenever the user activates a
127 // URL link in an about dialog.
128 // Since 2.18 there exists a default function which uses gtk_show_uri(). To
129 // deactivate it, you can pass %NULL for @func.
130 // RETURNS: the previous URL hook.
131 // <func>: a function to call when a URL link is activated.
132 // <data>: data to pass to @func
133 // <destroy>: #GDestroyNotify for @data
134 static AboutDialogActivateLinkFunc set_url_hook()(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy) {
135 return gtk_about_dialog_set_url_hook(func, data, destroy);
138 // VERSION: 2.6
139 // Returns the string which are displayed in the artists tab
140 // of the secondary credits dialog.
141 // %NULL-terminated string array containing the artists. The array is
142 // owned by the about dialog and must not be modified.
143 // RETURNS: A
144 char** get_artists()() {
145 return gtk_about_dialog_get_artists(&this);
148 // VERSION: 2.6
149 // Returns the string which are displayed in the authors tab
150 // of the secondary credits dialog.
151 // %NULL-terminated string array containing the authors. The array is
152 // owned by the about dialog and must not be modified.
153 // RETURNS: A
154 char** get_authors()() {
155 return gtk_about_dialog_get_authors(&this);
158 // VERSION: 2.6
159 // Returns the comments string.
160 // dialog and must not be modified.
161 // RETURNS: The comments. The string is owned by the about
162 char* get_comments()() {
163 return gtk_about_dialog_get_comments(&this);
166 // VERSION: 2.6
167 // Returns the copyright string.
168 // dialog and must not be modified.
169 // RETURNS: The copyright string. The string is owned by the about
170 char* get_copyright()() {
171 return gtk_about_dialog_get_copyright(&this);
174 // VERSION: 2.6
175 // Returns the string which are displayed in the documenters
176 // tab of the secondary credits dialog.
177 // %NULL-terminated string array containing the documenters. The
178 // array is owned by the about dialog and must not be modified.
179 // RETURNS: A
180 char** get_documenters()() {
181 return gtk_about_dialog_get_documenters(&this);
184 // VERSION: 2.6
185 // Returns the license information.
186 // dialog and must not be modified.
187 // RETURNS: The license information. The string is owned by the about
188 char* get_license()() {
189 return gtk_about_dialog_get_license(&this);
192 // VERSION: 2.6
193 // Returns the pixbuf displayed as logo in the about dialog.
194 // pixbuf is owned by the about dialog. If you want to keep a
195 // reference to it, you have to call g_object_ref() on it.
196 // RETURNS: the pixbuf displayed as logo. The
197 GdkPixbuf2.Pixbuf* get_logo()() {
198 return gtk_about_dialog_get_logo(&this);
201 // VERSION: 2.6
202 // Returns the icon name displayed as logo in the about dialog.
203 // owned by the dialog. If you want to keep a reference
204 // to it, you have to call g_strdup() on it.
205 // RETURNS: the icon name displayed as logo. The string is
206 char* get_logo_icon_name()() {
207 return gtk_about_dialog_get_logo_icon_name(&this);
210 // VERSION: 2.6
211 // DEPRECATED (v2.12) method: get_name - Use gtk_about_dialog_get_program_name() instead.
212 // Returns the program name displayed in the about dialog.
213 // dialog and must not be modified.
214 // RETURNS: The program name. The string is owned by the about
215 char* get_name()() {
216 return gtk_about_dialog_get_name(&this);
219 // VERSION: 2.12
220 // Returns the program name displayed in the about dialog.
221 // dialog and must not be modified.
222 // RETURNS: The program name. The string is owned by the about
223 char* get_program_name()() {
224 return gtk_about_dialog_get_program_name(&this);
227 // VERSION: 2.6
228 // Returns the translator credits string which is displayed
229 // in the translators tab of the secondary credits dialog.
230 // owned by the about dialog and must not be modified.
231 // RETURNS: The translator credits string. The string is
232 char* get_translator_credits()() {
233 return gtk_about_dialog_get_translator_credits(&this);
236 // VERSION: 2.6
237 // Returns the version string.
238 // dialog and must not be modified.
239 // RETURNS: The version string. The string is owned by the about
240 char* get_version()() {
241 return gtk_about_dialog_get_version(&this);
244 // VERSION: 2.6
245 // Returns the website URL.
246 // dialog and must not be modified.
247 // RETURNS: The website URL. The string is owned by the about
248 char* get_website()() {
249 return gtk_about_dialog_get_website(&this);
252 // VERSION: 2.6
253 // Returns the label used for the website link.
254 // owned by the about dialog and must not be modified.
255 // RETURNS: The label used for the website link. The string is
256 char* get_website_label()() {
257 return gtk_about_dialog_get_website_label(&this);
260 // VERSION: 2.8
261 // Returns whether the license text in @about is
262 // automatically wrapped.
263 // RETURNS: %TRUE if the license text is wrapped
264 int get_wrap_license()() {
265 return gtk_about_dialog_get_wrap_license(&this);
268 // VERSION: 2.6
269 // Sets the strings which are displayed in the artists tab
270 // of the secondary credits dialog.
271 // <artists>: a %NULL-terminated array of strings
272 void set_artists()(char** artists) {
273 gtk_about_dialog_set_artists(&this, artists);
276 // VERSION: 2.6
277 // Sets the strings which are displayed in the authors tab
278 // of the secondary credits dialog.
279 // <authors>: a %NULL-terminated array of strings
280 void set_authors()(char** authors) {
281 gtk_about_dialog_set_authors(&this, authors);
284 // VERSION: 2.6
285 // Sets the comments string to display in the about dialog.
286 // This should be a short string of one or two lines.
287 // <comments>: a comments string
288 void set_comments()(char* comments=null) {
289 gtk_about_dialog_set_comments(&this, comments);
292 // VERSION: 2.6
293 // Sets the copyright string to display in the about dialog.
294 // This should be a short string of one or two lines.
295 // <copyright>: (allow-none) the copyright string
296 void set_copyright()(char* copyright) {
297 gtk_about_dialog_set_copyright(&this, copyright);
300 // VERSION: 2.6
301 // Sets the strings which are displayed in the documenters tab
302 // of the secondary credits dialog.
303 // <documenters>: a %NULL-terminated array of strings
304 void set_documenters()(char** documenters) {
305 gtk_about_dialog_set_documenters(&this, documenters);
308 // VERSION: 2.6
309 // Sets the license information to be displayed in the secondary
310 // license dialog. If @license is %NULL, the license button is
311 // hidden.
312 // <license>: the license information or %NULL
313 void set_license()(char* license=null) {
314 gtk_about_dialog_set_license(&this, license);
317 // VERSION: 2.6
318 // Sets the pixbuf to be displayed as logo in the about dialog.
319 // If it is %NULL, the default window icon set with
320 // gtk_window_set_default_icon() will be used.
321 // <logo>: a #GdkPixbuf, or %NULL
322 void set_logo()(GdkPixbuf2.Pixbuf* logo=null) {
323 gtk_about_dialog_set_logo(&this, logo);
326 // VERSION: 2.6
327 // Sets the pixbuf to be displayed as logo in the about dialog.
328 // If it is %NULL, the default window icon set with
329 // gtk_window_set_default_icon() will be used.
330 // <icon_name>: an icon name, or %NULL
331 void set_logo_icon_name()(char* icon_name=null) {
332 gtk_about_dialog_set_logo_icon_name(&this, icon_name);
335 // VERSION: 2.6
336 // DEPRECATED (v2.12) method: set_name - Use gtk_about_dialog_set_program_name() instead.
337 // Sets the name to display in the about dialog.
338 // If this is not set, it defaults to g_get_application_name().
339 // <name>: the program name
340 void set_name()(char* name=null) {
341 gtk_about_dialog_set_name(&this, name);
344 // VERSION: 2.12
345 // Sets the name to display in the about dialog.
346 // If this is not set, it defaults to g_get_application_name().
347 // <name>: the program name
348 void set_program_name()(char* name) {
349 gtk_about_dialog_set_program_name(&this, name);
352 // VERSION: 2.6
353 // Sets the translator credits string which is displayed in
354 // the translators tab of the secondary credits dialog.
355 // The intended use for this string is to display the translator
356 // of the language which is currently used in the user interface.
357 // Using gettext(), a simple way to achieve that is to mark the
358 // string for translation:
359 // |[
360 // gtk_about_dialog_set_translator_credits (about, _("translator-credits"));
361 // ]|
362 // It is a good idea to use the customary msgid "translator-credits" for this
363 // purpose, since translators will already know the purpose of that msgid, and
364 // since #GtkAboutDialog will detect if "translator-credits" is untranslated
365 // and hide the tab.
366 // <translator_credits>: the translator credits
367 void set_translator_credits()(char* translator_credits=null) {
368 gtk_about_dialog_set_translator_credits(&this, translator_credits);
371 // VERSION: 2.6
372 // Sets the version string to display in the about dialog.
373 // <version>: the version string
374 void set_version()(char* version_=null) {
375 gtk_about_dialog_set_version(&this, version_);
378 // VERSION: 2.6
379 // Sets the URL to use for the website link.
380 // Note that that the hook functions need to be set up
381 // before calling this function.
382 // <website>: a URL string starting with "http://"
383 void set_website()(char* website=null) {
384 gtk_about_dialog_set_website(&this, website);
387 // VERSION: 2.6
388 // Sets the label to be used for the website link.
389 // It defaults to the website URL.
390 // <website_label>: the label used for the website link
391 void set_website_label()(char* website_label) {
392 gtk_about_dialog_set_website_label(&this, website_label);
395 // VERSION: 2.8
396 // Sets whether the license text in @about is
397 // automatically wrapped.
398 // <wrap_license>: whether to wrap the license
399 void set_wrap_license()(int wrap_license) {
400 gtk_about_dialog_set_wrap_license(&this, wrap_license);
403 // VERSION: 2.24
404 // The signal which gets emitted to activate a URI.
405 // Applications may connect to it to override the default behaviour,
406 // which is to call gtk_show_uri().
407 // RETURNS: %TRUE if the link has been activated
408 // <uri>: the URI that is activated
409 extern (C) alias static c_int function (AboutDialog* this_, char* uri, void* user_data=null) signal_activate_link;
411 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
412 return super_.signal_connect!name(cb, data, cf);
415 ulong signal_connect(string name:"activate-link", CB:signal_activate_link)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
416 return signal_connect_data!()(&this, cast(char*)"activate-link",
417 cast(GObject2.Callback)cb, data, null, cf);
422 // The type of a function which is called when a URL or email
423 // link is activated.
424 // <about>: the #GtkAboutDialog in which the link was activated
425 // <link_>: the URL or email address to which the activated link points
426 // <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()
427 extern (C) alias void function (AboutDialog* about, char* link_, void* data) AboutDialogActivateLinkFunc;
429 struct AboutDialogClass {
430 DialogClass parent_class;
431 extern (C) int function (AboutDialog* dialog, char* uri) activate_link;
432 extern (C) void function () _gtk_reserved1;
433 extern (C) void function () _gtk_reserved2;
434 extern (C) void function () _gtk_reserved3;
437 enum AccelFlags {
438 VISIBLE = 1,
439 LOCKED = 2,
440 MASK = 7
443 // A #GtkAccelGroup represents a group of keyboard accelerators,
444 // typically attached to a toplevel #GtkWindow (with
445 // gtk_window_add_accel_group()). Usually you won't need to create a
446 // #GtkAccelGroup directly; instead, when using #GtkItemFactory, GTK+
447 // automatically sets up the accelerators for your menus in the item
448 // factory's #GtkAccelGroup.
449 // Note that <firstterm>accelerators</firstterm> are different from
450 // <firstterm>mnemonics</firstterm>. Accelerators are shortcuts for
451 // activating a menu item; they appear alongside the menu item they're a
452 // shortcut for. For example "Ctrl+Q" might appear alongside the "Quit"
453 // menu item. Mnemonics are shortcuts for GUI elements such as text
454 // entries or buttons; they appear as underlined characters. See
455 // gtk_label_new_with_mnemonic(). Menu items can have both accelerators
456 // and mnemonics, of course.
457 struct AccelGroup /* : GObject.Object */ {
458 alias parent this;
459 alias parent super_;
460 alias parent object;
461 GObject2.Object parent;
462 uint lock_count;
463 Gdk2.ModifierType modifier_mask;
464 GLib2.SList* acceleratables;
465 uint n_accels;
466 AccelGroupEntry* priv_accels;
469 // Creates a new #GtkAccelGroup.
470 // RETURNS: a new #GtkAccelGroup object
471 static AccelGroup* /*new*/ new_()() {
472 return gtk_accel_group_new();
475 // Finds the #GtkAccelGroup to which @closure is connected;
476 // see gtk_accel_group_connect().
477 // RETURNS: the #GtkAccelGroup to which @closure is connected, or %NULL.
478 // <closure>: a #GClosure
479 static AccelGroup* from_accel_closure()(GObject2.Closure* closure) {
480 return gtk_accel_group_from_accel_closure(closure);
483 // Finds the first accelerator in @accel_group
484 // that matches @accel_key and @accel_mods, and
485 // activates it.
486 // RETURNS: %TRUE if an accelerator was activated and handled this keypress
487 // <accel_quark>: the quark for the accelerator name
488 // <acceleratable>: the #GObject, usually a #GtkWindow, on which to activate the accelerator.
489 // <accel_key>: accelerator keyval from a key event
490 // <accel_mods>: keyboard state mask from a key event
491 int activate()(GLib2.Quark accel_quark, GObject2.Object* acceleratable, uint accel_key, Gdk2.ModifierType accel_mods) {
492 return gtk_accel_group_activate(&this, accel_quark, acceleratable, accel_key, accel_mods);
495 // Installs an accelerator in this group. When @accel_group is being activated
496 // in response to a call to gtk_accel_groups_activate(), @closure will be
497 // invoked if the @accel_key and @accel_mods from gtk_accel_groups_activate()
498 // match those of this connection.
499 // The signature used for the @closure is that of #GtkAccelGroupActivate.
500 // Note that, due to implementation details, a single closure can only be
501 // connected to one accelerator group.
502 // <accel_key>: key value of the accelerator
503 // <accel_mods>: modifier combination of the accelerator
504 // <accel_flags>: a flag mask to configure this accelerator
505 // <closure>: closure to be executed upon accelerator activation
506 void connect()(uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags, GObject2.Closure* closure) {
507 gtk_accel_group_connect(&this, accel_key, accel_mods, accel_flags, closure);
510 // Installs an accelerator in this group, using an accelerator path to look
511 // up the appropriate key and modifiers (see gtk_accel_map_add_entry()).
512 // When @accel_group is being activated in response to a call to
513 // gtk_accel_groups_activate(), @closure will be invoked if the @accel_key and
514 // for the path.
515 // The signature used for the @closure is that of #GtkAccelGroupActivate.
516 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
517 // pass a static string, you can save some memory by interning it first with
518 // g_intern_static_string().
519 // <accel_path>: path used for determining key and modifiers.
520 // <closure>: closure to be executed upon accelerator activation
521 void connect_by_path()(char* accel_path, GObject2.Closure* closure) {
522 gtk_accel_group_connect_by_path(&this, accel_path, closure);
525 // Removes an accelerator previously installed through
526 // gtk_accel_group_connect().
527 // Since 2.20 @closure can be %NULL.
528 // RETURNS: %TRUE if the closure was found and got disconnected
529 // <closure>: the closure to remove from this accelerator group, or %NULL to remove all closures
530 int disconnect()(GObject2.Closure* closure=null) {
531 return gtk_accel_group_disconnect(&this, closure);
534 // Removes an accelerator previously installed through
535 // gtk_accel_group_connect().
536 // RETURNS: %TRUE if there was an accelerator which could be removed, %FALSE otherwise
537 // <accel_key>: key value of the accelerator
538 // <accel_mods>: modifier combination of the accelerator
539 int disconnect_key()(uint accel_key, Gdk2.ModifierType accel_mods) {
540 return gtk_accel_group_disconnect_key(&this, accel_key, accel_mods);
543 // Unintrospectable method: find() / gtk_accel_group_find()
544 // Finds the first entry in an accelerator group for which
545 // RETURNS: the key of the first entry passing
546 // <find_func>: a function to filter the entries of @accel_group with
547 // <data>: data to pass to @find_func
548 AccelKey* find()(AccelGroupFindFunc find_func, void* data) {
549 return gtk_accel_group_find(&this, find_func, data);
552 // VERSION: 2.14
553 // Locks are added and removed using gtk_accel_group_lock() and
554 // gtk_accel_group_unlock().
555 // %FALSE otherwise.
556 // RETURNS: %TRUE if there are 1 or more locks on the @accel_group,
557 int get_is_locked()() {
558 return gtk_accel_group_get_is_locked(&this);
561 // VERSION: 2.14
562 // Gets a #GdkModifierType representing the mask for this
563 // RETURNS: the modifier mask for this accel group.
564 Gdk2.ModifierType get_modifier_mask()() {
565 return gtk_accel_group_get_modifier_mask(&this);
568 // Locks the given accelerator group.
569 // Locking an acelerator group prevents the accelerators contained
570 // within it to be changed during runtime. Refer to
571 // gtk_accel_map_change_entry() about runtime accelerator changes.
572 // If called more than once, @accel_group remains locked until
573 // gtk_accel_group_unlock() has been called an equivalent number
574 // of times.
575 void lock()() {
576 gtk_accel_group_lock(&this);
579 // Unintrospectable method: query() / gtk_accel_group_query()
580 // Queries an accelerator group for all entries matching @accel_key and
581 // RETURNS: an array of @n_entries #GtkAccelGroupEntry elements, or %NULL. The array is owned by GTK+ and must not be freed.
582 // <accel_key>: key value of the accelerator
583 // <accel_mods>: modifier combination of the accelerator
584 // <n_entries>: location to return the number of entries found, or %NULL
585 AccelGroupEntry* query()(uint accel_key, Gdk2.ModifierType accel_mods, uint* n_entries=null) {
586 return gtk_accel_group_query(&this, accel_key, accel_mods, n_entries);
588 // Undoes the last call to gtk_accel_group_lock() on this @accel_group.
589 void unlock()() {
590 gtk_accel_group_unlock(&this);
593 // The accel-activate signal is an implementation detail of
594 // #GtkAccelGroup and not meant to be used by applications.
595 // RETURNS: %TRUE if the accelerator was activated
596 // <acceleratable>: the object on which the accelerator was activated
597 // <keyval>: the accelerator keyval
598 // <modifier>: the modifier combination of the accelerator
599 extern (C) alias static c_int function (AccelGroup* this_, GObject2.Object* acceleratable, c_uint keyval, Gdk2.ModifierType* modifier, void* user_data=null) signal_accel_activate;
601 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
602 return super_.signal_connect!name(cb, data, cf);
605 ulong signal_connect(string name:"accel-activate", CB:signal_accel_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
606 return signal_connect_data!()(&this, cast(char*)"accel-activate",
607 cast(GObject2.Callback)cb, data, null, cf);
610 // The accel-changed signal is emitted when a #GtkAccelGroupEntry
611 // is added to or removed from the accel group.
612 // Widgets like #GtkAccelLabel which display an associated
613 // accelerator should connect to this signal, and rebuild
614 // their visual representation if the @accel_closure is theirs.
615 // <keyval>: the accelerator keyval
616 // <modifier>: the modifier combination of the accelerator
617 // <accel_closure>: the #GClosure of the accelerator
618 extern (C) alias static void function (AccelGroup* this_, c_uint keyval, Gdk2.ModifierType* modifier, GObject2.Closure* accel_closure, void* user_data=null) signal_accel_changed;
619 ulong signal_connect(string name:"accel-changed", CB:signal_accel_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
620 return signal_connect_data!()(&this, cast(char*)"accel-changed",
621 cast(GObject2.Callback)cb, data, null, cf);
625 extern (C) alias int function (AccelGroup* accel_group, GObject2.Object* acceleratable, uint keyval, Gdk2.ModifierType modifier) AccelGroupActivate;
627 struct AccelGroupClass {
628 GObject2.ObjectClass parent_class;
629 extern (C) void function (AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifier, GObject2.Closure* accel_closure) accel_changed;
630 extern (C) void function () _gtk_reserved1;
631 extern (C) void function () _gtk_reserved2;
632 extern (C) void function () _gtk_reserved3;
633 extern (C) void function () _gtk_reserved4;
636 struct AccelGroupEntry {
637 AccelKey key;
638 GObject2.Closure* closure;
639 GLib2.Quark accel_path_quark;
642 // VERSION: 2.2
643 extern (C) alias int function (AccelKey* key, GObject2.Closure* closure, void* data) AccelGroupFindFunc;
645 struct AccelKey {
646 uint accel_key;
647 Gdk2.ModifierType accel_mods;
648 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
649 uint, "accel_flags", 16,
650 uint, "__dummy32A", 16));
654 // The #GtkAccelLabel widget is a subclass of #GtkLabel that also displays an
655 // accelerator key on the right of the label text, e.g. 'Ctl+S'.
656 // It is commonly used in menus to show the keyboard short-cuts for commands.
657 // The accelerator key to display is not set explicitly.
658 // Instead, the #GtkAccelLabel displays the accelerators which have been added to
659 // a particular widget. This widget is set by calling
660 // gtk_accel_label_set_accel_widget().
661 // For example, a #GtkMenuItem widget may have an accelerator added to emit the
662 // "activate" signal when the 'Ctl+S' key combination is pressed.
663 // A #GtkAccelLabel is created and added to the #GtkMenuItem, and
664 // gtk_accel_label_set_accel_widget() is called with the #GtkMenuItem as the
665 // second argument. The #GtkAccelLabel will now display 'Ctl+S' after its label.
666 // Note that creating a #GtkMenuItem with gtk_menu_item_new_with_label() (or
667 // one of the similar functions for #GtkCheckMenuItem and #GtkRadioMenuItem)
668 // automatically adds a #GtkAccelLabel to the #GtkMenuItem and calls
669 // gtk_accel_label_set_accel_widget() to set it up for you.
670 // A #GtkAccelLabel will only display accelerators which have %GTK_ACCEL_VISIBLE
671 // set (see #GtkAccelFlags).
672 // A #GtkAccelLabel can display multiple accelerators and even signal names,
673 // though it is almost always used to display just one accelerator key.
674 // <example>
675 // <title>Creating a simple menu item with an accelerator key.</title>
676 // <programlisting>
677 // GtkWidget *save_item;
678 // GtkAccelGroup *accel_group;
679 // /<!---->* Create a GtkAccelGroup and add it to the window. *<!---->/
680 // accel_group = gtk_accel_group_new (<!-- -->);
681 // gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
682 // /<!---->* Create the menu item using the convenience function. *<!---->/
683 // save_item = gtk_menu_item_new_with_label ("Save");
684 // gtk_widget_show (save_item);
685 // gtk_container_add (GTK_CONTAINER (menu), save_item);
686 // /<!---->* Now add the accelerator to the GtkMenuItem. Note that since we called
687 // gtk_menu_item_new_with_label(<!-- -->) to create the GtkMenuItem the
688 // GtkAccelLabel is automatically set up to display the GtkMenuItem
689 // accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. *<!---->/
690 // gtk_widget_add_accelerator (save_item, "activate", accel_group,
691 // GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
692 // </programlisting>
693 // </example>
694 struct AccelLabel /* : Label */ {
695 mixin Atk.ImplementorIface.__interface__;
696 mixin Buildable.__interface__;
697 alias label this;
698 alias label super_;
699 Label label;
700 uint gtk_reserved, accel_padding;
701 Widget* accel_widget;
702 GObject2.Closure* accel_closure;
703 AccelGroup* accel_group;
704 char* accel_string;
705 ushort accel_string_width;
708 // Creates a new #GtkAccelLabel.
709 // RETURNS: a new #GtkAccelLabel.
710 // <string>: the label string. Must be non-%NULL.
711 static AccelLabel* new_()(char* string_) {
712 return gtk_accel_label_new(string_);
715 // Fetches the widget monitored by this accelerator label. See
716 // gtk_accel_label_set_accel_widget().
717 // RETURNS: the object monitored by the accelerator label, or %NULL.
718 Widget* get_accel_widget()() {
719 return gtk_accel_label_get_accel_widget(&this);
722 // Returns the width needed to display the accelerator key(s).
723 // This is used by menus to align all of the #GtkMenuItem widgets, and shouldn't
724 // be needed by applications.
725 // RETURNS: the width needed to display the accelerator key(s).
726 uint get_accel_width()() {
727 return gtk_accel_label_get_accel_width(&this);
730 // Recreates the string representing the accelerator keys.
731 // This should not be needed since the string is automatically updated whenever
732 // accelerators are added or removed from the associated widget.
733 // RETURNS: always returns %FALSE.
734 int refetch()() {
735 return gtk_accel_label_refetch(&this);
738 // Sets the closure to be monitored by this accelerator label. The closure
739 // must be connected to an accelerator group; see gtk_accel_group_connect().
740 // <accel_closure>: the closure to monitor for accelerator changes.
741 void set_accel_closure()(GObject2.Closure* accel_closure) {
742 gtk_accel_label_set_accel_closure(&this, accel_closure);
745 // Sets the widget to be monitored by this accelerator label.
746 // <accel_widget>: the widget to be monitored.
747 void set_accel_widget()(Widget* accel_widget) {
748 gtk_accel_label_set_accel_widget(&this, accel_widget);
752 struct AccelLabelClass {
753 LabelClass parent_class;
754 char* signal_quote1, signal_quote2, mod_name_shift, mod_name_control, mod_name_alt, mod_separator, accel_seperator;
755 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
756 uint, "latin1_to_char", 1,
757 uint, "__dummy32A", 31));
758 extern (C) void function () _gtk_reserved1;
759 extern (C) void function () _gtk_reserved2;
760 extern (C) void function () _gtk_reserved3;
761 extern (C) void function () _gtk_reserved4;
764 struct AccelMap /* : GObject.Object */ {
765 alias method_parent this;
766 alias method_parent super_;
767 alias method_parent object;
768 GObject2.Object method_parent;
771 // Registers a new accelerator with the global accelerator map.
772 // This function should only be called once per @accel_path
773 // with the canonical @accel_key and @accel_mods for this path.
774 // To change the accelerator during runtime programatically, use
775 // gtk_accel_map_change_entry().
776 // The accelerator path must consist of "&lt;WINDOWTYPE&gt;/Category1/Category2/.../Action",
777 // where &lt;WINDOWTYPE&gt; should be a unique application-specific identifier, that
778 // corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image",
779 // "Abiword-Document" or "Gnumeric-Settings".
780 // The Category1/.../Action portion is most appropriately chosen by the action the
781 // accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path,
782 // e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All".
783 // So a full valid accelerator path may look like:
784 // "&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...".
785 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
786 // pass a static string, you can save some memory by interning it first with
787 // g_intern_static_string().
788 // <accel_path>: valid accelerator path
789 // <accel_key>: the accelerator key
790 // <accel_mods>: the accelerator modifiers
791 static void add_entry()(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods) {
792 gtk_accel_map_add_entry(accel_path, accel_key, accel_mods);
795 // Adds a filter to the global list of accel path filters.
796 // Accel map entries whose accel path matches one of the filters
797 // are skipped by gtk_accel_map_foreach().
798 // This function is intended for GTK+ modules that create their own
799 // menus, but don't want them to be saved into the applications accelerator
800 // map dump.
801 // <filter_pattern>: a pattern (see #GPatternSpec)
802 static void add_filter()(char* filter_pattern) {
803 gtk_accel_map_add_filter(filter_pattern);
806 // Changes the @accel_key and @accel_mods currently associated with @accel_path.
807 // Due to conflicts with other accelerators, a change may not always be possible,
808 // conflicts. A change will only occur if all conflicts could be resolved (which
809 // might not be the case if conflicting accelerators are locked). Successful
810 // changes are indicated by a %TRUE return value.
811 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
812 // pass a static string, you can save some memory by interning it first with
813 // g_intern_static_string().
814 // RETURNS: %TRUE if the accelerator could be changed, %FALSE otherwise
815 // <accel_path>: a valid accelerator path
816 // <accel_key>: the new accelerator key
817 // <accel_mods>: the new accelerator modifiers
818 // <replace>: %TRUE if other accelerators may be deleted upon conflicts
819 static int change_entry()(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int replace) {
820 return gtk_accel_map_change_entry(accel_path, accel_key, accel_mods, replace);
823 // Unintrospectable function: foreach() / gtk_accel_map_foreach()
824 // Loops over the entries in the accelerator map whose accel path
825 // doesn't match any of the filters added with gtk_accel_map_add_filter(),
826 // and execute @foreach_func on each. The signature of @foreach_func is
827 // that of #GtkAccelMapForeach, the @changed parameter indicates whether
828 // this accelerator was changed during runtime (thus, would need
829 // saving during an accelerator map dump).
830 // <data>: data to be passed into @foreach_func
831 // <foreach_func>: function to be executed for each accel map entry which is not filtered out
832 static void foreach_()(void* data, AccelMapForeach foreach_func) {
833 gtk_accel_map_foreach(data, foreach_func);
836 // Unintrospectable function: foreach_unfiltered() / gtk_accel_map_foreach_unfiltered()
837 // Loops over all entries in the accelerator map, and execute
838 // #GtkAccelMapForeach, the @changed parameter indicates whether
839 // this accelerator was changed during runtime (thus, would need
840 // saving during an accelerator map dump).
841 // <data>: data to be passed into @foreach_func
842 // <foreach_func>: function to be executed for each accel map entry
843 static void foreach_unfiltered()(void* data, AccelMapForeach foreach_func) {
844 gtk_accel_map_foreach_unfiltered(data, foreach_func);
847 // Unintrospectable function: get() / gtk_accel_map_get()
848 // VERSION: 2.4
849 // Gets the singleton global #GtkAccelMap object. This object
850 // is useful only for notification of changes to the accelerator
851 // map via the ::changed signal; it isn't a parameter to the
852 // other accelerator map functions.
853 // RETURNS: the global #GtkAccelMap object
854 static AccelMap* get()() {
855 return gtk_accel_map_get();
858 // Parses a file previously saved with gtk_accel_map_save() for
859 // accelerator specifications, and propagates them accordingly.
860 // <file_name>: a file containing accelerator specifications, in the GLib file name encoding
861 static void load()(char* file_name) {
862 gtk_accel_map_load(file_name);
865 // Filedescriptor variant of gtk_accel_map_load().
866 // Note that the file descriptor will not be closed by this function.
867 // <fd>: a valid readable file descriptor
868 static void load_fd()(int fd) {
869 gtk_accel_map_load_fd(fd);
872 // #GScanner variant of gtk_accel_map_load().
873 // <scanner>: a #GScanner which has already been provided with an input file
874 static void load_scanner()(GLib2.Scanner* scanner) {
875 gtk_accel_map_load_scanner(scanner);
878 // VERSION: 2.4
879 // Locks the given accelerator path. If the accelerator map doesn't yet contain
880 // an entry for @accel_path, a new one is created.
881 // Locking an accelerator path prevents its accelerator from being changed
882 // during runtime. A locked accelerator path can be unlocked by
883 // gtk_accel_map_unlock_path(). Refer to gtk_accel_map_change_entry()
884 // for information about runtime accelerator changes.
885 // If called more than once, @accel_path remains locked until
886 // gtk_accel_map_unlock_path() has been called an equivalent number
887 // of times.
888 // Note that locking of individual accelerator paths is independent from
889 // locking the #GtkAccelGroup containing them. For runtime accelerator
890 // changes to be possible both the accelerator path and its #GtkAccelGroup
891 // have to be unlocked.
892 // <accel_path>: a valid accelerator path
893 static void lock_path()(char* accel_path) {
894 gtk_accel_map_lock_path(accel_path);
897 // Looks up the accelerator entry for @accel_path and fills in @key.
898 // RETURNS: %TRUE if @accel_path is known, %FALSE otherwise
899 // <accel_path>: a valid accelerator path
900 // <key>: the accelerator key to be filled in (optional)
901 static int lookup_entry()(char* accel_path, AccelKey* key) {
902 return gtk_accel_map_lookup_entry(accel_path, key);
905 // Saves current accelerator specifications (accelerator path, key
906 // and modifiers) to @file_name.
907 // The file is written in a format suitable to be read back in by
908 // gtk_accel_map_load().
909 // <file_name>: the name of the file to contain accelerator specifications, in the GLib file name encoding
910 static void save()(char* file_name) {
911 gtk_accel_map_save(file_name);
914 // Filedescriptor variant of gtk_accel_map_save().
915 // Note that the file descriptor will not be closed by this function.
916 // <fd>: a valid writable file descriptor
917 static void save_fd()(int fd) {
918 gtk_accel_map_save_fd(fd);
921 // VERSION: 2.4
922 // Undoes the last call to gtk_accel_map_lock_path() on this @accel_path.
923 // Refer to gtk_accel_map_lock_path() for information about accelerator path locking.
924 // <accel_path>: a valid accelerator path
925 static void unlock_path()(char* accel_path) {
926 gtk_accel_map_unlock_path(accel_path);
929 // VERSION: 2.4
930 // Notifies of a change in the global accelerator map.
931 // The path is also used as the detail for the signal,
932 // so it is possible to connect to
933 // changed::<replaceable>accel_path</replaceable>.
934 // <accel_path>: the path of the accelerator that changed
935 // <accel_key>: the key value for the new accelerator
936 // <accel_mods>: the modifier mask for the new accelerator
937 extern (C) alias static void function (AccelMap* this_, char* accel_path, c_uint accel_key, Gdk2.ModifierType* accel_mods, void* user_data=null) signal_changed;
939 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
940 return super_.signal_connect!name(cb, data, cf);
943 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
944 return signal_connect_data!()(&this, cast(char*)"changed",
945 cast(GObject2.Callback)cb, data, null, cf);
949 struct AccelMapClass {
952 extern (C) alias void function (void* data, char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int changed) AccelMapForeach;
954 struct Accessible /* : Atk.Object */ {
955 alias parent this;
956 alias parent super_;
957 alias parent object;
958 Atk.Object parent;
959 Widget* widget;
962 // This function specifies the callback function to be called when the widget
963 // corresponding to a GtkAccessible is destroyed.
964 void connect_widget_destroyed()() {
965 gtk_accessible_connect_widget_destroyed(&this);
968 // VERSION: 2.22
969 // Gets the #GtkWidget corresponding to the #GtkAccessible. The returned widget
970 // does not have a reference added, so you do not need to unref it.
971 // the #GtkAccessible, or %NULL.
972 // RETURNS: pointer to the #GtkWidget corresponding to
973 Widget* get_widget()() {
974 return gtk_accessible_get_widget(&this);
977 // VERSION: 2.22
978 // Sets the #GtkWidget corresponding to the #GtkAccessible.
979 // <widget>: a #GtkWidget
980 void set_widget()(Widget* widget) {
981 gtk_accessible_set_widget(&this, widget);
985 struct AccessibleClass {
986 Atk.ObjectClass parent_class;
987 extern (C) void function (Accessible* accessible) connect_widget_destroyed;
988 extern (C) void function () _gtk_reserved1;
989 extern (C) void function () _gtk_reserved2;
990 extern (C) void function () _gtk_reserved3;
991 extern (C) void function () _gtk_reserved4;
995 // Actions represent operations that the user can be perform, along with
996 // some information how it should be presented in the interface. Each action
997 // provides methods to create icons, menu items and toolbar items
998 // representing itself.
999 // As well as the callback that is called when the action gets activated,
1000 // the following also gets associated with the action:
1001 // <itemizedlist>
1002 // <listitem><para>a name (not translated, for path lookup)</para></listitem>
1003 // <listitem><para>a label (translated, for display)</para></listitem>
1004 // <listitem><para>an accelerator</para></listitem>
1005 // <listitem><para>whether label indicates a stock id</para></listitem>
1006 // <listitem><para>a tooltip (optional, translated)</para></listitem>
1007 // <listitem><para>a toolbar label (optional, shorter than label)</para></listitem>
1008 // </itemizedlist>
1009 // The action will also have some state information:
1010 // <itemizedlist>
1011 // <listitem><para>visible (shown/hidden)</para></listitem>
1012 // <listitem><para>sensitive (enabled/disabled)</para></listitem>
1013 // </itemizedlist>
1014 // Apart from regular actions, there are <link linkend="GtkToggleAction">toggle
1015 // actions</link>, which can be toggled between two states and <link
1016 // linkend="GtkRadioAction">radio actions</link>, of which only one in a group
1017 // can be in the "active" state. Other actions can be implemented as #GtkAction
1018 // subclasses.
1019 // Each action can have one or more proxy menu item, toolbar button or
1020 // other proxy widgets. Proxies mirror the state of the action (text
1021 // label, tooltip, icon, visible, sensitive, etc), and should change when
1022 // the action's state changes. When the proxy is activated, it should
1023 // activate its action.
1024 struct Action /* : GObject.Object */ {
1025 mixin Buildable.__interface__;
1026 alias object this;
1027 alias object super_;
1028 GObject2.Object object;
1029 private ActionPrivate* private_data;
1032 // VERSION: 2.4
1033 // Creates a new #GtkAction object. To add the action to a
1034 // #GtkActionGroup and set the accelerator for the action,
1035 // call gtk_action_group_add_action_with_accel().
1036 // See <xref linkend="XML-UI"/> for information on allowed action
1037 // names.
1038 // RETURNS: a new #GtkAction
1039 // <name>: A unique name for the action
1040 // <label>: the label displayed in menu items and on buttons, or %NULL
1041 // <tooltip>: a tooltip for the action, or %NULL
1042 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
1043 static Action* /*new*/ new_()(char* name, char* label, char* tooltip, char* stock_id) {
1044 return gtk_action_new(name, label, tooltip, stock_id);
1047 // VERSION: 2.4
1048 // Emits the "activate" signal on the specified action, if it isn't
1049 // insensitive. This gets called by the proxy widgets when they get
1050 // activated.
1051 // It can also be used to manually activate an action.
1052 void activate()() {
1053 gtk_action_activate(&this);
1056 // VERSION: 2.16
1057 // Disable activation signals from the action
1058 // This is needed when updating the state of your proxy
1059 // #GtkActivatable widget could result in calling gtk_action_activate(),
1060 // this is a convenience function to avoid recursing in those
1061 // cases (updating toggle state for instance).
1062 void block_activate()() {
1063 gtk_action_block_activate(&this);
1066 // VERSION: 2.4
1067 // DEPRECATED (v2.16) method: block_activate_from - activatables are now responsible for activating the
1068 // Disables calls to the gtk_action_activate()
1069 // function by signals on the given proxy widget. This is used to
1070 // break notification loops for things like check or radio actions.
1071 // This function is intended for use by action implementations.
1072 // action directly so this doesnt apply anymore.
1073 // <proxy>: a proxy widget
1074 void block_activate_from()(Widget* proxy) {
1075 gtk_action_block_activate_from(&this, proxy);
1078 // VERSION: 2.4
1079 // Installs the accelerator for @action if @action has an
1080 // accel path and group. See gtk_action_set_accel_path() and
1081 // gtk_action_set_accel_group()
1082 // Since multiple proxies may independently trigger the installation
1083 // of the accelerator, the @action counts the number of times this
1084 // function has been called and doesn't remove the accelerator until
1085 // gtk_action_disconnect_accelerator() has been called as many times.
1086 void connect_accelerator()() {
1087 gtk_action_connect_accelerator(&this);
1090 // VERSION: 2.4
1091 // DEPRECATED (v2.16) method: connect_proxy - Use gtk_activatable_set_related_action() instead.
1092 // Connects a widget to an action object as a proxy. Synchronises
1093 // various properties of the action with the widget (such as label
1094 // text, icon, tooltip, etc), and attaches a callback so that the
1095 // action gets activated when the proxy widget does.
1096 // If the widget is already connected to an action, it is disconnected
1097 // first.
1098 // <proxy>: the proxy widget
1099 void connect_proxy()(Widget* proxy) {
1100 gtk_action_connect_proxy(&this, proxy);
1103 // VERSION: 2.4
1104 // This function is intended for use by action implementations to
1105 // create icons displayed in the proxy widgets.
1106 // RETURNS: a widget that displays the icon for this action.
1107 // <icon_size>: the size of the icon that should be created.
1108 Widget* create_icon()(int icon_size) {
1109 return gtk_action_create_icon(&this, icon_size);
1112 // VERSION: 2.12
1113 // If @action provides a #GtkMenu widget as a submenu for the menu
1114 // item or the toolbar item it creates, this function returns an
1115 // instance of that menu.
1116 // action, or %NULL.
1117 // RETURNS: the menu item provided by the
1118 Widget* create_menu()() {
1119 return gtk_action_create_menu(&this);
1122 // VERSION: 2.4
1123 // Creates a menu item widget that proxies for the given action.
1124 // RETURNS: a menu item connected to the action.
1125 Widget* create_menu_item()() {
1126 return gtk_action_create_menu_item(&this);
1129 // VERSION: 2.4
1130 // Creates a toolbar item widget that proxies for the given action.
1131 // RETURNS: a toolbar item connected to the action.
1132 Widget* create_tool_item()() {
1133 return gtk_action_create_tool_item(&this);
1136 // VERSION: 2.4
1137 // Undoes the effect of one call to gtk_action_connect_accelerator().
1138 void disconnect_accelerator()() {
1139 gtk_action_disconnect_accelerator(&this);
1142 // VERSION: 2.4
1143 // DEPRECATED (v2.16) method: disconnect_proxy - Use gtk_activatable_set_related_action() instead.
1144 // Disconnects a proxy widget from an action.
1145 // Does <emphasis>not</emphasis> destroy the widget, however.
1146 // <proxy>: the proxy widget
1147 void disconnect_proxy()(Widget* proxy) {
1148 gtk_action_disconnect_proxy(&this, proxy);
1151 // VERSION: 2.8
1152 // Returns the accel closure for this action.
1153 // returned closure is owned by GTK+ and must not be unreffed
1154 // or modified.
1155 // RETURNS: the accel closure for this action. The
1156 GObject2.Closure* get_accel_closure()() {
1157 return gtk_action_get_accel_closure(&this);
1160 // VERSION: 2.6
1161 // Returns the accel path for this action.
1162 // if none is set. The returned string is owned by GTK+
1163 // and must not be freed or modified.
1164 // RETURNS: the accel path for this action, or %NULL
1165 char* get_accel_path()() {
1166 return gtk_action_get_accel_path(&this);
1169 // VERSION: 2.20
1170 // Returns whether @action<!-- -->'s menu item proxies will ignore the
1171 // #GtkSettings:gtk-menu-images setting and always show their image,
1172 // if available.
1173 // RETURNS: %TRUE if the menu item proxies will always show their image
1174 int get_always_show_image()() {
1175 return gtk_action_get_always_show_image(&this);
1178 // VERSION: 2.16
1179 // Gets the gicon of @action.
1180 // RETURNS: The action's #GIcon if one is set.
1181 Gio2.Icon* get_gicon()() {
1182 return gtk_action_get_gicon(&this);
1185 // VERSION: 2.16
1186 // Gets the icon name of @action.
1187 // RETURNS: the icon name
1188 char* get_icon_name()() {
1189 return gtk_action_get_icon_name(&this);
1192 // VERSION: 2.16
1193 // Checks whether @action is important or not
1194 // RETURNS: whether @action is important
1195 int get_is_important()() {
1196 return gtk_action_get_is_important(&this);
1199 // VERSION: 2.16
1200 // Gets the label text of @action.
1201 // RETURNS: the label text
1202 char* get_label()() {
1203 return gtk_action_get_label(&this);
1206 // VERSION: 2.4
1207 // Returns the name of the action.
1208 // be freed.
1209 // RETURNS: the name of the action. The string belongs to GTK+ and should not
1210 char* get_name()() {
1211 return gtk_action_get_name(&this);
1214 // VERSION: 2.4
1215 // Returns the proxy widgets for an action.
1216 // See also gtk_widget_get_action().
1217 // and must not be modified.
1218 // RETURNS: a #GSList of proxy widgets. The list is owned by GTK+
1219 GLib2.SList* get_proxies()() {
1220 return gtk_action_get_proxies(&this);
1223 // VERSION: 2.4
1224 // Returns whether the action itself is sensitive. Note that this doesn't
1225 // necessarily mean effective sensitivity. See gtk_action_is_sensitive()
1226 // for that.
1227 // RETURNS: %TRUE if the action itself is sensitive.
1228 int get_sensitive()() {
1229 return gtk_action_get_sensitive(&this);
1232 // VERSION: 2.16
1233 // Gets the short label text of @action.
1234 // RETURNS: the short label text.
1235 char* get_short_label()() {
1236 return gtk_action_get_short_label(&this);
1239 // VERSION: 2.16
1240 // Gets the stock id of @action.
1241 // RETURNS: the stock id
1242 char* get_stock_id()() {
1243 return gtk_action_get_stock_id(&this);
1246 // VERSION: 2.16
1247 // Gets the tooltip text of @action.
1248 // RETURNS: the tooltip text
1249 char* get_tooltip()() {
1250 return gtk_action_get_tooltip(&this);
1253 // VERSION: 2.4
1254 // Returns whether the action itself is visible. Note that this doesn't
1255 // necessarily mean effective visibility. See gtk_action_is_sensitive()
1256 // for that.
1257 // RETURNS: %TRUE if the action itself is visible.
1258 int get_visible()() {
1259 return gtk_action_get_visible(&this);
1262 // VERSION: 2.16
1263 // Checks whether @action is visible when horizontal
1264 // RETURNS: whether @action is visible when horizontal
1265 int get_visible_horizontal()() {
1266 return gtk_action_get_visible_horizontal(&this);
1269 // VERSION: 2.16
1270 // Checks whether @action is visible when horizontal
1271 // RETURNS: whether @action is visible when horizontal
1272 int get_visible_vertical()() {
1273 return gtk_action_get_visible_vertical(&this);
1276 // VERSION: 2.4
1277 // Returns whether the action is effectively sensitive.
1278 // are both sensitive.
1279 // RETURNS: %TRUE if the action and its associated action group
1280 int is_sensitive()() {
1281 return gtk_action_is_sensitive(&this);
1284 // VERSION: 2.4
1285 // Returns whether the action is effectively visible.
1286 // are both visible.
1287 // RETURNS: %TRUE if the action and its associated action group
1288 int is_visible()() {
1289 return gtk_action_is_visible(&this);
1292 // VERSION: 2.4
1293 // Sets the #GtkAccelGroup in which the accelerator for this action
1294 // will be installed.
1295 // <accel_group>: a #GtkAccelGroup or %NULL
1296 void set_accel_group()(AccelGroup* accel_group=null) {
1297 gtk_action_set_accel_group(&this, accel_group);
1300 // VERSION: 2.4
1301 // Sets the accel path for this action. All proxy widgets associated
1302 // with the action will have this accel path, so that their
1303 // accelerators are consistent.
1304 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
1305 // pass a static string, you can save some memory by interning it first with
1306 // g_intern_static_string().
1307 // <accel_path>: the accelerator path
1308 void set_accel_path()(char* accel_path) {
1309 gtk_action_set_accel_path(&this, accel_path);
1312 // VERSION: 2.20
1313 // Sets whether @action<!-- -->'s menu item proxies will ignore the
1314 // #GtkSettings:gtk-menu-images setting and always show their image, if available.
1315 // Use this if the menu item would be useless or hard to use
1316 // without their image.
1317 // <always_show>: %TRUE if menuitem proxies should always show their image
1318 void set_always_show_image()(int always_show) {
1319 gtk_action_set_always_show_image(&this, always_show);
1322 // VERSION: 2.16
1323 // Sets the icon of @action.
1324 // <icon>: the #GIcon to set
1325 void set_gicon()(Gio2.Icon* icon) {
1326 gtk_action_set_gicon(&this, icon);
1329 // VERSION: 2.16
1330 // Sets the icon name on @action
1331 // <icon_name>: the icon name to set
1332 void set_icon_name()(char* icon_name) {
1333 gtk_action_set_icon_name(&this, icon_name);
1336 // VERSION: 2.16
1337 // Sets whether the action is important, this attribute is used
1338 // primarily by toolbar items to decide whether to show a label
1339 // or not.
1340 // <is_important>: %TRUE to make the action important
1341 void set_is_important()(int is_important) {
1342 gtk_action_set_is_important(&this, is_important);
1345 // VERSION: 2.16
1346 // Sets the label of @action.
1347 // <label>: the label text to set
1348 void set_label()(char* label) {
1349 gtk_action_set_label(&this, label);
1352 // VERSION: 2.6
1353 // Sets the ::sensitive property of the action to @sensitive. Note that
1354 // this doesn't necessarily mean effective sensitivity. See
1355 // gtk_action_is_sensitive()
1356 // for that.
1357 // <sensitive>: %TRUE to make the action sensitive
1358 void set_sensitive()(int sensitive) {
1359 gtk_action_set_sensitive(&this, sensitive);
1362 // VERSION: 2.16
1363 // Sets a shorter label text on @action.
1364 // <short_label>: the label text to set
1365 void set_short_label()(char* short_label) {
1366 gtk_action_set_short_label(&this, short_label);
1369 // VERSION: 2.16
1370 // Sets the stock id on @action
1371 // <stock_id>: the stock id
1372 void set_stock_id()(char* stock_id) {
1373 gtk_action_set_stock_id(&this, stock_id);
1376 // VERSION: 2.16
1377 // Sets the tooltip text on @action
1378 // <tooltip>: the tooltip text
1379 void set_tooltip()(char* tooltip) {
1380 gtk_action_set_tooltip(&this, tooltip);
1383 // VERSION: 2.6
1384 // Sets the ::visible property of the action to @visible. Note that
1385 // this doesn't necessarily mean effective visibility. See
1386 // gtk_action_is_visible()
1387 // for that.
1388 // <visible>: %TRUE to make the action visible
1389 void set_visible()(int visible) {
1390 gtk_action_set_visible(&this, visible);
1393 // VERSION: 2.16
1394 // Sets whether @action is visible when horizontal
1395 // <visible_horizontal>: whether the action is visible horizontally
1396 void set_visible_horizontal()(int visible_horizontal) {
1397 gtk_action_set_visible_horizontal(&this, visible_horizontal);
1400 // VERSION: 2.16
1401 // Sets whether @action is visible when vertical
1402 // <visible_vertical>: whether the action is visible vertically
1403 void set_visible_vertical()(int visible_vertical) {
1404 gtk_action_set_visible_vertical(&this, visible_vertical);
1407 // VERSION: 2.16
1408 // Reenable activation signals from the action
1409 void unblock_activate()() {
1410 gtk_action_unblock_activate(&this);
1413 // VERSION: 2.4
1414 // DEPRECATED (v2.16) method: unblock_activate_from - activatables are now responsible for activating the
1415 // Re-enables calls to the gtk_action_activate()
1416 // function by signals on the given proxy widget. This undoes the
1417 // blocking done by gtk_action_block_activate_from().
1418 // This function is intended for use by action implementations.
1419 // action directly so this doesnt apply anymore.
1420 // <proxy>: a proxy widget
1421 void unblock_activate_from()(Widget* proxy) {
1422 gtk_action_unblock_activate_from(&this, proxy);
1425 // VERSION: 2.4
1426 // The "activate" signal is emitted when the action is activated.
1427 extern (C) alias static void function (Action* this_, void* user_data=null) signal_activate;
1429 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1430 return super_.signal_connect!name(cb, data, cf);
1433 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1434 return signal_connect_data!()(&this, cast(char*)"activate",
1435 cast(GObject2.Callback)cb, data, null, cf);
1439 struct ActionClass {
1440 GObject2.ObjectClass parent_class;
1441 extern (C) void function (Action* action) activate;
1442 Type menu_item_type, toolbar_item_type;
1443 // RETURNS: a menu item connected to the action.
1444 extern (C) Widget* function (Action* action) create_menu_item;
1445 // RETURNS: a toolbar item connected to the action.
1446 extern (C) Widget* function (Action* action) create_tool_item;
1447 // <proxy>: the proxy widget
1448 extern (C) void function (Action* action, Widget* proxy) connect_proxy;
1449 // <proxy>: the proxy widget
1450 extern (C) void function (Action* action, Widget* proxy) disconnect_proxy;
1451 // RETURNS: the menu item provided by the
1452 extern (C) Widget* function (Action* action) create_menu;
1453 extern (C) void function () _gtk_reserved2;
1454 extern (C) void function () _gtk_reserved3;
1455 extern (C) void function () _gtk_reserved4;
1458 struct ActionEntry {
1459 char* name, stock_id, label, accelerator, tooltip;
1460 GObject2.Callback callback;
1463 struct ActionGroup /* : GObject.Object */ {
1464 mixin Buildable.__interface__;
1465 alias parent this;
1466 alias parent super_;
1467 alias parent object;
1468 GObject2.Object parent;
1469 private ActionGroupPrivate* private_data;
1472 // VERSION: 2.4
1473 // Creates a new #GtkActionGroup object. The name of the action group
1474 // is used when associating <link linkend="Action-Accel">keybindings</link>
1475 // with the actions.
1476 // RETURNS: the new #GtkActionGroup
1477 // <name>: the name of the action group.
1478 static ActionGroup* /*new*/ new_()(char* name) {
1479 return gtk_action_group_new(name);
1482 // VERSION: 2.4
1483 // Adds an action object to the action group. Note that this function
1484 // does not set up the accel path of the action, which can lead to problems
1485 // if a user tries to modify the accelerator of a menuitem associated with
1486 // the action. Therefore you must either set the accel path yourself with
1487 // gtk_action_set_accel_path(), or use
1488 // <literal>gtk_action_group_add_action_with_accel (..., NULL)</literal>.
1489 // <action>: an action
1490 void add_action()(Action* action) {
1491 gtk_action_group_add_action(&this, action);
1494 // VERSION: 2.4
1495 // Adds an action object to the action group and sets up the accelerator.
1496 // If @accelerator is %NULL, attempts to use the accelerator associated
1497 // with the stock_id of the action.
1498 // Accel paths are set to
1499 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1500 // <action>: the action to add
1501 // <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
1502 void add_action_with_accel()(Action* action, char* accelerator=null) {
1503 gtk_action_group_add_action_with_accel(&this, action, accelerator);
1506 // VERSION: 2.4
1507 // This is a convenience function to create a number of actions and add them
1508 // to the action group.
1509 // The "activate" signals of the actions are connected to the callbacks and
1510 // their accel paths are set to
1511 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1512 // <entries>: an array of action descriptions
1513 // <n_entries>: the number of entries
1514 // <user_data>: data to pass to the action callbacks
1515 void add_actions()(ActionEntry* entries, uint n_entries, void* user_data) {
1516 gtk_action_group_add_actions(&this, entries, n_entries, user_data);
1519 // VERSION: 2.4
1520 // This variant of gtk_action_group_add_actions() adds a #GDestroyNotify
1521 // callback for @user_data.
1522 // <entries>: an array of action descriptions
1523 // <n_entries>: the number of entries
1524 // <user_data>: data to pass to the action callbacks
1525 // <destroy>: destroy notification callback for @user_data
1526 void add_actions_full()(ActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy) {
1527 gtk_action_group_add_actions_full(&this, entries, n_entries, user_data, destroy);
1530 // Unintrospectable method: add_radio_actions() / gtk_action_group_add_radio_actions()
1531 // VERSION: 2.4
1532 // This is a convenience routine to create a group of radio actions and
1533 // add them to the action group.
1534 // The "changed" signal of the first radio action is connected to the
1535 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1536 // <entries>: an array of radio action descriptions
1537 // <n_entries>: the number of entries
1538 // <value>: the value of the action to activate initially, or -1 if no action should be activated
1539 // <on_change>: the callback to connect to the changed signal
1540 // <user_data>: data to pass to the action callbacks
1541 void add_radio_actions()(RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data) {
1542 gtk_action_group_add_radio_actions(&this, entries, n_entries, value, on_change, user_data);
1545 // VERSION: 2.4
1546 // This variant of gtk_action_group_add_radio_actions() adds a
1547 // #GDestroyNotify callback for @user_data.
1548 // <entries>: an array of radio action descriptions
1549 // <n_entries>: the number of entries
1550 // <value>: the value of the action to activate initially, or -1 if no action should be activated
1551 // <on_change>: the callback to connect to the changed signal
1552 // <user_data>: data to pass to the action callbacks
1553 // <destroy>: destroy notification callback for @user_data
1554 void add_radio_actions_full()(RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data, GLib2.DestroyNotify destroy) {
1555 gtk_action_group_add_radio_actions_full(&this, entries, n_entries, value, on_change, user_data, destroy);
1558 // VERSION: 2.4
1559 // This is a convenience function to create a number of toggle actions and add them
1560 // to the action group.
1561 // The "activate" signals of the actions are connected to the callbacks and
1562 // their accel paths are set to
1563 // <literal>&lt;Actions&gt;/<replaceable>group-name</replaceable>/<replaceable>action-name</replaceable></literal>.
1564 // <entries>: an array of toggle action descriptions
1565 // <n_entries>: the number of entries
1566 // <user_data>: data to pass to the action callbacks
1567 void add_toggle_actions()(ToggleActionEntry* entries, uint n_entries, void* user_data) {
1568 gtk_action_group_add_toggle_actions(&this, entries, n_entries, user_data);
1571 // VERSION: 2.4
1572 // This variant of gtk_action_group_add_toggle_actions() adds a
1573 // #GDestroyNotify callback for @user_data.
1574 // <entries>: an array of toggle action descriptions
1575 // <n_entries>: the number of entries
1576 // <user_data>: data to pass to the action callbacks
1577 // <destroy>: destroy notification callback for @user_data
1578 void add_toggle_actions_full()(ToggleActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy) {
1579 gtk_action_group_add_toggle_actions_full(&this, entries, n_entries, user_data, destroy);
1582 // VERSION: 2.4
1583 // Looks up an action in the action group by name.
1584 // RETURNS: the action, or %NULL if no action by that name exists
1585 // <action_name>: the name of the action
1586 Action* get_action()(char* action_name) {
1587 return gtk_action_group_get_action(&this, action_name);
1590 // VERSION: 2.4
1591 // Gets the name of the action group.
1592 // RETURNS: the name of the action group.
1593 char* get_name()() {
1594 return gtk_action_group_get_name(&this);
1597 // VERSION: 2.4
1598 // Returns %TRUE if the group is sensitive. The constituent actions
1599 // can only be logically sensitive (see gtk_action_is_sensitive()) if
1600 // they are sensitive (see gtk_action_get_sensitive()) and their group
1601 // is sensitive.
1602 // RETURNS: %TRUE if the group is sensitive.
1603 int get_sensitive()() {
1604 return gtk_action_group_get_sensitive(&this);
1607 // VERSION: 2.4
1608 // Returns %TRUE if the group is visible. The constituent actions
1609 // can only be logically visible (see gtk_action_is_visible()) if
1610 // they are visible (see gtk_action_get_visible()) and their group
1611 // is visible.
1612 // RETURNS: %TRUE if the group is visible.
1613 int get_visible()() {
1614 return gtk_action_group_get_visible(&this);
1617 // VERSION: 2.4
1618 // Lists the actions in the action group.
1619 // RETURNS: an allocated list of the action objects in the action group
1620 GLib2.List* /*new container*/ list_actions()() {
1621 return gtk_action_group_list_actions(&this);
1624 // VERSION: 2.4
1625 // Removes an action object from the action group.
1626 // <action>: an action
1627 void remove_action()(Action* action) {
1628 gtk_action_group_remove_action(&this, action);
1631 // VERSION: 2.4
1632 // Changes the sensitivity of @action_group
1633 // <sensitive>: new sensitivity
1634 void set_sensitive()(int sensitive) {
1635 gtk_action_group_set_sensitive(&this, sensitive);
1638 // VERSION: 2.4
1639 // Sets a function to be used for translating the @label and @tooltip of
1640 // #GtkActionGroupEntry<!-- -->s added by gtk_action_group_add_actions().
1641 // If you're using gettext(), it is enough to set the translation domain
1642 // with gtk_action_group_set_translation_domain().
1643 // <func>: a #GtkTranslateFunc
1644 // <data>: data to be passed to @func and @notify
1645 // <notify>: a #GDestroyNotify function to be called when @action_group is destroyed and when the translation function is changed again
1646 void set_translate_func()(TranslateFunc func, void* data, GLib2.DestroyNotify notify) {
1647 gtk_action_group_set_translate_func(&this, func, data, notify);
1650 // VERSION: 2.4
1651 // Sets the translation domain and uses g_dgettext() for translating the
1652 // gtk_action_group_add_actions().
1653 // If you're not using gettext() for localization, see
1654 // gtk_action_group_set_translate_func().
1655 // <domain>: the translation domain to use for g_dgettext() calls
1656 void set_translation_domain()(char* domain) {
1657 gtk_action_group_set_translation_domain(&this, domain);
1660 // VERSION: 2.4
1661 // Changes the visible of @action_group.
1662 // <visible>: new visiblity
1663 void set_visible()(int visible) {
1664 gtk_action_group_set_visible(&this, visible);
1667 // VERSION: 2.6
1668 // Translates a string using the specified translate_func(). This
1669 // is mainly intended for language bindings.
1670 // RETURNS: the translation of @string
1671 // <string>: a string
1672 char* translate_string()(char* string_) {
1673 return gtk_action_group_translate_string(&this, string_);
1676 // VERSION: 2.4
1677 // The ::connect-proxy signal is emitted after connecting a proxy to
1678 // an action in the group. Note that the proxy may have been connected
1679 // to a different action before.
1680 // This is intended for simple customizations for which a custom action
1681 // class would be too clumsy, e.g. showing tooltips for menuitems in the
1682 // statusbar.
1683 // #GtkUIManager proxies the signal and provides global notification
1684 // just before any action is connected to a proxy, which is probably more
1685 // convenient to use.
1686 // <action>: the action
1687 // <proxy>: the proxy
1688 extern (C) alias static void function (ActionGroup* this_, Action* action, Widget* proxy, void* user_data=null) signal_connect_proxy;
1690 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1691 return super_.signal_connect!name(cb, data, cf);
1694 ulong signal_connect(string name:"connect-proxy", CB:signal_connect_proxy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1695 return signal_connect_data!()(&this, cast(char*)"connect-proxy",
1696 cast(GObject2.Callback)cb, data, null, cf);
1699 // VERSION: 2.4
1700 // The ::disconnect-proxy signal is emitted after disconnecting a proxy
1701 // from an action in the group.
1702 // #GtkUIManager proxies the signal and provides global notification
1703 // just before any action is connected to a proxy, which is probably more
1704 // convenient to use.
1705 // <action>: the action
1706 // <proxy>: the proxy
1707 extern (C) alias static void function (ActionGroup* this_, Action* action, Widget* proxy, void* user_data=null) signal_disconnect_proxy;
1708 ulong signal_connect(string name:"disconnect-proxy", CB:signal_disconnect_proxy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1709 return signal_connect_data!()(&this, cast(char*)"disconnect-proxy",
1710 cast(GObject2.Callback)cb, data, null, cf);
1713 // VERSION: 2.4
1714 // The ::post-activate signal is emitted just after the @action in the
1715 // This is intended for #GtkUIManager to proxy the signal and provide global
1716 // notification just after any action is activated.
1717 // <action>: the action
1718 extern (C) alias static void function (ActionGroup* this_, Action* action, void* user_data=null) signal_post_activate;
1719 ulong signal_connect(string name:"post-activate", CB:signal_post_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1720 return signal_connect_data!()(&this, cast(char*)"post-activate",
1721 cast(GObject2.Callback)cb, data, null, cf);
1724 // VERSION: 2.4
1725 // The ::pre-activate signal is emitted just before the @action in the
1726 // This is intended for #GtkUIManager to proxy the signal and provide global
1727 // notification just before any action is activated.
1728 // <action>: the action
1729 extern (C) alias static void function (ActionGroup* this_, Action* action, void* user_data=null) signal_pre_activate;
1730 ulong signal_connect(string name:"pre-activate", CB:signal_pre_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1731 return signal_connect_data!()(&this, cast(char*)"pre-activate",
1732 cast(GObject2.Callback)cb, data, null, cf);
1736 struct ActionGroupClass {
1737 GObject2.ObjectClass parent_class;
1739 // RETURNS: the action, or %NULL if no action by that name exists
1740 // <action_name>: the name of the action
1741 extern (C) Action* function (ActionGroup* action_group, char* action_name) get_action;
1742 extern (C) void function () _gtk_reserved1;
1743 extern (C) void function () _gtk_reserved2;
1744 extern (C) void function () _gtk_reserved3;
1745 extern (C) void function () _gtk_reserved4;
1748 struct ActionGroupPrivate {
1751 struct ActionPrivate {
1755 // Activatable widgets can be connected to a #GtkAction and reflects
1756 // the state of its action. A #GtkActivatable can also provide feedback
1757 // through its action, as they are responsible for activating their
1758 // related actions.
1759 // <refsect2>
1760 // <title>Implementing GtkActivatable</title>
1761 // <para>
1762 // When extending a class that is already #GtkActivatable; it is only
1763 // necessary to implement the #GtkActivatable->sync_action_properties()
1764 // and #GtkActivatable->update() methods and chain up to the parent
1765 // implementation, however when introducing
1766 // a new #GtkActivatable class; the #GtkActivatable:related-action and
1767 // #GtkActivatable:use-action-appearance properties need to be handled by
1768 // the implementor. Handling these properties is mostly a matter of installing
1769 // the action pointer and boolean flag on your instance, and calling
1770 // gtk_activatable_do_set_related_action() and
1771 // gtk_activatable_sync_action_properties() at the appropriate times.
1772 // </para>
1773 // <example>
1774 // <title>A class fragment implementing #GtkActivatable</title>
1775 // <programlisting><![CDATA[
1776 // enum {
1777 // ...
1778 // PROP_ACTIVATABLE_RELATED_ACTION,
1779 // PROP_ACTIVATABLE_USE_ACTION_APPEARANCE
1780 // }
1781 // struct _FooBarPrivate
1782 // {
1783 // ...
1784 // GtkAction *action;
1785 // gboolean use_action_appearance;
1786 // };
1787 // ...
1788 // static void foo_bar_activatable_interface_init (GtkActivatableIface *iface);
1789 // static void foo_bar_activatable_update (GtkActivatable *activatable,
1790 // GtkAction *action,
1791 // const gchar *property_name);
1792 // static void foo_bar_activatable_sync_action_properties (GtkActivatable *activatable,
1793 // GtkAction *action);
1794 // ...
1795 // static void
1796 // foo_bar_class_init (FooBarClass *klass)
1797 // {
1798 // ...
1799 // g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action");
1800 // g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE, "use-action-appearance");
1801 // ...
1802 // }
1803 // static void
1804 // foo_bar_activatable_interface_init (GtkActivatableIface *iface)
1805 // {
1806 // iface->update = foo_bar_activatable_update;
1807 // iface->sync_action_properties = foo_bar_activatable_sync_action_properties;
1808 // }
1809 // ... Break the reference using gtk_activatable_do_set_related_action()...
1810 // static void
1811 // foo_bar_dispose (GObject *object)
1812 // {
1813 // FooBar *bar = FOO_BAR (object);
1814 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1815 // ...
1816 // if (priv->action)
1817 // {
1818 // gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), NULL);
1819 // priv->action = NULL;
1820 // }
1821 // G_OBJECT_CLASS (foo_bar_parent_class)->dispose (object);
1822 // }
1823 // ... Handle the "related-action" and "use-action-appearance" properties ...
1824 // static void
1825 // foo_bar_set_property (GObject *object,
1826 // guint prop_id,
1827 // const GValue *value,
1828 // GParamSpec *pspec)
1829 // {
1830 // FooBar *bar = FOO_BAR (object);
1831 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1832 // switch (prop_id)
1833 // {
1834 // ...
1835 // case PROP_ACTIVATABLE_RELATED_ACTION:
1836 // foo_bar_set_related_action (bar, g_value_get_object (value));
1837 // break;
1838 // case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
1839 // foo_bar_set_use_action_appearance (bar, g_value_get_boolean (value));
1840 // break;
1841 // default:
1842 // G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1843 // break;
1844 // }
1845 // }
1846 // static void
1847 // foo_bar_get_property (GObject *object,
1848 // guint prop_id,
1849 // GValue *value,
1850 // GParamSpec *pspec)
1851 // {
1852 // FooBar *bar = FOO_BAR (object);
1853 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1854 // switch (prop_id)
1855 // {
1856 // ...
1857 // case PROP_ACTIVATABLE_RELATED_ACTION:
1858 // g_value_set_object (value, priv->action);
1859 // break;
1860 // case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
1861 // g_value_set_boolean (value, priv->use_action_appearance);
1862 // break;
1863 // default:
1864 // G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
1865 // break;
1866 // }
1867 // }
1868 // static void
1869 // foo_bar_set_use_action_appearance (FooBar *bar,
1870 // gboolean use_appearance)
1871 // {
1872 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1873 // if (priv->use_action_appearance != use_appearance)
1874 // {
1875 // priv->use_action_appearance = use_appearance;
1876 // gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (bar), priv->action);
1877 // }
1878 // }
1879 // ... call gtk_activatable_do_set_related_action() and then assign the action pointer,
1880 // no need to reference the action here since gtk_activatable_do_set_related_action() already
1881 // holds a reference here for you...
1882 // static void
1883 // foo_bar_set_related_action (FooBar *bar,
1884 // GtkAction *action)
1885 // {
1886 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar);
1887 // if (priv->action == action)
1888 // return;
1889 // gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), action);
1890 // priv->action = action;
1891 // }
1892 // ... Selectively reset and update activatable depending on the use-action-appearance property ...
1893 // static void
1894 // gtk_button_activatable_sync_action_properties (GtkActivatable *activatable,
1895 // GtkAction *action)
1896 // {
1897 // GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable);
1898 // if (!action)
1899 // return;
1900 // if (gtk_action_is_visible (action))
1901 // gtk_widget_show (GTK_WIDGET (activatable));
1902 // else
1903 // gtk_widget_hide (GTK_WIDGET (activatable));
1904 // gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
1905 // ...
1906 // if (priv->use_action_appearance)
1907 // {
1908 // if (gtk_action_get_stock_id (action))
1909 // foo_bar_set_stock (button, gtk_action_get_stock_id (action));
1910 // else if (gtk_action_get_label (action))
1911 // foo_bar_set_label (button, gtk_action_get_label (action));
1912 // ...
1913 // }
1914 // }
1915 // static void
1916 // foo_bar_activatable_update (GtkActivatable *activatable,
1917 // GtkAction *action,
1918 // const gchar *property_name)
1919 // {
1920 // FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (activatable);
1921 // if (strcmp (property_name, "visible") == 0)
1922 // {
1923 // if (gtk_action_is_visible (action))
1924 // gtk_widget_show (GTK_WIDGET (activatable));
1925 // else
1926 // gtk_widget_hide (GTK_WIDGET (activatable));
1927 // }
1928 // else if (strcmp (property_name, "sensitive") == 0)
1929 // gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
1930 // ...
1931 // if (!priv->use_action_appearance)
1932 // return;
1933 // if (strcmp (property_name, "stock-id") == 0)
1934 // foo_bar_set_stock (button, gtk_action_get_stock_id (action));
1935 // else if (strcmp (property_name, "label") == 0)
1936 // foo_bar_set_label (button, gtk_action_get_label (action));
1937 // ...
1938 // }]]></programlisting>
1939 // </example>
1940 // </refsect2>
1941 struct Activatable /* Interface */ {
1942 mixin template __interface__() {
1943 // VERSION: 2.16
1944 // This is a utility function for #GtkActivatable implementors.
1945 // When implementing #GtkActivatable you must call this when
1946 // handling changes of the #GtkActivatable:related-action, and
1947 // you must also use this to break references in #GObject->dispose().
1948 // This function adds a reference to the currently set related
1949 // action for you, it also makes sure the #GtkActivatable->update()
1950 // method is called when the related #GtkAction properties change
1951 // and registers to the action's proxy list.
1952 // <note><para>Be careful to call this before setting the local
1953 // copy of the #GtkAction property, since this function uses
1954 // gtk_activatable_get_action() to retrieve the previous action</para></note>
1955 // <action>: the #GtkAction to set
1956 void do_set_related_action()(Action* action) {
1957 gtk_activatable_do_set_related_action(cast(Activatable*)&this, action);
1960 // VERSION: 2.16
1961 // Gets the related #GtkAction for @activatable.
1962 // RETURNS: the related #GtkAction if one is set.
1963 Action* get_related_action()() {
1964 return gtk_activatable_get_related_action(cast(Activatable*)&this);
1967 // VERSION: 2.16
1968 // Gets whether this activatable should reset its layout
1969 // and appearance when setting the related action or when
1970 // the action changes appearance.
1971 // RETURNS: whether @activatable uses its actions appearance.
1972 int get_use_action_appearance()() {
1973 return gtk_activatable_get_use_action_appearance(cast(Activatable*)&this);
1976 // VERSION: 2.16
1977 // Sets the related action on the @activatable object.
1978 // <note><para>#GtkActivatable implementors need to handle the #GtkActivatable:related-action
1979 // property and call gtk_activatable_do_set_related_action() when it changes.</para></note>
1980 // <action>: the #GtkAction to set
1981 void set_related_action()(Action* action) {
1982 gtk_activatable_set_related_action(cast(Activatable*)&this, action);
1985 // VERSION: 2.16
1986 // Sets whether this activatable should reset its layout and appearance
1987 // when setting the related action or when the action changes appearance
1988 // <note><para>#GtkActivatable implementors need to handle the
1989 // #GtkActivatable:use-action-appearance property and call
1990 // gtk_activatable_sync_action_properties() to update @activatable
1991 // if needed.</para></note>
1992 // <use_appearance>: whether to use the actions appearance
1993 void set_use_action_appearance()(int use_appearance) {
1994 gtk_activatable_set_use_action_appearance(cast(Activatable*)&this, use_appearance);
1997 // VERSION: 2.16
1998 // This is called to update the activatable completely, this is called
1999 // internally when the #GtkActivatable::related-action property is set
2000 // or unset and by the implementing class when
2001 // #GtkActivatable::use-action-appearance changes.
2002 // <action>: the related #GtkAction or %NULL
2003 void sync_action_properties()(Action* action=null) {
2004 gtk_activatable_sync_action_properties(cast(Activatable*)&this, action);
2007 mixin __interface__;
2010 struct ActivatableIface /* Version 2.16 */ {
2011 GObject2.TypeInterface g_iface;
2012 extern (C) void function (Activatable* activatable, Action* action, char* property_name) update;
2013 // <action>: the related #GtkAction or %NULL
2014 extern (C) void function (Activatable* activatable, Action* action=null) sync_action_properties;
2017 struct Adjustment /* : Object */ {
2018 alias parent_instance this;
2019 alias parent_instance super_;
2020 alias parent_instance object;
2021 Object parent_instance;
2022 double lower, upper, value, step_increment, page_increment, page_size;
2024 static Adjustment* new_()(double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
2025 return gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size);
2027 void changed()() {
2028 gtk_adjustment_changed(&this);
2030 void clamp_page()(double lower, double upper) {
2031 gtk_adjustment_clamp_page(&this, lower, upper);
2034 // VERSION: 2.14
2035 // Sets all properties of the adjustment at once.
2036 // Use this function to avoid multiple emissions of the "changed"
2037 // signal. See gtk_adjustment_set_lower() for an alternative way
2038 // of compressing multiple emissions of "changed" into one.
2039 // <value>: the new value
2040 // <lower>: the new minimum value
2041 // <upper>: the new maximum value
2042 // <step_increment>: the new step increment
2043 // <page_increment>: the new page increment
2044 // <page_size>: the new page size
2045 void configure()(double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
2046 gtk_adjustment_configure(&this, value, lower, upper, step_increment, page_increment, page_size);
2049 // VERSION: 2.14
2050 // Retrieves the minimum value of the adjustment.
2051 // RETURNS: The current minimum value of the adjustment.
2052 double get_lower()() {
2053 return gtk_adjustment_get_lower(&this);
2056 // VERSION: 2.14
2057 // Retrieves the page increment of the adjustment.
2058 // RETURNS: The current page increment of the adjustment.
2059 double get_page_increment()() {
2060 return gtk_adjustment_get_page_increment(&this);
2063 // VERSION: 2.14
2064 // Retrieves the page size of the adjustment.
2065 // RETURNS: The current page size of the adjustment.
2066 double get_page_size()() {
2067 return gtk_adjustment_get_page_size(&this);
2070 // VERSION: 2.14
2071 // Retrieves the step increment of the adjustment.
2072 // RETURNS: The current step increment of the adjustment.
2073 double get_step_increment()() {
2074 return gtk_adjustment_get_step_increment(&this);
2077 // VERSION: 2.14
2078 // Retrieves the maximum value of the adjustment.
2079 // RETURNS: The current maximum value of the adjustment.
2080 double get_upper()() {
2081 return gtk_adjustment_get_upper(&this);
2084 // Gets the current value of the adjustment. See
2085 // gtk_adjustment_set_value ().
2086 // RETURNS: The current value of the adjustment.
2087 double get_value()() {
2088 return gtk_adjustment_get_value(&this);
2091 // VERSION: 2.14
2092 // Sets the minimum value of the adjustment.
2093 // When setting multiple adjustment properties via their individual
2094 // setters, multiple "changed" signals will be emitted. However, since
2095 // the emission of the "changed" signal is tied to the emission of the
2096 // "GObject::notify" signals of the changed properties, it's possible
2097 // to compress the "changed" signals into one by calling
2098 // g_object_freeze_notify() and g_object_thaw_notify() around the
2099 // calls to the individual setters.
2100 // Alternatively, using a single g_object_set() for all the properties
2101 // to change, or using gtk_adjustment_configure() has the same effect
2102 // of compressing "changed" emissions.
2103 // <lower>: the new minimum value
2104 void set_lower()(double lower) {
2105 gtk_adjustment_set_lower(&this, lower);
2108 // VERSION: 2.14
2109 // Sets the page increment of the adjustment.
2110 // See gtk_adjustment_set_lower() about how to compress multiple
2111 // emissions of the "changed" signal when setting multiple adjustment
2112 // properties.
2113 // <page_increment>: the new page increment
2114 void set_page_increment()(double page_increment) {
2115 gtk_adjustment_set_page_increment(&this, page_increment);
2118 // VERSION: 2.14
2119 // Sets the page size of the adjustment.
2120 // See gtk_adjustment_set_lower() about how to compress multiple
2121 // emissions of the "changed" signal when setting multiple adjustment
2122 // properties.
2123 // <page_size>: the new page size
2124 void set_page_size()(double page_size) {
2125 gtk_adjustment_set_page_size(&this, page_size);
2128 // VERSION: 2.14
2129 // Sets the step increment of the adjustment.
2130 // See gtk_adjustment_set_lower() about how to compress multiple
2131 // emissions of the "changed" signal when setting multiple adjustment
2132 // properties.
2133 // <step_increment>: the new step increment
2134 void set_step_increment()(double step_increment) {
2135 gtk_adjustment_set_step_increment(&this, step_increment);
2138 // VERSION: 2.14
2139 // Sets the maximum value of the adjustment.
2140 // Note that values will be restricted by
2141 // <literal>upper - page-size</literal> if the page-size
2142 // property is nonzero.
2143 // See gtk_adjustment_set_lower() about how to compress multiple
2144 // emissions of the "changed" signal when setting multiple adjustment
2145 // properties.
2146 // <upper>: the new maximum value
2147 void set_upper()(double upper) {
2148 gtk_adjustment_set_upper(&this, upper);
2150 void set_value()(double value) {
2151 gtk_adjustment_set_value(&this, value);
2153 void value_changed()() {
2154 gtk_adjustment_value_changed(&this);
2156 extern (C) alias static void function (Adjustment* this_, void* user_data=null) signal_changed;
2158 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2159 return super_.signal_connect!name(cb, data, cf);
2162 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2163 return signal_connect_data!()(&this, cast(char*)"changed",
2164 cast(GObject2.Callback)cb, data, null, cf);
2166 extern (C) alias static void function (Adjustment* this_, void* user_data=null) signal_value_changed;
2167 ulong signal_connect(string name:"value-changed", CB:signal_value_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2168 return signal_connect_data!()(&this, cast(char*)"value-changed",
2169 cast(GObject2.Callback)cb, data, null, cf);
2173 struct AdjustmentClass {
2174 ObjectClass parent_class;
2175 extern (C) void function (Adjustment* adjustment) changed;
2176 extern (C) void function (Adjustment* adjustment) value_changed;
2177 extern (C) void function () _gtk_reserved1;
2178 extern (C) void function () _gtk_reserved2;
2179 extern (C) void function () _gtk_reserved3;
2180 extern (C) void function () _gtk_reserved4;
2184 // The #GtkAlignment widget controls the alignment and size of its child widget.
2185 // The scale settings are used to specify how much the child widget should
2186 // expand to fill the space allocated to the #GtkAlignment.
2187 // The values can range from 0 (meaning the child doesn't expand at all) to
2188 // 1 (meaning the child expands to fill all of the available space).
2189 // The align settings are used to place the child widget within the available
2190 // area. The values range from 0 (top or left) to 1 (bottom or right).
2191 // Of course, if the scale settings are both set to 1, the alignment settings
2192 // have no effect.
2193 struct Alignment /* : Bin */ {
2194 mixin Atk.ImplementorIface.__interface__;
2195 mixin Buildable.__interface__;
2196 alias bin this;
2197 alias bin super_;
2198 Bin bin;
2199 float xalign, yalign, xscale, yscale;
2202 // Creates a new #GtkAlignment.
2203 // RETURNS: the new #GtkAlignment.
2204 // <xalign>: the horizontal alignment of the child widget, from 0 (left) to 1 (right).
2205 // <yalign>: the vertical alignment of the child widget, from 0 (top) to 1 (bottom).
2206 // <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.
2207 // <yscale>: the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to @xscale.
2208 static Alignment* new_()(float xalign, float yalign, float xscale, float yscale) {
2209 return gtk_alignment_new(xalign, yalign, xscale, yscale);
2212 // VERSION: 2.4
2213 // Gets the padding on the different sides of the widget.
2214 // See gtk_alignment_set_padding ().
2215 // <padding_top>: location to store the padding for the top of the widget, or %NULL
2216 // <padding_bottom>: location to store the padding for the bottom of the widget, or %NULL
2217 // <padding_left>: location to store the padding for the left of the widget, or %NULL
2218 // <padding_right>: location to store the padding for the right of the widget, or %NULL
2219 void get_padding()(/*out*/ uint* padding_top=null, /*out*/ uint* padding_bottom=null, /*out*/ uint* padding_left=null, /*out*/ uint* padding_right=null) {
2220 gtk_alignment_get_padding(&this, padding_top, padding_bottom, padding_left, padding_right);
2223 // Sets the #GtkAlignment values.
2224 // <xalign>: the horizontal alignment of the child widget, from 0 (left) to 1 (right).
2225 // <yalign>: the vertical alignment of the child widget, from 0 (top) to 1 (bottom).
2226 // <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.
2227 // <yscale>: the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to @xscale.
2228 void set()(float xalign, float yalign, float xscale, float yscale) {
2229 gtk_alignment_set(&this, xalign, yalign, xscale, yscale);
2232 // VERSION: 2.4
2233 // Sets the padding on the different sides of the widget.
2234 // The padding adds blank space to the sides of the widget. For instance,
2235 // this can be used to indent the child widget towards the right by adding
2236 // padding on the left.
2237 // <padding_top>: the padding at the top of the widget
2238 // <padding_bottom>: the padding at the bottom of the widget
2239 // <padding_left>: the padding at the left of the widget
2240 // <padding_right>: the padding at the right of the widget.
2241 void set_padding()(uint padding_top, uint padding_bottom, uint padding_left, uint padding_right) {
2242 gtk_alignment_set_padding(&this, padding_top, padding_bottom, padding_left, padding_right);
2246 struct AlignmentClass {
2247 BinClass parent_class;
2250 struct AlignmentPrivate {
2253 enum AnchorType {
2254 CENTER = 0,
2255 NORTH = 1,
2256 NORTH_WEST = 2,
2257 NORTH_EAST = 3,
2258 SOUTH = 4,
2259 SOUTH_WEST = 5,
2260 SOUTH_EAST = 6,
2261 WEST = 7,
2262 EAST = 8,
2263 N = 1,
2264 NW = 2,
2265 NE = 3,
2266 S = 4,
2267 SW = 5,
2268 SE = 6,
2269 W = 7,
2270 E = 8
2272 struct Arg {
2273 Type type;
2274 char* name;
2276 union d {
2277 char char_data;
2278 ubyte uchar_data;
2279 int bool_data;
2280 int int_data;
2281 uint uint_data;
2282 c_long long_data;
2283 c_ulong ulong_data;
2284 float float_data;
2285 double double_data;
2286 char* string_data;
2287 Object* object_data;
2288 void* pointer_data;
2290 struct signal_data {
2291 GObject2.Callback f;
2292 void* d;
2297 enum ArgFlags {
2298 READABLE = 1,
2299 WRITABLE = 2,
2300 CONSTRUCT = 4,
2301 CONSTRUCT_ONLY = 8,
2302 CHILD_ARG = 16
2305 // GtkArrow should be used to draw simple arrows that need to point in
2306 // one of the four cardinal directions (up, down, left, or right). The
2307 // style of the arrow can be one of shadow in, shadow out, etched in, or
2308 // etched out. Note that these directions and style types may be
2309 // ammended in versions of GTK+ to come.
2310 // GtkArrow will fill any space alloted to it, but since it is inherited
2311 // from #GtkMisc, it can be padded and/or aligned, to fill exactly the
2312 // space the programmer desires.
2313 // Arrows are created with a call to gtk_arrow_new(). The direction or
2314 // style of an arrow can be changed after creation by using gtk_arrow_set().
2315 struct Arrow /* : Misc */ {
2316 mixin Atk.ImplementorIface.__interface__;
2317 mixin Buildable.__interface__;
2318 alias misc this;
2319 alias misc super_;
2320 Misc misc;
2321 short arrow_type, shadow_type;
2324 // Creates a new #GtkArrow widget.
2325 // RETURNS: the new #GtkArrow widget.
2326 // <arrow_type>: a valid #GtkArrowType.
2327 // <shadow_type>: a valid #GtkShadowType.
2328 static Arrow* new_()(ArrowType arrow_type, ShadowType shadow_type) {
2329 return gtk_arrow_new(arrow_type, shadow_type);
2332 // Sets the direction and style of the #GtkArrow, @arrow.
2333 // <arrow_type>: a valid #GtkArrowType.
2334 // <shadow_type>: a valid #GtkShadowType.
2335 void set()(ArrowType arrow_type, ShadowType shadow_type) {
2336 gtk_arrow_set(&this, arrow_type, shadow_type);
2340 struct ArrowClass {
2341 MiscClass parent_class;
2344 enum ArrowPlacement {
2345 BOTH = 0,
2346 START = 1,
2347 END = 2
2349 enum ArrowType {
2350 UP = 0,
2351 DOWN = 1,
2352 LEFT = 2,
2353 RIGHT = 3,
2354 NONE = 4
2357 // The #GtkAspectFrame is useful when you want
2358 // pack a widget so that it can resize but always retains
2359 // the same aspect ratio. For instance, one might be
2360 // drawing a small preview of a larger image. #GtkAspectFrame
2361 // derives from #GtkFrame, so it can draw a label and
2362 // a frame around the child. The frame will be
2363 // "shrink-wrapped" to the size of the child.
2364 struct AspectFrame /* : Frame */ {
2365 mixin Atk.ImplementorIface.__interface__;
2366 mixin Buildable.__interface__;
2367 alias frame this;
2368 alias frame super_;
2369 Frame frame;
2370 float xalign, yalign, ratio;
2371 int obey_child;
2372 Allocation center_allocation;
2375 // Create a new #GtkAspectFrame.
2376 // RETURNS: the new #GtkAspectFrame.
2377 // <label>: Label text.
2378 // <xalign>: Horizontal alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2379 // <yalign>: Vertical alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2380 // <ratio>: The desired aspect ratio.
2381 // <obey_child>: If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requistion of the child.
2382 static AspectFrame* new_()(char* label, float xalign, float yalign, float ratio, int obey_child) {
2383 return gtk_aspect_frame_new(label, xalign, yalign, ratio, obey_child);
2386 // Set parameters for an existing #GtkAspectFrame.
2387 // <xalign>: Horizontal alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2388 // <yalign>: Vertical alignment of the child within the allocation of the #GtkAspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned)
2389 // <ratio>: The desired aspect ratio.
2390 // <obey_child>: If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requistion of the child.
2391 void set()(float xalign, float yalign, float ratio, int obey_child) {
2392 gtk_aspect_frame_set(&this, xalign, yalign, ratio, obey_child);
2396 struct AspectFrameClass {
2397 FrameClass parent_class;
2401 // A #GtkAssistant is a widget used to represent a generally complex
2402 // operation splitted in several steps, guiding the user through its pages
2403 // and controlling the page flow to collect the necessary data.
2404 // <refsect2 id="GtkAssistant-BUILDER-UI">
2405 // <title>GtkAssistant as GtkBuildable</title>
2406 // <para>
2407 // The GtkAssistant implementation of the GtkBuildable interface exposes the
2408 // To add pages to an assistant in GtkBuilder, simply add it as a
2409 // &lt;child&gt; to the GtkAssistant object, and set its child properties
2410 // as necessary.
2411 // </para>
2412 // </refsect2>
2413 struct Assistant /* : Window */ {
2414 mixin Atk.ImplementorIface.__interface__;
2415 mixin Buildable.__interface__;
2416 alias parent this;
2417 alias parent super_;
2418 alias parent window;
2419 Window parent;
2420 Widget* cancel_, forward, back, apply_, close_, last;
2421 private AssistantPrivate* priv;
2424 // VERSION: 2.10
2425 // Creates a new #GtkAssistant.
2426 // RETURNS: a newly created #GtkAssistant
2427 static Assistant* new_()() {
2428 return gtk_assistant_new();
2431 // VERSION: 2.10
2432 // Adds a widget to the action area of a #GtkAssistant.
2433 // <child>: a #GtkWidget
2434 void add_action_widget()(Widget* child) {
2435 gtk_assistant_add_action_widget(&this, child);
2438 // VERSION: 2.10
2439 // Appends a page to the @assistant.
2440 // RETURNS: the index (starting at 0) of the inserted page
2441 // <page>: a #GtkWidget
2442 int append_page()(Widget* page) {
2443 return gtk_assistant_append_page(&this, page);
2446 // VERSION: 2.22
2447 // Erases the visited page history so the back button is not
2448 // shown on the current page, and removes the cancel button
2449 // from subsequent pages.
2450 // Use this when the information provided up to the current
2451 // page is hereafter deemed permanent and cannot be modified
2452 // or undone. For example, showing a progress page to track
2453 // a long-running, unreversible operation after the user has
2454 // clicked apply on a confirmation page.
2455 void commit()() {
2456 gtk_assistant_commit(&this);
2459 // VERSION: 2.10
2460 // Returns the page number of the current page
2461 // the @assistant, if the @assistant has no pages, -1 will be returned
2462 // RETURNS: The index (starting from 0) of the current page in
2463 int get_current_page()() {
2464 return gtk_assistant_get_current_page(&this);
2467 // VERSION: 2.10
2468 // Returns the number of pages in the @assistant
2469 // RETURNS: The number of pages in the @assistant.
2470 int get_n_pages()() {
2471 return gtk_assistant_get_n_pages(&this);
2474 // VERSION: 2.10
2475 // Returns the child widget contained in page number @page_num.
2476 // if @page_num is out of bounds.
2477 // RETURNS: The child widget, or %NULL
2478 // <page_num>: The index of a page in the @assistant, or -1 to get the last page;
2479 Widget* get_nth_page()(int page_num) {
2480 return gtk_assistant_get_nth_page(&this, page_num);
2483 // VERSION: 2.10
2484 // Gets whether @page is complete.
2485 // RETURNS: %TRUE if @page is complete.
2486 // <page>: a page of @assistant
2487 int get_page_complete()(Widget* page) {
2488 return gtk_assistant_get_page_complete(&this, page);
2491 // VERSION: 2.10
2492 // Gets the header image for @page.
2493 // if there's no header image for the page.
2494 // RETURNS: the header image for @page, or %NULL
2495 // <page>: a page of @assistant
2496 GdkPixbuf2.Pixbuf* get_page_header_image()(Widget* page) {
2497 return gtk_assistant_get_page_header_image(&this, page);
2500 // VERSION: 2.10
2501 // Gets the header image for @page.
2502 // if there's no side image for the page.
2503 // RETURNS: the side image for @page, or %NULL
2504 // <page>: a page of @assistant
2505 GdkPixbuf2.Pixbuf* get_page_side_image()(Widget* page) {
2506 return gtk_assistant_get_page_side_image(&this, page);
2509 // VERSION: 2.10
2510 // Gets the title for @page.
2511 // RETURNS: the title for @page.
2512 // <page>: a page of @assistant
2513 char* get_page_title()(Widget* page) {
2514 return gtk_assistant_get_page_title(&this, page);
2517 // VERSION: 2.10
2518 // Gets the page type of @page.
2519 // RETURNS: the page type of @page.
2520 // <page>: a page of @assistant
2521 AssistantPageType get_page_type()(Widget* page) {
2522 return gtk_assistant_get_page_type(&this, page);
2525 // VERSION: 2.10
2526 // Inserts a page in the @assistant at a given position.
2527 // RETURNS: the index (starting from 0) of the inserted page
2528 // <page>: a #GtkWidget
2529 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page to the @assistant
2530 int insert_page()(Widget* page, int position) {
2531 return gtk_assistant_insert_page(&this, page, position);
2534 // VERSION: 2.10
2535 // Prepends a page to the @assistant.
2536 // RETURNS: the index (starting at 0) of the inserted page
2537 // <page>: a #GtkWidget
2538 int prepend_page()(Widget* page) {
2539 return gtk_assistant_prepend_page(&this, page);
2542 // VERSION: 2.10
2543 // Removes a widget from the action area of a #GtkAssistant.
2544 // <child>: a #GtkWidget
2545 void remove_action_widget()(Widget* child) {
2546 gtk_assistant_remove_action_widget(&this, child);
2549 // VERSION: 2.10
2550 // Switches the page to @page_num. Note that this will only be necessary
2551 // in custom buttons, as the @assistant flow can be set with
2552 // gtk_assistant_set_forward_page_func().
2553 // <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.
2554 void set_current_page()(int page_num) {
2555 gtk_assistant_set_current_page(&this, page_num);
2558 // VERSION: 2.10
2559 // Sets the page forwarding function to be @page_func, this function will
2560 // be used to determine what will be the next page when the user presses
2561 // the forward button. Setting @page_func to %NULL will make the assistant
2562 // to use the default forward function, which just goes to the next visible
2563 // page.
2564 // <page_func>: the #GtkAssistantPageFunc, or %NULL to use the default one
2565 // <data>: user data for @page_func
2566 // <destroy>: destroy notifier for @data
2567 void set_forward_page_func()(AssistantPageFunc page_func, void* data, GLib2.DestroyNotify destroy) {
2568 gtk_assistant_set_forward_page_func(&this, page_func, data, destroy);
2571 // VERSION: 2.10
2572 // Sets whether @page contents are complete. This will make
2573 // <page>: a page of @assistant
2574 // <complete>: the completeness status of the page
2575 void set_page_complete()(Widget* page, int complete) {
2576 gtk_assistant_set_page_complete(&this, page, complete);
2579 // VERSION: 2.10
2580 // Sets a header image for @page. This image is displayed in the header
2581 // area of the assistant when @page is the current page.
2582 // <page>: a page of @assistant
2583 // <pixbuf>: the new header image @page
2584 void set_page_header_image()(Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null) {
2585 gtk_assistant_set_page_header_image(&this, page, pixbuf);
2588 // VERSION: 2.10
2589 // Sets a header image for @page. This image is displayed in the side
2590 // area of the assistant when @page is the current page.
2591 // <page>: a page of @assistant
2592 // <pixbuf>: the new header image @page
2593 void set_page_side_image()(Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null) {
2594 gtk_assistant_set_page_side_image(&this, page, pixbuf);
2597 // VERSION: 2.10
2598 // Sets a title for @page. The title is displayed in the header
2599 // area of the assistant when @page is the current page.
2600 // <page>: a page of @assistant
2601 // <title>: the new title for @page
2602 void set_page_title()(Widget* page, char* title) {
2603 gtk_assistant_set_page_title(&this, page, title);
2606 // VERSION: 2.10
2607 // Sets the page type for @page. The page type determines the page
2608 // behavior in the @assistant.
2609 // <page>: a page of @assistant
2610 // <type>: the new type for @page
2611 void set_page_type()(Widget* page, AssistantPageType type) {
2612 gtk_assistant_set_page_type(&this, page, type);
2615 // VERSION: 2.10
2616 // Forces @assistant to recompute the buttons state.
2617 // GTK+ automatically takes care of this in most situations,
2618 // e.g. when the user goes to a different page, or when the
2619 // visibility or completeness of a page changes.
2620 // One situation where it can be necessary to call this
2621 // function is when changing a value on the current page
2622 // affects the future page flow of the assistant.
2623 void update_buttons_state()() {
2624 gtk_assistant_update_buttons_state(&this);
2627 // VERSION: 2.10
2628 // The ::apply signal is emitted when the apply button is clicked. The default
2629 // behavior of the #GtkAssistant is to switch to the page after the current
2630 // page, unless the current page is the last one.
2631 // A handler for the ::apply signal should carry out the actions for which
2632 // the wizard has collected data. If the action takes a long time to complete,
2633 // you might consider putting a page of type %GTK_ASSISTANT_PAGE_PROGRESS
2634 // after the confirmation page and handle this operation within the
2635 // #GtkAssistant::prepare signal of the progress page.
2636 extern (C) alias static void function (Assistant* this_, void* user_data=null) signal_apply;
2638 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2639 return super_.signal_connect!name(cb, data, cf);
2642 ulong signal_connect(string name:"apply", CB:signal_apply)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2643 return signal_connect_data!()(&this, cast(char*)"apply",
2644 cast(GObject2.Callback)cb, data, null, cf);
2647 // VERSION: 2.10
2648 // The ::cancel signal is emitted when then the cancel button is clicked.
2649 extern (C) alias static void function (Assistant* this_, void* user_data=null) signal_cancel;
2650 ulong signal_connect(string name:"cancel", CB:signal_cancel)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2651 return signal_connect_data!()(&this, cast(char*)"cancel",
2652 cast(GObject2.Callback)cb, data, null, cf);
2655 // VERSION: 2.10
2656 // The ::close signal is emitted either when the close button of
2657 // a summary page is clicked, or when the apply button in the last
2658 // page in the flow (of type %GTK_ASSISTANT_PAGE_CONFIRM) is clicked.
2659 extern (C) alias static void function (Assistant* this_, void* user_data=null) signal_close;
2660 ulong signal_connect(string name:"close", CB:signal_close)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2661 return signal_connect_data!()(&this, cast(char*)"close",
2662 cast(GObject2.Callback)cb, data, null, cf);
2665 // VERSION: 2.10
2666 // The ::prepare signal is emitted when a new page is set as the assistant's
2667 // current page, before making the new page visible. A handler for this signal
2668 // can do any preparation which are necessary before showing @page.
2669 // <page>: the current page
2670 extern (C) alias static void function (Assistant* this_, Widget* page, void* user_data=null) signal_prepare;
2671 ulong signal_connect(string name:"prepare", CB:signal_prepare)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
2672 return signal_connect_data!()(&this, cast(char*)"prepare",
2673 cast(GObject2.Callback)cb, data, null, cf);
2677 struct AssistantClass {
2678 WindowClass parent_class;
2679 extern (C) void function (Assistant* assistant, Widget* page) prepare;
2680 extern (C) void function (Assistant* assistant) apply;
2681 extern (C) void function (Assistant* assistant) close;
2682 extern (C) void function (Assistant* assistant) cancel;
2683 extern (C) void function () _gtk_reserved1;
2684 extern (C) void function () _gtk_reserved2;
2685 extern (C) void function () _gtk_reserved3;
2686 extern (C) void function () _gtk_reserved4;
2687 extern (C) void function () _gtk_reserved5;
2691 // A function used by gtk_assistant_set_forward_page_func() to know which
2692 // is the next page given a current one. It's called both for computing the
2693 // next page when the user presses the "forward" button and for handling
2694 // the behavior of the "last" button.
2695 // RETURNS: The next page number.
2696 // <current_page>: The page number used to calculate the next page.
2697 // <data>: user data.
2698 extern (C) alias int function (int current_page, void* data) AssistantPageFunc;
2701 // An enum for determining the page role inside the #GtkAssistant. It's
2702 // used to handle buttons sensitivity and visibility.
2703 // Note that an assistant needs to end its page flow with a page of type
2704 // %GTK_ASSISTANT_PAGE_CONFIRM, %GTK_ASSISTANT_PAGE_SUMMARY or
2705 // %GTK_ASSISTANT_PAGE_PROGRESS to be correct.
2706 enum AssistantPageType {
2707 CONTENT = 0,
2708 INTRO = 1,
2709 CONFIRM = 2,
2710 SUMMARY = 3,
2711 PROGRESS = 4
2713 struct AssistantPrivate {
2716 enum AttachOptions {
2717 EXPAND = 1,
2718 SHRINK = 2,
2719 FILL = 4
2721 enum int BINARY_AGE = 2408;
2722 enum int BUTTONBOX_DEFAULT = -1;
2724 // The #GtkBin widget is a container with just one child.
2725 // It is not very useful itself, but it is useful for deriving subclasses,
2726 // since it provides common code needed for handling a single child widget.
2727 // Many GTK+ widgets are subclasses of #GtkBin, including #GtkWindow,
2728 // #GtkButton, #GtkFrame, #GtkHandleBox or #GtkScrolledWindow.
2729 struct Bin /* : Container */ {
2730 mixin Atk.ImplementorIface.__interface__;
2731 mixin Buildable.__interface__;
2732 alias container this;
2733 alias container super_;
2734 Container container;
2735 Widget* child;
2738 // Gets the child of the #GtkBin, or %NULL if the bin contains
2739 // no child widget. The returned widget does not have a reference
2740 // added, so you do not need to unref it.
2741 // RETURNS: pointer to child of the #GtkBin
2742 Widget* get_child()() {
2743 return gtk_bin_get_child(&this);
2747 struct BinClass {
2748 ContainerClass parent_class;
2751 struct BindingArg {
2752 Type arg_type;
2754 union d {
2755 c_long long_data;
2756 double double_data;
2757 char* string_data;
2761 struct BindingEntry {
2762 uint keyval;
2763 Gdk2.ModifierType modifiers;
2764 BindingSet* binding_set;
2765 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2766 uint, "destroyed", 1,
2767 uint, "in_emission", 1,
2768 uint, "marks_unbound", 1,
2769 uint, "__dummy32A", 29));
2770 BindingEntry* set_next, hash_next;
2771 BindingSignal* signals;
2774 struct BindingSet {
2775 char* set_name;
2776 int priority;
2777 GLib2.SList* widget_path_pspecs, widget_class_pspecs, class_branch_pspecs;
2778 BindingEntry* entries, current;
2779 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2780 uint, "parsed", 1,
2781 uint, "__dummy32A", 31));
2784 // Find a key binding matching @keyval and @modifiers within
2785 // RETURNS: %TRUE if a binding was found and activated
2786 // <keyval>: key value of the binding
2787 // <modifiers>: key modifier of the binding
2788 // <object>: object to activate when binding found
2789 int activate()(uint keyval, Gdk2.ModifierType modifiers, Object* object) {
2790 return gtk_binding_set_activate(&this, keyval, modifiers, object);
2793 // This function is used internally by the GtkRC parsing mechanism to
2794 // assign match patterns to #GtkBindingSet structures.
2795 // <path_type>: path type the pattern applies to
2796 // <path_pattern>: the actual match pattern
2797 // <priority>: binding priority
2798 void add_path()(PathType path_type, char* path_pattern, PathPriorityType priority) {
2799 gtk_binding_set_add_path(&this, path_type, path_pattern, priority);
2803 struct BindingSignal {
2804 BindingSignal* next;
2805 char* signal_name;
2806 uint n_args;
2807 BindingArg* args;
2810 struct Border {
2811 int left, right, top, bottom;
2814 // VERSION: 2.14
2815 // Allocates a new #GtkBorder structure and initializes its elements to zero.
2816 // freed with gtk_border_free()
2817 // RETURNS: a new empty #GtkBorder. The newly allocated #GtkBorder should be
2818 static Border* /*new*/ new_()() {
2819 return gtk_border_new();
2822 // Copies a #GtkBorder structure.
2823 // RETURNS: a copy of @border_.
2824 Border* /*new*/ copy()() {
2825 return gtk_border_copy(&this);
2827 // Frees a #GtkBorder structure.
2828 void free()() {
2829 gtk_border_free(&this);
2833 struct Box /* : Container */ {
2834 mixin Atk.ImplementorIface.__interface__;
2835 mixin Buildable.__interface__;
2836 mixin Orientable.__interface__;
2837 alias container this;
2838 alias container super_;
2839 Container container;
2840 GLib2.List* children;
2841 short spacing;
2842 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2843 uint, "homogeneous", 1,
2844 uint, "__dummy32A", 31));
2847 // Returns whether the box is homogeneous (all children are the
2848 // same size). See gtk_box_set_homogeneous().
2849 // RETURNS: %TRUE if the box is homogeneous.
2850 int get_homogeneous()() {
2851 return gtk_box_get_homogeneous(&this);
2854 // Gets the value set by gtk_box_set_spacing().
2855 // RETURNS: spacing between children
2856 int get_spacing()() {
2857 return gtk_box_get_spacing(&this);
2860 // Adds @child to @box, packed with reference to the end of @box.
2861 // The @child is packed after (away from end of) any other child
2862 // packed with reference to the end of @box.
2863 // <child>: the #GtkWidget to be added to @box
2864 // <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
2865 // <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
2866 // <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
2867 void pack_end()(Widget* child, int expand, int fill, uint padding) {
2868 gtk_box_pack_end(&this, child, expand, fill, padding);
2871 // DEPRECATED (v2.14) method: pack_end_defaults - Use gtk_box_pack_end()
2872 // Adds @widget to @box, packed with reference to the end of @box.
2873 // The child is packed after any other child packed with reference
2874 // to the start of @box.
2875 // Parameters for how to pack the child @widget, #GtkBox:expand,
2876 // #GtkBox:fill and #GtkBox:padding, are given their default
2877 // values, %TRUE, %TRUE, and 0, respectively.
2878 // <widget>: the #GtkWidget to be added to @box
2879 void pack_end_defaults()(Widget* widget) {
2880 gtk_box_pack_end_defaults(&this, widget);
2883 // Adds @child to @box, packed with reference to the start of @box.
2884 // The @child is packed after any other child packed with reference
2885 // to the start of @box.
2886 // <child>: the #GtkWidget to be added to @box
2887 // <expand>: %TRUE if the new child is to be given extra space allocated to
2888 // <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
2889 // <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
2890 void pack_start()(Widget* child, int expand, int fill, uint padding) {
2891 gtk_box_pack_start(&this, child, expand, fill, padding);
2894 // DEPRECATED (v2.14) method: pack_start_defaults - Use gtk_box_pack_start()
2895 // Adds @widget to @box, packed with reference to the start of @box.
2896 // The child is packed after any other child packed with reference
2897 // to the start of @box.
2898 // Parameters for how to pack the child @widget, #GtkBox:expand,
2899 // #GtkBox:fill and #GtkBox:padding, are given their default
2900 // values, %TRUE, %TRUE, and 0, respectively.
2901 // <widget>: the #GtkWidget to be added to @box
2902 void pack_start_defaults()(Widget* widget) {
2903 gtk_box_pack_start_defaults(&this, widget);
2906 // Obtains information about how @child is packed into @box.
2907 // <child>: the #GtkWidget of the child to query
2908 // <expand>: pointer to return location for #GtkBox:expand child property
2909 // <fill>: pointer to return location for #GtkBox:fill child property
2910 // <padding>: pointer to return location for #GtkBox:padding child property
2911 // <pack_type>: pointer to return location for #GtkBox:pack-type child property
2912 void query_child_packing()(Widget* child, int* expand, int* fill, uint* padding, PackType* pack_type) {
2913 gtk_box_query_child_packing(&this, child, expand, fill, padding, pack_type);
2916 // Moves @child to a new @position in the list of @box children.
2917 // The list is the <structfield>children</structfield> field of
2918 // #GtkBox-struct, and contains both widgets packed #GTK_PACK_START
2919 // as well as widgets packed #GTK_PACK_END, in the order that these
2920 // widgets were added to @box.
2921 // A widget's position in the @box children list determines where
2922 // the widget is packed into @box. A child widget at some position
2923 // in the list will be packed just after all other widgets of the
2924 // same packing type that appear earlier in the list.
2925 // <child>: the #GtkWidget to move
2926 // <position>: the new position for @child in the list of children of @box, starting from 0. If negative, indicates the end of the list
2927 void reorder_child()(Widget* child, int position) {
2928 gtk_box_reorder_child(&this, child, position);
2931 // Sets the way @child is packed into @box.
2932 // <child>: the #GtkWidget of the child to set
2933 // <expand>: the new value of the #GtkBox:expand child property
2934 // <fill>: the new value of the #GtkBox:fill child property
2935 // <padding>: the new value of the #GtkBox:padding child property
2936 // <pack_type>: the new value of the #GtkBox:pack-type child property
2937 void set_child_packing()(Widget* child, int expand, int fill, uint padding, PackType pack_type) {
2938 gtk_box_set_child_packing(&this, child, expand, fill, padding, pack_type);
2941 // Sets the #GtkBox:homogeneous property of @box, controlling
2942 // whether or not all children of @box are given equal space
2943 // in the box.
2944 // <homogeneous>: a boolean value, %TRUE to create equal allotments, %FALSE for variable allotments
2945 void set_homogeneous()(int homogeneous) {
2946 gtk_box_set_homogeneous(&this, homogeneous);
2949 // Sets the #GtkBox:spacing property of @box, which is the
2950 // number of pixels to place between children of @box.
2951 // <spacing>: the number of pixels to put between children
2952 void set_spacing()(int spacing) {
2953 gtk_box_set_spacing(&this, spacing);
2958 // The #GtkBoxChild holds a child widget of #GtkBox and describes how the child
2959 // is to be packed into the #GtkBox. All fields of this #GtkBoxChild should be
2960 // considered read-only and they should never be set directly by an application.
2961 // Use gtk_box_query_child_packing() and gtk_box_set_child_packing() to query
2962 // and set the #GtkBoxChild.padding, #GtkBoxChild.expand, #GtkBoxChild.fill and
2963 // #GtkBoxChild.pack fields.
2964 struct BoxChild {
2965 Widget* widget;
2966 ushort padding;
2967 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
2968 uint, "expand", 1,
2969 uint, "fill", 1,
2970 uint, "pack", 1,
2971 uint, "is_secondary", 1,
2972 uint, "__dummy32A", 28));
2975 struct BoxClass {
2976 ContainerClass parent_class;
2980 // In order to allow construction from a <link linkend="BUILDER-UI">GtkBuilder
2981 // UI description</link>, an object class must implement the
2982 // GtkBuildable interface. The interface includes methods for setting
2983 // names and properties of objects, parsing custom tags, constructing
2984 // child objects.
2985 // The GtkBuildable interface is implemented by all widgets and
2986 // many of the non-widget objects that are provided by GTK+. The
2987 // main user of this interface is #GtkBuilder, there should be
2988 // very little need for applications to call any
2989 // <function>gtk_buildable_...</function> functions.
2990 struct Buildable /* Interface */ {
2991 mixin template __interface__() {
2992 // VERSION: 2.12
2993 // Adds a child to @buildable. @type is an optional string
2994 // describing how the child should be added.
2995 // <builder>: a #GtkBuilder
2996 // <child>: child to add
2997 // <type>: kind of child or %NULL
2998 void add_child()(Builder* builder, GObject2.Object* child, char* type=null) {
2999 gtk_buildable_add_child(cast(Buildable*)&this, builder, child, type);
3002 // VERSION: 2.12
3003 // Constructs a child of @buildable with the name @name.
3004 // #GtkBuilder calls this function if a "constructor" has been
3005 // specified in the UI definition.
3006 // RETURNS: the constructed child
3007 // <builder>: #GtkBuilder used to construct this object
3008 // <name>: name of child to construct
3009 GObject2.Object* /*new*/ construct_child()(Builder* builder, char* name) {
3010 return gtk_buildable_construct_child(cast(Buildable*)&this, builder, name);
3013 // VERSION: 2.12
3014 // This is similar to gtk_buildable_parser_finished() but is
3015 // called once for each custom tag handled by the @buildable.
3016 // <builder>: a #GtkBuilder
3017 // <child>: child object or %NULL for non-child tags
3018 // <tagname>: the name of the tag
3019 // <data>: user data created in custom_tag_start
3020 void custom_finished()(Builder* builder, GObject2.Object* child, char* tagname, void* data) {
3021 gtk_buildable_custom_finished(cast(Buildable*)&this, builder, child, tagname, data);
3024 // VERSION: 2.12
3025 // This is called at the end of each custom element handled by
3026 // the buildable.
3027 // <builder>: #GtkBuilder used to construct this object
3028 // <child>: child object or %NULL for non-child tags
3029 // <tagname>: name of tag
3030 // <data>: user data that will be passed in to parser functions
3031 void custom_tag_end()(Builder* builder, GObject2.Object* child, char* tagname, void* data) {
3032 gtk_buildable_custom_tag_end(cast(Buildable*)&this, builder, child, tagname, data);
3035 // VERSION: 2.12
3036 // This is called for each unknown element under &lt;child&gt;.
3037 // if it doesn't.
3038 // RETURNS: %TRUE if a object has a custom implementation, %FALSE
3039 // <builder>: a #GtkBuilder used to construct this object
3040 // <child>: child object or %NULL for non-child tags
3041 // <tagname>: name of tag
3042 // <parser>: a #GMarkupParser structure to fill in
3043 // <data>: return location for user data that will be passed in to parser functions
3044 int custom_tag_start()(Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data) {
3045 return gtk_buildable_custom_tag_start(cast(Buildable*)&this, builder, child, tagname, parser, data);
3048 // VERSION: 2.12
3049 // Get the internal child called @childname of the @buildable object.
3050 // RETURNS: the internal child of the buildable object
3051 // <builder>: a #GtkBuilder
3052 // <childname>: name of child
3053 GObject2.Object* get_internal_child()(Builder* builder, char* childname) {
3054 return gtk_buildable_get_internal_child(cast(Buildable*)&this, builder, childname);
3057 // VERSION: 2.12
3058 // Gets the name of the @buildable object.
3059 // #GtkBuilder sets the name based on the the
3060 // <link linkend="BUILDER-UI">GtkBuilder UI definition</link>
3061 // used to construct the @buildable.
3062 // RETURNS: the name set with gtk_buildable_set_name()
3063 char* get_name()() {
3064 return gtk_buildable_get_name(cast(Buildable*)&this);
3067 // VERSION: 2.12
3068 // Called when the builder finishes the parsing of a
3069 // <link linkend="BUILDER-UI">GtkBuilder UI definition</link>.
3070 // Note that this will be called once for each time
3071 // gtk_builder_add_from_file() or gtk_builder_add_from_string()
3072 // is called on a builder.
3073 // <builder>: a #GtkBuilder
3074 void parser_finished()(Builder* builder) {
3075 gtk_buildable_parser_finished(cast(Buildable*)&this, builder);
3078 // VERSION: 2.12
3079 // Sets the property name @name to @value on the @buildable object.
3080 // <builder>: a #GtkBuilder
3081 // <name>: name of property
3082 // <value>: value of property
3083 void set_buildable_property()(Builder* builder, char* name, GObject2.Value* value) {
3084 gtk_buildable_set_buildable_property(cast(Buildable*)&this, builder, name, value);
3087 // VERSION: 2.12
3088 // Sets the name of the @buildable object.
3089 // <name>: name to set
3090 void set_name()(char* name) {
3091 gtk_buildable_set_name(cast(Buildable*)&this, name);
3094 mixin __interface__;
3098 // The GtkBuildableIface interface contains method that are
3099 // necessary to allow #GtkBuilder to construct an object from
3100 // a GtkBuilder UI definition.
3101 struct BuildableIface {
3102 GObject2.TypeInterface g_iface;
3103 // <name>: name to set
3104 extern (C) void function (Buildable* buildable, char* name) set_name;
3105 // RETURNS: the name set with gtk_buildable_set_name()
3106 extern (C) char* function (Buildable* buildable) get_name;
3108 // <builder>: a #GtkBuilder
3109 // <child>: child to add
3110 // <type>: kind of child or %NULL
3111 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* type=null) add_child;
3113 // <builder>: a #GtkBuilder
3114 // <name>: name of property
3115 // <value>: value of property
3116 extern (C) void function (Buildable* buildable, Builder* builder, char* name, GObject2.Value* value) set_buildable_property;
3118 // RETURNS: the constructed child
3119 // <builder>: #GtkBuilder used to construct this object
3120 // <name>: name of child to construct
3121 extern (C) GObject2.Object* /*new*/ function (Buildable* buildable, Builder* builder, char* name) construct_child;
3123 // RETURNS: %TRUE if a object has a custom implementation, %FALSE
3124 // <builder>: a #GtkBuilder used to construct this object
3125 // <child>: child object or %NULL for non-child tags
3126 // <tagname>: name of tag
3127 // <parser>: a #GMarkupParser structure to fill in
3128 // <data>: return location for user data that will be passed in to parser functions
3129 extern (C) int function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data) custom_tag_start;
3131 // <builder>: #GtkBuilder used to construct this object
3132 // <child>: child object or %NULL for non-child tags
3133 // <tagname>: name of tag
3134 // <data>: user data that will be passed in to parser functions
3135 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, void* data) custom_tag_end;
3137 // <builder>: a #GtkBuilder
3138 // <child>: child object or %NULL for non-child tags
3139 // <tagname>: the name of the tag
3140 // <data>: user data created in custom_tag_start
3141 extern (C) void function (Buildable* buildable, Builder* builder, GObject2.Object* child, char* tagname, void* data) custom_finished;
3142 // <builder>: a #GtkBuilder
3143 extern (C) void function (Buildable* buildable, Builder* builder) parser_finished;
3145 // RETURNS: the internal child of the buildable object
3146 // <builder>: a #GtkBuilder
3147 // <childname>: name of child
3148 extern (C) GObject2.Object* function (Buildable* buildable, Builder* builder, char* childname) get_internal_child;
3151 struct Builder /* : GObject.Object */ {
3152 alias parent_instance this;
3153 alias parent_instance super_;
3154 alias parent_instance object;
3155 GObject2.Object parent_instance;
3156 BuilderPrivate* priv;
3159 // VERSION: 2.12
3160 // Creates a new builder object.
3161 // RETURNS: a new #GtkBuilder object
3162 static Builder* /*new*/ new_()() {
3163 return gtk_builder_new();
3166 // VERSION: 2.12
3167 // Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder
3168 // UI definition</link> and merges it with the current contents of @builder.
3169 // Upon errors 0 will be returned and @error will be assigned a
3170 // #GError from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or #G_FILE_ERROR
3171 // domain.
3172 // RETURNS: A positive value on success, 0 if an error occurred
3173 // <filename>: the name of the file to parse
3174 uint add_from_file()(char* filename, GLib2.Error** error=null) {
3175 return gtk_builder_add_from_file(&this, filename, error);
3178 // VERSION: 2.12
3179 // Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder
3180 // UI definition</link> and merges it with the current contents of @builder.
3181 // Upon errors 0 will be returned and @error will be assigned a
3182 // #GError from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.
3183 // RETURNS: A positive value on success, 0 if an error occurred
3184 // <buffer>: the string to parse
3185 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
3186 uint add_from_string()(char* buffer, size_t length, GLib2.Error** error=null) {
3187 return gtk_builder_add_from_string(&this, buffer, length, error);
3190 // VERSION: 2.14
3191 // Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder
3192 // UI definition</link> building only the requested objects and merges
3193 // them with the current contents of @builder.
3194 // Upon errors 0 will be returned and @error will be assigned a
3195 // #GError from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or #G_FILE_ERROR
3196 // domain.
3197 // <note><para>
3198 // If you are adding an object that depends on an object that is not
3199 // its child (for instance a #GtkTreeView that depends on its
3200 // #GtkTreeModel), you have to explicitely list all of them in @object_ids.
3201 // </para></note>
3202 // RETURNS: A positive value on success, 0 if an error occurred
3203 // <filename>: the name of the file to parse
3204 // <object_ids>: nul-terminated array of objects to build
3205 uint add_objects_from_file()(char* filename, char** object_ids, GLib2.Error** error=null) {
3206 return gtk_builder_add_objects_from_file(&this, filename, object_ids, error);
3209 // VERSION: 2.14
3210 // Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder
3211 // UI definition</link> building only the requested objects and merges
3212 // them with the current contents of @builder.
3213 // Upon errors 0 will be returned and @error will be assigned a
3214 // #GError from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.
3215 // <note><para>
3216 // If you are adding an object that depends on an object that is not
3217 // its child (for instance a #GtkTreeView that depends on its
3218 // #GtkTreeModel), you have to explicitely list all of them in @object_ids.
3219 // </para></note>
3220 // RETURNS: A positive value on success, 0 if an error occurred
3221 // <buffer>: the string to parse
3222 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
3223 // <object_ids>: nul-terminated array of objects to build
3224 uint add_objects_from_string()(char* buffer, size_t length, char** object_ids, GLib2.Error** error=null) {
3225 return gtk_builder_add_objects_from_string(&this, buffer, length, object_ids, error);
3228 // VERSION: 2.12
3229 // This method is a simpler variation of gtk_builder_connect_signals_full().
3230 // It uses #GModule's introspective features (by opening the module %NULL)
3231 // to look at the application's symbol table. From here it tries to match
3232 // the signal handler names given in the interface description with
3233 // symbols in the application and connects the signals.
3234 // Note that this function will not work correctly if #GModule is not
3235 // supported on the platform.
3236 // When compiling applications for Windows, you must declare signal callbacks
3237 // with #G_MODULE_EXPORT, or they will not be put in the symbol table.
3238 // On Linux and Unices, this is not necessary; applications should instead
3239 // be compiled with the -Wl,--export-dynamic CFLAGS, and linked against
3240 // gmodule-export-2.0.
3241 // <user_data>: a pointer to a structure sent in as user data to all signals
3242 void connect_signals()(void* user_data) {
3243 gtk_builder_connect_signals(&this, user_data);
3246 // VERSION: 2.12
3247 // This function can be thought of the interpreted language binding
3248 // version of gtk_builder_connect_signals(), except that it does not
3249 // require GModule to function correctly.
3250 // <func>: the function used to connect the signals
3251 // <user_data>: arbitrary data that will be passed to the connection function
3252 void connect_signals_full()(BuilderConnectFunc func, void* user_data) {
3253 gtk_builder_connect_signals_full(&this, func, user_data);
3256 // VERSION: 2.12
3257 // Gets the object named @name. Note that this function does not
3258 // increment the reference count of the returned object.
3259 // it could not be found in the object tree.
3260 // RETURNS: the object named @name or %NULL if
3261 // <name>: name of object to get
3262 GObject2.Object* get_object()(char* name) {
3263 return gtk_builder_get_object(&this, name);
3266 // VERSION: 2.12
3267 // Gets all objects that have been constructed by @builder. Note that
3268 // this function does not increment the reference counts of the returned
3269 // objects.
3270 // constructed by the #GtkBuilder instance. It should be freed by
3271 // g_slist_free()
3272 // RETURNS: a newly-allocated #GSList containing all the objects
3273 GLib2.SList* /*new container*/ get_objects()() {
3274 return gtk_builder_get_objects(&this);
3277 // VERSION: 2.12
3278 // Gets the translation domain of @builder.
3279 // by the builder object and must not be modified or freed.
3280 // RETURNS: the translation domain. This string is owned
3281 char* get_translation_domain()() {
3282 return gtk_builder_get_translation_domain(&this);
3285 // VERSION: 2.12
3286 // Looks up a type by name, using the virtual function that
3287 // #GtkBuilder has for that purpose. This is mainly used when
3288 // implementing the #GtkBuildable interface on a type.
3289 // if no type was found
3290 // RETURNS: the #GType found for @type_name or #G_TYPE_INVALID
3291 // <type_name>: type name to lookup
3292 Type get_type_from_name()(char* type_name) {
3293 return gtk_builder_get_type_from_name(&this, type_name);
3296 // VERSION: 2.12
3297 // Sets the translation domain of @builder.
3298 // See #GtkBuilder:translation-domain.
3299 // <domain>: the translation domain or %NULL
3300 void set_translation_domain()(char* domain=null) {
3301 gtk_builder_set_translation_domain(&this, domain);
3304 // VERSION: 2.12
3305 // This function demarshals a value from a string. This function
3306 // calls g_value_init() on the @value argument, so it need not be
3307 // initialised beforehand.
3308 // This function can handle char, uchar, boolean, int, uint, long,
3309 // ulong, enum, flags, float, double, string, #GdkColor and
3310 // #GtkAdjustment type values. Support for #GtkWidget type values is
3311 // still to come.
3312 // Upon errors %FALSE will be returned and @error will be assigned a
3313 // #GError from the #GTK_BUILDER_ERROR domain.
3314 // RETURNS: %TRUE on success
3315 // <pspec>: the #GParamSpec for the property
3316 // <string>: the string representation of the value
3317 // <value>: the #GValue to store the result in
3318 int value_from_string()(GObject2.ParamSpec* pspec, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error=null) {
3319 return gtk_builder_value_from_string(&this, pspec, string_, value, error);
3322 // VERSION: 2.12
3323 // Like gtk_builder_value_from_string(), this function demarshals
3324 // a value from a string, but takes a #GType instead of #GParamSpec.
3325 // This function calls g_value_init() on the @value argument, so it
3326 // need not be initialised beforehand.
3327 // Upon errors %FALSE will be returned and @error will be assigned a
3328 // #GError from the #GTK_BUILDER_ERROR domain.
3329 // RETURNS: %TRUE on success
3330 // <type>: the #GType of the value
3331 // <string>: the string representation of the value
3332 // <value>: the #GValue to store the result in
3333 int value_from_string_type()(Type type, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error=null) {
3334 return gtk_builder_value_from_string_type(&this, type, string_, value, error);
3338 struct BuilderClass {
3339 GObject2.ObjectClass parent_class;
3341 // RETURNS: the #GType found for @type_name or #G_TYPE_INVALID
3342 // <type_name>: type name to lookup
3343 extern (C) Type function (Builder* builder, char* type_name) get_type_from_name;
3344 extern (C) void function () _gtk_reserved1;
3345 extern (C) void function () _gtk_reserved2;
3346 extern (C) void function () _gtk_reserved3;
3347 extern (C) void function () _gtk_reserved4;
3348 extern (C) void function () _gtk_reserved5;
3349 extern (C) void function () _gtk_reserved6;
3350 extern (C) void function () _gtk_reserved7;
3351 extern (C) void function () _gtk_reserved8;
3355 // VERSION: 2.12
3356 // This is the signature of a function used to connect signals. It is used
3357 // by the gtk_builder_connect_signals() and gtk_builder_connect_signals_full()
3358 // methods. It is mainly intended for interpreted language bindings, but
3359 // could be useful where the programmer wants more control over the signal
3360 // connection process.
3361 // <builder>: a #GtkBuilder
3362 // <object>: object to connect a signal to
3363 // <signal_name>: name of the signal
3364 // <handler_name>: name of the handler
3365 // <connect_object>: a #GObject, if non-%NULL, use g_signal_connect_object()
3366 // <flags>: #GConnectFlags to use
3367 // <user_data>: user data
3368 extern (C) alias void function (Builder* builder, GObject2.Object* object, char* signal_name, char* handler_name, GObject2.Object* connect_object, GObject2.ConnectFlags flags, void* user_data) BuilderConnectFunc;
3370 enum BuilderError {
3371 INVALID_TYPE_FUNCTION = 0,
3372 UNHANDLED_TAG = 1,
3373 MISSING_ATTRIBUTE = 2,
3374 INVALID_ATTRIBUTE = 3,
3375 INVALID_TAG = 4,
3376 MISSING_PROPERTY_VALUE = 5,
3377 INVALID_VALUE = 6,
3378 VERSION_MISMATCH = 7,
3379 DUPLICATE_ID = 8
3381 struct BuilderPrivate {
3384 struct Button /* : Bin */ {
3385 mixin Atk.ImplementorIface.__interface__;
3386 mixin Activatable.__interface__;
3387 mixin Buildable.__interface__;
3388 alias bin this;
3389 alias bin super_;
3390 Bin bin;
3391 Gdk2.Window* event_window;
3392 char* label_text;
3393 uint activate_timeout;
3394 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
3395 uint, "constructed", 1,
3396 uint, "in_button", 1,
3397 uint, "button_down", 1,
3398 uint, "relief", 2,
3399 uint, "use_underline", 1,
3400 uint, "use_stock", 1,
3401 uint, "depressed", 1,
3402 uint, "depress_on_activate", 1,
3403 uint, "focus_on_click", 1,
3404 uint, "__dummy32A", 22));
3406 static Button* new_()() {
3407 return gtk_button_new();
3410 // Creates a new #GtkButton containing the image and text from a stock item.
3411 // Some stock ids have preprocessor macros like #GTK_STOCK_OK and
3412 // #GTK_STOCK_APPLY.
3413 // If @stock_id is unknown, then it will be treated as a mnemonic
3414 // label (as for gtk_button_new_with_mnemonic()).
3415 // RETURNS: a new #GtkButton
3416 // <stock_id>: the name of the stock item
3417 static Button* new_from_stock()(char* stock_id) {
3418 return gtk_button_new_from_stock(stock_id);
3420 static Button* new_with_label()(char* label) {
3421 return gtk_button_new_with_label(label);
3424 // Creates a new #GtkButton containing a label.
3425 // If characters in @label are preceded by an underscore, they are underlined.
3426 // If you need a literal underscore character in a label, use '__' (two
3427 // underscores). The first underlined character represents a keyboard
3428 // accelerator called a mnemonic.
3429 // Pressing Alt and that key activates the button.
3430 // RETURNS: a new #GtkButton
3431 // <label>: The text of the button, with an underscore in front of the mnemonic character
3432 static Button* new_with_mnemonic()(char* label) {
3433 return gtk_button_new_with_mnemonic(label);
3435 void clicked()() {
3436 gtk_button_clicked(&this);
3438 void enter()() {
3439 gtk_button_enter(&this);
3442 // VERSION: 2.4
3443 // Gets the alignment of the child in the button.
3444 // <xalign>: return location for horizontal alignment
3445 // <yalign>: return location for vertical alignment
3446 void get_alignment()(/*out*/ float* xalign, /*out*/ float* yalign) {
3447 gtk_button_get_alignment(&this, xalign, yalign);
3450 // VERSION: 2.22
3451 // Returns the button's event window if it is realized, %NULL otherwise.
3452 // This function should be rarely needed.
3453 // RETURNS: @button's event window.
3454 Gdk2.Window* get_event_window()() {
3455 return gtk_button_get_event_window(&this);
3458 // VERSION: 2.4
3459 // Returns whether the button grabs focus when it is clicked with the mouse.
3460 // See gtk_button_set_focus_on_click().
3461 // the mouse.
3462 // RETURNS: %TRUE if the button grabs focus when it is clicked with
3463 int get_focus_on_click()() {
3464 return gtk_button_get_focus_on_click(&this);
3467 // VERSION: 2.6
3468 // Gets the widget that is currenty set as the image of @button.
3469 // This may have been explicitly set by gtk_button_set_image()
3470 // or constructed by gtk_button_new_from_stock().
3471 // RETURNS: a #GtkWidget or %NULL in case there is no image
3472 Widget* get_image()() {
3473 return gtk_button_get_image(&this);
3476 // VERSION: 2.10
3477 // Gets the position of the image relative to the text
3478 // inside the button.
3479 // RETURNS: the position
3480 PositionType get_image_position()() {
3481 return gtk_button_get_image_position(&this);
3484 // Fetches the text from the label of the button, as set by
3485 // gtk_button_set_label(). If the label text has not
3486 // been set the return value will be %NULL. This will be the
3487 // case if you create an empty button with gtk_button_new() to
3488 // use as a container.
3489 // by the widget and must not be modified or freed.
3490 // RETURNS: The text of the label widget. This string is owned
3491 char* get_label()() {
3492 return gtk_button_get_label(&this);
3494 ReliefStyle get_relief()() {
3495 return gtk_button_get_relief(&this);
3498 // Returns whether the button label is a stock item.
3499 // select a stock item instead of being
3500 // used directly as the label text.
3501 // RETURNS: %TRUE if the button label is used to
3502 int get_use_stock()() {
3503 return gtk_button_get_use_stock(&this);
3506 // Returns whether an embedded underline in the button label indicates a
3507 // mnemonic. See gtk_button_set_use_underline ().
3508 // indicates the mnemonic accelerator keys.
3509 // RETURNS: %TRUE if an embedded underline in the button label
3510 int get_use_underline()() {
3511 return gtk_button_get_use_underline(&this);
3513 void leave()() {
3514 gtk_button_leave(&this);
3516 void pressed()() {
3517 gtk_button_pressed(&this);
3519 void released()() {
3520 gtk_button_released(&this);
3523 // VERSION: 2.4
3524 // Sets the alignment of the child. This property has no effect unless
3525 // the child is a #GtkMisc or a #GtkAligment.
3526 // <xalign>: the horizontal position of the child, 0.0 is left aligned, 1.0 is right aligned
3527 // <yalign>: the vertical position of the child, 0.0 is top aligned, 1.0 is bottom aligned
3528 void set_alignment()(float xalign, float yalign) {
3529 gtk_button_set_alignment(&this, xalign, yalign);
3532 // VERSION: 2.4
3533 // Sets whether the button will grab focus when it is clicked with the mouse.
3534 // Making mouse clicks not grab focus is useful in places like toolbars where
3535 // you don't want the keyboard focus removed from the main area of the
3536 // application.
3537 // <focus_on_click>: whether the button grabs focus when clicked with the mouse
3538 void set_focus_on_click()(int focus_on_click) {
3539 gtk_button_set_focus_on_click(&this, focus_on_click);
3542 // VERSION: 2.6
3543 // Set the image of @button to the given widget. Note that
3544 // it depends on the #GtkSettings:gtk-button-images setting whether the
3545 // image will be displayed or not, you don't have to call
3546 // gtk_widget_show() on @image yourself.
3547 // <image>: a widget to set as the image for the button
3548 void set_image()(Widget* image) {
3549 gtk_button_set_image(&this, image);
3552 // VERSION: 2.10
3553 // Sets the position of the image relative to the text
3554 // inside the button.
3555 // <position>: the position
3556 void set_image_position()(PositionType position) {
3557 gtk_button_set_image_position(&this, position);
3560 // Sets the text of the label of the button to @str. This text is
3561 // also used to select the stock item if gtk_button_set_use_stock()
3562 // is used.
3563 // This will also clear any previously set labels.
3564 // <label>: a string
3565 void set_label()(char* label) {
3566 gtk_button_set_label(&this, label);
3568 void set_relief()(ReliefStyle newstyle) {
3569 gtk_button_set_relief(&this, newstyle);
3572 // If %TRUE, the label set on the button is used as a
3573 // stock id to select the stock item for the button.
3574 // <use_stock>: %TRUE if the button should use a stock item
3575 void set_use_stock()(int use_stock) {
3576 gtk_button_set_use_stock(&this, use_stock);
3579 // If true, an underline in the text of the button label indicates
3580 // the next character should be used for the mnemonic accelerator key.
3581 // <use_underline>: %TRUE if underlines in the text indicate mnemonics
3582 void set_use_underline()(int use_underline) {
3583 gtk_button_set_use_underline(&this, use_underline);
3586 // The ::activate signal on GtkButton is an action signal and
3587 // emitting it causes the button to animate press then release.
3588 // Applications should never connect to this signal, but use the
3589 // #GtkButton::clicked signal.
3590 extern (C) alias static void function (Button* this_, void* user_data=null) signal_activate;
3592 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3593 return super_.signal_connect!name(cb, data, cf);
3596 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3597 return signal_connect_data!()(&this, cast(char*)"activate",
3598 cast(GObject2.Callback)cb, data, null, cf);
3600 // Emitted when the button has been activated (pressed and released).
3601 extern (C) alias static void function (Button* this_, void* user_data=null) signal_clicked;
3602 ulong signal_connect(string name:"clicked", CB:signal_clicked)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3603 return signal_connect_data!()(&this, cast(char*)"clicked",
3604 cast(GObject2.Callback)cb, data, null, cf);
3607 // DEPRECATED (v2.8) glib:signal: enter - Use the #GtkWidget::enter-notify-event signal.
3608 // Emitted when the pointer enters the button.
3609 extern (C) alias static void function (Button* this_, void* user_data=null) signal_enter;
3610 ulong signal_connect(string name:"enter", CB:signal_enter)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3611 return signal_connect_data!()(&this, cast(char*)"enter",
3612 cast(GObject2.Callback)cb, data, null, cf);
3615 // DEPRECATED (v2.8) glib:signal: leave - Use the #GtkWidget::leave-notify-event signal.
3616 // Emitted when the pointer leaves the button.
3617 extern (C) alias static void function (Button* this_, void* user_data=null) signal_leave;
3618 ulong signal_connect(string name:"leave", CB:signal_leave)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3619 return signal_connect_data!()(&this, cast(char*)"leave",
3620 cast(GObject2.Callback)cb, data, null, cf);
3623 // DEPRECATED (v2.8) glib:signal: pressed - Use the #GtkWidget::button-press-event signal.
3624 // Emitted when the button is pressed.
3625 extern (C) alias static void function (Button* this_, void* user_data=null) signal_pressed;
3626 ulong signal_connect(string name:"pressed", CB:signal_pressed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3627 return signal_connect_data!()(&this, cast(char*)"pressed",
3628 cast(GObject2.Callback)cb, data, null, cf);
3631 // DEPRECATED (v2.8) glib:signal: released - Use the #GtkWidget::button-release-event signal.
3632 // Emitted when the button is released.
3633 extern (C) alias static void function (Button* this_, void* user_data=null) signal_released;
3634 ulong signal_connect(string name:"released", CB:signal_released)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
3635 return signal_connect_data!()(&this, cast(char*)"released",
3636 cast(GObject2.Callback)cb, data, null, cf);
3640 enum ButtonAction {
3641 IGNORED = 0,
3642 SELECTS = 1,
3643 DRAGS = 2,
3644 EXPANDS = 4
3646 struct ButtonBox /* : Box */ {
3647 mixin Atk.ImplementorIface.__interface__;
3648 mixin Buildable.__interface__;
3649 mixin Orientable.__interface__;
3650 alias box this;
3651 alias box super_;
3652 Box box;
3653 int child_min_width, child_min_height, child_ipad_x, child_ipad_y;
3654 ButtonBoxStyle layout_style;
3656 void get_child_ipadding()(int* ipad_x, int* ipad_y) {
3657 gtk_button_box_get_child_ipadding(&this, ipad_x, ipad_y);
3660 // VERSION: 2.4
3661 // Returns whether @child should appear in a secondary group of children.
3662 // RETURNS: whether @child should appear in a secondary group of children.
3663 // <child>: a child of @widget
3664 int get_child_secondary()(Widget* child) {
3665 return gtk_button_box_get_child_secondary(&this, child);
3667 void get_child_size()(int* min_width, int* min_height) {
3668 gtk_button_box_get_child_size(&this, min_width, min_height);
3670 ButtonBoxStyle get_layout()() {
3671 return gtk_button_box_get_layout(&this);
3673 void set_child_ipadding()(int ipad_x, int ipad_y) {
3674 gtk_button_box_set_child_ipadding(&this, ipad_x, ipad_y);
3677 // Sets whether @child should appear in a secondary group of children.
3678 // A typical use of a secondary child is the help button in a dialog.
3679 // This group appears after the other children if the style
3680 // is %GTK_BUTTONBOX_START, %GTK_BUTTONBOX_SPREAD or
3681 // %GTK_BUTTONBOX_EDGE, and before the other children if the style
3682 // is %GTK_BUTTONBOX_END. For horizontal button boxes, the definition
3683 // of before/after depends on direction of the widget (see
3684 // gtk_widget_set_direction()). If the style is %GTK_BUTTONBOX_START
3685 // or %GTK_BUTTONBOX_END, then the secondary children are aligned at
3686 // the other end of the button box from the main children. For the
3687 // other styles, they appear immediately next to the main children.
3688 // <child>: a child of @widget
3689 // <is_secondary>: if %TRUE, the @child appears in a secondary group of the button box.
3690 void set_child_secondary()(Widget* child, int is_secondary) {
3691 gtk_button_box_set_child_secondary(&this, child, is_secondary);
3693 void set_child_size()(int min_width, int min_height) {
3694 gtk_button_box_set_child_size(&this, min_width, min_height);
3696 void set_layout()(ButtonBoxStyle layout_style) {
3697 gtk_button_box_set_layout(&this, layout_style);
3701 struct ButtonBoxClass {
3702 BoxClass parent_class;
3705 enum ButtonBoxStyle {
3706 DEFAULT_STYLE = 0,
3707 SPREAD = 1,
3708 EDGE = 2,
3709 START = 3,
3710 END = 4,
3711 CENTER = 5
3713 struct ButtonClass {
3714 BinClass parent_class;
3715 extern (C) void function (Button* button) pressed;
3716 extern (C) void function (Button* button) released;
3717 extern (C) void function (Button* button) clicked;
3718 extern (C) void function (Button* button) enter;
3719 extern (C) void function (Button* button) leave;
3720 extern (C) void function (Button* button) activate;
3721 extern (C) void function () _gtk_reserved1;
3722 extern (C) void function () _gtk_reserved2;
3723 extern (C) void function () _gtk_reserved3;
3724 extern (C) void function () _gtk_reserved4;
3728 // Prebuilt sets of buttons for the dialog. If
3729 // none of these choices are appropriate, simply use %GTK_BUTTONS_NONE
3730 // then call gtk_dialog_add_buttons().
3731 // <note>
3732 // Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO
3733 // and %GTK_BUTTONS_OK_CANCEL are discouraged by the
3734 // <ulink url="http://library.gnome.org/devel/hig-book/stable/">GNOME HIG</ulink>.
3735 // </note>
3736 enum ButtonsType {
3737 NONE = 0,
3738 OK = 1,
3739 CLOSE = 2,
3740 CANCEL = 3,
3741 YES_NO = 4,
3742 OK_CANCEL = 5
3744 struct CList /* : Container */ {
3745 mixin Atk.ImplementorIface.__interface__;
3746 mixin Buildable.__interface__;
3747 alias container this;
3748 alias container super_;
3749 Container container;
3750 ushort flags;
3751 void* reserved1, reserved2;
3752 uint freeze_count;
3753 Gdk2.Rectangle internal_allocation;
3754 int rows, row_height;
3755 GLib2.List* row_list, row_list_end;
3756 int columns;
3757 Gdk2.Rectangle column_title_area;
3758 Gdk2.Window* title_window;
3759 CListColumn* column;
3760 Gdk2.Window* clist_window;
3761 int clist_window_width, clist_window_height, hoffset, voffset;
3762 ShadowType shadow_type;
3763 SelectionMode selection_mode;
3764 GLib2.List* selection, selection_end, undo_selection_, undo_unselection;
3765 int undo_anchor;
3766 ubyte[5] button_actions;
3767 ubyte drag_button;
3768 CListCellInfo click_cell;
3769 Adjustment* hadjustment, vadjustment;
3770 Gdk2.GC* xor_gc, fg_gc, bg_gc;
3771 Gdk2.Cursor* cursor_drag;
3772 int x_drag, focus_row, focus_header_column, anchor;
3773 StateType anchor_state;
3774 int drag_pos, htimer, vtimer;
3775 SortType sort_type;
3776 CListCompareFunc compare;
3777 int sort_column, drag_highlight_row;
3778 CListDragPos drag_highlight_pos;
3780 static CList* new_()(int columns) {
3781 return gtk_clist_new(columns);
3783 static CList* new_with_titles()(int columns, char* titles) {
3784 return gtk_clist_new_with_titles(columns, titles);
3786 int append()(char* text) {
3787 return gtk_clist_append(&this, text);
3789 void clear()() {
3790 gtk_clist_clear(&this);
3792 void column_title_active()(int column) {
3793 gtk_clist_column_title_active(&this, column);
3795 void column_title_passive()(int column) {
3796 gtk_clist_column_title_passive(&this, column);
3798 void column_titles_active()() {
3799 gtk_clist_column_titles_active(&this);
3801 void column_titles_hide()() {
3802 gtk_clist_column_titles_hide(&this);
3804 void column_titles_passive()() {
3805 gtk_clist_column_titles_passive(&this);
3807 void column_titles_show()() {
3808 gtk_clist_column_titles_show(&this);
3810 int columns_autosize()() {
3811 return gtk_clist_columns_autosize(&this);
3813 int find_row_from_data()(void* data) {
3814 return gtk_clist_find_row_from_data(&this, data);
3816 void freeze()() {
3817 gtk_clist_freeze(&this);
3819 // Unintrospectable method: get_cell_style() / gtk_clist_get_cell_style()
3820 Style* get_cell_style()(int row, int column) {
3821 return gtk_clist_get_cell_style(&this, row, column);
3823 CellType get_cell_type()(int row, int column) {
3824 return gtk_clist_get_cell_type(&this, row, column);
3826 char* /*new*/ get_column_title()(int column) {
3827 return gtk_clist_get_column_title(&this, column);
3829 // Unintrospectable method: get_column_widget() / gtk_clist_get_column_widget()
3830 Widget* get_column_widget()(int column) {
3831 return gtk_clist_get_column_widget(&this, column);
3833 // Unintrospectable method: get_hadjustment() / gtk_clist_get_hadjustment()
3834 Adjustment* get_hadjustment()() {
3835 return gtk_clist_get_hadjustment(&this);
3837 int get_pixmap()(int row, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
3838 return gtk_clist_get_pixmap(&this, row, column, pixmap, mask);
3840 int get_pixtext()(int row, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
3841 return gtk_clist_get_pixtext(&this, row, column, text, spacing, pixmap, mask);
3843 // Unintrospectable method: get_row_data() / gtk_clist_get_row_data()
3844 void* get_row_data()(int row) {
3845 return gtk_clist_get_row_data(&this, row);
3847 // Unintrospectable method: get_row_style() / gtk_clist_get_row_style()
3848 Style* get_row_style()(int row) {
3849 return gtk_clist_get_row_style(&this, row);
3851 int get_selectable()(int row) {
3852 return gtk_clist_get_selectable(&this, row);
3854 int get_selection_info()(int x, int y, int* row, int* column) {
3855 return gtk_clist_get_selection_info(&this, x, y, row, column);
3857 int get_text()(int row, int column, char** text) {
3858 return gtk_clist_get_text(&this, row, column, text);
3860 // Unintrospectable method: get_vadjustment() / gtk_clist_get_vadjustment()
3861 Adjustment* get_vadjustment()() {
3862 return gtk_clist_get_vadjustment(&this);
3864 int insert()(int row, char* text) {
3865 return gtk_clist_insert(&this, row, text);
3867 void moveto()(int row, int column, float row_align, float col_align) {
3868 gtk_clist_moveto(&this, row, column, row_align, col_align);
3870 int optimal_column_width()(int column) {
3871 return gtk_clist_optimal_column_width(&this, column);
3873 int prepend()(char* text) {
3874 return gtk_clist_prepend(&this, text);
3876 void remove()(int row) {
3877 gtk_clist_remove(&this, row);
3879 Visibility row_is_visible()(int row) {
3880 return gtk_clist_row_is_visible(&this, row);
3882 void row_move()(int source_row, int dest_row) {
3883 gtk_clist_row_move(&this, source_row, dest_row);
3885 void select_all()() {
3886 gtk_clist_select_all(&this);
3888 void select_row()(int row, int column) {
3889 gtk_clist_select_row(&this, row, column);
3891 void set_auto_sort()(int auto_sort) {
3892 gtk_clist_set_auto_sort(&this, auto_sort);
3894 void set_background()(int row, Gdk2.Color* color) {
3895 gtk_clist_set_background(&this, row, color);
3897 void set_button_actions()(uint button, ubyte button_actions) {
3898 gtk_clist_set_button_actions(&this, button, button_actions);
3900 void set_cell_style()(int row, int column, Style* style) {
3901 gtk_clist_set_cell_style(&this, row, column, style);
3903 void set_column_auto_resize()(int column, int auto_resize) {
3904 gtk_clist_set_column_auto_resize(&this, column, auto_resize);
3906 void set_column_justification()(int column, Justification justification) {
3907 gtk_clist_set_column_justification(&this, column, justification);
3909 void set_column_max_width()(int column, int max_width) {
3910 gtk_clist_set_column_max_width(&this, column, max_width);
3912 void set_column_min_width()(int column, int min_width) {
3913 gtk_clist_set_column_min_width(&this, column, min_width);
3915 void set_column_resizeable()(int column, int resizeable) {
3916 gtk_clist_set_column_resizeable(&this, column, resizeable);
3918 void set_column_title()(int column, char* title) {
3919 gtk_clist_set_column_title(&this, column, title);
3921 void set_column_visibility()(int column, int visible) {
3922 gtk_clist_set_column_visibility(&this, column, visible);
3924 void set_column_widget()(int column, Widget* widget) {
3925 gtk_clist_set_column_widget(&this, column, widget);
3927 void set_column_width()(int column, int width) {
3928 gtk_clist_set_column_width(&this, column, width);
3930 // Unintrospectable method: set_compare_func() / gtk_clist_set_compare_func()
3931 void set_compare_func()(CListCompareFunc cmp_func) {
3932 gtk_clist_set_compare_func(&this, cmp_func);
3934 void set_foreground()(int row, Gdk2.Color* color) {
3935 gtk_clist_set_foreground(&this, row, color);
3937 void set_hadjustment()(Adjustment* adjustment) {
3938 gtk_clist_set_hadjustment(&this, adjustment);
3940 void set_pixmap()(int row, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
3941 gtk_clist_set_pixmap(&this, row, column, pixmap, mask);
3943 void set_pixtext()(int row, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask) {
3944 gtk_clist_set_pixtext(&this, row, column, text, spacing, pixmap, mask);
3946 void set_reorderable()(int reorderable) {
3947 gtk_clist_set_reorderable(&this, reorderable);
3949 void set_row_data()(int row, void* data) {
3950 gtk_clist_set_row_data(&this, row, data);
3952 void set_row_data_full()(int row, void* data, GLib2.DestroyNotify destroy) {
3953 gtk_clist_set_row_data_full(&this, row, data, destroy);
3955 void set_row_height()(uint height) {
3956 gtk_clist_set_row_height(&this, height);
3958 void set_row_style()(int row, Style* style) {
3959 gtk_clist_set_row_style(&this, row, style);
3961 void set_selectable()(int row, int selectable) {
3962 gtk_clist_set_selectable(&this, row, selectable);
3964 void set_selection_mode()(SelectionMode mode) {
3965 gtk_clist_set_selection_mode(&this, mode);
3967 void set_shadow_type()(ShadowType type) {
3968 gtk_clist_set_shadow_type(&this, type);
3970 void set_shift()(int row, int column, int vertical, int horizontal) {
3971 gtk_clist_set_shift(&this, row, column, vertical, horizontal);
3973 void set_sort_column()(int column) {
3974 gtk_clist_set_sort_column(&this, column);
3976 void set_sort_type()(SortType sort_type) {
3977 gtk_clist_set_sort_type(&this, sort_type);
3979 void set_text()(int row, int column, char* text) {
3980 gtk_clist_set_text(&this, row, column, text);
3982 void set_use_drag_icons()(int use_icons) {
3983 gtk_clist_set_use_drag_icons(&this, use_icons);
3985 void set_vadjustment()(Adjustment* adjustment) {
3986 gtk_clist_set_vadjustment(&this, adjustment);
3988 void sort()() {
3989 gtk_clist_sort(&this);
3991 void swap_rows()(int row1, int row2) {
3992 gtk_clist_swap_rows(&this, row1, row2);
3994 void thaw()() {
3995 gtk_clist_thaw(&this);
3997 void undo_selection()() {
3998 gtk_clist_undo_selection(&this);
4000 void unselect_all()() {
4001 gtk_clist_unselect_all(&this);
4003 void unselect_row()(int row, int column) {
4004 gtk_clist_unselect_row(&this, row, column);
4006 extern (C) alias static void function (CList* this_, void* user_data=null) signal_abort_column_resize;
4008 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4009 return super_.signal_connect!name(cb, data, cf);
4012 ulong signal_connect(string name:"abort-column-resize", CB:signal_abort_column_resize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4013 return signal_connect_data!()(&this, cast(char*)"abort-column-resize",
4014 cast(GObject2.Callback)cb, data, null, cf);
4016 extern (C) alias static void function (CList* this_, int object, void* user_data=null) signal_click_column;
4017 ulong signal_connect(string name:"click-column", CB:signal_click_column)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4018 return signal_connect_data!()(&this, cast(char*)"click-column",
4019 cast(GObject2.Callback)cb, data, null, cf);
4021 extern (C) alias static void function (CList* this_, void* user_data=null) signal_end_selection;
4022 ulong signal_connect(string name:"end-selection", CB:signal_end_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4023 return signal_connect_data!()(&this, cast(char*)"end-selection",
4024 cast(GObject2.Callback)cb, data, null, cf);
4026 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, c_int p1, void* user_data=null) signal_extend_selection;
4027 ulong signal_connect(string name:"extend-selection", CB:signal_extend_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4028 return signal_connect_data!()(&this, cast(char*)"extend-selection",
4029 cast(GObject2.Callback)cb, data, null, cf);
4031 extern (C) alias static void function (CList* this_, int object, int p0, void* user_data=null) signal_resize_column;
4032 ulong signal_connect(string name:"resize-column", CB:signal_resize_column)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4033 return signal_connect_data!()(&this, cast(char*)"resize-column",
4034 cast(GObject2.Callback)cb, data, null, cf);
4036 extern (C) alias static void function (CList* this_, int object, int p0, void* user_data=null) signal_row_move;
4037 ulong signal_connect(string name:"row-move", CB:signal_row_move)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4038 return signal_connect_data!()(&this, cast(char*)"row-move",
4039 cast(GObject2.Callback)cb, data, null, cf);
4041 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_horizontal;
4042 ulong signal_connect(string name:"scroll-horizontal", CB:signal_scroll_horizontal)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4043 return signal_connect_data!()(&this, cast(char*)"scroll-horizontal",
4044 cast(GObject2.Callback)cb, data, null, cf);
4046 extern (C) alias static void function (CList* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_vertical;
4047 ulong signal_connect(string name:"scroll-vertical", CB:signal_scroll_vertical)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4048 return signal_connect_data!()(&this, cast(char*)"scroll-vertical",
4049 cast(GObject2.Callback)cb, data, null, cf);
4051 extern (C) alias static void function (CList* this_, void* user_data=null) signal_select_all;
4052 ulong signal_connect(string name:"select-all", CB:signal_select_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4053 return signal_connect_data!()(&this, cast(char*)"select-all",
4054 cast(GObject2.Callback)cb, data, null, cf);
4056 extern (C) alias static void function (CList* this_, int object, int p0, Gdk2.Event* p1, void* user_data=null) signal_select_row;
4057 ulong signal_connect(string name:"select-row", CB:signal_select_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4058 return signal_connect_data!()(&this, cast(char*)"select-row",
4059 cast(GObject2.Callback)cb, data, null, cf);
4061 extern (C) alias static void function (CList* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
4062 ulong signal_connect(string name:"set-scroll-adjustments", CB:signal_set_scroll_adjustments)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4063 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
4064 cast(GObject2.Callback)cb, data, null, cf);
4066 extern (C) alias static void function (CList* this_, void* user_data=null) signal_start_selection;
4067 ulong signal_connect(string name:"start-selection", CB:signal_start_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4068 return signal_connect_data!()(&this, cast(char*)"start-selection",
4069 cast(GObject2.Callback)cb, data, null, cf);
4071 extern (C) alias static void function (CList* this_, void* user_data=null) signal_toggle_add_mode;
4072 ulong signal_connect(string name:"toggle-add-mode", CB:signal_toggle_add_mode)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4073 return signal_connect_data!()(&this, cast(char*)"toggle-add-mode",
4074 cast(GObject2.Callback)cb, data, null, cf);
4076 extern (C) alias static void function (CList* this_, void* user_data=null) signal_toggle_focus_row;
4077 ulong signal_connect(string name:"toggle-focus-row", CB:signal_toggle_focus_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4078 return signal_connect_data!()(&this, cast(char*)"toggle-focus-row",
4079 cast(GObject2.Callback)cb, data, null, cf);
4081 extern (C) alias static void function (CList* this_, void* user_data=null) signal_undo_selection;
4082 ulong signal_connect(string name:"undo-selection", CB:signal_undo_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4083 return signal_connect_data!()(&this, cast(char*)"undo-selection",
4084 cast(GObject2.Callback)cb, data, null, cf);
4086 extern (C) alias static void function (CList* this_, void* user_data=null) signal_unselect_all;
4087 ulong signal_connect(string name:"unselect-all", CB:signal_unselect_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4088 return signal_connect_data!()(&this, cast(char*)"unselect-all",
4089 cast(GObject2.Callback)cb, data, null, cf);
4091 extern (C) alias static void function (CList* this_, int object, int p0, Gdk2.Event* p1, void* user_data=null) signal_unselect_row;
4092 ulong signal_connect(string name:"unselect-row", CB:signal_unselect_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4093 return signal_connect_data!()(&this, cast(char*)"unselect-row",
4094 cast(GObject2.Callback)cb, data, null, cf);
4098 struct CListCellInfo {
4099 int row, column;
4102 struct CListClass {
4103 ContainerClass parent_class;
4104 extern (C) void function (CList* clist, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
4105 extern (C) void function (CList* clist) refresh;
4106 extern (C) void function (CList* clist, int row, int column, Gdk2.Event* event) select_row;
4107 extern (C) void function (CList* clist, int row, int column, Gdk2.Event* event) unselect_row;
4108 extern (C) void function (CList* clist, int source_row, int dest_row) row_move;
4109 extern (C) void function (CList* clist, int column) click_column;
4110 extern (C) void function (CList* clist, int column, int width) resize_column;
4111 extern (C) void function (CList* clist) toggle_focus_row;
4112 extern (C) void function (CList* clist) select_all;
4113 extern (C) void function (CList* clist) unselect_all;
4114 extern (C) void function (CList* clist) undo_selection;
4115 extern (C) void function (CList* clist) start_selection;
4116 extern (C) void function (CList* clist) end_selection;
4117 extern (C) void function (CList* clist, ScrollType scroll_type, float position, int auto_start_selection) extend_selection;
4118 extern (C) void function (CList* clist, ScrollType scroll_type, float position) scroll_horizontal;
4119 extern (C) void function (CList* clist, ScrollType scroll_type, float position) scroll_vertical;
4120 extern (C) void function (CList* clist) toggle_add_mode;
4121 extern (C) void function (CList* clist) abort_column_resize;
4122 extern (C) void function (CList* clist, Gdk2.Event* event) resync_selection;
4123 // Unintrospectable functionp: selection_find() / ()
4124 extern (C) GLib2.List* function (CList* clist, int row_number, GLib2.List* row_list_element) selection_find;
4125 extern (C) void function (CList* clist, Gdk2.Rectangle* area, int row, CListRow* clist_row) draw_row;
4126 extern (C) void function (CList* clist, CListRow* target_row, int target_row_number, CListDragPos drag_pos) draw_drag_highlight;
4127 extern (C) void function (CList* clist) clear;
4128 extern (C) void function (CList* clist, int row) fake_unselect_all;
4129 extern (C) void function (CList* clist) sort_list;
4130 extern (C) int function (CList* clist, int row, char* text) insert_row;
4131 extern (C) void function (CList* clist, int row) remove_row;
4132 extern (C) void function (CList* clist, CListRow* clist_row, int column, CellType type, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask) set_cell_contents;
4133 extern (C) void function (CList* clist, CListRow* clist_row, int column, Requisition* requisition) cell_size_request;
4136 struct CListColumn {
4137 char* title;
4138 Gdk2.Rectangle area;
4139 Widget* button;
4140 Gdk2.Window* window;
4141 int width, min_width, max_width;
4142 Justification justification;
4143 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4144 uint, "visible", 1,
4145 uint, "width_set", 1,
4146 uint, "resizeable", 1,
4147 uint, "auto_resize", 1,
4148 uint, "button_passive", 1,
4149 uint, "__dummy32A", 27));
4152 extern (C) alias int function (CList* clist, const(void)* ptr1, const(void)* ptr2) CListCompareFunc;
4154 struct CListDestInfo {
4155 CListCellInfo cell;
4156 CListDragPos insert_pos;
4159 enum CListDragPos {
4160 NONE = 0,
4161 BEFORE = 1,
4162 INTO = 2,
4163 AFTER = 3
4165 struct CListRow {
4166 Cell* cell;
4167 StateType state;
4168 Gdk2.Color foreground, background;
4169 Style* style;
4170 void* data;
4171 GLib2.DestroyNotify destroy;
4172 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4173 uint, "fg_set", 1,
4174 uint, "bg_set", 1,
4175 uint, "selectable", 1,
4176 uint, "__dummy32A", 29));
4179 struct CTree /* : CList */ {
4180 mixin Atk.ImplementorIface.__interface__;
4181 mixin Buildable.__interface__;
4182 alias clist this;
4183 alias clist super_;
4184 CList clist;
4185 Gdk2.GC* lines_gc;
4186 int tree_indent, tree_spacing, tree_column;
4187 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4188 uint, "line_style", 2,
4189 uint, "expander_style", 2,
4190 uint, "show_stub", 1,
4191 uint, "__dummy32A", 27));
4192 CTreeCompareDragFunc drag_compare;
4194 static CTree* new_()(int columns, int tree_column) {
4195 return gtk_ctree_new(columns, tree_column);
4197 static CTree* new_with_titles()(int columns, int tree_column, char* titles) {
4198 return gtk_ctree_new_with_titles(columns, tree_column, titles);
4200 void collapse()(CTreeNode* node) {
4201 gtk_ctree_collapse(&this, node);
4203 void collapse_recursive()(CTreeNode* node) {
4204 gtk_ctree_collapse_recursive(&this, node);
4206 void collapse_to_depth()(CTreeNode* node, int depth) {
4207 gtk_ctree_collapse_to_depth(&this, node, depth);
4209 void expand()(CTreeNode* node) {
4210 gtk_ctree_expand(&this, node);
4212 void expand_recursive()(CTreeNode* node) {
4213 gtk_ctree_expand_recursive(&this, node);
4215 void expand_to_depth()(CTreeNode* node, int depth) {
4216 gtk_ctree_expand_to_depth(&this, node, depth);
4218 // Unintrospectable method: export_to_gnode() / gtk_ctree_export_to_gnode()
4219 GLib2.Node* export_to_gnode()(GLib2.Node* parent, GLib2.Node* sibling, CTreeNode* node, CTreeGNodeFunc func, void* data) {
4220 return gtk_ctree_export_to_gnode(&this, parent, sibling, node, func, data);
4222 int find()(CTreeNode* node, CTreeNode* child) {
4223 return gtk_ctree_find(&this, node, child);
4225 // Unintrospectable method: find_all_by_row_data() / gtk_ctree_find_all_by_row_data()
4226 GLib2.List* find_all_by_row_data()(CTreeNode* node, void* data) {
4227 return gtk_ctree_find_all_by_row_data(&this, node, data);
4229 // Unintrospectable method: find_all_by_row_data_custom() / gtk_ctree_find_all_by_row_data_custom()
4230 GLib2.List* find_all_by_row_data_custom()(CTreeNode* node, void* data, GLib2.CompareFunc func) {
4231 return gtk_ctree_find_all_by_row_data_custom(&this, node, data, func);
4233 // Unintrospectable method: find_by_row_data() / gtk_ctree_find_by_row_data()
4234 CTreeNode* find_by_row_data()(CTreeNode* node, void* data) {
4235 return gtk_ctree_find_by_row_data(&this, node, data);
4237 // Unintrospectable method: find_by_row_data_custom() / gtk_ctree_find_by_row_data_custom()
4238 CTreeNode* find_by_row_data_custom()(CTreeNode* node, void* data, GLib2.CompareFunc func) {
4239 return gtk_ctree_find_by_row_data_custom(&this, node, data, func);
4241 // Unintrospectable method: find_node_ptr() / gtk_ctree_find_node_ptr()
4242 CTreeNode* find_node_ptr()(CTreeRow* ctree_row) {
4243 return gtk_ctree_find_node_ptr(&this, ctree_row);
4245 int get_node_info()(CTreeNode* node, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap_closed, Gdk2.Bitmap** mask_closed, Gdk2.Pixmap** pixmap_opened, Gdk2.Bitmap** mask_opened, int* is_leaf, int* expanded) {
4246 return gtk_ctree_get_node_info(&this, node, text, spacing, pixmap_closed, mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
4248 // Unintrospectable method: insert_gnode() / gtk_ctree_insert_gnode()
4249 CTreeNode* insert_gnode()(CTreeNode* parent, CTreeNode* sibling, GLib2.Node* gnode, CTreeGNodeFunc func, void* data) {
4250 return gtk_ctree_insert_gnode(&this, parent, sibling, gnode, func, data);
4252 // Unintrospectable method: insert_node() / gtk_ctree_insert_node()
4253 CTreeNode* insert_node()(CTreeNode* parent, CTreeNode* sibling, char* text, ubyte spacing, Gdk2.Pixmap* pixmap_closed, Gdk2.Bitmap* mask_closed, Gdk2.Pixmap* pixmap_opened, Gdk2.Bitmap* mask_opened, int is_leaf, int expanded) {
4254 return gtk_ctree_insert_node(&this, parent, sibling, text, spacing, pixmap_closed, mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
4256 int is_ancestor()(CTreeNode* node, CTreeNode* child) {
4257 return gtk_ctree_is_ancestor(&this, node, child);
4259 int is_hot_spot()(int x, int y) {
4260 return gtk_ctree_is_hot_spot(&this, x, y);
4262 int is_viewable()(CTreeNode* node) {
4263 return gtk_ctree_is_viewable(&this, node);
4265 // Unintrospectable method: last() / gtk_ctree_last()
4266 CTreeNode* last()(CTreeNode* node) {
4267 return gtk_ctree_last(&this, node);
4269 void move()(CTreeNode* node, CTreeNode* new_parent=null, CTreeNode* new_sibling=null) {
4270 gtk_ctree_move(&this, node, new_parent, new_sibling);
4272 // Unintrospectable method: node_get_cell_style() / gtk_ctree_node_get_cell_style()
4273 Style* node_get_cell_style()(CTreeNode* node, int column) {
4274 return gtk_ctree_node_get_cell_style(&this, node, column);
4276 CellType node_get_cell_type()(CTreeNode* node, int column) {
4277 return gtk_ctree_node_get_cell_type(&this, node, column);
4279 int node_get_pixmap()(CTreeNode* node, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
4280 return gtk_ctree_node_get_pixmap(&this, node, column, pixmap, mask);
4282 int node_get_pixtext()(CTreeNode* node, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask) {
4283 return gtk_ctree_node_get_pixtext(&this, node, column, text, spacing, pixmap, mask);
4285 // Unintrospectable method: node_get_row_data() / gtk_ctree_node_get_row_data()
4286 void* node_get_row_data()(CTreeNode* node) {
4287 return gtk_ctree_node_get_row_data(&this, node);
4289 // Unintrospectable method: node_get_row_style() / gtk_ctree_node_get_row_style()
4290 Style* node_get_row_style()(CTreeNode* node) {
4291 return gtk_ctree_node_get_row_style(&this, node);
4293 int node_get_selectable()(CTreeNode* node) {
4294 return gtk_ctree_node_get_selectable(&this, node);
4296 int node_get_text()(CTreeNode* node, int column, char** text) {
4297 return gtk_ctree_node_get_text(&this, node, column, text);
4299 Visibility node_is_visible()(CTreeNode* node) {
4300 return gtk_ctree_node_is_visible(&this, node);
4302 void node_moveto()(CTreeNode* node, int column, float row_align, float col_align) {
4303 gtk_ctree_node_moveto(&this, node, column, row_align, col_align);
4305 // Unintrospectable method: node_nth() / gtk_ctree_node_nth()
4306 CTreeNode* node_nth()(uint row) {
4307 return gtk_ctree_node_nth(&this, row);
4309 void node_set_background()(CTreeNode* node, Gdk2.Color* color) {
4310 gtk_ctree_node_set_background(&this, node, color);
4312 void node_set_cell_style()(CTreeNode* node, int column, Style* style) {
4313 gtk_ctree_node_set_cell_style(&this, node, column, style);
4315 void node_set_foreground()(CTreeNode* node, Gdk2.Color* color) {
4316 gtk_ctree_node_set_foreground(&this, node, color);
4318 void node_set_pixmap()(CTreeNode* node, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
4319 gtk_ctree_node_set_pixmap(&this, node, column, pixmap, mask);
4321 void node_set_pixtext()(CTreeNode* node, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
4322 gtk_ctree_node_set_pixtext(&this, node, column, text, spacing, pixmap, mask);
4324 void node_set_row_data()(CTreeNode* node, void* data) {
4325 gtk_ctree_node_set_row_data(&this, node, data);
4327 void node_set_row_data_full()(CTreeNode* node, void* data, GLib2.DestroyNotify destroy) {
4328 gtk_ctree_node_set_row_data_full(&this, node, data, destroy);
4330 void node_set_row_style()(CTreeNode* node, Style* style) {
4331 gtk_ctree_node_set_row_style(&this, node, style);
4333 void node_set_selectable()(CTreeNode* node, int selectable) {
4334 gtk_ctree_node_set_selectable(&this, node, selectable);
4336 void node_set_shift()(CTreeNode* node, int column, int vertical, int horizontal) {
4337 gtk_ctree_node_set_shift(&this, node, column, vertical, horizontal);
4339 void node_set_text()(CTreeNode* node, int column, char* text) {
4340 gtk_ctree_node_set_text(&this, node, column, text);
4342 // Unintrospectable method: post_recursive() / gtk_ctree_post_recursive()
4343 void post_recursive()(CTreeNode* node, CTreeFunc func, void* data) {
4344 gtk_ctree_post_recursive(&this, node, func, data);
4346 // Unintrospectable method: post_recursive_to_depth() / gtk_ctree_post_recursive_to_depth()
4347 void post_recursive_to_depth()(CTreeNode* node, int depth, CTreeFunc func, void* data) {
4348 gtk_ctree_post_recursive_to_depth(&this, node, depth, func, data);
4350 // Unintrospectable method: pre_recursive() / gtk_ctree_pre_recursive()
4351 void pre_recursive()(CTreeNode* node, CTreeFunc func, void* data) {
4352 gtk_ctree_pre_recursive(&this, node, func, data);
4354 // Unintrospectable method: pre_recursive_to_depth() / gtk_ctree_pre_recursive_to_depth()
4355 void pre_recursive_to_depth()(CTreeNode* node, int depth, CTreeFunc func, void* data) {
4356 gtk_ctree_pre_recursive_to_depth(&this, node, depth, func, data);
4358 void real_select_recursive()(CTreeNode* node, int state) {
4359 gtk_ctree_real_select_recursive(&this, node, state);
4361 void remove_node()(CTreeNode* node) {
4362 gtk_ctree_remove_node(&this, node);
4364 void select()(CTreeNode* node) {
4365 gtk_ctree_select(&this, node);
4367 void select_recursive()(CTreeNode* node) {
4368 gtk_ctree_select_recursive(&this, node);
4370 // Unintrospectable method: set_drag_compare_func() / gtk_ctree_set_drag_compare_func()
4371 void set_drag_compare_func()(CTreeCompareDragFunc cmp_func) {
4372 gtk_ctree_set_drag_compare_func(&this, cmp_func);
4374 void set_expander_style()(CTreeExpanderStyle expander_style) {
4375 gtk_ctree_set_expander_style(&this, expander_style);
4377 void set_indent()(int indent) {
4378 gtk_ctree_set_indent(&this, indent);
4380 void set_line_style()(CTreeLineStyle line_style) {
4381 gtk_ctree_set_line_style(&this, line_style);
4383 void set_node_info()(CTreeNode* node, char* text, ubyte spacing, Gdk2.Pixmap* pixmap_closed, Gdk2.Bitmap* mask_closed, Gdk2.Pixmap* pixmap_opened, Gdk2.Bitmap* mask_opened, int is_leaf, int expanded) {
4384 gtk_ctree_set_node_info(&this, node, text, spacing, pixmap_closed, mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
4386 void set_show_stub()(int show_stub) {
4387 gtk_ctree_set_show_stub(&this, show_stub);
4389 void set_spacing()(int spacing) {
4390 gtk_ctree_set_spacing(&this, spacing);
4392 void sort_node()(CTreeNode* node) {
4393 gtk_ctree_sort_node(&this, node);
4395 void sort_recursive()(CTreeNode* node) {
4396 gtk_ctree_sort_recursive(&this, node);
4398 void toggle_expansion()(CTreeNode* node) {
4399 gtk_ctree_toggle_expansion(&this, node);
4401 void toggle_expansion_recursive()(CTreeNode* node) {
4402 gtk_ctree_toggle_expansion_recursive(&this, node);
4404 void unselect()(CTreeNode* node) {
4405 gtk_ctree_unselect(&this, node);
4407 void unselect_recursive()(CTreeNode* node) {
4408 gtk_ctree_unselect_recursive(&this, node);
4410 extern (C) alias static void function (CTree* this_, CTreeExpansionType* object, void* user_data=null) signal_change_focus_row_expansion;
4412 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4413 return super_.signal_connect!name(cb, data, cf);
4416 ulong signal_connect(string name:"change-focus-row-expansion", CB:signal_change_focus_row_expansion)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4417 return signal_connect_data!()(&this, cast(char*)"change-focus-row-expansion",
4418 cast(GObject2.Callback)cb, data, null, cf);
4420 // Unintrospectable glib:signal: tree-collapse() / ()
4421 extern (C) alias static void function (CTree* this_, void* object, void* user_data=null) signal_tree_collapse;
4422 ulong signal_connect(string name:"tree-collapse", CB:signal_tree_collapse)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4423 return signal_connect_data!()(&this, cast(char*)"tree-collapse",
4424 cast(GObject2.Callback)cb, data, null, cf);
4426 // Unintrospectable glib:signal: tree-expand() / ()
4427 extern (C) alias static void function (CTree* this_, void* object, void* user_data=null) signal_tree_expand;
4428 ulong signal_connect(string name:"tree-expand", CB:signal_tree_expand)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4429 return signal_connect_data!()(&this, cast(char*)"tree-expand",
4430 cast(GObject2.Callback)cb, data, null, cf);
4432 // Unintrospectable glib:signal: tree-move() / ()
4433 extern (C) alias static void function (CTree* this_, void* object, void* p0, void* p1, void* user_data=null) signal_tree_move;
4434 ulong signal_connect(string name:"tree-move", CB:signal_tree_move)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4435 return signal_connect_data!()(&this, cast(char*)"tree-move",
4436 cast(GObject2.Callback)cb, data, null, cf);
4438 // Unintrospectable glib:signal: tree-select-row() / ()
4439 extern (C) alias static void function (CTree* this_, void* object, int p0, void* user_data=null) signal_tree_select_row;
4440 ulong signal_connect(string name:"tree-select-row", CB:signal_tree_select_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4441 return signal_connect_data!()(&this, cast(char*)"tree-select-row",
4442 cast(GObject2.Callback)cb, data, null, cf);
4444 // Unintrospectable glib:signal: tree-unselect-row() / ()
4445 extern (C) alias static void function (CTree* this_, void* object, int p0, void* user_data=null) signal_tree_unselect_row;
4446 ulong signal_connect(string name:"tree-unselect-row", CB:signal_tree_unselect_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4447 return signal_connect_data!()(&this, cast(char*)"tree-unselect-row",
4448 cast(GObject2.Callback)cb, data, null, cf);
4452 struct CTreeClass {
4453 CListClass parent_class;
4454 extern (C) void function (CTree* ctree, CTreeNode* row, int column) tree_select_row;
4455 extern (C) void function (CTree* ctree, CTreeNode* row, int column) tree_unselect_row;
4456 extern (C) void function (CTree* ctree, CTreeNode* node) tree_expand;
4457 extern (C) void function (CTree* ctree, CTreeNode* node) tree_collapse;
4458 extern (C) void function (CTree* ctree, CTreeNode* node, CTreeNode* new_parent, CTreeNode* new_sibling) tree_move;
4459 extern (C) void function (CTree* ctree, CTreeExpansionType action) change_focus_row_expansion;
4462 extern (C) alias int function (CTree* ctree, CTreeNode* source_node, CTreeNode* new_parent, CTreeNode* new_sibling) CTreeCompareDragFunc;
4464 enum CTreeExpanderStyle {
4465 NONE = 0,
4466 SQUARE = 1,
4467 TRIANGLE = 2,
4468 CIRCULAR = 3
4470 enum CTreeExpansionType {
4471 EXPAND = 0,
4472 EXPAND_RECURSIVE = 1,
4473 COLLAPSE = 2,
4474 COLLAPSE_RECURSIVE = 3,
4475 TOGGLE = 4,
4476 TOGGLE_RECURSIVE = 5
4478 extern (C) alias void function (CTree* ctree, CTreeNode* node, void* data) CTreeFunc;
4480 extern (C) alias int function (CTree* ctree, uint depth, GLib2.Node* gnode, CTreeNode* cnode, void* data) CTreeGNodeFunc;
4482 enum CTreeLineStyle {
4483 NONE = 0,
4484 SOLID = 1,
4485 DOTTED = 2,
4486 TABBED = 3
4488 struct CTreeNode {
4489 GLib2.List list;
4492 enum CTreePos {
4493 BEFORE = 0,
4494 AS_CHILD = 1,
4495 AFTER = 2
4497 struct CTreeRow {
4498 CListRow row;
4499 CTreeNode* parent, sibling, children;
4500 Gdk2.Pixmap* pixmap_closed;
4501 Gdk2.Bitmap* mask_closed;
4502 Gdk2.Pixmap* pixmap_opened;
4503 Gdk2.Bitmap* mask_opened;
4504 ushort level;
4505 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
4506 uint, "is_leaf", 1,
4507 uint, "expanded", 1,
4508 uint, "__dummy32A", 30));
4511 struct Calendar /* : Widget */ {
4512 mixin Atk.ImplementorIface.__interface__;
4513 mixin Buildable.__interface__;
4514 alias widget this;
4515 alias widget super_;
4516 Widget widget;
4517 Style* header_style, label_style;
4518 int month, year, selected_day;
4519 int[6] day_month, day;
4520 int num_marked_dates;
4521 int[31] marked_date;
4522 CalendarDisplayOptions display_flags;
4523 Gdk2.Color[31] marked_date_color;
4524 Gdk2.GC* gc, xor_gc;
4525 int focus_row, focus_col, highlight_row, highlight_col;
4526 CalendarPrivate* priv;
4527 char[32] grow_space;
4528 extern (C) void function () _gtk_reserved1;
4529 extern (C) void function () _gtk_reserved2;
4530 extern (C) void function () _gtk_reserved3;
4531 extern (C) void function () _gtk_reserved4;
4534 // Creates a new calendar, with the current date being selected.
4535 // RETURNS: a newly #GtkCalendar widget
4536 static Calendar* new_()() {
4537 return gtk_calendar_new();
4539 // Remove all visual markers.
4540 void clear_marks()() {
4541 gtk_calendar_clear_marks(&this);
4544 // DEPRECATED (v2.4) method: display_options - Use gtk_calendar_set_display_options() instead
4545 // Sets display options (whether to display the heading and the month headings).
4546 // <flags>: the display options to set.
4547 void display_options()(CalendarDisplayOptions flags) {
4548 gtk_calendar_display_options(&this, flags);
4551 // Does nothing. Previously locked the display of the calendar until
4552 // it was thawed with gtk_calendar_thaw().
4553 void freeze()() {
4554 gtk_calendar_freeze(&this);
4557 // Obtains the selected date from a #GtkCalendar.
4558 // <year>: location to store the year as a decimal number (e.g. 2011), or %NULL
4559 // <month>: location to store the month number (between 0 and 11), or %NULL
4560 // <day>: location to store the day number (between 1 and 31), or %NULL
4561 void get_date()(/*out*/ uint* year=null, /*out*/ uint* month=null, /*out*/ uint* day=null) {
4562 gtk_calendar_get_date(&this, year, month, day);
4565 // VERSION: 2.14
4566 // Queries the height of detail cells, in rows.
4567 // See #GtkCalendar:detail-width-chars.
4568 // RETURNS: The height of detail cells, in rows.
4569 int get_detail_height_rows()() {
4570 return gtk_calendar_get_detail_height_rows(&this);
4573 // VERSION: 2.14
4574 // Queries the width of detail cells, in characters.
4575 // See #GtkCalendar:detail-width-chars.
4576 // RETURNS: The width of detail cells, in characters.
4577 int get_detail_width_chars()() {
4578 return gtk_calendar_get_detail_width_chars(&this);
4581 // VERSION: 2.4
4582 // Returns the current display options of @calendar.
4583 // RETURNS: the display options.
4584 CalendarDisplayOptions get_display_options()() {
4585 return gtk_calendar_get_display_options(&this);
4588 // Places a visual marker on a particular day.
4589 // Note that this function always returns %TRUE, and you should
4590 // ignore the return value. In GTK+ 3, this function will not
4591 // return a value.
4592 // RETURNS: %TRUE, always
4593 // <day>: the day number to mark between 1 and 31.
4594 int mark_day()(uint day) {
4595 return gtk_calendar_mark_day(&this, day);
4598 // Selects a day from the current month.
4599 // <day>: the day number between 1 and 31, or 0 to unselect the currently selected day.
4600 void select_day()(uint day) {
4601 gtk_calendar_select_day(&this, day);
4604 // Shifts the calendar to a different month.
4605 // Note that this function always returns %TRUE, and you should
4606 // ignore the return value. In GTK+ 3, this function will not
4607 // return a value.
4608 // RETURNS: %TRUE, always
4609 // <month>: a month number between 0 and 11.
4610 // <year>: the year the month is in.
4611 int select_month()(uint month, uint year) {
4612 return gtk_calendar_select_month(&this, month, year);
4615 // VERSION: 2.14
4616 // Installs a function which provides Pango markup with detail information
4617 // for each day. Examples for such details are holidays or appointments. That
4618 // information is shown below each day when #GtkCalendar:show-details is set.
4619 // A tooltip containing with full detail information is provided, if the entire
4620 // text should not fit into the details area, or if #GtkCalendar:show-details
4621 // is not set.
4622 // The size of the details area can be restricted by setting the
4623 // #GtkCalendar:detail-width-chars and #GtkCalendar:detail-height-rows
4624 // properties.
4625 // <func>: a function providing details for each day.
4626 // <data>: data to pass to @func invokations.
4627 // <destroy>: a function for releasing @data.
4628 void set_detail_func()(CalendarDetailFunc func, void* data, GLib2.DestroyNotify destroy) {
4629 gtk_calendar_set_detail_func(&this, func, data, destroy);
4632 // VERSION: 2.14
4633 // Updates the height of detail cells.
4634 // See #GtkCalendar:detail-height-rows.
4635 // <rows>: detail height in rows.
4636 void set_detail_height_rows()(int rows) {
4637 gtk_calendar_set_detail_height_rows(&this, rows);
4640 // VERSION: 2.14
4641 // Updates the width of detail cells.
4642 // See #GtkCalendar:detail-width-chars.
4643 // <chars>: detail width in characters.
4644 void set_detail_width_chars()(int chars) {
4645 gtk_calendar_set_detail_width_chars(&this, chars);
4648 // VERSION: 2.4
4649 // Sets display options (whether to display the heading and the month
4650 // headings).
4651 // <flags>: the display options to set
4652 void set_display_options()(CalendarDisplayOptions flags) {
4653 gtk_calendar_set_display_options(&this, flags);
4656 // Does nothing. Previously defrosted a calendar; all the changes made
4657 // since the last gtk_calendar_freeze() were displayed.
4658 void thaw()() {
4659 gtk_calendar_thaw(&this);
4662 // Removes the visual marker from a particular day.
4663 // Note that this function always returns %TRUE, and you should
4664 // ignore the return value. In GTK+ 3, this function will not
4665 // return a value.
4666 // RETURNS: %TRUE, always
4667 // <day>: the day number to unmark between 1 and 31.
4668 int unmark_day()(uint day) {
4669 return gtk_calendar_unmark_day(&this, day);
4671 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_day_selected;
4673 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4674 return super_.signal_connect!name(cb, data, cf);
4677 ulong signal_connect(string name:"day-selected", CB:signal_day_selected)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4678 return signal_connect_data!()(&this, cast(char*)"day-selected",
4679 cast(GObject2.Callback)cb, data, null, cf);
4681 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_day_selected_double_click;
4682 ulong signal_connect(string name:"day-selected-double-click", CB:signal_day_selected_double_click)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4683 return signal_connect_data!()(&this, cast(char*)"day-selected-double-click",
4684 cast(GObject2.Callback)cb, data, null, cf);
4687 // Emitted when the user clicks a button to change the selected month on a
4688 // calendar.
4689 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_month_changed;
4690 ulong signal_connect(string name:"month-changed", CB:signal_month_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4691 return signal_connect_data!()(&this, cast(char*)"month-changed",
4692 cast(GObject2.Callback)cb, data, null, cf);
4694 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_next_month;
4695 ulong signal_connect(string name:"next-month", CB:signal_next_month)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4696 return signal_connect_data!()(&this, cast(char*)"next-month",
4697 cast(GObject2.Callback)cb, data, null, cf);
4699 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_next_year;
4700 ulong signal_connect(string name:"next-year", CB:signal_next_year)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4701 return signal_connect_data!()(&this, cast(char*)"next-year",
4702 cast(GObject2.Callback)cb, data, null, cf);
4704 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_prev_month;
4705 ulong signal_connect(string name:"prev-month", CB:signal_prev_month)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4706 return signal_connect_data!()(&this, cast(char*)"prev-month",
4707 cast(GObject2.Callback)cb, data, null, cf);
4709 extern (C) alias static void function (Calendar* this_, void* user_data=null) signal_prev_year;
4710 ulong signal_connect(string name:"prev-year", CB:signal_prev_year)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4711 return signal_connect_data!()(&this, cast(char*)"prev-year",
4712 cast(GObject2.Callback)cb, data, null, cf);
4716 struct CalendarClass {
4717 WidgetClass parent_class;
4718 extern (C) void function (Calendar* calendar) month_changed;
4719 extern (C) void function (Calendar* calendar) day_selected;
4720 extern (C) void function (Calendar* calendar) day_selected_double_click;
4721 extern (C) void function (Calendar* calendar) prev_month;
4722 extern (C) void function (Calendar* calendar) next_month;
4723 extern (C) void function (Calendar* calendar) prev_year;
4724 extern (C) void function (Calendar* calendar) next_year;
4728 // VERSION: 2.14
4729 // This kind of functions provide Pango markup with detail information for the
4730 // specified day. Examples for such details are holidays or appointments. The
4731 // function returns %NULL when no information is available.
4732 // for the specified day, or %NULL.
4733 // RETURNS: Newly allocated string with Pango markup with details
4734 // <calendar>: a #GtkCalendar.
4735 // <year>: the year for which details are needed.
4736 // <month>: the month for which details are needed.
4737 // <day>: the day of @month for which details are needed.
4738 // <user_data>: the data passed with gtk_calendar_set_detail_func().
4739 extern (C) alias char* /*new*/ function (Calendar* calendar, uint year, uint month, uint day, void* user_data) CalendarDetailFunc;
4741 // These options can be used to influence the display and behaviour of a #GtkCalendar.
4742 enum CalendarDisplayOptions {
4743 SHOW_HEADING = 1,
4744 SHOW_DAY_NAMES = 2,
4745 NO_MONTH_CHANGE = 4,
4746 SHOW_WEEK_NUMBERS = 8,
4747 WEEK_START_MONDAY = 16,
4748 SHOW_DETAILS = 32
4750 struct CalendarPrivate {
4754 // The type of the callback functions used for e.g. iterating over
4755 // the children of a container, see gtk_container_foreach().
4756 // <widget>: the widget to operate on
4757 // <data>: user-supplied data
4758 extern (C) alias void function (Widget* widget, void* data) Callback;
4760 extern (C) alias void function (Object* object, void* data, uint n_args, Arg* args) CallbackMarshal;
4762 struct Cell {
4763 CellType type;
4764 short vertical, horizontal;
4765 Style* style;
4767 union u {
4768 char* text;
4770 struct pm {
4771 Gdk2.Pixmap* pixmap;
4772 Gdk2.Bitmap* mask;
4776 struct pt {
4777 char* text;
4778 ubyte spacing;
4779 Gdk2.Pixmap* pixmap;
4780 Gdk2.Bitmap* mask;
4783 Widget* widget;
4787 struct CellEditable /* Interface */ {
4788 mixin template __interface__() { // Emits the #GtkCellEditable::editing-done signal.
4789 void editing_done()() {
4790 gtk_cell_editable_editing_done(cast(CellEditable*)&this);
4792 // Emits the #GtkCellEditable::remove-widget signal.
4793 void remove_widget()() {
4794 gtk_cell_editable_remove_widget(cast(CellEditable*)&this);
4797 // Begins editing on a @cell_editable. @event is the #GdkEvent that began
4798 // the editing process. It may be %NULL, in the instance that editing was
4799 // initiated through programatic means.
4800 // <event>: A #GdkEvent, or %NULL
4801 void start_editing()(Gdk2.Event* event=null) {
4802 gtk_cell_editable_start_editing(cast(CellEditable*)&this, event);
4805 // This signal is a sign for the cell renderer to update its
4806 // value from the @cell_editable.
4807 // Implementations of #GtkCellEditable are responsible for
4808 // emitting this signal when they are done editing, e.g.
4809 // #GtkEntry is emitting it when the user presses Enter.
4810 // gtk_cell_editable_editing_done() is a convenience method
4811 // for emitting GtkCellEditable::editing-done.
4812 extern (C) alias static void function (CellEditable* this_, void* user_data=null) signal_editing_done;
4814 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4815 return super_.signal_connect!name(cb, data, cf);
4818 ulong signal_connect(string name:"editing-done", CB:signal_editing_done)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4819 return signal_connect_data!()(&this, cast(char*)"editing-done",
4820 cast(GObject2.Callback)cb, data, null, cf);
4823 // This signal is meant to indicate that the cell is finished
4824 // editing, and the widget may now be destroyed.
4825 // Implementations of #GtkCellEditable are responsible for
4826 // emitting this signal when they are done editing. It must
4827 // be emitted after the #GtkCellEditable::editing-done signal,
4828 // to give the cell renderer a chance to update the cell's value
4829 // before the widget is removed.
4830 // gtk_cell_editable_remove_widget() is a convenience method
4831 // for emitting GtkCellEditable::remove-widget.
4832 extern (C) alias static void function (CellEditable* this_, void* user_data=null) signal_remove_widget;
4833 ulong signal_connect(string name:"remove-widget", CB:signal_remove_widget)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4834 return signal_connect_data!()(&this, cast(char*)"remove-widget",
4835 cast(GObject2.Callback)cb, data, null, cf);
4838 mixin __interface__;
4841 struct CellEditableIface {
4842 GObject2.TypeInterface g_iface;
4843 extern (C) void function (CellEditable* cell_editable) editing_done;
4844 extern (C) void function (CellEditable* cell_editable) remove_widget;
4845 // <event>: A #GdkEvent, or %NULL
4846 extern (C) void function (CellEditable* cell_editable, Gdk2.Event* event=null) start_editing;
4849 struct CellLayout /* Interface */ {
4850 mixin template __interface__() {
4851 // VERSION: 2.4
4852 // Adds an attribute mapping to the list in @cell_layout. The @column is the
4853 // column of the model to get a value from, and the @attribute is the
4854 // parameter on @cell to be set from the value. So for example if column 2
4855 // of the model contains strings, you could have the "text" attribute of a
4856 // #GtkCellRendererText get its values from column 2.
4857 // <cell>: A #GtkCellRenderer.
4858 // <attribute>: An attribute on the renderer.
4859 // <column>: The column position on the model to get the attribute from.
4860 void add_attribute()(CellRenderer* cell, char* attribute, int column) {
4861 gtk_cell_layout_add_attribute(cast(CellLayout*)&this, cell, attribute, column);
4864 // VERSION: 2.4
4865 // Unsets all the mappings on all renderers on @cell_layout and
4866 // removes all renderers from @cell_layout.
4867 void clear()() {
4868 gtk_cell_layout_clear(cast(CellLayout*)&this);
4871 // VERSION: 2.4
4872 // Clears all existing attributes previously set with
4873 // gtk_cell_layout_set_attributes().
4874 // <cell>: A #GtkCellRenderer to clear the attribute mapping on.
4875 void clear_attributes()(CellRenderer* cell) {
4876 gtk_cell_layout_clear_attributes(cast(CellLayout*)&this, cell);
4879 // VERSION: 2.12
4880 // Returns the cell renderers which have been added to @cell_layout.
4881 // renderers has been newly allocated and should be freed with
4882 // g_list_free() when no longer needed.
4883 // RETURNS: a list of cell renderers. The list, but not the
4884 GLib2.List* /*new container*/ get_cells()() {
4885 return gtk_cell_layout_get_cells(cast(CellLayout*)&this);
4888 // VERSION: 2.4
4889 // Adds the @cell to the end of @cell_layout. If @expand is %FALSE, then the
4890 // divided evenly between cells for which @expand is %TRUE.
4891 // Note that reusing the same cell renderer is not supported.
4892 // <cell>: A #GtkCellRenderer.
4893 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4894 void pack_end()(CellRenderer* cell, int expand) {
4895 gtk_cell_layout_pack_end(cast(CellLayout*)&this, cell, expand);
4898 // VERSION: 2.4
4899 // Packs the @cell into the beginning of @cell_layout. If @expand is %FALSE,
4900 // then the @cell is allocated no more space than it needs. Any unused space
4901 // is divided evenly between cells for which @expand is %TRUE.
4902 // Note that reusing the same cell renderer is not supported.
4903 // <cell>: A #GtkCellRenderer.
4904 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4905 void pack_start()(CellRenderer* cell, int expand) {
4906 gtk_cell_layout_pack_start(cast(CellLayout*)&this, cell, expand);
4909 // VERSION: 2.4
4910 // Re-inserts @cell at @position. Note that @cell has already to be packed
4911 // into @cell_layout for this to function properly.
4912 // <cell>: A #GtkCellRenderer to reorder.
4913 // <position>: New position to insert @cell at.
4914 void reorder()(CellRenderer* cell, int position) {
4915 gtk_cell_layout_reorder(cast(CellLayout*)&this, cell, position);
4918 // Unintrospectable method: set_attributes() / gtk_cell_layout_set_attributes()
4919 // VERSION: 2.4
4920 // Sets the attributes in list as the attributes of @cell_layout. The
4921 // attributes should be in attribute/column order, as in
4922 // gtk_cell_layout_add_attribute(). All existing attributes are removed, and
4923 // replaced with the new attributes.
4924 // <cell>: A #GtkCellRenderer.
4925 /+ Not available -- variadic methods unsupported - use the C function directly.
4926 alias gtk_cell_layout_set_attributes set_attributes; // Variadic
4929 // VERSION: 2.4
4930 // Sets the #GtkCellLayoutDataFunc to use for @cell_layout. This function
4931 // is used instead of the standard attributes mapping for setting the
4932 // column value, and should set the value of @cell_layout's cell renderer(s)
4933 // as appropriate. @func may be %NULL to remove and older one.
4934 // <cell>: A #GtkCellRenderer.
4935 // <func>: The #GtkCellLayoutDataFunc to use.
4936 // <func_data>: The user data for @func.
4937 // <destroy>: The destroy notification for @func_data.
4938 void set_cell_data_func()(CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy) {
4939 gtk_cell_layout_set_cell_data_func(cast(CellLayout*)&this, cell, func, func_data, destroy);
4942 mixin __interface__;
4945 extern (C) alias void function (CellLayout* cell_layout, CellRenderer* cell, TreeModel* tree_model, TreeIter* iter, void* data) CellLayoutDataFunc;
4947 struct CellLayoutIface {
4948 GObject2.TypeInterface g_iface;
4950 // <cell>: A #GtkCellRenderer.
4951 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4952 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int expand) pack_start;
4954 // <cell>: A #GtkCellRenderer.
4955 // <expand>: %TRUE if @cell is to be given extra space allocated to @cell_layout.
4956 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int expand) pack_end;
4957 extern (C) void function (CellLayout* cell_layout) clear;
4959 // <cell>: A #GtkCellRenderer.
4960 // <attribute>: An attribute on the renderer.
4961 // <column>: The column position on the model to get the attribute from.
4962 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, char* attribute, int column) add_attribute;
4964 // <cell>: A #GtkCellRenderer.
4965 // <func>: The #GtkCellLayoutDataFunc to use.
4966 // <func_data>: The user data for @func.
4967 // <destroy>: The destroy notification for @func_data.
4968 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy) set_cell_data_func;
4969 // <cell>: A #GtkCellRenderer to clear the attribute mapping on.
4970 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell) clear_attributes;
4972 // <cell>: A #GtkCellRenderer to reorder.
4973 // <position>: New position to insert @cell at.
4974 extern (C) void function (CellLayout* cell_layout, CellRenderer* cell, int position) reorder;
4975 // RETURNS: a list of cell renderers. The list, but not the
4976 extern (C) GLib2.List* /*new container*/ function (CellLayout* cell_layout) get_cells;
4979 struct CellPixText {
4980 CellType type;
4981 short vertical, horizontal;
4982 Style* style;
4983 char* text;
4984 ubyte spacing;
4985 Gdk2.Pixmap* pixmap;
4986 Gdk2.Bitmap* mask;
4989 struct CellPixmap {
4990 CellType type;
4991 short vertical, horizontal;
4992 Style* style;
4993 Gdk2.Pixmap* pixmap;
4994 Gdk2.Bitmap* mask;
4997 struct CellRenderer /* : Object */ {
4998 alias parent this;
4999 alias parent super_;
5000 alias parent object;
5001 Object parent;
5002 float xalign, yalign;
5003 int width, height;
5004 ushort xpad, ypad;
5005 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5006 uint, "mode", 2,
5007 uint, "visible", 1,
5008 uint, "is_expander", 1,
5009 uint, "is_expanded", 1,
5010 uint, "cell_background_set", 1,
5011 uint, "sensitive", 1,
5012 uint, "editing", 1,
5013 uint, "__dummy32A", 24));
5016 // Passes an activate event to the cell renderer for possible processing.
5017 // Some cell renderers may use events; for example, #GtkCellRendererToggle
5018 // toggles when it gets a mouse click.
5019 // RETURNS: %TRUE if the event was consumed/handled
5020 // <event>: a #GdkEvent
5021 // <widget>: widget that received the event
5022 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5023 // <background_area>: background area as passed to gtk_cell_renderer_render()
5024 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5025 // <flags>: render flags
5026 int activate()(Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) {
5027 return gtk_cell_renderer_activate(&this, event, widget, path, background_area, cell_area, flags);
5030 // VERSION: 2.4
5031 // DEPRECATED (v2.6) method: editing_canceled - Use gtk_cell_renderer_stop_editing() instead
5032 // Causes the cell renderer to emit the #GtkCellRenderer::editing-canceled
5033 // signal.
5034 // This function is for use only by implementations of cell renderers that
5035 // need to notify the client program that an editing process was canceled
5036 // and the changes were not committed.
5037 void editing_canceled()() {
5038 gtk_cell_renderer_editing_canceled(&this);
5041 // VERSION: 2.18
5042 // Fills in @xalign and @yalign with the appropriate values of @cell.
5043 // <xalign>: location to fill in with the x alignment of the cell, or %NULL
5044 // <yalign>: location to fill in with the y alignment of the cell, or %NULL
5045 void get_alignment()(/*out*/ float* xalign=null, /*out*/ float* yalign=null) {
5046 gtk_cell_renderer_get_alignment(&this, xalign, yalign);
5049 // Fills in @width and @height with the appropriate size of @cell.
5050 // <width>: location to fill in with the fixed width of the cell, or %NULL
5051 // <height>: location to fill in with the fixed height of the cell, or %NULL
5052 void get_fixed_size()(/*out*/ int* width=null, /*out*/ int* height=null) {
5053 gtk_cell_renderer_get_fixed_size(&this, width, height);
5056 // VERSION: 2.18
5057 // Fills in @xpad and @ypad with the appropriate values of @cell.
5058 // <xpad>: location to fill in with the x padding of the cell, or %NULL
5059 // <ypad>: location to fill in with the y padding of the cell, or %NULL
5060 void get_padding()(/*out*/ int* xpad=null, /*out*/ int* ypad=null) {
5061 gtk_cell_renderer_get_padding(&this, xpad, ypad);
5064 // VERSION: 2.18
5065 // Returns the cell renderer's sensitivity.
5066 // RETURNS: %TRUE if the cell renderer is sensitive
5067 int get_sensitive()() {
5068 return gtk_cell_renderer_get_sensitive(&this);
5071 // Obtains the width and height needed to render the cell. Used by view
5072 // widgets to determine the appropriate size for the cell_area passed to
5073 // gtk_cell_renderer_render(). If @cell_area is not %NULL, fills in the
5074 // x and y offsets (if set) of the cell relative to this location.
5075 // Please note that the values set in @width and @height, as well as those
5076 // in @x_offset and @y_offset are inclusive of the xpad and ypad properties.
5077 // <widget>: the widget the renderer is rendering to
5078 // <cell_area>: The area a cell will be allocated, or %NULL
5079 // <x_offset>: location to return x offset of cell relative to @cell_area, or %NULL
5080 // <y_offset>: location to return y offset of cell relative to @cell_area, or %NULL
5081 // <width>: location to return width needed to render a cell, or %NULL
5082 // <height>: location to return height needed to render a cell, or %NULL
5083 void get_size()(Widget* widget, Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) {
5084 gtk_cell_renderer_get_size(&this, widget, cell_area, x_offset, y_offset, width, height);
5087 // VERSION: 2.18
5088 // Returns the cell renderer's visibility.
5089 // RETURNS: %TRUE if the cell renderer is visible
5090 int get_visible()() {
5091 return gtk_cell_renderer_get_visible(&this);
5094 // Invokes the virtual render function of the #GtkCellRenderer. The three
5095 // passed-in rectangles are areas of @window. Most renderers will draw within
5096 // should be honored with respect to @cell_area. @background_area includes the
5097 // blank space around the cell, and also the area containing the tree expander;
5098 // so the @background_area rectangles for all cells tile to cover the entire
5099 // <window>: a #GdkDrawable to draw to
5100 // <widget>: the widget owning @window
5101 // <background_area>: entire cell area (including tree expanders and maybe padding on the sides)
5102 // <cell_area>: area normally rendered by a cell renderer
5103 // <expose_area>: area that actually needs updating
5104 // <flags>: flags that affect rendering
5105 void render()(Gdk2.Window* window, Widget* widget, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, Gdk2.Rectangle* expose_area, CellRendererState flags) {
5106 gtk_cell_renderer_render(&this, window, widget, background_area, cell_area, expose_area, flags);
5109 // VERSION: 2.18
5110 // Sets the renderer's alignment within its available space.
5111 // <xalign>: the x alignment of the cell renderer
5112 // <yalign>: the y alignment of the cell renderer
5113 void set_alignment()(float xalign, float yalign) {
5114 gtk_cell_renderer_set_alignment(&this, xalign, yalign);
5117 // Sets the renderer size to be explicit, independent of the properties set.
5118 // <width>: the width of the cell renderer, or -1
5119 // <height>: the height of the cell renderer, or -1
5120 void set_fixed_size()(int width, int height) {
5121 gtk_cell_renderer_set_fixed_size(&this, width, height);
5124 // VERSION: 2.18
5125 // Sets the renderer's padding.
5126 // <xpad>: the x padding of the cell renderer
5127 // <ypad>: the y padding of the cell renderer
5128 void set_padding()(int xpad, int ypad) {
5129 gtk_cell_renderer_set_padding(&this, xpad, ypad);
5132 // VERSION: 2.18
5133 // Sets the cell renderer's sensitivity.
5134 // <sensitive>: the sensitivity of the cell
5135 void set_sensitive()(int sensitive) {
5136 gtk_cell_renderer_set_sensitive(&this, sensitive);
5139 // VERSION: 2.18
5140 // Sets the cell renderer's visibility.
5141 // <visible>: the visibility of the cell
5142 void set_visible()(int visible) {
5143 gtk_cell_renderer_set_visible(&this, visible);
5146 // Passes an activate event to the cell renderer for possible processing.
5147 // RETURNS: A new #GtkCellEditable, or %NULL
5148 // <event>: a #GdkEvent
5149 // <widget>: widget that received the event
5150 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5151 // <background_area>: background area as passed to gtk_cell_renderer_render()
5152 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5153 // <flags>: render flags
5154 CellEditable* start_editing()(Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) {
5155 return gtk_cell_renderer_start_editing(&this, event, widget, path, background_area, cell_area, flags);
5158 // VERSION: 2.6
5159 // Informs the cell renderer that the editing is stopped.
5160 // If @canceled is %TRUE, the cell renderer will emit the
5161 // #GtkCellRenderer::editing-canceled signal.
5162 // This function should be called by cell renderer implementations
5163 // in response to the #GtkCellEditable::editing-done signal of
5164 // #GtkCellEditable.
5165 // <canceled>: %TRUE if the editing has been canceled
5166 void stop_editing()(int canceled) {
5167 gtk_cell_renderer_stop_editing(&this, canceled);
5170 // VERSION: 2.4
5171 // This signal gets emitted when the user cancels the process of editing a
5172 // cell. For example, an editable cell renderer could be written to cancel
5173 // editing when the user presses Escape.
5174 extern (C) alias static void function (CellRenderer* this_, void* user_data=null) signal_editing_canceled;
5176 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5177 return super_.signal_connect!name(cb, data, cf);
5180 ulong signal_connect(string name:"editing-canceled", CB:signal_editing_canceled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5181 return signal_connect_data!()(&this, cast(char*)"editing-canceled",
5182 cast(GObject2.Callback)cb, data, null, cf);
5185 // VERSION: 2.6
5186 // This signal gets emitted when a cell starts to be edited.
5187 // The intended use of this signal is to do special setup
5188 // on @editable, e.g. adding a #GtkEntryCompletion or setting
5189 // up additional columns in a #GtkComboBox.
5190 // Note that GTK+ doesn't guarantee that cell renderers will
5191 // continue to use the same kind of widget for editing in future
5192 // releases, therefore you should check the type of @editable
5193 // before doing any specific setup, as in the following example:
5194 // |[
5195 // static void
5196 // text_editing_started (GtkCellRenderer *cell,
5197 // GtkCellEditable *editable,
5198 // const gchar *path,
5199 // gpointer data)
5200 // {
5201 // if (GTK_IS_ENTRY (editable))
5202 // {
5203 // GtkEntry *entry = GTK_ENTRY (editable);
5204 // /&ast; ... create a GtkEntryCompletion &ast;/
5205 // gtk_entry_set_completion (entry, completion);
5206 // }
5207 // }
5208 // ]|
5209 // <editable>: the #GtkCellEditable
5210 // <path>: the path identifying the edited cell
5211 extern (C) alias static void function (CellRenderer* this_, CellEditable* editable, char* path, void* user_data=null) signal_editing_started;
5212 ulong signal_connect(string name:"editing-started", CB:signal_editing_started)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5213 return signal_connect_data!()(&this, cast(char*)"editing-started",
5214 cast(GObject2.Callback)cb, data, null, cf);
5218 struct CellRendererAccel /* : CellRendererText */ {
5219 alias parent this;
5220 alias parent super_;
5221 alias parent cellrenderertext;
5222 CellRendererText parent;
5223 private uint accel_key;
5224 private Gdk2.ModifierType accel_mods;
5225 private uint keycode;
5226 private CellRendererAccelMode accel_mode;
5227 private Widget* edit_widget, grab_widget, sizing_label;
5230 // VERSION: 2.10
5231 // Creates a new #GtkCellRendererAccel.
5232 // RETURNS: the new cell renderer
5233 static CellRendererAccel* new_()() {
5234 return gtk_cell_renderer_accel_new();
5237 // VERSION: 2.10
5238 // Gets emitted when the user has removed the accelerator.
5239 // <path_string>: the path identifying the row of the edited cell
5240 extern (C) alias static void function (CellRendererAccel* this_, char* path_string, void* user_data=null) signal_accel_cleared;
5242 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5243 return super_.signal_connect!name(cb, data, cf);
5246 ulong signal_connect(string name:"accel-cleared", CB:signal_accel_cleared)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5247 return signal_connect_data!()(&this, cast(char*)"accel-cleared",
5248 cast(GObject2.Callback)cb, data, null, cf);
5251 // VERSION: 2.10
5252 // Gets emitted when the user has selected a new accelerator.
5253 // <path_string>: the path identifying the row of the edited cell
5254 // <accel_key>: the new accelerator keyval
5255 // <accel_mods>: the new acclerator modifier mask
5256 // <hardware_keycode>: the keycode of the new accelerator
5257 extern (C) alias static void function (CellRendererAccel* this_, char* path_string, c_uint accel_key, Gdk2.ModifierType* accel_mods, c_uint hardware_keycode, void* user_data=null) signal_accel_edited;
5258 ulong signal_connect(string name:"accel-edited", CB:signal_accel_edited)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5259 return signal_connect_data!()(&this, cast(char*)"accel-edited",
5260 cast(GObject2.Callback)cb, data, null, cf);
5264 struct CellRendererAccelClass {
5265 CellRendererTextClass parent_class;
5266 extern (C) void function (CellRendererAccel* accel, char* path_string, uint accel_key, Gdk2.ModifierType accel_mods, uint hardware_keycode) accel_edited;
5267 extern (C) void function (CellRendererAccel* accel, char* path_string) accel_cleared;
5268 extern (C) void function () _gtk_reserved0;
5269 extern (C) void function () _gtk_reserved1;
5270 extern (C) void function () _gtk_reserved2;
5271 extern (C) void function () _gtk_reserved3;
5272 extern (C) void function () _gtk_reserved4;
5275 enum CellRendererAccelMode {
5276 GTK = 0,
5277 OTHER = 1
5279 struct CellRendererClass {
5280 ObjectClass parent_class;
5282 // <widget>: the widget the renderer is rendering to
5283 // <cell_area>: The area a cell will be allocated, or %NULL
5284 // <x_offset>: location to return x offset of cell relative to @cell_area, or %NULL
5285 // <y_offset>: location to return y offset of cell relative to @cell_area, or %NULL
5286 // <width>: location to return width needed to render a cell, or %NULL
5287 // <height>: location to return height needed to render a cell, or %NULL
5288 extern (C) void function (CellRenderer* cell, Widget* widget, Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) get_size;
5290 // <window>: a #GdkDrawable to draw to
5291 // <widget>: the widget owning @window
5292 // <background_area>: entire cell area (including tree expanders and maybe padding on the sides)
5293 // <cell_area>: area normally rendered by a cell renderer
5294 // <expose_area>: area that actually needs updating
5295 // <flags>: flags that affect rendering
5296 extern (C) void function (CellRenderer* cell, Gdk2.Drawable* window, Widget* widget, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, Gdk2.Rectangle* expose_area, CellRendererState flags) render;
5298 // RETURNS: %TRUE if the event was consumed/handled
5299 // <event>: a #GdkEvent
5300 // <widget>: widget that received the event
5301 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5302 // <background_area>: background area as passed to gtk_cell_renderer_render()
5303 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5304 // <flags>: render flags
5305 extern (C) int function (CellRenderer* cell, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) activate;
5307 // RETURNS: A new #GtkCellEditable, or %NULL
5308 // <event>: a #GdkEvent
5309 // <widget>: widget that received the event
5310 // <path>: widget-dependent string representation of the event location; e.g. for #GtkTreeView, a string representation of #GtkTreePath
5311 // <background_area>: background area as passed to gtk_cell_renderer_render()
5312 // <cell_area>: cell area as passed to gtk_cell_renderer_render()
5313 // <flags>: render flags
5314 extern (C) CellEditable* function (CellRenderer* cell, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags) start_editing;
5315 extern (C) void function (CellRenderer* cell) editing_canceled;
5316 extern (C) void function (CellRenderer* cell, CellEditable* editable, char* path) editing_started;
5317 extern (C) void function () _gtk_reserved1;
5318 extern (C) void function () _gtk_reserved2;
5321 struct CellRendererCombo /* : CellRendererText */ {
5322 alias parent this;
5323 alias parent super_;
5324 alias parent cellrenderertext;
5325 CellRendererText parent;
5326 TreeModel* model;
5327 int text_column;
5328 int has_entry;
5329 private uint focus_out_id;
5332 // VERSION: 2.6
5333 // Creates a new #GtkCellRendererCombo.
5334 // Adjust how text is drawn using object properties.
5335 // Object properties can be set globally (with g_object_set()).
5336 // Also, with #GtkTreeViewColumn, you can bind a property to a value
5337 // in a #GtkTreeModel. For example, you can bind the "text" property
5338 // on the cell renderer to a string value in the model, thus rendering
5339 // a different string in each row of the #GtkTreeView.
5340 // RETURNS: the new cell renderer
5341 static CellRendererCombo* new_()() {
5342 return gtk_cell_renderer_combo_new();
5345 // VERSION: 2.14
5346 // This signal is emitted each time after the user selected an item in
5347 // the combo box, either by using the mouse or the arrow keys. Contrary
5348 // to GtkComboBox, GtkCellRendererCombo::changed is not emitted for
5349 // changes made to a selected item in the entry. The argument @new_iter
5350 // corresponds to the newly selected item in the combo box and it is relative
5351 // to the GtkTreeModel set via the model property on GtkCellRendererCombo.
5352 // Note that as soon as you change the model displayed in the tree view,
5353 // the tree view will immediately cease the editing operating. This
5354 // means that you most probably want to refrain from changing the model
5355 // until the combo cell renderer emits the edited or editing_canceled signal.
5356 // <path_string>: a string of the path identifying the edited cell (relative to the tree view model)
5357 // <new_iter>: the new iter selected in the combo box (relative to the combo box model)
5358 extern (C) alias static void function (CellRendererCombo* this_, char* path_string, TreeIter* new_iter, void* user_data=null) signal_changed;
5360 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5361 return super_.signal_connect!name(cb, data, cf);
5364 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5365 return signal_connect_data!()(&this, cast(char*)"changed",
5366 cast(GObject2.Callback)cb, data, null, cf);
5370 struct CellRendererComboClass {
5371 CellRendererTextClass parent;
5374 enum CellRendererMode {
5375 INERT = 0,
5376 ACTIVATABLE = 1,
5377 EDITABLE = 2
5379 struct CellRendererPixbuf /* : CellRenderer */ {
5380 alias parent this;
5381 alias parent super_;
5382 alias parent cellrenderer;
5383 CellRenderer parent;
5384 private GdkPixbuf2.Pixbuf* pixbuf, pixbuf_expander_open, pixbuf_expander_closed;
5387 // Creates a new #GtkCellRendererPixbuf. Adjust rendering
5388 // parameters using object properties. Object properties can be set
5389 // globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
5390 // can bind a property to a value in a #GtkTreeModel. For example, you
5391 // can bind the "pixbuf" property on the cell renderer to a pixbuf value
5392 // in the model, thus rendering a different image in each row of the
5393 // #GtkTreeView.
5394 // RETURNS: the new cell renderer
5395 static CellRendererPixbuf* new_()() {
5396 return gtk_cell_renderer_pixbuf_new();
5400 struct CellRendererPixbufClass {
5401 CellRendererClass parent_class;
5402 extern (C) void function () _gtk_reserved1;
5403 extern (C) void function () _gtk_reserved2;
5404 extern (C) void function () _gtk_reserved3;
5405 extern (C) void function () _gtk_reserved4;
5408 struct CellRendererProgress /* : CellRenderer */ {
5409 alias parent_instance this;
5410 alias parent_instance super_;
5411 alias parent_instance cellrenderer;
5412 CellRenderer parent_instance;
5413 private CellRendererProgressPrivate* priv;
5416 // VERSION: 2.6
5417 // Creates a new #GtkCellRendererProgress.
5418 // RETURNS: the new cell renderer
5419 static CellRendererProgress* new_()() {
5420 return gtk_cell_renderer_progress_new();
5424 struct CellRendererProgressClass {
5425 CellRendererClass parent_class;
5426 extern (C) void function () _gtk_reserved1;
5427 extern (C) void function () _gtk_reserved2;
5428 extern (C) void function () _gtk_reserved3;
5429 extern (C) void function () _gtk_reserved4;
5432 struct CellRendererProgressPrivate {
5435 struct CellRendererSpin /* : CellRendererText */ {
5436 alias parent this;
5437 alias parent super_;
5438 alias parent cellrenderertext;
5439 CellRendererText parent;
5442 // VERSION: 2.10
5443 // Creates a new #GtkCellRendererSpin.
5444 // RETURNS: a new #GtkCellRendererSpin
5445 static CellRendererSpin* new_()() {
5446 return gtk_cell_renderer_spin_new();
5450 struct CellRendererSpinClass {
5451 CellRendererTextClass parent;
5454 struct CellRendererSpinPrivate {
5458 // GtkCellRendererSpinner renders a spinning animation in a cell, very
5459 // similar to #GtkSpinner. It can often be used as an alternative
5460 // to a #GtkCellRendererProgress for displaying indefinite activity,
5461 // instead of actual progress.
5462 // To start the animation in a cell, set the #GtkCellRendererSpinner:active
5463 // property to %TRUE and increment the #GtkCellRendererSpinner:pulse property
5464 // at regular intervals. The usual way to set the cell renderer properties
5465 // for each cell is to bind them to columns in your tree model using e.g.
5466 // gtk_tree_view_column_add_attribute().
5467 struct CellRendererSpinner /* : CellRenderer */ {
5468 alias parent this;
5469 alias parent super_;
5470 alias parent cellrenderer;
5471 CellRenderer parent;
5472 CellRendererSpinnerPrivate* priv;
5475 // VERSION: 2.20
5476 // Returns a new cell renderer which will show a spinner to indicate
5477 // activity.
5478 // RETURNS: a new #GtkCellRenderer
5479 static CellRendererSpinner* new_()() {
5480 return gtk_cell_renderer_spinner_new();
5484 struct CellRendererSpinnerClass {
5485 CellRendererClass parent_class;
5486 extern (C) void function () _gtk_reserved1;
5487 extern (C) void function () _gtk_reserved2;
5488 extern (C) void function () _gtk_reserved3;
5489 extern (C) void function () _gtk_reserved4;
5492 struct CellRendererSpinnerPrivate {
5495 enum CellRendererState {
5496 SELECTED = 1,
5497 PRELIT = 2,
5498 INSENSITIVE = 4,
5499 SORTED = 8,
5500 FOCUSED = 16
5502 struct CellRendererText /* : CellRenderer */ {
5503 alias parent this;
5504 alias parent super_;
5505 alias parent cellrenderer;
5506 CellRenderer parent;
5507 private char* text;
5508 private Pango.FontDescription* font;
5509 private double font_scale;
5510 private Pango.Color foreground, background;
5511 private Pango.AttrList* extra_attrs;
5512 private Pango.Underline underline_style;
5513 private int rise, fixed_height_rows;
5514 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5515 uint, "strikethrough", 1,
5516 uint, "editable", 1,
5517 uint, "scale_set", 1,
5518 uint, "foreground_set", 1,
5519 uint, "background_set", 1,
5520 uint, "underline_set", 1,
5521 uint, "rise_set", 1,
5522 uint, "strikethrough_set", 1,
5523 uint, "editable_set", 1,
5524 uint, "calc_fixed_height", 1,
5525 uint, "__dummy32A", 22));
5528 // Creates a new #GtkCellRendererText. Adjust how text is drawn using
5529 // object properties. Object properties can be
5530 // set globally (with g_object_set()). Also, with #GtkTreeViewColumn,
5531 // you can bind a property to a value in a #GtkTreeModel. For example,
5532 // you can bind the "text" property on the cell renderer to a string
5533 // value in the model, thus rendering a different string in each row
5534 // of the #GtkTreeView
5535 // RETURNS: the new cell renderer
5536 static CellRendererText* new_()() {
5537 return gtk_cell_renderer_text_new();
5540 // Sets the height of a renderer to explicitly be determined by the "font" and
5541 // "y_pad" property set on it. Further changes in these properties do not
5542 // affect the height, so they must be accompanied by a subsequent call to this
5543 // function. Using this function is unflexible, and should really only be used
5544 // if calculating the size of a cell is too slow (ie, a massive number of cells
5545 // displayed). If @number_of_rows is -1, then the fixed height is unset, and
5546 // the height is determined by the properties again.
5547 // <number_of_rows>: Number of rows of text each cell renderer is allocated, or -1
5548 void set_fixed_height_from_font()(int number_of_rows) {
5549 gtk_cell_renderer_text_set_fixed_height_from_font(&this, number_of_rows);
5552 // This signal is emitted after @renderer has been edited.
5553 // It is the responsibility of the application to update the model
5554 // and store @new_text at the position indicated by @path.
5555 // <path>: the path identifying the edited cell
5556 // <new_text>: the new text
5557 extern (C) alias static void function (CellRendererText* this_, char* path, char* new_text, void* user_data=null) signal_edited;
5559 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5560 return super_.signal_connect!name(cb, data, cf);
5563 ulong signal_connect(string name:"edited", CB:signal_edited)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5564 return signal_connect_data!()(&this, cast(char*)"edited",
5565 cast(GObject2.Callback)cb, data, null, cf);
5569 struct CellRendererTextClass {
5570 CellRendererClass parent_class;
5571 extern (C) void function (CellRendererText* cell_renderer_text, char* path, char* new_text) edited;
5572 extern (C) void function () _gtk_reserved1;
5573 extern (C) void function () _gtk_reserved2;
5574 extern (C) void function () _gtk_reserved3;
5575 extern (C) void function () _gtk_reserved4;
5578 struct CellRendererToggle /* : CellRenderer */ {
5579 alias parent this;
5580 alias parent super_;
5581 alias parent cellrenderer;
5582 CellRenderer parent;
5583 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5584 uint, "active", 1,
5585 uint, "activatable", 1,
5586 uint, "radio", 1,
5587 uint, "__dummy32A", 29));
5590 // Creates a new #GtkCellRendererToggle. Adjust rendering
5591 // parameters using object properties. Object properties can be set
5592 // globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
5593 // can bind a property to a value in a #GtkTreeModel. For example, you
5594 // can bind the "active" property on the cell renderer to a boolean value
5595 // in the model, thus causing the check button to reflect the state of
5596 // the model.
5597 // RETURNS: the new cell renderer
5598 static CellRendererToggle* new_()() {
5599 return gtk_cell_renderer_toggle_new();
5602 // VERSION: 2.18
5603 // Returns whether the cell renderer is activatable. See
5604 // gtk_cell_renderer_toggle_set_activatable().
5605 // RETURNS: %TRUE if the cell renderer is activatable.
5606 int get_activatable()() {
5607 return gtk_cell_renderer_toggle_get_activatable(&this);
5610 // Returns whether the cell renderer is active. See
5611 // gtk_cell_renderer_toggle_set_active().
5612 // RETURNS: %TRUE if the cell renderer is active.
5613 int get_active()() {
5614 return gtk_cell_renderer_toggle_get_active(&this);
5617 // Returns whether we're rendering radio toggles rather than checkboxes.
5618 // RETURNS: %TRUE if we're rendering radio toggles rather than checkboxes
5619 int get_radio()() {
5620 return gtk_cell_renderer_toggle_get_radio(&this);
5623 // VERSION: 2.18
5624 // Makes the cell renderer activatable.
5625 // <setting>: the value to set.
5626 void set_activatable()(int setting) {
5627 gtk_cell_renderer_toggle_set_activatable(&this, setting);
5630 // Activates or deactivates a cell renderer.
5631 // <setting>: the value to set.
5632 void set_active()(int setting) {
5633 gtk_cell_renderer_toggle_set_active(&this, setting);
5636 // If @radio is %TRUE, the cell renderer renders a radio toggle
5637 // (i.e. a toggle in a group of mutually-exclusive toggles).
5638 // If %FALSE, it renders a check toggle (a standalone boolean option).
5639 // This can be set globally for the cell renderer, or changed just
5640 // before rendering each cell in the model (for #GtkTreeView, you set
5641 // up a per-row setting using #GtkTreeViewColumn to associate model
5642 // columns with cell renderer properties).
5643 // <radio>: %TRUE to make the toggle look like a radio button
5644 void set_radio()(int radio) {
5645 gtk_cell_renderer_toggle_set_radio(&this, radio);
5648 // The ::toggled signal is emitted when the cell is toggled.
5649 // <path>: string representation of #GtkTreePath describing the event location
5650 extern (C) alias static void function (CellRendererToggle* this_, char* path, void* user_data=null) signal_toggled;
5652 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5653 return super_.signal_connect!name(cb, data, cf);
5656 ulong signal_connect(string name:"toggled", CB:signal_toggled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5657 return signal_connect_data!()(&this, cast(char*)"toggled",
5658 cast(GObject2.Callback)cb, data, null, cf);
5662 struct CellRendererToggleClass {
5663 CellRendererClass parent_class;
5664 extern (C) void function (CellRendererToggle* cell_renderer_toggle, char* path) toggled;
5665 extern (C) void function () _gtk_reserved1;
5666 extern (C) void function () _gtk_reserved2;
5667 extern (C) void function () _gtk_reserved3;
5668 extern (C) void function () _gtk_reserved4;
5671 struct CellText {
5672 CellType type;
5673 short vertical, horizontal;
5674 Style* style;
5675 char* text;
5678 enum CellType {
5679 EMPTY = 0,
5680 TEXT = 1,
5681 PIXMAP = 2,
5682 PIXTEXT = 3,
5683 WIDGET = 4
5685 struct CellView /* : Widget */ {
5686 mixin Atk.ImplementorIface.__interface__;
5687 mixin Buildable.__interface__;
5688 mixin CellLayout.__interface__;
5689 alias parent_instance this;
5690 alias parent_instance super_;
5691 alias parent_instance widget;
5692 Widget parent_instance;
5693 private CellViewPrivate* priv;
5696 // VERSION: 2.6
5697 // Creates a new #GtkCellView widget.
5698 // RETURNS: A newly created #GtkCellView widget.
5699 static CellView* new_()() {
5700 return gtk_cell_view_new();
5703 // VERSION: 2.6
5704 // Creates a new #GtkCellView widget, adds a #GtkCellRendererText
5705 // to it, and makes it show @markup. The text can be
5706 // marked up with the <link linkend="PangoMarkupFormat">Pango text
5707 // markup language</link>.
5708 // RETURNS: A newly created #GtkCellView widget.
5709 // <markup>: the text to display in the cell view
5710 static CellView* new_with_markup()(char* markup) {
5711 return gtk_cell_view_new_with_markup(markup);
5714 // VERSION: 2.6
5715 // Creates a new #GtkCellView widget, adds a #GtkCellRendererPixbuf
5716 // to it, and makes its show @pixbuf.
5717 // RETURNS: A newly created #GtkCellView widget.
5718 // <pixbuf>: the image to display in the cell view
5719 static CellView* new_with_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf) {
5720 return gtk_cell_view_new_with_pixbuf(pixbuf);
5723 // VERSION: 2.6
5724 // Creates a new #GtkCellView widget, adds a #GtkCellRendererText
5725 // to it, and makes its show @text.
5726 // RETURNS: A newly created #GtkCellView widget.
5727 // <text>: the text to display in the cell view
5728 static CellView* new_with_text()(char* text) {
5729 return gtk_cell_view_new_with_text(text);
5732 // Unintrospectable method: get_cell_renderers() / gtk_cell_view_get_cell_renderers()
5733 // VERSION: 2.6
5734 // DEPRECATED (v2.18) method: get_cell_renderers - use gtk_cell_layout_get_cells() instead.
5735 // Returns the cell renderers which have been added to @cell_view.
5736 // renderers has been newly allocated and should be freed with
5737 // g_list_free() when no longer needed.
5738 // RETURNS: a list of cell renderers. The list, but not the
5739 GLib2.List* get_cell_renderers()() {
5740 return gtk_cell_view_get_cell_renderers(&this);
5743 // VERSION: 2.6
5744 // Returns a #GtkTreePath referring to the currently
5745 // displayed row. If no row is currently displayed,
5746 // %NULL is returned.
5747 // RETURNS: the currently displayed row or %NULL
5748 TreePath* /*new*/ get_displayed_row()() {
5749 return gtk_cell_view_get_displayed_row(&this);
5752 // VERSION: 2.16
5753 // Returns the model for @cell_view. If no model is used %NULL is
5754 // returned.
5755 // RETURNS: a #GtkTreeModel used or %NULL
5756 TreeModel* get_model()() {
5757 return gtk_cell_view_get_model(&this);
5760 // VERSION: 2.6
5761 // Sets @requisition to the size needed by @cell_view to display
5762 // the model row pointed to by @path.
5763 // RETURNS: %TRUE
5764 // <path>: a #GtkTreePath
5765 // <requisition>: return location for the size
5766 int get_size_of_row()(TreePath* path, /*out*/ Requisition* requisition) {
5767 return gtk_cell_view_get_size_of_row(&this, path, requisition);
5770 // VERSION: 2.6
5771 // Sets the background color of @view.
5772 // <color>: the new background color
5773 void set_background_color()(Gdk2.Color* color) {
5774 gtk_cell_view_set_background_color(&this, color);
5777 // VERSION: 2.6
5778 // Sets the row of the model that is currently displayed
5779 // by the #GtkCellView. If the path is unset, then the
5780 // contents of the cellview "stick" at their last value;
5781 // this is not normally a desired result, but may be
5782 // a needed intermediate state if say, the model for
5783 // the #GtkCellView becomes temporarily empty.
5784 // <path>: a #GtkTreePath or %NULL to unset.
5785 void set_displayed_row()(TreePath* path=null) {
5786 gtk_cell_view_set_displayed_row(&this, path);
5789 // VERSION: 2.6
5790 // Sets the model for @cell_view. If @cell_view already has a model
5791 // set, it will remove it before setting the new model. If @model is
5792 // %NULL, then it will unset the old model.
5793 // <model>: a #GtkTreeModel
5794 void set_model()(TreeModel* model=null) {
5795 gtk_cell_view_set_model(&this, model);
5799 struct CellViewClass {
5800 WidgetClass parent_class;
5803 struct CellViewPrivate {
5806 struct CellWidget {
5807 CellType type;
5808 short vertical, horizontal;
5809 Style* style;
5810 Widget* widget;
5813 struct CheckButton /* : ToggleButton */ {
5814 mixin Atk.ImplementorIface.__interface__;
5815 mixin Activatable.__interface__;
5816 mixin Buildable.__interface__;
5817 alias toggle_button this;
5818 alias toggle_button super_;
5819 alias toggle_button togglebutton;
5820 ToggleButton toggle_button;
5822 static CheckButton* new_()() {
5823 return gtk_check_button_new();
5825 static CheckButton* new_with_label()(char* label) {
5826 return gtk_check_button_new_with_label(label);
5829 // Creates a new #GtkCheckButton containing a label. The label
5830 // will be created using gtk_label_new_with_mnemonic(), so underscores
5831 // in @label indicate the mnemonic for the check button.
5832 // RETURNS: a new #GtkCheckButton
5833 // <label>: The text of the button, with an underscore in front of the mnemonic character
5834 static CheckButton* new_with_mnemonic()(char* label) {
5835 return gtk_check_button_new_with_mnemonic(label);
5839 struct CheckButtonClass {
5840 ToggleButtonClass parent_class;
5841 extern (C) void function (CheckButton* check_button, Gdk2.Rectangle* area) draw_indicator;
5842 extern (C) void function () _gtk_reserved1;
5843 extern (C) void function () _gtk_reserved2;
5844 extern (C) void function () _gtk_reserved3;
5845 extern (C) void function () _gtk_reserved4;
5848 struct CheckMenuItem /* : MenuItem */ {
5849 mixin Atk.ImplementorIface.__interface__;
5850 mixin Activatable.__interface__;
5851 mixin Buildable.__interface__;
5852 alias menu_item this;
5853 alias menu_item super_;
5854 alias menu_item menuitem;
5855 MenuItem menu_item;
5856 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5857 uint, "active", 1,
5858 uint, "always_show_toggle", 1,
5859 uint, "inconsistent", 1,
5860 uint, "draw_as_radio", 1,
5861 uint, "__dummy32A", 28));
5863 static CheckMenuItem* new_()() {
5864 return gtk_check_menu_item_new();
5866 static CheckMenuItem* new_with_label()(char* label) {
5867 return gtk_check_menu_item_new_with_label(label);
5870 // Creates a new #GtkCheckMenuItem containing a label. The label
5871 // will be created using gtk_label_new_with_mnemonic(), so underscores
5872 // in @label indicate the mnemonic for the menu item.
5873 // RETURNS: a new #GtkCheckMenuItem
5874 // <label>: The text of the button, with an underscore in front of the mnemonic character
5875 static CheckMenuItem* new_with_mnemonic()(char* label) {
5876 return gtk_check_menu_item_new_with_mnemonic(label);
5879 // Returns whether the check menu item is active. See
5880 // gtk_check_menu_item_set_active ().
5881 // RETURNS: %TRUE if the menu item is checked.
5882 int get_active()() {
5883 return gtk_check_menu_item_get_active(&this);
5886 // VERSION: 2.4
5887 // Returns whether @check_menu_item looks like a #GtkRadioMenuItem
5888 // RETURNS: Whether @check_menu_item looks like a #GtkRadioMenuItem
5889 int get_draw_as_radio()() {
5890 return gtk_check_menu_item_get_draw_as_radio(&this);
5893 // Retrieves the value set by gtk_check_menu_item_set_inconsistent().
5894 // RETURNS: %TRUE if inconsistent
5895 int get_inconsistent()() {
5896 return gtk_check_menu_item_get_inconsistent(&this);
5898 void set_active()(int is_active) {
5899 gtk_check_menu_item_set_active(&this, is_active);
5902 // VERSION: 2.4
5903 // Sets whether @check_menu_item is drawn like a #GtkRadioMenuItem
5904 // <draw_as_radio>: whether @check_menu_item is drawn like a #GtkRadioMenuItem
5905 void set_draw_as_radio()(int draw_as_radio) {
5906 gtk_check_menu_item_set_draw_as_radio(&this, draw_as_radio);
5909 // If the user has selected a range of elements (such as some text or
5910 // spreadsheet cells) that are affected by a boolean setting, and the
5911 // current values in that range are inconsistent, you may want to
5912 // display the check in an "in between" state. This function turns on
5913 // "in between" display. Normally you would turn off the inconsistent
5914 // state again if the user explicitly selects a setting. This has to be
5915 // done manually, gtk_check_menu_item_set_inconsistent() only affects
5916 // visual appearance, it doesn't affect the semantics of the widget.
5917 // <setting>: %TRUE to display an "inconsistent" third state check
5918 void set_inconsistent()(int setting) {
5919 gtk_check_menu_item_set_inconsistent(&this, setting);
5921 void set_show_toggle()(int always) {
5922 gtk_check_menu_item_set_show_toggle(&this, always);
5924 void toggled()() {
5925 gtk_check_menu_item_toggled(&this);
5927 extern (C) alias static void function (CheckMenuItem* this_, void* user_data=null) signal_toggled;
5929 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5930 return super_.signal_connect!name(cb, data, cf);
5933 ulong signal_connect(string name:"toggled", CB:signal_toggled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5934 return signal_connect_data!()(&this, cast(char*)"toggled",
5935 cast(GObject2.Callback)cb, data, null, cf);
5939 struct CheckMenuItemClass {
5940 MenuItemClass parent_class;
5941 extern (C) void function (CheckMenuItem* check_menu_item) toggled;
5942 extern (C) void function (CheckMenuItem* check_menu_item, Gdk2.Rectangle* area) draw_indicator;
5943 extern (C) void function () _gtk_reserved1;
5944 extern (C) void function () _gtk_reserved2;
5945 extern (C) void function () _gtk_reserved3;
5946 extern (C) void function () _gtk_reserved4;
5949 struct Clipboard /* : GObject.Object */ {
5950 alias method_parent this;
5951 alias method_parent super_;
5952 alias method_parent object;
5953 GObject2.Object method_parent;
5956 // Returns the clipboard object for the given selection.
5957 // See gtk_clipboard_get_for_display() for complete details.
5958 // already exists, a new one will be created. Once a clipboard
5959 // object has been created, it is persistent and, since it is
5960 // owned by GTK+, must not be freed or unreffed.
5961 // RETURNS: the appropriate clipboard object. If no clipboard
5962 // <selection>: a #GdkAtom which identifies the clipboard to use
5963 static Clipboard* get()(Gdk2.Atom selection) {
5964 return gtk_clipboard_get(selection);
5967 // VERSION: 2.2
5968 // Returns the clipboard object for the given selection.
5969 // Cut/copy/paste menu items and keyboard shortcuts should use
5970 // the default clipboard, returned by passing %GDK_SELECTION_CLIPBOARD for @selection.
5971 // (%GDK_NONE is supported as a synonym for GDK_SELECTION_CLIPBOARD
5972 // for backwards compatibility reasons.)
5973 // The currently-selected object or text should be provided on the clipboard
5974 // identified by #GDK_SELECTION_PRIMARY. Cut/copy/paste menu items
5975 // conceptually copy the contents of the #GDK_SELECTION_PRIMARY clipboard
5976 // to the default clipboard, i.e. they copy the selection to what the
5977 // user sees as the clipboard.
5978 // (Passing #GDK_NONE is the same as using <literal>gdk_atom_intern
5979 // ("CLIPBOARD", FALSE)</literal>. See <ulink
5980 // url="http://www.freedesktop.org/Standards/clipboards-spec">
5981 // http://www.freedesktop.org/Standards/clipboards-spec</ulink>
5982 // for a detailed discussion of the "CLIPBOARD" vs. "PRIMARY"
5983 // selections under the X window system. On Win32 the
5984 // #GDK_SELECTION_PRIMARY clipboard is essentially ignored.)
5985 // It's possible to have arbitrary named clipboards; if you do invent
5986 // new clipboards, you should prefix the selection name with an
5987 // underscore (because the ICCCM requires that nonstandard atoms are
5988 // underscore-prefixed), and namespace it as well. For example,
5989 // if your application called "Foo" has a special-purpose
5990 // clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD".
5991 // clipboard already exists, a new one will
5992 // be created. Once a clipboard object has
5993 // been created, it is persistent and, since
5994 // it is owned by GTK+, must not be freed or
5995 // unrefd.
5996 // RETURNS: the appropriate clipboard object. If no
5997 // <display>: the display for which the clipboard is to be retrieved or created
5998 // <selection>: a #GdkAtom which identifies the clipboard to use.
5999 static Clipboard* get_for_display()(Gdk2.Display* display, Gdk2.Atom selection) {
6000 return gtk_clipboard_get_for_display(display, selection);
6003 // Clears the contents of the clipboard. Generally this should only
6004 // be called between the time you call gtk_clipboard_set_with_owner()
6005 // or gtk_clipboard_set_with_data(),
6006 // and when the @clear_func you supplied is called. Otherwise, the
6007 // clipboard may be owned by someone else.
6008 void clear()() {
6009 gtk_clipboard_clear(&this);
6012 // VERSION: 2.2
6013 // Gets the #GdkDisplay associated with @clipboard
6014 // RETURNS: the #GdkDisplay associated with @clipboard
6015 Gdk2.Display* get_display()() {
6016 return gtk_clipboard_get_display(&this);
6019 // If the clipboard contents callbacks were set with
6020 // gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
6021 // gtk_clipboard_clear() has not subsequently called, returns the owner set
6022 // by gtk_clipboard_set_with_owner().
6023 // RETURNS: the owner of the clipboard, if any; otherwise %NULL.
6024 GObject2.Object* get_owner()() {
6025 return gtk_clipboard_get_owner(&this);
6028 // Unintrospectable method: request_contents() / gtk_clipboard_request_contents()
6029 // Requests the contents of clipboard as the given target.
6030 // When the results of the result are later received the supplied callback
6031 // will be called.
6032 // <target>: an atom representing the form into which the clipboard owner should convert the selection.
6033 // <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.
6034 // <user_data>: user data to pass to @callback
6035 void request_contents()(Gdk2.Atom target, ClipboardReceivedFunc callback, void* user_data) {
6036 gtk_clipboard_request_contents(&this, target, callback, user_data);
6039 // Unintrospectable method: request_image() / gtk_clipboard_request_image()
6040 // VERSION: 2.6
6041 // Requests the contents of the clipboard as image. When the image is
6042 // later received, it will be converted to a #GdkPixbuf, and
6043 // The @pixbuf parameter to @callback will contain the resulting
6044 // #GdkPixbuf if the request succeeded, or %NULL if it failed. This
6045 // could happen for various reasons, in particular if the clipboard
6046 // was empty or if the contents of the clipboard could not be
6047 // converted into an image.
6048 // <callback>: a function to call when the image is received, or the retrieval fails. (It will always be called one way or the other.)
6049 // <user_data>: user data to pass to @callback.
6050 void request_image()(ClipboardImageReceivedFunc callback, void* user_data) {
6051 gtk_clipboard_request_image(&this, callback, user_data);
6054 // Unintrospectable method: request_rich_text() / gtk_clipboard_request_rich_text()
6055 // VERSION: 2.10
6056 // Requests the contents of the clipboard as rich text. When the rich
6057 // text is later received, @callback will be called.
6058 // The @text parameter to @callback will contain the resulting rich
6059 // text if the request succeeded, or %NULL if it failed. The @length
6060 // parameter will contain @text's length. This function can fail for
6061 // various reasons, in particular if the clipboard was empty or if the
6062 // contents of the clipboard could not be converted into rich text form.
6063 // <buffer>: a #GtkTextBuffer
6064 // <callback>: a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
6065 // <user_data>: user data to pass to @callback.
6066 void request_rich_text()(TextBuffer* buffer, ClipboardRichTextReceivedFunc callback, void* user_data) {
6067 gtk_clipboard_request_rich_text(&this, buffer, callback, user_data);
6070 // Unintrospectable method: request_targets() / gtk_clipboard_request_targets()
6071 // VERSION: 2.4
6072 // Requests the contents of the clipboard as list of supported targets.
6073 // When the list is later received, @callback will be called.
6074 // The @targets parameter to @callback will contain the resulting targets if
6075 // the request succeeded, or %NULL if it failed.
6076 // <callback>: a function to call when the targets are received, or the retrieval fails. (It will always be called one way or the other.)
6077 // <user_data>: user data to pass to @callback.
6078 void request_targets()(ClipboardTargetsReceivedFunc callback, void* user_data) {
6079 gtk_clipboard_request_targets(&this, callback, user_data);
6082 // Unintrospectable method: request_text() / gtk_clipboard_request_text()
6083 // Requests the contents of the clipboard as text. When the text is
6084 // later received, it will be converted to UTF-8 if necessary, and
6085 // The @text parameter to @callback will contain the resulting text if
6086 // the request succeeded, or %NULL if it failed. This could happen for
6087 // various reasons, in particular if the clipboard was empty or if the
6088 // contents of the clipboard could not be converted into text form.
6089 // <callback>: a function to call when the text is received, or the retrieval fails. (It will always be called one way or the other.)
6090 // <user_data>: user data to pass to @callback.
6091 void request_text()(ClipboardTextReceivedFunc callback, void* user_data) {
6092 gtk_clipboard_request_text(&this, callback, user_data);
6095 // Unintrospectable method: request_uris() / gtk_clipboard_request_uris()
6096 // VERSION: 2.14
6097 // Requests the contents of the clipboard as URIs. When the URIs are
6098 // later received @callback will be called.
6099 // The @uris parameter to @callback will contain the resulting array of
6100 // URIs if the request succeeded, or %NULL if it failed. This could happen
6101 // for various reasons, in particular if the clipboard was empty or if the
6102 // contents of the clipboard could not be converted into URI form.
6103 // <callback>: a function to call when the URIs are received, or the retrieval fails. (It will always be called one way or the other.)
6104 // <user_data>: user data to pass to @callback.
6105 void request_uris()(ClipboardURIReceivedFunc callback, void* user_data) {
6106 gtk_clipboard_request_uris(&this, callback, user_data);
6109 // VERSION: 2.6
6110 // Hints that the clipboard data should be stored somewhere when the
6111 // application exits or when gtk_clipboard_store () is called.
6112 // This value is reset when the clipboard owner changes.
6113 // Where the clipboard data is stored is platform dependent,
6114 // see gdk_display_store_clipboard () for more information.
6115 // <targets>: array containing information about which forms should be stored or %NULL to indicate that all forms should be stored.
6116 // <n_targets>: number of elements in @targets
6117 void set_can_store()(TargetEntry* targets, int n_targets) {
6118 gtk_clipboard_set_can_store(&this, targets, n_targets);
6121 // VERSION: 2.6
6122 // Sets the contents of the clipboard to the given #GdkPixbuf.
6123 // GTK+ will take responsibility for responding for requests
6124 // for the image, and for converting the image into the
6125 // requested format.
6126 // <pixbuf>: a #GdkPixbuf
6127 void set_image()(GdkPixbuf2.Pixbuf* pixbuf) {
6128 gtk_clipboard_set_image(&this, pixbuf);
6131 // Sets the contents of the clipboard to the given UTF-8 string. GTK+ will
6132 // make a copy of the text and take responsibility for responding
6133 // for requests for the text, and for converting the text into
6134 // the requested format.
6135 // <text>: a UTF-8 string.
6136 // <len>: length of @text, in bytes, or -1, in which case the length will be determined with <function>strlen()</function>.
6137 void set_text()(char* text, int len) {
6138 gtk_clipboard_set_text(&this, text, len);
6141 // Unintrospectable method: set_with_data() / gtk_clipboard_set_with_data()
6142 // Virtually sets the contents of the specified clipboard by providing
6143 // a list of supported formats for the clipboard data and a function
6144 // to call to get the actual data when it is requested.
6145 // the clipboard data failed the provided callback functions
6146 // will be ignored.
6147 // RETURNS: %TRUE if setting the clipboard data succeeded. If setting
6148 // <targets>: array containing information about the available forms for the clipboard data
6149 // <n_targets>: number of elements in @targets
6150 // <get_func>: function to call to get the actual clipboard data
6151 // <clear_func>: when the clipboard contents are set again, this function will be called, and @get_func will not be subsequently called.
6152 // <user_data>: user data to pass to @get_func and @clear_func.
6153 int set_with_data()(TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, void* user_data) {
6154 return gtk_clipboard_set_with_data(&this, targets, n_targets, get_func, clear_func, user_data);
6157 // Unintrospectable method: set_with_owner() / gtk_clipboard_set_with_owner()
6158 // Virtually sets the contents of the specified clipboard by providing
6159 // a list of supported formats for the clipboard data and a function
6160 // to call to get the actual data when it is requested.
6161 // The difference between this function and gtk_clipboard_set_with_data()
6162 // is that instead of an generic @user_data pointer, a #GObject is passed
6163 // in.
6164 // the clipboard data failed the provided callback functions
6165 // will be ignored.
6166 // RETURNS: %TRUE if setting the clipboard data succeeded. If setting
6167 // <targets>: array containing information about the available forms for the clipboard data
6168 // <n_targets>: number of elements in @targets
6169 // <get_func>: function to call to get the actual clipboard data
6170 // <clear_func>: when the clipboard contents are set again, this function will be called, and @get_func will not be subsequently called.
6171 // <owner>: an object that "owns" the data. This object will be passed to the callbacks when called.
6172 int set_with_owner()(TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, GObject2.Object* owner) {
6173 return gtk_clipboard_set_with_owner(&this, targets, n_targets, get_func, clear_func, owner);
6176 // VERSION: 2.6
6177 // Stores the current clipboard data somewhere so that it will stay
6178 // around after the application has quit.
6179 void store()() {
6180 gtk_clipboard_store(&this);
6183 // Requests the contents of the clipboard using the given target.
6184 // This function waits for the data to be received using the main
6185 // loop, so events, timeouts, etc, may be dispatched during the wait.
6186 // if retrieving the given target failed. If non-%NULL,
6187 // this value must be freed with gtk_selection_data_free()
6188 // when you are finished with it.
6189 // RETURNS: a newly-allocated #GtkSelectionData object or %NULL
6190 // <target>: an atom representing the form into which the clipboard owner should convert the selection.
6191 SelectionData* /*new*/ wait_for_contents()(Gdk2.Atom target) {
6192 return gtk_clipboard_wait_for_contents(&this, target);
6195 // VERSION: 2.6
6196 // Requests the contents of the clipboard as image and converts
6197 // the result to a #GdkPixbuf. This function waits for
6198 // the data to be received using the main loop, so events,
6199 // timeouts, etc, may be dispatched during the wait.
6200 // be disposed with g_object_unref(), or %NULL if
6201 // retrieving the selection data failed. (This
6202 // could happen for various reasons, in particular
6203 // if the clipboard was empty or if the contents of
6204 // the clipboard could not be converted into an image.)
6205 // RETURNS: a newly-allocated #GdkPixbuf object which must
6206 GdkPixbuf2.Pixbuf* /*new*/ wait_for_image()() {
6207 return gtk_clipboard_wait_for_image(&this);
6210 // VERSION: 2.10
6211 // Requests the contents of the clipboard as rich text. This function
6212 // waits for the data to be received using the main loop, so events,
6213 // timeouts, etc, may be dispatched during the wait.
6214 // newly-allocated binary block of data which must
6215 // be freed with g_free(), or %NULL if retrieving
6216 // the selection data failed. (This could happen
6217 // for various reasons, in particular if the
6218 // clipboard was empty or if the contents of the
6219 // clipboard could not be converted into text form.)
6220 // RETURNS: a
6221 // <buffer>: a #GtkTextBuffer
6222 // <format>: return location for the format of the returned data
6223 // <length>: return location for the length of the returned data
6224 ubyte* /*new*/ wait_for_rich_text()(TextBuffer* buffer, Gdk2.Atom* format, /*out*/ size_t* length) {
6225 return gtk_clipboard_wait_for_rich_text(&this, buffer, format, length);
6228 // VERSION: 2.4
6229 // Returns a list of targets that are present on the clipboard, or %NULL
6230 // if there aren't any targets available. The returned list must be
6231 // freed with g_free().
6232 // This function waits for the data to be received using the main
6233 // loop, so events, timeouts, etc, may be dispatched during the wait.
6234 // otherwise %FALSE.
6235 // RETURNS: %TRUE if any targets are present on the clipboard,
6236 // <targets>: location to store an array of targets. The result stored here must be freed with g_free().
6237 // <n_targets>: location to store number of items in @targets.
6238 int wait_for_targets()(/*out*/ Gdk2.Atom** targets, /*out*/ int* n_targets) {
6239 return gtk_clipboard_wait_for_targets(&this, targets, n_targets);
6242 // Requests the contents of the clipboard as text and converts
6243 // the result to UTF-8 if necessary. This function waits for
6244 // the data to be received using the main loop, so events,
6245 // timeouts, etc, may be dispatched during the wait.
6246 // be freed with g_free(), or %NULL if retrieving
6247 // the selection data failed. (This could happen
6248 // for various reasons, in particular if the
6249 // clipboard was empty or if the contents of the
6250 // clipboard could not be converted into text form.)
6251 // RETURNS: a newly-allocated UTF-8 string which must
6252 char* /*new*/ wait_for_text()() {
6253 return gtk_clipboard_wait_for_text(&this);
6256 // VERSION: 2.14
6257 // Requests the contents of the clipboard as URIs. This function waits
6258 // for the data to be received using the main loop, so events,
6259 // timeouts, etc, may be dispatched during the wait.
6260 // %NULL-terminated array of strings which must
6261 // be freed with g_strfreev(), or %NULL if
6262 // retrieving the selection data failed. (This
6263 // could happen for various reasons, in particular
6264 // if the clipboard was empty or if the contents of
6265 // the clipboard could not be converted into URI form.)
6266 // RETURNS: a newly-allocated
6267 char** /*new*/ wait_for_uris()() {
6268 return gtk_clipboard_wait_for_uris(&this);
6271 // VERSION: 2.6
6272 // Test to see if there is an image available to be pasted
6273 // This is done by requesting the TARGETS atom and checking
6274 // if it contains any of the supported image targets. This function
6275 // waits for the data to be received using the main loop, so events,
6276 // timeouts, etc, may be dispatched during the wait.
6277 // This function is a little faster than calling
6278 // gtk_clipboard_wait_for_image() since it doesn't need to retrieve
6279 // the actual image data.
6280 // RETURNS: %TRUE is there is an image available, %FALSE otherwise.
6281 int wait_is_image_available()() {
6282 return gtk_clipboard_wait_is_image_available(&this);
6285 // VERSION: 2.10
6286 // Test to see if there is rich text available to be pasted
6287 // This is done by requesting the TARGETS atom and checking
6288 // if it contains any of the supported rich text targets. This function
6289 // waits for the data to be received using the main loop, so events,
6290 // timeouts, etc, may be dispatched during the wait.
6291 // This function is a little faster than calling
6292 // gtk_clipboard_wait_for_rich_text() since it doesn't need to retrieve
6293 // the actual text.
6294 // RETURNS: %TRUE is there is rich text available, %FALSE otherwise.
6295 // <buffer>: a #GtkTextBuffer
6296 int wait_is_rich_text_available()(TextBuffer* buffer) {
6297 return gtk_clipboard_wait_is_rich_text_available(&this, buffer);
6300 // VERSION: 2.6
6301 // Checks if a clipboard supports pasting data of a given type. This
6302 // function can be used to determine if a "Paste" menu item should be
6303 // insensitive or not.
6304 // If you want to see if there's text available on the clipboard, use
6305 // gtk_clipboard_wait_is_text_available () instead.
6306 // RETURNS: %TRUE if the target is available, %FALSE otherwise.
6307 // <target>: A #GdkAtom indicating which target to look for.
6308 int wait_is_target_available()(Gdk2.Atom target) {
6309 return gtk_clipboard_wait_is_target_available(&this, target);
6312 // Test to see if there is text available to be pasted
6313 // This is done by requesting the TARGETS atom and checking
6314 // if it contains any of the supported text targets. This function
6315 // waits for the data to be received using the main loop, so events,
6316 // timeouts, etc, may be dispatched during the wait.
6317 // This function is a little faster than calling
6318 // gtk_clipboard_wait_for_text() since it doesn't need to retrieve
6319 // the actual text.
6320 // RETURNS: %TRUE is there is text available, %FALSE otherwise.
6321 int wait_is_text_available()() {
6322 return gtk_clipboard_wait_is_text_available(&this);
6325 // VERSION: 2.14
6326 // Test to see if there is a list of URIs available to be pasted
6327 // This is done by requesting the TARGETS atom and checking
6328 // if it contains the URI targets. This function
6329 // waits for the data to be received using the main loop, so events,
6330 // timeouts, etc, may be dispatched during the wait.
6331 // This function is a little faster than calling
6332 // gtk_clipboard_wait_for_uris() since it doesn't need to retrieve
6333 // the actual URI data.
6334 // RETURNS: %TRUE is there is an URI list available, %FALSE otherwise.
6335 int wait_is_uris_available()() {
6336 return gtk_clipboard_wait_is_uris_available(&this);
6339 // VERSION: 2.6
6340 // The ::owner-change signal is emitted when GTK+ receives an
6341 // event that indicates that the ownership of the selection
6342 // associated with @clipboard has changed.
6343 // <event>: the @GdkEventOwnerChange event
6344 extern (C) alias static void function (Clipboard* this_, Gdk2.Event* event, void* user_data=null) signal_owner_change;
6346 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6347 return super_.signal_connect!name(cb, data, cf);
6350 ulong signal_connect(string name:"owner-change", CB:signal_owner_change)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6351 return signal_connect_data!()(&this, cast(char*)"owner-change",
6352 cast(GObject2.Callback)cb, data, null, cf);
6356 extern (C) alias void function (Clipboard* clipboard, void* user_data_or_owner) ClipboardClearFunc;
6358 extern (C) alias void function (Clipboard* clipboard, SelectionData* selection_data, uint info, void* user_data_or_owner) ClipboardGetFunc;
6360 extern (C) alias void function (Clipboard* clipboard, GdkPixbuf2.Pixbuf* pixbuf, void* data) ClipboardImageReceivedFunc;
6362 extern (C) alias void function (Clipboard* clipboard, SelectionData* selection_data, void* data) ClipboardReceivedFunc;
6364 extern (C) alias void function (Clipboard* clipboard, Gdk2.Atom format, ubyte* text, size_t length, void* data) ClipboardRichTextReceivedFunc;
6366 extern (C) alias void function (Clipboard* clipboard, Gdk2.Atom* atoms, int n_atoms, void* data) ClipboardTargetsReceivedFunc;
6368 extern (C) alias void function (Clipboard* clipboard, char* text, void* data) ClipboardTextReceivedFunc;
6370 extern (C) alias void function (Clipboard* clipboard, char** uris, void* data) ClipboardURIReceivedFunc;
6372 struct ColorButton /* : Button */ {
6373 mixin Atk.ImplementorIface.__interface__;
6374 mixin Activatable.__interface__;
6375 mixin Buildable.__interface__;
6376 alias button this;
6377 alias button super_;
6378 Button button;
6379 private ColorButtonPrivate* priv;
6382 // VERSION: 2.4
6383 // Creates a new color button. This returns a widget in the form of
6384 // a small button containing a swatch representing the current selected
6385 // color. When the button is clicked, a color-selection dialog will open,
6386 // allowing the user to select a color. The swatch will be updated to reflect
6387 // the new color when the user finishes.
6388 // RETURNS: a new color button.
6389 static ColorButton* new_()() {
6390 return gtk_color_button_new();
6393 // VERSION: 2.4
6394 // Creates a new color button.
6395 // RETURNS: a new color button.
6396 // <color>: A #GdkColor to set the current color with.
6397 static ColorButton* new_with_color()(Gdk2.Color* color) {
6398 return gtk_color_button_new_with_color(color);
6401 // VERSION: 2.4
6402 // Returns the current alpha value.
6403 // RETURNS: an integer between 0 and 65535.
6404 ushort get_alpha()() {
6405 return gtk_color_button_get_alpha(&this);
6408 // VERSION: 2.4
6409 // Sets @color to be the current color in the #GtkColorButton widget.
6410 // <color>: a #GdkColor to fill in with the current color.
6411 void get_color()(Gdk2.Color* color) {
6412 gtk_color_button_get_color(&this, color);
6415 // VERSION: 2.4
6416 // Gets the title of the color selection dialog.
6417 // RETURNS: An internal string, do not free the return value
6418 char* get_title()() {
6419 return gtk_color_button_get_title(&this);
6422 // VERSION: 2.4
6423 // Does the color selection dialog use the alpha channel?
6424 // RETURNS: %TRUE if the color sample uses alpha channel, %FALSE if not.
6425 int get_use_alpha()() {
6426 return gtk_color_button_get_use_alpha(&this);
6429 // VERSION: 2.4
6430 // Sets the current opacity to be @alpha.
6431 // <alpha>: an integer between 0 and 65535.
6432 void set_alpha()(ushort alpha) {
6433 gtk_color_button_set_alpha(&this, alpha);
6436 // VERSION: 2.4
6437 // Sets the current color to be @color.
6438 // <color>: A #GdkColor to set the current color with.
6439 void set_color()(Gdk2.Color* color) {
6440 gtk_color_button_set_color(&this, color);
6443 // VERSION: 2.4
6444 // Sets the title for the color selection dialog.
6445 // <title>: String containing new window title.
6446 void set_title()(char* title) {
6447 gtk_color_button_set_title(&this, title);
6450 // VERSION: 2.4
6451 // Sets whether or not the color button should use the alpha channel.
6452 // <use_alpha>: %TRUE if color button should use alpha channel, %FALSE if not.
6453 void set_use_alpha()(int use_alpha) {
6454 gtk_color_button_set_use_alpha(&this, use_alpha);
6457 // VERSION: 2.4
6458 // The ::color-set signal is emitted when the user selects a color.
6459 // When handling this signal, use gtk_color_button_get_color() and
6460 // gtk_color_button_get_alpha() to find out which color was just selected.
6461 // Note that this signal is only emitted when the <emphasis>user</emphasis>
6462 // changes the color. If you need to react to programmatic color changes
6463 // as well, use the notify::color signal.
6464 extern (C) alias static void function (ColorButton* this_, void* user_data=null) signal_color_set;
6466 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6467 return super_.signal_connect!name(cb, data, cf);
6470 ulong signal_connect(string name:"color-set", CB:signal_color_set)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6471 return signal_connect_data!()(&this, cast(char*)"color-set",
6472 cast(GObject2.Callback)cb, data, null, cf);
6476 struct ColorButtonClass {
6477 ButtonClass parent_class;
6478 extern (C) void function (ColorButton* cp) color_set;
6479 extern (C) void function () _gtk_reserved1;
6480 extern (C) void function () _gtk_reserved2;
6481 extern (C) void function () _gtk_reserved3;
6482 extern (C) void function () _gtk_reserved4;
6485 struct ColorButtonPrivate {
6488 struct ColorSelection /* : VBox */ {
6489 mixin Atk.ImplementorIface.__interface__;
6490 mixin Buildable.__interface__;
6491 mixin Orientable.__interface__;
6492 alias parent_instance this;
6493 alias parent_instance super_;
6494 alias parent_instance vbox;
6495 VBox parent_instance;
6496 void* private_data;
6499 // Creates a new GtkColorSelection.
6500 // RETURNS: a new #GtkColorSelection
6501 static ColorSelection* new_()() {
6502 return gtk_color_selection_new();
6505 // Parses a color palette string; the string is a colon-separated
6506 // list of color names readable by gdk_color_parse().
6507 // RETURNS: %TRUE if a palette was successfully parsed.
6508 // <str>: a string encoding a color palette.
6509 // <colors>: return location for allocated array of #GdkColor.
6510 // <n_colors>: return location for length of array.
6511 static int palette_from_string()(char* str, /*out*/ Gdk2.Color** colors, /*out*/ int* n_colors) {
6512 return gtk_color_selection_palette_from_string(str, colors, n_colors);
6515 // Encodes a palette as a string, useful for persistent storage.
6516 // RETURNS: allocated string encoding the palette.
6517 // <colors>: an array of colors.
6518 // <n_colors>: length of the array.
6519 static char* /*new*/ palette_to_string()(Gdk2.Color* colors, int n_colors) {
6520 return gtk_color_selection_palette_to_string(colors, n_colors);
6523 // Unintrospectable function: set_change_palette_hook() / gtk_color_selection_set_change_palette_hook()
6524 // DEPRECATED (v2.4) function: set_change_palette_hook - This function does not work in multihead environments.
6525 // Installs a global function to be called whenever the user tries to
6526 // modify the palette in a color selection. This function should save
6527 // the new palette contents, and update the GtkSettings property
6528 // "gtk-color-palette" so all GtkColorSelection widgets will be modified.
6529 // Use gtk_color_selection_set_change_palette_with_screen_hook() instead.
6530 // RETURNS: the previous change palette hook (that was replaced).
6531 // <func>: a function to call when the custom palette needs saving.
6532 static ColorSelectionChangePaletteFunc set_change_palette_hook()(ColorSelectionChangePaletteFunc func) {
6533 return gtk_color_selection_set_change_palette_hook(func);
6536 // Unintrospectable function: set_change_palette_with_screen_hook() / gtk_color_selection_set_change_palette_with_screen_hook()
6537 // VERSION: 2.2
6538 // Installs a global function to be called whenever the user tries to
6539 // modify the palette in a color selection. This function should save
6540 // the new palette contents, and update the GtkSettings property
6541 // "gtk-color-palette" so all GtkColorSelection widgets will be modified.
6542 // RETURNS: the previous change palette hook (that was replaced).
6543 // <func>: a function to call when the custom palette needs saving.
6544 static ColorSelectionChangePaletteWithScreenFunc set_change_palette_with_screen_hook()(ColorSelectionChangePaletteWithScreenFunc func) {
6545 return gtk_color_selection_set_change_palette_with_screen_hook(func);
6548 // DEPRECATED (v2.0) method: get_color - Use gtk_color_selection_get_current_color() instead.
6549 // Sets @color to be the current color in the GtkColorSelection widget.
6550 // <color>: an array of 4 #gdouble to fill in with the current color.
6551 void get_color()(double* color) {
6552 gtk_color_selection_get_color(&this, color);
6555 // Returns the current alpha value.
6556 // RETURNS: an integer between 0 and 65535.
6557 ushort get_current_alpha()() {
6558 return gtk_color_selection_get_current_alpha(&this);
6561 // Sets @color to be the current color in the GtkColorSelection widget.
6562 // <color>: a #GdkColor to fill in with the current color.
6563 void get_current_color()(/*out*/ Gdk2.Color* color) {
6564 gtk_color_selection_get_current_color(&this, color);
6567 // Determines whether the colorsel has an opacity control.
6568 // RETURNS: %TRUE if the @colorsel has an opacity control. %FALSE if it does't.
6569 int get_has_opacity_control()() {
6570 return gtk_color_selection_get_has_opacity_control(&this);
6573 // Determines whether the color selector has a color palette.
6574 // RETURNS: %TRUE if the selector has a palette. %FALSE if it hasn't.
6575 int get_has_palette()() {
6576 return gtk_color_selection_get_has_palette(&this);
6579 // Returns the previous alpha value.
6580 // RETURNS: an integer between 0 and 65535.
6581 ushort get_previous_alpha()() {
6582 return gtk_color_selection_get_previous_alpha(&this);
6585 // Fills @color in with the original color value.
6586 // <color>: a #GdkColor to fill in with the original color value.
6587 void get_previous_color()(/*out*/ Gdk2.Color* color) {
6588 gtk_color_selection_get_previous_color(&this, color);
6591 // Gets the current state of the @colorsel.
6592 // if the selection has stopped.
6593 // RETURNS: %TRUE if the user is currently dragging a color around, and %FALSE
6594 int is_adjusting()() {
6595 return gtk_color_selection_is_adjusting(&this);
6598 // DEPRECATED (v2.0) method: set_color - Use gtk_color_selection_set_current_color() instead.
6599 // Sets the current color to be @color. The first time this is called, it will
6600 // also set the original color to be @color too.
6601 // <color>: an array of 4 doubles specifying the red, green, blue and opacity to set the current color to.
6602 void set_color()(double* color) {
6603 gtk_color_selection_set_color(&this, color);
6606 // Sets the current opacity to be @alpha. The first time this is called, it will
6607 // also set the original opacity to be @alpha too.
6608 // <alpha>: an integer between 0 and 65535.
6609 void set_current_alpha()(ushort alpha) {
6610 gtk_color_selection_set_current_alpha(&this, alpha);
6613 // Sets the current color to be @color. The first time this is called, it will
6614 // also set the original color to be @color too.
6615 // <color>: A #GdkColor to set the current color with.
6616 void set_current_color()(Gdk2.Color* color) {
6617 gtk_color_selection_set_current_color(&this, color);
6620 // Sets the @colorsel to use or not use opacity.
6621 // <has_opacity>: %TRUE if @colorsel can set the opacity, %FALSE otherwise.
6622 void set_has_opacity_control()(int has_opacity) {
6623 gtk_color_selection_set_has_opacity_control(&this, has_opacity);
6626 // Shows and hides the palette based upon the value of @has_palette.
6627 // <has_palette>: %TRUE if palette is to be visible, %FALSE otherwise.
6628 void set_has_palette()(int has_palette) {
6629 gtk_color_selection_set_has_palette(&this, has_palette);
6632 // Sets the 'previous' alpha to be @alpha. This function should be called with
6633 // some hesitations, as it might seem confusing to have that alpha change.
6634 // <alpha>: an integer between 0 and 65535.
6635 void set_previous_alpha()(ushort alpha) {
6636 gtk_color_selection_set_previous_alpha(&this, alpha);
6639 // Sets the 'previous' color to be @color. This function should be called with
6640 // some hesitations, as it might seem confusing to have that color change.
6641 // Calling gtk_color_selection_set_current_color() will also set this color the first
6642 // time it is called.
6643 // <color>: a #GdkColor to set the previous color with.
6644 void set_previous_color()(Gdk2.Color* color) {
6645 gtk_color_selection_set_previous_color(&this, color);
6647 void set_update_policy()(UpdateType policy) {
6648 gtk_color_selection_set_update_policy(&this, policy);
6650 extern (C) alias static void function (ColorSelection* this_, void* user_data=null) signal_color_changed;
6652 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6653 return super_.signal_connect!name(cb, data, cf);
6656 ulong signal_connect(string name:"color-changed", CB:signal_color_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6657 return signal_connect_data!()(&this, cast(char*)"color-changed",
6658 cast(GObject2.Callback)cb, data, null, cf);
6662 extern (C) alias void function (Gdk2.Color* colors, int n_colors) ColorSelectionChangePaletteFunc;
6664 extern (C) alias void function (Gdk2.Screen* screen, Gdk2.Color* colors, int n_colors) ColorSelectionChangePaletteWithScreenFunc;
6666 struct ColorSelectionClass {
6667 VBoxClass parent_class;
6668 extern (C) void function (ColorSelection* color_selection) color_changed;
6669 extern (C) void function () _gtk_reserved1;
6670 extern (C) void function () _gtk_reserved2;
6671 extern (C) void function () _gtk_reserved3;
6672 extern (C) void function () _gtk_reserved4;
6675 struct ColorSelectionDialog /* : Dialog */ {
6676 mixin Atk.ImplementorIface.__interface__;
6677 mixin Buildable.__interface__;
6678 alias parent_instance this;
6679 alias parent_instance super_;
6680 alias parent_instance dialog;
6681 Dialog parent_instance;
6682 Widget* colorsel, ok_button, cancel_button, help_button;
6684 static ColorSelectionDialog* new_()(char* title) {
6685 return gtk_color_selection_dialog_new(title);
6688 // VERSION: 2.14
6689 // Retrieves the #GtkColorSelection widget embedded in the dialog.
6690 // RETURNS: the embedded #GtkColorSelection
6691 Widget* get_color_selection()() {
6692 return gtk_color_selection_dialog_get_color_selection(&this);
6696 struct ColorSelectionDialogClass {
6697 DialogClass parent_class;
6698 extern (C) void function () _gtk_reserved1;
6699 extern (C) void function () _gtk_reserved2;
6700 extern (C) void function () _gtk_reserved3;
6701 extern (C) void function () _gtk_reserved4;
6704 struct Combo /* : HBox */ {
6705 mixin Atk.ImplementorIface.__interface__;
6706 mixin Buildable.__interface__;
6707 mixin Orientable.__interface__;
6708 alias hbox this;
6709 alias hbox super_;
6710 HBox hbox;
6711 Widget* entry;
6712 private Widget* button, popup, popwin;
6713 Widget* list;
6714 private uint entry_change_id, list_change_id;
6715 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
6716 uint, "value_in_list", 1,
6717 uint, "ok_if_empty", 1,
6718 uint, "case_sensitive", 1,
6719 uint, "use_arrows", 1,
6720 uint, "use_arrows_always", 1,
6721 uint, "__dummy32A", 27));
6722 private ushort current_button;
6723 private uint activate_id;
6725 static Combo* new_()() {
6726 return gtk_combo_new();
6728 void disable_activate()() {
6729 gtk_combo_disable_activate(&this);
6731 void set_case_sensitive()(int val) {
6732 gtk_combo_set_case_sensitive(&this, val);
6734 void set_item_string()(Item* item, char* item_value) {
6735 gtk_combo_set_item_string(&this, item, item_value);
6737 void set_popdown_strings()(GLib2.List* strings) {
6738 gtk_combo_set_popdown_strings(&this, strings);
6740 void set_use_arrows()(int val) {
6741 gtk_combo_set_use_arrows(&this, val);
6743 void set_use_arrows_always()(int val) {
6744 gtk_combo_set_use_arrows_always(&this, val);
6746 void set_value_in_list()(int val, int ok_if_empty) {
6747 gtk_combo_set_value_in_list(&this, val, ok_if_empty);
6752 // A GtkComboBox is a widget that allows the user to choose from a list of
6753 // valid choices. The GtkComboBox displays the selected choice. When
6754 // activated, the GtkComboBox displays a popup which allows the user to
6755 // make a new choice. The style in which the selected value is displayed,
6756 // and the style of the popup is determined by the current theme. It may
6757 // be similar to a Windows-style combo box.
6758 // The GtkComboBox uses the model-view pattern; the list of valid choices
6759 // is specified in the form of a tree model, and the display of the choices
6760 // can be adapted to the data in the model by using cell renderers, as you
6761 // would in a tree view. This is possible since GtkComboBox implements the
6762 // #GtkCellLayout interface. The tree model holding the valid choices is
6763 // not restricted to a flat list, it can be a real tree, and the popup will
6764 // reflect the tree structure.
6765 // To allow the user to enter values not in the model, the 'has-entry'
6766 // property allows the GtkComboBox to contain a #GtkEntry. This entry
6767 // can be accessed by calling gtk_bin_get_child() on the combo box.
6768 // For a simple list of textual choices, the model-view API of GtkComboBox
6769 // can be a bit overwhelming. In this case, #GtkComboBoxText offers a
6770 // simple alternative. Both GtkComboBox and #GtkComboBoxText can contain
6771 // an entry.
6772 struct ComboBox /* : Bin */ {
6773 mixin Atk.ImplementorIface.__interface__;
6774 mixin Buildable.__interface__;
6775 mixin CellEditable.__interface__;
6776 mixin CellLayout.__interface__;
6777 alias parent_instance this;
6778 alias parent_instance super_;
6779 alias parent_instance bin;
6780 Bin parent_instance;
6781 private ComboBoxPrivate* priv;
6784 // VERSION: 2.4
6785 // Creates a new empty #GtkComboBox.
6786 // RETURNS: A new #GtkComboBox.
6787 static ComboBox* new_()() {
6788 return gtk_combo_box_new();
6791 // VERSION: 2.4
6792 // DEPRECATED (v2.24) constructor: new_text - Use #GtkComboBoxText
6793 // Convenience function which constructs a new text combo box, which is a
6794 // #GtkComboBox just displaying strings. If you use this function to create
6795 // a text combo box, you should only manipulate its data source with the
6796 // gtk_combo_box_insert_text(), gtk_combo_box_prepend_text() and
6797 // gtk_combo_box_remove_text().
6798 // RETURNS: A new text combo box.
6799 static ComboBox* new_text()() {
6800 return gtk_combo_box_new_text();
6803 // Creates a new empty #GtkComboBox with an entry.
6804 // RETURNS: A new #GtkComboBox.
6805 static ComboBox* new_with_entry()() {
6806 return gtk_combo_box_new_with_entry();
6809 // VERSION: 2.4
6810 // Creates a new #GtkComboBox with the model initialized to @model.
6811 // RETURNS: A new #GtkComboBox.
6812 // <model>: A #GtkTreeModel.
6813 static ComboBox* new_with_model()(TreeModel* model) {
6814 return gtk_combo_box_new_with_model(model);
6817 // Creates a new empty #GtkComboBox with an entry
6818 // and with the model initialized to @model.
6819 // RETURNS: A new #GtkComboBox
6820 static ComboBox* new_with_model_and_entry()(TreeModel* model) {
6821 return gtk_combo_box_new_with_model_and_entry(model);
6824 // VERSION: 2.4
6825 // DEPRECATED (v2.24) method: append_text - Use #GtkComboBoxText
6826 // Appends @string to the list of strings stored in @combo_box. Note that
6827 // you can only use this function with combo boxes constructed with
6828 // gtk_combo_box_new_text().
6829 // <text>: A string
6830 void append_text()(char* text) {
6831 gtk_combo_box_append_text(&this, text);
6834 // VERSION: 2.4
6835 // Returns the index of the currently active item, or -1 if there's no
6836 // active item. If the model is a non-flat treemodel, and the active item
6837 // is not an immediate child of the root of the tree, this function returns
6838 // <literal>gtk_tree_path_get_indices (path)[0]</literal>, where
6839 // <literal>path</literal> is the #GtkTreePath of the active item.
6840 // or -1 if there's no active item.
6841 // RETURNS: An integer which is the index of the currently active item,
6842 int get_active()() {
6843 return gtk_combo_box_get_active(&this);
6846 // VERSION: 2.4
6847 // Sets @iter to point to the current active item, if it exists.
6848 // RETURNS: %TRUE, if @iter was set
6849 // <iter>: The uninitialized #GtkTreeIter
6850 int get_active_iter()(/*out*/ TreeIter* iter) {
6851 return gtk_combo_box_get_active_iter(&this, iter);
6854 // VERSION: 2.6
6855 // DEPRECATED (v2.24) method: get_active_text - If you used this with a #GtkComboBox constructed with
6856 // Returns the currently active string in @combo_box or %NULL if none
6857 // is selected. Note that you can only use this function with combo
6858 // boxes constructed with gtk_combo_box_new_text() and with
6859 // #GtkComboBoxEntry<!-- -->s.
6860 // Must be freed with g_free().
6861 // gtk_combo_box_new_text() then you should now use #GtkComboBoxText and
6862 // gtk_combo_box_text_get_active_text() instead. Or if you used this with a
6863 // #GtkComboBoxEntry then you should now use #GtkComboBox with
6864 // #GtkComboBox:has-entry as %TRUE and use
6865 // gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combobox))).
6866 // RETURNS: a newly allocated string containing the currently active text.
6867 char* /*new*/ get_active_text()() {
6868 return gtk_combo_box_get_active_text(&this);
6871 // Gets the current value of the :add-tearoffs property.
6872 // RETURNS: the current value of the :add-tearoffs property.
6873 int get_add_tearoffs()() {
6874 return gtk_combo_box_get_add_tearoffs(&this);
6877 // VERSION: 2.14
6878 // Returns whether the combo box sets the dropdown button
6879 // sensitive or not when there are no items in the model.
6880 // is sensitive when the model is empty, %GTK_SENSITIVITY_OFF
6881 // if the button is always insensitive or
6882 // %GTK_SENSITIVITY_AUTO if it is only sensitive as long as
6883 // the model has one item to be selected.
6884 // RETURNS: %GTK_SENSITIVITY_ON if the dropdown button
6885 SensitivityType get_button_sensitivity()() {
6886 return gtk_combo_box_get_button_sensitivity(&this);
6889 // VERSION: 2.6
6890 // Returns the column with column span information for @combo_box.
6891 // RETURNS: the column span column.
6892 int get_column_span_column()() {
6893 return gtk_combo_box_get_column_span_column(&this);
6896 // VERSION: 2.24
6897 // Returns the column which @combo_box is using to get the strings
6898 // from to display in the internal entry.
6899 // RETURNS: A column in the data source model of @combo_box.
6900 int get_entry_text_column()() {
6901 return gtk_combo_box_get_entry_text_column(&this);
6904 // VERSION: 2.6
6905 // Returns whether the combo box grabs focus when it is clicked
6906 // with the mouse. See gtk_combo_box_set_focus_on_click().
6907 // clicked with the mouse.
6908 // RETURNS: %TRUE if the combo box grabs focus when it is
6909 int get_focus_on_click()() {
6910 return gtk_combo_box_get_focus_on_click(&this);
6913 // VERSION: 2.24
6914 // Returns whether the combo box has an entry.
6915 // RETURNS: whether there is an entry in @combo_box.
6916 int get_has_entry()() {
6917 return gtk_combo_box_get_has_entry(&this);
6920 // VERSION: 2.4
6921 // Returns the #GtkTreeModel which is acting as data source for @combo_box.
6922 // during construction.
6923 // RETURNS: A #GtkTreeModel which was passed
6924 TreeModel* get_model()() {
6925 return gtk_combo_box_get_model(&this);
6928 // VERSION: 2.6
6929 // Gets the accessible object corresponding to the combo box's popup.
6930 // This function is mostly intended for use by accessibility technologies;
6931 // applications should have little use for it.
6932 // to the combo box's popup.
6933 // RETURNS: the accessible object corresponding
6934 Atk.Object* get_popup_accessible()() {
6935 return gtk_combo_box_get_popup_accessible(&this);
6938 // Unintrospectable method: get_row_separator_func() / gtk_combo_box_get_row_separator_func()
6939 // VERSION: 2.6
6940 // Returns the current row separator function.
6941 // RETURNS: the current row separator function.
6942 TreeViewRowSeparatorFunc get_row_separator_func()() {
6943 return gtk_combo_box_get_row_separator_func(&this);
6946 // VERSION: 2.6
6947 // Returns the column with row span information for @combo_box.
6948 // RETURNS: the row span column.
6949 int get_row_span_column()() {
6950 return gtk_combo_box_get_row_span_column(&this);
6953 // VERSION: 2.10
6954 // Gets the current title of the menu in tearoff mode. See
6955 // gtk_combo_box_set_add_tearoffs().
6956 // string which must not be freed.
6957 // RETURNS: the menu's title in tearoff mode. This is an internal copy of the
6958 char* get_title()() {
6959 return gtk_combo_box_get_title(&this);
6962 // VERSION: 2.6
6963 // Returns the wrap width which is used to determine the number of columns
6964 // for the popup menu. If the wrap width is larger than 1, the combo box
6965 // is in table mode.
6966 // RETURNS: the wrap width.
6967 int get_wrap_width()() {
6968 return gtk_combo_box_get_wrap_width(&this);
6971 // VERSION: 2.4
6972 // DEPRECATED (v2.24) method: insert_text - Use #GtkComboBoxText
6973 // Inserts @string at @position in the list of strings stored in @combo_box.
6974 // Note that you can only use this function with combo boxes constructed
6975 // with gtk_combo_box_new_text().
6976 // <position>: An index to insert @text
6977 // <text>: A string
6978 void insert_text()(int position, char* text) {
6979 gtk_combo_box_insert_text(&this, position, text);
6982 // VERSION: 2.4
6983 // Hides the menu or dropdown list of @combo_box.
6984 // This function is mostly intended for use by accessibility technologies;
6985 // applications should have little use for it.
6986 void popdown()() {
6987 gtk_combo_box_popdown(&this);
6990 // VERSION: 2.4
6991 // Pops up the menu or dropdown list of @combo_box.
6992 // This function is mostly intended for use by accessibility technologies;
6993 // applications should have little use for it.
6994 void popup()() {
6995 gtk_combo_box_popup(&this);
6998 // VERSION: 2.4
6999 // DEPRECATED (v2.24) method: prepend_text - Use #GtkComboBoxText
7000 // Prepends @string to the list of strings stored in @combo_box. Note that
7001 // you can only use this function with combo boxes constructed with
7002 // gtk_combo_box_new_text().
7003 // <text>: A string
7004 void prepend_text()(char* text) {
7005 gtk_combo_box_prepend_text(&this, text);
7008 // VERSION: 2.4
7009 // DEPRECATED (v2.24) method: remove_text - Use #GtkComboBoxText
7010 // Removes the string at @position from @combo_box. Note that you can only use
7011 // this function with combo boxes constructed with gtk_combo_box_new_text().
7012 // <position>: Index of the item to remove
7013 void remove_text()(int position) {
7014 gtk_combo_box_remove_text(&this, position);
7017 // VERSION: 2.4
7018 // Sets the active item of @combo_box to be the item at @index.
7019 // <index_>: An index in the model passed during construction, or -1 to have no active item
7020 void set_active()(int index_) {
7021 gtk_combo_box_set_active(&this, index_);
7024 // VERSION: 2.4
7025 // Sets the current active item to be the one referenced by @iter, or
7026 // unsets the active item if @iter is %NULL.
7027 // <iter>: The #GtkTreeIter, or %NULL
7028 void set_active_iter()(TreeIter* iter=null) {
7029 gtk_combo_box_set_active_iter(&this, iter);
7032 // VERSION: 2.6
7033 // Sets whether the popup menu should have a tearoff
7034 // menu item.
7035 // <add_tearoffs>: %TRUE to add tearoff menu items
7036 void set_add_tearoffs()(int add_tearoffs) {
7037 gtk_combo_box_set_add_tearoffs(&this, add_tearoffs);
7040 // VERSION: 2.14
7041 // Sets whether the dropdown button of the combo box should be
7042 // always sensitive (%GTK_SENSITIVITY_ON), never sensitive (%GTK_SENSITIVITY_OFF)
7043 // or only if there is at least one item to display (%GTK_SENSITIVITY_AUTO).
7044 // <sensitivity>: specify the sensitivity of the dropdown button
7045 void set_button_sensitivity()(SensitivityType sensitivity) {
7046 gtk_combo_box_set_button_sensitivity(&this, sensitivity);
7049 // VERSION: 2.4
7050 // Sets the column with column span information for @combo_box to be
7051 // how many columns an item should span.
7052 // <column_span>: A column in the model passed during construction
7053 void set_column_span_column()(int column_span) {
7054 gtk_combo_box_set_column_span_column(&this, column_span);
7057 // VERSION: 2.24
7058 // Sets the model column which @combo_box should use to get strings from
7059 // to be @text_column. The column @text_column in the model of @combo_box
7060 // must be of type %G_TYPE_STRING.
7061 // This is only relevant if @combo_box has been created with
7062 // #GtkComboBox:has-entry as %TRUE.
7063 // <text_column>: A column in @model to get the strings from for the internal entry
7064 void set_entry_text_column()(int text_column) {
7065 gtk_combo_box_set_entry_text_column(&this, text_column);
7068 // VERSION: 2.6
7069 // Sets whether the combo box will grab focus when it is clicked with
7070 // the mouse. Making mouse clicks not grab focus is useful in places
7071 // like toolbars where you don't want the keyboard focus removed from
7072 // the main area of the application.
7073 // <focus_on_click>: whether the combo box grabs focus when clicked with the mouse
7074 void set_focus_on_click()(int focus_on_click) {
7075 gtk_combo_box_set_focus_on_click(&this, focus_on_click);
7078 // VERSION: 2.4
7079 // Sets the model used by @combo_box to be @model. Will unset a previously set
7080 // model (if applicable). If model is %NULL, then it will unset the model.
7081 // Note that this function does not clear the cell renderers, you have to
7082 // call gtk_cell_layout_clear() yourself if you need to set up different
7083 // cell renderers for the new model.
7084 // <model>: A #GtkTreeModel
7085 void set_model()(TreeModel* model=null) {
7086 gtk_combo_box_set_model(&this, model);
7089 // VERSION: 2.6
7090 // Sets the row separator function, which is used to determine
7091 // whether a row should be drawn as a separator. If the row separator
7092 // function is %NULL, no separators are drawn. This is the default value.
7093 // <func>: a #GtkTreeViewRowSeparatorFunc
7094 // <data>: user data to pass to @func, or %NULL
7095 // <destroy>: destroy notifier for @data, or %NULL
7096 void set_row_separator_func()(TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
7097 gtk_combo_box_set_row_separator_func(&this, func, data, destroy);
7100 // VERSION: 2.4
7101 // Sets the column with row span information for @combo_box to be @row_span.
7102 // The row span column contains integers which indicate how many rows
7103 // an item should span.
7104 // <row_span>: A column in the model passed during construction.
7105 void set_row_span_column()(int row_span) {
7106 gtk_combo_box_set_row_span_column(&this, row_span);
7109 // VERSION: 2.10
7110 // Sets the menu's title in tearoff mode.
7111 // <title>: a title for the menu in tearoff mode
7112 void set_title()(char* title) {
7113 gtk_combo_box_set_title(&this, title);
7116 // VERSION: 2.4
7117 // Sets the wrap width of @combo_box to be @width. The wrap width is basically
7118 // the preferred number of columns when you want the popup to be layed out
7119 // in a table.
7120 // <width>: Preferred number of columns
7121 void set_wrap_width()(int width) {
7122 gtk_combo_box_set_wrap_width(&this, width);
7125 // VERSION: 2.4
7126 // The changed signal is emitted when the active
7127 // item is changed. The can be due to the user selecting
7128 // a different item from the list, or due to a
7129 // call to gtk_combo_box_set_active_iter().
7130 // It will also be emitted while typing into a GtkComboBoxEntry,
7131 // as well as when selecting an item from the GtkComboBoxEntry's list.
7132 extern (C) alias static void function (ComboBox* this_, void* user_data=null) signal_changed;
7134 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7135 return super_.signal_connect!name(cb, data, cf);
7138 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7139 return signal_connect_data!()(&this, cast(char*)"changed",
7140 cast(GObject2.Callback)cb, data, null, cf);
7143 // VERSION: 2.12
7144 // The ::move-active signal is a
7145 // <link linkend="keybinding-signals">keybinding signal</link>
7146 // which gets emitted to move the active selection.
7147 // <scroll_type>: a #GtkScrollType
7148 extern (C) alias static void function (ComboBox* this_, ScrollType* scroll_type, void* user_data=null) signal_move_active;
7149 ulong signal_connect(string name:"move-active", CB:signal_move_active)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7150 return signal_connect_data!()(&this, cast(char*)"move-active",
7151 cast(GObject2.Callback)cb, data, null, cf);
7154 // VERSION: 2.12
7155 // The ::popdown signal is a
7156 // <link linkend="keybinding-signals">keybinding signal</link>
7157 // which gets emitted to popdown the combo box list.
7158 // The default bindings for this signal are Alt+Up and Escape.
7159 extern (C) alias static c_int function (ComboBox* this_, void* user_data=null) signal_popdown;
7160 ulong signal_connect(string name:"popdown", CB:signal_popdown)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7161 return signal_connect_data!()(&this, cast(char*)"popdown",
7162 cast(GObject2.Callback)cb, data, null, cf);
7165 // VERSION: 2.12
7166 // The ::popup signal is a
7167 // <link linkend="keybinding-signals">keybinding signal</link>
7168 // which gets emitted to popup the combo box list.
7169 // The default binding for this signal is Alt+Down.
7170 extern (C) alias static void function (ComboBox* this_, void* user_data=null) signal_popup;
7171 ulong signal_connect(string name:"popup", CB:signal_popup)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7172 return signal_connect_data!()(&this, cast(char*)"popup",
7173 cast(GObject2.Callback)cb, data, null, cf);
7177 struct ComboBoxClass {
7178 BinClass parent_class;
7179 extern (C) void function (ComboBox* combo_box) changed;
7180 // RETURNS: a newly allocated string containing the currently active text.
7181 extern (C) char* /*new*/ function (ComboBox* combo_box) get_active_text;
7182 extern (C) void function () _gtk_reserved0;
7183 extern (C) void function () _gtk_reserved1;
7184 extern (C) void function () _gtk_reserved2;
7187 struct ComboBoxEntry /* : ComboBox */ {
7188 mixin Atk.ImplementorIface.__interface__;
7189 mixin Buildable.__interface__;
7190 mixin CellEditable.__interface__;
7191 mixin CellLayout.__interface__;
7192 alias parent_instance this;
7193 alias parent_instance super_;
7194 alias parent_instance combobox;
7195 ComboBox parent_instance;
7196 private ComboBoxEntryPrivate* priv;
7199 // VERSION: 2.4
7200 // DEPRECATED (v2.24) constructor: new - Use gtk_combo_box_new_with_entry() instead
7201 // Creates a new #GtkComboBoxEntry which has a #GtkEntry as child. After
7202 // construction, you should set a model using gtk_combo_box_set_model() and a
7203 // text column using gtk_combo_box_entry_set_text_column().
7204 // RETURNS: A new #GtkComboBoxEntry.
7205 static ComboBoxEntry* new_()() {
7206 return gtk_combo_box_entry_new();
7209 // VERSION: 2.4
7210 // Convenience function which constructs a new editable text combo box, which
7211 // is a #GtkComboBoxEntry just displaying strings. If you use this function to
7212 // create a text combo box, you should only manipulate its data source with
7213 // gtk_combo_box_insert_text(), gtk_combo_box_prepend_text() and
7214 // gtk_combo_box_remove_text().
7215 // RETURNS: A new text #GtkComboBoxEntry.
7216 static ComboBoxEntry* new_text()() {
7217 return gtk_combo_box_entry_new_text();
7220 // VERSION: 2.4
7221 // DEPRECATED (v2.24) constructor: new_with_model - Use gtk_combo_box_new_with_model_and_entry() instead
7222 // Creates a new #GtkComboBoxEntry which has a #GtkEntry as child and a list
7223 // of strings as popup. You can get the #GtkEntry from a #GtkComboBoxEntry
7224 // using GTK_ENTRY (GTK_BIN (combo_box_entry)->child). To add and remove
7225 // strings from the list, just modify @model using its data manipulation
7226 // API.
7227 // RETURNS: A new #GtkComboBoxEntry.
7228 // <model>: A #GtkTreeModel.
7229 // <text_column>: A column in @model to get the strings from.
7230 static ComboBoxEntry* new_with_model()(TreeModel* model, int text_column) {
7231 return gtk_combo_box_entry_new_with_model(model, text_column);
7234 // VERSION: 2.4
7235 // DEPRECATED (v2.24) method: get_text_column - Use gtk_combo_box_get_entry_text_column() instead
7236 // Returns the column which @entry_box is using to get the strings from.
7237 // RETURNS: A column in the data source model of @entry_box.
7238 int get_text_column()() {
7239 return gtk_combo_box_entry_get_text_column(&this);
7242 // VERSION: 2.4
7243 // DEPRECATED (v2.24) method: set_text_column - Use gtk_combo_box_set_entry_text_column() instead
7244 // Sets the model column which @entry_box should use to get strings from
7245 // to be @text_column.
7246 // <text_column>: A column in @model to get the strings from.
7247 void set_text_column()(int text_column) {
7248 gtk_combo_box_entry_set_text_column(&this, text_column);
7252 struct ComboBoxEntryClass {
7253 ComboBoxClass parent_class;
7254 extern (C) void function () _gtk_reserved0;
7255 extern (C) void function () _gtk_reserved1;
7256 extern (C) void function () _gtk_reserved2;
7257 extern (C) void function () _gtk_reserved3;
7260 struct ComboBoxEntryPrivate {
7263 struct ComboBoxPrivate {
7267 // A GtkComboBoxText is a simple variant of #GtkComboBox that hides
7268 // the model-view complexity for simple text-only use cases.
7269 // To create a GtkComboBoxText, use gtk_combo_box_text_new() or
7270 // gtk_combo_box_text_new_with_entry().
7271 // You can add items to a GtkComboBoxText with
7272 // gtk_combo_box_text_append_text(), gtk_combo_box_text_insert_text()
7273 // or gtk_combo_box_text_prepend_text() and remove options with
7274 // gtk_combo_box_text_remove().
7275 // If the GtkComboBoxText contains an entry (via the 'has-entry' property),
7276 // its contents can be retrieved using gtk_combo_box_text_get_active_text().
7277 // The entry itself can be accessed by calling gtk_bin_get_child() on the
7278 // combo box.
7279 // <refsect2 id="GtkComboBoxText-BUILDER-UI">
7280 // <title>GtkComboBoxText as GtkBuildable</title>
7281 // <para>
7282 // The GtkComboBoxText implementation of the GtkBuildable interface
7283 // supports adding items directly using the &lt;items&gt element
7284 // and specifying &lt;item&gt; elements for each item. Each &lt;item&gt;
7285 // element supports the regular translation attributes "translatable",
7286 // "context" and "comments".
7287 // </para>
7288 // <example>
7289 // <title>A UI definition fragment specifying GtkComboBoxText items</title>
7290 // <programlisting><![CDATA[
7291 // <object class="GtkComboBoxText">
7292 // <items>
7293 // <item translatable="yes">Factory</item>
7294 // <item translatable="yes">Home</item>
7295 // <item translatable="yes">Subway</item>
7296 // </items>
7297 // </object>
7298 // ]]></programlisting>
7299 // </example>
7300 // </refsect2>
7301 struct ComboBoxText /* : ComboBox */ {
7302 mixin Atk.ImplementorIface.__interface__;
7303 mixin Buildable.__interface__;
7304 mixin CellEditable.__interface__;
7305 mixin CellLayout.__interface__;
7306 alias parent_instance this;
7307 alias parent_instance super_;
7308 alias parent_instance combobox;
7309 ComboBox parent_instance;
7310 private ComboBoxTextPrivate* priv;
7313 // VERSION: 2.24
7314 // Creates a new #GtkComboBoxText, which is a #GtkComboBox just displaying
7315 // strings. See gtk_combo_box_entry_new_with_text().
7316 // RETURNS: A new #GtkComboBoxText
7317 static ComboBoxText* new_()() {
7318 return gtk_combo_box_text_new();
7321 // VERSION: 2.24
7322 // Creates a new #GtkComboBoxText, which is a #GtkComboBox just displaying
7323 // strings. The combo box created by this function has an entry.
7324 // RETURNS: a new #GtkComboBoxText
7325 static ComboBoxText* new_with_entry()() {
7326 return gtk_combo_box_text_new_with_entry();
7329 // VERSION: 2.24
7330 // Appends @string to the list of strings stored in @combo_box.
7331 // <text>: A string
7332 void append_text()(char* text) {
7333 gtk_combo_box_text_append_text(&this, text);
7336 // VERSION: 2.24
7337 // Returns the currently active string in @combo_box, or %NULL
7338 // if none is selected. If @combo_box contains an entry, this
7339 // function will return its contents (which will not necessarily
7340 // be an item from the list).
7341 // active text. Must be freed with g_free().
7342 // RETURNS: a newly allocated string containing the currently
7343 char* /*new*/ get_active_text()() {
7344 return gtk_combo_box_text_get_active_text(&this);
7347 // VERSION: 2.24
7348 // Inserts @string at @position in the list of strings stored in @combo_box.
7349 // <position>: An index to insert @text
7350 // <text>: A string
7351 void insert_text()(int position, char* text) {
7352 gtk_combo_box_text_insert_text(&this, position, text);
7355 // VERSION: 2.24
7356 // Prepends @string to the list of strings stored in @combo_box.
7357 // <text>: A string
7358 void prepend_text()(char* text) {
7359 gtk_combo_box_text_prepend_text(&this, text);
7362 // VERSION: 2.24
7363 // Removes the string at @position from @combo_box.
7364 // <position>: Index of the item to remove
7365 void remove()(int position) {
7366 gtk_combo_box_text_remove(&this, position);
7370 struct ComboBoxTextClass {
7371 ComboBoxClass parent_class;
7372 extern (C) void function () _gtk_reserved1;
7373 extern (C) void function () _gtk_reserved2;
7374 extern (C) void function () _gtk_reserved3;
7375 extern (C) void function () _gtk_reserved4;
7378 struct ComboBoxTextPrivate {
7381 struct ComboClass {
7382 HBoxClass parent_class;
7383 extern (C) void function () _gtk_reserved1;
7384 extern (C) void function () _gtk_reserved2;
7385 extern (C) void function () _gtk_reserved3;
7386 extern (C) void function () _gtk_reserved4;
7389 struct Container /* : Widget */ {
7390 mixin Atk.ImplementorIface.__interface__;
7391 mixin Buildable.__interface__;
7392 alias widget this;
7393 alias widget super_;
7394 Widget widget;
7395 Widget* focus_child;
7396 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
7397 uint, "border_width", 16,
7398 uint, "need_resize", 1,
7399 uint, "resize_mode", 2,
7400 uint, "reallocate_redraws", 1,
7401 uint, "has_focus_chain", 1,
7402 uint, "__dummy32A", 11));
7405 // Adds @widget to @container. Typically used for simple containers
7406 // such as #GtkWindow, #GtkFrame, or #GtkButton; for more complicated
7407 // layout containers such as #GtkBox or #GtkTable, this function will
7408 // pick default packing parameters that may not be correct. So
7409 // consider functions such as gtk_box_pack_start() and
7410 // gtk_table_attach() as an alternative to gtk_container_add() in
7411 // those cases. A widget may be added to only one container at a time;
7412 // you can't place the same widget inside two different containers.
7413 // <widget>: a widget to be placed inside @container
7414 void add()(Widget* widget) {
7415 gtk_container_add(&this, widget);
7418 // Unintrospectable method: add_with_properties() / gtk_container_add_with_properties()
7419 // Adds @widget to @container, setting child properties at the same time.
7420 // See gtk_container_add() and gtk_container_child_set() for more details.
7421 // <widget>: a widget to be placed inside @container
7422 // <first_prop_name>: the name of the first child property to set
7423 /+ Not available -- variadic methods unsupported - use the C function directly.
7424 alias gtk_container_add_with_properties add_with_properties; // Variadic
7426 void check_resize()() {
7427 gtk_container_check_resize(&this);
7430 // Unintrospectable method: child_get() / gtk_container_child_get()
7431 // Gets the values of one or more child properties for @child and @container.
7432 // <child>: a widget which is a child of @container
7433 // <first_prop_name>: the name of the first property to get
7434 /+ Not available -- variadic methods unsupported - use the C function directly.
7435 alias gtk_container_child_get child_get; // Variadic
7438 // Gets the value of a child property for @child and @container.
7439 // <child>: a widget which is a child of @container
7440 // <property_name>: the name of the property to get
7441 // <value>: a location to return the value
7442 void child_get_property()(Widget* child, char* property_name, GObject2.Value* value) {
7443 gtk_container_child_get_property(&this, child, property_name, value);
7446 // Unintrospectable method: child_get_valist() / gtk_container_child_get_valist()
7447 // Gets the values of one or more child properties for @child and @container.
7448 // <child>: a widget which is a child of @container
7449 // <first_property_name>: the name of the first property to get
7450 // <var_args>: return location for the first property, followed optionally by more name/return location pairs, followed by %NULL
7451 void child_get_valist()(Widget* child, char* first_property_name, va_list var_args) {
7452 gtk_container_child_get_valist(&this, child, first_property_name, var_args);
7455 // Unintrospectable method: child_set() / gtk_container_child_set()
7456 // Sets one or more child properties for @child and @container.
7457 // <child>: a widget which is a child of @container
7458 // <first_prop_name>: the name of the first property to set
7459 /+ Not available -- variadic methods unsupported - use the C function directly.
7460 alias gtk_container_child_set child_set; // Variadic
7463 // Sets a child property for @child and @container.
7464 // <child>: a widget which is a child of @container
7465 // <property_name>: the name of the property to set
7466 // <value>: the value to set the property to
7467 void child_set_property()(Widget* child, char* property_name, GObject2.Value* value) {
7468 gtk_container_child_set_property(&this, child, property_name, value);
7471 // Unintrospectable method: child_set_valist() / gtk_container_child_set_valist()
7472 // Sets one or more child properties for @child and @container.
7473 // <child>: a widget which is a child of @container
7474 // <first_property_name>: the name of the first property to set
7475 // <var_args>: a %NULL-terminated list of property names and values, starting with @first_prop_name
7476 void child_set_valist()(Widget* child, char* first_property_name, va_list var_args) {
7477 gtk_container_child_set_valist(&this, child, first_property_name, var_args);
7480 // Returns the type of the children supported by the container.
7481 // Note that this may return %G_TYPE_NONE to indicate that no more
7482 // children can be added, e.g. for a #GtkPaned which already has two
7483 // children.
7484 // RETURNS: a #GType.
7485 Type child_type()() {
7486 return gtk_container_child_type(&this);
7489 // Unintrospectable method: forall() / gtk_container_forall()
7490 // Invokes @callback on each child of @container, including children
7491 // that are considered "internal" (implementation details of the
7492 // container). "Internal" children generally weren't added by the user
7493 // of the container, but were added by the container implementation
7494 // itself. Most applications should use gtk_container_foreach(),
7495 // rather than gtk_container_forall().
7496 // <callback>: a callback
7497 // <callback_data>: callback user data
7498 void forall()(Callback callback, void* callback_data) {
7499 gtk_container_forall(&this, callback, callback_data);
7502 // Invokes @callback on each non-internal child of @container. See
7503 // gtk_container_forall() for details on what constitutes an
7504 // "internal" child. Most applications should use
7505 // gtk_container_foreach(), rather than gtk_container_forall().
7506 // <callback>: a callback
7507 // <callback_data>: callback user data
7508 void foreach_()(Callback callback, void* callback_data) {
7509 gtk_container_foreach(&this, callback, callback_data);
7511 // Unintrospectable method: foreach_full() / gtk_container_foreach_full()
7512 void foreach_full()(Callback callback, CallbackMarshal marshal, void* callback_data, GLib2.DestroyNotify notify) {
7513 gtk_container_foreach_full(&this, callback, marshal, callback_data, notify);
7516 // Retrieves the border width of the container. See
7517 // gtk_container_set_border_width().
7518 // RETURNS: the current border width
7519 uint get_border_width()() {
7520 return gtk_container_get_border_width(&this);
7523 // Returns the container's non-internal children. See
7524 // gtk_container_forall() for details on what constitutes an "internal" child.
7525 // RETURNS: a newly-allocated list of the container's non-internal children.
7526 GLib2.List* /*new container*/ get_children()() {
7527 return gtk_container_get_children(&this);
7530 // Retrieves the focus chain of the container, if one has been
7531 // set explicitly. If no focus chain has been explicitly
7532 // set, GTK+ computes the focus chain based on the positions
7533 // of the children. In that case, GTK+ stores %NULL in
7534 // has been set explicitly.
7535 // RETURNS: %TRUE if the focus chain of the container
7536 // <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.
7537 int get_focus_chain()(/*out*/ GLib2.List** focusable_widgets) {
7538 return gtk_container_get_focus_chain(&this, focusable_widgets);
7541 // VERSION: 2.14
7542 // Returns the current focus child widget inside @container. This is not the
7543 // currently focused widget. That can be obtained by calling
7544 // gtk_window_get_focus().
7545 // focus inside @container when the @conatiner is focussed,
7546 // or %NULL if none is set.
7547 // RETURNS: The child widget which will receive the
7548 Widget* get_focus_child()() {
7549 return gtk_container_get_focus_child(&this);
7552 // Retrieves the horizontal focus adjustment for the container. See
7553 // gtk_container_set_focus_hadjustment ().
7554 // none has been set.
7555 // RETURNS: the horizontal focus adjustment, or %NULL if
7556 Adjustment* get_focus_hadjustment()() {
7557 return gtk_container_get_focus_hadjustment(&this);
7560 // Retrieves the vertical focus adjustment for the container. See
7561 // gtk_container_set_focus_vadjustment().
7562 // none has been set.
7563 // RETURNS: the vertical focus adjustment, or %NULL if
7564 Adjustment* get_focus_vadjustment()() {
7565 return gtk_container_get_focus_vadjustment(&this);
7568 // Returns the resize mode for the container. See
7569 // gtk_container_set_resize_mode ().
7570 // RETURNS: the current resize mode
7571 ResizeMode get_resize_mode()() {
7572 return gtk_container_get_resize_mode(&this);
7575 // When a container receives an expose event, it must send synthetic
7576 // expose events to all children that don't have their own #GdkWindows.
7577 // This function provides a convenient way of doing this. A container,
7578 // when it receives an expose event, calls gtk_container_propagate_expose()
7579 // once for each child, passing in the event the container received.
7580 // gtk_container_propagate_expose() takes care of deciding whether
7581 // an expose event needs to be sent to the child, intersecting
7582 // the event's area with the child area, and sending the event.
7583 // In most cases, a container can simply either simply inherit the
7584 // #GtkWidget::expose implementation from #GtkContainer, or, do some drawing
7585 // and then chain to the ::expose implementation from #GtkContainer.
7586 // Note that the ::expose-event signal has been replaced by a ::draw
7587 // signal in GTK+ 3, and consequently, gtk_container_propagate_expose()
7588 // has been replaced by gtk_container_propagate_draw().
7589 // The <link linkend="http://library.gnome.org/devel/gtk3/3.0/gtk-migrating-2-to-3.html">GTK+ 3 migration guide</link>
7590 // for hints on how to port from ::expose-event to ::draw.
7591 // <child>: a child of @container
7592 // <event>: a expose event sent to container
7593 void propagate_expose()(Widget* child, Gdk2.EventExpose* event) {
7594 gtk_container_propagate_expose(&this, child, event);
7597 // Removes @widget from @container. @widget must be inside @container.
7598 // Note that @container will own a reference to @widget, and that this
7599 // may be the last reference held; so removing a widget from its
7600 // container can destroy that widget. If you want to use @widget
7601 // again, you need to add a reference to it while it's not inside
7602 // a container, using g_object_ref(). If you don't want to use @widget
7603 // again it's usually more efficient to simply destroy it directly
7604 // using gtk_widget_destroy() since this will remove it from the
7605 // container and help break any circular reference count cycles.
7606 // <widget>: a current child of @container
7607 void remove()(Widget* widget) {
7608 gtk_container_remove(&this, widget);
7610 void resize_children()() {
7611 gtk_container_resize_children(&this);
7614 // Sets the border width of the container.
7615 // The border width of a container is the amount of space to leave
7616 // around the outside of the container. The only exception to this is
7617 // #GtkWindow; because toplevel windows can't leave space outside,
7618 // they leave the space inside. The border is added on all sides of
7619 // the container. To add space to only one side, one approach is to
7620 // create a #GtkAlignment widget, call gtk_widget_set_size_request()
7621 // to give it a size, and place it on the side of the container as
7622 // a spacer.
7623 // <border_width>: amount of blank space to leave <emphasis>outside</emphasis> the container. Valid values are in the range 0-65535 pixels.
7624 void set_border_width()(uint border_width) {
7625 gtk_container_set_border_width(&this, border_width);
7628 // Sets a focus chain, overriding the one computed automatically by GTK+.
7629 // In principle each widget in the chain should be a descendant of the
7630 // container, but this is not enforced by this method, since it's allowed
7631 // to set the focus chain before you pack the widgets, or have a widget
7632 // in the chain that isn't always packed. The necessary checks are done
7633 // when the focus chain is actually traversed.
7634 // <focusable_widgets>: the new focus chain
7635 void set_focus_chain()(GLib2.List* focusable_widgets) {
7636 gtk_container_set_focus_chain(&this, focusable_widgets);
7639 // Sets, or unsets if @child is %NULL, the focused child of @container.
7640 // This function emits the GtkContainer::set_focus_child signal of
7641 // default behaviour by overriding the class closure of this signal.
7642 // This is function is mostly meant to be used by widgets. Applications can use
7643 // gtk_widget_grab_focus() to manualy set the focus to a specific widget.
7644 // <child>: a #GtkWidget, or %NULL
7645 void set_focus_child()(Widget* child=null) {
7646 gtk_container_set_focus_child(&this, child);
7649 // Hooks up an adjustment to focus handling in a container, so when a child
7650 // of the container is focused, the adjustment is scrolled to show that
7651 // widget. This function sets the horizontal alignment.
7652 // See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining
7653 // the adjustment and gtk_container_set_focus_vadjustment() for setting
7654 // the vertical adjustment.
7655 // The adjustments have to be in pixel units and in the same coordinate
7656 // system as the allocation for immediate children of the container.
7657 // <adjustment>: an adjustment which should be adjusted when the focus is moved among the descendents of @container
7658 void set_focus_hadjustment()(Adjustment* adjustment) {
7659 gtk_container_set_focus_hadjustment(&this, adjustment);
7662 // Hooks up an adjustment to focus handling in a container, so when a
7663 // child of the container is focused, the adjustment is scrolled to
7664 // show that widget. This function sets the vertical alignment. See
7665 // gtk_scrolled_window_get_vadjustment() for a typical way of obtaining
7666 // the adjustment and gtk_container_set_focus_hadjustment() for setting
7667 // the horizontal adjustment.
7668 // The adjustments have to be in pixel units and in the same coordinate
7669 // system as the allocation for immediate children of the container.
7670 // <adjustment>: an adjustment which should be adjusted when the focus is moved among the descendents of @container
7671 void set_focus_vadjustment()(Adjustment* adjustment) {
7672 gtk_container_set_focus_vadjustment(&this, adjustment);
7675 // Sets the @reallocate_redraws flag of the container to the given value.
7676 // Containers requesting reallocation redraws get automatically
7677 // redrawn if any of their children changed allocation.
7678 // <needs_redraws>: the new value for the container's @reallocate_redraws flag
7679 void set_reallocate_redraws()(int needs_redraws) {
7680 gtk_container_set_reallocate_redraws(&this, needs_redraws);
7683 // Sets the resize mode for the container.
7684 // The resize mode of a container determines whether a resize request
7685 // will be passed to the container's parent, queued for later execution
7686 // or executed immediately.
7687 // <resize_mode>: the new resize mode
7688 void set_resize_mode()(ResizeMode resize_mode) {
7689 gtk_container_set_resize_mode(&this, resize_mode);
7691 // Removes a focus chain explicitly set with gtk_container_set_focus_chain().
7692 void unset_focus_chain()() {
7693 gtk_container_unset_focus_chain(&this);
7695 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) signal_add;
7697 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7698 return super_.signal_connect!name(cb, data, cf);
7701 ulong signal_connect(string name:"add", CB:signal_add)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7702 return signal_connect_data!()(&this, cast(char*)"add",
7703 cast(GObject2.Callback)cb, data, null, cf);
7705 extern (C) alias static void function (Container* this_, void* user_data=null) signal_check_resize;
7706 ulong signal_connect(string name:"check-resize", CB:signal_check_resize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7707 return signal_connect_data!()(&this, cast(char*)"check-resize",
7708 cast(GObject2.Callback)cb, data, null, cf);
7710 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) signal_remove;
7711 ulong signal_connect(string name:"remove", CB:signal_remove)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7712 return signal_connect_data!()(&this, cast(char*)"remove",
7713 cast(GObject2.Callback)cb, data, null, cf);
7715 extern (C) alias static void function (Container* this_, Widget* object, void* user_data=null) signal_set_focus_child;
7716 ulong signal_connect(string name:"set-focus-child", CB:signal_set_focus_child)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7717 return signal_connect_data!()(&this, cast(char*)"set-focus-child",
7718 cast(GObject2.Callback)cb, data, null, cf);
7722 struct ContainerClass {
7723 WidgetClass parent_class;
7724 // <widget>: a widget to be placed inside @container
7725 extern (C) void function (Container* container, Widget* widget) add;
7726 // <widget>: a current child of @container
7727 extern (C) void function (Container* container, Widget* widget) remove;
7728 extern (C) void function (Container* container) check_resize;
7729 // Unintrospectable functionp: forall() / ()
7730 extern (C) void function (Container* container, int include_internals, Callback callback, void* callback_data) forall;
7731 extern (C) void function (Container* container, Widget* widget) set_focus_child;
7732 // RETURNS: a #GType.
7733 extern (C) Type function (Container* container) child_type;
7734 extern (C) char* /*new*/ function (Container* container, Widget* child) composite_name;
7735 extern (C) void function (Container* container, Widget* child, uint property_id, GObject2.Value* value, GObject2.ParamSpec* pspec) set_child_property;
7736 extern (C) void function (Container* container, Widget* child, uint property_id, GObject2.Value* value, GObject2.ParamSpec* pspec) get_child_property;
7737 extern (C) void function () _gtk_reserved1;
7738 extern (C) void function () _gtk_reserved2;
7739 extern (C) void function () _gtk_reserved3;
7740 extern (C) void function () _gtk_reserved4;
7743 // Finds a child property of a container class by name.
7744 // RETURNS: the #GParamSpec of the child property or %NULL if @class has no child property with that name.
7745 // <property_name>: the name of the child property to find
7746 GObject2.ParamSpec* find_child_property()(char* property_name) {
7747 return gtk_container_class_find_child_property(&this, property_name);
7750 // Installs a child property on a container class.
7751 // <property_id>: the id for the property
7752 // <pspec>: the #GParamSpec for the property
7753 void install_child_property()(uint property_id, GObject2.ParamSpec* pspec) {
7754 gtk_container_class_install_child_property(&this, property_id, pspec);
7757 // Returns all child properties of a container class.
7758 // RETURNS: a newly allocated %NULL-terminated array of #GParamSpec*. The array must be freed with g_free().
7759 // <n_properties>: location to return the number of child properties found
7760 GObject2.ParamSpec** /*new container*/ list_child_properties()(/*out*/ uint* n_properties) {
7761 return gtk_container_class_list_child_properties(&this, n_properties);
7765 enum CornerType {
7766 TOP_LEFT = 0,
7767 BOTTOM_LEFT = 1,
7768 TOP_RIGHT = 2,
7769 BOTTOM_RIGHT = 3
7771 struct Curve /* : DrawingArea */ {
7772 mixin Atk.ImplementorIface.__interface__;
7773 mixin Buildable.__interface__;
7774 alias graph this;
7775 alias graph super_;
7776 alias graph drawingarea;
7777 DrawingArea graph;
7778 int cursor_type;
7779 float min_x, max_x, min_y, max_y;
7780 Gdk2.Pixmap* pixmap;
7781 CurveType curve_type;
7782 int height, grab_point, last, num_points;
7783 Gdk2.Point* point;
7784 int num_ctlpoints;
7785 float* ctlpoint;
7787 static Curve* new_()() {
7788 return gtk_curve_new();
7790 void get_vector()(int veclen, float vector) {
7791 gtk_curve_get_vector(&this, veclen, vector);
7793 void reset()() {
7794 gtk_curve_reset(&this);
7796 void set_curve_type()(CurveType type) {
7797 gtk_curve_set_curve_type(&this, type);
7799 void set_gamma()(float gamma_) {
7800 gtk_curve_set_gamma(&this, gamma_);
7802 void set_range()(float min_x, float max_x, float min_y, float max_y) {
7803 gtk_curve_set_range(&this, min_x, max_x, min_y, max_y);
7805 void set_vector()(int veclen, float vector) {
7806 gtk_curve_set_vector(&this, veclen, vector);
7808 extern (C) alias static void function (Curve* this_, void* user_data=null) signal_curve_type_changed;
7810 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7811 return super_.signal_connect!name(cb, data, cf);
7814 ulong signal_connect(string name:"curve-type-changed", CB:signal_curve_type_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7815 return signal_connect_data!()(&this, cast(char*)"curve-type-changed",
7816 cast(GObject2.Callback)cb, data, null, cf);
7820 struct CurveClass {
7821 DrawingAreaClass parent_class;
7822 extern (C) void function (Curve* curve) curve_type_changed;
7823 extern (C) void function () _gtk_reserved1;
7824 extern (C) void function () _gtk_reserved2;
7825 extern (C) void function () _gtk_reserved3;
7826 extern (C) void function () _gtk_reserved4;
7829 enum CurveType {
7830 LINEAR = 0,
7831 SPLINE = 1,
7832 FREE = 2
7834 enum DebugFlag {
7835 MISC = 1,
7836 PLUGSOCKET = 2,
7837 TEXT = 4,
7838 TREE = 8,
7839 UPDATES = 16,
7840 KEYBINDINGS = 32,
7841 MULTIHEAD = 64,
7842 MODULES = 128,
7843 GEOMETRY = 256,
7844 ICONTHEME = 512,
7845 PRINTING = 1024,
7846 BUILDER = 2048
7848 enum DeleteType {
7849 CHARS = 0,
7850 WORD_ENDS = 1,
7851 WORDS = 2,
7852 DISPLAY_LINES = 3,
7853 DISPLAY_LINE_ENDS = 4,
7854 PARAGRAPH_ENDS = 5,
7855 PARAGRAPHS = 6,
7856 WHITESPACE = 7
7858 enum DestDefaults {
7859 MOTION = 1,
7860 HIGHLIGHT = 2,
7861 DROP = 4,
7862 ALL = 7
7864 extern (C) alias void function (void* data) DestroyNotify;
7866 struct Dialog /* : Window */ {
7867 mixin Atk.ImplementorIface.__interface__;
7868 mixin Buildable.__interface__;
7869 alias window this;
7870 alias window super_;
7871 Window window;
7872 Widget* vbox, action_area;
7873 private Widget* separator;
7875 static Dialog* new_()() {
7876 return gtk_dialog_new();
7879 // Unintrospectable constructor: new_with_buttons() / gtk_dialog_new_with_buttons()
7880 // Creates a new #GtkDialog with title @title (or %NULL for the default
7881 // title; see gtk_window_set_title()) and transient parent @parent (or
7882 // %NULL for none; see gtk_window_set_transient_for()). The @flags
7883 // argument can be used to make the dialog modal (#GTK_DIALOG_MODAL)
7884 // and/or to have it destroyed along with its transient parent
7885 // (#GTK_DIALOG_DESTROY_WITH_PARENT). After @flags, button
7886 // text/response ID pairs should be listed, with a %NULL pointer ending
7887 // the list. Button text can be either a stock ID such as
7888 // #GTK_STOCK_OK, or some arbitrary text. A response ID can be
7889 // any positive number, or one of the values in the #GtkResponseType
7890 // enumeration. If the user clicks one of these dialog buttons,
7891 // #GtkDialog will emit the #GtkDialog::response signal with the corresponding
7892 // response ID. If a #GtkDialog receives the #GtkWidget::delete-event signal,
7893 // it will emit ::response with a response ID of #GTK_RESPONSE_DELETE_EVENT.
7894 // However, destroying a dialog does not emit the ::response signal;
7895 // so be careful relying on ::response when using the
7896 // #GTK_DIALOG_DESTROY_WITH_PARENT flag. Buttons are from left to right,
7897 // so the first button in the list will be the leftmost button in the dialog.
7898 // Here's a simple example:
7899 // |[
7900 // GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
7901 // main_app_window,
7902 // GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
7903 // GTK_STOCK_OK,
7904 // GTK_RESPONSE_ACCEPT,
7905 // GTK_STOCK_CANCEL,
7906 // GTK_RESPONSE_REJECT,
7907 // NULL);
7908 // ]|
7909 // RETURNS: a new #GtkDialog
7910 // <title>: Title of the dialog, or %NULL
7911 // <parent>: Transient parent of the dialog, or %NULL
7912 // <flags>: from #GtkDialogFlags
7913 // <first_button_text>: stock ID or text to go in first button, or %NULL
7914 alias gtk_dialog_new_with_buttons new_with_buttons; // Variadic
7916 // Adds an activatable widget to the action area of a #GtkDialog,
7917 // connecting a signal handler that will emit the #GtkDialog::response
7918 // signal on the dialog when the widget is activated. The widget is
7919 // appended to the end of the dialog's action area. If you want to add a
7920 // non-activatable widget, simply pack it into the @action_area field
7921 // of the #GtkDialog struct.
7922 // <child>: an activatable widget
7923 // <response_id>: response ID for @child
7924 void add_action_widget()(Widget* child, int response_id) {
7925 gtk_dialog_add_action_widget(&this, child, response_id);
7928 // Adds a button with the given text (or a stock button, if @button_text is a
7929 // stock ID) and sets things up so that clicking the button will emit the
7930 // #GtkDialog::response signal with the given @response_id. The button is
7931 // appended to the end of the dialog's action area. The button widget is
7932 // returned, but usually you don't need it.
7933 // RETURNS: the button widget that was added
7934 // <button_text>: text of button, or stock ID
7935 // <response_id>: response ID for the button
7936 Widget* add_button()(char* button_text, int response_id) {
7937 return gtk_dialog_add_button(&this, button_text, response_id);
7940 // Unintrospectable method: add_buttons() / gtk_dialog_add_buttons()
7941 // Adds more buttons, same as calling gtk_dialog_add_button()
7942 // repeatedly. The variable argument list should be %NULL-terminated
7943 // as with gtk_dialog_new_with_buttons(). Each button must have both
7944 // text and response ID.
7945 // <first_button_text>: button text or stock ID
7946 /+ Not available -- variadic methods unsupported - use the C function directly.
7947 alias gtk_dialog_add_buttons add_buttons; // Variadic
7950 // VERSION: 2.14
7951 // Returns the action area of @dialog.
7952 // RETURNS: the action area.
7953 Widget* get_action_area()() {
7954 return gtk_dialog_get_action_area(&this);
7957 // VERSION: 2.14
7958 // Returns the content area of @dialog.
7959 // RETURNS: the content area #GtkVBox.
7960 Widget* get_content_area()() {
7961 return gtk_dialog_get_content_area(&this);
7964 // DEPRECATED (v2.22) method: get_has_separator - This function will be removed in GTK+ 3
7965 // Accessor for whether the dialog has a separator.
7966 // RETURNS: %TRUE if the dialog has a separator
7967 int get_has_separator()() {
7968 return gtk_dialog_get_has_separator(&this);
7971 // VERSION: 2.8
7972 // Gets the response id of a widget in the action area
7973 // of a dialog.
7974 // if @widget doesn't have a response id set.
7975 // RETURNS: the response id of @widget, or %GTK_RESPONSE_NONE
7976 // <widget>: a widget in the action area of @dialog
7977 int get_response_for_widget()(Widget* widget) {
7978 return gtk_dialog_get_response_for_widget(&this, widget);
7981 // VERSION: 2.20
7982 // Gets the widget button that uses the given response ID in the action area
7983 // of a dialog.
7984 // RETURNS: the @widget button that uses the given @response_id, or %NULL.
7985 // <response_id>: the response ID used by the @dialog widget
7986 Widget* get_widget_for_response()(int response_id) {
7987 return gtk_dialog_get_widget_for_response(&this, response_id);
7990 // Emits the #GtkDialog::response signal with the given response ID.
7991 // Used to indicate that the user has responded to the dialog in some way;
7992 // typically either you or gtk_dialog_run() will be monitoring the
7993 // ::response signal and take appropriate action.
7994 // <response_id>: response ID
7995 void response()(int response_id) {
7996 gtk_dialog_response(&this, response_id);
7999 // Blocks in a recursive main loop until the @dialog either emits the
8000 // #GtkDialog::response signal, or is destroyed. If the dialog is
8001 // destroyed during the call to gtk_dialog_run(), gtk_dialog_run() returns
8002 // #GTK_RESPONSE_NONE. Otherwise, it returns the response ID from the
8003 // ::response signal emission.
8004 // Before entering the recursive main loop, gtk_dialog_run() calls
8005 // gtk_widget_show() on the dialog for you. Note that you still
8006 // need to show any children of the dialog yourself.
8007 // During gtk_dialog_run(), the default behavior of #GtkWidget::delete-event
8008 // is disabled; if the dialog receives ::delete_event, it will not be
8009 // destroyed as windows usually are, and gtk_dialog_run() will return
8010 // #GTK_RESPONSE_DELETE_EVENT. Also, during gtk_dialog_run() the dialog
8011 // will be modal. You can force gtk_dialog_run() to return at any time by
8012 // calling gtk_dialog_response() to emit the ::response signal. Destroying
8013 // the dialog during gtk_dialog_run() is a very bad idea, because your
8014 // post-run code won't know whether the dialog was destroyed or not.
8015 // After gtk_dialog_run() returns, you are responsible for hiding or
8016 // destroying the dialog if you wish to do so.
8017 // Typical usage of this function might be:
8018 // |[
8019 // gint result = gtk_dialog_run (GTK_DIALOG (dialog));
8020 // switch (result)
8021 // {
8022 // case GTK_RESPONSE_ACCEPT:
8023 // do_application_specific_something ();
8024 // break;
8025 // default:
8026 // do_nothing_since_dialog_was_cancelled ();
8027 // break;
8028 // }
8029 // gtk_widget_destroy (dialog);
8030 // ]|
8031 // Note that even though the recursive main loop gives the effect of a
8032 // modal dialog (it prevents the user from interacting with other
8033 // windows in the same window group while the dialog is run), callbacks
8034 // such as timeouts, IO channel watches, DND drops, etc, <emphasis>will</emphasis>
8035 // be triggered during a gtk_dialog_run() call.
8036 // RETURNS: response ID
8037 int run()() {
8038 return gtk_dialog_run(&this);
8041 // Unintrospectable method: set_alternative_button_order() / gtk_dialog_set_alternative_button_order()
8042 // VERSION: 2.6
8043 // Sets an alternative button order. If the
8044 // #GtkSettings:gtk-alternative-button-order setting is set to %TRUE,
8045 // the dialog buttons are reordered according to the order of the
8046 // response ids passed to this function.
8047 // By default, GTK+ dialogs use the button order advocated by the Gnome
8048 // <ulink url="http://developer.gnome.org/projects/gup/hig/2.0/">Human
8049 // Interface Guidelines</ulink> with the affirmative button at the far
8050 // right, and the cancel button left of it. But the builtin GTK+ dialogs
8051 // and #GtkMessageDialog<!-- -->s do provide an alternative button order,
8052 // which is more suitable on some platforms, e.g. Windows.
8053 // Use this function after adding all the buttons to your dialog, as the
8054 // following example shows:
8055 // |[
8056 // cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
8057 // GTK_STOCK_CANCEL,
8058 // GTK_RESPONSE_CANCEL);
8059 // ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
8060 // GTK_STOCK_OK,
8061 // GTK_RESPONSE_OK);
8062 // gtk_widget_grab_default (ok_button);
8063 // help_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
8064 // GTK_STOCK_HELP,
8065 // GTK_RESPONSE_HELP);
8066 // gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
8067 // GTK_RESPONSE_OK,
8068 // GTK_RESPONSE_CANCEL,
8069 // GTK_RESPONSE_HELP,
8070 // -1);
8071 // ]|
8072 // <first_response_id>: a response id used by one @dialog's buttons
8073 /+ Not available -- variadic methods unsupported - use the C function directly.
8074 alias gtk_dialog_set_alternative_button_order set_alternative_button_order; // Variadic
8077 // VERSION: 2.6
8078 // Sets an alternative button order. If the
8079 // #GtkSettings:gtk-alternative-button-order setting is set to %TRUE,
8080 // the dialog buttons are reordered according to the order of the
8081 // response ids in @new_order.
8082 // See gtk_dialog_set_alternative_button_order() for more information.
8083 // This function is for use by language bindings.
8084 // <n_params>: the number of response ids in @new_order
8085 // <new_order>: an array of response ids of
8086 void set_alternative_button_order_from_array()(int n_params, int* new_order) {
8087 gtk_dialog_set_alternative_button_order_from_array(&this, n_params, new_order);
8090 // Sets the last widget in the dialog's action area with the given @response_id
8091 // as the default widget for the dialog. Pressing "Enter" normally activates
8092 // the default widget.
8093 // <response_id>: a response ID
8094 void set_default_response()(int response_id) {
8095 gtk_dialog_set_default_response(&this, response_id);
8098 // DEPRECATED (v2.22) method: set_has_separator - This function will be removed in GTK+ 3
8099 // Sets whether the dialog has a separator above the buttons.
8100 // <setting>: %TRUE to have a separator
8101 void set_has_separator()(int setting) {
8102 gtk_dialog_set_has_separator(&this, setting);
8105 // Calls <literal>gtk_widget_set_sensitive (widget, @setting)</literal>
8106 // for each widget in the dialog's action area with the given @response_id.
8107 // A convenient way to sensitize/desensitize dialog buttons.
8108 // <response_id>: a response ID
8109 // <setting>: %TRUE for sensitive
8110 void set_response_sensitive()(int response_id, int setting) {
8111 gtk_dialog_set_response_sensitive(&this, response_id, setting);
8114 // The ::close signal is a
8115 // <link linkend="keybinding-signals">keybinding signal</link>
8116 // which gets emitted when the user uses a keybinding to close
8117 // the dialog.
8118 // The default binding for this signal is the Escape key.
8119 extern (C) alias static void function (Dialog* this_, void* user_data=null) signal_close;
8121 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8122 return super_.signal_connect!name(cb, data, cf);
8125 ulong signal_connect(string name:"close", CB:signal_close)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8126 return signal_connect_data!()(&this, cast(char*)"close",
8127 cast(GObject2.Callback)cb, data, null, cf);
8130 // Emitted when an action widget is clicked, the dialog receives a
8131 // delete event, or the application programmer calls gtk_dialog_response().
8132 // On a delete event, the response ID is #GTK_RESPONSE_DELETE_EVENT.
8133 // Otherwise, it depends on which action widget was clicked.
8134 // <response_id>: the response ID
8135 extern (C) alias static void function (Dialog* this_, int response_id, void* user_data=null) signal_response;
8136 ulong signal_connect(string name:"response", CB:signal_response)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8137 return signal_connect_data!()(&this, cast(char*)"response",
8138 cast(GObject2.Callback)cb, data, null, cf);
8142 struct DialogClass {
8143 WindowClass parent_class;
8144 // <response_id>: response ID
8145 extern (C) void function (Dialog* dialog, int response_id) response;
8146 extern (C) void function (Dialog* dialog) close;
8147 extern (C) void function () _gtk_reserved1;
8148 extern (C) void function () _gtk_reserved2;
8149 extern (C) void function () _gtk_reserved3;
8150 extern (C) void function () _gtk_reserved4;
8153 enum DialogFlags {
8154 MODAL = 1,
8155 DESTROY_WITH_PARENT = 2,
8156 NO_SEPARATOR = 4
8158 enum DirectionType {
8159 TAB_FORWARD = 0,
8160 TAB_BACKWARD = 1,
8161 UP = 2,
8162 DOWN = 3,
8163 LEFT = 4,
8164 RIGHT = 5
8166 union DitherInfo {
8167 ushort[2] s;
8168 ubyte[4] c;
8171 enum DragResult {
8172 SUCCESS = 0,
8173 NO_TARGET = 1,
8174 USER_CANCELLED = 2,
8175 TIMEOUT_EXPIRED = 3,
8176 GRAB_BROKEN = 4,
8177 ERROR = 5
8179 struct DrawingArea /* : Widget */ {
8180 mixin Atk.ImplementorIface.__interface__;
8181 mixin Buildable.__interface__;
8182 alias widget this;
8183 alias widget super_;
8184 Widget widget;
8185 void* draw_data;
8187 static DrawingArea* new_()() {
8188 return gtk_drawing_area_new();
8190 void size()(int width, int height) {
8191 gtk_drawing_area_size(&this, width, height);
8195 struct DrawingAreaClass {
8196 WidgetClass parent_class;
8197 extern (C) void function () _gtk_reserved1;
8198 extern (C) void function () _gtk_reserved2;
8199 extern (C) void function () _gtk_reserved3;
8200 extern (C) void function () _gtk_reserved4;
8203 struct Editable /* Interface */ {
8204 mixin template __interface__() {
8205 // Copies the contents of the currently selected content in the editable and
8206 // puts it on the clipboard.
8207 void copy_clipboard()() {
8208 gtk_editable_copy_clipboard(cast(Editable*)&this);
8211 // Removes the contents of the currently selected content in the editable and
8212 // puts it on the clipboard.
8213 void cut_clipboard()() {
8214 gtk_editable_cut_clipboard(cast(Editable*)&this);
8217 // Deletes the currently selected text of the editable.
8218 // This call doesn't do anything if there is no selected text.
8219 void delete_selection()() {
8220 gtk_editable_delete_selection(cast(Editable*)&this);
8223 // Deletes a sequence of characters. The characters that are deleted are
8224 // those characters at positions from @start_pos up to, but not including
8225 // are those from @start_pos to the end of the text.
8226 // Note that the positions are specified in characters, not bytes.
8227 // <start_pos>: start position
8228 // <end_pos>: end position
8229 void delete_text()(int start_pos, int end_pos) {
8230 gtk_editable_delete_text(cast(Editable*)&this, start_pos, end_pos);
8233 // Retrieves a sequence of characters. The characters that are retrieved
8234 // are those characters at positions from @start_pos up to, but not
8235 // including @end_pos. If @end_pos is negative, then the the characters
8236 // retrieved are those characters from @start_pos to the end of the text.
8237 // Note that positions are specified in characters, not bytes.
8238 // string. This string is allocated by the #GtkEditable
8239 // implementation and should be freed by the caller.
8240 // RETURNS: a pointer to the contents of the widget as a
8241 // <start_pos>: start of text
8242 // <end_pos>: end of text
8243 char* /*new*/ get_chars()(int start_pos, int end_pos) {
8244 return gtk_editable_get_chars(cast(Editable*)&this, start_pos, end_pos);
8247 // Retrieves whether @editable is editable. See
8248 // gtk_editable_set_editable().
8249 // RETURNS: %TRUE if @editable is editable.
8250 int get_editable()() {
8251 return gtk_editable_get_editable(cast(Editable*)&this);
8254 // Retrieves the current position of the cursor relative to the start
8255 // of the content of the editable.
8256 // Note that this position is in characters, not in bytes.
8257 // RETURNS: the cursor position
8258 int get_position()() {
8259 return gtk_editable_get_position(cast(Editable*)&this);
8262 // Retrieves the selection bound of the editable. start_pos will be filled
8263 // with the start of the selection and @end_pos with end. If no text was
8264 // selected both will be identical and %FALSE will be returned.
8265 // Note that positions are specified in characters, not bytes.
8266 // RETURNS: %TRUE if an area is selected, %FALSE otherwise
8267 // <start_pos>: location to store the starting position, or %NULL
8268 // <end_pos>: location to store the end position, or %NULL
8269 int get_selection_bounds()(/*out*/ int* start_pos=null, /*out*/ int* end_pos=null) {
8270 return gtk_editable_get_selection_bounds(cast(Editable*)&this, start_pos, end_pos);
8273 // Inserts @new_text_length bytes of @new_text into the contents of the
8274 // widget, at position @position.
8275 // Note that the position is in characters, not in bytes.
8276 // The function updates @position to point after the newly inserted text.
8277 // <new_text>: the text to append
8278 // <new_text_length>: the length of the text in bytes, or -1
8279 // <position>: location of the position text will be inserted at
8280 void insert_text()(char* new_text, int new_text_length, /*inout*/ int* position) {
8281 gtk_editable_insert_text(cast(Editable*)&this, new_text, new_text_length, position);
8284 // Pastes the content of the clipboard to the current position of the
8285 // cursor in the editable.
8286 void paste_clipboard()() {
8287 gtk_editable_paste_clipboard(cast(Editable*)&this);
8290 // Selects a region of text. The characters that are selected are
8291 // those characters at positions from @start_pos up to, but not
8292 // including @end_pos. If @end_pos is negative, then the the
8293 // characters selected are those characters from @start_pos to
8294 // the end of the text.
8295 // Note that positions are specified in characters, not bytes.
8296 // <start_pos>: start of region
8297 // <end_pos>: end of region
8298 void select_region()(int start_pos, int end_pos) {
8299 gtk_editable_select_region(cast(Editable*)&this, start_pos, end_pos);
8302 // Determines if the user can edit the text in the editable
8303 // widget or not.
8304 // <is_editable>: %TRUE if the user is allowed to edit the text in the widget
8305 void set_editable()(int is_editable) {
8306 gtk_editable_set_editable(cast(Editable*)&this, is_editable);
8309 // Sets the cursor position in the editable to the given value.
8310 // The cursor is displayed before the character with the given (base 0)
8311 // index in the contents of the editable. The value must be less than or
8312 // equal to the number of characters in the editable. A value of -1
8313 // indicates that the position should be set after the last character
8314 // of the editable. Note that @position is in characters, not in bytes.
8315 // <position>: the position of the cursor
8316 void set_position()(int position) {
8317 gtk_editable_set_position(cast(Editable*)&this, position);
8320 // The ::changed signal is emitted at the end of a single
8321 // user-visible operation on the contents of the #GtkEditable.
8322 // E.g., a paste operation that replaces the contents of the
8323 // selection will cause only one signal emission (even though it
8324 // is implemented by first deleting the selection, then inserting
8325 // the new content, and may cause multiple ::notify::text signals
8326 // to be emitted).
8327 extern (C) alias static void function (Editable* this_, void* user_data=null) signal_changed;
8329 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8330 return super_.signal_connect!name(cb, data, cf);
8333 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8334 return signal_connect_data!()(&this, cast(char*)"changed",
8335 cast(GObject2.Callback)cb, data, null, cf);
8338 // This signal is emitted when text is deleted from
8339 // the widget by the user. The default handler for
8340 // this signal will normally be responsible for deleting
8341 // the text, so by connecting to this signal and then
8342 // stopping the signal with g_signal_stop_emission(), it
8343 // is possible to modify the range of deleted text, or
8344 // prevent it from being deleted entirely. The @start_pos
8345 // and @end_pos parameters are interpreted as for
8346 // gtk_editable_delete_text().
8347 // <start_pos>: the starting position
8348 // <end_pos>: the end position
8349 extern (C) alias static void function (Editable* this_, int start_pos, int end_pos, void* user_data=null) signal_delete_text;
8350 ulong signal_connect(string name:"delete-text", CB:signal_delete_text)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8351 return signal_connect_data!()(&this, cast(char*)"delete-text",
8352 cast(GObject2.Callback)cb, data, null, cf);
8355 // This signal is emitted when text is inserted into
8356 // the widget by the user. The default handler for
8357 // this signal will normally be responsible for inserting
8358 // the text, so by connecting to this signal and then
8359 // stopping the signal with g_signal_stop_emission(), it
8360 // is possible to modify the inserted text, or prevent
8361 // it from being inserted entirely.
8362 // <new_text>: the new text to insert
8363 // <new_text_length>: the length of the new text, in bytes, or -1 if new_text is nul-terminated
8364 // <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.
8365 extern (C) alias static void function (Editable* this_, char* new_text, int new_text_length, /*inout*/ int position, void* user_data=null) signal_insert_text;
8366 ulong signal_connect(string name:"insert-text", CB:signal_insert_text)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
8367 return signal_connect_data!()(&this, cast(char*)"insert-text",
8368 cast(GObject2.Callback)cb, data, null, cf);
8371 mixin __interface__;
8374 struct EditableClass {
8375 GObject2.TypeInterface base_iface;
8376 extern (C) void function (Editable* editable, char* text, int length, int* position) insert_text;
8377 extern (C) void function (Editable* editable, int start_pos, int end_pos) delete_text;
8378 extern (C) void function (Editable* editable) changed;
8379 extern (C) void function (Editable* editable, char* text, int length, int* position) do_insert_text;
8380 extern (C) void function (Editable* editable, int start_pos, int end_pos) do_delete_text;
8381 extern (C) char* /*new*/ function (Editable* editable, int start_pos, int end_pos) get_chars;
8382 extern (C) void function (Editable* editable, int start_pos, int end_pos) set_selection_bounds;
8383 extern (C) int function (Editable* editable, int* start_pos, int* end_pos) get_selection_bounds;
8384 extern (C) void function (Editable* editable, int position) set_position;
8385 extern (C) int function (Editable* editable) get_position;
8388 struct Entry /* : Widget */ {
8389 mixin Atk.ImplementorIface.__interface__;
8390 mixin Buildable.__interface__;
8391 mixin CellEditable.__interface__;
8392 mixin Editable.__interface__;
8393 alias widget this;
8394 alias widget super_;
8395 Widget widget;
8396 char* text;
8397 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
8398 uint, "editable", 1,
8399 uint, "visible", 1,
8400 uint, "overwrite_mode", 1,
8401 uint, "in_drag", 1,
8402 uint, "__dummy32A", 28));
8403 ushort text_length, text_max_length;
8404 private Gdk2.Window* text_area;
8405 private IMContext* im_context;
8406 private Widget* popup_menu;
8407 private int current_pos, selection_bound;
8408 private Pango.Layout* cached_layout;
8409 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
8410 uint, "cache_includes_preedit", 1,
8411 uint, "need_im_reset", 1,
8412 uint, "has_frame", 1,
8413 uint, "activates_default", 1,
8414 uint, "cursor_visible", 1,
8415 uint, "in_click", 1,
8416 uint, "is_cell_renderer", 1,
8417 uint, "editing_canceled", 1,
8418 uint, "mouse_cursor_obscured", 1,
8419 uint, "select_words", 1,
8420 uint, "select_lines", 1,
8421 uint, "resolved_dir", 4,
8422 uint, "truncate_multiline", 1,
8423 uint, "__dummy32B", 16));
8424 private uint button, blink_timeout, recompute_idle;
8425 private int scroll_offset, ascent, descent;
8426 private ushort x_text_size, x_n_bytes, preedit_length, preedit_cursor;
8427 private int dnd_position, drag_start_x, drag_start_y;
8428 private dchar invisible_char;
8429 private int width_chars;
8432 // Creates a new entry.
8433 // RETURNS: a new #GtkEntry.
8434 static Entry* new_()() {
8435 return gtk_entry_new();
8438 // VERSION: 2.18
8439 // Creates a new entry with the specified text buffer.
8440 // RETURNS: a new #GtkEntry
8441 // <buffer>: The buffer to use for the new #GtkEntry.
8442 static Entry* new_with_buffer()(EntryBuffer* buffer) {
8443 return gtk_entry_new_with_buffer(buffer);
8446 // DEPRECATED (v2.0) constructor: new_with_max_length - Use gtk_entry_set_max_length() instead.
8447 // Creates a new #GtkEntry widget with the given maximum length.
8448 // RETURNS: a new #GtkEntry
8449 // <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.
8450 static Entry* new_with_max_length()(int max) {
8451 return gtk_entry_new_with_max_length(max);
8454 // DEPRECATED (v2.0) method: append_text - Use gtk_editable_insert_text() instead.
8455 // Appends the given text to the contents of the widget.
8456 // <text>: the text to append
8457 void append_text()(char* text) {
8458 gtk_entry_append_text(&this, text);
8461 // Retrieves the value set by gtk_entry_set_activates_default().
8462 // RETURNS: %TRUE if the entry will activate the default widget
8463 int get_activates_default()() {
8464 return gtk_entry_get_activates_default(&this);
8467 // VERSION: 2.4
8468 // Gets the value set by gtk_entry_set_alignment().
8469 // RETURNS: the alignment
8470 float get_alignment()() {
8471 return gtk_entry_get_alignment(&this);
8474 // VERSION: 2.18
8475 // Get the #GtkEntryBuffer object which holds the text for
8476 // this widget.
8477 // RETURNS: A #GtkEntryBuffer object.
8478 EntryBuffer* get_buffer()() {
8479 return gtk_entry_get_buffer(&this);
8482 // VERSION: 2.4
8483 // Returns the auxiliary completion object currently in use by @entry.
8484 // in use by @entry.
8485 // RETURNS: The auxiliary completion object currently
8486 EntryCompletion* get_completion()() {
8487 return gtk_entry_get_completion(&this);
8490 // VERSION: 2.16
8491 // Returns the index of the icon which is the source of the current
8492 // DND operation, or -1.
8493 // This function is meant to be used in a #GtkWidget::drag-data-get
8494 // callback.
8495 // DND operation, or -1.
8496 // RETURNS: index of the icon which is the source of the current
8497 int get_current_icon_drag_source()() {
8498 return gtk_entry_get_current_icon_drag_source(&this);
8501 // VERSION: 2.12
8502 // Retrieves the horizontal cursor adjustment for the entry.
8503 // See gtk_entry_set_cursor_hadjustment().
8504 // if none has been set.
8505 // RETURNS: the horizontal cursor adjustment, or %NULL
8506 Adjustment* get_cursor_hadjustment()() {
8507 return gtk_entry_get_cursor_hadjustment(&this);
8510 // Gets the value set by gtk_entry_set_has_frame().
8511 // RETURNS: whether the entry has a beveled frame
8512 int get_has_frame()() {
8513 return gtk_entry_get_has_frame(&this);
8516 // VERSION: 2.16
8517 // Returns whether the icon is activatable.
8518 // RETURNS: %TRUE if the icon is activatable.
8519 // <icon_pos>: Icon position
8520 int get_icon_activatable()(EntryIconPosition icon_pos) {
8521 return gtk_entry_get_icon_activatable(&this, icon_pos);
8524 // VERSION: 2.16
8525 // Finds the icon at the given position and return its index.
8526 // If @x, @y doesn't lie inside an icon, -1 is returned.
8527 // This function is intended for use in a #GtkWidget::query-tooltip
8528 // signal handler.
8529 // RETURNS: the index of the icon at the given position, or -1
8530 // <x>: the x coordinate of the position to find
8531 // <y>: the y coordinate of the position to find
8532 int get_icon_at_pos()(int x, int y) {
8533 return gtk_entry_get_icon_at_pos(&this, x, y);
8536 // VERSION: 2.16
8537 // Retrieves the #GIcon used for the icon, or %NULL if there is
8538 // no icon or if the icon was set by some other method (e.g., by
8539 // stock, pixbuf, or icon name).
8540 // or if the icon is not a #GIcon
8541 // RETURNS: A #GIcon, or %NULL if no icon is set
8542 // <icon_pos>: Icon position
8543 Gio2.Icon* get_icon_gicon()(EntryIconPosition icon_pos) {
8544 return gtk_entry_get_icon_gicon(&this, icon_pos);
8547 // VERSION: 2.16
8548 // Retrieves the icon name used for the icon, or %NULL if there is
8549 // no icon or if the icon was set by some other method (e.g., by
8550 // pixbuf, stock or gicon).
8551 // wasn't set from an icon name
8552 // RETURNS: An icon name, or %NULL if no icon is set or if the icon
8553 // <icon_pos>: Icon position
8554 char* get_icon_name()(EntryIconPosition icon_pos) {
8555 return gtk_entry_get_icon_name(&this, icon_pos);
8558 // VERSION: 2.16
8559 // Retrieves the image used for the icon.
8560 // Unlike the other methods of setting and getting icon data, this
8561 // method will work regardless of whether the icon was set using a
8562 // #GdkPixbuf, a #GIcon, a stock item, or an icon name.
8563 // set for this position.
8564 // RETURNS: A #GdkPixbuf, or %NULL if no icon is
8565 // <icon_pos>: Icon position
8566 GdkPixbuf2.Pixbuf* get_icon_pixbuf()(EntryIconPosition icon_pos) {
8567 return gtk_entry_get_icon_pixbuf(&this, icon_pos);
8570 // VERSION: 2.16
8571 // Returns whether the icon appears sensitive or insensitive.
8572 // RETURNS: %TRUE if the icon is sensitive.
8573 // <icon_pos>: Icon position
8574 int get_icon_sensitive()(EntryIconPosition icon_pos) {
8575 return gtk_entry_get_icon_sensitive(&this, icon_pos);
8578 // VERSION: 2.16
8579 // Retrieves the stock id used for the icon, or %NULL if there is
8580 // no icon or if the icon was set by some other method (e.g., by
8581 // pixbuf, icon name or gicon).
8582 // wasn't set from a stock id
8583 // RETURNS: A stock id, or %NULL if no icon is set or if the icon
8584 // <icon_pos>: Icon position
8585 char* get_icon_stock()(EntryIconPosition icon_pos) {
8586 return gtk_entry_get_icon_stock(&this, icon_pos);
8589 // VERSION: 2.16
8590 // Gets the type of representation being used by the icon
8591 // to store image data. If the icon has no image data,
8592 // the return value will be %GTK_IMAGE_EMPTY.
8593 // RETURNS: image representation being used
8594 // <icon_pos>: Icon position
8595 ImageType get_icon_storage_type()(EntryIconPosition icon_pos) {
8596 return gtk_entry_get_icon_storage_type(&this, icon_pos);
8599 // VERSION: 2.16
8600 // Gets the contents of the tooltip on the icon at the specified
8601 // position in @entry.
8602 // with g_free() when done.
8603 // RETURNS: the tooltip text, or %NULL. Free the returned string
8604 // <icon_pos>: the icon position
8605 char* /*new*/ get_icon_tooltip_markup()(EntryIconPosition icon_pos) {
8606 return gtk_entry_get_icon_tooltip_markup(&this, icon_pos);
8609 // VERSION: 2.16
8610 // Gets the contents of the tooltip on the icon at the specified
8611 // position in @entry.
8612 // with g_free() when done.
8613 // RETURNS: the tooltip text, or %NULL. Free the returned string
8614 // <icon_pos>: the icon position
8615 char* /*new*/ get_icon_tooltip_text()(EntryIconPosition icon_pos) {
8616 return gtk_entry_get_icon_tooltip_text(&this, icon_pos);
8619 // VERSION: 2.20
8620 // Returns the #GdkWindow which contains the entry's icon at
8621 // entry in an expose-event callback because it enables the callback
8622 // to distinguish between the text window and entry's icon windows.
8623 // See also gtk_entry_get_text_window().
8624 // Note that GTK+ 3 does not have this function anymore; it has
8625 // been replaced by gtk_entry_get_icon_area().
8626 // RETURNS: the entry's icon window at @icon_pos.
8627 // <icon_pos>: Icon position
8628 Gdk2.Window* get_icon_window()(EntryIconPosition icon_pos) {
8629 return gtk_entry_get_icon_window(&this, icon_pos);
8632 // VERSION: 2.10
8633 // This function returns the entry's #GtkEntry:inner-border property. See
8634 // gtk_entry_set_inner_border() for more information.
8635 // RETURNS: the entry's #GtkBorder, or %NULL if none was set.
8636 Border* get_inner_border()() {
8637 return gtk_entry_get_inner_border(&this);
8640 // Retrieves the character displayed in place of the real characters
8641 // for entries with visibility set to false. See gtk_entry_set_invisible_char().
8642 // show invisible text at all.
8643 // RETURNS: the current invisible char, or 0, if the entry does not
8644 dchar get_invisible_char()() {
8645 return gtk_entry_get_invisible_char(&this);
8648 // Gets the #PangoLayout used to display the entry.
8649 // The layout is useful to e.g. convert text positions to
8650 // pixel positions, in combination with gtk_entry_get_layout_offsets().
8651 // The returned layout is owned by the entry and must not be
8652 // modified or freed by the caller.
8653 // Keep in mind that the layout text may contain a preedit string, so
8654 // gtk_entry_layout_index_to_text_index() and
8655 // gtk_entry_text_index_to_layout_index() are needed to convert byte
8656 // indices in the layout to byte indices in the entry contents.
8657 // RETURNS: the #PangoLayout for this entry
8658 Pango.Layout* get_layout()() {
8659 return gtk_entry_get_layout(&this);
8662 // Obtains the position of the #PangoLayout used to render text
8663 // in the entry, in widget coordinates. Useful if you want to line
8664 // up the text in an entry with some other text, e.g. when using the
8665 // entry to implement editable cells in a sheet widget.
8666 // Also useful to convert mouse events into coordinates inside the
8667 // #PangoLayout, e.g. to take some action if some part of the entry text
8668 // is clicked.
8669 // Note that as the user scrolls around in the entry the offsets will
8670 // change; you'll need to connect to the "notify::scroll-offset"
8671 // signal to track this. Remember when using the #PangoLayout
8672 // functions you need to convert to and from pixels using
8673 // PANGO_PIXELS() or #PANGO_SCALE.
8674 // Keep in mind that the layout text may contain a preedit string, so
8675 // gtk_entry_layout_index_to_text_index() and
8676 // gtk_entry_text_index_to_layout_index() are needed to convert byte
8677 // indices in the layout to byte indices in the entry contents.
8678 // <x>: location to store X offset of layout, or %NULL
8679 // <y>: location to store Y offset of layout, or %NULL
8680 void get_layout_offsets()(/*out*/ int* x=null, /*out*/ int* y=null) {
8681 gtk_entry_get_layout_offsets(&this, x, y);
8684 // Retrieves the maximum allowed length of the text in
8685 // This is equivalent to:
8686 // <informalexample><programlisting>
8687 // gtk_entry_buffer_get_max_length (gtk_entry_get_buffer (entry));
8688 // </programlisting></informalexample>
8689 // in #GtkEntry, or 0 if there is no maximum.
8690 // RETURNS: the maximum allowed number of characters
8691 int get_max_length()() {
8692 return gtk_entry_get_max_length(&this);
8695 // VERSION: 2.14
8696 // Gets the value set by gtk_entry_set_overwrite_mode().
8697 // RETURNS: whether the text is overwritten when typing.
8698 int get_overwrite_mode()() {
8699 return gtk_entry_get_overwrite_mode(&this);
8702 // VERSION: 2.16
8703 // Returns the current fraction of the task that's been completed.
8704 // See gtk_entry_set_progress_fraction().
8705 // RETURNS: a fraction from 0.0 to 1.0
8706 double get_progress_fraction()() {
8707 return gtk_entry_get_progress_fraction(&this);
8710 // VERSION: 2.16
8711 // Retrieves the pulse step set with gtk_entry_set_progress_pulse_step().
8712 // RETURNS: a fraction from 0.0 to 1.0
8713 double get_progress_pulse_step()() {
8714 return gtk_entry_get_progress_pulse_step(&this);
8717 // Retrieves the contents of the entry widget.
8718 // See also gtk_editable_get_chars().
8719 // This is equivalent to:
8720 // <informalexample><programlisting>
8721 // gtk_entry_buffer_get_text (gtk_entry_get_buffer (entry));
8722 // </programlisting></informalexample>
8723 // string. This string points to internally allocated
8724 // storage in the widget and must not be freed, modified or
8725 // stored.
8726 // RETURNS: a pointer to the contents of the widget as a
8727 char* get_text()() {
8728 return gtk_entry_get_text(&this);
8731 // VERSION: 2.14
8732 // Retrieves the current length of the text in
8733 // This is equivalent to:
8734 // <informalexample><programlisting>
8735 // gtk_entry_buffer_get_length (gtk_entry_get_buffer (entry));
8736 // </programlisting></informalexample>
8737 // in #GtkEntry, or 0 if there are none.
8738 // RETURNS: the current number of characters
8739 ushort get_text_length()() {
8740 return gtk_entry_get_text_length(&this);
8743 // VERSION: 2.20
8744 // Returns the #GdkWindow which contains the text. This function is
8745 // useful when drawing something to the entry in an expose-event
8746 // callback because it enables the callback to distinguish between
8747 // the text window and entry's icon windows.
8748 // See also gtk_entry_get_icon_window().
8749 // Note that GTK+ 3 does not have this function anymore; it has
8750 // been replaced by gtk_entry_get_text_area().
8751 // RETURNS: the entry's text window.
8752 Gdk2.Window* get_text_window()() {
8753 return gtk_entry_get_text_window(&this);
8756 // Retrieves whether the text in @entry is visible. See
8757 // gtk_entry_set_visibility().
8758 // RETURNS: %TRUE if the text is currently visible
8759 int get_visibility()() {
8760 return gtk_entry_get_visibility(&this);
8763 // Gets the value set by gtk_entry_set_width_chars().
8764 // RETURNS: number of chars to request space for, or negative if unset
8765 int get_width_chars()() {
8766 return gtk_entry_get_width_chars(&this);
8769 // VERSION: 2.22
8770 // Allow the #GtkEntry input method to internally handle key press
8771 // and release events. If this function returns %TRUE, then no further
8772 // processing should be done for this key event. See
8773 // gtk_im_context_filter_keypress().
8774 // Note that you are expected to call this function from your handler
8775 // when overriding key event handling. This is needed in the case when
8776 // you need to insert your own key handling between the input method
8777 // and the default key event handling of the #GtkEntry.
8778 // See gtk_text_view_reset_im_context() for an example of use.
8779 // RETURNS: %TRUE if the input method handled the key event.
8780 // <event>: the key event
8781 int im_context_filter_keypress()(Gdk2.EventKey* event) {
8782 return gtk_entry_im_context_filter_keypress(&this, event);
8785 // Converts from a position in the entry contents (returned
8786 // by gtk_entry_get_text()) to a position in the
8787 // entry's #PangoLayout (returned by gtk_entry_get_layout(),
8788 // with text retrieved via pango_layout_get_text()).
8789 // RETURNS: byte index into the entry contents
8790 // <layout_index>: byte index into the entry layout text
8791 int layout_index_to_text_index()(int layout_index) {
8792 return gtk_entry_layout_index_to_text_index(&this, layout_index);
8795 // DEPRECATED (v2.0) method: prepend_text - Use gtk_editable_insert_text() instead.
8796 // Prepends the given text to the contents of the widget.
8797 // <text>: the text to prepend
8798 void prepend_text()(char* text) {
8799 gtk_entry_prepend_text(&this, text);
8802 // VERSION: 2.16
8803 // Indicates that some progress is made, but you don't know how much.
8804 // Causes the entry's progress indicator to enter "activity mode,"
8805 // where a block bounces back and forth. Each call to
8806 // gtk_entry_progress_pulse() causes the block to move by a little bit
8807 // (the amount of movement per pulse is determined by
8808 // gtk_entry_set_progress_pulse_step()).
8809 void progress_pulse()() {
8810 gtk_entry_progress_pulse(&this);
8813 // VERSION: 2.22
8814 // Reset the input method context of the entry if needed.
8815 // This can be necessary in the case where modifying the buffer
8816 // would confuse on-going input method behavior.
8817 void reset_im_context()() {
8818 gtk_entry_reset_im_context(&this);
8821 // DEPRECATED (v2.0) method: select_region - Use gtk_editable_select_region() instead.
8822 // Selects a region of text. The characters that are selected are
8823 // those characters at positions from @start_pos up to, but not
8824 // including @end_pos. If @end_pos is negative, then the the characters
8825 // selected will be those characters from @start_pos to the end of
8826 // the text.
8827 // <start>: the starting position
8828 // <end>: the end position
8829 void select_region()(int start, int end) {
8830 gtk_entry_select_region(&this, start, end);
8833 // If @setting is %TRUE, pressing Enter in the @entry will activate the default
8834 // widget for the window containing the entry. This usually means that
8835 // the dialog box containing the entry will be closed, since the default
8836 // widget is usually one of the dialog buttons.
8837 // (For experts: if @setting is %TRUE, the entry calls
8838 // gtk_window_activate_default() on the window containing the entry, in
8839 // the default handler for the #GtkWidget::activate signal.)
8840 // <setting>: %TRUE to activate window's default widget on Enter keypress
8841 void set_activates_default()(int setting) {
8842 gtk_entry_set_activates_default(&this, setting);
8845 // VERSION: 2.4
8846 // Sets the alignment for the contents of the entry. This controls
8847 // the horizontal positioning of the contents when the displayed
8848 // text is shorter than the width of the entry.
8849 // <xalign>: The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts
8850 void set_alignment()(float xalign) {
8851 gtk_entry_set_alignment(&this, xalign);
8854 // VERSION: 2.18
8855 // Set the #GtkEntryBuffer object which holds the text for
8856 // this widget.
8857 // <buffer>: a #GtkEntryBuffer
8858 void set_buffer()(EntryBuffer* buffer) {
8859 gtk_entry_set_buffer(&this, buffer);
8862 // VERSION: 2.4
8863 // Sets @completion to be the auxiliary completion object to use with @entry.
8864 // All further configuration of the completion mechanism is done on
8865 // <completion>: The #GtkEntryCompletion or %NULL
8866 void set_completion()(EntryCompletion* completion=null) {
8867 gtk_entry_set_completion(&this, completion);
8870 // VERSION: 2.12
8871 // Hooks up an adjustment to the cursor position in an entry, so that when
8872 // the cursor is moved, the adjustment is scrolled to show that position.
8873 // See gtk_scrolled_window_get_hadjustment() for a typical way of obtaining
8874 // the adjustment.
8875 // The adjustment has to be in pixel units and in the same coordinate system
8876 // as the entry.
8877 // <adjustment>: an adjustment which should be adjusted when the cursor is moved, or %NULL
8878 void set_cursor_hadjustment()(Adjustment* adjustment) {
8879 gtk_entry_set_cursor_hadjustment(&this, adjustment);
8882 // DEPRECATED (v2.0) method: set_editable - Use gtk_editable_set_editable() instead.
8883 // Determines if the user can edit the text in the editable
8884 // widget or not.
8885 // <editable>: %TRUE if the user is allowed to edit the text in the widget
8886 void set_editable()(int editable) {
8887 gtk_entry_set_editable(&this, editable);
8890 // Sets whether the entry has a beveled frame around it.
8891 // <setting>: new value
8892 void set_has_frame()(int setting) {
8893 gtk_entry_set_has_frame(&this, setting);
8896 // VERSION: 2.16
8897 // Sets whether the icon is activatable.
8898 // <icon_pos>: Icon position
8899 // <activatable>: %TRUE if the icon should be activatable
8900 void set_icon_activatable()(EntryIconPosition icon_pos, int activatable) {
8901 gtk_entry_set_icon_activatable(&this, icon_pos, activatable);
8904 // VERSION: 2.16
8905 // Sets up the icon at the given position so that GTK+ will start a drag
8906 // operation when the user clicks and drags the icon.
8907 // To handle the drag operation, you need to connect to the usual
8908 // #GtkWidget::drag-data-get (or possibly #GtkWidget::drag-data-delete)
8909 // signal, and use gtk_entry_get_current_icon_drag_source() in
8910 // your signal handler to find out if the drag was started from
8911 // an icon.
8912 // By default, GTK+ uses the icon as the drag icon. You can use the
8913 // #GtkWidget::drag-begin signal to set a different icon. Note that you
8914 // have to use g_signal_connect_after() to ensure that your signal handler
8915 // gets executed after the default handler.
8916 // <icon_pos>: icon position
8917 // <target_list>: the targets (data formats) in which the data can be provided
8918 // <actions>: a bitmask of the allowed drag actions
8919 void set_icon_drag_source()(EntryIconPosition icon_pos, TargetList* target_list, Gdk2.DragAction actions) {
8920 gtk_entry_set_icon_drag_source(&this, icon_pos, target_list, actions);
8923 // VERSION: 2.16
8924 // Sets the icon shown in the entry at the specified position
8925 // from the current icon theme.
8926 // If the icon isn't known, a "broken image" icon will be displayed
8927 // instead.
8928 // If @icon is %NULL, no icon will be shown in the specified position.
8929 // <icon_pos>: The position at which to set the icon
8930 // <icon>: The icon to set, or %NULL
8931 void set_icon_from_gicon()(EntryIconPosition icon_pos, Gio2.Icon* icon=null) {
8932 gtk_entry_set_icon_from_gicon(&this, icon_pos, icon);
8935 // VERSION: 2.16
8936 // Sets the icon shown in the entry at the specified position
8937 // from the current icon theme.
8938 // If the icon name isn't known, a "broken image" icon will be displayed
8939 // instead.
8940 // If @icon_name is %NULL, no icon will be shown in the specified position.
8941 // <icon_pos>: The position at which to set the icon
8942 // <icon_name>: An icon name, or %NULL
8943 void set_icon_from_icon_name()(EntryIconPosition icon_pos, char* icon_name=null) {
8944 gtk_entry_set_icon_from_icon_name(&this, icon_pos, icon_name);
8947 // VERSION: 2.16
8948 // Sets the icon shown in the specified position using a pixbuf.
8949 // If @pixbuf is %NULL, no icon will be shown in the specified position.
8950 // <icon_pos>: Icon position
8951 // <pixbuf>: A #GdkPixbuf, or %NULL
8952 void set_icon_from_pixbuf()(EntryIconPosition icon_pos, GdkPixbuf2.Pixbuf* pixbuf=null) {
8953 gtk_entry_set_icon_from_pixbuf(&this, icon_pos, pixbuf);
8956 // VERSION: 2.16
8957 // Sets the icon shown in the entry at the specified position from
8958 // a stock image.
8959 // If @stock_id is %NULL, no icon will be shown in the specified position.
8960 // <icon_pos>: Icon position
8961 // <stock_id>: The name of the stock item, or %NULL
8962 void set_icon_from_stock()(EntryIconPosition icon_pos, char* stock_id=null) {
8963 gtk_entry_set_icon_from_stock(&this, icon_pos, stock_id);
8966 // VERSION: 2.16
8967 // Sets the sensitivity for the specified icon.
8968 // <icon_pos>: Icon position
8969 // <sensitive>: Specifies whether the icon should appear sensitive or insensitive
8970 void set_icon_sensitive()(EntryIconPosition icon_pos, int sensitive) {
8971 gtk_entry_set_icon_sensitive(&this, icon_pos, sensitive);
8974 // VERSION: 2.16
8975 // Sets @tooltip as the contents of the tooltip for the icon at
8976 // the specified position. @tooltip is assumed to be marked up with
8977 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
8978 // Use %NULL for @tooltip to remove an existing tooltip.
8979 // See also gtk_widget_set_tooltip_markup() and
8980 // gtk_enty_set_icon_tooltip_text().
8981 // <icon_pos>: the icon position
8982 // <tooltip>: the contents of the tooltip for the icon, or %NULL
8983 void set_icon_tooltip_markup()(EntryIconPosition icon_pos, char* tooltip=null) {
8984 gtk_entry_set_icon_tooltip_markup(&this, icon_pos, tooltip);
8987 // VERSION: 2.16
8988 // Sets @tooltip as the contents of the tooltip for the icon
8989 // at the specified position.
8990 // Use %NULL for @tooltip to remove an existing tooltip.
8991 // See also gtk_widget_set_tooltip_text() and
8992 // gtk_entry_set_icon_tooltip_markup().
8993 // <icon_pos>: the icon position
8994 // <tooltip>: the contents of the tooltip for the icon, or %NULL
8995 void set_icon_tooltip_text()(EntryIconPosition icon_pos, char* tooltip=null) {
8996 gtk_entry_set_icon_tooltip_text(&this, icon_pos, tooltip);
8999 // VERSION: 2.10
9000 // Sets %entry's inner-border property to %border, or clears it if %NULL
9001 // is passed. The inner-border is the area around the entry's text, but
9002 // inside its frame.
9003 // If set, this property overrides the inner-border style property.
9004 // Overriding the style-provided border is useful when you want to do
9005 // in-place editing of some text in a canvas or list widget, where
9006 // pixel-exact positioning of the entry is important.
9007 // <border>: a #GtkBorder, or %NULL
9008 void set_inner_border()(Border* border=null) {
9009 gtk_entry_set_inner_border(&this, border);
9012 // Sets the character to use in place of the actual text when
9013 // gtk_entry_set_visibility() has been called to set text visibility
9014 // to %FALSE. i.e. this is the character used in "password mode" to
9015 // show the user how many characters have been typed. By default, GTK+
9016 // picks the best invisible char available in the current font. If you
9017 // set the invisible char to 0, then the user will get no feedback
9018 // at all; there will be no text on the screen as they type.
9019 // <ch>: a Unicode character
9020 void set_invisible_char()(dchar ch) {
9021 gtk_entry_set_invisible_char(&this, ch);
9024 // Sets the maximum allowed length of the contents of the widget. If
9025 // the current contents are longer than the given length, then they
9026 // will be truncated to fit.
9027 // This is equivalent to:
9028 // <informalexample><programlisting>
9029 // gtk_entry_buffer_set_max_length (gtk_entry_get_buffer (entry), max);
9030 // </programlisting></informalexample>
9031 // <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.
9032 void set_max_length()(int max) {
9033 gtk_entry_set_max_length(&this, max);
9036 // VERSION: 2.14
9037 // Sets whether the text is overwritten when typing in the #GtkEntry.
9038 // <overwrite>: new value
9039 void set_overwrite_mode()(int overwrite) {
9040 gtk_entry_set_overwrite_mode(&this, overwrite);
9043 // DEPRECATED (v2.0) method: set_position - Use gtk_editable_set_position() instead.
9044 // Sets the cursor position in an entry to the given value.
9045 // <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.
9046 void set_position()(int position) {
9047 gtk_entry_set_position(&this, position);
9050 // VERSION: 2.16
9051 // Causes the entry's progress indicator to "fill in" the given
9052 // fraction of the bar. The fraction should be between 0.0 and 1.0,
9053 // inclusive.
9054 // <fraction>: fraction of the task that's been completed
9055 void set_progress_fraction()(double fraction) {
9056 gtk_entry_set_progress_fraction(&this, fraction);
9059 // VERSION: 2.16
9060 // Sets the fraction of total entry width to move the progress
9061 // bouncing block for each call to gtk_entry_progress_pulse().
9062 // <fraction>: fraction between 0.0 and 1.0
9063 void set_progress_pulse_step()(double fraction) {
9064 gtk_entry_set_progress_pulse_step(&this, fraction);
9067 // Sets the text in the widget to the given
9068 // value, replacing the current contents.
9069 // See gtk_entry_buffer_set_text().
9070 // <text>: the new text
9071 void set_text()(char* text) {
9072 gtk_entry_set_text(&this, text);
9075 // Sets whether the contents of the entry are visible or not.
9076 // When visibility is set to %FALSE, characters are displayed
9077 // as the invisible char, and will also appear that way when
9078 // the text in the entry widget is copied elsewhere.
9079 // By default, GTK+ picks the best invisible character available
9080 // in the current font, but it can be changed with
9081 // gtk_entry_set_invisible_char().
9082 // <visible>: %TRUE if the contents of the entry are displayed as plaintext
9083 void set_visibility()(int visible) {
9084 gtk_entry_set_visibility(&this, visible);
9087 // Changes the size request of the entry to be about the right size
9088 // for @n_chars characters. Note that it changes the size
9089 // <emphasis>request</emphasis>, the size can still be affected by
9090 // how you pack the widget into containers. If @n_chars is -1, the
9091 // size reverts to the default entry size.
9092 // <n_chars>: width in chars
9093 void set_width_chars()(int n_chars) {
9094 gtk_entry_set_width_chars(&this, n_chars);
9097 // Converts from a position in the entry's #PangoLayout (returned by
9098 // gtk_entry_get_layout()) to a position in the entry contents
9099 // (returned by gtk_entry_get_text()).
9100 // RETURNS: byte index into the entry layout text
9101 // <text_index>: byte index into the entry contents
9102 int text_index_to_layout_index()(int text_index) {
9103 return gtk_entry_text_index_to_layout_index(&this, text_index);
9106 // VERSION: 2.16
9107 // Unsets the invisible char previously set with
9108 // gtk_entry_set_invisible_char(). So that the
9109 // default invisible char is used again.
9110 void unset_invisible_char()() {
9111 gtk_entry_unset_invisible_char(&this);
9114 // A <link linkend="keybinding-signals">keybinding signal</link>
9115 // which gets emitted when the user activates the entry.
9116 // Applications should not connect to it, but may emit it with
9117 // g_signal_emit_by_name() if they need to control activation
9118 // programmatically.
9119 // The default bindings for this signal are all forms of the Enter key.
9120 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_activate;
9122 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9123 return super_.signal_connect!name(cb, data, cf);
9126 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9127 return signal_connect_data!()(&this, cast(char*)"activate",
9128 cast(GObject2.Callback)cb, data, null, cf);
9131 // The ::backspace signal is a
9132 // <link linkend="keybinding-signals">keybinding signal</link>
9133 // which gets emitted when the user asks for it.
9134 // The default bindings for this signal are
9135 // Backspace and Shift-Backspace.
9136 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_backspace;
9137 ulong signal_connect(string name:"backspace", CB:signal_backspace)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9138 return signal_connect_data!()(&this, cast(char*)"backspace",
9139 cast(GObject2.Callback)cb, data, null, cf);
9142 // The ::copy-clipboard signal is a
9143 // <link linkend="keybinding-signals">keybinding signal</link>
9144 // which gets emitted to copy the selection to the clipboard.
9145 // The default bindings for this signal are
9146 // Ctrl-c and Ctrl-Insert.
9147 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_copy_clipboard;
9148 ulong signal_connect(string name:"copy-clipboard", CB:signal_copy_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9149 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
9150 cast(GObject2.Callback)cb, data, null, cf);
9153 // The ::cut-clipboard signal is a
9154 // <link linkend="keybinding-signals">keybinding signal</link>
9155 // which gets emitted to cut the selection to the clipboard.
9156 // The default bindings for this signal are
9157 // Ctrl-x and Shift-Delete.
9158 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_cut_clipboard;
9159 ulong signal_connect(string name:"cut-clipboard", CB:signal_cut_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9160 return signal_connect_data!()(&this, cast(char*)"cut-clipboard",
9161 cast(GObject2.Callback)cb, data, null, cf);
9164 // The ::delete-from-cursor signal is a
9165 // <link linkend="keybinding-signals">keybinding signal</link>
9166 // which gets emitted when the user initiates a text deletion.
9167 // If the @type is %GTK_DELETE_CHARS, GTK+ deletes the selection
9168 // if there is one, otherwise it deletes the requested number
9169 // of characters.
9170 // The default bindings for this signal are
9171 // Delete for deleting a character and Ctrl-Delete for
9172 // deleting a word.
9173 // <type>: the granularity of the deletion, as a #GtkDeleteType
9174 // <count>: the number of @type units to delete
9175 extern (C) alias static void function (Entry* this_, DeleteType* type, int count, void* user_data=null) signal_delete_from_cursor;
9176 ulong signal_connect(string name:"delete-from-cursor", CB:signal_delete_from_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9177 return signal_connect_data!()(&this, cast(char*)"delete-from-cursor",
9178 cast(GObject2.Callback)cb, data, null, cf);
9181 // VERSION: 2.16
9182 // The ::icon-press signal is emitted when an activatable icon
9183 // is clicked.
9184 // <icon_pos>: The position of the clicked icon
9185 // <event>: the button press event
9186 extern (C) alias static void function (Entry* this_, EntryIconPosition* icon_pos, Gdk2.Event* event, void* user_data=null) signal_icon_press;
9187 ulong signal_connect(string name:"icon-press", CB:signal_icon_press)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9188 return signal_connect_data!()(&this, cast(char*)"icon-press",
9189 cast(GObject2.Callback)cb, data, null, cf);
9192 // VERSION: 2.16
9193 // The ::icon-release signal is emitted on the button release from a
9194 // mouse click over an activatable icon.
9195 // <icon_pos>: The position of the clicked icon
9196 // <event>: the button release event
9197 extern (C) alias static void function (Entry* this_, EntryIconPosition* icon_pos, Gdk2.Event* event, void* user_data=null) signal_icon_release;
9198 ulong signal_connect(string name:"icon-release", CB:signal_icon_release)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9199 return signal_connect_data!()(&this, cast(char*)"icon-release",
9200 cast(GObject2.Callback)cb, data, null, cf);
9203 // The ::insert-at-cursor signal is a
9204 // <link linkend="keybinding-signals">keybinding signal</link>
9205 // which gets emitted when the user initiates the insertion of a
9206 // fixed string at the cursor.
9207 // This signal has no default bindings.
9208 // <string>: the string to insert
9209 extern (C) alias static void function (Entry* this_, char* string_, void* user_data=null) signal_insert_at_cursor;
9210 ulong signal_connect(string name:"insert-at-cursor", CB:signal_insert_at_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9211 return signal_connect_data!()(&this, cast(char*)"insert-at-cursor",
9212 cast(GObject2.Callback)cb, data, null, cf);
9215 // The ::move-cursor signal is a
9216 // <link linkend="keybinding-signals">keybinding signal</link>
9217 // which gets emitted when the user initiates a cursor movement.
9218 // If the cursor is not visible in @entry, this signal causes
9219 // the viewport to be moved instead.
9220 // Applications should not connect to it, but may emit it with
9221 // g_signal_emit_by_name() if they need to control the cursor
9222 // programmatically.
9223 // The default bindings for this signal come in two variants,
9224 // the variant with the Shift modifier extends the selection,
9225 // the variant without the Shift modifer does not.
9226 // There are too many key combinations to list them all here.
9227 // <itemizedlist>
9228 // <listitem>Arrow keys move by individual characters/lines</listitem>
9229 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
9230 // <listitem>Home/End keys move to the ends of the buffer</listitem>
9231 // </itemizedlist>
9232 // <step>: the granularity of the move, as a #GtkMovementStep
9233 // <count>: the number of @step units to move
9234 // <extend_selection>: %TRUE if the move should extend the selection
9235 extern (C) alias static void function (Entry* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) signal_move_cursor;
9236 ulong signal_connect(string name:"move-cursor", CB:signal_move_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9237 return signal_connect_data!()(&this, cast(char*)"move-cursor",
9238 cast(GObject2.Callback)cb, data, null, cf);
9241 // The ::paste-clipboard signal is a
9242 // <link linkend="keybinding-signals">keybinding signal</link>
9243 // which gets emitted to paste the contents of the clipboard
9244 // into the text view.
9245 // The default bindings for this signal are
9246 // Ctrl-v and Shift-Insert.
9247 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_paste_clipboard;
9248 ulong signal_connect(string name:"paste-clipboard", CB:signal_paste_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9249 return signal_connect_data!()(&this, cast(char*)"paste-clipboard",
9250 cast(GObject2.Callback)cb, data, null, cf);
9253 // The ::populate-popup signal gets emitted before showing the
9254 // context menu of the entry.
9255 // If you need to add items to the context menu, connect
9256 // to this signal and append your menuitems to the @menu.
9257 // <menu>: the menu that is being populated
9258 extern (C) alias static void function (Entry* this_, Menu* menu, void* user_data=null) signal_populate_popup;
9259 ulong signal_connect(string name:"populate-popup", CB:signal_populate_popup)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9260 return signal_connect_data!()(&this, cast(char*)"populate-popup",
9261 cast(GObject2.Callback)cb, data, null, cf);
9264 // VERSION: 2.20
9265 // If an input method is used, the typed text will not immediately
9266 // be committed to the buffer. So if you are interested in the text,
9267 // connect to this signal.
9268 // <preedit>: the current preedit string
9269 extern (C) alias static void function (Entry* this_, char* preedit, void* user_data=null) signal_preedit_changed;
9270 ulong signal_connect(string name:"preedit-changed", CB:signal_preedit_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9271 return signal_connect_data!()(&this, cast(char*)"preedit-changed",
9272 cast(GObject2.Callback)cb, data, null, cf);
9275 // The ::toggle-overwrite signal is a
9276 // <link linkend="keybinding-signals">keybinding signal</link>
9277 // which gets emitted to toggle the overwrite mode of the entry.
9278 // The default bindings for this signal is Insert.
9279 extern (C) alias static void function (Entry* this_, void* user_data=null) signal_toggle_overwrite;
9280 ulong signal_connect(string name:"toggle-overwrite", CB:signal_toggle_overwrite)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9281 return signal_connect_data!()(&this, cast(char*)"toggle-overwrite",
9282 cast(GObject2.Callback)cb, data, null, cf);
9287 // The #GtkEntryBuffer class contains the actual text displayed in a
9288 // #GtkEntry widget.
9289 // A single #GtkEntryBuffer object can be shared by multiple #GtkEntry
9290 // widgets which will then share the same text content, but not the cursor
9291 // position, visibility attributes, icon etc.
9292 // #GtkEntryBuffer may be derived from. Such a derived class might allow
9293 // text to be stored in an alternate location, such as non-pageable memory,
9294 // useful in the case of important passwords. Or a derived class could
9295 // integrate with an application's concept of undo/redo.
9296 struct EntryBuffer /* : GObject.Object */ {
9297 alias parent_instance this;
9298 alias parent_instance super_;
9299 alias parent_instance object;
9300 GObject2.Object parent_instance;
9301 private EntryBufferPrivate* priv;
9304 // VERSION: 2.18
9305 // Create a new GtkEntryBuffer object.
9306 // Optionally, specify initial text to set in the buffer.
9307 // RETURNS: A new GtkEntryBuffer object.
9308 // <initial_chars>: initial buffer text, or %NULL
9309 // <n_initial_chars>: number of characters in @initial_chars, or -1
9310 static EntryBuffer* /*new*/ new_()(char* initial_chars, int n_initial_chars) {
9311 return gtk_entry_buffer_new(initial_chars, n_initial_chars);
9314 // VERSION: 2.18
9315 // Deletes a sequence of characters from the buffer. @n_chars characters are
9316 // deleted starting at @position. If @n_chars is negative, then all characters
9317 // until the end of the text are deleted.
9318 // If @position or @n_chars are out of bounds, then they are coerced to sane
9319 // values.
9320 // Note that the positions are specified in characters, not bytes.
9321 // RETURNS: The number of characters deleted.
9322 // <position>: position at which to delete text
9323 // <n_chars>: number of characters to delete
9324 uint delete_text()(uint position, int n_chars) {
9325 return gtk_entry_buffer_delete_text(&this, position, n_chars);
9328 // VERSION: 2.18
9329 // Used when subclassing #GtkEntryBuffer
9330 // <position>: position at which text was deleted
9331 // <n_chars>: number of characters deleted
9332 void emit_deleted_text()(uint position, uint n_chars) {
9333 gtk_entry_buffer_emit_deleted_text(&this, position, n_chars);
9336 // VERSION: 2.18
9337 // Used when subclassing #GtkEntryBuffer
9338 // <position>: position at which text was inserted
9339 // <chars>: text that was inserted
9340 // <n_chars>: number of characters inserted
9341 void emit_inserted_text()(uint position, char* chars, uint n_chars) {
9342 gtk_entry_buffer_emit_inserted_text(&this, position, chars, n_chars);
9345 // VERSION: 2.18
9346 // Retrieves the length in bytes of the buffer.
9347 // See gtk_entry_buffer_get_length().
9348 // RETURNS: The byte length of the buffer.
9349 size_t get_bytes()() {
9350 return gtk_entry_buffer_get_bytes(&this);
9353 // VERSION: 2.18
9354 // Retrieves the length in characters of the buffer.
9355 // RETURNS: The number of characters in the buffer.
9356 uint get_length()() {
9357 return gtk_entry_buffer_get_length(&this);
9360 // VERSION: 2.18
9361 // Retrieves the maximum allowed length of the text in
9362 // in #GtkEntryBuffer, or 0 if there is no maximum.
9363 // RETURNS: the maximum allowed number of characters
9364 int get_max_length()() {
9365 return gtk_entry_buffer_get_max_length(&this);
9368 // VERSION: 2.18
9369 // Retrieves the contents of the buffer.
9370 // The memory pointer returned by this call will not change
9371 // unless this object emits a signal, or is finalized.
9372 // string. This string points to internally allocated
9373 // storage in the buffer and must not be freed, modified or
9374 // stored.
9375 // RETURNS: a pointer to the contents of the widget as a
9376 char* get_text()() {
9377 return gtk_entry_buffer_get_text(&this);
9380 // VERSION: 2.18
9381 // Inserts @n_chars characters of @chars into the contents of the
9382 // buffer, at position @position.
9383 // If @n_chars is negative, then characters from chars will be inserted
9384 // until a null-terminator is found. If @position or @n_chars are out of
9385 // bounds, or the maximum buffer text length is exceeded, then they are
9386 // coerced to sane values.
9387 // Note that the position and length are in characters, not in bytes.
9388 // RETURNS: The number of characters actually inserted.
9389 // <position>: the position at which to insert text.
9390 // <chars>: the text to insert into the buffer.
9391 // <n_chars>: the length of the text in characters, or -1
9392 uint insert_text()(uint position, char* chars, int n_chars) {
9393 return gtk_entry_buffer_insert_text(&this, position, chars, n_chars);
9396 // VERSION: 2.18
9397 // Sets the maximum allowed length of the contents of the buffer. If
9398 // the current contents are longer than the given length, then they
9399 // will be truncated to fit.
9400 // <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.
9401 void set_max_length()(int max_length) {
9402 gtk_entry_buffer_set_max_length(&this, max_length);
9405 // VERSION: 2.18
9406 // Sets the text in the buffer.
9407 // This is roughly equivalent to calling gtk_entry_buffer_delete_text()
9408 // and gtk_entry_buffer_insert_text().
9409 // Note that @n_chars is in characters, not in bytes.
9410 // <chars>: the new text
9411 // <n_chars>: the number of characters in @text, or -1
9412 void set_text()(char* chars, int n_chars) {
9413 gtk_entry_buffer_set_text(&this, chars, n_chars);
9416 // VERSION: 2.18
9417 // This signal is emitted after text is deleted from the buffer.
9418 // <position>: the position the text was deleted at.
9419 // <n_chars>: The number of characters that were deleted.
9420 extern (C) alias static void function (EntryBuffer* this_, c_uint position, c_uint n_chars, void* user_data=null) signal_deleted_text;
9422 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9423 return super_.signal_connect!name(cb, data, cf);
9426 ulong signal_connect(string name:"deleted-text", CB:signal_deleted_text)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9427 return signal_connect_data!()(&this, cast(char*)"deleted-text",
9428 cast(GObject2.Callback)cb, data, null, cf);
9431 // VERSION: 2.18
9432 // This signal is emitted after text is inserted into the buffer.
9433 // <position>: the position the text was inserted at.
9434 // <chars>: The text that was inserted.
9435 // <n_chars>: The number of characters that were inserted.
9436 extern (C) alias static void function (EntryBuffer* this_, c_uint position, char* chars, c_uint n_chars, void* user_data=null) signal_inserted_text;
9437 ulong signal_connect(string name:"inserted-text", CB:signal_inserted_text)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9438 return signal_connect_data!()(&this, cast(char*)"inserted-text",
9439 cast(GObject2.Callback)cb, data, null, cf);
9443 struct EntryBufferClass {
9444 GObject2.ObjectClass parent_class;
9445 extern (C) void function (EntryBuffer* buffer, uint position, char* chars, uint n_chars) inserted_text;
9446 extern (C) void function (EntryBuffer* buffer, uint position, uint n_chars) deleted_text;
9447 extern (C) char* function (EntryBuffer* buffer, size_t* n_bytes) get_text;
9448 // RETURNS: The number of characters in the buffer.
9449 extern (C) uint function (EntryBuffer* buffer) get_length;
9451 // RETURNS: The number of characters actually inserted.
9452 // <position>: the position at which to insert text.
9453 // <chars>: the text to insert into the buffer.
9454 // <n_chars>: the length of the text in characters, or -1
9455 extern (C) uint function (EntryBuffer* buffer, uint position, char* chars, uint n_chars) insert_text;
9457 // RETURNS: The number of characters deleted.
9458 // <position>: position at which to delete text
9459 // <n_chars>: number of characters to delete
9460 extern (C) uint function (EntryBuffer* buffer, uint position, uint n_chars) delete_text;
9461 extern (C) void function () _gtk_reserved0;
9462 extern (C) void function () _gtk_reserved1;
9463 extern (C) void function () _gtk_reserved2;
9464 extern (C) void function () _gtk_reserved3;
9465 extern (C) void function () _gtk_reserved4;
9466 extern (C) void function () _gtk_reserved5;
9469 struct EntryBufferPrivate {
9472 struct EntryClass {
9473 WidgetClass parent_class;
9474 extern (C) void function (Entry* entry, Menu* menu) populate_popup;
9475 extern (C) void function (Entry* entry) activate;
9476 extern (C) void function (Entry* entry, MovementStep step, int count, int extend_selection) move_cursor;
9477 extern (C) void function (Entry* entry, char* str) insert_at_cursor;
9478 extern (C) void function (Entry* entry, DeleteType type, int count) delete_from_cursor;
9479 extern (C) void function (Entry* entry) backspace;
9480 extern (C) void function (Entry* entry) cut_clipboard;
9481 extern (C) void function (Entry* entry) copy_clipboard;
9482 extern (C) void function (Entry* entry) paste_clipboard;
9483 extern (C) void function (Entry* entry) toggle_overwrite;
9484 extern (C) void function (Entry* entry, int* x, int* y, int* width, int* height) get_text_area_size;
9485 extern (C) void function () _gtk_reserved1;
9486 extern (C) void function () _gtk_reserved2;
9489 struct EntryCompletion /* : GObject.Object */ {
9490 mixin Buildable.__interface__;
9491 mixin CellLayout.__interface__;
9492 alias parent_instance this;
9493 alias parent_instance super_;
9494 alias parent_instance object;
9495 GObject2.Object parent_instance;
9496 private EntryCompletionPrivate* priv;
9499 // VERSION: 2.4
9500 // Creates a new #GtkEntryCompletion object.
9501 // RETURNS: A newly created #GtkEntryCompletion object.
9502 static EntryCompletion* /*new*/ new_()() {
9503 return gtk_entry_completion_new();
9506 // VERSION: 2.4
9507 // Requests a completion operation, or in other words a refiltering of the
9508 // current list with completions, using the current key. The completion list
9509 // view will be updated accordingly.
9510 void complete()() {
9511 gtk_entry_completion_complete(&this);
9514 // VERSION: 2.4
9515 // Deletes the action at @index_ from @completion's action list.
9516 // <index_>: The index of the item to Delete.
9517 void delete_action()(int index_) {
9518 gtk_entry_completion_delete_action(&this, index_);
9521 // VERSION: 2.12
9522 // Get the original text entered by the user that triggered
9523 // the completion or %NULL if there's no completion ongoing.
9524 // RETURNS: the prefix for the current completion
9525 char* get_completion_prefix()() {
9526 return gtk_entry_completion_get_completion_prefix(&this);
9529 // VERSION: 2.4
9530 // Gets the entry @completion has been attached to.
9531 // RETURNS: The entry @completion has been attached to.
9532 Widget* get_entry()() {
9533 return gtk_entry_completion_get_entry(&this);
9536 // VERSION: 2.6
9537 // Returns whether the common prefix of the possible completions should
9538 // be automatically inserted in the entry.
9539 // RETURNS: %TRUE if inline completion is turned on
9540 int get_inline_completion()() {
9541 return gtk_entry_completion_get_inline_completion(&this);
9544 // VERSION: 2.12
9545 // Returns %TRUE if inline-selection mode is turned on.
9546 // RETURNS: %TRUE if inline-selection mode is on
9547 int get_inline_selection()() {
9548 return gtk_entry_completion_get_inline_selection(&this);
9551 // VERSION: 2.4
9552 // Returns the minimum key length as set for @completion.
9553 // RETURNS: The currently used minimum key length.
9554 int get_minimum_key_length()() {
9555 return gtk_entry_completion_get_minimum_key_length(&this);
9558 // VERSION: 2.4
9559 // Returns the model the #GtkEntryCompletion is using as data source.
9560 // Returns %NULL if the model is unset.
9561 // is currently being used.
9562 // RETURNS: A #GtkTreeModel, or %NULL if none
9563 TreeModel* get_model()() {
9564 return gtk_entry_completion_get_model(&this);
9567 // VERSION: 2.6
9568 // Returns whether the completions should be presented in a popup window.
9569 // RETURNS: %TRUE if popup completion is turned on
9570 int get_popup_completion()() {
9571 return gtk_entry_completion_get_popup_completion(&this);
9574 // VERSION: 2.8
9575 // Returns whether the completion popup window will be resized to the
9576 // width of the entry.
9577 // the entry
9578 // RETURNS: %TRUE if the popup window will be resized to the width of
9579 int get_popup_set_width()() {
9580 return gtk_entry_completion_get_popup_set_width(&this);
9583 // VERSION: 2.8
9584 // Returns whether the completion popup window will appear even if there is
9585 // only a single match.
9586 // number of matches.
9587 // RETURNS: %TRUE if the popup window will appear regardless of the
9588 int get_popup_single_match()() {
9589 return gtk_entry_completion_get_popup_single_match(&this);
9592 // VERSION: 2.6
9593 // Returns the column in the model of @completion to get strings from.
9594 // RETURNS: the column containing the strings
9595 int get_text_column()() {
9596 return gtk_entry_completion_get_text_column(&this);
9599 // VERSION: 2.4
9600 // Inserts an action in @completion's action item list at position @index_
9601 // with markup @markup.
9602 // <index_>: The index of the item to insert.
9603 // <markup>: Markup of the item to insert.
9604 void insert_action_markup()(int index_, char* markup) {
9605 gtk_entry_completion_insert_action_markup(&this, index_, markup);
9608 // VERSION: 2.4
9609 // Inserts an action in @completion's action item list at position @index_
9610 // with text @text. If you want the action item to have markup, use
9611 // gtk_entry_completion_insert_action_markup().
9612 // <index_>: The index of the item to insert.
9613 // <text>: Text of the item to insert.
9614 void insert_action_text()(int index_, char* text) {
9615 gtk_entry_completion_insert_action_text(&this, index_, text);
9618 // VERSION: 2.6
9619 // Requests a prefix insertion.
9620 void insert_prefix()() {
9621 gtk_entry_completion_insert_prefix(&this);
9624 // VERSION: 2.6
9625 // Sets whether the common prefix of the possible completions should
9626 // be automatically inserted in the entry.
9627 // <inline_completion>: %TRUE to do inline completion
9628 void set_inline_completion()(int inline_completion) {
9629 gtk_entry_completion_set_inline_completion(&this, inline_completion);
9632 // VERSION: 2.12
9633 // Sets whether it is possible to cycle through the possible completions
9634 // inside the entry.
9635 // <inline_selection>: %TRUE to do inline selection
9636 void set_inline_selection()(int inline_selection) {
9637 gtk_entry_completion_set_inline_selection(&this, inline_selection);
9640 // VERSION: 2.4
9641 // Sets the match function for @completion to be @func. The match function
9642 // is used to determine if a row should or should not be in the completion
9643 // list.
9644 // <func>: The #GtkEntryCompletionMatchFunc to use.
9645 // <func_data>: The user data for @func.
9646 // <func_notify>: Destroy notifier for @func_data.
9647 void set_match_func()(EntryCompletionMatchFunc func, void* func_data, GLib2.DestroyNotify func_notify) {
9648 gtk_entry_completion_set_match_func(&this, func, func_data, func_notify);
9651 // VERSION: 2.4
9652 // Requires the length of the search key for @completion to be at least
9653 // key takes a lot of time and will come up with meaningless results anyway
9654 // (ie, a too large dataset).
9655 // <length>: The minimum length of the key in order to start completing.
9656 void set_minimum_key_length()(int length) {
9657 gtk_entry_completion_set_minimum_key_length(&this, length);
9660 // VERSION: 2.4
9661 // Sets the model for a #GtkEntryCompletion. If @completion already has
9662 // a model set, it will remove it before setting the new model.
9663 // If model is %NULL, then it will unset the model.
9664 // <model>: The #GtkTreeModel.
9665 void set_model()(TreeModel* model=null) {
9666 gtk_entry_completion_set_model(&this, model);
9669 // VERSION: 2.6
9670 // Sets whether the completions should be presented in a popup window.
9671 // <popup_completion>: %TRUE to do popup completion
9672 void set_popup_completion()(int popup_completion) {
9673 gtk_entry_completion_set_popup_completion(&this, popup_completion);
9676 // VERSION: 2.8
9677 // Sets whether the completion popup window will be resized to be the same
9678 // width as the entry.
9679 // <popup_set_width>: %TRUE to make the width of the popup the same as the entry
9680 void set_popup_set_width()(int popup_set_width) {
9681 gtk_entry_completion_set_popup_set_width(&this, popup_set_width);
9684 // VERSION: 2.8
9685 // Sets whether the completion popup window will appear even if there is
9686 // only a single match. You may want to set this to %FALSE if you
9687 // are using <link linkend="GtkEntryCompletion--inline-completion">inline
9688 // completion</link>.
9689 // <popup_single_match>: %TRUE if the popup should appear even for a single match
9690 void set_popup_single_match()(int popup_single_match) {
9691 gtk_entry_completion_set_popup_single_match(&this, popup_single_match);
9694 // VERSION: 2.4
9695 // completion list with just strings. This function will set up @completion
9696 // to have a list displaying all (and just) strings in the completion list,
9697 // and to get those strings from @column in the model of @completion.
9698 // This functions creates and adds a #GtkCellRendererText for the selected
9699 // column. If you need to set the text column, but don't want the cell
9700 // renderer, use g_object_set() to set the ::text_column property directly.
9701 // <column>: The column in the model of @completion to get strings from.
9702 void set_text_column()(int column) {
9703 gtk_entry_completion_set_text_column(&this, column);
9706 // VERSION: 2.4
9707 // Gets emitted when an action is activated.
9708 // <index>: the index of the activated action
9709 extern (C) alias static void function (EntryCompletion* this_, int index, void* user_data=null) signal_action_activated;
9711 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9712 return super_.signal_connect!name(cb, data, cf);
9715 ulong signal_connect(string name:"action-activated", CB:signal_action_activated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9716 return signal_connect_data!()(&this, cast(char*)"action-activated",
9717 cast(GObject2.Callback)cb, data, null, cf);
9720 // VERSION: 2.12
9721 // Gets emitted when a match from the cursor is on a match
9722 // of the list.The default behaviour is to replace the contents
9723 // of the entry with the contents of the text column in the row
9724 // pointed to by @iter.
9725 // RETURNS: %TRUE if the signal has been handled
9726 // <model>: the #GtkTreeModel containing the matches
9727 // <iter>: a #GtkTreeIter positioned at the selected match
9728 extern (C) alias static c_int function (EntryCompletion* this_, TreeModel* model, TreeIter* iter, void* user_data=null) signal_cursor_on_match;
9729 ulong signal_connect(string name:"cursor-on-match", CB:signal_cursor_on_match)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9730 return signal_connect_data!()(&this, cast(char*)"cursor-on-match",
9731 cast(GObject2.Callback)cb, data, null, cf);
9734 // VERSION: 2.6
9735 // Gets emitted when the inline autocompletion is triggered.
9736 // The default behaviour is to make the entry display the
9737 // whole prefix and select the newly inserted part.
9738 // Applications may connect to this signal in order to insert only a
9739 // smaller part of the @prefix into the entry - e.g. the entry used in
9740 // the #GtkFileChooser inserts only the part of the prefix up to the
9741 // next '/'.
9742 // RETURNS: %TRUE if the signal has been handled
9743 // <prefix>: the common prefix of all possible completions
9744 extern (C) alias static c_int function (EntryCompletion* this_, char* prefix, void* user_data=null) signal_insert_prefix;
9745 ulong signal_connect(string name:"insert-prefix", CB:signal_insert_prefix)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9746 return signal_connect_data!()(&this, cast(char*)"insert-prefix",
9747 cast(GObject2.Callback)cb, data, null, cf);
9750 // VERSION: 2.4
9751 // Gets emitted when a match from the list is selected.
9752 // The default behaviour is to replace the contents of the
9753 // entry with the contents of the text column in the row
9754 // pointed to by @iter.
9755 // RETURNS: %TRUE if the signal has been handled
9756 // <model>: the #GtkTreeModel containing the matches
9757 // <iter>: a #GtkTreeIter positioned at the selected match
9758 extern (C) alias static c_int function (EntryCompletion* this_, TreeModel* model, TreeIter* iter, void* user_data=null) signal_match_selected;
9759 ulong signal_connect(string name:"match-selected", CB:signal_match_selected)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
9760 return signal_connect_data!()(&this, cast(char*)"match-selected",
9761 cast(GObject2.Callback)cb, data, null, cf);
9765 struct EntryCompletionClass {
9766 GObject2.ObjectClass parent_class;
9767 extern (C) int function (EntryCompletion* completion, TreeModel* model, TreeIter* iter) match_selected;
9768 extern (C) void function (EntryCompletion* completion, int index_) action_activated;
9769 extern (C) int function (EntryCompletion* completion, char* prefix) insert_prefix;
9770 extern (C) int function (EntryCompletion* completion, TreeModel* model, TreeIter* iter) cursor_on_match;
9771 extern (C) void function () _gtk_reserved0;
9772 extern (C) void function () _gtk_reserved1;
9775 extern (C) alias int function (EntryCompletion* completion, char* key, TreeIter* iter, void* user_data) EntryCompletionMatchFunc;
9777 struct EntryCompletionPrivate {
9780 enum EntryIconPosition {
9781 PRIMARY = 0,
9782 SECONDARY = 1
9784 struct EventBox /* : Bin */ {
9785 mixin Atk.ImplementorIface.__interface__;
9786 mixin Buildable.__interface__;
9787 alias bin this;
9788 alias bin super_;
9789 Bin bin;
9791 static EventBox* new_()() {
9792 return gtk_event_box_new();
9795 // VERSION: 2.4
9796 // Returns whether the event box window is above or below the
9797 // windows of its child. See gtk_event_box_set_above_child() for
9798 // details.
9799 // of its child.
9800 // RETURNS: %TRUE if the event box window is above the window
9801 int get_above_child()() {
9802 return gtk_event_box_get_above_child(&this);
9805 // VERSION: 2.4
9806 // Returns whether the event box has a visible window.
9807 // See gtk_event_box_set_visible_window() for details.
9808 // RETURNS: %TRUE if the event box window is visible
9809 int get_visible_window()() {
9810 return gtk_event_box_get_visible_window(&this);
9813 // VERSION: 2.4
9814 // Set whether the event box window is positioned above the windows of its child,
9815 // as opposed to below it. If the window is above, all events inside the
9816 // event box will go to the event box. If the window is below, events
9817 // in windows of child widgets will first got to that widget, and then
9818 // to its parents.
9819 // The default is to keep the window below the child.
9820 // <above_child>: %TRUE if the event box window is above the windows of its child
9821 void set_above_child()(int above_child) {
9822 gtk_event_box_set_above_child(&this, above_child);
9825 // VERSION: 2.4
9826 // Set whether the event box uses a visible or invisible child
9827 // window. The default is to use visible windows.
9828 // In an invisible window event box, the window that the
9829 // event box creates is a %GDK_INPUT_ONLY window, which
9830 // means that it is invisible and only serves to receive
9831 // events.
9832 // A visible window event box creates a visible (%GDK_INPUT_OUTPUT)
9833 // window that acts as the parent window for all the widgets
9834 // contained in the event box.
9835 // You should generally make your event box invisible if
9836 // you just want to trap events. Creating a visible window
9837 // may cause artifacts that are visible to the user, especially
9838 // if the user is using a theme with gradients or pixmaps.
9839 // The main reason to create a non input-only event box is if
9840 // you want to set the background to a different color or
9841 // draw on it.
9842 // <note><para>
9843 // There is one unexpected issue for an invisible event box that has its
9844 // window below the child. (See gtk_event_box_set_above_child().)
9845 // Since the input-only window is not an ancestor window of any windows
9846 // that descendent widgets of the event box create, events on these
9847 // windows aren't propagated up by the windowing system, but only by GTK+.
9848 // The practical effect of this is if an event isn't in the event
9849 // mask for the descendant window (see gtk_widget_add_events()),
9850 // it won't be received by the event box.
9851 // </para><para>
9852 // This problem doesn't occur for visible event boxes, because in
9853 // that case, the event box window is actually the ancestor of the
9854 // descendant windows, not just at the same place on the screen.
9855 // </para></note>
9856 // <visible_window>: boolean value
9857 void set_visible_window()(int visible_window) {
9858 gtk_event_box_set_visible_window(&this, visible_window);
9862 struct EventBoxClass {
9863 BinClass parent_class;
9866 struct Expander /* : Bin */ {
9867 mixin Atk.ImplementorIface.__interface__;
9868 mixin Buildable.__interface__;
9869 alias bin this;
9870 alias bin super_;
9871 Bin bin;
9872 ExpanderPrivate* priv;
9875 // VERSION: 2.4
9876 // Creates a new expander using @label as the text of the label.
9877 // RETURNS: a new #GtkExpander widget.
9878 // <label>: the text of the label
9879 static Expander* new_()(char* label) {
9880 return gtk_expander_new(label);
9883 // VERSION: 2.4
9884 // Creates a new expander using @label as the text of the label.
9885 // If characters in @label are preceded by an underscore, they are underlined.
9886 // If you need a literal underscore character in a label, use '__' (two
9887 // underscores). The first underlined character represents a keyboard
9888 // accelerator called a mnemonic.
9889 // Pressing Alt and that key activates the button.
9890 // RETURNS: a new #GtkExpander widget.
9891 // <label>: the text of the label with an underscore in front of the mnemonic character
9892 static Expander* new_with_mnemonic()(char* label=null) {
9893 return gtk_expander_new_with_mnemonic(label);
9896 // VERSION: 2.4
9897 // Queries a #GtkExpander and returns its current state. Returns %TRUE
9898 // if the child widget is revealed.
9899 // See gtk_expander_set_expanded().
9900 // RETURNS: the current state of the expander.
9901 int get_expanded()() {
9902 return gtk_expander_get_expanded(&this);
9905 // VERSION: 2.4
9906 // Fetches the text from a label widget including any embedded
9907 // underlines indicating mnemonics and Pango markup, as set by
9908 // gtk_expander_set_label(). If the label text has not been set the
9909 // return value will be %NULL. This will be the case if you create an
9910 // empty button with gtk_button_new() to use as a container.
9911 // Note that this function behaved differently in versions prior to
9912 // 2.14 and used to return the label text stripped of embedded
9913 // underlines indicating mnemonics and Pango markup. This problem can
9914 // be avoided by fetching the label text directly from the label
9915 // widget.
9916 // by the widget and must not be modified or freed.
9917 // RETURNS: The text of the label widget. This string is owned
9918 char* get_label()() {
9919 return gtk_expander_get_label(&this);
9922 // VERSION: 2.22
9923 // Returns whether the label widget will fill all available horizontal
9924 // space allocated to @expander.
9925 // space
9926 // RETURNS: %TRUE if the label widget will fill all available horizontal
9927 int get_label_fill()() {
9928 return gtk_expander_get_label_fill(&this);
9931 // VERSION: 2.4
9932 // Retrieves the label widget for the frame. See
9933 // gtk_expander_set_label_widget().
9934 // or %NULL if there is none.
9935 // RETURNS: the label widget,
9936 Widget* get_label_widget()() {
9937 return gtk_expander_get_label_widget(&this);
9940 // VERSION: 2.4
9941 // Gets the value set by gtk_expander_set_spacing().
9942 // RETURNS: spacing between the expander and child.
9943 int get_spacing()() {
9944 return gtk_expander_get_spacing(&this);
9947 // VERSION: 2.4
9948 // Returns whether the label's text is interpreted as marked up with
9949 // the <link linkend="PangoMarkupFormat">Pango text markup
9950 // language</link>. See gtk_expander_set_use_markup ().
9951 // RETURNS: %TRUE if the label's text will be parsed for markup
9952 int get_use_markup()() {
9953 return gtk_expander_get_use_markup(&this);
9956 // VERSION: 2.4
9957 // Returns whether an embedded underline in the expander label indicates a
9958 // mnemonic. See gtk_expander_set_use_underline().
9959 // indicates the mnemonic accelerator keys.
9960 // RETURNS: %TRUE if an embedded underline in the expander label
9961 int get_use_underline()() {
9962 return gtk_expander_get_use_underline(&this);
9965 // VERSION: 2.4
9966 // Sets the state of the expander. Set to %TRUE, if you want
9967 // the child widget to be revealed, and %FALSE if you want the
9968 // child widget to be hidden.
9969 // <expanded>: whether the child widget is revealed
9970 void set_expanded()(int expanded) {
9971 gtk_expander_set_expanded(&this, expanded);
9974 // VERSION: 2.4
9975 // Sets the text of the label of the expander to @label.
9976 // This will also clear any previously set labels.
9977 // <label>: a string
9978 void set_label()(char* label=null) {
9979 gtk_expander_set_label(&this, label);
9982 // VERSION: 2.22
9983 // Sets whether the label widget should fill all available horizontal space
9984 // allocated to @expander.
9985 // <label_fill>: %TRUE if the label should should fill all available horizontal space
9986 void set_label_fill()(int label_fill) {
9987 gtk_expander_set_label_fill(&this, label_fill);
9990 // VERSION: 2.4
9991 // Set the label widget for the expander. This is the widget
9992 // that will appear embedded alongside the expander arrow.
9993 // <label_widget>: the new label widget
9994 void set_label_widget()(Widget* label_widget=null) {
9995 gtk_expander_set_label_widget(&this, label_widget);
9998 // VERSION: 2.4
9999 // Sets the spacing field of @expander, which is the number of pixels to
10000 // place between expander and the child.
10001 // <spacing>: distance between the expander and child in pixels.
10002 void set_spacing()(int spacing) {
10003 gtk_expander_set_spacing(&this, spacing);
10006 // VERSION: 2.4
10007 // Sets whether the text of the label contains markup in <link
10008 // linkend="PangoMarkupFormat">Pango's text markup
10009 // language</link>. See gtk_label_set_markup().
10010 // <use_markup>: %TRUE if the label's text should be parsed for markup
10011 void set_use_markup()(int use_markup) {
10012 gtk_expander_set_use_markup(&this, use_markup);
10015 // VERSION: 2.4
10016 // If true, an underline in the text of the expander label indicates
10017 // the next character should be used for the mnemonic accelerator key.
10018 // <use_underline>: %TRUE if underlines in the text indicate mnemonics
10019 void set_use_underline()(int use_underline) {
10020 gtk_expander_set_use_underline(&this, use_underline);
10022 extern (C) alias static void function (Expander* this_, void* user_data=null) signal_activate;
10024 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10025 return super_.signal_connect!name(cb, data, cf);
10028 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
10029 return signal_connect_data!()(&this, cast(char*)"activate",
10030 cast(GObject2.Callback)cb, data, null, cf);
10034 struct ExpanderClass {
10035 BinClass parent_class;
10036 extern (C) void function (Expander* expander) activate;
10039 struct ExpanderPrivate {
10042 enum ExpanderStyle {
10043 COLLAPSED = 0,
10044 SEMI_COLLAPSED = 1,
10045 SEMI_EXPANDED = 2,
10046 EXPANDED = 3
10049 // #GtkFileChooser is an interface that can be implemented by file
10050 // selection widgets. In GTK+, the main objects that implement this
10051 // interface are #GtkFileChooserWidget, #GtkFileChooserDialog, and
10052 // #GtkFileChooserButton. You do not need to write an object that
10053 // implements the #GtkFileChooser interface unless you are trying to
10054 // adapt an existing file selector to expose a standard programming
10055 // interface.
10056 // #GtkFileChooser allows for shortcuts to various places in the filesystem.
10057 // In the default implementation these are displayed in the left pane. It
10058 // may be a bit confusing at first that these shortcuts come from various
10059 // sources and in various flavours, so lets explain the terminology here:
10060 // <variablelist>
10061 // <varlistentry>
10062 // <term>Bookmarks</term>
10063 // <listitem>
10064 // are created by the user, by dragging folders from the
10065 // right pane to the left pane, or by using the "Add". Bookmarks
10066 // can be renamed and deleted by the user.
10067 // </listitem>
10068 // </varlistentry>
10069 // <varlistentry>
10070 // <term>Shortcuts</term>
10071 // <listitem>
10072 // can be provided by the application or by the underlying filesystem
10073 // abstraction (e.g. both the gnome-vfs and the Windows filesystems
10074 // provide "Desktop" shortcuts). Shortcuts cannot be modified by the
10075 // user.
10076 // </listitem>
10077 // </varlistentry>
10078 // <varlistentry>
10079 // <term>Volumes</term>
10080 // <listitem>
10081 // are provided by the underlying filesystem abstraction. They are
10082 // the "roots" of the filesystem.
10083 // </listitem>
10084 // </varlistentry>
10085 // </variablelist>
10086 // <refsect2 id="gtkfilechooser-encodings">
10087 // <title>File Names and Encodings</title>
10088 // When the user is finished selecting files in a
10089 // #GtkFileChooser, your program can get the selected names
10090 // either as filenames or as URIs. For URIs, the normal escaping
10091 // rules are applied if the URI contains non-ASCII characters.
10092 // However, filenames are <emphasis>always</emphasis> returned in
10093 // the character set specified by the
10094 // <envar>G_FILENAME_ENCODING</envar> environment variable.
10095 // Please see the Glib documentation for more details about this
10096 // variable.
10097 // <note>
10098 // This means that while you can pass the result of
10099 // gtk_file_chooser_get_filename() to
10100 // <function>open(2)</function> or
10101 // <function>fopen(3)</function>, you may not be able to
10102 // directly set it as the text of a #GtkLabel widget unless you
10103 // convert it first to UTF-8, which all GTK+ widgets expect.
10104 // You should use g_filename_to_utf8() to convert filenames
10105 // into strings that can be passed to GTK+ widgets.
10106 // </note>
10107 // </refsect2>
10108 // <refsect2 id="gtkfilechooser-preview">
10109 // <title>Adding a Preview Widget</title>
10110 // <para>
10111 // You can add a custom preview widget to a file chooser and then
10112 // get notification about when the preview needs to be updated.
10113 // To install a preview widget, use
10114 // gtk_file_chooser_set_preview_widget(). Then, connect to the
10115 // #GtkFileChooser::update-preview signal to get notified when
10116 // you need to update the contents of the preview.
10117 // </para>
10118 // <para>
10119 // Your callback should use
10120 // gtk_file_chooser_get_preview_filename() to see what needs
10121 // previewing. Once you have generated the preview for the
10122 // corresponding file, you must call
10123 // gtk_file_chooser_set_preview_widget_active() with a boolean
10124 // flag that indicates whether your callback could successfully
10125 // generate a preview.
10126 // </para>
10127 // <example id="example-gtkfilechooser-preview">
10128 // <title>Sample Usage</title>
10129 // <programlisting>
10130 // {
10131 // GtkImage *preview;
10132 // ...
10133 // preview = gtk_image_new (<!-- -->);
10134 // gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
10135 // g_signal_connect (my_file_chooser, "update-preview",
10136 // G_CALLBACK (update_preview_cb), preview);
10137 // }
10138 // static void
10139 // update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
10140 // {
10141 // GtkWidget *preview;
10142 // char *filename;
10143 // GdkPixbuf *pixbuf;
10144 // gboolean have_preview;
10145 // preview = GTK_WIDGET (data);
10146 // filename = gtk_file_chooser_get_preview_filename (file_chooser);
10147 // pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
10148 // have_preview = (pixbuf != NULL);
10149 // g_free (filename);
10150 // gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
10151 // if (pixbuf)
10152 // g_object_unref (pixbuf);
10153 // gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
10154 // }
10155 // </programlisting>
10156 // </example>
10157 // </refsect2>
10158 // <refsect2 id="gtkfilechooser-extra">
10159 // <title>Adding Extra Widgets</title>
10160 // <para>
10161 // You can add extra widgets to a file chooser to provide options
10162 // that are not present in the default design. For example, you
10163 // can add a toggle button to give the user the option to open a
10164 // file in read-only mode. You can use
10165 // gtk_file_chooser_set_extra_widget() to insert additional
10166 // widgets in a file chooser.
10167 // </para>
10168 // <example id="example-gtkfilechooser-extra">
10169 // <title>Sample Usage</title>
10170 // <programlisting>
10171 // GtkWidget *toggle;
10172 // ...
10173 // toggle = gtk_check_button_new_with_label ("Open file read-only");
10174 // gtk_widget_show (toggle);
10175 // gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
10176 // }
10177 // </programlisting>
10178 // </example>
10179 // <note>
10180 // If you want to set more than one extra widget in the file
10181 // chooser, you can a container such as a #GtkVBox or a #GtkTable
10182 // and include your widgets in it. Then, set the container as
10183 // the whole extra widget.
10184 // </note>
10185 // </refsect2>
10186 // <refsect2 id="gtkfilechooser-key-bindings">
10187 // <title>Key Bindings</title>
10188 // <para>
10189 // Internally, GTK+ implements a file chooser's graphical user
10190 // interface with the private
10191 // <classname>GtkFileChooserDefaultClass</classname>. This
10192 // widget has several <link linkend="gtk-Bindings">key
10193 // bindings</link> and their associated signals. This section
10194 // describes the available key binding signals.
10195 // </para>
10196 // <example id="gtkfilechooser-key-binding-example">
10197 // <title>GtkFileChooser key binding example</title>
10198 // <para>
10199 // The default keys that activate the key-binding signals in
10200 // <classname>GtkFileChooserDefaultClass</classname> are as
10201 // follows:
10202 // </para>
10203 // <informaltable>
10204 // <tgroup cols="2">
10205 // <tbody>
10206 // <row>
10207 // <entry>Signal name</entry>
10208 // <entry>Default key combinations</entry>
10209 // </row>
10210 // <row>
10211 // <entry>location-popup</entry>
10212 // <entry>
10213 // <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo> (empty path);
10214 // <keycap>/</keycap> (path of "/")
10215 // <footnote>
10216 // Both the individual <keycap>/</keycap> key and the
10217 // numeric keypad's "divide" key are supported.
10218 // </footnote>;
10219 // <keycap>~</keycap> (path of "~")
10220 // </entry>
10221 // </row>
10222 // <row>
10223 // <entry>up-folder</entry>
10224 // <entry>
10225 // <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>;
10226 // <keycombo><keycap>Alt</keycap><keycap>Shift</keycap><keycap>Up</keycap></keycombo>
10227 // <footnote>
10228 // Both the individual Up key and the numeric
10229 // keypad's Up key are supported.
10230 // </footnote>;
10231 // <keycap>Backspace</keycap>
10232 // </entry>
10233 // </row>
10234 // <row>
10235 // <entry>down-folder</entry>
10236 // <entry>
10237 // <keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>;
10238 // <keycombo><keycap>Alt</keycap><keycap>Shift</keycap><keycap>Down</keycap></keycombo>
10239 // <footnote>
10240 // Both the individual Down key and the numeric
10241 // keypad's Down key are supported.
10242 // </footnote>
10243 // </entry>
10244 // </row>
10245 // <row>
10246 // <entry>home-folder</entry>
10247 // <entry><keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo></entry>
10248 // </row>
10249 // <row>
10250 // <entry>desktop-folder</entry>
10251 // <entry><keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo></entry>
10252 // </row>
10253 // <row>
10254 // <entry>quick-bookmark</entry>
10255 // <entry><keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> through <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo></entry>
10256 // </row>
10257 // </tbody>
10258 // </tgroup>
10259 // </informaltable>
10260 // <para>
10261 // You can change these defaults to something else. For
10262 // example, to add a <keycap>Shift</keycap> modifier to a few
10263 // of the default bindings, you can include the following
10264 // fragment in your <filename>.gtkrc-3.0</filename> file:
10265 // </para>
10266 // <programlisting>
10267 // binding "my-own-gtkfilechooser-bindings" {
10268 // bind "&lt;Alt&gt;&lt;Shift&gt;Up" {
10269 // "up-folder" ()
10270 // }
10271 // bind "&lt;Alt&gt;&lt;Shift&gt;Down" {
10272 // "down-folder" ()
10273 // }
10274 // bind "&lt;Alt&gt;&lt;Shift&gt;Home" {
10275 // "home-folder" ()
10276 // }
10277 // }
10278 // class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
10279 // </programlisting>
10280 // </example>
10281 // <refsect3 id="GtkFileChooserDefault-location-popup">
10282 // <title>The &quot;GtkFileChooserDefault::location-popup&quot; signal</title>
10283 // <programlisting>
10284 // void user_function (GtkFileChooserDefault *chooser,
10285 // const char *path,
10286 // <link linkend="gpointer">gpointer</link> user_data);
10287 // </programlisting>
10288 // <para>
10289 // This is used to make the file chooser show a "Location"
10290 // dialog which the user can use to manually type the name of
10291 // the file he wishes to select. The
10292 // <parameter>path</parameter> argument is a string that gets
10293 // put in the text entry for the file name. By default this is bound to
10294 // <keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>
10295 // with a <parameter>path</parameter> string of "" (the empty
10296 // string). It is also bound to <keycap>/</keycap> with a
10297 // <parameter>path</parameter> string of "<literal>/</literal>"
10298 // (a slash): this lets you type <keycap>/</keycap> and
10299 // immediately type a path name. On Unix systems, this is bound to
10300 // <keycap>~</keycap> (tilde) with a <parameter>path</parameter> string
10301 // of "~" itself for access to home directories.
10302 // </para>
10303 // <variablelist role="params">
10304 // <varlistentry>
10305 // <term><parameter>chooser</parameter>&nbsp;:</term>
10306 // <listitem>
10307 // <simpara>
10308 // the object which received the signal.
10309 // </simpara>
10310 // </listitem>
10311 // </varlistentry>
10312 // <varlistentry>
10313 // <term><parameter>path</parameter>&nbsp;:</term>
10314 // <listitem>
10315 // <simpara>
10316 // default contents for the text entry for the file name
10317 // </simpara>
10318 // </listitem>
10319 // </varlistentry>
10320 // <varlistentry>
10321 // <term><parameter>user_data</parameter>&nbsp;:</term>
10322 // <listitem>
10323 // <simpara>
10324 // user data set when the signal handler was connected.
10325 // </simpara>
10326 // </listitem>
10327 // </varlistentry>
10328 // </variablelist>
10329 // <note>
10330 // You can create your own bindings for the
10331 // #GtkFileChooserDefault::location-popup signal with custom
10332 // <parameter>path</parameter> strings, and have a crude form
10333 // of easily-to-type bookmarks. For example, say you access
10334 // the path <filename>/home/username/misc</filename> very
10335 // frequently. You could then create an <keycombo>
10336 // <keycap>Alt</keycap> <keycap>M</keycap> </keycombo>
10337 // shortcut by including the following in your
10338 // <filename>.gtkrc-3.0</filename>:
10339 // <programlisting>
10340 // binding "misc-shortcut" {
10341 // bind "&lt;Alt&gt;M" {
10342 // "location-popup" ("/home/username/misc")
10343 // }
10344 // }
10345 // class "GtkFileChooserDefault" binding "misc-shortcut"
10346 // </programlisting>
10347 // </note>
10348 // </refsect3>
10349 // <refsect3 id="GtkFileChooserDefault-up-folder">
10350 // <title>The &quot;GtkFileChooserDefault::up-folder&quot; signal</title>
10351 // <programlisting>
10352 // void user_function (GtkFileChooserDefault *chooser,
10353 // <link linkend="gpointer">gpointer</link> user_data);
10354 // </programlisting>
10355 // <para>
10356 // This is used to make the file chooser go to the parent of
10357 // the current folder in the file hierarchy. By default this
10358 // is bound to <keycap>Backspace</keycap> and
10359 // <keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>
10360 // (the Up key in the numeric keypad also works).
10361 // </para>
10362 // <variablelist role="params">
10363 // <varlistentry>
10364 // <term><parameter>chooser</parameter>&nbsp;:</term>
10365 // <listitem>
10366 // <simpara>
10367 // the object which received the signal.
10368 // </simpara>
10369 // </listitem>
10370 // </varlistentry>
10371 // <varlistentry>
10372 // <term><parameter>user_data</parameter>&nbsp;:</term>
10373 // <listitem>
10374 // <simpara>
10375 // user data set when the signal handler was connected.
10376 // </simpara>
10377 // </listitem>
10378 // </varlistentry>
10379 // </variablelist>
10380 // </refsect3>
10381 // <refsect3 id="GtkFileChooserDefault-down-folder">
10382 // <title>The &quot;GtkFileChooserDefault::down-folder&quot; signal</title>
10383 // <programlisting>
10384 // void user_function (GtkFileChooserDefault *chooser,
10385 // <link linkend="gpointer">gpointer</link> user_data);
10386 // </programlisting>
10387 // <para>
10388 // This is used to make the file chooser go to a child of the
10389 // current folder in the file hierarchy. The subfolder that
10390 // will be used is displayed in the path bar widget of the file
10391 // chooser. For example, if the path bar is showing
10392 // "/foo/<emphasis>bar/</emphasis>baz", then this will cause
10393 // the file chooser to switch to the "baz" subfolder. By
10394 // default this is bound to
10395 // <keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>
10396 // (the Down key in the numeric keypad also works).
10397 // </para>
10398 // <variablelist role="params">
10399 // <varlistentry>
10400 // <term><parameter>chooser</parameter>&nbsp;:</term>
10401 // <listitem>
10402 // <simpara>
10403 // the object which received the signal.
10404 // </simpara>
10405 // </listitem>
10406 // </varlistentry>
10407 // <varlistentry>
10408 // <term><parameter>user_data</parameter>&nbsp;:</term>
10409 // <listitem>
10410 // <simpara>
10411 // user data set when the signal handler was connected.
10412 // </simpara>
10413 // </listitem>
10414 // </varlistentry>
10415 // </variablelist>
10416 // </refsect3>
10417 // <refsect3 id="GtkFileChooserDefault-home-folder">
10418 // <title>The &quot;GtkFileChooserDefault::home-folder&quot; signal</title>
10419 // <programlisting>
10420 // void user_function (GtkFileChooserDefault *chooser,
10421 // <link linkend="gpointer">gpointer</link> user_data);
10422 // </programlisting>
10423 // <para>
10424 // This is used to make the file chooser show the user's home
10425 // folder in the file list. By default this is bound to
10426 // <keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>
10427 // (the Home key in the numeric keypad also works).
10428 // </para>
10429 // <variablelist role="params">
10430 // <varlistentry>
10431 // <term><parameter>chooser</parameter>&nbsp;:</term>
10432 // <listitem>
10433 // <simpara>
10434 // the object which received the signal.
10435 // </simpara>
10436 // </listitem>
10437 // </varlistentry>
10438 // <varlistentry>
10439 // <term><parameter>user_data</parameter>&nbsp;:</term>
10440 // <listitem>
10441 // <simpara>
10442 // user data set when the signal handler was connected.
10443 // </simpara>
10444 // </listitem>
10445 // </varlistentry>
10446 // </variablelist>
10447 // </refsect3>
10448 // <refsect3 id="GtkFileChooserDefault-desktop-folder">
10449 // <title>The &quot;GtkFileChooserDefault::desktop-folder&quot; signal</title>
10450 // <programlisting>
10451 // void user_function (GtkFileChooserDefault *chooser,
10452 // <link linkend="gpointer">gpointer</link> user_data);
10453 // </programlisting>
10454 // <para>
10455 // This is used to make the file chooser show the user's Desktop
10456 // folder in the file list. By default this is bound to
10457 // <keycombo><keycap>Alt</keycap><keycap>D</keycap></keycombo>.
10458 // </para>
10459 // <variablelist role="params">
10460 // <varlistentry>
10461 // <term><parameter>chooser</parameter>&nbsp;:</term>
10462 // <listitem>
10463 // <simpara>
10464 // the object which received the signal.
10465 // </simpara>
10466 // </listitem>
10467 // </varlistentry>
10468 // <varlistentry>
10469 // <term><parameter>user_data</parameter>&nbsp;:</term>
10470 // <listitem>
10471 // <simpara>
10472 // user data set when the signal handler was connected.
10473 // </simpara>
10474 // </listitem>
10475 // </varlistentry>
10476 // </variablelist>
10477 // </refsect3>
10478 // <refsect3 id="GtkFileChooserDefault-quick-bookmark">
10479 // <title>The &quot;GtkFileChooserDefault::quick-bookmark&quot; signal</title>
10480 // <programlisting>
10481 // void user_function (GtkFileChooserDefault *chooser,
10482 // gint bookmark_index,
10483 // <link linkend="gpointer">gpointer</link> user_data);
10484 // </programlisting>
10485 // <para>
10486 // This is used to make the file chooser switch to the bookmark
10487 // specified in the <parameter>bookmark_index</parameter> parameter.
10488 // For example, if you have three bookmarks, you can pass 0, 1, 2 to
10489 // this signal to switch to each of them, respectively. By default this is bound to
10490 // <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo>,
10491 // <keycombo><keycap>Alt</keycap><keycap>2</keycap></keycombo>,
10492 // etc. until
10493 // <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo>. Note
10494 // that in the default binding,
10495 // that <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo> is
10496 // actually defined to switch to the bookmark at index 0, and so on
10497 // successively;
10498 // <keycombo><keycap>Alt</keycap><keycap>0</keycap></keycombo> is
10499 // defined to switch to the bookmark at index 10.
10500 // </para>
10501 // <variablelist role="params">
10502 // <varlistentry>
10503 // <term><parameter>chooser</parameter>&nbsp;:</term>
10504 // <listitem>
10505 // <simpara>
10506 // the object which received the signal.
10507 // </simpara>
10508 // </listitem>
10509 // </varlistentry>
10510 // <varlistentry>
10511 // <term><parameter>bookmark_indes</parameter>&nbsp;:</term>
10512 // <listitem>
10513 // <simpara>
10514 // index of the bookmark to switch to; the indices start at 0.
10515 // </simpara>
10516 // </listitem>
10517 // </varlistentry>
10518 // <varlistentry>
10519 // <term><parameter>user_data</parameter>&nbsp;:</term>
10520 // <listitem>
10521 // <simpara>
10522 // user data set when the signal handler was connected.
10523 // </simpara>
10524 // </listitem>
10525 // </varlistentry>
10526 // </variablelist>
10527 // </refsect3>
10528 // </refsect2>
10529 struct FileChooser /* Interface */ {
10530 mixin template __interface__() {
10531 // VERSION: 2.4
10532 // Adds @filter to the list of filters that the user can select between.
10533 // When a filter is selected, only files that are passed by that
10534 // filter are displayed.
10535 // Note that the @chooser takes ownership of the filter, so you have to
10536 // ref and sink it if you want to keep a reference.
10537 // <filter>: a #GtkFileFilter
10538 void add_filter()(FileFilter* filter) {
10539 gtk_file_chooser_add_filter(cast(FileChooser*)&this, filter);
10542 // VERSION: 2.4
10543 // Adds a folder to be displayed with the shortcut folders in a file chooser.
10544 // Note that shortcut folders do not get saved, as they are provided by the
10545 // application. For example, you can use this to add a
10546 // "/usr/share/mydrawprogram/Clipart" folder to the volume list.
10547 // otherwise. In the latter case, the @error will be set as appropriate.
10548 // RETURNS: %TRUE if the folder could be added successfully, %FALSE
10549 // <folder>: filename of the folder to add
10550 int add_shortcut_folder()(char* folder, GLib2.Error** error=null) {
10551 return gtk_file_chooser_add_shortcut_folder(cast(FileChooser*)&this, folder, error);
10554 // VERSION: 2.4
10555 // Adds a folder URI to be displayed with the shortcut folders in a file
10556 // chooser. Note that shortcut folders do not get saved, as they are provided
10557 // by the application. For example, you can use this to add a
10558 // "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.
10559 // otherwise. In the latter case, the @error will be set as appropriate.
10560 // RETURNS: %TRUE if the folder could be added successfully, %FALSE
10561 // <uri>: URI of the folder to add
10562 int add_shortcut_folder_uri()(char* uri, GLib2.Error** error=null) {
10563 return gtk_file_chooser_add_shortcut_folder_uri(cast(FileChooser*)&this, uri, error);
10566 // VERSION: 2.4
10567 // Gets the type of operation that the file chooser is performing; see
10568 // gtk_file_chooser_set_action().
10569 // RETURNS: the action that the file selector is performing
10570 FileChooserAction get_action()() {
10571 return gtk_file_chooser_get_action(cast(FileChooser*)&this);
10574 // VERSION: 2.18
10575 // Gets whether file choser will offer to create new folders.
10576 // See gtk_file_chooser_set_create_folders().
10577 // RETURNS: %TRUE if the New Folder button should be displayed.
10578 int get_create_folders()() {
10579 return gtk_file_chooser_get_create_folders(cast(FileChooser*)&this);
10582 // VERSION: 2.4
10583 // Gets the current folder of @chooser as a local filename.
10584 // See gtk_file_chooser_set_current_folder().
10585 // Note that this is the folder that the file chooser is currently displaying
10586 // (e.g. "/home/username/Documents"), which is <emphasis>not the same</emphasis>
10587 // as the currently-selected folder if the chooser is in
10588 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode
10589 // (e.g. "/home/username/Documents/selected-folder/". To get the
10590 // currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
10591 // usual way to get the selection.
10592 // or %NULL if the current path cannot be represented as a local
10593 // filename. Free with g_free(). This function will also return
10594 // %NULL if the file chooser was unable to load the last folder that
10595 // was requested from it; for example, as would be for calling
10596 // gtk_file_chooser_set_current_folder() on a nonexistent folder.
10597 // RETURNS: the full path of the current folder,
10598 char* /*new*/ get_current_folder()() {
10599 return gtk_file_chooser_get_current_folder(cast(FileChooser*)&this);
10602 // VERSION: 2.14
10603 // Gets the current folder of @chooser as #GFile.
10604 // See gtk_file_chooser_get_current_folder_uri().
10605 // RETURNS: the #GFile for the current folder.
10606 Gio2.File* /*new*/ get_current_folder_file()() {
10607 return gtk_file_chooser_get_current_folder_file(cast(FileChooser*)&this);
10610 // VERSION: 2.4
10611 // Gets the current folder of @chooser as an URI.
10612 // See gtk_file_chooser_set_current_folder_uri().
10613 // Note that this is the folder that the file chooser is currently displaying
10614 // (e.g. "file:///home/username/Documents"), which is <emphasis>not the same</emphasis>
10615 // as the currently-selected folder if the chooser is in
10616 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode
10617 // (e.g. "file:///home/username/Documents/selected-folder/". To get the
10618 // currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the
10619 // usual way to get the selection.
10620 // function will also return %NULL if the file chooser was unable to load the
10621 // last folder that was requested from it; for example, as would be for calling
10622 // gtk_file_chooser_set_current_folder_uri() on a nonexistent folder.
10623 // RETURNS: the URI for the current folder. Free with g_free(). This
10624 char* /*new*/ get_current_folder_uri()() {
10625 return gtk_file_chooser_get_current_folder_uri(cast(FileChooser*)&this);
10628 // VERSION: 2.8
10629 // Queries whether a file chooser is set to confirm for overwriting when the user
10630 // types a file name that already exists.
10631 // %FALSE otherwise.
10632 // RETURNS: %TRUE if the file chooser will present a confirmation dialog;
10633 int get_do_overwrite_confirmation()() {
10634 return gtk_file_chooser_get_do_overwrite_confirmation(cast(FileChooser*)&this);
10637 // VERSION: 2.4
10638 // Gets the current preview widget; see
10639 // gtk_file_chooser_set_extra_widget().
10640 // RETURNS: the current extra widget, or %NULL
10641 Widget* get_extra_widget()() {
10642 return gtk_file_chooser_get_extra_widget(cast(FileChooser*)&this);
10645 // VERSION: 2.14
10646 // Gets the #GFile for the currently selected file in
10647 // the file selector. If multiple files are selected,
10648 // one of the files will be returned at random.
10649 // If the file chooser is in folder mode, this function returns the selected
10650 // folder.
10651 // use g_object_unref() to release it.
10652 // RETURNS: a selected #GFile. You own the returned file;
10653 Gio2.File* /*new*/ get_file()() {
10654 return gtk_file_chooser_get_file(cast(FileChooser*)&this);
10657 // VERSION: 2.4
10658 // Gets the filename for the currently selected file in
10659 // the file selector. If multiple files are selected,
10660 // one of the filenames will be returned at random.
10661 // If the file chooser is in folder mode, this function returns the selected
10662 // folder.
10663 // if no file is selected, or the selected file can't
10664 // be represented with a local filename. Free with g_free().
10665 // RETURNS: The currently selected filename, or %NULL
10666 char* /*new*/ get_filename()() {
10667 return gtk_file_chooser_get_filename(cast(FileChooser*)&this);
10670 // VERSION: 2.4
10671 // Lists all the selected files and subfolders in the current folder of
10672 // folder cannot be represented as local filenames they will be ignored. (See
10673 // gtk_file_chooser_get_uris())
10674 // containing the filenames of all selected files and subfolders in
10675 // the current folder. Free the returned list with g_slist_free(),
10676 // and the filenames with g_free().
10677 // RETURNS: a #GSList
10678 GLib2.SList* /*new*/ get_filenames()() {
10679 return gtk_file_chooser_get_filenames(cast(FileChooser*)&this);
10682 // VERSION: 2.14
10683 // Lists all the selected files and subfolders in the current folder of @chooser
10684 // as #GFile. An internal function, see gtk_file_chooser_get_uris().
10685 // containing a #GFile for each selected file and subfolder in the
10686 // current folder. Free the returned list with g_slist_free(), and
10687 // the files with g_object_unref().
10688 // RETURNS: a #GSList
10689 GLib2.SList* /*new*/ get_files()() {
10690 return gtk_file_chooser_get_files(cast(FileChooser*)&this);
10693 // VERSION: 2.4
10694 // Gets the current filter; see gtk_file_chooser_set_filter().
10695 // RETURNS: the current filter, or %NULL
10696 FileFilter* get_filter()() {
10697 return gtk_file_chooser_get_filter(cast(FileChooser*)&this);
10700 // VERSION: 2.4
10701 // Gets whether only local files can be selected in the
10702 // file selector. See gtk_file_chooser_set_local_only()
10703 // RETURNS: %TRUE if only local files can be selected.
10704 int get_local_only()() {
10705 return gtk_file_chooser_get_local_only(cast(FileChooser*)&this);
10708 // VERSION: 2.14
10709 // Gets the #GFile that should be previewed in a custom preview
10710 // Internal function, see gtk_file_chooser_get_preview_uri().
10711 // or %NULL if no file is selected. Free with g_object_unref().
10712 // RETURNS: the #GFile for the file to preview,
10713 Gio2.File* /*new*/ get_preview_file()() {
10714 return gtk_file_chooser_get_preview_file(cast(FileChooser*)&this);
10717 // VERSION: 2.4
10718 // Gets the filename that should be previewed in a custom preview
10719 // widget. See gtk_file_chooser_set_preview_widget().
10720 // no file is selected, or if the selected file cannot be represented
10721 // as a local filename. Free with g_free()
10722 // RETURNS: the filename to preview, or %NULL if
10723 char* /*new*/ get_preview_filename()() {
10724 return gtk_file_chooser_get_preview_filename(cast(FileChooser*)&this);
10727 // VERSION: 2.4
10728 // Gets the URI that should be previewed in a custom preview
10729 // widget. See gtk_file_chooser_set_preview_widget().
10730 // selected. Free with g_free().
10731 // RETURNS: the URI for the file to preview, or %NULL if no file is
10732 char* /*new*/ get_preview_uri()() {
10733 return gtk_file_chooser_get_preview_uri(cast(FileChooser*)&this);
10736 // VERSION: 2.4
10737 // Gets the current preview widget; see
10738 // gtk_file_chooser_set_preview_widget().
10739 // RETURNS: the current preview widget, or %NULL
10740 Widget* get_preview_widget()() {
10741 return gtk_file_chooser_get_preview_widget(cast(FileChooser*)&this);
10744 // VERSION: 2.4
10745 // Gets whether the preview widget set by gtk_file_chooser_set_preview_widget()
10746 // should be shown for the current filename. See
10747 // gtk_file_chooser_set_preview_widget_active().
10748 // RETURNS: %TRUE if the preview widget is active for the current filename.
10749 int get_preview_widget_active()() {
10750 return gtk_file_chooser_get_preview_widget_active(cast(FileChooser*)&this);
10753 // VERSION: 2.4
10754 // Gets whether multiple files can be selected in the file
10755 // selector. See gtk_file_chooser_set_select_multiple().
10756 // RETURNS: %TRUE if multiple files can be selected.
10757 int get_select_multiple()() {
10758 return gtk_file_chooser_get_select_multiple(cast(FileChooser*)&this);
10761 // VERSION: 2.6
10762 // Gets whether hidden files and folders are displayed in the file selector.
10763 // See gtk_file_chooser_set_show_hidden().
10764 // RETURNS: %TRUE if hidden files and folders are displayed.
10765 int get_show_hidden()() {
10766 return gtk_file_chooser_get_show_hidden(cast(FileChooser*)&this);
10769 // VERSION: 2.4
10770 // Gets the URI for the currently selected file in
10771 // the file selector. If multiple files are selected,
10772 // one of the filenames will be returned at random.
10773 // If the file chooser is in folder mode, this function returns the selected
10774 // folder.
10775 // if no file is selected. Free with g_free()
10776 // RETURNS: The currently selected URI, or %NULL
10777 char* /*new*/ get_uri()() {
10778 return gtk_file_chooser_get_uri(cast(FileChooser*)&this);
10781 // VERSION: 2.4
10782 // Lists all the selected files and subfolders in the current folder of
10783 // files and subfolders in the current folder. Free the returned list
10784 // with g_slist_free(), and the filenames with g_free().
10785 // RETURNS: a #GSList containing the URIs of all selected
10786 GLib2.SList* /*new*/ get_uris()() {
10787 return gtk_file_chooser_get_uris(cast(FileChooser*)&this);
10790 // Gets whether a stock label should be drawn with the name of the previewed
10791 // file. See gtk_file_chooser_set_use_preview_label().
10792 // name of the previewed file, %FALSE otherwise.
10793 // RETURNS: %TRUE if the file chooser is set to display a label with the
10794 int get_use_preview_label()() {
10795 return gtk_file_chooser_get_use_preview_label(cast(FileChooser*)&this);
10798 // VERSION: 2.4
10799 // Lists the current set of user-selectable filters; see
10800 // gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().
10801 // #GSList containing the current set of user selectable filters. The
10802 // contents of the list are owned by GTK+, but you must free the list
10803 // itself with g_slist_free() when you are done with it.
10804 // RETURNS: a
10805 GLib2.SList* /*new container*/ list_filters()() {
10806 return gtk_file_chooser_list_filters(cast(FileChooser*)&this);
10809 // VERSION: 2.4
10810 // Queries the list of shortcut folders in the file chooser, as set by
10811 // gtk_file_chooser_add_shortcut_folder_uri().
10812 // URIs, or %NULL if there are no shortcut folders. Free the returned
10813 // list with g_slist_free(), and the URIs with g_free().
10814 // RETURNS: A list of folder
10815 GLib2.SList* /*new*/ list_shortcut_folder_uris()() {
10816 return gtk_file_chooser_list_shortcut_folder_uris(cast(FileChooser*)&this);
10819 // VERSION: 2.4
10820 // Queries the list of shortcut folders in the file chooser, as set by
10821 // gtk_file_chooser_add_shortcut_folder().
10822 // folder filenames, or %NULL if there are no shortcut folders. Free
10823 // the returned list with g_slist_free(), and the filenames with
10824 // g_free().
10825 // RETURNS: A list of
10826 GLib2.SList* /*new*/ list_shortcut_folders()() {
10827 return gtk_file_chooser_list_shortcut_folders(cast(FileChooser*)&this);
10830 // VERSION: 2.4
10831 // Removes @filter from the list of filters that the user can select between.
10832 // <filter>: a #GtkFileFilter
10833 void remove_filter()(FileFilter* filter) {
10834 gtk_file_chooser_remove_filter(cast(FileChooser*)&this, filter);
10837 // VERSION: 2.4
10838 // Removes a folder from a file chooser's list of shortcut folders.
10839 // In the latter case, the @error will be set as appropriate.
10840 // RETURNS: %TRUE if the operation succeeds, %FALSE otherwise.
10841 // <folder>: filename of the folder to remove
10842 int remove_shortcut_folder()(char* folder, GLib2.Error** error=null) {
10843 return gtk_file_chooser_remove_shortcut_folder(cast(FileChooser*)&this, folder, error);
10846 // VERSION: 2.4
10847 // Removes a folder URI from a file chooser's list of shortcut folders.
10848 // In the latter case, the @error will be set as appropriate.
10849 // RETURNS: %TRUE if the operation succeeds, %FALSE otherwise.
10850 // <uri>: URI of the folder to remove
10851 int remove_shortcut_folder_uri()(char* uri, GLib2.Error** error=null) {
10852 return gtk_file_chooser_remove_shortcut_folder_uri(cast(FileChooser*)&this, uri, error);
10855 // VERSION: 2.4
10856 // Selects all the files in the current folder of a file chooser.
10857 void select_all()() {
10858 gtk_file_chooser_select_all(cast(FileChooser*)&this);
10861 // VERSION: 2.14
10862 // Selects the file referred to by @file. An internal function. See
10863 // _gtk_file_chooser_select_uri().
10864 // selected successfully, %FALSE otherwise.
10865 // RETURNS: %TRUE if both the folder could be changed and the path was
10866 // <file>: the file to select
10867 int select_file()(Gio2.File* file, GLib2.Error** error=null) {
10868 return gtk_file_chooser_select_file(cast(FileChooser*)&this, file, error);
10871 // VERSION: 2.4
10872 // Selects a filename. If the file name isn't in the current
10873 // folder of @chooser, then the current folder of @chooser will
10874 // be changed to the folder containing @filename.
10875 // selected successfully, %FALSE otherwise.
10876 // RETURNS: %TRUE if both the folder could be changed and the file was
10877 // <filename>: the filename to select
10878 int select_filename()(char* filename) {
10879 return gtk_file_chooser_select_filename(cast(FileChooser*)&this, filename);
10882 // VERSION: 2.4
10883 // Selects the file to by @uri. If the URI doesn't refer to a
10884 // file in the current folder of @chooser, then the current folder of
10885 // selected successfully, %FALSE otherwise.
10886 // RETURNS: %TRUE if both the folder could be changed and the URI was
10887 // <uri>: the URI to select
10888 int select_uri()(char* uri) {
10889 return gtk_file_chooser_select_uri(cast(FileChooser*)&this, uri);
10892 // VERSION: 2.4
10893 // Sets the type of operation that the chooser is performing; the
10894 // user interface is adapted to suit the selected action. For example,
10895 // an option to create a new folder might be shown if the action is
10896 // %GTK_FILE_CHOOSER_ACTION_SAVE but not if the action is
10897 // %GTK_FILE_CHOOSER_ACTION_OPEN.
10898 // <action>: the action that the file selector is performing
10899 void set_action()(FileChooserAction action) {
10900 gtk_file_chooser_set_action(cast(FileChooser*)&this, action);
10903 // VERSION: 2.18
10904 // Sets whether file choser will offer to create new folders.
10905 // This is only relevant if the action is not set to be
10906 // %GTK_FILE_CHOOSER_ACTION_OPEN.
10907 // <create_folders>: %TRUE if the New Folder button should be displayed
10908 void set_create_folders()(int create_folders) {
10909 gtk_file_chooser_set_create_folders(cast(FileChooser*)&this, create_folders);
10912 // VERSION: 2.4
10913 // Sets the current folder for @chooser from a local filename.
10914 // The user will be shown the full contents of the current folder,
10915 // plus user interface elements for navigating to other folders.
10916 // otherwise.
10917 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
10918 // <filename>: the full path of the new current folder
10919 int set_current_folder()(char* filename) {
10920 return gtk_file_chooser_set_current_folder(cast(FileChooser*)&this, filename);
10923 // VERSION: 2.14
10924 // Sets the current folder for @chooser from a #GFile.
10925 // Internal function, see gtk_file_chooser_set_current_folder_uri().
10926 // otherwise.
10927 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
10928 // <file>: the #GFile for the new folder
10929 int set_current_folder_file()(Gio2.File* file, GLib2.Error** error=null) {
10930 return gtk_file_chooser_set_current_folder_file(cast(FileChooser*)&this, file, error);
10933 // VERSION: 2.4
10934 // Sets the current folder for @chooser from an URI.
10935 // The user will be shown the full contents of the current folder,
10936 // plus user interface elements for navigating to other folders.
10937 // otherwise.
10938 // RETURNS: %TRUE if the folder could be changed successfully, %FALSE
10939 // <uri>: the URI for the new current folder
10940 int set_current_folder_uri()(char* uri) {
10941 return gtk_file_chooser_set_current_folder_uri(cast(FileChooser*)&this, uri);
10944 // VERSION: 2.4
10945 // Sets the current name in the file selector, as if entered
10946 // by the user. Note that the name passed in here is a UTF-8
10947 // string rather than a filename. This function is meant for
10948 // such uses as a suggested name in a "Save As..." dialog.
10949 // If you want to preselect a particular existing file, you should use
10950 // gtk_file_chooser_set_filename() or gtk_file_chooser_set_uri() instead.
10951 // Please see the documentation for those functions for an example of using
10952 // gtk_file_chooser_set_current_name() as well.
10953 // <name>: the filename to use, as a UTF-8 string
10954 void set_current_name()(char* name) {
10955 gtk_file_chooser_set_current_name(cast(FileChooser*)&this, name);
10958 // VERSION: 2.8
10959 // Sets whether a file chooser in %GTK_FILE_CHOOSER_ACTION_SAVE mode will present
10960 // a confirmation dialog if the user types a file name that already exists. This
10961 // is %FALSE by default.
10962 // Regardless of this setting, the @chooser will emit the
10963 // #GtkFileChooser::confirm-overwrite signal when appropriate.
10964 // If all you need is the stock confirmation dialog, set this property to %TRUE.
10965 // You can override the way confirmation is done by actually handling the
10966 // #GtkFileChooser::confirm-overwrite signal; please refer to its documentation
10967 // for the details.
10968 // <do_overwrite_confirmation>: whether to confirm overwriting in save mode
10969 void set_do_overwrite_confirmation()(int do_overwrite_confirmation) {
10970 gtk_file_chooser_set_do_overwrite_confirmation(cast(FileChooser*)&this, do_overwrite_confirmation);
10973 // VERSION: 2.4
10974 // Sets an application-supplied widget to provide extra options to the user.
10975 // <extra_widget>: widget for extra options
10976 void set_extra_widget()(Widget* extra_widget) {
10977 gtk_file_chooser_set_extra_widget(cast(FileChooser*)&this, extra_widget);
10980 // VERSION: 2.14
10981 // Sets @file as the current filename for the file chooser, by changing
10982 // to the file's parent folder and actually selecting the file in list. If
10983 // the @chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name
10984 // will also appear in the dialog's file name entry.
10985 // If the file name isn't in the current folder of @chooser, then the current
10986 // folder of @chooser will be changed to the folder containing @filename. This
10987 // is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by
10988 // gtk_file_chooser_select_filename().
10989 // Note that the file must exist, or nothing will be done except
10990 // for the directory change.
10991 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
10992 // you should use this function if you already have a file name to which the
10993 // user may save; for example, when the user opens an existing file and then
10994 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
10995 // a file name already &mdash; for example, if the user just created a new
10996 // file and is saving it for the first time, do not call this function.
10997 // Instead, use something similar to this:
10998 // |[
10999 // if (document_is_new)
11000 // {
11001 // /&ast; the user just created a new document &ast;/
11002 // gtk_file_chooser_set_current_folder_file (chooser, default_file_for_saving);
11003 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
11004 // }
11005 // else
11006 // {
11007 // /&ast; the user edited an existing document &ast;/
11008 // gtk_file_chooser_set_file (chooser, existing_file);
11009 // }
11010 // ]|
11011 // selected successfully, %FALSE otherwise.
11012 // RETURNS: %TRUE if both the folder could be changed and the file was
11013 // <file>: the #GFile to set as current
11014 int set_file()(Gio2.File* file, GLib2.Error** error=null) {
11015 return gtk_file_chooser_set_file(cast(FileChooser*)&this, file, error);
11018 // VERSION: 2.4
11019 // Sets @filename as the current filename for the file chooser, by changing
11020 // to the file's parent folder and actually selecting the file in list. If
11021 // the @chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name
11022 // will also appear in the dialog's file name entry.
11023 // If the file name isn't in the current folder of @chooser, then the current
11024 // folder of @chooser will be changed to the folder containing @filename. This
11025 // is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by
11026 // gtk_file_chooser_select_filename().
11027 // Note that the file must exist, or nothing will be done except
11028 // for the directory change.
11029 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
11030 // you should use this function if you already have a file name to which the
11031 // user may save; for example, when the user opens an existing file and then
11032 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
11033 // a file name already &mdash; for example, if the user just created a new
11034 // file and is saving it for the first time, do not call this function.
11035 // Instead, use something similar to this:
11036 // |[
11037 // if (document_is_new)
11038 // {
11039 // /&ast; the user just created a new document &ast;/
11040 // gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving);
11041 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
11042 // }
11043 // else
11044 // {
11045 // /&ast; the user edited an existing document &ast;/
11046 // gtk_file_chooser_set_filename (chooser, existing_filename);
11047 // }
11048 // ]|
11049 // selected successfully, %FALSE otherwise.
11050 // RETURNS: %TRUE if both the folder could be changed and the file was
11051 // <filename>: the filename to set as current
11052 int set_filename()(char* filename) {
11053 return gtk_file_chooser_set_filename(cast(FileChooser*)&this, filename);
11056 // VERSION: 2.4
11057 // Sets the current filter; only the files that pass the
11058 // filter will be displayed. If the user-selectable list of filters
11059 // is non-empty, then the filter should be one of the filters
11060 // in that list. Setting the current filter when the list of
11061 // filters is empty is useful if you want to restrict the displayed
11062 // set of files without letting the user change it.
11063 // <filter>: a #GtkFileFilter
11064 void set_filter()(FileFilter* filter) {
11065 gtk_file_chooser_set_filter(cast(FileChooser*)&this, filter);
11068 // VERSION: 2.4
11069 // Sets whether only local files can be selected in the
11070 // file selector. If @local_only is %TRUE (the default),
11071 // then the selected file are files are guaranteed to be
11072 // accessible through the operating systems native file
11073 // file system and therefore the application only
11074 // needs to worry about the filename functions in
11075 // #GtkFileChooser, like gtk_file_chooser_get_filename(),
11076 // rather than the URI functions like
11077 // gtk_file_chooser_get_uri(),
11078 // <local_only>: %TRUE if only local files can be selected
11079 void set_local_only()(int local_only) {
11080 gtk_file_chooser_set_local_only(cast(FileChooser*)&this, local_only);
11083 // VERSION: 2.4
11084 // Sets an application-supplied widget to use to display a custom preview
11085 // of the currently selected file. To implement a preview, after setting the
11086 // preview widget, you connect to the #GtkFileChooser::update-preview
11087 // signal, and call gtk_file_chooser_get_preview_filename() or
11088 // gtk_file_chooser_get_preview_uri() on each change. If you can
11089 // display a preview of the new file, update your widget and
11090 // set the preview active using gtk_file_chooser_set_preview_widget_active().
11091 // Otherwise, set the preview inactive.
11092 // When there is no application-supplied preview widget, or the
11093 // application-supplied preview widget is not active, the file chooser
11094 // may display an internally generated preview of the current file or
11095 // it may display no preview at all.
11096 // <preview_widget>: widget for displaying preview.
11097 void set_preview_widget()(Widget* preview_widget) {
11098 gtk_file_chooser_set_preview_widget(cast(FileChooser*)&this, preview_widget);
11101 // VERSION: 2.4
11102 // Sets whether the preview widget set by
11103 // gtk_file_chooser_set_preview_widget() should be shown for the
11104 // current filename. When @active is set to false, the file chooser
11105 // may display an internally generated preview of the current file
11106 // or it may display no preview at all. See
11107 // gtk_file_chooser_set_preview_widget() for more details.
11108 // <active>: whether to display the user-specified preview widget
11109 void set_preview_widget_active()(int active) {
11110 gtk_file_chooser_set_preview_widget_active(cast(FileChooser*)&this, active);
11113 // VERSION: 2.4
11114 // Sets whether multiple files can be selected in the file selector. This is
11115 // only relevant if the action is set to be %GTK_FILE_CHOOSER_ACTION_OPEN or
11116 // %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
11117 // <select_multiple>: %TRUE if multiple files can be selected.
11118 void set_select_multiple()(int select_multiple) {
11119 gtk_file_chooser_set_select_multiple(cast(FileChooser*)&this, select_multiple);
11122 // VERSION: 2.6
11123 // Sets whether hidden files and folders are displayed in the file selector.
11124 // <show_hidden>: %TRUE if hidden files and folders should be displayed.
11125 void set_show_hidden()(int show_hidden) {
11126 gtk_file_chooser_set_show_hidden(cast(FileChooser*)&this, show_hidden);
11129 // VERSION: 2.4
11130 // Sets the file referred to by @uri as the current file for the file chooser,
11131 // by changing to the URI's parent folder and actually selecting the URI in the
11132 // list. If the @chooser is %GTK_FILE_CHOOSER_ACTION_SAVE mode, the URI's base
11133 // name will also appear in the dialog's file name entry.
11134 // If the URI isn't in the current folder of @chooser, then the current folder
11135 // of @chooser will be changed to the folder containing @uri. This is equivalent
11136 // to a sequence of gtk_file_chooser_unselect_all() followed by
11137 // gtk_file_chooser_select_uri().
11138 // Note that the URI must exist, or nothing will be done except for the
11139 // directory change.
11140 // If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog,
11141 // you should use this function if you already have a file name to which the
11142 // user may save; for example, when the user opens an existing file and then
11143 // does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have
11144 // a file name already &mdash; for example, if the user just created a new
11145 // file and is saving it for the first time, do not call this function.
11146 // Instead, use something similar to this:
11147 // |[
11148 // if (document_is_new)
11149 // {
11150 // /&ast; the user just created a new document &ast;/
11151 // gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving);
11152 // gtk_file_chooser_set_current_name (chooser, "Untitled document");
11153 // }
11154 // else
11155 // {
11156 // /&ast; the user edited an existing document &ast;/
11157 // gtk_file_chooser_set_uri (chooser, existing_uri);
11158 // }
11159 // ]|
11160 // selected successfully, %FALSE otherwise.
11161 // RETURNS: %TRUE if both the folder could be changed and the URI was
11162 // <uri>: the URI to set as current
11163 int set_uri()(char* uri) {
11164 return gtk_file_chooser_set_uri(cast(FileChooser*)&this, uri);
11167 // VERSION: 2.4
11168 // Sets whether the file chooser should display a stock label with the name of
11169 // the file that is being previewed; the default is %TRUE. Applications that
11170 // want to draw the whole preview area themselves should set this to %FALSE and
11171 // display the name themselves in their preview widget.
11172 // <use_label>: whether to display a stock label with the name of the previewed file
11173 void set_use_preview_label()(int use_label) {
11174 gtk_file_chooser_set_use_preview_label(cast(FileChooser*)&this, use_label);
11177 // VERSION: 2.4
11178 // Unselects all the files in the current folder of a file chooser.
11179 void unselect_all()() {
11180 gtk_file_chooser_unselect_all(cast(FileChooser*)&this);
11183 // VERSION: 2.14
11184 // Unselects the file referred to by @file. If the file is not in the current
11185 // directory, does not exist, or is otherwise not currently selected, does nothing.
11186 // <file>: a #GFile
11187 void unselect_file()(Gio2.File* file) {
11188 gtk_file_chooser_unselect_file(cast(FileChooser*)&this, file);
11191 // VERSION: 2.4
11192 // Unselects a currently selected filename. If the filename
11193 // is not in the current directory, does not exist, or
11194 // is otherwise not currently selected, does nothing.
11195 // <filename>: the filename to unselect
11196 void unselect_filename()(char* filename) {
11197 gtk_file_chooser_unselect_filename(cast(FileChooser*)&this, filename);
11200 // VERSION: 2.4
11201 // Unselects the file referred to by @uri. If the file
11202 // is not in the current directory, does not exist, or
11203 // is otherwise not currently selected, does nothing.
11204 // <uri>: the URI to unselect
11205 void unselect_uri()(char* uri) {
11206 gtk_file_chooser_unselect_uri(cast(FileChooser*)&this, uri);
11209 // VERSION: 2.8
11210 // This signal gets emitted whenever it is appropriate to present a
11211 // confirmation dialog when the user has selected a file name that
11212 // already exists. The signal only gets emitted when the file
11213 // chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode.
11214 // Most applications just need to turn on the
11215 // #GtkFileChooser:do-overwrite-confirmation property (or call the
11216 // gtk_file_chooser_set_do_overwrite_confirmation() function), and
11217 // they will automatically get a stock confirmation dialog.
11218 // Applications which need to customize this behavior should do
11219 // that, and also connect to the #GtkFileChooser::confirm-overwrite
11220 // signal.
11221 // A signal handler for this signal must return a
11222 // #GtkFileChooserConfirmation value, which indicates the action to
11223 // take. If the handler determines that the user wants to select a
11224 // different filename, it should return
11225 // %GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN. If it determines
11226 // that the user is satisfied with his choice of file name, it
11227 // should return %GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME.
11228 // On the other hand, if it determines that the stock confirmation
11229 // dialog should be used, it should return
11230 // %GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM. The following example
11231 // illustrates this.
11232 // <example id="gtkfilechooser-confirmation">
11233 // <title>Custom confirmation</title>
11234 // <programlisting>
11235 // static GtkFileChooserConfirmation
11236 // confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
11237 // {
11238 // char *uri;
11239 // uri = gtk_file_chooser_get_uri (chooser);
11240 // if (is_uri_read_only (uri))
11241 // {
11242 // if (user_wants_to_replace_read_only_file (uri))
11243 // return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME;
11244 // else
11245 // return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN;
11246 // } else
11247 // return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; // fall back to the default dialog
11248 // }
11249 // ...
11250 // chooser = gtk_file_chooser_dialog_new (...);
11251 // gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
11252 // g_signal_connect (chooser, "confirm-overwrite",
11253 // G_CALLBACK (confirm_overwrite_callback), NULL);
11254 // if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT)
11255 // save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
11256 // gtk_widget_destroy (chooser);
11257 // </programlisting>
11258 // </example>
11259 // action to take after emitting the signal.
11260 // RETURNS: a #GtkFileChooserConfirmation value that indicates which
11261 extern (C) alias static FileChooserConfirmation* function (FileChooser* this_, void* user_data=null) signal_confirm_overwrite;
11263 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11264 return super_.signal_connect!name(cb, data, cf);
11267 ulong signal_connect(string name:"confirm-overwrite", CB:signal_confirm_overwrite)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11268 return signal_connect_data!()(&this, cast(char*)"confirm-overwrite",
11269 cast(GObject2.Callback)cb, data, null, cf);
11272 // This signal is emitted when the current folder in a #GtkFileChooser
11273 // changes. This can happen due to the user performing some action that
11274 // changes folders, such as selecting a bookmark or visiting a folder on the
11275 // file list. It can also happen as a result of calling a function to
11276 // explicitly change the current folder in a file chooser.
11277 // Normally you do not need to connect to this signal, unless you need to keep
11278 // track of which folder a file chooser is showing.
11279 // gtk_file_chooser_get_current_folder(),
11280 // gtk_file_chooser_set_current_folder_uri(),
11281 // gtk_file_chooser_get_current_folder_uri().
11282 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_current_folder_changed;
11283 ulong signal_connect(string name:"current-folder-changed", CB:signal_current_folder_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11284 return signal_connect_data!()(&this, cast(char*)"current-folder-changed",
11285 cast(GObject2.Callback)cb, data, null, cf);
11288 // This signal is emitted when the user "activates" a file in the file
11289 // chooser. This can happen by double-clicking on a file in the file list, or
11290 // by pressing <keycap>Enter</keycap>.
11291 // Normally you do not need to connect to this signal. It is used internally
11292 // by #GtkFileChooserDialog to know when to activate the default button in the
11293 // dialog.
11294 // gtk_file_chooser_get_filenames(), gtk_file_chooser_get_uri(),
11295 // gtk_file_chooser_get_uris().
11296 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_file_activated;
11297 ulong signal_connect(string name:"file-activated", CB:signal_file_activated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11298 return signal_connect_data!()(&this, cast(char*)"file-activated",
11299 cast(GObject2.Callback)cb, data, null, cf);
11302 // This signal is emitted when there is a change in the set of selected files
11303 // in a #GtkFileChooser. This can happen when the user modifies the selection
11304 // with the mouse or the keyboard, or when explicitly calling functions to
11305 // change the selection.
11306 // Normally you do not need to connect to this signal, as it is easier to wait
11307 // for the file chooser to finish running, and then to get the list of
11308 // selected files using the functions mentioned below.
11309 // gtk_file_chooser_unselect_filename(), gtk_file_chooser_get_filename(),
11310 // gtk_file_chooser_get_filenames(), gtk_file_chooser_select_uri(),
11311 // gtk_file_chooser_unselect_uri(), gtk_file_chooser_get_uri(),
11312 // gtk_file_chooser_get_uris().
11313 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_selection_changed;
11314 ulong signal_connect(string name:"selection-changed", CB:signal_selection_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11315 return signal_connect_data!()(&this, cast(char*)"selection-changed",
11316 cast(GObject2.Callback)cb, data, null, cf);
11319 // This signal is emitted when the preview in a file chooser should be
11320 // regenerated. For example, this can happen when the currently selected file
11321 // changes. You should use this signal if you want your file chooser to have
11322 // a preview widget.
11323 // Once you have installed a preview widget with
11324 // gtk_file_chooser_set_preview_widget(), you should update it when this
11325 // signal is emitted. You can use the functions
11326 // gtk_file_chooser_get_preview_filename() or
11327 // gtk_file_chooser_get_preview_uri() to get the name of the file to preview.
11328 // Your widget may not be able to preview all kinds of files; your callback
11329 // must call gtk_file_chooser_set_preview_widget_active() to inform the file
11330 // chooser about whether the preview was generated successfully or not.
11331 // Please see the example code in <xref linkend="gtkfilechooser-preview"/>.
11332 // gtk_file_chooser_set_preview_widget_active(),
11333 // gtk_file_chooser_set_use_preview_label(),
11334 // gtk_file_chooser_get_preview_filename(),
11335 // gtk_file_chooser_get_preview_uri().
11336 extern (C) alias static void function (FileChooser* this_, void* user_data=null) signal_update_preview;
11337 ulong signal_connect(string name:"update-preview", CB:signal_update_preview)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11338 return signal_connect_data!()(&this, cast(char*)"update-preview",
11339 cast(GObject2.Callback)cb, data, null, cf);
11342 mixin __interface__;
11346 // Describes whether a #GtkFileChooser is being used to open existing files
11347 // or to save to a possibly new file.
11348 enum FileChooserAction {
11349 OPEN = 0,
11350 SAVE = 1,
11351 SELECT_FOLDER = 2,
11352 CREATE_FOLDER = 3
11354 struct FileChooserButton /* : HBox */ {
11355 mixin Atk.ImplementorIface.__interface__;
11356 mixin Buildable.__interface__;
11357 mixin FileChooser.__interface__;
11358 mixin Orientable.__interface__;
11359 alias parent this;
11360 alias parent super_;
11361 alias parent hbox;
11362 HBox parent;
11363 private FileChooserButtonPrivate* priv;
11366 // VERSION: 2.6
11367 // Creates a new file-selecting button widget.
11368 // RETURNS: a new button widget.
11369 // <title>: the title of the browse dialog.
11370 // <action>: the open mode for the widget.
11371 static FileChooserButton* new_()(char* title, FileChooserAction action) {
11372 return gtk_file_chooser_button_new(title, action);
11375 // VERSION: 2.6
11376 // DEPRECATED (v2.14) constructor: new_with_backend - Use gtk_file_chooser_button_new() instead.
11377 // Creates a new file-selecting button widget using @backend.
11378 // RETURNS: a new button widget.
11379 // <title>: the title of the browse dialog.
11380 // <action>: the open mode for the widget.
11381 // <backend>: the name of the #GtkFileSystem backend to use.
11382 static FileChooserButton* new_with_backend()(char* title, FileChooserAction action, char* backend) {
11383 return gtk_file_chooser_button_new_with_backend(title, action, backend);
11386 // VERSION: 2.6
11387 // Creates a #GtkFileChooserButton widget which uses @dialog as its
11388 // file-picking window.
11389 // Note that @dialog must be a #GtkDialog (or subclass) which
11390 // implements the #GtkFileChooser interface and must not have
11391 // %GTK_DIALOG_DESTROY_WITH_PARENT set.
11392 // Also note that the dialog needs to have its confirmative button
11393 // added with response %GTK_RESPONSE_ACCEPT or %GTK_RESPONSE_OK in
11394 // order for the button to take over the file selected in the dialog.
11395 // RETURNS: a new button widget.
11396 // <dialog>: the widget to use as dialog
11397 static FileChooserButton* new_with_dialog()(Widget* dialog) {
11398 return gtk_file_chooser_button_new_with_dialog(dialog);
11401 // VERSION: 2.10
11402 // Returns whether the button grabs focus when it is clicked with the mouse.
11403 // See gtk_file_chooser_button_set_focus_on_click().
11404 // the mouse.
11405 // RETURNS: %TRUE if the button grabs focus when it is clicked with
11406 int get_focus_on_click()() {
11407 return gtk_file_chooser_button_get_focus_on_click(&this);
11410 // VERSION: 2.6
11411 // Retrieves the title of the browse dialog used by @button. The returned value
11412 // should not be modified or freed.
11413 // RETURNS: a pointer to the browse dialog's title.
11414 char* get_title()() {
11415 return gtk_file_chooser_button_get_title(&this);
11418 // VERSION: 2.6
11419 // Retrieves the width in characters of the @button widget's entry and/or label.
11420 // RETURNS: an integer width (in characters) that the button will use to size itself.
11421 int get_width_chars()() {
11422 return gtk_file_chooser_button_get_width_chars(&this);
11425 // VERSION: 2.10
11426 // Sets whether the button will grab focus when it is clicked with the mouse.
11427 // Making mouse clicks not grab focus is useful in places like toolbars where
11428 // you don't want the keyboard focus removed from the main area of the
11429 // application.
11430 // <focus_on_click>: whether the button grabs focus when clicked with the mouse
11431 void set_focus_on_click()(int focus_on_click) {
11432 gtk_file_chooser_button_set_focus_on_click(&this, focus_on_click);
11435 // VERSION: 2.6
11436 // Modifies the @title of the browse dialog used by @button.
11437 // <title>: the new browse dialog title.
11438 void set_title()(char* title) {
11439 gtk_file_chooser_button_set_title(&this, title);
11442 // VERSION: 2.6
11443 // Sets the width (in characters) that @button will use to @n_chars.
11444 // <n_chars>: the new width, in characters.
11445 void set_width_chars()(int n_chars) {
11446 gtk_file_chooser_button_set_width_chars(&this, n_chars);
11449 // VERSION: 2.12
11450 // The ::file-set signal is emitted when the user selects a file.
11451 // Note that this signal is only emitted when the <emphasis>user</emphasis>
11452 // changes the file.
11453 extern (C) alias static void function (FileChooserButton* this_, void* user_data=null) signal_file_set;
11455 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11456 return super_.signal_connect!name(cb, data, cf);
11459 ulong signal_connect(string name:"file-set", CB:signal_file_set)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11460 return signal_connect_data!()(&this, cast(char*)"file-set",
11461 cast(GObject2.Callback)cb, data, null, cf);
11465 struct FileChooserButtonClass {
11466 private HBoxClass parent_class;
11467 extern (C) void function (FileChooserButton* fc) file_set;
11468 private void* __gtk_reserved1, __gtk_reserved2, __gtk_reserved3, __gtk_reserved4, __gtk_reserved5, __gtk_reserved6, __gtk_reserved7;
11471 struct FileChooserButtonPrivate {
11475 // Used as a return value of handlers for the
11476 // #GtkFileChooser::confirm-overwrite signal of a #GtkFileChooser. This
11477 // value determines whether the file chooser will present the stock
11478 // confirmation dialog, accept the user's choice of a filename, or
11479 // let the user choose another filename.
11480 enum FileChooserConfirmation /* Version 2.8 */ {
11481 CONFIRM = 0,
11482 ACCEPT_FILENAME = 1,
11483 SELECT_AGAIN = 2
11485 struct FileChooserDialog /* : Dialog */ {
11486 mixin Atk.ImplementorIface.__interface__;
11487 mixin Buildable.__interface__;
11488 mixin FileChooser.__interface__;
11489 alias parent_instance this;
11490 alias parent_instance super_;
11491 alias parent_instance dialog;
11492 Dialog parent_instance;
11493 FileChooserDialogPrivate* priv;
11496 // Unintrospectable constructor: new() / gtk_file_chooser_dialog_new()
11497 // VERSION: 2.4
11498 // Creates a new #GtkFileChooserDialog. This function is analogous to
11499 // gtk_dialog_new_with_buttons().
11500 // RETURNS: a new #GtkFileChooserDialog
11501 // <title>: Title of the dialog, or %NULL
11502 // <parent>: Transient parent of the dialog, or %NULL
11503 // <action>: Open or save mode for the dialog
11504 // <first_button_text>: stock ID or text to go in the first button, or %NULL
11505 alias gtk_file_chooser_dialog_new new_; // Variadic
11507 // Unintrospectable constructor: new_with_backend() / gtk_file_chooser_dialog_new_with_backend()
11508 // VERSION: 2.4
11509 // DEPRECATED (v2.14) constructor: new_with_backend - Use gtk_file_chooser_dialog_new() instead.
11510 // Creates a new #GtkFileChooserDialog with a specified backend. This is
11511 // especially useful if you use gtk_file_chooser_set_local_only() to allow
11512 // non-local files and you use a more expressive vfs, such as gnome-vfs,
11513 // to load files.
11514 // RETURNS: a new #GtkFileChooserDialog
11515 // <title>: Title of the dialog, or %NULL
11516 // <parent>: Transient parent of the dialog, or %NULL
11517 // <action>: Open or save mode for the dialog
11518 // <backend>: The name of the specific filesystem backend to use.
11519 // <first_button_text>: stock ID or text to go in the first button, or %NULL
11520 alias gtk_file_chooser_dialog_new_with_backend new_with_backend; // Variadic
11523 struct FileChooserDialogClass {
11524 DialogClass parent_class;
11527 struct FileChooserDialogPrivate {
11531 // These identify the various errors that can occur while calling
11532 // #GtkFileChooser functions.
11533 enum FileChooserError {
11534 NONEXISTENT = 0,
11535 BAD_FILENAME = 1,
11536 ALREADY_EXISTS = 2,
11537 INCOMPLETE_HOSTNAME = 3
11539 struct FileChooserWidget /* : VBox */ {
11540 mixin Atk.ImplementorIface.__interface__;
11541 mixin Buildable.__interface__;
11542 mixin FileChooser.__interface__;
11543 mixin Orientable.__interface__;
11544 alias parent_instance this;
11545 alias parent_instance super_;
11546 alias parent_instance vbox;
11547 VBox parent_instance;
11548 FileChooserWidgetPrivate* priv;
11551 // VERSION: 2.4
11552 // Creates a new #GtkFileChooserWidget. This is a file chooser widget that can
11553 // be embedded in custom windows, and it is the same widget that is used by
11554 // #GtkFileChooserDialog.
11555 // RETURNS: a new #GtkFileChooserWidget
11556 // <action>: Open or save mode for the widget
11557 static FileChooserWidget* new_()(FileChooserAction action) {
11558 return gtk_file_chooser_widget_new(action);
11561 // VERSION: 2.4
11562 // DEPRECATED (v2.14) constructor: new_with_backend - Use gtk_file_chooser_widget_new() instead.
11563 // Creates a new #GtkFileChooserWidget with a specified backend. This is
11564 // especially useful if you use gtk_file_chooser_set_local_only() to allow
11565 // non-local files. This is a file chooser widget that can be embedded in
11566 // custom windows and it is the same widget that is used by
11567 // #GtkFileChooserDialog.
11568 // RETURNS: a new #GtkFileChooserWidget
11569 // <action>: Open or save mode for the widget
11570 // <backend>: The name of the specific filesystem backend to use.
11571 static FileChooserWidget* new_with_backend()(FileChooserAction action, char* backend) {
11572 return gtk_file_chooser_widget_new_with_backend(action, backend);
11576 struct FileChooserWidgetClass {
11577 VBoxClass parent_class;
11580 struct FileChooserWidgetPrivate {
11583 struct FileFilter /* : Object */ {
11584 alias method_parent this;
11585 alias method_parent super_;
11586 alias method_parent object;
11587 Object method_parent;
11590 // VERSION: 2.4
11591 // Creates a new #GtkFileFilter with no rules added to it.
11592 // Such a filter doesn't accept any files, so is not
11593 // particularly useful until you add rules with
11594 // gtk_file_filter_add_mime_type(), gtk_file_filter_add_pattern(),
11595 // or gtk_file_filter_add_custom(). To create a filter
11596 // that accepts any file, use:
11597 // |[
11598 // GtkFileFilter *filter = gtk_file_filter_new ();
11599 // gtk_file_filter_add_pattern (filter, "*");
11600 // ]|
11601 // RETURNS: a new #GtkFileFilter
11602 static FileFilter* new_()() {
11603 return gtk_file_filter_new();
11606 // VERSION: 2.4
11607 // Adds rule to a filter that allows files based on a custom callback
11608 // function. The bitfield @needed which is passed in provides information
11609 // about what sorts of information that the filter function needs;
11610 // this allows GTK+ to avoid retrieving expensive information when
11611 // it isn't needed by the filter.
11612 // <needed>: bitfield of flags indicating the information that the custom filter function needs.
11613 // <func>: callback function; if the function returns %TRUE, then the file will be displayed.
11614 // <data>: data to pass to @func
11615 // <notify>: function to call to free @data when it is no longer needed.
11616 void add_custom()(FileFilterFlags needed, FileFilterFunc func, void* data, GLib2.DestroyNotify notify) {
11617 gtk_file_filter_add_custom(&this, needed, func, data, notify);
11620 // VERSION: 2.4
11621 // Adds a rule allowing a given mime type to @filter.
11622 // <mime_type>: name of a MIME type
11623 void add_mime_type()(char* mime_type) {
11624 gtk_file_filter_add_mime_type(&this, mime_type);
11627 // VERSION: 2.4
11628 // Adds a rule allowing a shell style glob to a filter.
11629 // <pattern>: a shell style glob
11630 void add_pattern()(char* pattern) {
11631 gtk_file_filter_add_pattern(&this, pattern);
11634 // VERSION: 2.6
11635 // Adds a rule allowing image files in the formats supported
11636 // by GdkPixbuf.
11637 void add_pixbuf_formats()() {
11638 gtk_file_filter_add_pixbuf_formats(&this);
11641 // VERSION: 2.4
11642 // Tests whether a file should be displayed according to @filter.
11643 // The #GtkFileFilterInfo structure @filter_info should include
11644 // the fields returned from gtk_file_filter_get_needed().
11645 // This function will not typically be used by applications; it
11646 // is intended principally for use in the implementation of
11647 // #GtkFileChooser.
11648 // RETURNS: %TRUE if the file should be displayed
11649 // <filter_info>: a #GtkFileFilterInfo structure containing information about a file.
11650 int filter()(FileFilterInfo* filter_info) {
11651 return gtk_file_filter_filter(&this, filter_info);
11654 // VERSION: 2.4
11655 // Gets the human-readable name for the filter. See gtk_file_filter_set_name().
11656 // or %NULL. This value is owned by GTK+ and must not
11657 // be modified or freed.
11658 // RETURNS: The human-readable name of the filter,
11659 char* get_name()() {
11660 return gtk_file_filter_get_name(&this);
11663 // VERSION: 2.4
11664 // Gets the fields that need to be filled in for the structure
11665 // passed to gtk_file_filter_filter()
11666 // This function will not typically be used by applications; it
11667 // is intended principally for use in the implementation of
11668 // #GtkFileChooser.
11669 // calling gtk_file_filter_filter()
11670 // RETURNS: bitfield of flags indicating needed fields when
11671 FileFilterFlags get_needed()() {
11672 return gtk_file_filter_get_needed(&this);
11675 // VERSION: 2.4
11676 // Sets the human-readable name of the filter; this is the string
11677 // that will be displayed in the file selector user interface if
11678 // there is a selectable list of filters.
11679 // <name>: the human-readable-name for the filter, or %NULL to remove any existing name.
11680 void set_name()(char* name=null) {
11681 gtk_file_filter_set_name(&this, name);
11685 enum FileFilterFlags {
11686 FILENAME = 1,
11687 URI = 2,
11688 DISPLAY_NAME = 4,
11689 MIME_TYPE = 8
11691 extern (C) alias int function (FileFilterInfo* filter_info, void* data) FileFilterFunc;
11693 struct FileFilterInfo {
11694 FileFilterFlags contains;
11695 char* filename, uri, display_name, mime_type;
11698 struct FileSelection /* : Dialog */ {
11699 mixin Atk.ImplementorIface.__interface__;
11700 mixin Buildable.__interface__;
11701 alias parent_instance this;
11702 alias parent_instance super_;
11703 alias parent_instance dialog;
11704 Dialog parent_instance;
11705 Widget* dir_list, file_list, selection_entry, selection_text, main_vbox, ok_button, cancel_button, help_button, history_pulldown, history_menu;
11706 GLib2.List* history_list;
11707 Widget* fileop_dialog, fileop_entry;
11708 char* fileop_file;
11709 void* cmpl_state;
11710 Widget* fileop_c_dir, fileop_del_file, fileop_ren_file, button_area, action_area;
11711 private void*[0] selected_names;
11712 private char* last_selected;
11714 static FileSelection* new_()(char* title) {
11715 return gtk_file_selection_new(title);
11717 void complete()(char* pattern) {
11718 gtk_file_selection_complete(&this, pattern);
11721 // This function returns the selected filename in the GLib file name
11722 // encoding. To convert to UTF-8, call g_filename_to_utf8(). The
11723 // returned string points to a statically allocated buffer and should
11724 // be copied if you plan to keep it around.
11725 // If no file is selected then the selected directory path is returned.
11726 // RETURNS: currently-selected filename in the on-disk encoding.
11727 char* get_filename()() {
11728 return gtk_file_selection_get_filename(&this);
11731 // Determines whether or not the user is allowed to select multiple files in
11732 // the file list. See gtk_file_selection_set_select_multiple().
11733 // file list
11734 // RETURNS: %TRUE if the user is allowed to select multiple files in the
11735 int get_select_multiple()() {
11736 return gtk_file_selection_get_select_multiple(&this);
11739 // Unintrospectable method: get_selections() / gtk_file_selection_get_selections()
11740 // Retrieves the list of file selections the user has made in the dialog box.
11741 // This function is intended for use when the user can select multiple files
11742 // in the file list.
11743 // The filenames are in the GLib file name encoding. To convert to
11744 // UTF-8, call g_filename_to_utf8() on each string.
11745 // g_strfreev() to free it.
11746 // RETURNS: a newly-allocated %NULL-terminated array of strings. Use
11747 char** get_selections()() {
11748 return gtk_file_selection_get_selections(&this);
11750 void hide_fileop_buttons()() {
11751 gtk_file_selection_hide_fileop_buttons(&this);
11754 // Sets a default path for the file requestor. If @filename includes a
11755 // directory path, then the requestor will open with that path as its
11756 // current working directory.
11757 // This has the consequence that in order to open the requestor with a
11758 // working directory and an empty filename, @filename must have a trailing
11759 // directory separator.
11760 // The encoding of @filename is preferred GLib file name encoding, which
11761 // may not be UTF-8. See g_filename_from_utf8().
11762 // <filename>: a string to set as the default file name.
11763 void set_filename()(char* filename) {
11764 gtk_file_selection_set_filename(&this, filename);
11767 // Sets whether the user is allowed to select multiple files in the file list.
11768 // Use gtk_file_selection_get_selections () to get the list of selected files.
11769 // <select_multiple>: whether or not the user is allowed to select multiple files in the file list.
11770 void set_select_multiple()(int select_multiple) {
11771 gtk_file_selection_set_select_multiple(&this, select_multiple);
11773 void show_fileop_buttons()() {
11774 gtk_file_selection_show_fileop_buttons(&this);
11778 struct FileSelectionClass {
11779 DialogClass parent_class;
11780 extern (C) void function () _gtk_reserved1;
11781 extern (C) void function () _gtk_reserved2;
11782 extern (C) void function () _gtk_reserved3;
11783 extern (C) void function () _gtk_reserved4;
11786 struct Fixed /* : Container */ {
11787 mixin Atk.ImplementorIface.__interface__;
11788 mixin Buildable.__interface__;
11789 alias container this;
11790 alias container super_;
11791 Container container;
11792 GLib2.List* children;
11794 static Fixed* new_()() {
11795 return gtk_fixed_new();
11798 // DEPRECATED (v2.20) method: get_has_window - Use gtk_widget_get_has_window() instead.
11799 // Gets whether the #GtkFixed has its own #GdkWindow.
11800 // See gtk_fixed_set_has_window().
11801 // RETURNS: %TRUE if @fixed has its own window.
11802 int get_has_window()() {
11803 return gtk_fixed_get_has_window(&this);
11805 void move()(Widget* widget, int x, int y) {
11806 gtk_fixed_move(&this, widget, x, y);
11808 void put()(Widget* widget, int x, int y) {
11809 gtk_fixed_put(&this, widget, x, y);
11812 // DEPRECATED (v2.20) method: set_has_window - Use gtk_widget_set_has_window() instead.
11813 // Sets whether a #GtkFixed widget is created with a separate
11814 // #GdkWindow for @widget->window or not. (By default, it will be
11815 // created with no separate #GdkWindow). This function must be called
11816 // while the #GtkFixed is not realized, for instance, immediately after the
11817 // window is created.
11818 // This function was added to provide an easy migration path for
11819 // older applications which may expect #GtkFixed to have a separate window.
11820 // <has_window>: %TRUE if a separate window should be created
11821 void set_has_window()(int has_window) {
11822 gtk_fixed_set_has_window(&this, has_window);
11826 struct FixedChild {
11827 Widget* widget;
11828 int x, y;
11831 struct FixedClass {
11832 ContainerClass parent_class;
11835 struct FontButton /* : Button */ {
11836 mixin Atk.ImplementorIface.__interface__;
11837 mixin Activatable.__interface__;
11838 mixin Buildable.__interface__;
11839 alias button this;
11840 alias button super_;
11841 Button button;
11842 private FontButtonPrivate* priv;
11845 // VERSION: 2.4
11846 // Creates a new font picker widget.
11847 // RETURNS: a new font picker widget.
11848 static FontButton* new_()() {
11849 return gtk_font_button_new();
11852 // VERSION: 2.4
11853 // Creates a new font picker widget.
11854 // RETURNS: a new font picker widget.
11855 // <fontname>: Name of font to display in font selection dialog
11856 static FontButton* new_with_font()(char* fontname) {
11857 return gtk_font_button_new_with_font(fontname);
11860 // VERSION: 2.4
11861 // Retrieves the name of the currently selected font. This name includes
11862 // style and size information as well. If you want to render something
11863 // with the font, use this string with pango_font_description_from_string() .
11864 // If you're interested in peeking certain values (family name,
11865 // style, size, weight) just query these properties from the
11866 // #PangoFontDescription object.
11867 // RETURNS: an internal copy of the font name which must not be freed.
11868 char* get_font_name()() {
11869 return gtk_font_button_get_font_name(&this);
11872 // VERSION: 2.4
11873 // Returns whether the font size will be shown in the label.
11874 // RETURNS: whether the font size will be shown in the label.
11875 int get_show_size()() {
11876 return gtk_font_button_get_show_size(&this);
11879 // VERSION: 2.4
11880 // Returns whether the name of the font style will be shown in the label.
11881 // RETURNS: whether the font style will be shown in the label.
11882 int get_show_style()() {
11883 return gtk_font_button_get_show_style(&this);
11886 // VERSION: 2.4
11887 // Retrieves the title of the font selection dialog.
11888 // RETURNS: an internal copy of the title string which must not be freed.
11889 char* get_title()() {
11890 return gtk_font_button_get_title(&this);
11893 // VERSION: 2.4
11894 // Returns whether the selected font is used in the label.
11895 // RETURNS: whether the selected font is used in the label.
11896 int get_use_font()() {
11897 return gtk_font_button_get_use_font(&this);
11900 // VERSION: 2.4
11901 // Returns whether the selected size is used in the label.
11902 // RETURNS: whether the selected size is used in the label.
11903 int get_use_size()() {
11904 return gtk_font_button_get_use_size(&this);
11907 // VERSION: 2.4
11908 // Sets or updates the currently-displayed font in font picker dialog.
11909 // font selection dialog exists, otherwise %FALSE.
11910 // RETURNS: Return value of gtk_font_selection_dialog_set_font_name() if the
11911 // <fontname>: Name of font to display in font selection dialog
11912 int set_font_name()(char* fontname) {
11913 return gtk_font_button_set_font_name(&this, fontname);
11916 // VERSION: 2.4
11917 // If @show_size is %TRUE, the font size will be displayed along with the name of the selected font.
11918 // <show_size>: %TRUE if font size should be displayed in dialog.
11919 void set_show_size()(int show_size) {
11920 gtk_font_button_set_show_size(&this, show_size);
11923 // VERSION: 2.4
11924 // If @show_style is %TRUE, the font style will be displayed along with name of the selected font.
11925 // <show_style>: %TRUE if font style should be displayed in label.
11926 void set_show_style()(int show_style) {
11927 gtk_font_button_set_show_style(&this, show_style);
11930 // VERSION: 2.4
11931 // Sets the title for the font selection dialog.
11932 // <title>: a string containing the font selection dialog title
11933 void set_title()(char* title) {
11934 gtk_font_button_set_title(&this, title);
11937 // VERSION: 2.4
11938 // If @use_font is %TRUE, the font name will be written using the selected font.
11939 // <use_font>: If %TRUE, font name will be written using font chosen.
11940 void set_use_font()(int use_font) {
11941 gtk_font_button_set_use_font(&this, use_font);
11944 // VERSION: 2.4
11945 // If @use_size is %TRUE, the font name will be written using the selected size.
11946 // <use_size>: If %TRUE, font name will be written using the selected size.
11947 void set_use_size()(int use_size) {
11948 gtk_font_button_set_use_size(&this, use_size);
11951 // VERSION: 2.4
11952 // The ::font-set signal is emitted when the user selects a font.
11953 // When handling this signal, use gtk_font_button_get_font_name()
11954 // to find out which font was just selected.
11955 // Note that this signal is only emitted when the <emphasis>user</emphasis>
11956 // changes the font. If you need to react to programmatic font changes
11957 // as well, use the notify::font-name signal.
11958 extern (C) alias static void function (FontButton* this_, void* user_data=null) signal_font_set;
11960 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11961 return super_.signal_connect!name(cb, data, cf);
11964 ulong signal_connect(string name:"font-set", CB:signal_font_set)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
11965 return signal_connect_data!()(&this, cast(char*)"font-set",
11966 cast(GObject2.Callback)cb, data, null, cf);
11970 struct FontButtonClass {
11971 ButtonClass parent_class;
11972 extern (C) void function (FontButton* gfp) font_set;
11973 extern (C) void function () _gtk_reserved1;
11974 extern (C) void function () _gtk_reserved2;
11975 extern (C) void function () _gtk_reserved3;
11976 extern (C) void function () _gtk_reserved4;
11979 struct FontButtonPrivate {
11982 struct FontSelection /* : VBox */ {
11983 mixin Atk.ImplementorIface.__interface__;
11984 mixin Buildable.__interface__;
11985 mixin Orientable.__interface__;
11986 alias parent_instance this;
11987 alias parent_instance super_;
11988 alias parent_instance vbox;
11989 VBox parent_instance;
11990 Widget* font_entry, family_list, font_style_entry, face_list, size_entry, size_list, pixels_button, points_button, filter_button, preview_entry;
11991 Pango.FontFamily* family;
11992 Pango.FontFace* face;
11993 int size;
11994 Gdk2.Font* font;
11997 // Creates a new #GtkFontSelection.
11998 // RETURNS: a n ew #GtkFontSelection
11999 static FontSelection* new_()() {
12000 return gtk_font_selection_new();
12003 // VERSION: 2.14
12004 // Gets the #PangoFontFace representing the selected font group
12005 // details (i.e. family, slant, weight, width, etc).
12006 // selected font group details. The returned object is owned by
12007 // RETURNS: A #PangoFontFace representing the
12008 Pango.FontFace* get_face()() {
12009 return gtk_font_selection_get_face(&this);
12012 // VERSION: 2.14
12013 // This returns the #GtkTreeView which lists all styles available for
12014 // the selected font. For example, 'Regular', 'Bold', etc.
12015 // RETURNS: A #GtkWidget that is part of @fontsel
12016 Widget* get_face_list()() {
12017 return gtk_font_selection_get_face_list(&this);
12020 // VERSION: 2.14
12021 // Gets the #PangoFontFamily representing the selected font family.
12022 // selected font family. Font families are a collection of font
12023 // faces. The returned object is owned by @fontsel and must not
12024 // be modified or freed.
12025 // RETURNS: A #PangoFontFamily representing the
12026 Pango.FontFamily* get_family()() {
12027 return gtk_font_selection_get_family(&this);
12030 // VERSION: 2.14
12031 // This returns the #GtkTreeView that lists font families, for
12032 // example, 'Sans', 'Serif', etc.
12033 // RETURNS: A #GtkWidget that is part of @fontsel
12034 Widget* get_family_list()() {
12035 return gtk_font_selection_get_family_list(&this);
12038 // DEPRECATED (v2.0) method: get_font - Use gtk_font_selection_get_font_name() instead.
12039 // Gets the currently-selected font.
12040 // RETURNS: A #GdkFont.
12041 Gdk2.Font* /*new*/ get_font()() {
12042 return gtk_font_selection_get_font(&this);
12045 // Gets the currently-selected font name.
12046 // Note that this can be a different string than what you set with
12047 // gtk_font_selection_set_font_name(), as the font selection widget may
12048 // normalize font names and thus return a string with a different structure.
12049 // For example, "Helvetica Italic Bold 12" could be normalized to
12050 // "Helvetica Bold Italic 12". Use pango_font_description_equal()
12051 // if you want to compare two font descriptions.
12052 // no font is selected. You must free this string with g_free().
12053 // RETURNS: A string with the name of the current font, or %NULL if
12054 char* /*new*/ get_font_name()() {
12055 return gtk_font_selection_get_font_name(&this);
12058 // VERSION: 2.14
12059 // This returns the #GtkEntry used to display the font as a preview.
12060 // RETURNS: A #GtkWidget that is part of @fontsel
12061 Widget* get_preview_entry()() {
12062 return gtk_font_selection_get_preview_entry(&this);
12065 // Gets the text displayed in the preview area.
12066 // This string is owned by the widget and should not be
12067 // modified or freed
12068 // RETURNS: the text displayed in the preview area.
12069 char* get_preview_text()() {
12070 return gtk_font_selection_get_preview_text(&this);
12073 // VERSION: 2.14
12074 // The selected font size.
12075 // or -1 if no font size is selected.
12076 // RETURNS: A n integer representing the selected font size,
12077 int get_size()() {
12078 return gtk_font_selection_get_size(&this);
12081 // VERSION: 2.14
12082 // This returns the #GtkEntry used to allow the user to edit the font
12083 // number manually instead of selecting it from the list of font sizes.
12084 // RETURNS: A #GtkWidget that is part of @fontsel
12085 Widget* get_size_entry()() {
12086 return gtk_font_selection_get_size_entry(&this);
12089 // VERSION: 2.14
12090 // This returns the #GtkTreeeView used to list font sizes.
12091 // RETURNS: A #GtkWidget that is part of @fontsel
12092 Widget* get_size_list()() {
12093 return gtk_font_selection_get_size_list(&this);
12096 // Sets the currently-selected font.
12097 // Note that the @fontsel needs to know the screen in which it will appear
12098 // for this to work; this can be guaranteed by simply making sure that the
12099 // such font exists or if the @fontsel doesn't belong to a particular
12100 // screen yet.
12101 // RETURNS: %TRUE if the font could be set successfully; %FALSE if no
12102 // <fontname>: a font name like "Helvetica 12" or "Times Bold 18"
12103 int set_font_name()(char* fontname) {
12104 return gtk_font_selection_set_font_name(&this, fontname);
12107 // Sets the text displayed in the preview area.
12108 // The @text is used to show how the selected font looks.
12109 // <text>: the text to display in the preview area
12110 void set_preview_text()(char* text) {
12111 gtk_font_selection_set_preview_text(&this, text);
12115 struct FontSelectionClass {
12116 VBoxClass parent_class;
12117 extern (C) void function () _gtk_reserved1;
12118 extern (C) void function () _gtk_reserved2;
12119 extern (C) void function () _gtk_reserved3;
12120 extern (C) void function () _gtk_reserved4;
12123 struct FontSelectionDialog /* : Dialog */ {
12124 mixin Atk.ImplementorIface.__interface__;
12125 mixin Buildable.__interface__;
12126 alias parent_instance this;
12127 alias parent_instance super_;
12128 alias parent_instance dialog;
12129 Dialog parent_instance;
12130 private Widget* fontsel, main_vbox, action_area;
12131 Widget* ok_button, apply_button, cancel_button;
12132 private int dialog_width;
12133 private int auto_resize;
12136 // Creates a new #GtkFontSelectionDialog.
12137 // RETURNS: a new #GtkFontSelectionDialog
12138 // <title>: the title of the dialog window
12139 static FontSelectionDialog* new_()(char* title) {
12140 return gtk_font_selection_dialog_new(title);
12143 // Unintrospectable method: get_apply_button() / gtk_font_selection_dialog_get_apply_button()
12144 // VERSION: 2.14
12145 // DEPRECATED (v2.16) method: get_apply_button - Don't use this function.
12146 // Obtains a button. The button doesn't have any function.
12147 // RETURNS: a #GtkWidget
12148 Widget* get_apply_button()() {
12149 return gtk_font_selection_dialog_get_apply_button(&this);
12152 // VERSION: 2.14
12153 // Gets the 'Cancel' button.
12154 // for the 'Cancel' button.
12155 // RETURNS: the #GtkWidget used in the dialog
12156 Widget* get_cancel_button()() {
12157 return gtk_font_selection_dialog_get_cancel_button(&this);
12160 // DEPRECATED (v2.0) method: get_font - Use gtk_font_selection_dialog_get_font_name() instead.
12161 // Gets the currently-selected font.
12162 // currently selected font in the dialog, or %NULL if no font is selected
12163 // RETURNS: the #GdkFont from the #GtkFontSelection for the
12164 Gdk2.Font* /*new*/ get_font()() {
12165 return gtk_font_selection_dialog_get_font(&this);
12168 // Gets the currently-selected font name.
12169 // Note that this can be a different string than what you set with
12170 // gtk_font_selection_dialog_set_font_name(), as the font selection widget
12171 // may normalize font names and thus return a string with a different
12172 // structure. For example, "Helvetica Italic Bold 12" could be normalized
12173 // to "Helvetica Bold Italic 12". Use pango_font_description_equal()
12174 // if you want to compare two font descriptions.
12175 // font is selected. You must free this string with g_free().
12176 // RETURNS: A string with the name of the current font, or %NULL if no
12177 char* /*new*/ get_font_name()() {
12178 return gtk_font_selection_dialog_get_font_name(&this);
12181 // VERSION: 2.22
12182 // Retrieves the #GtkFontSelection widget embedded in the dialog.
12183 // RETURNS: the embedded #GtkFontSelection
12184 Widget* get_font_selection()() {
12185 return gtk_font_selection_dialog_get_font_selection(&this);
12188 // VERSION: 2.14
12189 // Gets the 'OK' button.
12190 // for the 'OK' button.
12191 // RETURNS: the #GtkWidget used in the dialog
12192 Widget* get_ok_button()() {
12193 return gtk_font_selection_dialog_get_ok_button(&this);
12196 // Gets the text displayed in the preview area.
12197 // This string is owned by the widget and should not be
12198 // modified or freed
12199 // RETURNS: the text displayed in the preview area.
12200 char* get_preview_text()() {
12201 return gtk_font_selection_dialog_get_preview_text(&this);
12204 // Sets the currently selected font.
12205 // RETURNS: %TRUE if the font selected in @fsd is now the
12206 // <fontname>: a font name like "Helvetica 12" or "Times Bold 18"
12207 int set_font_name()(char* fontname) {
12208 return gtk_font_selection_dialog_set_font_name(&this, fontname);
12211 // Sets the text displayed in the preview area.
12212 // <text>: the text to display in the preview area
12213 void set_preview_text()(char* text) {
12214 gtk_font_selection_dialog_set_preview_text(&this, text);
12218 struct FontSelectionDialogClass {
12219 DialogClass parent_class;
12220 extern (C) void function () _gtk_reserved1;
12221 extern (C) void function () _gtk_reserved2;
12222 extern (C) void function () _gtk_reserved3;
12223 extern (C) void function () _gtk_reserved4;
12226 struct Frame /* : Bin */ {
12227 mixin Atk.ImplementorIface.__interface__;
12228 mixin Buildable.__interface__;
12229 alias bin this;
12230 alias bin super_;
12231 Bin bin;
12232 Widget* label_widget;
12233 short shadow_type;
12234 float label_xalign, label_yalign;
12235 Allocation child_allocation;
12238 // Creates a new #GtkFrame, with optional label @label.
12239 // If @label is %NULL, the label is omitted.
12240 // RETURNS: a new #GtkFrame widget
12241 // <label>: the text to use as the label of the frame
12242 static Frame* new_()(char* label) {
12243 return gtk_frame_new(label);
12246 // If the frame's label widget is a #GtkLabel, returns the
12247 // text in the label widget. (The frame will have a #GtkLabel
12248 // for the label widget if a non-%NULL argument was passed
12249 // to gtk_frame_new().)
12250 // was no label widget or the lable widget was not
12251 // a #GtkLabel. This string is owned by GTK+ and
12252 // must not be modified or freed.
12253 // RETURNS: the text in the label, or %NULL if there
12254 char* get_label()() {
12255 return gtk_frame_get_label(&this);
12258 // Retrieves the X and Y alignment of the frame's label. See
12259 // gtk_frame_set_label_align().
12260 // <xalign>: location to store X alignment of frame's label, or %NULL
12261 // <yalign>: location to store X alignment of frame's label, or %NULL
12262 void get_label_align()(/*out*/ float* xalign=null, /*out*/ float* yalign=null) {
12263 gtk_frame_get_label_align(&this, xalign, yalign);
12266 // Retrieves the label widget for the frame. See
12267 // gtk_frame_set_label_widget().
12268 // RETURNS: the label widget, or %NULL if there is none.
12269 Widget* get_label_widget()() {
12270 return gtk_frame_get_label_widget(&this);
12273 // Retrieves the shadow type of the frame. See
12274 // gtk_frame_set_shadow_type().
12275 // RETURNS: the current shadow type of the frame.
12276 ShadowType get_shadow_type()() {
12277 return gtk_frame_get_shadow_type(&this);
12280 // Sets the text of the label. If @label is %NULL,
12281 // the current label is removed.
12282 // <label>: the text to use as the label of the frame
12283 void set_label()(char* label=null) {
12284 gtk_frame_set_label(&this, label);
12287 // Sets the alignment of the frame widget's label. The
12288 // default values for a newly created frame are 0.0 and 0.5.
12289 // <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.
12290 // <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.
12291 void set_label_align()(float xalign, float yalign) {
12292 gtk_frame_set_label_align(&this, xalign, yalign);
12295 // Sets the label widget for the frame. This is the widget that
12296 // will appear embedded in the top edge of the frame as a
12297 // title.
12298 // <label_widget>: the new label widget
12299 void set_label_widget()(Widget* label_widget) {
12300 gtk_frame_set_label_widget(&this, label_widget);
12303 // Sets the shadow type for @frame.
12304 // <type>: the new #GtkShadowType
12305 void set_shadow_type()(ShadowType type) {
12306 gtk_frame_set_shadow_type(&this, type);
12310 struct FrameClass {
12311 BinClass parent_class;
12312 extern (C) void function (Frame* frame, Allocation* allocation) compute_child_allocation;
12315 extern (C) alias int function (void* data) Function;
12317 struct GammaCurve /* : VBox */ {
12318 mixin Atk.ImplementorIface.__interface__;
12319 mixin Buildable.__interface__;
12320 mixin Orientable.__interface__;
12321 alias vbox this;
12322 alias vbox super_;
12323 VBox vbox;
12324 Widget* table, curve;
12325 Widget*[5] button;
12326 float gamma;
12327 Widget* gamma_dialog, gamma_text;
12329 static GammaCurve* new_()() {
12330 return gtk_gamma_curve_new();
12334 struct GammaCurveClass {
12335 VBoxClass parent_class;
12336 extern (C) void function () _gtk_reserved1;
12337 extern (C) void function () _gtk_reserved2;
12338 extern (C) void function () _gtk_reserved3;
12339 extern (C) void function () _gtk_reserved4;
12343 // #GtkHBox is a container that organizes child widgets into a single row.
12344 // Use the #GtkBox packing interface to determine the arrangement,
12345 // spacing, width, and alignment of #GtkHBox children.
12346 // All children are allocated the same height.
12347 struct HBox /* : Box */ {
12348 mixin Atk.ImplementorIface.__interface__;
12349 mixin Buildable.__interface__;
12350 mixin Orientable.__interface__;
12351 alias box this;
12352 alias box super_;
12353 Box box;
12356 // Creates a new #GtkHBox.
12357 // RETURNS: a new #GtkHBox.
12358 // <homogeneous>: %TRUE if all children are to be given equal space allotments.
12359 // <spacing>: the number of pixels to place by default between children.
12360 static HBox* new_()(int homogeneous, int spacing) {
12361 return gtk_hbox_new(homogeneous, spacing);
12365 struct HBoxClass {
12366 BoxClass parent_class;
12369 struct HButtonBox /* : ButtonBox */ {
12370 mixin Atk.ImplementorIface.__interface__;
12371 mixin Buildable.__interface__;
12372 mixin Orientable.__interface__;
12373 alias button_box this;
12374 alias button_box super_;
12375 alias button_box buttonbox;
12376 ButtonBox button_box;
12378 static HButtonBox* new_()() {
12379 return gtk_hbutton_box_new();
12381 static ButtonBoxStyle get_layout_default()() {
12382 return gtk_hbutton_box_get_layout_default();
12384 static int get_spacing_default()() {
12385 return gtk_hbutton_box_get_spacing_default();
12387 static void set_layout_default()(ButtonBoxStyle layout) {
12388 gtk_hbutton_box_set_layout_default(layout);
12390 static void set_spacing_default()(int spacing) {
12391 gtk_hbutton_box_set_spacing_default(spacing);
12395 struct HButtonBoxClass {
12396 ButtonBoxClass parent_class;
12399 struct HPaned /* : Paned */ {
12400 mixin Atk.ImplementorIface.__interface__;
12401 mixin Buildable.__interface__;
12402 mixin Orientable.__interface__;
12403 alias paned this;
12404 alias paned super_;
12405 Paned paned;
12407 static HPaned* new_()() {
12408 return gtk_hpaned_new();
12412 struct HPanedClass {
12413 PanedClass parent_class;
12416 struct HRuler /* : Ruler */ {
12417 mixin Atk.ImplementorIface.__interface__;
12418 mixin Buildable.__interface__;
12419 mixin Orientable.__interface__;
12420 alias ruler this;
12421 alias ruler super_;
12422 Ruler ruler;
12424 static HRuler* new_()() {
12425 return gtk_hruler_new();
12429 struct HRulerClass {
12430 RulerClass parent_class;
12433 struct HSV /* : Widget */ {
12434 mixin Atk.ImplementorIface.__interface__;
12435 mixin Buildable.__interface__;
12436 alias parent_instance this;
12437 alias parent_instance super_;
12438 alias parent_instance widget;
12439 Widget parent_instance;
12440 void* priv;
12443 // VERSION: 2.14
12444 // Creates a new HSV color selector.
12445 // RETURNS: A newly-created HSV color selector.
12446 static HSV* new_()() {
12447 return gtk_hsv_new();
12450 // VERSION: 2.14
12451 // Converts a color from HSV space to RGB.
12452 // Input values must be in the [0.0, 1.0] range;
12453 // output values will be in the same range.
12454 // <h>: Hue
12455 // <s>: Saturation
12456 // <v>: Value
12457 // <r>: Return value for the red component
12458 // <g>: Return value for the green component
12459 // <b>: Return value for the blue component
12460 static void to_rgb()(double h, double s, double v, /*out*/ double* r, /*out*/ double* g, /*out*/ double* b) {
12461 gtk_hsv_to_rgb(h, s, v, r, g, b);
12464 // VERSION: 2.14
12465 // Queries the current color in an HSV color selector.
12466 // Returned values will be in the [0.0, 1.0] range.
12467 // <h>: Return value for the hue
12468 // <s>: Return value for the saturation
12469 // <v>: Return value for the value
12470 void get_color()(/*out*/ double* h, /*out*/ double* s, /*out*/ double* v) {
12471 gtk_hsv_get_color(&this, h, s, v);
12474 // VERSION: 2.14
12475 // Queries the size and ring width of an HSV color selector.
12476 // <size>: Return value for the diameter of the hue ring
12477 // <ring_width>: Return value for the width of the hue ring
12478 void get_metrics()(/*out*/ int* size, /*out*/ int* ring_width) {
12479 gtk_hsv_get_metrics(&this, size, ring_width);
12482 // VERSION: 2.14
12483 // An HSV color selector can be said to be adjusting if multiple rapid
12484 // changes are being made to its value, for example, when the user is
12485 // adjusting the value with the mouse. This function queries whether
12486 // the HSV color selector is being adjusted or not.
12487 // since they may be transitory, or %FALSE if they should consider
12488 // the color value status to be final.
12489 // RETURNS: %TRUE if clients can ignore changes to the color value,
12490 int is_adjusting()() {
12491 return gtk_hsv_is_adjusting(&this);
12494 // VERSION: 2.14
12495 // Sets the current color in an HSV color selector.
12496 // Color component values must be in the [0.0, 1.0] range.
12497 // <h>: Hue
12498 // <s>: Saturation
12499 // <v>: Value
12500 void set_color()(double h, double s, double v) {
12501 gtk_hsv_set_color(&this, h, s, v);
12504 // VERSION: 2.14
12505 // Sets the size and ring width of an HSV color selector.
12506 // <size>: Diameter for the hue ring
12507 // <ring_width>: Width of the hue ring
12508 void set_metrics()(int size, int ring_width) {
12509 gtk_hsv_set_metrics(&this, size, ring_width);
12511 extern (C) alias static void function (HSV* this_, void* user_data=null) signal_changed;
12513 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12514 return super_.signal_connect!name(cb, data, cf);
12517 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12518 return signal_connect_data!()(&this, cast(char*)"changed",
12519 cast(GObject2.Callback)cb, data, null, cf);
12521 extern (C) alias static void function (HSV* this_, DirectionType* object, void* user_data=null) signal_move;
12522 ulong signal_connect(string name:"move", CB:signal_move)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12523 return signal_connect_data!()(&this, cast(char*)"move",
12524 cast(GObject2.Callback)cb, data, null, cf);
12528 struct HSVClass {
12529 WidgetClass parent_class;
12530 extern (C) void function (HSV* hsv) changed;
12531 extern (C) void function (HSV* hsv, DirectionType type) move;
12532 extern (C) void function () _gtk_reserved1;
12533 extern (C) void function () _gtk_reserved2;
12534 extern (C) void function () _gtk_reserved3;
12535 extern (C) void function () _gtk_reserved4;
12538 struct HScale /* : Scale */ {
12539 mixin Atk.ImplementorIface.__interface__;
12540 mixin Buildable.__interface__;
12541 mixin Orientable.__interface__;
12542 alias scale this;
12543 alias scale super_;
12544 Scale scale;
12546 static HScale* new_()(Adjustment* adjustment) {
12547 return gtk_hscale_new(adjustment);
12550 // Creates a new horizontal scale widget that lets the user input a
12551 // number between @min and @max (including @min and @max) with the
12552 // increment @step. @step must be nonzero; it's the distance the
12553 // slider moves when using the arrow keys to adjust the scale value.
12554 // Note that the way in which the precision is derived works best if @step
12555 // is a power of ten. If the resulting precision is not suitable for your
12556 // needs, use gtk_scale_set_digits() to correct it.
12557 // RETURNS: a new #GtkHScale
12558 // <min>: minimum value
12559 // <max>: maximum value
12560 // <step>: step increment (tick size) used with keyboard shortcuts
12561 static HScale* new_with_range()(double min, double max, double step) {
12562 return gtk_hscale_new_with_range(min, max, step);
12566 struct HScaleClass {
12567 ScaleClass parent_class;
12570 struct HScrollbar /* : Scrollbar */ {
12571 mixin Atk.ImplementorIface.__interface__;
12572 mixin Buildable.__interface__;
12573 mixin Orientable.__interface__;
12574 alias scrollbar this;
12575 alias scrollbar super_;
12576 Scrollbar scrollbar;
12579 // Creates a new horizontal scrollbar.
12580 // RETURNS: the new #GtkHScrollbar
12581 // <adjustment>: the #GtkAdjustment to use, or %NULL to create a new adjustment
12582 static HScrollbar* new_()(Adjustment* adjustment=null) {
12583 return gtk_hscrollbar_new(adjustment);
12587 struct HScrollbarClass {
12588 ScrollbarClass parent_class;
12591 struct HSeparator /* : Separator */ {
12592 mixin Atk.ImplementorIface.__interface__;
12593 mixin Buildable.__interface__;
12594 mixin Orientable.__interface__;
12595 alias separator this;
12596 alias separator super_;
12597 Separator separator;
12599 static HSeparator* new_()() {
12600 return gtk_hseparator_new();
12604 struct HSeparatorClass {
12605 SeparatorClass parent_class;
12608 struct HandleBox /* : Bin */ {
12609 mixin Atk.ImplementorIface.__interface__;
12610 mixin Buildable.__interface__;
12611 alias bin this;
12612 alias bin super_;
12613 Bin bin;
12614 Gdk2.Window* bin_window, float_window;
12615 ShadowType shadow_type;
12616 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
12617 uint, "handle_position", 2,
12618 uint, "float_window_mapped", 1,
12619 uint, "child_detached", 1,
12620 uint, "in_drag", 1,
12621 uint, "shrink_on_detach", 1,
12622 int, "snap_edge", 3,
12623 uint, "__dummy32A", 23));
12624 int deskoff_x, deskoff_y;
12625 Allocation attach_allocation, float_allocation;
12627 static HandleBox* new_()() {
12628 return gtk_handle_box_new();
12631 // VERSION: 2.14
12632 // Whether the handlebox's child is currently detached.
12633 // RETURNS: %TRUE if the child is currently detached, otherwise %FALSE
12634 int get_child_detached()() {
12635 return gtk_handle_box_get_child_detached(&this);
12638 // Gets the handle position of the handle box. See
12639 // gtk_handle_box_set_handle_position().
12640 // RETURNS: the current handle position.
12641 PositionType get_handle_position()() {
12642 return gtk_handle_box_get_handle_position(&this);
12645 // Gets the type of shadow drawn around the handle box. See
12646 // gtk_handle_box_set_shadow_type().
12647 // RETURNS: the type of shadow currently drawn around the handle box.
12648 ShadowType get_shadow_type()() {
12649 return gtk_handle_box_get_shadow_type(&this);
12652 // Gets the edge used for determining reattachment of the handle box. See
12653 // gtk_handle_box_set_snap_edge().
12654 // is determined (as per default) from the handle position.
12655 // RETURNS: the edge used for determining reattachment, or (GtkPositionType)-1 if this
12656 PositionType get_snap_edge()() {
12657 return gtk_handle_box_get_snap_edge(&this);
12659 void set_handle_position()(PositionType position) {
12660 gtk_handle_box_set_handle_position(&this, position);
12662 void set_shadow_type()(ShadowType type) {
12663 gtk_handle_box_set_shadow_type(&this, type);
12665 void set_snap_edge()(PositionType edge) {
12666 gtk_handle_box_set_snap_edge(&this, edge);
12668 extern (C) alias static void function (HandleBox* this_, Widget* object, void* user_data=null) signal_child_attached;
12670 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12671 return super_.signal_connect!name(cb, data, cf);
12674 ulong signal_connect(string name:"child-attached", CB:signal_child_attached)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12675 return signal_connect_data!()(&this, cast(char*)"child-attached",
12676 cast(GObject2.Callback)cb, data, null, cf);
12678 extern (C) alias static void function (HandleBox* this_, Widget* object, void* user_data=null) signal_child_detached;
12679 ulong signal_connect(string name:"child-detached", CB:signal_child_detached)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12680 return signal_connect_data!()(&this, cast(char*)"child-detached",
12681 cast(GObject2.Callback)cb, data, null, cf);
12685 struct HandleBoxClass {
12686 BinClass parent_class;
12687 extern (C) void function (HandleBox* handle_box, Widget* child) child_attached;
12688 extern (C) void function (HandleBox* handle_box, Widget* child) child_detached;
12689 extern (C) void function () _gtk_reserved1;
12690 extern (C) void function () _gtk_reserved2;
12691 extern (C) void function () _gtk_reserved3;
12692 extern (C) void function () _gtk_reserved4;
12696 // #GtkIMContext defines the interface for GTK+ input methods. An input method
12697 // is used by GTK+ text input widgets like #GtkEntry to map from key events to
12698 // Unicode character strings.
12699 // The user may change the current input method via a context menu, unless the
12700 // #GtkSettings:gtk-show-input-method-menu GtkSettings property is set to FALSE.
12701 // The default input method can be set programmatically via the
12702 // #GtkSettings:gtk-im-module GtkSettings property. Alternatively, you may set
12703 // the GTK_IM_MODULE environment variable as documented in #gtk-running.
12704 // The #GtkEntry #GtkEntry:im-module and #GtkTextView #GtkTextView:im-module
12705 // properties may also be used to set input methods for specific widget
12706 // instances. For instance, a certain entry widget might be expected to contain
12707 // certain characters which would be easier to input with a certain input
12708 // method.
12709 // An input method may consume multiple key events in sequence and finally
12710 // output the composed result. This is called preediting, and an input method
12711 // may provide feedback about this process by displaying the intermediate
12712 // composition states as preedit text. For instance, the default GTK+ input
12713 // method implements the input of arbitrary Unicode code points by holding down
12714 // the Control and Shift keys and then typing "U" followed by the hexadecimal
12715 // digits of the code point. When releasing the Control and Shift keys,
12716 // preediting ends and the character is inserted as text. Ctrl+Shift+u20AC for
12717 // example results in the € sign.
12718 // Additional input methods can be made available for use by GTK+ widgets as
12719 // loadable modules. An input method module is a small shared library which
12720 // implements a subclass of #GtkIMContext or #GtkIMContextSimple and exports
12721 // these four functions:
12722 // <informalexample><programlisting>
12723 // void im_module_init(#GTypeModule *module);
12724 // </programlisting></informalexample>
12725 // This function should register the #GType of the #GtkIMContext subclass which
12726 // implements the input method by means of g_type_module_register_type(). Note
12727 // that g_type_register_static() cannot be used as the type needs to be
12728 // registered dynamically.
12729 // <informalexample><programlisting>
12730 // void im_module_exit(void);
12731 // </programlisting></informalexample>
12732 // Here goes any cleanup code your input method might require on module unload.
12733 // <informalexample><programlisting>
12734 // void im_module_list(const #GtkIMContextInfo ***contexts, int *n_contexts)
12735 // {
12736 // *contexts = info_list;
12737 // *n_contexts = G_N_ELEMENTS (info_list);
12738 // }
12739 // </programlisting></informalexample>
12740 // This function returns the list of input methods provided by the module. The
12741 // example implementation above shows a common solution and simply returns a
12742 // pointer to statically defined array of #GtkIMContextInfo items for each
12743 // provided input method.
12744 // <informalexample><programlisting>
12745 // #GtkIMContext * im_module_create(const #gchar *context_id);
12746 // </programlisting></informalexample>
12747 // This function should return a pointer to a newly created instance of the
12748 // #GtkIMContext subclass identified by @context_id. The context ID is the same
12749 // as specified in the #GtkIMContextInfo array returned by im_module_list().
12750 // After a new loadable input method module has been installed on the system,
12751 // the configuration file <filename>gtk.immodules</filename> needs to be
12752 // regenerated by <link linkend="gtk-query-immodules-2.0">gtk-query-immodules-2.0</link>,
12753 // in order for the new input method to become available to GTK+ applications.
12754 struct IMContext /* : GObject.Object */ {
12755 alias parent_instance this;
12756 alias parent_instance super_;
12757 alias parent_instance object;
12758 GObject2.Object parent_instance;
12761 // Asks the widget that the input context is attached to to delete
12762 // characters around the cursor position by emitting the
12763 // GtkIMContext::delete_surrounding signal. Note that @offset and @n_chars
12764 // are in characters not in bytes which differs from the usage other
12765 // places in #GtkIMContext.
12766 // In order to use this function, you should first call
12767 // gtk_im_context_get_surrounding() to get the current context, and
12768 // call this function immediately afterwards to make sure that you
12769 // know what you are deleting. You should also account for the fact
12770 // that even if the signal was handled, the input context might not
12771 // have deleted all the characters that were requested to be deleted.
12772 // This function is used by an input method that wants to make
12773 // subsitutions in the existing text in response to new input. It is
12774 // not useful for applications.
12775 // RETURNS: %TRUE if the signal was handled.
12776 // <offset>: offset from cursor position in chars; a negative value means start before the cursor.
12777 // <n_chars>: number of characters to delete.
12778 int delete_surrounding()(int offset, int n_chars) {
12779 return gtk_im_context_delete_surrounding(&this, offset, n_chars);
12782 // Allow an input method to internally handle key press and release
12783 // events. If this function returns %TRUE, then no further processing
12784 // should be done for this key event.
12785 // RETURNS: %TRUE if the input method handled the key event.
12786 // <event>: the key event
12787 int filter_keypress()(Gdk2.EventKey* event) {
12788 return gtk_im_context_filter_keypress(&this, event);
12791 // Notify the input method that the widget to which this
12792 // input context corresponds has gained focus. The input method
12793 // may, for example, change the displayed feedback to reflect
12794 // this change.
12795 void focus_in()() {
12796 gtk_im_context_focus_in(&this);
12799 // Notify the input method that the widget to which this
12800 // input context corresponds has lost focus. The input method
12801 // may, for example, change the displayed feedback or reset the contexts
12802 // state to reflect this change.
12803 void focus_out()() {
12804 gtk_im_context_focus_out(&this);
12807 // Retrieve the current preedit string for the input context,
12808 // and a list of attributes to apply to the string.
12809 // This string should be displayed inserted at the insertion
12810 // point.
12811 // <str>: location to store the retrieved string. The string retrieved must be freed with g_free().
12812 // <attrs>: location to store the retrieved attribute list. When you are done with this list, you must unreference it with pango_attr_list_unref().
12813 // <cursor_pos>: location to store position of cursor (in characters) within the preedit string.
12814 void get_preedit_string()(/*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos) {
12815 gtk_im_context_get_preedit_string(&this, str, attrs, cursor_pos);
12818 // Retrieves context around the insertion point. Input methods
12819 // typically want context in order to constrain input text based on
12820 // existing text; this is important for languages such as Thai where
12821 // only some sequences of characters are allowed.
12822 // This function is implemented by emitting the
12823 // GtkIMContext::retrieve_surrounding signal on the input method; in
12824 // response to this signal, a widget should provide as much context as
12825 // is available, up to an entire paragraph, by calling
12826 // gtk_im_context_set_surrounding(). Note that there is no obligation
12827 // for a widget to respond to the ::retrieve_surrounding signal, so input
12828 // methods must be prepared to function without context.
12829 // you must free the result stored in *text.
12830 // RETURNS: %TRUE if surrounding text was provided; in this case
12831 // <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().
12832 // <cursor_index>: (out) location to store byte index of the insertion cursor within @text.
12833 int get_surrounding()(/*out*/ char** text, int* cursor_index) {
12834 return gtk_im_context_get_surrounding(&this, text, cursor_index);
12837 // Notify the input method that a change such as a change in cursor
12838 // position has been made. This will typically cause the input
12839 // method to clear the preedit state.
12840 void reset()() {
12841 gtk_im_context_reset(&this);
12844 // Set the client window for the input context; this is the
12845 // #GdkWindow in which the input appears. This window is
12846 // used in order to correctly position status windows, and may
12847 // also be used for purposes internal to the input method.
12848 // <window>: the client window. This may be %NULL to indicate that the previous client window no longer exists.
12849 void set_client_window()(Gdk2.Window* window=null) {
12850 gtk_im_context_set_client_window(&this, window);
12853 // Notify the input method that a change in cursor
12854 // position has been made. The location is relative to the client
12855 // window.
12856 // <area>: new location
12857 void set_cursor_location()(Gdk2.Rectangle* area) {
12858 gtk_im_context_set_cursor_location(&this, area);
12861 // Sets surrounding context around the insertion point and preedit
12862 // string. This function is expected to be called in response to the
12863 // GtkIMContext::retrieve_surrounding signal, and will likely have no
12864 // effect if called at other times.
12865 // <text>: text surrounding the insertion point, as UTF-8. the preedit string should not be included within
12866 // <len>: the length of @text, or -1 if @text is nul-terminated
12867 // <cursor_index>: the byte index of the insertion cursor within @text.
12868 void set_surrounding()(char* text, int len, int cursor_index) {
12869 gtk_im_context_set_surrounding(&this, text, len, cursor_index);
12872 // Sets whether the IM context should use the preedit string
12873 // to display feedback. If @use_preedit is FALSE (default
12874 // is TRUE), then the IM context may use some other method to display
12875 // feedback, such as displaying it in a child of the root window.
12876 // <use_preedit>: whether the IM context should use the preedit string.
12877 void set_use_preedit()(int use_preedit) {
12878 gtk_im_context_set_use_preedit(&this, use_preedit);
12881 // The ::commit signal is emitted when a complete input sequence
12882 // has been entered by the user. This can be a single character
12883 // immediately after a key press or the final result of preediting.
12884 // <str>: the completed character(s) entered by the user
12885 extern (C) alias static void function (IMContext* this_, char* str, void* user_data=null) signal_commit;
12887 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12888 return super_.signal_connect!name(cb, data, cf);
12891 ulong signal_connect(string name:"commit", CB:signal_commit)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12892 return signal_connect_data!()(&this, cast(char*)"commit",
12893 cast(GObject2.Callback)cb, data, null, cf);
12896 // The ::delete-surrounding signal is emitted when the input method
12897 // needs to delete all or part of the context surrounding the cursor.
12898 // RETURNS: %TRUE if the signal was handled.
12899 // <offset>: the character offset from the cursor position of the text to be deleted. A negative value indicates a position before the cursor.
12900 // <n_chars>: the number of characters to be deleted
12901 extern (C) alias static c_int function (IMContext* this_, int offset, int n_chars, void* user_data=null) signal_delete_surrounding;
12902 ulong signal_connect(string name:"delete-surrounding", CB:signal_delete_surrounding)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12903 return signal_connect_data!()(&this, cast(char*)"delete-surrounding",
12904 cast(GObject2.Callback)cb, data, null, cf);
12907 // The ::preedit-changed signal is emitted whenever the preedit sequence
12908 // currently being entered has changed. It is also emitted at the end of
12909 // a preedit sequence, in which case
12910 // gtk_im_context_get_preedit_string() returns the empty string.
12911 extern (C) alias static void function (IMContext* this_, void* user_data=null) signal_preedit_changed;
12912 ulong signal_connect(string name:"preedit-changed", CB:signal_preedit_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12913 return signal_connect_data!()(&this, cast(char*)"preedit-changed",
12914 cast(GObject2.Callback)cb, data, null, cf);
12917 // The ::preedit-end signal is emitted when a preediting sequence
12918 // has been completed or canceled.
12919 extern (C) alias static void function (IMContext* this_, void* user_data=null) signal_preedit_end;
12920 ulong signal_connect(string name:"preedit-end", CB:signal_preedit_end)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12921 return signal_connect_data!()(&this, cast(char*)"preedit-end",
12922 cast(GObject2.Callback)cb, data, null, cf);
12925 // The ::preedit-start signal is emitted when a new preediting sequence
12926 // starts.
12927 extern (C) alias static void function (IMContext* this_, void* user_data=null) signal_preedit_start;
12928 ulong signal_connect(string name:"preedit-start", CB:signal_preedit_start)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12929 return signal_connect_data!()(&this, cast(char*)"preedit-start",
12930 cast(GObject2.Callback)cb, data, null, cf);
12933 // The ::retrieve-surrounding signal is emitted when the input method
12934 // requires the context surrounding the cursor. The callback should set
12935 // the input method surrounding context by calling the
12936 // gtk_im_context_set_surrounding() method.
12937 // RETURNS: %TRUE if the signal was handled.
12938 extern (C) alias static c_int function (IMContext* this_, void* user_data=null) signal_retrieve_surrounding;
12939 ulong signal_connect(string name:"retrieve-surrounding", CB:signal_retrieve_surrounding)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
12940 return signal_connect_data!()(&this, cast(char*)"retrieve-surrounding",
12941 cast(GObject2.Callback)cb, data, null, cf);
12945 struct IMContextClass {
12946 private ObjectClass parent_class;
12947 extern (C) void function (IMContext* context) preedit_start;
12948 extern (C) void function (IMContext* context) preedit_end;
12949 extern (C) void function (IMContext* context) preedit_changed;
12950 extern (C) void function (IMContext* context, char* str) commit;
12951 extern (C) int function (IMContext* context) retrieve_surrounding;
12953 // RETURNS: %TRUE if the signal was handled.
12954 // <offset>: offset from cursor position in chars; a negative value means start before the cursor.
12955 // <n_chars>: number of characters to delete.
12956 extern (C) int function (IMContext* context, int offset, int n_chars) delete_surrounding;
12957 // <window>: the client window. This may be %NULL to indicate that the previous client window no longer exists.
12958 extern (C) void function (IMContext* context, Gdk2.Window* window=null) set_client_window;
12960 // <str>: location to store the retrieved string. The string retrieved must be freed with g_free().
12961 // <attrs>: location to store the retrieved attribute list. When you are done with this list, you must unreference it with pango_attr_list_unref().
12962 // <cursor_pos>: location to store position of cursor (in characters) within the preedit string.
12963 extern (C) void function (IMContext* context, /*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos) get_preedit_string;
12965 // RETURNS: %TRUE if the input method handled the key event.
12966 // <event>: the key event
12967 extern (C) int function (IMContext* context, Gdk2.EventKey* event) filter_keypress;
12968 extern (C) void function (IMContext* context) focus_in;
12969 extern (C) void function (IMContext* context) focus_out;
12970 extern (C) void function (IMContext* context) reset;
12971 // <area>: new location
12972 extern (C) void function (IMContext* context, Gdk2.Rectangle* area) set_cursor_location;
12973 // <use_preedit>: whether the IM context should use the preedit string.
12974 extern (C) void function (IMContext* context, int use_preedit) set_use_preedit;
12976 // <text>: text surrounding the insertion point, as UTF-8. the preedit string should not be included within
12977 // <len>: the length of @text, or -1 if @text is nul-terminated
12978 // <cursor_index>: the byte index of the insertion cursor within @text.
12979 extern (C) void function (IMContext* context, char* text, int len, int cursor_index) set_surrounding;
12981 // RETURNS: %TRUE if surrounding text was provided; in this case
12982 // <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().
12983 // <cursor_index>: (out) location to store byte index of the insertion cursor within @text.
12984 extern (C) int function (IMContext* context, /*out*/ char** text, int* cursor_index) get_surrounding;
12985 extern (C) void function () _gtk_reserved1;
12986 extern (C) void function () _gtk_reserved2;
12987 extern (C) void function () _gtk_reserved3;
12988 extern (C) void function () _gtk_reserved4;
12989 extern (C) void function () _gtk_reserved5;
12990 extern (C) void function () _gtk_reserved6;
12993 // Bookkeeping information about a loadable input method.
12994 struct IMContextInfo {
12995 char* context_id, context_name, domain, domain_dirname, default_locales;
12998 struct IMContextSimple /* : IMContext */ {
12999 alias object this;
13000 alias object super_;
13001 alias object imcontext;
13002 IMContext object;
13003 GLib2.SList* tables;
13004 uint[8] compose_buffer;
13005 dchar tentative_match;
13006 int tentative_match_len;
13007 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
13008 uint, "in_hex_sequence", 1,
13009 uint, "modifiers_dropped", 1,
13010 uint, "__dummy32A", 30));
13013 // Creates a new #GtkIMContextSimple.
13014 // RETURNS: a new #GtkIMContextSimple.
13015 static IMContextSimple* /*new*/ new_()() {
13016 return gtk_im_context_simple_new();
13019 // Adds an additional table to search to the input context.
13020 // Each row of the table consists of @max_seq_len key symbols
13021 // followed by two #guint16 interpreted as the high and low
13022 // words of a #gunicode value. Tables are searched starting
13023 // from the last added.
13024 // The table must be sorted in dictionary order on the
13025 // numeric value of the key symbol fields. (Values beyond
13026 // the length of the sequence should be zero.)
13027 // <data>: the table
13028 // <max_seq_len>: Maximum length of a sequence in the table (cannot be greater than #GTK_MAX_COMPOSE_LEN)
13029 // <n_seqs>: number of sequences in the table
13030 void add_table()(ushort* data, int max_seq_len, int n_seqs) {
13031 gtk_im_context_simple_add_table(&this, data, max_seq_len, n_seqs);
13035 struct IMContextSimpleClass {
13036 IMContextClass parent_class;
13039 struct IMMulticontext /* : IMContext */ {
13040 alias object this;
13041 alias object super_;
13042 alias object imcontext;
13043 IMContext object;
13044 IMContext* slave;
13045 IMMulticontextPrivate* priv;
13046 char* context_id;
13049 // Creates a new #GtkIMMulticontext.
13050 // RETURNS: a new #GtkIMMulticontext.
13051 static IMMulticontext* /*new*/ new_()() {
13052 return gtk_im_multicontext_new();
13055 // Add menuitems for various available input methods to a menu;
13056 // the menuitems, when selected, will switch the input method
13057 // for the context and the global default input method.
13058 // <menushell>: a #GtkMenuShell
13059 void append_menuitems()(MenuShell* menushell) {
13060 gtk_im_multicontext_append_menuitems(&this, menushell);
13063 // VERSION: 2.16
13064 // Gets the id of the currently active slave of the @context.
13065 // RETURNS: the id of the currently active slave
13066 char* get_context_id()() {
13067 return gtk_im_multicontext_get_context_id(&this);
13070 // VERSION: 2.16
13071 // Sets the context id for @context.
13072 // This causes the currently active slave of @context to be
13073 // replaced by the slave corresponding to the new context id.
13074 // <context_id>: the id to use
13075 void set_context_id()(char* context_id) {
13076 gtk_im_multicontext_set_context_id(&this, context_id);
13080 struct IMMulticontextClass {
13081 IMContextClass parent_class;
13082 extern (C) void function () _gtk_reserved1;
13083 extern (C) void function () _gtk_reserved2;
13084 extern (C) void function () _gtk_reserved3;
13085 extern (C) void function () _gtk_reserved4;
13088 struct IMMulticontextPrivate {
13091 enum IMPreeditStyle {
13092 NOTHING = 0,
13093 CALLBACK = 1,
13094 NONE = 2
13096 enum IMStatusStyle {
13097 NOTHING = 0,
13098 CALLBACK = 1,
13099 NONE = 2
13101 enum int INPUT_ERROR = -1;
13102 enum int INTERFACE_AGE = 8;
13103 struct IconFactory /* : GObject.Object */ {
13104 mixin Buildable.__interface__;
13105 alias parent_instance this;
13106 alias parent_instance super_;
13107 alias parent_instance object;
13108 GObject2.Object parent_instance;
13109 GLib2.HashTable* icons;
13112 // Creates a new #GtkIconFactory. An icon factory manages a collection
13113 // of #GtkIconSet<!-- -->s; a #GtkIconSet manages a set of variants of a
13114 // particular icon (i.e. a #GtkIconSet contains variants for different
13115 // sizes and widget states). Icons in an icon factory are named by a
13116 // stock ID, which is a simple string identifying the icon. Each
13117 // #GtkStyle has a list of #GtkIconFactory<!-- -->s derived from the current
13118 // theme; those icon factories are consulted first when searching for
13119 // an icon. If the theme doesn't set a particular icon, GTK+ looks for
13120 // the icon in a list of default icon factories, maintained by
13121 // gtk_icon_factory_add_default() and
13122 // gtk_icon_factory_remove_default(). Applications with icons should
13123 // add a default icon factory with their icons, which will allow
13124 // themes to override the icons for the application.
13125 // RETURNS: a new #GtkIconFactory
13126 static IconFactory* /*new*/ new_()() {
13127 return gtk_icon_factory_new();
13130 // Looks for an icon in the list of default icon factories. For
13131 // display to the user, you should use gtk_style_lookup_icon_set() on
13132 // the #GtkStyle for the widget that will display the icon, instead of
13133 // using this function directly, so that themes are taken into
13134 // account.
13135 // RETURNS: a #GtkIconSet, or %NULL
13136 // <stock_id>: an icon name
13137 static IconSet* lookup_default()(char* stock_id) {
13138 return gtk_icon_factory_lookup_default(stock_id);
13141 // Adds the given @icon_set to the icon factory, under the name
13142 // e.g. "myapp-whatever-icon". Normally applications create a
13143 // #GtkIconFactory, then add it to the list of default factories with
13144 // gtk_icon_factory_add_default(). Then they pass the @stock_id to
13145 // widgets such as #GtkImage to display the icon. Themes can provide
13146 // an icon with the same name (such as "myapp-whatever-icon") to
13147 // override your application's default icons. If an icon already
13148 // existed in @factory for @stock_id, it is unreferenced and replaced
13149 // with the new @icon_set.
13150 // <stock_id>: icon name
13151 // <icon_set>: icon set
13152 void add()(char* stock_id, IconSet* icon_set) {
13153 gtk_icon_factory_add(&this, stock_id, icon_set);
13156 // Adds an icon factory to the list of icon factories searched by
13157 // gtk_style_lookup_icon_set(). This means that, for example,
13158 // gtk_image_new_from_stock() will be able to find icons in @factory.
13159 // There will normally be an icon factory added for each library or
13160 // application that comes with icons. The default icon factories
13161 // can be overridden by themes.
13162 void add_default()() {
13163 gtk_icon_factory_add_default(&this);
13166 // Looks up @stock_id in the icon factory, returning an icon set
13167 // if found, otherwise %NULL. For display to the user, you should
13168 // use gtk_style_lookup_icon_set() on the #GtkStyle for the
13169 // widget that will display the icon, instead of using this
13170 // function directly, so that themes are taken into account.
13171 // RETURNS: icon set of @stock_id.
13172 // <stock_id>: an icon name
13173 IconSet* lookup()(char* stock_id) {
13174 return gtk_icon_factory_lookup(&this, stock_id);
13177 // Removes an icon factory from the list of default icon
13178 // factories. Not normally used; you might use it for a library that
13179 // can be unloaded or shut down.
13180 void remove_default()() {
13181 gtk_icon_factory_remove_default(&this);
13185 struct IconFactoryClass {
13186 GObject2.ObjectClass parent_class;
13187 extern (C) void function () _gtk_reserved1;
13188 extern (C) void function () _gtk_reserved2;
13189 extern (C) void function () _gtk_reserved3;
13190 extern (C) void function () _gtk_reserved4;
13193 struct IconInfo {
13195 // VERSION: 2.14
13196 // Creates a #GtkIconInfo for a #GdkPixbuf.
13197 // RETURNS: a #GtkIconInfo
13198 // <icon_theme>: a #GtkIconTheme
13199 // <pixbuf>: the pixbuf to wrap in a #GtkIconInfo
13200 static IconInfo* /*new*/ new_for_pixbuf()(IconTheme* icon_theme, GdkPixbuf2.Pixbuf* pixbuf) {
13201 return gtk_icon_info_new_for_pixbuf(icon_theme, pixbuf);
13204 // VERSION: 2.4
13205 // Make a copy of a #GtkIconInfo.
13206 // RETURNS: the new GtkIconInfo
13207 IconInfo* /*new*/ copy()() {
13208 return gtk_icon_info_copy(&this);
13211 // VERSION: 2.4
13212 // Free a #GtkIconInfo and associated information
13213 void free()() {
13214 gtk_icon_info_free(&this);
13217 // VERSION: 2.4
13218 // Fetches the set of attach points for an icon. An attach point
13219 // is a location in the icon that can be used as anchor points for attaching
13220 // emblems or overlays to the icon.
13221 // RETURNS: %TRUE if there are any attach points for the icon.
13222 // <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().
13223 // <n_points>: location to store the number of points in @points, or %NULL
13224 int get_attach_points()(Gdk2.Point** points=null, int* n_points=null) {
13225 return gtk_icon_info_get_attach_points(&this, points, n_points);
13228 // VERSION: 2.4
13229 // Gets the base size for the icon. The base size
13230 // is a size for the icon that was specified by
13231 // the icon theme creator. This may be different
13232 // than the actual size of image; an example of
13233 // this is small emblem icons that can be attached
13234 // to a larger icon. These icons will be given
13235 // the same base size as the larger icons to which
13236 // they are attached.
13237 // size is known for the icon.
13238 // RETURNS: the base size, or 0, if no base
13239 int get_base_size()() {
13240 return gtk_icon_info_get_base_size(&this);
13243 // VERSION: 2.4
13244 // Gets the built-in image for this icon, if any. To allow
13245 // GTK+ to use built in icon images, you must pass the
13246 // %GTK_ICON_LOOKUP_USE_BUILTIN to
13247 // gtk_icon_theme_lookup_icon().
13248 // extra reference is added to the returned pixbuf, so if
13249 // you want to keep it around, you must use g_object_ref().
13250 // The returned image must not be modified.
13251 // RETURNS: the built-in image pixbuf, or %NULL. No
13252 GdkPixbuf2.Pixbuf* get_builtin_pixbuf()() {
13253 return gtk_icon_info_get_builtin_pixbuf(&this);
13256 // VERSION: 2.4
13257 // Gets the display name for an icon. A display name is a
13258 // string to be used in place of the icon name in a user
13259 // visible context like a list of icons.
13260 // the icon doesn't have a specified display name. This value
13261 // is owned @icon_info and must not be modified or free.
13262 // RETURNS: the display name for the icon or %NULL, if
13263 char* get_display_name()() {
13264 return gtk_icon_info_get_display_name(&this);
13267 // VERSION: 2.4
13268 // Gets the coordinates of a rectangle within the icon
13269 // that can be used for display of information such
13270 // as a preview of the contents of a text file.
13271 // See gtk_icon_info_set_raw_coordinates() for further
13272 // information about the coordinate system.
13273 // RETURNS: %TRUE if the icon has an embedded rectangle
13274 // <rectangle>: #GdkRectangle in which to store embedded rectangle coordinates; coordinates are only stored when this function returns %TRUE.
13275 int get_embedded_rect()(/*out*/ Gdk2.Rectangle* rectangle) {
13276 return gtk_icon_info_get_embedded_rect(&this, rectangle);
13279 // VERSION: 2.4
13280 // Gets the filename for the icon. If the
13281 // %GTK_ICON_LOOKUP_USE_BUILTIN flag was passed
13282 // to gtk_icon_theme_lookup_icon(), there may be
13283 // no filename if a builtin icon is returned; in this
13284 // case, you should use gtk_icon_info_get_builtin_pixbuf().
13285 // if gtk_icon_info_get_builtin_pixbuf() should
13286 // be used instead. The return value is owned by
13287 // GTK+ and should not be modified or freed.
13288 // RETURNS: the filename for the icon, or %NULL
13289 char* get_filename()() {
13290 return gtk_icon_info_get_filename(&this);
13293 // VERSION: 2.4
13294 // Renders an icon previously looked up in an icon theme using
13295 // gtk_icon_theme_lookup_icon(); the size will be based on the size
13296 // passed to gtk_icon_theme_lookup_icon(). Note that the resulting
13297 // pixbuf may not be exactly this size; an icon theme may have icons
13298 // that differ slightly from their nominal sizes, and in addition GTK+
13299 // will avoid scaling icons that it considers sufficiently close to the
13300 // requested size or for which the source image would have to be scaled
13301 // up too far. (This maintains sharpness.). This behaviour can be changed
13302 // by passing the %GTK_ICON_LOOKUP_FORCE_SIZE flag when obtaining
13303 // the #GtkIconInfo. If this flag has been specified, the pixbuf
13304 // returned by this function will be scaled to the exact size.
13305 // created icon or a new reference to an internal icon, so you must
13306 // not modify the icon. Use g_object_unref() to release your reference
13307 // to the icon.
13308 // RETURNS: the rendered icon; this may be a newly
13309 GdkPixbuf2.Pixbuf* /*new*/ load_icon()(GLib2.Error** error=null) {
13310 return gtk_icon_info_load_icon(&this, error);
13313 // VERSION: 2.4
13314 // Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect()
13315 // and gtk_icon_info_get_attach_points() should be returned in their
13316 // original form as specified in the icon theme, instead of scaled
13317 // appropriately for the pixbuf returned by gtk_icon_info_load_icon().
13318 // Raw coordinates are somewhat strange; they are specified to be with
13319 // respect to the unscaled pixmap for PNG and XPM icons, but for SVG
13320 // icons, they are in a 1000x1000 coordinate space that is scaled
13321 // to the final size of the icon. You can determine if the icon is an SVG
13322 // icon by using gtk_icon_info_get_filename(), and seeing if it is non-%NULL
13323 // and ends in '.svg'.
13324 // This function is provided primarily to allow compatibility wrappers
13325 // for older API's, and is not expected to be useful for applications.
13326 // <raw_coordinates>: whether the coordinates of embedded rectangles and attached points should be returned in their original (unscaled) form.
13327 void set_raw_coordinates()(int raw_coordinates) {
13328 gtk_icon_info_set_raw_coordinates(&this, raw_coordinates);
13332 // Used to specify options for gtk_icon_theme_lookup_icon()
13333 enum IconLookupFlags {
13334 NO_SVG = 1,
13335 FORCE_SVG = 2,
13336 USE_BUILTIN = 4,
13337 GENERIC_FALLBACK = 8,
13338 FORCE_SIZE = 16
13340 struct IconSet {
13342 // Creates a new #GtkIconSet. A #GtkIconSet represents a single icon
13343 // in various sizes and widget states. It can provide a #GdkPixbuf
13344 // for a given size and state on request, and automatically caches
13345 // some of the rendered #GdkPixbuf objects.
13346 // Normally you would use gtk_widget_render_icon() instead of
13347 // using #GtkIconSet directly. The one case where you'd use
13348 // #GtkIconSet is to create application-specific icon sets to place in
13349 // a #GtkIconFactory.
13350 // RETURNS: a new #GtkIconSet
13351 static IconSet* /*new*/ new_()() {
13352 return gtk_icon_set_new();
13355 // Creates a new #GtkIconSet with @pixbuf as the default/fallback
13356 // source image. If you don't add any additional #GtkIconSource to the
13357 // icon set, all variants of the icon will be created from @pixbuf,
13358 // using scaling, pixelation, etc. as required to adjust the icon size
13359 // or make the icon look insensitive/prelighted.
13360 // RETURNS: a new #GtkIconSet
13361 // <pixbuf>: a #GdkPixbuf
13362 static IconSet* /*new*/ new_from_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf) {
13363 return gtk_icon_set_new_from_pixbuf(pixbuf);
13366 // Icon sets have a list of #GtkIconSource, which they use as base
13367 // icons for rendering icons in different states and sizes. Icons are
13368 // scaled, made to look insensitive, etc. in
13369 // gtk_icon_set_render_icon(), but #GtkIconSet needs base images to
13370 // work with. The base images and when to use them are described by
13371 // a #GtkIconSource.
13372 // This function copies @source, so you can reuse the same source immediately
13373 // without affecting the icon set.
13374 // to Previous Page" icon might point in a different direction in
13375 // Hebrew and in English; it might look different when insensitive;
13376 // and it might change size depending on toolbar mode (small/large
13377 // icons). So a single icon set would contain all those variants of
13378 // the icon, and you might add a separate source for each one.
13379 // You should nearly always add a "default" icon source with all
13380 // fields wildcarded, which will be used as a fallback if no more
13381 // specific source matches. #GtkIconSet always prefers more specific
13382 // icon sources to more generic icon sources. The order in which you
13383 // add the sources to the icon set does not matter.
13384 // gtk_icon_set_new_from_pixbuf() creates a new icon set with a
13385 // default icon source based on the given pixbuf.
13386 // <source>: a #GtkIconSource
13387 void add_source()(IconSource* source) {
13388 gtk_icon_set_add_source(&this, source);
13391 // Copies @icon_set by value.
13392 // RETURNS: a new #GtkIconSet identical to the first.
13393 IconSet* /*new*/ copy()() {
13394 return gtk_icon_set_copy(&this);
13397 // Obtains a list of icon sizes this icon set can render. The returned
13398 // array must be freed with g_free().
13399 // <sizes>: return location for array of sizes
13400 // <n_sizes>: location to store number of elements in returned array
13401 void get_sizes()(/*out*/ /*POINTER*/ int* sizes, /*out*/ int* n_sizes) {
13402 gtk_icon_set_get_sizes(&this, sizes, n_sizes);
13405 // Increments the reference count on @icon_set.
13406 // RETURNS: @icon_set.
13407 IconSet* /*new*/ ref_()() {
13408 return gtk_icon_set_ref(&this);
13411 // Renders an icon using gtk_style_render_icon(). In most cases,
13412 // gtk_widget_render_icon() is better, since it automatically provides
13413 // most of the arguments from the current widget settings. This
13414 // function never returns %NULL; if the icon can't be rendered
13415 // (perhaps because an image file fails to load), a default "missing
13416 // image" icon will be returned instead.
13417 // RETURNS: a #GdkPixbuf to be displayed
13418 // <style>: a #GtkStyle associated with @widget, or %NULL
13419 // <direction>: text direction
13420 // <state>: widget state
13421 // <size>: icon size. A size of (GtkIconSize)-1 means render at the size of the source and don't scale.
13422 // <widget>: widget that will display the icon, or %NULL. The only use that is typically made of this is to determine the appropriate #GdkScreen.
13423 // <detail>: detail to pass to the theme engine, or %NULL. Note that passing a detail of anything but %NULL will disable caching.
13424 GdkPixbuf2.Pixbuf* /*new*/ render_icon()(Style* style, TextDirection direction, StateType state, int size, Widget* widget=null, char* detail=null) {
13425 return gtk_icon_set_render_icon(&this, style, direction, state, size, widget, detail);
13428 // Decrements the reference count on @icon_set, and frees memory
13429 // if the reference count reaches 0.
13430 void unref()() {
13431 gtk_icon_set_unref(&this);
13435 enum IconSize {
13436 INVALID = 0,
13437 MENU = 1,
13438 SMALL_TOOLBAR = 2,
13439 LARGE_TOOLBAR = 3,
13440 BUTTON = 4,
13441 DND = 5,
13442 DIALOG = 6
13444 struct IconSource {
13446 // Creates a new #GtkIconSource. A #GtkIconSource contains a #GdkPixbuf (or
13447 // image filename) that serves as the base image for one or more of the
13448 // icons in a #GtkIconSet, along with a specification for which icons in the
13449 // icon set will be based on that pixbuf or image file. An icon set contains
13450 // a set of icons that represent "the same" logical concept in different states,
13451 // different global text directions, and different sizes.
13452 // So for example a web browser's "Back to Previous Page" icon might
13453 // point in a different direction in Hebrew and in English; it might
13454 // look different when insensitive; and it might change size depending
13455 // on toolbar mode (small/large icons). So a single icon set would
13456 // contain all those variants of the icon. #GtkIconSet contains a list
13457 // of #GtkIconSource from which it can derive specific icon variants in
13458 // the set.
13459 // In the simplest case, #GtkIconSet contains one source pixbuf from
13460 // which it derives all variants. The convenience function
13461 // gtk_icon_set_new_from_pixbuf() handles this case; if you only have
13462 // one source pixbuf, just use that function.
13463 // If you want to use a different base pixbuf for different icon
13464 // variants, you create multiple icon sources, mark which variants
13465 // they'll be used to create, and add them to the icon set with
13466 // gtk_icon_set_add_source().
13467 // By default, the icon source has all parameters wildcarded. That is,
13468 // the icon source will be used as the base icon for any desired text
13469 // direction, widget state, or icon size.
13470 // RETURNS: a new #GtkIconSource
13471 static IconSource* /*new*/ new_()() {
13472 return gtk_icon_source_new();
13475 // Creates a copy of @source; mostly useful for language bindings.
13476 // RETURNS: a new #GtkIconSource
13477 IconSource* /*new*/ copy()() {
13478 return gtk_icon_source_copy(&this);
13481 // Frees a dynamically-allocated icon source, along with its
13482 // filename, size, and pixbuf fields if those are not %NULL.
13483 void free()() {
13484 gtk_icon_source_free(&this);
13487 // Obtains the text direction this icon source applies to. The return
13488 // value is only useful/meaningful if the text direction is <emphasis>not</emphasis>
13489 // wildcarded.
13490 // RETURNS: text direction this source matches
13491 TextDirection get_direction()() {
13492 return gtk_icon_source_get_direction(&this);
13495 // Gets the value set by gtk_icon_source_set_direction_wildcarded().
13496 // RETURNS: %TRUE if this icon source is a base for any text direction variant
13497 int get_direction_wildcarded()() {
13498 return gtk_icon_source_get_direction_wildcarded(&this);
13501 // Retrieves the source filename, or %NULL if none is set. The
13502 // filename is not a copy, and should not be modified or expected to
13503 // persist beyond the lifetime of the icon source.
13504 // or freed.
13505 // RETURNS: image filename. This string must not be modified
13506 char* get_filename()() {
13507 return gtk_icon_source_get_filename(&this);
13510 // Retrieves the source icon name, or %NULL if none is set. The
13511 // icon_name is not a copy, and should not be modified or expected to
13512 // persist beyond the lifetime of the icon source.
13513 // RETURNS: icon name. This string must not be modified or freed.
13514 char* get_icon_name()() {
13515 return gtk_icon_source_get_icon_name(&this);
13518 // Retrieves the source pixbuf, or %NULL if none is set.
13519 // In addition, if a filename source is in use, this
13520 // function in some cases will return the pixbuf from
13521 // loaded from the filename. This is, for example, true
13522 // for the GtkIconSource passed to the GtkStyle::render_icon()
13523 // virtual function. The reference count on the pixbuf is
13524 // not incremented.
13525 // RETURNS: source pixbuf
13526 GdkPixbuf2.Pixbuf* get_pixbuf()() {
13527 return gtk_icon_source_get_pixbuf(&this);
13530 // Obtains the icon size this source applies to. The return value
13531 // is only useful/meaningful if the icon size is <emphasis>not</emphasis> wildcarded.
13532 // RETURNS: icon size this source matches.
13533 int get_size()() {
13534 return gtk_icon_source_get_size(&this);
13537 // Gets the value set by gtk_icon_source_set_size_wildcarded().
13538 // RETURNS: %TRUE if this icon source is a base for any icon size variant
13539 int get_size_wildcarded()() {
13540 return gtk_icon_source_get_size_wildcarded(&this);
13543 // Obtains the widget state this icon source applies to. The return
13544 // value is only useful/meaningful if the widget state is <emphasis>not</emphasis>
13545 // wildcarded.
13546 // RETURNS: widget state this source matches
13547 StateType get_state()() {
13548 return gtk_icon_source_get_state(&this);
13551 // Gets the value set by gtk_icon_source_set_state_wildcarded().
13552 // RETURNS: %TRUE if this icon source is a base for any widget state variant
13553 int get_state_wildcarded()() {
13554 return gtk_icon_source_get_state_wildcarded(&this);
13557 // Sets the text direction this icon source is intended to be used
13558 // with.
13559 // Setting the text direction on an icon source makes no difference
13560 // if the text direction is wildcarded. Therefore, you should usually
13561 // call gtk_icon_source_set_direction_wildcarded() to un-wildcard it
13562 // in addition to calling this function.
13563 // <direction>: text direction this source applies to
13564 void set_direction()(TextDirection direction) {
13565 gtk_icon_source_set_direction(&this, direction);
13568 // If the text direction is wildcarded, this source can be used
13569 // as the base image for an icon in any #GtkTextDirection.
13570 // If the text direction is not wildcarded, then the
13571 // text direction the icon source applies to should be set
13572 // with gtk_icon_source_set_direction(), and the icon source
13573 // will only be used with that text direction.
13574 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
13575 // wildcarded sources, and will use an exact match when possible.
13576 // <setting>: %TRUE to wildcard the text direction
13577 void set_direction_wildcarded()(int setting) {
13578 gtk_icon_source_set_direction_wildcarded(&this, setting);
13581 // Sets the name of an image file to use as a base image when creating
13582 // icon variants for #GtkIconSet. The filename must be absolute.
13583 // <filename>: image file to use
13584 void set_filename()(char* filename) {
13585 gtk_icon_source_set_filename(&this, filename);
13588 // Sets the name of an icon to look up in the current icon theme
13589 // to use as a base image when creating icon variants for #GtkIconSet.
13590 // <icon_name>: name of icon to use
13591 void set_icon_name()(char* icon_name=null) {
13592 gtk_icon_source_set_icon_name(&this, icon_name);
13595 // Sets a pixbuf to use as a base image when creating icon variants
13596 // for #GtkIconSet.
13597 // <pixbuf>: pixbuf to use as a source
13598 void set_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf) {
13599 gtk_icon_source_set_pixbuf(&this, pixbuf);
13602 // Sets the icon size this icon source is intended to be used
13603 // with.
13604 // Setting the icon size on an icon source makes no difference
13605 // if the size is wildcarded. Therefore, you should usually
13606 // call gtk_icon_source_set_size_wildcarded() to un-wildcard it
13607 // in addition to calling this function.
13608 // <size>: icon size this source applies to
13609 void set_size()(int size) {
13610 gtk_icon_source_set_size(&this, size);
13613 // If the icon size is wildcarded, this source can be used as the base
13614 // image for an icon of any size. If the size is not wildcarded, then
13615 // the size the source applies to should be set with
13616 // gtk_icon_source_set_size() and the icon source will only be used
13617 // with that specific size.
13618 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
13619 // wildcarded sources, and will use an exact match when possible.
13620 // #GtkIconSet will normally scale wildcarded source images to produce
13621 // an appropriate icon at a given size, but will not change the size
13622 // of source images that match exactly.
13623 // <setting>: %TRUE to wildcard the widget state
13624 void set_size_wildcarded()(int setting) {
13625 gtk_icon_source_set_size_wildcarded(&this, setting);
13628 // Sets the widget state this icon source is intended to be used
13629 // with.
13630 // Setting the widget state on an icon source makes no difference
13631 // if the state is wildcarded. Therefore, you should usually
13632 // call gtk_icon_source_set_state_wildcarded() to un-wildcard it
13633 // in addition to calling this function.
13634 // <state>: widget state this source applies to
13635 void set_state()(StateType state) {
13636 gtk_icon_source_set_state(&this, state);
13639 // If the widget state is wildcarded, this source can be used as the
13640 // base image for an icon in any #GtkStateType. If the widget state
13641 // is not wildcarded, then the state the source applies to should be
13642 // set with gtk_icon_source_set_state() and the icon source will
13643 // only be used with that specific state.
13644 // #GtkIconSet prefers non-wildcarded sources (exact matches) over
13645 // wildcarded sources, and will use an exact match when possible.
13646 // #GtkIconSet will normally transform wildcarded source images to
13647 // produce an appropriate icon for a given state, for example
13648 // lightening an image on prelight, but will not modify source images
13649 // that match exactly.
13650 // <setting>: %TRUE to wildcard the widget state
13651 void set_state_wildcarded()(int setting) {
13652 gtk_icon_source_set_state_wildcarded(&this, setting);
13656 struct IconTheme /* : GObject.Object */ {
13657 alias parent_instance this;
13658 alias parent_instance super_;
13659 alias parent_instance object;
13660 GObject2.Object parent_instance;
13661 private IconThemePrivate* priv;
13664 // VERSION: 2.4
13665 // Creates a new icon theme object. Icon theme objects are used
13666 // to lookup up an icon by name in a particular icon theme.
13667 // Usually, you'll want to use gtk_icon_theme_get_default()
13668 // or gtk_icon_theme_get_for_screen() rather than creating
13669 // a new icon theme object for scratch.
13670 // RETURNS: the newly created #GtkIconTheme object.
13671 static IconTheme* /*new*/ new_()() {
13672 return gtk_icon_theme_new();
13675 // VERSION: 2.4
13676 // Registers a built-in icon for icon theme lookups. The idea
13677 // of built-in icons is to allow an application or library
13678 // that uses themed icons to function requiring files to
13679 // be present in the file system. For instance, the default
13680 // images for all of GTK+'s stock icons are registered
13681 // as built-icons.
13682 // In general, if you use gtk_icon_theme_add_builtin_icon()
13683 // you should also install the icon in the icon theme, so
13684 // that the icon is generally available.
13685 // This function will generally be used with pixbufs loaded
13686 // via gdk_pixbuf_new_from_inline().
13687 // <icon_name>: the name of the icon to register
13688 // <size>: the size at which to register the icon (different images can be registered for the same icon name at different sizes.)
13689 // <pixbuf>: #GdkPixbuf that contains the image to use for @icon_name.
13690 static void add_builtin_icon()(char* icon_name, int size, GdkPixbuf2.Pixbuf* pixbuf) {
13691 gtk_icon_theme_add_builtin_icon(icon_name, size, pixbuf);
13694 // VERSION: 2.4
13695 // Gets the icon theme for the default screen. See
13696 // gtk_icon_theme_get_for_screen().
13697 // the default screen. This icon theme is associated with
13698 // the screen and can be used as long as the screen
13699 // is open. Do not ref or unref it.
13700 // RETURNS: A unique #GtkIconTheme associated with
13701 static IconTheme* get_default()() {
13702 return gtk_icon_theme_get_default();
13705 // VERSION: 2.4
13706 // Gets the icon theme object associated with @screen; if this
13707 // function has not previously been called for the given
13708 // screen, a new icon theme object will be created and
13709 // associated with the screen. Icon theme objects are
13710 // fairly expensive to create, so using this function
13711 // is usually a better choice than calling than gtk_icon_theme_new()
13712 // and setting the screen yourself; by using this function
13713 // a single icon theme object will be shared between users.
13714 // the given screen. This icon theme is associated with
13715 // the screen and can be used as long as the screen
13716 // is open. Do not ref or unref it.
13717 // RETURNS: A unique #GtkIconTheme associated with
13718 // <screen>: a #GdkScreen
13719 static IconTheme* get_for_screen()(Gdk2.Screen* screen) {
13720 return gtk_icon_theme_get_for_screen(screen);
13723 // VERSION: 2.4
13724 // Appends a directory to the search path.
13725 // See gtk_icon_theme_set_search_path().
13726 // <path>: directory name to append to the icon path
13727 void append_search_path()(char* path) {
13728 gtk_icon_theme_append_search_path(&this, path);
13731 // VERSION: 2.12
13732 // Looks up a named icon and returns a structure containing
13733 // information such as the filename of the icon. The icon
13734 // can then be rendered into a pixbuf using
13735 // gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
13736 // combines these two steps if all you need is the pixbuf.)
13737 // If @icon_names contains more than one name, this function
13738 // tries them all in the given order before falling back to
13739 // inherited icon themes.
13740 // about the icon, or %NULL if the icon wasn't found. Free with
13741 // gtk_icon_info_free()
13742 // RETURNS: a #GtkIconInfo structure containing information
13743 // <icon_names>: %NULL-terminated array of icon names to lookup
13744 // <size>: desired icon size
13745 // <flags>: flags modifying the behavior of the icon lookup
13746 IconInfo* /*new*/ choose_icon()(char* icon_names, int size, IconLookupFlags flags) {
13747 return gtk_icon_theme_choose_icon(&this, icon_names, size, flags);
13750 // VERSION: 2.4
13751 // Gets the name of an icon that is representative of the
13752 // current theme (for instance, to use when presenting
13753 // a list of themes to the user.)
13754 // Free with g_free().
13755 // RETURNS: the name of an example icon or %NULL.
13756 char* /*new*/ get_example_icon_name()() {
13757 return gtk_icon_theme_get_example_icon_name(&this);
13760 // VERSION: 2.6
13761 // Returns an array of integers describing the sizes at which
13762 // the icon is available without scaling. A size of -1 means
13763 // that the icon is available in a scalable format. The array
13764 // is zero-terminated.
13765 // describing the sizes at which the icon is available. The array
13766 // should be freed with g_free() when it is no longer needed.
13767 // RETURNS: An newly allocated array
13768 // <icon_name>: the name of an icon
13769 int* get_icon_sizes()(char* icon_name) {
13770 return gtk_icon_theme_get_icon_sizes(&this, icon_name);
13773 // VERSION: 2.4
13774 // Gets the current search path. See gtk_icon_theme_set_search_path().
13775 // <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().
13776 // <n_elements>: location to store number of elements in @path, or %NULL
13777 void get_search_path()(char** path, int* n_elements) {
13778 gtk_icon_theme_get_search_path(&this, path, n_elements);
13781 // VERSION: 2.4
13782 // Checks whether an icon theme includes an icon
13783 // for a particular name.
13784 // icon for @icon_name.
13785 // RETURNS: %TRUE if @icon_theme includes an
13786 // <icon_name>: the name of an icon
13787 int has_icon()(char* icon_name) {
13788 return gtk_icon_theme_has_icon(&this, icon_name);
13791 // VERSION: 2.12
13792 // Gets the list of contexts available within the current
13793 // hierarchy of icon themes
13794 // contexts in the theme. You must first free each element
13795 // in the list with g_free(), then free the list itself
13796 // with g_list_free().
13797 // RETURNS: a #GList list holding the names of all the
13798 GLib2.List* /*new*/ list_contexts()() {
13799 return gtk_icon_theme_list_contexts(&this);
13802 // VERSION: 2.4
13803 // Lists the icons in the current icon theme. Only a subset
13804 // of the icons can be listed by providing a context string.
13805 // The set of values for the context string is system dependent,
13806 // but will typically include such values as "Applications" and
13807 // "MimeTypes".
13808 // holding the names of all the icons in the theme. You must first
13809 // free each element in the list with g_free(), then free the list
13810 // itself with g_list_free().
13811 // RETURNS: a #GList list
13812 // <context>: a string identifying a particular type of icon, or %NULL to list all icons.
13813 GLib2.List* /*new*/ list_icons()(char* context) {
13814 return gtk_icon_theme_list_icons(&this, context);
13817 // VERSION: 2.4
13818 // Looks up an icon in an icon theme, scales it to the given size
13819 // and renders it into a pixbuf. This is a convenience function;
13820 // if more details about the icon are needed, use
13821 // gtk_icon_theme_lookup_icon() followed by gtk_icon_info_load_icon().
13822 // Note that you probably want to listen for icon theme changes and
13823 // update the icon. This is usually done by connecting to the
13824 // GtkWidget::style-set signal. If for some reason you do not want to
13825 // update the icon when the icon theme changes, you should consider
13826 // using gdk_pixbuf_copy() to make a private copy of the pixbuf
13827 // returned by this function. Otherwise GTK+ may need to keep the old
13828 // icon theme loaded, which would be a waste of memory.
13829 // created icon or a new reference to an internal icon, so you must not modify
13830 // the icon. Use g_object_unref() to release your reference to the
13831 // icon. %NULL if the icon isn't found.
13832 // RETURNS: the rendered icon; this may be a newly
13833 // <icon_name>: the name of the icon to lookup
13834 // <size>: the desired icon size. The resulting icon may not be exactly this size; see gtk_icon_info_load_icon().
13835 // <flags>: flags modifying the behavior of the icon lookup
13836 GdkPixbuf2.Pixbuf* /*new*/ load_icon()(char* icon_name, int size, IconLookupFlags flags, GLib2.Error** error=null) {
13837 return gtk_icon_theme_load_icon(&this, icon_name, size, flags, error);
13840 // VERSION: 2.14
13841 // Looks up an icon and returns a structure containing
13842 // information such as the filename of the icon.
13843 // The icon can then be rendered into a pixbuf using
13844 // gtk_icon_info_load_icon().
13845 // information about the icon, or %NULL if the icon
13846 // wasn't found. Free with gtk_icon_info_free()
13847 // RETURNS: a #GtkIconInfo structure containing
13848 // <icon>: the #GIcon to look up
13849 // <size>: desired icon size
13850 // <flags>: flags modifying the behavior of the icon lookup
13851 IconInfo* /*new*/ lookup_by_gicon()(Gio2.Icon* icon, int size, IconLookupFlags flags) {
13852 return gtk_icon_theme_lookup_by_gicon(&this, icon, size, flags);
13855 // VERSION: 2.4
13856 // Looks up a named icon and returns a structure containing
13857 // information such as the filename of the icon. The icon
13858 // can then be rendered into a pixbuf using
13859 // gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
13860 // combines these two steps if all you need is the pixbuf.)
13861 // about the icon, or %NULL if the icon wasn't found. Free with
13862 // gtk_icon_info_free()
13863 // RETURNS: a #GtkIconInfo structure containing information
13864 // <icon_name>: the name of the icon to lookup
13865 // <size>: desired icon size
13866 // <flags>: flags modifying the behavior of the icon lookup
13867 IconInfo* /*new*/ lookup_icon()(char* icon_name, int size, IconLookupFlags flags) {
13868 return gtk_icon_theme_lookup_icon(&this, icon_name, size, flags);
13871 // VERSION: 2.4
13872 // Prepends a directory to the search path.
13873 // See gtk_icon_theme_set_search_path().
13874 // <path>: directory name to prepend to the icon path
13875 void prepend_search_path()(char* path) {
13876 gtk_icon_theme_prepend_search_path(&this, path);
13879 // VERSION: 2.4
13880 // Checks to see if the icon theme has changed; if it has, any
13881 // currently cached information is discarded and will be reloaded
13882 // next time @icon_theme is accessed.
13883 // to be reloaded.
13884 // RETURNS: %TRUE if the icon theme has changed and needed
13885 int rescan_if_needed()() {
13886 return gtk_icon_theme_rescan_if_needed(&this);
13889 // VERSION: 2.4
13890 // Sets the name of the icon theme that the #GtkIconTheme object uses
13891 // overriding system configuration. This function cannot be called
13892 // on the icon theme objects returned from gtk_icon_theme_get_default()
13893 // and gtk_icon_theme_get_for_screen().
13894 // <theme_name>: name of icon theme to use instead of configured theme, or %NULL to unset a previously set custom theme
13895 void set_custom_theme()(char* theme_name) {
13896 gtk_icon_theme_set_custom_theme(&this, theme_name);
13899 // VERSION: 2.4
13900 // Sets the screen for an icon theme; the screen is used
13901 // to track the user's currently configured icon theme,
13902 // which might be different for different screens.
13903 // <screen>: a #GdkScreen
13904 void set_screen()(Gdk2.Screen* screen) {
13905 gtk_icon_theme_set_screen(&this, screen);
13908 // VERSION: 2.4
13909 // Sets the search path for the icon theme object. When looking
13910 // for an icon theme, GTK+ will search for a subdirectory of
13911 // one or more of the directories in @path with the same name
13912 // as the icon theme. (Themes from multiple of the path elements
13913 // are combined to allow themes to be extended by adding icons
13914 // in the user's home directory.)
13915 // In addition if an icon found isn't found either in the current
13916 // icon theme or the default icon theme, and an image file with
13917 // the right name is found directly in one of the elements of
13918 // (This is legacy feature, and new icons should be put
13919 // into the default icon theme, which is called DEFAULT_THEME_NAME,
13920 // rather than directly on the icon path.)
13921 // <path>: array of directories that are searched for icon themes
13922 // <n_elements>: number of elements in @path.
13923 void set_search_path()(char* path, int n_elements) {
13924 gtk_icon_theme_set_search_path(&this, path, n_elements);
13927 // Emitted when the current icon theme is switched or GTK+ detects
13928 // that a change has occurred in the contents of the current
13929 // icon theme.
13930 extern (C) alias static void function (IconTheme* this_, void* user_data=null) signal_changed;
13932 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13933 return super_.signal_connect!name(cb, data, cf);
13936 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
13937 return signal_connect_data!()(&this, cast(char*)"changed",
13938 cast(GObject2.Callback)cb, data, null, cf);
13942 struct IconThemeClass {
13943 GObject2.ObjectClass parent_class;
13944 extern (C) void function (IconTheme* icon_theme) changed;
13947 // Error codes for GtkIconTheme operations.
13948 enum IconThemeError {
13949 NOT_FOUND = 0,
13950 FAILED = 1
13952 struct IconThemePrivate {
13955 struct IconView /* : Container */ {
13956 mixin Atk.ImplementorIface.__interface__;
13957 mixin Buildable.__interface__;
13958 mixin CellLayout.__interface__;
13959 alias parent this;
13960 alias parent super_;
13961 alias parent container;
13962 Container parent;
13963 IconViewPrivate* priv;
13966 // VERSION: 2.6
13967 // Creates a new #GtkIconView widget
13968 // RETURNS: A newly created #GtkIconView widget
13969 static IconView* new_()() {
13970 return gtk_icon_view_new();
13973 // VERSION: 2.6
13974 // Creates a new #GtkIconView widget with the model @model.
13975 // RETURNS: A newly created #GtkIconView widget.
13976 // <model>: The model.
13977 static IconView* new_with_model()(TreeModel* model) {
13978 return gtk_icon_view_new_with_model(model);
13981 // VERSION: 2.12
13982 // Converts widget coordinates to coordinates for the bin_window,
13983 // as expected by e.g. gtk_icon_view_get_path_at_pos().
13984 // <wx>: X coordinate relative to the widget
13985 // <wy>: Y coordinate relative to the widget
13986 // <bx>: return location for bin_window X coordinate
13987 // <by>: return location for bin_window Y coordinate
13988 void convert_widget_to_bin_window_coords()(int wx, int wy, /*out*/ int* bx, /*out*/ int* by) {
13989 gtk_icon_view_convert_widget_to_bin_window_coords(&this, wx, wy, bx, by);
13992 // VERSION: 2.8
13993 // Creates a #GdkPixmap representation of the item at @path.
13994 // This image is used for a drag icon.
13995 // RETURNS: a newly-allocated pixmap of the drag icon.
13996 // <path>: a #GtkTreePath in @icon_view
13997 Gdk2.Pixmap* /*new*/ create_drag_icon()(TreePath* path) {
13998 return gtk_icon_view_create_drag_icon(&this, path);
14001 // VERSION: 2.8
14002 // Turns @icon_view into a drop destination for automatic DND. Calling this
14003 // method sets #GtkIconView:reorderable to %FALSE.
14004 // <targets>: the table of targets that the drag will support
14005 // <n_targets>: the number of items in @targets
14006 // <actions>: the bitmask of possible actions for a drag to this widget
14007 void enable_model_drag_dest()(TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
14008 gtk_icon_view_enable_model_drag_dest(&this, targets, n_targets, actions);
14011 // VERSION: 2.8
14012 // Turns @icon_view into a drag source for automatic DND. Calling this
14013 // method sets #GtkIconView:reorderable to %FALSE.
14014 // <start_button_mask>: Mask of allowed buttons to start drag
14015 // <targets>: the table of targets that the drag will support
14016 // <n_targets>: the number of items in @targets
14017 // <actions>: the bitmask of possible actions for a drag from this widget
14018 void enable_model_drag_source()(Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
14019 gtk_icon_view_enable_model_drag_source(&this, start_button_mask, targets, n_targets, actions);
14022 // VERSION: 2.6
14023 // Returns the value of the ::column-spacing property.
14024 // RETURNS: the space between columns
14025 int get_column_spacing()() {
14026 return gtk_icon_view_get_column_spacing(&this);
14029 // VERSION: 2.6
14030 // Returns the value of the ::columns property.
14031 // RETURNS: the number of columns, or -1
14032 int get_columns()() {
14033 return gtk_icon_view_get_columns(&this);
14036 // VERSION: 2.8
14037 // Fills in @path and @cell with the current cursor path and cell.
14038 // If the cursor isn't currently set, then *@path will be %NULL.
14039 // If no cell currently has focus, then *@cell will be %NULL.
14040 // The returned #GtkTreePath must be freed with gtk_tree_path_free().
14041 // RETURNS: %TRUE if the cursor is set.
14042 // <path>: Return location for the current cursor path, or %NULL
14043 // <cell>: Return location the current focus cell, or %NULL
14044 int get_cursor()(TreePath** path=null, CellRenderer** cell=null) {
14045 return gtk_icon_view_get_cursor(&this, path, cell);
14048 // VERSION: 2.8
14049 // Determines the destination item for a given position.
14050 // RETURNS: whether there is an item at the given position.
14051 // <drag_x>: the position to determine the destination item for
14052 // <drag_y>: the position to determine the destination item for
14053 // <path>: Return location for the path of the item, or %NULL.
14054 // <pos>: Return location for the drop position, or %NULL
14055 int get_dest_item_at_pos()(int drag_x, int drag_y, TreePath** path=null, IconViewDropPosition* pos=null) {
14056 return gtk_icon_view_get_dest_item_at_pos(&this, drag_x, drag_y, path, pos);
14059 // VERSION: 2.8
14060 // Gets information about the item that is highlighted for feedback.
14061 // <path>: Return location for the path of the highlighted item, or %NULL.
14062 // <pos>: Return location for the drop position, or %NULL
14063 void get_drag_dest_item()(TreePath** path=null, IconViewDropPosition* pos=null) {
14064 gtk_icon_view_get_drag_dest_item(&this, path, pos);
14067 // VERSION: 2.8
14068 // Finds the path at the point (@x, @y), relative to bin_window coordinates.
14069 // In contrast to gtk_icon_view_get_path_at_pos(), this function also
14070 // obtains the cell at the specified position. The returned path should
14071 // be freed with gtk_tree_path_free().
14072 // See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
14073 // widget coordinates to bin_window coordinates.
14074 // RETURNS: %TRUE if an item exists at the specified position
14075 // <x>: The x position to be identified
14076 // <y>: The y position to be identified
14077 // <path>: Return location for the path, or %NULL
14078 // <cell>: Return location for the renderer responsible for the cell at (@x, @y), or %NULL
14079 int get_item_at_pos()(int x, int y, TreePath** path, CellRenderer** cell) {
14080 return gtk_icon_view_get_item_at_pos(&this, x, y, path, cell);
14083 // VERSION: 2.22
14084 // Gets the column in which the item @path is currently
14085 // displayed. Column numbers start at 0.
14086 // RETURNS: The column in which the item is displayed
14087 // <path>: the #GtkTreePath of the item
14088 int get_item_column()(TreePath* path) {
14089 return gtk_icon_view_get_item_column(&this, path);
14092 // VERSION: 2.22
14093 // Returns the value of the ::item-orientation property which determines
14094 // whether the labels are drawn beside the icons instead of below.
14095 // RETURNS: the relative position of texts and icons
14096 Orientation get_item_orientation()() {
14097 return gtk_icon_view_get_item_orientation(&this);
14100 // VERSION: 2.18
14101 // Returns the value of the ::item-padding property.
14102 // RETURNS: the padding around items
14103 int get_item_padding()() {
14104 return gtk_icon_view_get_item_padding(&this);
14107 // VERSION: 2.22
14108 // Gets the row in which the item @path is currently
14109 // displayed. Row numbers start at 0.
14110 // RETURNS: The row in which the item is displayed
14111 // <path>: the #GtkTreePath of the item
14112 int get_item_row()(TreePath* path) {
14113 return gtk_icon_view_get_item_row(&this, path);
14116 // VERSION: 2.6
14117 // Returns the value of the ::item-width property.
14118 // RETURNS: the width of a single item, or -1
14119 int get_item_width()() {
14120 return gtk_icon_view_get_item_width(&this);
14123 // VERSION: 2.6
14124 // Returns the value of the ::margin property.
14125 // RETURNS: the space at the borders
14126 int get_margin()() {
14127 return gtk_icon_view_get_margin(&this);
14130 // VERSION: 2.6
14131 // Returns the column with markup text for @icon_view.
14132 // RETURNS: the markup column, or -1 if it's unset.
14133 int get_markup_column()() {
14134 return gtk_icon_view_get_markup_column(&this);
14137 // VERSION: 2.6
14138 // Returns the model the #GtkIconView is based on. Returns %NULL if the
14139 // model is unset.
14140 // currently being used.
14141 // RETURNS: A #GtkTreeModel, or %NULL if none is
14142 TreeModel* get_model()() {
14143 return gtk_icon_view_get_model(&this);
14146 // VERSION: 2.6
14147 // DEPRECATED (v2.22) method: get_orientation - Use gtk_icon_view_get_item_orientation()
14148 // Returns the value of the ::orientation property which determines
14149 // whether the labels are drawn beside the icons instead of below.
14150 // RETURNS: the relative position of texts and icons
14151 Orientation get_orientation()() {
14152 return gtk_icon_view_get_orientation(&this);
14155 // VERSION: 2.6
14156 // Finds the path at the point (@x, @y), relative to bin_window coordinates.
14157 // See gtk_icon_view_get_item_at_pos(), if you are also interested in
14158 // the cell at the specified position.
14159 // See gtk_icon_view_convert_widget_to_bin_window_coords() for converting
14160 // widget coordinates to bin_window coordinates.
14161 // if no icon exists at that position.
14162 // RETURNS: The #GtkTreePath corresponding to the icon or %NULL
14163 // <x>: The x position to be identified
14164 // <y>: The y position to be identified
14165 TreePath* /*new*/ get_path_at_pos()(int x, int y) {
14166 return gtk_icon_view_get_path_at_pos(&this, x, y);
14169 // VERSION: 2.6
14170 // Returns the column with pixbufs for @icon_view.
14171 // RETURNS: the pixbuf column, or -1 if it's unset.
14172 int get_pixbuf_column()() {
14173 return gtk_icon_view_get_pixbuf_column(&this);
14176 // VERSION: 2.8
14177 // Retrieves whether the user can reorder the list via drag-and-drop.
14178 // See gtk_icon_view_set_reorderable().
14179 // RETURNS: %TRUE if the list can be reordered.
14180 int get_reorderable()() {
14181 return gtk_icon_view_get_reorderable(&this);
14184 // VERSION: 2.6
14185 // Returns the value of the ::row-spacing property.
14186 // RETURNS: the space between rows
14187 int get_row_spacing()() {
14188 return gtk_icon_view_get_row_spacing(&this);
14191 // VERSION: 2.6
14192 // Creates a list of paths of all selected items. Additionally, if you are
14193 // planning on modifying the model after calling this function, you may
14194 // want to convert the returned list into a list of #GtkTreeRowReference<!-- -->s.
14195 // To do this, you can use gtk_tree_row_reference_new().
14196 // To free the return value, use:
14197 // |[
14198 // g_list_foreach (list, (GFunc)gtk_tree_path_free, NULL);
14199 // g_list_free (list);
14200 // ]|
14201 // RETURNS: A #GList containing a #GtkTreePath for each selected row.
14202 GLib2.List* /*new*/ get_selected_items()() {
14203 return gtk_icon_view_get_selected_items(&this);
14206 // VERSION: 2.6
14207 // Gets the selection mode of the @icon_view.
14208 // RETURNS: the current selection mode
14209 SelectionMode get_selection_mode()() {
14210 return gtk_icon_view_get_selection_mode(&this);
14213 // VERSION: 2.6
14214 // Returns the value of the ::spacing property.
14215 // RETURNS: the space between cells
14216 int get_spacing()() {
14217 return gtk_icon_view_get_spacing(&this);
14220 // VERSION: 2.6
14221 // Returns the column with text for @icon_view.
14222 // RETURNS: the text column, or -1 if it's unset.
14223 int get_text_column()() {
14224 return gtk_icon_view_get_text_column(&this);
14227 // VERSION: 2.12
14228 // Returns the column of @icon_view's model which is being used for
14229 // displaying tooltips on @icon_view's rows.
14230 // used, or -1 if this is disabled.
14231 // RETURNS: the index of the tooltip column that is currently being
14232 int get_tooltip_column()() {
14233 return gtk_icon_view_get_tooltip_column(&this);
14236 // VERSION: 2.12
14237 // This function is supposed to be used in a #GtkWidget::query-tooltip
14238 // signal handler for #GtkIconView. The @x, @y and @keyboard_tip values
14239 // which are received in the signal handler, should be passed to this
14240 // function without modification.
14241 // The return value indicates whether there is an icon view item at the given
14242 // coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
14243 // tooltips the item returned will be the cursor item. When %TRUE, then any of
14244 // that row and the corresponding model. @x and @y will always be converted
14245 // to be relative to @icon_view's bin_window if @keyboard_tooltip is %FALSE.
14246 // RETURNS: whether or not the given tooltip context points to a item
14247 // <x>: the x coordinate (relative to widget coordinates)
14248 // <y>: the y coordinate (relative to widget coordinates)
14249 // <keyboard_tip>: whether this is a keyboard tooltip or not
14250 // <model>: a pointer to receive a #GtkTreeModel or %NULL
14251 // <path>: a pointer to receive a #GtkTreePath or %NULL
14252 // <iter>: a pointer to receive a #GtkTreeIter or %NULL
14253 int get_tooltip_context()(/*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ TreeModel** model=null, /*out*/ TreePath** path=null, /*out*/ TreeIter* iter=null) {
14254 return gtk_icon_view_get_tooltip_context(&this, x, y, keyboard_tip, model, path, iter);
14257 // VERSION: 2.8
14258 // Sets @start_path and @end_path to be the first and last visible path.
14259 // Note that there may be invisible paths in between.
14260 // Both paths should be freed with gtk_tree_path_free() after use.
14261 // RETURNS: %TRUE, if valid paths were placed in @start_path and @end_path
14262 // <start_path>: Return location for start of region, or %NULL
14263 // <end_path>: Return location for end of region, or %NULL
14264 int get_visible_range()(TreePath** start_path=null, TreePath** end_path=null) {
14265 return gtk_icon_view_get_visible_range(&this, start_path, end_path);
14268 // VERSION: 2.6
14269 // Activates the item determined by @path.
14270 // <path>: The #GtkTreePath to be activated
14271 void item_activated()(TreePath* path) {
14272 gtk_icon_view_item_activated(&this, path);
14275 // VERSION: 2.6
14276 // Returns %TRUE if the icon pointed to by @path is currently
14277 // selected. If @path does not point to a valid location, %FALSE is returned.
14278 // RETURNS: %TRUE if @path is selected.
14279 // <path>: A #GtkTreePath to check selection on.
14280 int path_is_selected()(TreePath* path) {
14281 return gtk_icon_view_path_is_selected(&this, path);
14284 // VERSION: 2.8
14285 // Moves the alignments of @icon_view to the position specified by @path.
14286 // where @column is placed. Both are expected to be between 0.0 and 1.0.
14287 // 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means
14288 // center.
14289 // If @use_align is %FALSE, then the alignment arguments are ignored, and the
14290 // tree does the minimum amount of work to scroll the item onto the screen.
14291 // This means that the item will be scrolled to the edge closest to its current
14292 // position. If the item is currently visible on the screen, nothing is done.
14293 // This function only works if the model is set, and @path is a valid row on
14294 // the model. If the model changes before the @icon_view is realized, the
14295 // centered path will be modified to reflect this change.
14296 // <path>: The path of the item to move to.
14297 // <use_align>: whether to use alignment arguments, or %FALSE.
14298 // <row_align>: The vertical alignment of the item specified by @path.
14299 // <col_align>: The horizontal alignment of the item specified by @path.
14300 void scroll_to_path()(TreePath* path, int use_align, float row_align, float col_align) {
14301 gtk_icon_view_scroll_to_path(&this, path, use_align, row_align, col_align);
14304 // VERSION: 2.6
14305 // Selects all the icons. @icon_view must has its selection mode set
14306 // to #GTK_SELECTION_MULTIPLE.
14307 void select_all()() {
14308 gtk_icon_view_select_all(&this);
14311 // VERSION: 2.6
14312 // Selects the row at @path.
14313 // <path>: The #GtkTreePath to be selected.
14314 void select_path()(TreePath* path) {
14315 gtk_icon_view_select_path(&this, path);
14318 // VERSION: 2.6
14319 // Calls a function for each selected icon. Note that the model or
14320 // selection cannot be modified from within this function.
14321 // <func>: The function to call for each selected icon.
14322 // <data>: User data to pass to the function.
14323 void selected_foreach()(IconViewForeachFunc func, void* data) {
14324 gtk_icon_view_selected_foreach(&this, func, data);
14327 // VERSION: 2.6
14328 // Sets the ::column-spacing property which specifies the space
14329 // which is inserted between the columns of the icon view.
14330 // <column_spacing>: the column spacing
14331 void set_column_spacing()(int column_spacing) {
14332 gtk_icon_view_set_column_spacing(&this, column_spacing);
14335 // VERSION: 2.6
14336 // Sets the ::columns property which determines in how
14337 // many columns the icons are arranged. If @columns is
14338 // -1, the number of columns will be chosen automatically
14339 // to fill the available area.
14340 // <columns>: the number of columns
14341 void set_columns()(int columns) {
14342 gtk_icon_view_set_columns(&this, columns);
14345 // VERSION: 2.8
14346 // Sets the current keyboard focus to be at @path, and selects it. This is
14347 // useful when you want to focus the user's attention on a particular item.
14348 // If @cell is not %NULL, then focus is given to the cell specified by
14349 // it. Additionally, if @start_editing is %TRUE, then editing should be
14350 // started in the specified cell.
14351 // This function is often followed by <literal>gtk_widget_grab_focus
14352 // (icon_view)</literal> in order to give keyboard focus to the widget.
14353 // Please note that editing can only happen when the widget is realized.
14354 // <path>: A #GtkTreePath
14355 // <cell>: One of the cell renderers of @icon_view, or %NULL
14356 // <start_editing>: %TRUE if the specified cell should start being edited.
14357 void set_cursor()(TreePath* path, CellRenderer* cell, int start_editing) {
14358 gtk_icon_view_set_cursor(&this, path, cell, start_editing);
14361 // VERSION: 2.8
14362 // Sets the item that is highlighted for feedback.
14363 // <path>: The path of the item to highlight, or %NULL.
14364 // <pos>: Specifies where to drop, relative to the item
14365 void set_drag_dest_item()(TreePath* path, IconViewDropPosition pos) {
14366 gtk_icon_view_set_drag_dest_item(&this, path, pos);
14369 // VERSION: 2.22
14370 // Sets the ::item-orientation property which determines whether
14371 // the labels are drawn beside the icons instead of below.
14372 // <orientation>: the relative position of texts and icons
14373 void set_item_orientation()(Orientation orientation) {
14374 gtk_icon_view_set_item_orientation(&this, orientation);
14377 // VERSION: 2.18
14378 // Sets the #GtkIconView:item-padding property which specifies the padding
14379 // around each of the icon view's items.
14380 // <item_padding>: the item padding
14381 void set_item_padding()(int item_padding) {
14382 gtk_icon_view_set_item_padding(&this, item_padding);
14385 // VERSION: 2.6
14386 // Sets the ::item-width property which specifies the width
14387 // to use for each item. If it is set to -1, the icon view will
14388 // automatically determine a suitable item size.
14389 // <item_width>: the width for each item
14390 void set_item_width()(int item_width) {
14391 gtk_icon_view_set_item_width(&this, item_width);
14394 // VERSION: 2.6
14395 // Sets the ::margin property which specifies the space
14396 // which is inserted at the top, bottom, left and right
14397 // of the icon view.
14398 // <margin>: the margin
14399 void set_margin()(int margin) {
14400 gtk_icon_view_set_margin(&this, margin);
14403 // VERSION: 2.6
14404 // Sets the column with markup information for @icon_view to be
14405 // If the markup column is set to something, it overrides
14406 // the text column set by gtk_icon_view_set_text_column().
14407 // <column>: A column in the currently used model, or -1 to display no text
14408 void set_markup_column()(int column) {
14409 gtk_icon_view_set_markup_column(&this, column);
14412 // VERSION: 2.6
14413 // Sets the model for a #GtkIconView.
14414 // If the @icon_view already has a model set, it will remove
14415 // it before setting the new model. If @model is %NULL, then
14416 // it will unset the old model.
14417 // <model>: The model.
14418 void set_model()(TreeModel* model=null) {
14419 gtk_icon_view_set_model(&this, model);
14422 // VERSION: 2.6
14423 // DEPRECATED (v2.22) method: set_orientation - Use gtk_icon_view_set_item_orientation()
14424 // Sets the ::orientation property which determines whether the labels
14425 // are drawn beside the icons instead of below.
14426 // <orientation>: the relative position of texts and icons
14427 void set_orientation()(Orientation orientation) {
14428 gtk_icon_view_set_orientation(&this, orientation);
14431 // VERSION: 2.6
14432 // Sets the column with pixbufs for @icon_view to be @column. The pixbuf
14433 // column must be of type #GDK_TYPE_PIXBUF
14434 // <column>: A column in the currently used model, or -1 to disable
14435 void set_pixbuf_column()(int column) {
14436 gtk_icon_view_set_pixbuf_column(&this, column);
14439 // VERSION: 2.8
14440 // This function is a convenience function to allow you to reorder models that
14441 // support the #GtkTreeDragSourceIface and the #GtkTreeDragDestIface. Both
14442 // #GtkTreeStore and #GtkListStore support these. If @reorderable is %TRUE, then
14443 // the user can reorder the model by dragging and dropping rows. The
14444 // developer can listen to these changes by connecting to the model's
14445 // row_inserted and row_deleted signals. The reordering is implemented by setting up
14446 // the icon view as a drag source and destination. Therefore, drag and
14447 // drop can not be used in a reorderable view for any other purpose.
14448 // This function does not give you any degree of control over the order -- any
14449 // reordering is allowed. If more control is needed, you should probably
14450 // handle drag and drop manually.
14451 // <reorderable>: %TRUE, if the list of items can be reordered.
14452 void set_reorderable()(int reorderable) {
14453 gtk_icon_view_set_reorderable(&this, reorderable);
14456 // VERSION: 2.6
14457 // Sets the ::row-spacing property which specifies the space
14458 // which is inserted between the rows of the icon view.
14459 // <row_spacing>: the row spacing
14460 void set_row_spacing()(int row_spacing) {
14461 gtk_icon_view_set_row_spacing(&this, row_spacing);
14464 // VERSION: 2.6
14465 // Sets the selection mode of the @icon_view.
14466 // <mode>: The selection mode
14467 void set_selection_mode()(SelectionMode mode) {
14468 gtk_icon_view_set_selection_mode(&this, mode);
14471 // VERSION: 2.6
14472 // Sets the ::spacing property which specifies the space
14473 // which is inserted between the cells (i.e. the icon and
14474 // the text) of an item.
14475 // <spacing>: the spacing
14476 void set_spacing()(int spacing) {
14477 gtk_icon_view_set_spacing(&this, spacing);
14480 // VERSION: 2.6
14481 // Sets the column with text for @icon_view to be @column. The text
14482 // column must be of type #G_TYPE_STRING.
14483 // <column>: A column in the currently used model, or -1 to display no text
14484 void set_text_column()(int column) {
14485 gtk_icon_view_set_text_column(&this, column);
14488 // VERSION: 2.12
14489 // Sets the tip area of @tooltip to the area which @cell occupies in
14490 // the item pointed to by @path. See also gtk_tooltip_set_tip_area().
14491 // See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
14492 // <tooltip>: a #GtkTooltip
14493 // <path>: a #GtkTreePath
14494 // <cell>: a #GtkCellRenderer or %NULL
14495 void set_tooltip_cell()(Tooltip* tooltip, TreePath* path, CellRenderer* cell=null) {
14496 gtk_icon_view_set_tooltip_cell(&this, tooltip, path, cell);
14499 // VERSION: 2.12
14500 // If you only plan to have simple (text-only) tooltips on full items, you
14501 // can use this function to have #GtkIconView handle these automatically
14502 // for you. @column should be set to the column in @icon_view's model
14503 // containing the tooltip texts, or -1 to disable this feature.
14504 // When enabled, #GtkWidget::has-tooltip will be set to %TRUE and
14505 // <column>: an integer, which is a valid column number for @icon_view's model
14506 void set_tooltip_column()(int column) {
14507 gtk_icon_view_set_tooltip_column(&this, column);
14510 // VERSION: 2.12
14511 // Sets the tip area of @tooltip to be the area covered by the item at @path.
14512 // See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
14513 // See also gtk_tooltip_set_tip_area().
14514 // <tooltip>: a #GtkTooltip
14515 // <path>: a #GtkTreePath
14516 void set_tooltip_item()(Tooltip* tooltip, TreePath* path) {
14517 gtk_icon_view_set_tooltip_item(&this, tooltip, path);
14520 // VERSION: 2.6
14521 // Unselects all the icons.
14522 void unselect_all()() {
14523 gtk_icon_view_unselect_all(&this);
14526 // VERSION: 2.6
14527 // Unselects the row at @path.
14528 // <path>: The #GtkTreePath to be unselected.
14529 void unselect_path()(TreePath* path) {
14530 gtk_icon_view_unselect_path(&this, path);
14533 // VERSION: 2.8
14534 // Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
14535 // method sets #GtkIconView:reorderable to %FALSE.
14536 void unset_model_drag_dest()() {
14537 gtk_icon_view_unset_model_drag_dest(&this);
14540 // VERSION: 2.8
14541 // Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
14542 // method sets #GtkIconView:reorderable to %FALSE.
14543 void unset_model_drag_source()() {
14544 gtk_icon_view_unset_model_drag_source(&this);
14547 // A <link linkend="keybinding-signals">keybinding signal</link>
14548 // which gets emitted when the user activates the currently
14549 // focused item.
14550 // Applications should not connect to it, but may emit it with
14551 // g_signal_emit_by_name() if they need to control activation
14552 // programmatically.
14553 // The default bindings for this signal are Space, Return and Enter.
14554 extern (C) alias static c_int function (IconView* this_, void* user_data=null) signal_activate_cursor_item;
14556 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14557 return super_.signal_connect!name(cb, data, cf);
14560 ulong signal_connect(string name:"activate-cursor-item", CB:signal_activate_cursor_item)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14561 return signal_connect_data!()(&this, cast(char*)"activate-cursor-item",
14562 cast(GObject2.Callback)cb, data, null, cf);
14565 // The ::item-activated signal is emitted when the method
14566 // gtk_icon_view_item_activated() is called or the user double
14567 // clicks an item. It is also emitted when a non-editable item
14568 // pressed.
14569 // <path>: the #GtkTreePath for the activated item
14570 extern (C) alias static void function (IconView* this_, TreePath* path, void* user_data=null) signal_item_activated;
14571 ulong signal_connect(string name:"item-activated", CB:signal_item_activated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14572 return signal_connect_data!()(&this, cast(char*)"item-activated",
14573 cast(GObject2.Callback)cb, data, null, cf);
14576 // The ::move-cursor signal is a
14577 // <link linkend="keybinding-signals">keybinding signal</link>
14578 // which gets emitted when the user initiates a cursor movement.
14579 // Applications should not connect to it, but may emit it with
14580 // g_signal_emit_by_name() if they need to control the cursor
14581 // programmatically.
14582 // The default bindings for this signal include
14583 // <itemizedlist>
14584 // <listitem>Arrow keys which move by individual steps</listitem>
14585 // <listitem>Home/End keys which move to the first/last item</listitem>
14586 // <listitem>PageUp/PageDown which move by "pages"</listitem>
14587 // </itemizedlist>
14588 // All of these will extend the selection when combined with
14589 // the Shift modifier.
14590 // <step>: the granularity of the move, as a #GtkMovementStep
14591 // <count>: the number of @step units to move
14592 extern (C) alias static c_int function (IconView* this_, MovementStep* step, int count, void* user_data=null) signal_move_cursor;
14593 ulong signal_connect(string name:"move-cursor", CB:signal_move_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14594 return signal_connect_data!()(&this, cast(char*)"move-cursor",
14595 cast(GObject2.Callback)cb, data, null, cf);
14598 // A <link linkend="keybinding-signals">keybinding signal</link>
14599 // which gets emitted when the user selects all items.
14600 // Applications should not connect to it, but may emit it with
14601 // g_signal_emit_by_name() if they need to control selection
14602 // programmatically.
14603 // The default binding for this signal is Ctrl-a.
14604 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_select_all;
14605 ulong signal_connect(string name:"select-all", CB:signal_select_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14606 return signal_connect_data!()(&this, cast(char*)"select-all",
14607 cast(GObject2.Callback)cb, data, null, cf);
14610 // A <link linkend="keybinding-signals">keybinding signal</link>
14611 // which gets emitted when the user selects the item that is currently
14612 // focused.
14613 // Applications should not connect to it, but may emit it with
14614 // g_signal_emit_by_name() if they need to control selection
14615 // programmatically.
14616 // There is no default binding for this signal.
14617 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_select_cursor_item;
14618 ulong signal_connect(string name:"select-cursor-item", CB:signal_select_cursor_item)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14619 return signal_connect_data!()(&this, cast(char*)"select-cursor-item",
14620 cast(GObject2.Callback)cb, data, null, cf);
14623 // The ::selection-changed signal is emitted when the selection
14624 // (i.e. the set of selected items) changes.
14625 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_selection_changed;
14626 ulong signal_connect(string name:"selection-changed", CB:signal_selection_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14627 return signal_connect_data!()(&this, cast(char*)"selection-changed",
14628 cast(GObject2.Callback)cb, data, null, cf);
14631 // Set the scroll adjustments for the icon view. Usually scrolled containers
14632 // like #GtkScrolledWindow will emit this signal to connect two instances
14633 // of #GtkScrollbar to the scroll directions of the #GtkIconView.
14634 extern (C) alias static void function (IconView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
14635 ulong signal_connect(string name:"set-scroll-adjustments", CB:signal_set_scroll_adjustments)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14636 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
14637 cast(GObject2.Callback)cb, data, null, cf);
14640 // A <link linkend="keybinding-signals">keybinding signal</link>
14641 // which gets emitted when the user toggles whether the currently
14642 // focused item is selected or not. The exact effect of this
14643 // depend on the selection mode.
14644 // Applications should not connect to it, but may emit it with
14645 // g_signal_emit_by_name() if they need to control selection
14646 // programmatically.
14647 // There is no default binding for this signal is Ctrl-Space.
14648 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_toggle_cursor_item;
14649 ulong signal_connect(string name:"toggle-cursor-item", CB:signal_toggle_cursor_item)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14650 return signal_connect_data!()(&this, cast(char*)"toggle-cursor-item",
14651 cast(GObject2.Callback)cb, data, null, cf);
14654 // A <link linkend="keybinding-signals">keybinding signal</link>
14655 // which gets emitted when the user unselects all items.
14656 // Applications should not connect to it, but may emit it with
14657 // g_signal_emit_by_name() if they need to control selection
14658 // programmatically.
14659 // The default binding for this signal is Ctrl-Shift-a.
14660 extern (C) alias static void function (IconView* this_, void* user_data=null) signal_unselect_all;
14661 ulong signal_connect(string name:"unselect-all", CB:signal_unselect_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
14662 return signal_connect_data!()(&this, cast(char*)"unselect-all",
14663 cast(GObject2.Callback)cb, data, null, cf);
14667 struct IconViewClass {
14668 ContainerClass parent_class;
14669 extern (C) void function (IconView* icon_view, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
14670 // <path>: The #GtkTreePath to be activated
14671 extern (C) void function (IconView* icon_view, TreePath* path) item_activated;
14672 extern (C) void function (IconView* icon_view) selection_changed;
14673 extern (C) void function (IconView* icon_view) select_all;
14674 extern (C) void function (IconView* icon_view) unselect_all;
14675 extern (C) void function (IconView* icon_view) select_cursor_item;
14676 extern (C) void function (IconView* icon_view) toggle_cursor_item;
14677 extern (C) int function (IconView* icon_view, MovementStep step, int count) move_cursor;
14678 extern (C) int function (IconView* icon_view) activate_cursor_item;
14681 enum IconViewDropPosition {
14682 NO_DROP = 0,
14683 DROP_INTO = 1,
14684 DROP_LEFT = 2,
14685 DROP_RIGHT = 3,
14686 DROP_ABOVE = 4,
14687 DROP_BELOW = 5
14689 extern (C) alias void function (IconView* icon_view, TreePath* path, void* data) IconViewForeachFunc;
14691 struct IconViewPrivate {
14695 // The #GtkImage widget displays an image. Various kinds of object
14696 // can be displayed as an image; most typically, you would load a
14697 // #GdkPixbuf ("pixel buffer") from a file, and then display that.
14698 // There's a convenience function to do this, gtk_image_new_from_file(),
14699 // used as follows:
14700 // <informalexample><programlisting>
14701 // GtkWidget *image;
14702 // image = gtk_image_new_from_file ("myfile.png");
14703 // </programlisting></informalexample>
14704 // If the file isn't loaded successfully, the image will contain a
14705 // "broken image" icon similar to that used in many web browsers.
14706 // If you want to handle errors in loading the file yourself,
14707 // for example by displaying an error message, then load the image with
14708 // gdk_pixbuf_new_from_file(), then create the #GtkImage with
14709 // gtk_image_new_from_pixbuf().
14710 // The image file may contain an animation, if so the #GtkImage will
14711 // display an animation (#GdkPixbufAnimation) instead of a static image.
14712 // #GtkImage is a subclass of #GtkMisc, which implies that you can
14713 // align it (center, left, right) and add padding to it, using
14714 // #GtkMisc methods.
14715 // #GtkImage is a "no window" widget (has no #GdkWindow of its own),
14716 // so by default does not receive events. If you want to receive events
14717 // on the image, such as button clicks, place the image inside a
14718 // #GtkEventBox, then connect to the event signals on the event box.
14719 // <example>
14720 // <title>Handling button press events on a
14721 // <structname>GtkImage</structname>.</title>
14722 // <programlisting>
14723 // static gboolean
14724 // button_press_callback (GtkWidget *event_box,
14725 // GdkEventButton *event,
14726 // gpointer data)
14727 // {
14728 // g_print ("Event box clicked at coordinates &percnt;f,&percnt;f\n",
14729 // event->x, event->y);
14730 // /<!---->* Returning TRUE means we handled the event, so the signal
14731 // * emission should be stopped (don't call any further
14732 // * callbacks that may be connected). Return FALSE
14733 // * to continue invoking callbacks.
14734 // *<!---->/
14735 // return TRUE;
14736 // }
14737 // static GtkWidget*
14738 // create_image (void)
14739 // {
14740 // GtkWidget *image;
14741 // GtkWidget *event_box;
14742 // image = gtk_image_new_from_file ("myfile.png");
14743 // event_box = gtk_event_box_new (<!-- -->);
14744 // gtk_container_add (GTK_CONTAINER (event_box), image);
14745 // g_signal_connect (G_OBJECT (event_box),
14746 // "button_press_event",
14747 // G_CALLBACK (button_press_callback),
14748 // image);
14749 // return image;
14750 // }
14751 // </programlisting>
14752 // </example>
14753 // When handling events on the event box, keep in mind that coordinates
14754 // in the image may be different from event box coordinates due to
14755 // the alignment and padding settings on the image (see #GtkMisc).
14756 // The simplest way to solve this is to set the alignment to 0.0
14757 // (left/top), and set the padding to zero. Then the origin of
14758 // the image will be the same as the origin of the event box.
14759 // Sometimes an application will want to avoid depending on external data
14760 // files, such as image files. GTK+ comes with a program to avoid this,
14761 // called <application>gdk-pixbuf-csource</application>. This program
14762 // allows you to convert an image into a C variable declaration, which
14763 // can then be loaded into a #GdkPixbuf using
14764 // gdk_pixbuf_new_from_inline().
14765 struct Image /* : Misc */ {
14766 mixin Atk.ImplementorIface.__interface__;
14767 mixin Buildable.__interface__;
14768 alias misc this;
14769 alias misc super_;
14770 Misc misc;
14771 ImageType storage_type;
14773 union data {
14774 ImagePixmapData pixmap;
14775 ImageImageData image;
14776 ImagePixbufData pixbuf;
14777 ImageStockData stock;
14778 ImageIconSetData icon_set;
14779 ImageAnimationData anim;
14780 ImageIconNameData name;
14781 ImageGIconData gicon;
14784 Gdk2.Bitmap* mask;
14785 IconSize icon_size;
14788 // Creates a new empty #GtkImage widget.
14789 // RETURNS: a newly created #GtkImage widget.
14790 static Image* new_()() {
14791 return gtk_image_new();
14794 // Creates a #GtkImage displaying the given animation.
14795 // The #GtkImage does not assume a reference to the
14796 // animation; you still need to unref it if you own references.
14797 // #GtkImage will add its own reference rather than adopting yours.
14798 // Note that the animation frames are shown using a timeout with
14799 // #G_PRIORITY_DEFAULT. When using animations to indicate busyness,
14800 // keep in mind that the animation will only be shown if the main loop
14801 // is not busy with something that has a higher priority.
14802 // RETURNS: a new #GtkImage widget
14803 // <animation>: an animation
14804 static Image* new_from_animation()(GdkPixbuf2.PixbufAnimation* animation) {
14805 return gtk_image_new_from_animation(animation);
14808 // Creates a new #GtkImage displaying the file @filename. If the file
14809 // isn't found or can't be loaded, the resulting #GtkImage will
14810 // display a "broken image" icon. This function never returns %NULL,
14811 // it always returns a valid #GtkImage widget.
14812 // If the file contains an animation, the image will contain an
14813 // animation.
14814 // If you need to detect failures to load the file, use
14815 // gdk_pixbuf_new_from_file() to load the file yourself, then create
14816 // the #GtkImage from the pixbuf. (Or for animations, use
14817 // gdk_pixbuf_animation_new_from_file()).
14818 // The storage type (gtk_image_get_storage_type()) of the returned
14819 // image is not defined, it will be whatever is appropriate for
14820 // displaying the file.
14821 // RETURNS: a new #GtkImage
14822 // <filename>: a filename
14823 static Image* new_from_file()(char* filename) {
14824 return gtk_image_new_from_file(filename);
14827 // VERSION: 2.14
14828 // Creates a #GtkImage displaying an icon from the current icon theme.
14829 // If the icon name isn't known, a "broken image" icon will be
14830 // displayed instead. If the current icon theme is changed, the icon
14831 // will be updated appropriately.
14832 // RETURNS: a new #GtkImage displaying the themed icon
14833 // <icon>: an icon
14834 // <size>: a stock icon size
14835 static Image* new_from_gicon()(Gio2.Icon* icon, int size) {
14836 return gtk_image_new_from_gicon(icon, size);
14839 // VERSION: 2.6
14840 // Creates a #GtkImage displaying an icon from the current icon theme.
14841 // If the icon name isn't known, a "broken image" icon will be
14842 // displayed instead. If the current icon theme is changed, the icon
14843 // will be updated appropriately.
14844 // RETURNS: a new #GtkImage displaying the themed icon
14845 // <icon_name>: an icon name
14846 // <size>: a stock icon size
14847 static Image* new_from_icon_name()(char* icon_name, int size) {
14848 return gtk_image_new_from_icon_name(icon_name, size);
14851 // Creates a #GtkImage displaying an icon set. Sample stock sizes are
14852 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_SMALL_TOOLBAR. Instead of using
14853 // this function, usually it's better to create a #GtkIconFactory, put
14854 // your icon sets in the icon factory, add the icon factory to the
14855 // list of default factories with gtk_icon_factory_add_default(), and
14856 // then use gtk_image_new_from_stock(). This will allow themes to
14857 // override the icon you ship with your application.
14858 // The #GtkImage does not assume a reference to the
14859 // icon set; you still need to unref it if you own references.
14860 // #GtkImage will add its own reference rather than adopting yours.
14861 // RETURNS: a new #GtkImage
14862 // <icon_set>: a #GtkIconSet
14863 // <size>: a stock icon size
14864 static Image* new_from_icon_set()(IconSet* icon_set, int size) {
14865 return gtk_image_new_from_icon_set(icon_set, size);
14868 // Creates a #GtkImage widget displaying a @image with a @mask.
14869 // A #GdkImage is a client-side image buffer in the pixel format of the
14870 // current display. The #GtkImage does not assume a reference to the
14871 // image or mask; you still need to unref them if you own references.
14872 // #GtkImage will add its own reference rather than adopting yours.
14873 // RETURNS: a new #GtkImage
14874 // <image>: a #GdkImage, or %NULL
14875 // <mask>: a #GdkBitmap, or %NULL
14876 static Image* new_from_image()(Gdk2.Image* image=null, Gdk2.Bitmap* mask=null) {
14877 return gtk_image_new_from_image(image, mask);
14880 // Creates a new #GtkImage displaying @pixbuf.
14881 // The #GtkImage does not assume a reference to the
14882 // pixbuf; you still need to unref it if you own references.
14883 // #GtkImage will add its own reference rather than adopting yours.
14884 // Note that this function just creates an #GtkImage from the pixbuf. The
14885 // #GtkImage created will not react to state changes. Should you want that,
14886 // you should use gtk_image_new_from_icon_set().
14887 // RETURNS: a new #GtkImage
14888 // <pixbuf>: a #GdkPixbuf, or %NULL
14889 static Image* new_from_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf=null) {
14890 return gtk_image_new_from_pixbuf(pixbuf);
14893 // Creates a #GtkImage widget displaying @pixmap with a @mask.
14894 // A #GdkPixmap is a server-side image buffer in the pixel format of the
14895 // current display. The #GtkImage does not assume a reference to the
14896 // pixmap or mask; you still need to unref them if you own references.
14897 // #GtkImage will add its own reference rather than adopting yours.
14898 // RETURNS: a new #GtkImage
14899 // <pixmap>: a #GdkPixmap, or %NULL
14900 // <mask>: a #GdkBitmap, or %NULL
14901 static Image* new_from_pixmap()(Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null) {
14902 return gtk_image_new_from_pixmap(pixmap, mask);
14905 // Creates a #GtkImage displaying a stock icon. Sample stock icon
14906 // names are #GTK_STOCK_OPEN, #GTK_STOCK_QUIT. Sample stock sizes
14907 // are #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_SMALL_TOOLBAR. If the stock
14908 // icon name isn't known, the image will be empty.
14909 // You can register your own stock icon names, see
14910 // gtk_icon_factory_add_default() and gtk_icon_factory_add().
14911 // RETURNS: a new #GtkImage displaying the stock icon
14912 // <stock_id>: a stock icon name
14913 // <size>: a stock icon size
14914 static Image* new_from_stock()(char* stock_id, int size) {
14915 return gtk_image_new_from_stock(stock_id, size);
14918 // VERSION: 2.8
14919 // Resets the image to be empty.
14920 void clear()() {
14921 gtk_image_clear(&this);
14924 // DEPRECATED (v2.0) method: get - Use gtk_image_get_image() instead.
14925 // Gets the #GtkImage.
14926 // <val>: return location for a #GdkImage
14927 // <mask>: a #GdkBitmap that indicates which parts of the image should be transparent.
14928 void get()(Gdk2.Image** val, Gdk2.Bitmap** mask) {
14929 gtk_image_get(&this, val, mask);
14932 // Gets the #GdkPixbufAnimation being displayed by the #GtkImage.
14933 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14934 // %GTK_IMAGE_ANIMATION (see gtk_image_get_storage_type()).
14935 // The caller of this function does not own a reference to the
14936 // returned animation.
14937 // the image is empty
14938 // RETURNS: the displayed animation, or %NULL if
14939 GdkPixbuf2.PixbufAnimation* get_animation()() {
14940 return gtk_image_get_animation(&this);
14943 // VERSION: 2.14
14944 // Gets the #GIcon and size being displayed by the #GtkImage.
14945 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14946 // %GTK_IMAGE_GICON (see gtk_image_get_storage_type()).
14947 // The caller of this function does not own a reference to the
14948 // returned #GIcon.
14949 // <gicon>: place to store a #GIcon, or %NULL
14950 // <size>: place to store an icon size, or %NULL
14951 void get_gicon()(/*out*/ Gio2.Icon** gicon=null, /*out*/ /*POINTER*/ int* size=null) {
14952 gtk_image_get_gicon(&this, gicon, size);
14955 // VERSION: 2.6
14956 // Gets the icon name and size being displayed by the #GtkImage.
14957 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14958 // %GTK_IMAGE_ICON_NAME (see gtk_image_get_storage_type()).
14959 // The returned string is owned by the #GtkImage and should not
14960 // be freed.
14961 // <icon_name>: place to store an icon name, or %NULL
14962 // <size>: place to store an icon size, or %NULL
14963 void get_icon_name()(/*out*/ char** icon_name=null, /*out*/ /*POINTER*/ int* size=null) {
14964 gtk_image_get_icon_name(&this, icon_name, size);
14967 // Gets the icon set and size being displayed by the #GtkImage.
14968 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14969 // %GTK_IMAGE_ICON_SET (see gtk_image_get_storage_type()).
14970 // <icon_set>: location to store a #GtkIconSet, or %NULL
14971 // <size>: location to store a stock icon size, or %NULL
14972 void get_icon_set()(/*out*/ IconSet** icon_set=null, /*out*/ /*POINTER*/ int* size=null) {
14973 gtk_image_get_icon_set(&this, icon_set, size);
14976 // Gets the #GdkImage and mask being displayed by the #GtkImage.
14977 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14978 // %GTK_IMAGE_IMAGE (see gtk_image_get_storage_type()).
14979 // The caller of this function does not own a reference to the
14980 // returned image and mask.
14981 // <gdk_image>: return location for a #GtkImage, or %NULL
14982 // <mask>: return location for a #GdkBitmap, or %NULL
14983 void get_image()(/*out*/ Gdk2.Image** gdk_image=null, /*out*/ Gdk2.Bitmap** mask=null) {
14984 gtk_image_get_image(&this, gdk_image, mask);
14987 // Gets the #GdkPixbuf being displayed by the #GtkImage.
14988 // The storage type of the image must be %GTK_IMAGE_EMPTY or
14989 // %GTK_IMAGE_PIXBUF (see gtk_image_get_storage_type()).
14990 // The caller of this function does not own a reference to the
14991 // returned pixbuf.
14992 // the image is empty
14993 // RETURNS: the displayed pixbuf, or %NULL if
14994 GdkPixbuf2.Pixbuf* get_pixbuf()() {
14995 return gtk_image_get_pixbuf(&this);
14998 // VERSION: 2.6
14999 // Gets the pixel size used for named icons.
15000 // RETURNS: the pixel size used for named icons.
15001 int get_pixel_size()() {
15002 return gtk_image_get_pixel_size(&this);
15005 // Gets the pixmap and mask being displayed by the #GtkImage.
15006 // The storage type of the image must be %GTK_IMAGE_EMPTY or
15007 // %GTK_IMAGE_PIXMAP (see gtk_image_get_storage_type()).
15008 // The caller of this function does not own a reference to the
15009 // returned pixmap and mask.
15010 // <pixmap>: location to store the pixmap, or %NULL
15011 // <mask>: location to store the mask, or %NULL
15012 void get_pixmap()(/*out*/ Gdk2.Pixmap** pixmap=null, /*out*/ Gdk2.Bitmap** mask=null) {
15013 gtk_image_get_pixmap(&this, pixmap, mask);
15016 // Gets the stock icon name and size being displayed by the #GtkImage.
15017 // The storage type of the image must be %GTK_IMAGE_EMPTY or
15018 // %GTK_IMAGE_STOCK (see gtk_image_get_storage_type()).
15019 // The returned string is owned by the #GtkImage and should not
15020 // be freed.
15021 // <stock_id>: place to store a stock icon name, or %NULL
15022 // <size>: place to store a stock icon size, or %NULL
15023 void get_stock()(/*out*/ char** stock_id=null, /*out*/ /*POINTER*/ int* size=null) {
15024 gtk_image_get_stock(&this, stock_id, size);
15027 // Gets the type of representation being used by the #GtkImage
15028 // to store image data. If the #GtkImage has no image data,
15029 // the return value will be %GTK_IMAGE_EMPTY.
15030 // RETURNS: image representation being used
15031 ImageType get_storage_type()() {
15032 return gtk_image_get_storage_type(&this);
15035 // DEPRECATED (v2.0) method: set - Use gtk_image_set_from_image() instead.
15036 // Sets the #GtkImage.
15037 // <val>: a #GdkImage
15038 // <mask>: a #GdkBitmap that indicates which parts of the image should be transparent.
15039 void set()(Gdk2.Image* val, Gdk2.Bitmap* mask) {
15040 gtk_image_set(&this, val, mask);
15043 // Causes the #GtkImage to display the given animation (or display
15044 // nothing, if you set the animation to %NULL).
15045 // <animation>: the #GdkPixbufAnimation
15046 void set_from_animation()(GdkPixbuf2.PixbufAnimation* animation) {
15047 gtk_image_set_from_animation(&this, animation);
15050 // See gtk_image_new_from_file() for details.
15051 // <filename>: a filename or %NULL
15052 void set_from_file()(char* filename=null) {
15053 gtk_image_set_from_file(&this, filename);
15056 // VERSION: 2.14
15057 // See gtk_image_new_from_gicon() for details.
15058 // <icon>: an icon
15059 // <size>: an icon size
15060 void set_from_gicon()(Gio2.Icon* icon, int size) {
15061 gtk_image_set_from_gicon(&this, icon, size);
15064 // VERSION: 2.6
15065 // See gtk_image_new_from_icon_name() for details.
15066 // <icon_name>: an icon name
15067 // <size>: an icon size
15068 void set_from_icon_name()(char* icon_name, int size) {
15069 gtk_image_set_from_icon_name(&this, icon_name, size);
15072 // See gtk_image_new_from_icon_set() for details.
15073 // <icon_set>: a #GtkIconSet
15074 // <size>: a stock icon size
15075 void set_from_icon_set()(IconSet* icon_set, int size) {
15076 gtk_image_set_from_icon_set(&this, icon_set, size);
15079 // See gtk_image_new_from_image() for details.
15080 // <gdk_image>: a #GdkImage or %NULL
15081 // <mask>: a #GdkBitmap or %NULL
15082 void set_from_image()(Gdk2.Image* gdk_image=null, Gdk2.Bitmap* mask=null) {
15083 gtk_image_set_from_image(&this, gdk_image, mask);
15086 // See gtk_image_new_from_pixbuf() for details.
15087 // <pixbuf>: a #GdkPixbuf or %NULL
15088 void set_from_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf=null) {
15089 gtk_image_set_from_pixbuf(&this, pixbuf);
15092 // See gtk_image_new_from_pixmap() for details.
15093 // <pixmap>: a #GdkPixmap or %NULL
15094 // <mask>: a #GdkBitmap or %NULL
15095 void set_from_pixmap()(Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null) {
15096 gtk_image_set_from_pixmap(&this, pixmap, mask);
15099 // See gtk_image_new_from_stock() for details.
15100 // <stock_id>: a stock icon name
15101 // <size>: a stock icon size
15102 void set_from_stock()(char* stock_id, int size) {
15103 gtk_image_set_from_stock(&this, stock_id, size);
15106 // VERSION: 2.6
15107 // Sets the pixel size to use for named icons. If the pixel size is set
15108 // to a value != -1, it is used instead of the icon size set by
15109 // gtk_image_set_from_icon_name().
15110 // <pixel_size>: the new pixel size
15111 void set_pixel_size()(int pixel_size) {
15112 gtk_image_set_pixel_size(&this, pixel_size);
15116 struct ImageAnimationData {
15117 GdkPixbuf2.PixbufAnimation* anim;
15118 GdkPixbuf2.PixbufAnimationIter* iter;
15119 uint frame_timeout;
15122 struct ImageClass {
15123 MiscClass parent_class;
15124 extern (C) void function () _gtk_reserved1;
15125 extern (C) void function () _gtk_reserved2;
15126 extern (C) void function () _gtk_reserved3;
15127 extern (C) void function () _gtk_reserved4;
15130 struct ImageGIconData {
15131 Gio2.Icon* icon;
15132 GdkPixbuf2.Pixbuf* pixbuf;
15133 uint theme_change_id;
15136 struct ImageIconNameData {
15137 char* icon_name;
15138 GdkPixbuf2.Pixbuf* pixbuf;
15139 uint theme_change_id;
15142 struct ImageIconSetData {
15143 IconSet* icon_set;
15146 struct ImageImageData {
15147 Gdk2.Image* image;
15150 struct ImageMenuItem /* : MenuItem */ {
15151 mixin Atk.ImplementorIface.__interface__;
15152 mixin Activatable.__interface__;
15153 mixin Buildable.__interface__;
15154 alias menu_item this;
15155 alias menu_item super_;
15156 alias menu_item menuitem;
15157 MenuItem menu_item;
15158 private Widget* image;
15161 // Creates a new #GtkImageMenuItem with an empty label.
15162 // RETURNS: a new #GtkImageMenuItem.
15163 static ImageMenuItem* new_()() {
15164 return gtk_image_menu_item_new();
15167 // Creates a new #GtkImageMenuItem containing the image and text from a
15168 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
15169 // and #GTK_STOCK_APPLY.
15170 // If you want this menu item to have changeable accelerators, then pass in
15171 // %NULL for accel_group. Next call gtk_menu_item_set_accel_path() with an
15172 // appropriate path for the menu item, use gtk_stock_lookup() to look up the
15173 // standard accelerator for the stock item, and if one is found, call
15174 // gtk_accel_map_add_entry() to register it.
15175 // RETURNS: a new #GtkImageMenuItem.
15176 // <stock_id>: the name of the stock item.
15177 // <accel_group>: the #GtkAccelGroup to add the menu items accelerator to, or %NULL.
15178 static ImageMenuItem* new_from_stock()(char* stock_id, AccelGroup* accel_group=null) {
15179 return gtk_image_menu_item_new_from_stock(stock_id, accel_group);
15182 // Creates a new #GtkImageMenuItem containing a label.
15183 // RETURNS: a new #GtkImageMenuItem.
15184 // <label>: the text of the menu item.
15185 static ImageMenuItem* new_with_label()(char* label) {
15186 return gtk_image_menu_item_new_with_label(label);
15189 // Creates a new #GtkImageMenuItem containing a label. The label
15190 // will be created using gtk_label_new_with_mnemonic(), so underscores
15191 // in @label indicate the mnemonic for the menu item.
15192 // RETURNS: a new #GtkImageMenuItem
15193 // <label>: the text of the menu item, with an underscore in front of the mnemonic character
15194 static ImageMenuItem* new_with_mnemonic()(char* label) {
15195 return gtk_image_menu_item_new_with_mnemonic(label);
15198 // VERSION: 2.16
15199 // Returns whether the menu item will ignore the #GtkSettings:gtk-menu-images
15200 // setting and always show the image, if available.
15201 // RETURNS: %TRUE if the menu item will always show the image
15202 int get_always_show_image()() {
15203 return gtk_image_menu_item_get_always_show_image(&this);
15206 // Gets the widget that is currently set as the image of @image_menu_item.
15207 // See gtk_image_menu_item_set_image().
15208 // RETURNS: the widget set as image of @image_menu_item
15209 Widget* get_image()() {
15210 return gtk_image_menu_item_get_image(&this);
15213 // VERSION: 2.16
15214 // Checks whether the label set in the menuitem is used as a
15215 // stock id to select the stock item for the item.
15216 // stock id to select the stock item for the item
15217 // RETURNS: %TRUE if the label set in the menuitem is used as a
15218 int get_use_stock()() {
15219 return gtk_image_menu_item_get_use_stock(&this);
15222 // VERSION: 2.16
15223 // Specifies an @accel_group to add the menu items accelerator to
15224 // (this only applies to stock items so a stock item must already
15225 // be set, make sure to call gtk_image_menu_item_set_use_stock()
15226 // and gtk_menu_item_set_label() with a valid stock item first).
15227 // If you want this menu item to have changeable accelerators then
15228 // you shouldnt need this (see gtk_image_menu_item_new_from_stock()).
15229 // <accel_group>: the #GtkAccelGroup
15230 void set_accel_group()(AccelGroup* accel_group) {
15231 gtk_image_menu_item_set_accel_group(&this, accel_group);
15234 // VERSION: 2.16
15235 // If %TRUE, the menu item will ignore the #GtkSettings:gtk-menu-images
15236 // setting and always show the image, if available.
15237 // Use this property if the menuitem would be useless or hard to use
15238 // without the image.
15239 // <always_show>: %TRUE if the menuitem should always show the image
15240 void set_always_show_image()(int always_show) {
15241 gtk_image_menu_item_set_always_show_image(&this, always_show);
15244 // Sets the image of @image_menu_item to the given widget.
15245 // Note that it depends on the show-menu-images setting whether
15246 // the image will be displayed or not.
15247 // <image>: a widget to set as the image for the menu item.
15248 void set_image()(Widget* image=null) {
15249 gtk_image_menu_item_set_image(&this, image);
15252 // VERSION: 2.16
15253 // If %TRUE, the label set in the menuitem is used as a
15254 // stock id to select the stock item for the item.
15255 // <use_stock>: %TRUE if the menuitem should use a stock item
15256 void set_use_stock()(int use_stock) {
15257 gtk_image_menu_item_set_use_stock(&this, use_stock);
15261 struct ImageMenuItemClass {
15262 MenuItemClass parent_class;
15265 struct ImagePixbufData {
15266 GdkPixbuf2.Pixbuf* pixbuf;
15269 struct ImagePixmapData {
15270 Gdk2.Pixmap* pixmap;
15273 struct ImageStockData {
15274 char* stock_id;
15278 // Describes the image data representation used by a #GtkImage. If you
15279 // want to get the image from the widget, you can only get the
15280 // currently-stored representation. e.g. if the
15281 // gtk_image_get_storage_type() returns #GTK_IMAGE_PIXBUF, then you can
15282 // call gtk_image_get_pixbuf() but not gtk_image_get_stock(). For empty
15283 // images, you can request any storage type (call any of the "get"
15284 // functions), but they will all return %NULL values.
15285 enum ImageType {
15286 EMPTY = 0,
15287 PIXMAP = 1,
15288 IMAGE = 2,
15289 PIXBUF = 3,
15290 STOCK = 4,
15291 ICON_SET = 5,
15292 ANIMATION = 6,
15293 ICON_NAME = 7,
15294 GICON = 8
15297 // #GtkInfoBar is a widget that can be used to show messages to
15298 // the user without showing a dialog. It is often temporarily shown
15299 // at the top or bottom of a document. In contrast to #GtkDialog, which
15300 // has a horizontal action area at the bottom, #GtkInfoBar has a
15301 // vertical action area at the side.
15302 // The API of #GtkInfoBar is very similar to #GtkDialog, allowing you
15303 // to add buttons to the action area with gtk_info_bar_add_button() or
15304 // gtk_info_bar_new_with_buttons(). The sensitivity of action widgets
15305 // can be controlled with gtk_info_bar_set_response_sensitive().
15306 // To add widgets to the main content area of a #GtkInfoBar, use
15307 // gtk_info_bar_get_content_area() and add your widgets to the container.
15308 // Similar to #GtkMessageDialog, the contents of a #GtkInfoBar can by
15309 // classified as error message, warning, informational message, etc,
15310 // by using gtk_info_bar_set_message_type(). GTK+ uses the message type
15311 // to determine the background color of the message area.
15312 // <example>
15313 // <title>Simple GtkInfoBar usage.</title>
15314 // <programlisting>
15315 // /&ast; set up info bar &ast;/
15316 // info_bar = gtk_info_bar_new ();
15317 // gtk_widget_set_no_show_all (info_bar, TRUE);
15318 // message_label = gtk_label_new ("");
15319 // gtk_widget_show (message_label);
15320 // content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
15321 // gtk_container_add (GTK_CONTAINER (content_area), message_label);
15322 // gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
15323 // GTK_STOCK_OK, GTK_RESPONSE_OK);
15324 // g_signal_connect (info_bar, "response",
15325 // G_CALLBACK (gtk_widget_hide), NULL);
15326 // gtk_table_attach (GTK_TABLE (table),
15327 // info_bar,
15328 // 0, 1, 2, 3,
15329 // GTK_EXPAND | GTK_FILL, 0,
15330 // 0, 0);
15331 // /&ast; ... &ast;/
15332 // /&ast; show an error message &ast;/
15333 // gtk_label_set_text (GTK_LABEL (message_label), error_message);
15334 // gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
15335 // GTK_MESSAGE_ERROR);
15336 // gtk_widget_show (info_bar);
15337 // </programlisting>
15338 // </example>
15339 // <refsect2 id="GtkInfoBar-BUILDER-UI">
15340 // <title>GtkInfoBar as GtkBuildable</title>
15341 // <para>
15342 // The GtkInfoBar implementation of the GtkBuildable interface exposes
15343 // the content area and action area as internal children with the names
15344 // "content_area" and "action_area".
15345 // </para>
15346 // <para>
15347 // GtkInfoBar supports a custom &lt;action-widgets&gt; element, which
15348 // can contain multiple &lt;action-widget&gt; elements. The "response"
15349 // attribute specifies a numeric response, and the content of the element
15350 // is the id of widget (which should be a child of the dialogs @action_area).
15351 // </para>
15352 // </refsect2>
15353 struct InfoBar /* : HBox */ {
15354 mixin Atk.ImplementorIface.__interface__;
15355 mixin Buildable.__interface__;
15356 mixin Orientable.__interface__;
15357 alias parent this;
15358 alias parent super_;
15359 alias parent hbox;
15360 HBox parent;
15361 private InfoBarPrivate* priv;
15364 // VERSION: 2.18
15365 // Creates a new #GtkInfoBar object.
15366 // RETURNS: a new #GtkInfoBar object
15367 static InfoBar* new_()() {
15368 return gtk_info_bar_new();
15371 // Unintrospectable constructor: new_with_buttons() / gtk_info_bar_new_with_buttons()
15372 // Creates a new #GtkInfoBar with buttons. Button text/response ID
15373 // pairs should be listed, with a %NULL pointer ending the list.
15374 // Button text can be either a stock ID such as %GTK_STOCK_OK, or
15375 // some arbitrary text. A response ID can be any positive number,
15376 // or one of the values in the #GtkResponseType enumeration. If the
15377 // user clicks one of these dialog buttons, GtkInfoBar will emit
15378 // the "response" signal with the corresponding response ID.
15379 // RETURNS: a new #GtkInfoBar
15380 // <first_button_text>: stock ID or text to go in first button, or %NULL
15381 alias gtk_info_bar_new_with_buttons new_with_buttons; // Variadic
15383 // VERSION: 2.18
15384 // Add an activatable widget to the action area of a #GtkInfoBar,
15385 // connecting a signal handler that will emit the #GtkInfoBar::response
15386 // signal on the message area when the widget is activated. The widget
15387 // is appended to the end of the message areas action area.
15388 // <child>: an activatable widget
15389 // <response_id>: response ID for @child
15390 void add_action_widget()(Widget* child, int response_id) {
15391 gtk_info_bar_add_action_widget(&this, child, response_id);
15394 // VERSION: 2.18
15395 // Adds a button with the given text (or a stock button, if button_text
15396 // is a stock ID) and sets things up so that clicking the button will emit
15397 // the "response" signal with the given response_id. The button is appended
15398 // to the end of the info bars's action area. The button widget is
15399 // returned, but usually you don't need it.
15400 // RETURNS: the button widget that was added
15401 // <button_text>: text of button, or stock ID
15402 // <response_id>: response ID for the button
15403 Widget* add_button()(char* button_text, int response_id) {
15404 return gtk_info_bar_add_button(&this, button_text, response_id);
15407 // Unintrospectable method: add_buttons() / gtk_info_bar_add_buttons()
15408 // VERSION: 2.18
15409 // Adds more buttons, same as calling gtk_info_bar_add_button()
15410 // repeatedly. The variable argument list should be %NULL-terminated
15411 // as with gtk_info_bar_new_with_buttons(). Each button must have both
15412 // text and response ID.
15413 // <first_button_text>: button text or stock ID
15414 /+ Not available -- variadic methods unsupported - use the C function directly.
15415 alias gtk_info_bar_add_buttons add_buttons; // Variadic
15418 // VERSION: 2.18
15419 // Returns the action area of @info_bar.
15420 // RETURNS: the action area
15421 Widget* get_action_area()() {
15422 return gtk_info_bar_get_action_area(&this);
15425 // VERSION: 2.18
15426 // Returns the content area of @info_bar.
15427 // RETURNS: the content area
15428 Widget* get_content_area()() {
15429 return gtk_info_bar_get_content_area(&this);
15432 // VERSION: 2.18
15433 // Returns the message type of the message area.
15434 // RETURNS: the message type of the message area.
15435 MessageType get_message_type()() {
15436 return gtk_info_bar_get_message_type(&this);
15439 // VERSION: 2.18
15440 // Emits the 'response' signal with the given @response_id.
15441 // <response_id>: a response ID
15442 void response()(int response_id) {
15443 gtk_info_bar_response(&this, response_id);
15446 // VERSION: 2.18
15447 // Sets the last widget in the info bar's action area with
15448 // the given response_id as the default widget for the dialog.
15449 // Pressing "Enter" normally activates the default widget.
15450 // Note that this function currently requires @info_bar to
15451 // be added to a widget hierarchy.
15452 // <response_id>: a response ID
15453 void set_default_response()(int response_id) {
15454 gtk_info_bar_set_default_response(&this, response_id);
15457 // VERSION: 2.18
15458 // Sets the message type of the message area.
15459 // GTK+ uses this type to determine what color to use
15460 // when drawing the message area.
15461 // <message_type>: a #GtkMessageType
15462 void set_message_type()(MessageType message_type) {
15463 gtk_info_bar_set_message_type(&this, message_type);
15466 // VERSION: 2.18
15467 // Calls gtk_widget_set_sensitive (widget, setting) for each
15468 // widget in the info bars's action area with the given response_id.
15469 // A convenient way to sensitize/desensitize dialog buttons.
15470 // <response_id>: a response ID
15471 // <setting>: TRUE for sensitive
15472 void set_response_sensitive()(int response_id, int setting) {
15473 gtk_info_bar_set_response_sensitive(&this, response_id, setting);
15476 // VERSION: 2.18
15477 // The ::close signal is a
15478 // <link linkend="keybinding-signals">keybinding signal</link>
15479 // which gets emitted when the user uses a keybinding to dismiss
15480 // the info bar.
15481 // The default binding for this signal is the Escape key.
15482 extern (C) alias static void function (InfoBar* this_, void* user_data=null) signal_close;
15484 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15485 return super_.signal_connect!name(cb, data, cf);
15488 ulong signal_connect(string name:"close", CB:signal_close)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15489 return signal_connect_data!()(&this, cast(char*)"close",
15490 cast(GObject2.Callback)cb, data, null, cf);
15493 // VERSION: 2.18
15494 // Emitted when an action widget is clicked or the application programmer
15495 // calls gtk_dialog_response(). The @response_id depends on which action
15496 // widget was clicked.
15497 // <response_id>: the response ID
15498 extern (C) alias static void function (InfoBar* this_, int response_id, void* user_data=null) signal_response;
15499 ulong signal_connect(string name:"response", CB:signal_response)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15500 return signal_connect_data!()(&this, cast(char*)"response",
15501 cast(GObject2.Callback)cb, data, null, cf);
15505 struct InfoBarClass {
15506 HBoxClass parent_class;
15507 // <response_id>: a response ID
15508 extern (C) void function (InfoBar* info_bar, int response_id) response;
15509 extern (C) void function (InfoBar* info_bar) close;
15510 extern (C) void function () _gtk_reserved1;
15511 extern (C) void function () _gtk_reserved2;
15512 extern (C) void function () _gtk_reserved3;
15513 extern (C) void function () _gtk_reserved4;
15514 extern (C) void function () _gtk_reserved5;
15515 extern (C) void function () _gtk_reserved6;
15518 struct InfoBarPrivate {
15521 struct InputDialog /* : Dialog */ {
15522 mixin Atk.ImplementorIface.__interface__;
15523 mixin Buildable.__interface__;
15524 alias dialog this;
15525 alias dialog super_;
15526 Dialog dialog;
15527 Widget* axis_list, axis_listbox, mode_optionmenu, close_button, save_button;
15528 Widget*[666] axis_items;
15529 Gdk2.Device* current_device;
15530 Widget* keys_list, keys_listbox;
15532 static InputDialog* new_()() {
15533 return gtk_input_dialog_new();
15535 extern (C) alias static void function (InputDialog* this_, Gdk2.Device* object, void* user_data=null) signal_disable_device;
15537 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15538 return super_.signal_connect!name(cb, data, cf);
15541 ulong signal_connect(string name:"disable-device", CB:signal_disable_device)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15542 return signal_connect_data!()(&this, cast(char*)"disable-device",
15543 cast(GObject2.Callback)cb, data, null, cf);
15545 extern (C) alias static void function (InputDialog* this_, Gdk2.Device* object, void* user_data=null) signal_enable_device;
15546 ulong signal_connect(string name:"enable-device", CB:signal_enable_device)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15547 return signal_connect_data!()(&this, cast(char*)"enable-device",
15548 cast(GObject2.Callback)cb, data, null, cf);
15552 struct InputDialogClass {
15553 DialogClass parent_class;
15554 extern (C) void function (InputDialog* inputd, Gdk2.Device* device) enable_device;
15555 extern (C) void function (InputDialog* inputd, Gdk2.Device* device) disable_device;
15556 extern (C) void function () _gtk_reserved1;
15557 extern (C) void function () _gtk_reserved2;
15558 extern (C) void function () _gtk_reserved3;
15559 extern (C) void function () _gtk_reserved4;
15562 struct Invisible /* : Widget */ {
15563 mixin Atk.ImplementorIface.__interface__;
15564 mixin Buildable.__interface__;
15565 alias widget this;
15566 alias widget super_;
15567 Widget widget;
15568 int has_user_ref_count;
15569 Gdk2.Screen* screen;
15572 // Creates a new #GtkInvisible.
15573 // RETURNS: a new #GtkInvisible.
15574 static Invisible* new_()() {
15575 return gtk_invisible_new();
15578 // VERSION: 2.2
15579 // Creates a new #GtkInvisible object for a specified screen
15580 // RETURNS: a newly created #GtkInvisible object
15581 // <screen>: a #GdkScreen which identifies on which the new #GtkInvisible will be created.
15582 static Invisible* new_for_screen()(Gdk2.Screen* screen) {
15583 return gtk_invisible_new_for_screen(screen);
15586 // VERSION: 2.2
15587 // Returns the #GdkScreen object associated with @invisible
15588 // RETURNS: the associated #GdkScreen.
15589 Gdk2.Screen* get_screen()() {
15590 return gtk_invisible_get_screen(&this);
15593 // VERSION: 2.2
15594 // Sets the #GdkScreen where the #GtkInvisible object will be displayed.
15595 // <screen>: a #GdkScreen.
15596 void set_screen()(Gdk2.Screen* screen) {
15597 gtk_invisible_set_screen(&this, screen);
15601 struct InvisibleClass {
15602 WidgetClass parent_class;
15603 extern (C) void function () _gtk_reserved1;
15604 extern (C) void function () _gtk_reserved2;
15605 extern (C) void function () _gtk_reserved3;
15606 extern (C) void function () _gtk_reserved4;
15609 struct Item /* : Bin */ {
15610 mixin Atk.ImplementorIface.__interface__;
15611 mixin Buildable.__interface__;
15612 alias bin this;
15613 alias bin super_;
15614 Bin bin;
15617 // DEPRECATED (v2.4) function: factories_path_delete - Use #GtkUIManager instead.
15618 // Deletes all widgets constructed from the specified path.
15619 // <ifactory_path>: a factory path to prepend to @path. May be %NULL if @path starts with a factory path
15620 // <path>: a path
15621 static void factories_path_delete()(char* ifactory_path, char* path) {
15622 gtk_item_factories_path_delete(ifactory_path, path);
15624 void deselect()() {
15625 gtk_item_deselect(&this);
15627 void select()() {
15628 gtk_item_select(&this);
15630 void toggle()() {
15631 gtk_item_toggle(&this);
15633 extern (C) alias static void function (Item* this_, void* user_data=null) signal_deselect;
15635 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15636 return super_.signal_connect!name(cb, data, cf);
15639 ulong signal_connect(string name:"deselect", CB:signal_deselect)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15640 return signal_connect_data!()(&this, cast(char*)"deselect",
15641 cast(GObject2.Callback)cb, data, null, cf);
15643 extern (C) alias static void function (Item* this_, void* user_data=null) signal_select;
15644 ulong signal_connect(string name:"select", CB:signal_select)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15645 return signal_connect_data!()(&this, cast(char*)"select",
15646 cast(GObject2.Callback)cb, data, null, cf);
15648 extern (C) alias static void function (Item* this_, void* user_data=null) signal_toggle;
15649 ulong signal_connect(string name:"toggle", CB:signal_toggle)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
15650 return signal_connect_data!()(&this, cast(char*)"toggle",
15651 cast(GObject2.Callback)cb, data, null, cf);
15655 struct ItemClass {
15656 BinClass parent_class;
15657 extern (C) void function (Item* item) select;
15658 extern (C) void function (Item* item) deselect;
15659 extern (C) void function (Item* item) toggle;
15660 extern (C) void function () _gtk_reserved1;
15661 extern (C) void function () _gtk_reserved2;
15662 extern (C) void function () _gtk_reserved3;
15663 extern (C) void function () _gtk_reserved4;
15666 struct ItemFactory /* : Object */ {
15667 alias object this;
15668 alias object super_;
15669 Object object;
15670 char* path;
15671 AccelGroup* accel_group;
15672 Widget* widget;
15673 GLib2.SList* items;
15674 TranslateFunc translate_func;
15675 void* translate_data;
15676 GLib2.DestroyNotify translate_notify;
15679 // DEPRECATED (v2.4) constructor: new - Use #GtkUIManager instead.
15680 // Creates a new #GtkItemFactory.
15681 // Beware that the returned object does not have a floating reference.
15682 // RETURNS: a new #GtkItemFactory
15683 // <container_type>: the kind of menu to create; can be #GTK_TYPE_MENU_BAR, #GTK_TYPE_MENU or #GTK_TYPE_OPTION_MENU
15684 // <path>: the factory path of the new item factory, a string of the form <literal>"&lt;name&gt;"</literal>
15685 // <accel_group>: a #GtkAccelGroup to which the accelerators for the menu items will be added, or %NULL to create a new one
15686 static ItemFactory* new_()(Type container_type, char* path, AccelGroup* accel_group=null) {
15687 return gtk_item_factory_new(container_type, path, accel_group);
15690 // DEPRECATED (v2.4) function: add_foreign - The recommended API for this purpose are the functions
15691 // Installs an accelerator for @accel_widget in @accel_group, that causes
15692 // the ::activate signal to be emitted if the accelerator is activated.
15693 // This function can be used to make widgets participate in the accel
15694 // saving/restoring functionality provided by gtk_accel_map_save() and
15695 // gtk_accel_map_load(), even if they haven't been created by an item
15696 // factory.
15697 // gtk_menu_item_set_accel_path() and gtk_widget_set_accel_path(); don't
15698 // use gtk_item_factory_add_foreign() in new code, since it is likely to
15699 // be removed in the future.
15700 // <accel_widget>: widget to install an accelerator on
15701 // <accel_group>: the accelerator group to install the accelerator in
15702 // <keyval>: key value of the accelerator
15703 // <modifiers>: modifier combination of the accelerator
15704 static void add_foreign()(Widget* accel_widget, char* full_path, AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifiers) {
15705 gtk_item_factory_add_foreign(accel_widget, full_path, accel_group, keyval, modifiers);
15708 // DEPRECATED (v2.4) function: create_menu_entries - Use #GtkUIManager instead.
15709 // Creates the menu items from the @entries.
15710 // <n_entries>: the length of @entries
15711 // <entries>: an array of #GtkMenuEntry<!-- -->s
15712 static void create_menu_entries()(uint n_entries, MenuEntry* entries) {
15713 gtk_item_factory_create_menu_entries(n_entries, entries);
15716 // Unintrospectable function: from_path() / gtk_item_factory_from_path()
15717 // DEPRECATED (v2.4) function: from_path - Use #GtkUIManager instead.
15718 // Finds an item factory which has been constructed using the
15719 // <literal>"&lt;name&gt;"</literal> prefix of @path as the @path argument
15720 // for gtk_item_factory_new().
15721 // RETURNS: the #GtkItemFactory created for the given factory path, or %NULL
15722 // <path>: a string starting with a factory path of the form <literal>"&lt;name&gt;"</literal>
15723 static ItemFactory* from_path()(char* path) {
15724 return gtk_item_factory_from_path(path);
15727 // Unintrospectable function: from_widget() / gtk_item_factory_from_widget()
15728 // DEPRECATED (v2.4) function: from_widget - Use #GtkUIManager instead.
15729 // Obtains the item factory from which a widget was created.
15730 // RETURNS: the item factory from which @widget was created, or %NULL
15731 // <widget>: a widget
15732 static ItemFactory* from_widget()(Widget* widget) {
15733 return gtk_item_factory_from_widget(widget);
15736 // DEPRECATED (v2.4) function: path_from_widget - Use #GtkUIManager instead.
15737 // If @widget has been created by an item factory, returns the full path
15738 // to it. (The full path of a widget is the concatenation of the factory
15739 // path specified in gtk_item_factory_new() with the path specified in the
15740 // #GtkItemFactoryEntry from which the widget was created.)
15741 // 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.
15742 // <widget>: a widget
15743 static char* path_from_widget()(Widget* widget) {
15744 return gtk_item_factory_path_from_widget(widget);
15747 // Unintrospectable function: popup_data_from_widget() / gtk_item_factory_popup_data_from_widget()
15748 // DEPRECATED (v2.4) function: popup_data_from_widget - Use #GtkUIManager instead.
15749 // Obtains the @popup_data which was passed to
15750 // gtk_item_factory_popup_with_data(). This data is available until the menu
15751 // is popped down again.
15752 // RETURNS: @popup_data associated with the item factory from which @widget was created, or %NULL if @widget wasn't created by an item factory
15753 // <widget>: a widget
15754 static void* popup_data_from_widget()(Widget* widget) {
15755 return gtk_item_factory_popup_data_from_widget(widget);
15758 // DEPRECATED (v2.4) method: construct - Use #GtkUIManager instead.
15759 // Initializes an item factory.
15760 // <container_type>: the kind of menu to create; can be #GTK_TYPE_MENU_BAR, #GTK_TYPE_MENU or #GTK_TYPE_OPTION_MENU
15761 // <path>: the factory path of @ifactory, a string of the form <literal>"&lt;name&gt;"</literal>
15762 // <accel_group>: a #GtkAccelGroup to which the accelerators for the menu items will be added, or %NULL to create a new one
15763 void construct()(Type container_type, char* path, AccelGroup* accel_group) {
15764 gtk_item_factory_construct(&this, container_type, path, accel_group);
15767 // DEPRECATED (v2.4) method: create_item - Use #GtkUIManager instead.
15768 // Creates an item for @entry.
15769 // <entry>: the #GtkItemFactoryEntry to create an item for
15770 // <callback_data>: data passed to the callback function of @entry
15771 // <callback_type>: 1 if the callback function of @entry is of type #GtkItemFactoryCallback1, 2 if it is of type #GtkItemFactoryCallback2
15772 void create_item()(ItemFactoryEntry* entry, void* callback_data, uint callback_type) {
15773 gtk_item_factory_create_item(&this, entry, callback_data, callback_type);
15776 // DEPRECATED (v2.4) method: create_items - Use #GtkUIManager instead.
15777 // Creates the menu items from the @entries.
15778 // <n_entries>: the length of @entries
15779 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s whose @callback members must by of type #GtkItemFactoryCallback1
15780 // <callback_data>: data passed to the callback functions of all entries
15781 void create_items()(uint n_entries, ItemFactoryEntry* entries, void* callback_data) {
15782 gtk_item_factory_create_items(&this, n_entries, entries, callback_data);
15785 // DEPRECATED (v2.4) method: create_items_ac - Use #GtkUIManager instead.
15786 // Creates the menu items from the @entries.
15787 // <n_entries>: the length of @entries
15788 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s
15789 // <callback_data>: data passed to the callback functions of all entries
15790 // <callback_type>: 1 if the callback functions in @entries are of type #GtkItemFactoryCallback1, 2 if they are of type #GtkItemFactoryCallback2
15791 void create_items_ac()(uint n_entries, ItemFactoryEntry* entries, void* callback_data, uint callback_type) {
15792 gtk_item_factory_create_items_ac(&this, n_entries, entries, callback_data, callback_type);
15795 // DEPRECATED (v2.4) method: delete_entries - Use #GtkUIManager instead.
15796 // Deletes the menu items which were created from the @entries by the given
15797 // item factory.
15798 // <n_entries>: the length of @entries
15799 // <entries>: an array of #GtkItemFactoryEntry<!-- -->s
15800 void delete_entries()(uint n_entries, ItemFactoryEntry* entries) {
15801 gtk_item_factory_delete_entries(&this, n_entries, entries);
15804 // DEPRECATED (v2.4) method: delete_entry - Use #GtkUIManager instead.
15805 // Deletes the menu item which was created from @entry by the given
15806 // item factory.
15807 // <entry>: a #GtkItemFactoryEntry
15808 void delete_entry()(ItemFactoryEntry* entry) {
15809 gtk_item_factory_delete_entry(&this, entry);
15812 // DEPRECATED (v2.4) method: delete_item - Use #GtkUIManager instead.
15813 // Deletes the menu item which was created for @path by the given
15814 // item factory.
15815 // <path>: a path
15816 void delete_item()(char* path) {
15817 gtk_item_factory_delete_item(&this, path);
15820 // Unintrospectable method: get_item() / gtk_item_factory_get_item()
15821 // DEPRECATED (v2.4) method: get_item - Use #GtkUIManager instead.
15822 // Obtains the menu item which corresponds to @path.
15823 // If the widget corresponding to @path is a menu item which opens a
15824 // submenu, then the item is returned. If you are interested in the submenu,
15825 // use gtk_item_factory_get_widget() instead.
15826 // RETURNS: the menu item for the given path, or %NULL if @path doesn't lead to a menu item
15827 // <path>: the path to the menu item
15828 Widget* get_item()(char* path) {
15829 return gtk_item_factory_get_item(&this, path);
15832 // Unintrospectable method: get_item_by_action() / gtk_item_factory_get_item_by_action()
15833 // DEPRECATED (v2.4) method: get_item_by_action - Use #GtkUIManager instead.
15834 // Obtains the menu item which was constructed from the first
15835 // #GtkItemFactoryEntry with the given @action.
15836 // RETURNS: the menu item which corresponds to the given action, or %NULL if no menu item was found
15837 // <action>: an action as specified in the @callback_action field of #GtkItemFactoryEntry
15838 Widget* get_item_by_action()(uint action) {
15839 return gtk_item_factory_get_item_by_action(&this, action);
15842 // Unintrospectable method: get_widget() / gtk_item_factory_get_widget()
15843 // DEPRECATED (v2.4) method: get_widget - Use #GtkUIManager instead.
15844 // Obtains the widget which corresponds to @path.
15845 // If the widget corresponding to @path is a menu item which opens a
15846 // submenu, then the submenu is returned. If you are interested in the menu
15847 // item, use gtk_item_factory_get_item() instead.
15848 // RETURNS: the widget for the given path, or %NULL if @path doesn't lead to a widget
15849 // <path>: the path to the widget
15850 Widget* get_widget()(char* path) {
15851 return gtk_item_factory_get_widget(&this, path);
15854 // Unintrospectable method: get_widget_by_action() / gtk_item_factory_get_widget_by_action()
15855 // DEPRECATED (v2.4) method: get_widget_by_action - Use #GtkUIManager instead.
15856 // Obtains the widget which was constructed from the #GtkItemFactoryEntry
15857 // with the given @action.
15858 // If there are multiple items with the same action, the result is
15859 // undefined.
15860 // RETURNS: the widget which corresponds to the given action, or %NULL if no widget was found
15861 // <action>: an action as specified in the @callback_action field of #GtkItemFactoryEntry
15862 Widget* get_widget_by_action()(uint action) {
15863 return gtk_item_factory_get_widget_by_action(&this, action);
15866 // DEPRECATED (v2.4) method: popup - Use #GtkUIManager instead.
15867 // Pops up the menu constructed from the item factory at (@x, @y).
15868 // The @mouse_button parameter should be the mouse button pressed to initiate
15869 // the menu popup. If the menu popup was initiated by something other than
15870 // a mouse button press, such as a mouse button release or a keypress,
15871 // The @time_ parameter should be the time stamp of the event that
15872 // initiated the popup. If such an event is not available, use
15873 // gtk_get_current_event_time() instead.
15874 // The operation of the @mouse_button and the @time_ parameter is the same
15875 // as the @button and @activation_time parameters for gtk_menu_popup().
15876 // <x>: the x position
15877 // <y>: the y position
15878 // <mouse_button>: the mouse button which was pressed to initiate the popup
15879 // <time_>: the time at which the activation event occurred
15880 void popup()(uint x, uint y, uint mouse_button, uint time_) {
15881 gtk_item_factory_popup(&this, x, y, mouse_button, time_);
15884 // Unintrospectable method: popup_data() / gtk_item_factory_popup_data()
15885 // DEPRECATED (v2.4) method: popup_data - Use #GtkUIManager instead.
15886 // Obtains the @popup_data which was passed to
15887 // gtk_item_factory_popup_with_data(). This data is available until the menu
15888 // is popped down again.
15889 // RETURNS: @popup_data associated with @ifactory
15890 void* popup_data()() {
15891 return gtk_item_factory_popup_data(&this);
15894 // DEPRECATED (v2.4) method: popup_with_data - Use #GtkUIManager instead.
15895 // Pops up the menu constructed from the item factory at (@x, @y). Callbacks
15896 // can access the @popup_data while the menu is posted via
15897 // gtk_item_factory_popup_data() and gtk_item_factory_popup_data_from_widget().
15898 // The @mouse_button parameter should be the mouse button pressed to initiate
15899 // the menu popup. If the menu popup was initiated by something other than
15900 // a mouse button press, such as a mouse button release or a keypress,
15901 // The @time_ parameter should be the time stamp of the event that
15902 // initiated the popup. If such an event is not available, use
15903 // gtk_get_current_event_time() instead.
15904 // The operation of the @mouse_button and the @time_ parameters is the same
15905 // as the @button and @activation_time parameters for gtk_menu_popup().
15906 // <popup_data>: data available for callbacks while the menu is posted
15907 // <destroy>: a #GDestroyNotify function to be called on @popup_data when the menu is unposted
15908 // <x>: the x position
15909 // <y>: the y position
15910 // <mouse_button>: the mouse button which was pressed to initiate the popup
15911 // <time_>: the time at which the activation event occurred
15912 void popup_with_data()(void* popup_data, GLib2.DestroyNotify destroy, uint x, uint y, uint mouse_button, uint time_) {
15913 gtk_item_factory_popup_with_data(&this, popup_data, destroy, x, y, mouse_button, time_);
15916 // DEPRECATED (v2.4) method: set_translate_func - Use #GtkUIManager instead.
15917 // Sets a function to be used for translating the path elements before they
15918 // are displayed.
15919 // <func>: the #GtkTranslateFunc function to be used to translate path elements
15920 // <data>: data to pass to @func and @notify
15921 // <notify>: a #GDestroyNotify function to be called when @ifactory is destroyed and when the translation function is changed again
15922 void set_translate_func()(TranslateFunc func, void* data, GLib2.DestroyNotify notify) {
15923 gtk_item_factory_set_translate_func(&this, func, data, notify);
15927 extern (C) alias void function () ItemFactoryCallback;
15929 extern (C) alias void function (void* callback_data, uint callback_action, Widget* widget) ItemFactoryCallback1;
15931 extern (C) alias void function (Widget* widget, void* callback_data, uint callback_action) ItemFactoryCallback2;
15933 struct ItemFactoryClass {
15934 ObjectClass object_class;
15935 GLib2.HashTable* item_ht;
15936 extern (C) void function () _gtk_reserved1;
15937 extern (C) void function () _gtk_reserved2;
15938 extern (C) void function () _gtk_reserved3;
15939 extern (C) void function () _gtk_reserved4;
15942 struct ItemFactoryEntry {
15943 char* path, accelerator;
15944 ItemFactoryCallback callback;
15945 uint callback_action;
15946 char* item_type;
15947 const(void)* extra_data;
15950 struct ItemFactoryItem {
15951 char* path;
15952 GLib2.SList* widgets;
15955 enum Justification {
15956 LEFT = 0,
15957 RIGHT = 1,
15958 CENTER = 2,
15959 FILL = 3
15961 extern (C) alias int function (Widget* grab_widget, Gdk2.EventKey* event, void* func_data) KeySnoopFunc;
15963 struct Label /* : Misc */ {
15964 mixin Atk.ImplementorIface.__interface__;
15965 mixin Buildable.__interface__;
15966 alias misc this;
15967 alias misc super_;
15968 Misc misc;
15969 private char* label;
15970 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
15971 uint, "jtype", 2,
15972 uint, "wrap", 1,
15973 uint, "use_underline", 1,
15974 uint, "use_markup", 1,
15975 uint, "ellipsize", 3,
15976 uint, "single_line_mode", 1,
15977 uint, "have_transform", 1,
15978 uint, "in_click", 1,
15979 uint, "wrap_mode", 3,
15980 uint, "pattern_set", 1,
15981 uint, "track_links", 1,
15982 uint, "__dummy32A", 16));
15983 private uint mnemonic_keyval;
15984 private char* text;
15985 private Pango.AttrList* attrs, effective_attrs;
15986 private Pango.Layout* layout;
15987 private Widget* mnemonic_widget;
15988 private Window* mnemonic_window;
15989 private LabelSelectionInfo* select_info;
15992 // Creates a new label with the given text inside it. You can
15993 // pass %NULL to get an empty label widget.
15994 // RETURNS: the new #GtkLabel
15995 // <str>: The text of the label
15996 static Label* new_()(char* str) {
15997 return gtk_label_new(str);
16000 // Creates a new #GtkLabel, containing the text in @str.
16001 // If characters in @str are preceded by an underscore, they are
16002 // underlined. If you need a literal underscore character in a label, use
16003 // '__' (two underscores). The first underlined character represents a
16004 // keyboard accelerator called a mnemonic. The mnemonic key can be used
16005 // to activate another widget, chosen automatically, or explicitly using
16006 // gtk_label_set_mnemonic_widget().
16007 // If gtk_label_set_mnemonic_widget() is not called, then the first
16008 // activatable ancestor of the #GtkLabel will be chosen as the mnemonic
16009 // widget. For instance, if the label is inside a button or menu item,
16010 // the button or menu item will automatically become the mnemonic widget
16011 // and be activated by the mnemonic.
16012 // RETURNS: the new #GtkLabel
16013 // <str>: The text of the label, with an underscore in front of the mnemonic character
16014 static Label* new_with_mnemonic()(char* str) {
16015 return gtk_label_new_with_mnemonic(str);
16017 void get()(char** str) {
16018 gtk_label_get(&this, str);
16021 // VERSION: 2.6
16022 // Gets the angle of rotation for the label. See
16023 // gtk_label_set_angle().
16024 // RETURNS: the angle of rotation for the label
16025 double get_angle()() {
16026 return gtk_label_get_angle(&this);
16029 // Gets the attribute list that was set on the label using
16030 // gtk_label_set_attributes(), if any. This function does
16031 // not reflect attributes that come from the labels markup
16032 // (see gtk_label_set_markup()). If you want to get the
16033 // effective attributes for the label, use
16034 // pango_layout_get_attribute (gtk_label_get_layout (label)).
16035 // if none was set.
16036 // RETURNS: the attribute list, or %NULL
16037 Pango.AttrList* get_attributes()() {
16038 return gtk_label_get_attributes(&this);
16041 // VERSION: 2.18
16042 // Returns the URI for the currently active link in the label.
16043 // The active link is the one under the mouse pointer or, in a
16044 // selectable label, the link in which the text cursor is currently
16045 // positioned.
16046 // This function is intended for use in a #GtkLabel::activate-link handler
16047 // or for use in a #GtkWidget::query-tooltip handler.
16048 // not be freed or modified.
16049 // RETURNS: the currently active URI. The string is owned by GTK+ and must
16050 char* get_current_uri()() {
16051 return gtk_label_get_current_uri(&this);
16054 // VERSION: 2.6
16055 // Returns the ellipsizing position of the label. See gtk_label_set_ellipsize().
16056 // RETURNS: #PangoEllipsizeMode
16057 Pango.EllipsizeMode get_ellipsize()() {
16058 return gtk_label_get_ellipsize(&this);
16061 // Returns the justification of the label. See gtk_label_set_justify().
16062 // RETURNS: #GtkJustification
16063 Justification get_justify()() {
16064 return gtk_label_get_justify(&this);
16067 // Fetches the text from a label widget including any embedded
16068 // underlines indicating mnemonics and Pango markup. (See
16069 // gtk_label_get_text()).
16070 // owned by the widget and must not be modified or freed.
16071 // RETURNS: the text of the label widget. This string is
16072 char* get_label()() {
16073 return gtk_label_get_label(&this);
16076 // Gets the #PangoLayout used to display the label.
16077 // The layout is useful to e.g. convert text positions to
16078 // pixel positions, in combination with gtk_label_get_layout_offsets().
16079 // The returned layout is owned by the label so need not be
16080 // freed by the caller.
16081 // RETURNS: the #PangoLayout for this label
16082 Pango.Layout* get_layout()() {
16083 return gtk_label_get_layout(&this);
16086 // Obtains the coordinates where the label will draw the #PangoLayout
16087 // representing the text in the label; useful to convert mouse events
16088 // into coordinates inside the #PangoLayout, e.g. to take some action
16089 // if some part of the label is clicked. Of course you will need to
16090 // create a #GtkEventBox to receive the events, and pack the label
16091 // inside it, since labels are a #GTK_NO_WINDOW widget. Remember
16092 // when using the #PangoLayout functions you need to convert to
16093 // and from pixels using PANGO_PIXELS() or #PANGO_SCALE.
16094 // <x>: location to store X offset of layout, or %NULL
16095 // <y>: location to store Y offset of layout, or %NULL
16096 void get_layout_offsets()(/*out*/ int* x=null, /*out*/ int* y=null) {
16097 gtk_label_get_layout_offsets(&this, x, y);
16100 // Returns whether lines in the label are automatically wrapped.
16101 // See gtk_label_set_line_wrap().
16102 // RETURNS: %TRUE if the lines of the label are automatically wrapped.
16103 int get_line_wrap()() {
16104 return gtk_label_get_line_wrap(&this);
16107 // VERSION: 2.10
16108 // Returns line wrap mode used by the label. See gtk_label_set_line_wrap_mode().
16109 // RETURNS: %TRUE if the lines of the label are automatically wrapped.
16110 Pango.WrapMode get_line_wrap_mode()() {
16111 return gtk_label_get_line_wrap_mode(&this);
16114 // VERSION: 2.6
16115 // Retrieves the desired maximum width of @label, in characters. See
16116 // gtk_label_set_width_chars().
16117 // RETURNS: the maximum width of the label in characters.
16118 int get_max_width_chars()() {
16119 return gtk_label_get_max_width_chars(&this);
16122 // If the label has been set so that it has an mnemonic key this function
16123 // returns the keyval used for the mnemonic accelerator. If there is no
16124 // mnemonic set up it returns #GDK_VoidSymbol.
16125 // RETURNS: GDK keyval usable for accelerators, or #GDK_VoidSymbol
16126 uint get_mnemonic_keyval()() {
16127 return gtk_label_get_mnemonic_keyval(&this);
16130 // Retrieves the target of the mnemonic (keyboard shortcut) of this
16131 // label. See gtk_label_set_mnemonic_widget().
16132 // or %NULL if none has been set and the default algorithm will be used.
16133 // RETURNS: the target of the label's mnemonic,
16134 Widget* get_mnemonic_widget()() {
16135 return gtk_label_get_mnemonic_widget(&this);
16138 // Gets the value set by gtk_label_set_selectable().
16139 // RETURNS: %TRUE if the user can copy text from the label
16140 int get_selectable()() {
16141 return gtk_label_get_selectable(&this);
16144 // Gets the selected range of characters in the label, returning %TRUE
16145 // if there's a selection.
16146 // RETURNS: %TRUE if selection is non-empty
16147 // <start>: return location for start of selection, as a character offset
16148 // <end>: return location for end of selection, as a character offset
16149 int get_selection_bounds()(/*out*/ int* start, /*out*/ int* end) {
16150 return gtk_label_get_selection_bounds(&this, start, end);
16153 // VERSION: 2.6
16154 // Returns whether the label is in single line mode.
16155 // RETURNS: %TRUE when the label is in single line mode.
16156 int get_single_line_mode()() {
16157 return gtk_label_get_single_line_mode(&this);
16160 // Fetches the text from a label widget, as displayed on the
16161 // screen. This does not include any embedded underlines
16162 // indicating mnemonics or Pango markup. (See gtk_label_get_label())
16163 // string used by the label, and must not be modified.
16164 // RETURNS: the text in the label widget. This is the internal
16165 char* get_text()() {
16166 return gtk_label_get_text(&this);
16169 // VERSION: 2.18
16170 // Returns whether the label is currently keeping track
16171 // of clicked links.
16172 // RETURNS: %TRUE if clicked links are remembered
16173 int get_track_visited_links()() {
16174 return gtk_label_get_track_visited_links(&this);
16177 // Returns whether the label's text is interpreted as marked up with
16178 // the <link linkend="PangoMarkupFormat">Pango text markup
16179 // language</link>. See gtk_label_set_use_markup ().
16180 // RETURNS: %TRUE if the label's text will be parsed for markup.
16181 int get_use_markup()() {
16182 return gtk_label_get_use_markup(&this);
16185 // Returns whether an embedded underline in the label indicates a
16186 // mnemonic. See gtk_label_set_use_underline().
16187 // the mnemonic accelerator keys.
16188 // RETURNS: %TRUE whether an embedded underline in the label indicates
16189 int get_use_underline()() {
16190 return gtk_label_get_use_underline(&this);
16193 // VERSION: 2.6
16194 // Retrieves the desired width of @label, in characters. See
16195 // gtk_label_set_width_chars().
16196 // RETURNS: the width of the label in characters.
16197 int get_width_chars()() {
16198 return gtk_label_get_width_chars(&this);
16200 uint parse_uline()(char* string_) {
16201 return gtk_label_parse_uline(&this, string_);
16204 // Selects a range of characters in the label, if the label is selectable.
16205 // See gtk_label_set_selectable(). If the label is not selectable,
16206 // this function has no effect. If @start_offset or
16207 // <start_offset>: start offset (in characters not bytes)
16208 // <end_offset>: end offset (in characters not bytes)
16209 void select_region()(int start_offset, int end_offset) {
16210 gtk_label_select_region(&this, start_offset, end_offset);
16213 // VERSION: 2.6
16214 // Sets the angle of rotation for the label. An angle of 90 reads from
16215 // from bottom to top, an angle of 270, from top to bottom. The angle
16216 // setting for the label is ignored if the label is selectable,
16217 // wrapped, or ellipsized.
16218 // <angle>: the angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise
16219 void set_angle()(double angle) {
16220 gtk_label_set_angle(&this, angle);
16223 // Sets a #PangoAttrList; the attributes in the list are applied to the
16224 // label text.
16225 // <note><para>The attributes set with this function will be applied
16226 // and merged with any other attributes previously effected by way
16227 // of the #GtkLabel:use-underline or #GtkLabel:use-markup properties.
16228 // While it is not recommended to mix markup strings with manually set
16229 // attributes, if you must; know that the attributes will be applied
16230 // to the label after the markup string is parsed.</para></note>
16231 // <attrs>: a #PangoAttrList
16232 void set_attributes()(Pango.AttrList* attrs) {
16233 gtk_label_set_attributes(&this, attrs);
16236 // VERSION: 2.6
16237 // if there is not enough space to render the entire string.
16238 // <mode>: a #PangoEllipsizeMode
16239 void set_ellipsize()(Pango.EllipsizeMode mode) {
16240 gtk_label_set_ellipsize(&this, mode);
16243 // Sets the alignment of the lines in the text of the label relative to
16244 // each other. %GTK_JUSTIFY_LEFT is the default value when the
16245 // widget is first created with gtk_label_new(). If you instead want
16246 // to set the alignment of the label as a whole, use
16247 // gtk_misc_set_alignment() instead. gtk_label_set_justify() has no
16248 // effect on labels containing only a single line.
16249 // <jtype>: a #GtkJustification
16250 void set_justify()(Justification jtype) {
16251 gtk_label_set_justify(&this, jtype);
16254 // Sets the text of the label. The label is interpreted as
16255 // including embedded underlines and/or Pango markup depending
16256 // on the values of the #GtkLabel:use-underline" and
16257 // #GtkLabel:use-markup properties.
16258 // <str>: the new text to set for the label
16259 void set_label()(char* str) {
16260 gtk_label_set_label(&this, str);
16263 // Toggles line wrapping within the #GtkLabel widget. %TRUE makes it break
16264 // lines if text exceeds the widget's size. %FALSE lets the text get cut off
16265 // by the edge of the widget if it exceeds the widget size.
16266 // Note that setting line wrapping to %TRUE does not make the label
16267 // wrap at its parent container's width, because GTK+ widgets
16268 // conceptually can't make their requisition depend on the parent
16269 // container's size. For a label that wraps at a specific position,
16270 // set the label's width using gtk_widget_set_size_request().
16271 // <wrap>: the setting
16272 void set_line_wrap()(int wrap) {
16273 gtk_label_set_line_wrap(&this, wrap);
16276 // VERSION: 2.10
16277 // If line wrapping is on (see gtk_label_set_line_wrap()) this controls how
16278 // the line wrapping is done. The default is %PANGO_WRAP_WORD which means
16279 // wrap on word boundaries.
16280 // <wrap_mode>: the line wrapping mode
16281 void set_line_wrap_mode()(Pango.WrapMode wrap_mode) {
16282 gtk_label_set_line_wrap_mode(&this, wrap_mode);
16285 // Parses @str which is marked up with the <link
16286 // linkend="PangoMarkupFormat">Pango text markup language</link>, setting the
16287 // label's text and attribute list based on the parse results. If the @str is
16288 // external data, you may need to escape it with g_markup_escape_text() or
16289 // g_markup_printf_escaped()<!-- -->:
16290 // |[
16291 // char *markup;
16292 // markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;&percnt;s&lt;/span&gt;", str);
16293 // gtk_label_set_markup (GTK_LABEL (label), markup);
16294 // g_free (markup);
16295 // ]|
16296 // <str>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
16297 void set_markup()(char* str) {
16298 gtk_label_set_markup(&this, str);
16301 // Parses @str which is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>,
16302 // setting the label's text and attribute list based on the parse results.
16303 // If characters in @str are preceded by an underscore, they are underlined
16304 // indicating that they represent a keyboard accelerator called a mnemonic.
16305 // The mnemonic key can be used to activate another widget, chosen
16306 // automatically, or explicitly using gtk_label_set_mnemonic_widget().
16307 // <str>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
16308 void set_markup_with_mnemonic()(char* str) {
16309 gtk_label_set_markup_with_mnemonic(&this, str);
16312 // VERSION: 2.6
16313 // Sets the desired maximum width in characters of @label to @n_chars.
16314 // <n_chars>: the new desired maximum width, in characters.
16315 void set_max_width_chars()(int n_chars) {
16316 gtk_label_set_max_width_chars(&this, n_chars);
16319 // If the label has been set so that it has an mnemonic key (using
16320 // i.e. gtk_label_set_markup_with_mnemonic(),
16321 // gtk_label_set_text_with_mnemonic(), gtk_label_new_with_mnemonic()
16322 // or the "use_underline" property) the label can be associated with a
16323 // widget that is the target of the mnemonic. When the label is inside
16324 // a widget (like a #GtkButton or a #GtkNotebook tab) it is
16325 // automatically associated with the correct widget, but sometimes
16326 // (i.e. when the target is a #GtkEntry next to the label) you need to
16327 // set it explicitly using this function.
16328 // The target widget will be accelerated by emitting the
16329 // GtkWidget::mnemonic-activate signal on it. The default handler for
16330 // this signal will activate the widget if there are no mnemonic collisions
16331 // and toggle focus between the colliding widgets otherwise.
16332 // <widget>: the target #GtkWidget
16333 void set_mnemonic_widget()(Widget* widget=null) {
16334 gtk_label_set_mnemonic_widget(&this, widget);
16336 void set_pattern()(char* pattern) {
16337 gtk_label_set_pattern(&this, pattern);
16340 // Selectable labels allow the user to select text from the label, for
16341 // copy-and-paste.
16342 // <setting>: %TRUE to allow selecting text in the label
16343 void set_selectable()(int setting) {
16344 gtk_label_set_selectable(&this, setting);
16347 // VERSION: 2.6
16348 // Sets whether the label is in single line mode.
16349 // <single_line_mode>: %TRUE if the label should be in single line mode
16350 void set_single_line_mode()(int single_line_mode) {
16351 gtk_label_set_single_line_mode(&this, single_line_mode);
16354 // Sets the text within the #GtkLabel widget. It overwrites any text that
16355 // was there before.
16356 // This will also clear any previously set mnemonic accelerators.
16357 // <str>: The text you want to set
16358 void set_text()(char* str) {
16359 gtk_label_set_text(&this, str);
16362 // Sets the label's text from the string @str.
16363 // If characters in @str are preceded by an underscore, they are underlined
16364 // indicating that they represent a keyboard accelerator called a mnemonic.
16365 // The mnemonic key can be used to activate another widget, chosen
16366 // automatically, or explicitly using gtk_label_set_mnemonic_widget().
16367 // <str>: a string
16368 void set_text_with_mnemonic()(char* str) {
16369 gtk_label_set_text_with_mnemonic(&this, str);
16372 // VERSION: 2.18
16373 // Sets whether the label should keep track of clicked
16374 // links (and use a different color for them).
16375 // <track_links>: %TRUE to track visited links
16376 void set_track_visited_links()(int track_links) {
16377 gtk_label_set_track_visited_links(&this, track_links);
16380 // Sets whether the text of the label contains markup in <link
16381 // linkend="PangoMarkupFormat">Pango's text markup
16382 // language</link>. See gtk_label_set_markup().
16383 // <setting>: %TRUE if the label's text should be parsed for markup.
16384 void set_use_markup()(int setting) {
16385 gtk_label_set_use_markup(&this, setting);
16388 // If true, an underline in the text indicates the next character should be
16389 // used for the mnemonic accelerator key.
16390 // <setting>: %TRUE if underlines in the text indicate mnemonics
16391 void set_use_underline()(int setting) {
16392 gtk_label_set_use_underline(&this, setting);
16395 // VERSION: 2.6
16396 // Sets the desired width in characters of @label to @n_chars.
16397 // <n_chars>: the new desired width, in characters.
16398 void set_width_chars()(int n_chars) {
16399 gtk_label_set_width_chars(&this, n_chars);
16402 // VERSION: 2.18
16403 // A <link linkend="keybinding-signals">keybinding signal</link>
16404 // which gets emitted when the user activates a link in the label.
16405 // Applications may also emit the signal with g_signal_emit_by_name()
16406 // if they need to control activation of URIs programmatically.
16407 // The default bindings for this signal are all forms of the Enter key.
16408 extern (C) alias static void function (Label* this_, void* user_data=null) signal_activate_current_link;
16410 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16411 return super_.signal_connect!name(cb, data, cf);
16414 ulong signal_connect(string name:"activate-current-link", CB:signal_activate_current_link)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16415 return signal_connect_data!()(&this, cast(char*)"activate-current-link",
16416 cast(GObject2.Callback)cb, data, null, cf);
16419 // VERSION: 2.18
16420 // The signal which gets emitted to activate a URI.
16421 // Applications may connect to it to override the default behaviour,
16422 // which is to call gtk_show_uri().
16423 // RETURNS: %TRUE if the link has been activated
16424 // <uri>: the URI that is activated
16425 extern (C) alias static c_int function (Label* this_, char* uri, void* user_data=null) signal_activate_link;
16426 ulong signal_connect(string name:"activate-link", CB:signal_activate_link)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16427 return signal_connect_data!()(&this, cast(char*)"activate-link",
16428 cast(GObject2.Callback)cb, data, null, cf);
16431 // The ::copy-clipboard signal is a
16432 // <link linkend="keybinding-signals">keybinding signal</link>
16433 // which gets emitted to copy the selection to the clipboard.
16434 // The default binding for this signal is Ctrl-c.
16435 extern (C) alias static void function (Label* this_, void* user_data=null) signal_copy_clipboard;
16436 ulong signal_connect(string name:"copy-clipboard", CB:signal_copy_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16437 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
16438 cast(GObject2.Callback)cb, data, null, cf);
16441 // The ::move-cursor signal is a
16442 // <link linkend="keybinding-signals">keybinding signal</link>
16443 // which gets emitted when the user initiates a cursor movement.
16444 // If the cursor is not visible in @entry, this signal causes
16445 // the viewport to be moved instead.
16446 // Applications should not connect to it, but may emit it with
16447 // g_signal_emit_by_name() if they need to control the cursor
16448 // programmatically.
16449 // The default bindings for this signal come in two variants,
16450 // the variant with the Shift modifier extends the selection,
16451 // the variant without the Shift modifer does not.
16452 // There are too many key combinations to list them all here.
16453 // <itemizedlist>
16454 // <listitem>Arrow keys move by individual characters/lines</listitem>
16455 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
16456 // <listitem>Home/End keys move to the ends of the buffer</listitem>
16457 // </itemizedlist>
16458 // <step>: the granularity of the move, as a #GtkMovementStep
16459 // <count>: the number of @step units to move
16460 // <extend_selection>: %TRUE if the move should extend the selection
16461 extern (C) alias static void function (Label* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) signal_move_cursor;
16462 ulong signal_connect(string name:"move-cursor", CB:signal_move_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16463 return signal_connect_data!()(&this, cast(char*)"move-cursor",
16464 cast(GObject2.Callback)cb, data, null, cf);
16467 // The ::populate-popup signal gets emitted before showing the
16468 // context menu of the label. Note that only selectable labels
16469 // have context menus.
16470 // If you need to add items to the context menu, connect
16471 // to this signal and append your menuitems to the @menu.
16472 // <menu>: the menu that is being populated
16473 extern (C) alias static void function (Label* this_, Menu* menu, void* user_data=null) signal_populate_popup;
16474 ulong signal_connect(string name:"populate-popup", CB:signal_populate_popup)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16475 return signal_connect_data!()(&this, cast(char*)"populate-popup",
16476 cast(GObject2.Callback)cb, data, null, cf);
16480 struct LabelClass {
16481 MiscClass parent_class;
16482 extern (C) void function (Label* label, MovementStep step, int count, int extend_selection) move_cursor;
16483 extern (C) void function (Label* label) copy_clipboard;
16484 extern (C) void function (Label* label, Menu* menu) populate_popup;
16485 extern (C) int function (Label* label, char* uri) activate_link;
16486 extern (C) void function () _gtk_reserved1;
16487 extern (C) void function () _gtk_reserved2;
16488 extern (C) void function () _gtk_reserved3;
16491 struct LabelSelectionInfo {
16494 struct Layout /* : Container */ {
16495 mixin Atk.ImplementorIface.__interface__;
16496 mixin Buildable.__interface__;
16497 alias container this;
16498 alias container super_;
16499 Container container;
16500 GLib2.List* children;
16501 uint width, height;
16502 Adjustment* hadjustment, vadjustment;
16503 Gdk2.Window* bin_window;
16504 private Gdk2.VisibilityState visibility;
16505 private int scroll_x, scroll_y;
16506 private uint freeze_count;
16509 // Creates a new #GtkLayout. Unless you have a specific adjustment
16510 // you'd like the layout to use for scrolling, pass %NULL for
16511 // RETURNS: a new #GtkLayout
16512 // <hadjustment>: horizontal scroll adjustment, or %NULL
16513 // <vadjustment>: vertical scroll adjustment, or %NULL
16514 static Layout* new_()(Adjustment* hadjustment=null, Adjustment* vadjustment=null) {
16515 return gtk_layout_new(hadjustment, vadjustment);
16517 // This is a deprecated function, it doesn't do anything useful.
16518 void freeze()() {
16519 gtk_layout_freeze(&this);
16522 // VERSION: 2.14
16523 // Retrieve the bin window of the layout used for drawing operations.
16524 // RETURNS: a #GdkWindow
16525 Gdk2.Window* get_bin_window()() {
16526 return gtk_layout_get_bin_window(&this);
16529 // This function should only be called after the layout has been
16530 // placed in a #GtkScrolledWindow or otherwise configured for
16531 // scrolling. It returns the #GtkAdjustment used for communication
16532 // between the horizontal scrollbar and @layout.
16533 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
16534 // RETURNS: horizontal scroll adjustment
16535 Adjustment* get_hadjustment()() {
16536 return gtk_layout_get_hadjustment(&this);
16539 // Gets the size that has been set on the layout, and that determines
16540 // the total extents of the layout's scrollbar area. See
16541 // gtk_layout_set_size ().
16542 // <width>: location to store the width set on
16543 // <height>: location to store the height set on
16544 void get_size()(/*out*/ uint* width=null, /*out*/ uint* height=null) {
16545 gtk_layout_get_size(&this, width, height);
16548 // This function should only be called after the layout has been
16549 // placed in a #GtkScrolledWindow or otherwise configured for
16550 // scrolling. It returns the #GtkAdjustment used for communication
16551 // between the vertical scrollbar and @layout.
16552 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
16553 // RETURNS: vertical scroll adjustment
16554 Adjustment* get_vadjustment()() {
16555 return gtk_layout_get_vadjustment(&this);
16558 // Moves a current child of @layout to a new position.
16559 // <child_widget>: a current child of @layout
16560 // <x>: X position to move to
16561 // <y>: Y position to move to
16562 void move()(Widget* child_widget, int x, int y) {
16563 gtk_layout_move(&this, child_widget, x, y);
16566 // Adds @child_widget to @layout, at position (@x,@y).
16567 // <child_widget>: child widget
16568 // <x>: X position of child widget
16569 // <y>: Y position of child widget
16570 void put()(Widget* child_widget, int x, int y) {
16571 gtk_layout_put(&this, child_widget, x, y);
16574 // Sets the horizontal scroll adjustment for the layout.
16575 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
16576 // <adjustment>: new scroll adjustment
16577 void set_hadjustment()(Adjustment* adjustment=null) {
16578 gtk_layout_set_hadjustment(&this, adjustment);
16581 // Sets the size of the scrollable area of the layout.
16582 // <width>: width of entire scrollable area
16583 // <height>: height of entire scrollable area
16584 void set_size()(uint width, uint height) {
16585 gtk_layout_set_size(&this, width, height);
16588 // Sets the vertical scroll adjustment for the layout.
16589 // See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details.
16590 // <adjustment>: new scroll adjustment
16591 void set_vadjustment()(Adjustment* adjustment=null) {
16592 gtk_layout_set_vadjustment(&this, adjustment);
16594 // This is a deprecated function, it doesn't do anything useful.
16595 void thaw()() {
16596 gtk_layout_thaw(&this);
16599 // Set the scroll adjustments for the layout. Usually scrolled containers
16600 // like #GtkScrolledWindow will emit this signal to connect two instances
16601 // of #GtkScrollbar to the scroll directions of the #GtkLayout.
16602 extern (C) alias static void function (Layout* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
16604 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16605 return super_.signal_connect!name(cb, data, cf);
16608 ulong signal_connect(string name:"set-scroll-adjustments", CB:signal_set_scroll_adjustments)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16609 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
16610 cast(GObject2.Callback)cb, data, null, cf);
16614 struct LayoutClass {
16615 ContainerClass parent_class;
16616 extern (C) void function (Layout* layout, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
16617 extern (C) void function () _gtk_reserved1;
16618 extern (C) void function () _gtk_reserved2;
16619 extern (C) void function () _gtk_reserved3;
16620 extern (C) void function () _gtk_reserved4;
16623 struct LinkButton /* : Button */ {
16624 mixin Atk.ImplementorIface.__interface__;
16625 mixin Activatable.__interface__;
16626 mixin Buildable.__interface__;
16627 alias parent_instance this;
16628 alias parent_instance super_;
16629 alias parent_instance button;
16630 Button parent_instance;
16631 LinkButtonPrivate* priv;
16634 // VERSION: 2.10
16635 // Creates a new #GtkLinkButton with the URI as its text.
16636 // RETURNS: a new link button widget.
16637 // <uri>: a valid URI
16638 static LinkButton* new_()(char* uri) {
16639 return gtk_link_button_new(uri);
16642 // VERSION: 2.10
16643 // Creates a new #GtkLinkButton containing a label.
16644 // RETURNS: a new link button widget.
16645 // <uri>: a valid URI
16646 // <label>: the text of the button
16647 static LinkButton* new_with_label()(char* uri, char* label=null) {
16648 return gtk_link_button_new_with_label(uri, label);
16651 // Unintrospectable function: set_uri_hook() / gtk_link_button_set_uri_hook()
16652 // VERSION: 2.10
16653 // DEPRECATED (v2.24) function: set_uri_hook - Use the #GtkButton::clicked signal instead
16654 // Sets @func as the function that should be invoked every time a user clicks
16655 // a #GtkLinkButton. This function is called before every callback registered
16656 // for the "clicked" signal.
16657 // If no uri hook has been set, GTK+ defaults to calling gtk_show_uri().
16658 // RETURNS: the previously set hook function.
16659 // <func>: a function called each time a #GtkLinkButton is clicked, or %NULL
16660 // <data>: user data to be passed to @func, or %NULL
16661 // <destroy>: a #GDestroyNotify that gets called when @data is no longer needed, or %NULL
16662 static LinkButtonUriFunc set_uri_hook()(LinkButtonUriFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) {
16663 return gtk_link_button_set_uri_hook(func, data, destroy);
16666 // VERSION: 2.10
16667 // Retrieves the URI set using gtk_link_button_set_uri().
16668 // and should not be modified or freed.
16669 // RETURNS: a valid URI. The returned string is owned by the link button
16670 char* get_uri()() {
16671 return gtk_link_button_get_uri(&this);
16674 // VERSION: 2.14
16675 // Retrieves the 'visited' state of the URI where the #GtkLinkButton
16676 // points. The button becomes visited when it is clicked. If the URI
16677 // is changed on the button, the 'visited' state is unset again.
16678 // The state may also be changed using gtk_link_button_set_visited().
16679 // RETURNS: %TRUE if the link has been visited, %FALSE otherwise
16680 int get_visited()() {
16681 return gtk_link_button_get_visited(&this);
16684 // VERSION: 2.10
16685 // Sets @uri as the URI where the #GtkLinkButton points. As a side-effect
16686 // this unsets the 'visited' state of the button.
16687 // <uri>: a valid URI
16688 void set_uri()(char* uri) {
16689 gtk_link_button_set_uri(&this, uri);
16692 // VERSION: 2.14
16693 // Sets the 'visited' state of the URI where the #GtkLinkButton
16694 // points. See gtk_link_button_get_visited() for more details.
16695 // <visited>: the new 'visited' state
16696 void set_visited()(int visited) {
16697 gtk_link_button_set_visited(&this, visited);
16701 struct LinkButtonClass {
16702 ButtonClass parent_class;
16703 extern (C) void function () _gtk_padding1;
16704 extern (C) void function () _gtk_padding2;
16705 extern (C) void function () _gtk_padding3;
16706 extern (C) void function () _gtk_padding4;
16709 struct LinkButtonPrivate {
16712 extern (C) alias void function (LinkButton* button, char* link_, void* user_data) LinkButtonUriFunc;
16714 struct List /* : Container */ {
16715 mixin Atk.ImplementorIface.__interface__;
16716 mixin Buildable.__interface__;
16717 alias container this;
16718 alias container super_;
16719 Container container;
16720 GLib2.List* children, selection, undo_selection_, undo_unselection;
16721 Widget* last_focus_child, undo_focus_child;
16722 uint htimer, vtimer;
16723 int anchor, drag_pos;
16724 StateType anchor_state;
16725 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
16726 uint, "selection_mode", 2,
16727 uint, "drag_selection", 1,
16728 uint, "add_mode", 1,
16729 uint, "__dummy32A", 28));
16731 static List* new_()() {
16732 return gtk_list_new();
16734 void append_items()(GLib2.List* items) {
16735 gtk_list_append_items(&this, items);
16737 int child_position()(Widget* child) {
16738 return gtk_list_child_position(&this, child);
16740 void clear_items()(int start, int end) {
16741 gtk_list_clear_items(&this, start, end);
16743 void end_drag_selection()() {
16744 gtk_list_end_drag_selection(&this);
16746 void end_selection()() {
16747 gtk_list_end_selection(&this);
16749 void extend_selection()(ScrollType scroll_type, float position, int auto_start_selection) {
16750 gtk_list_extend_selection(&this, scroll_type, position, auto_start_selection);
16752 void insert_items()(GLib2.List* items, int position) {
16753 gtk_list_insert_items(&this, items, position);
16755 void prepend_items()(GLib2.List* items) {
16756 gtk_list_prepend_items(&this, items);
16758 void remove_items()(GLib2.List* items) {
16759 gtk_list_remove_items(&this, items);
16761 void remove_items_no_unref()(GLib2.List* items) {
16762 gtk_list_remove_items_no_unref(&this, items);
16764 void scroll_horizontal()(ScrollType scroll_type, float position) {
16765 gtk_list_scroll_horizontal(&this, scroll_type, position);
16767 void scroll_vertical()(ScrollType scroll_type, float position) {
16768 gtk_list_scroll_vertical(&this, scroll_type, position);
16770 void select_all()() {
16771 gtk_list_select_all(&this);
16773 void select_child()(Widget* child) {
16774 gtk_list_select_child(&this, child);
16776 void select_item()(int item) {
16777 gtk_list_select_item(&this, item);
16779 void set_selection_mode()(SelectionMode mode) {
16780 gtk_list_set_selection_mode(&this, mode);
16782 void start_selection()() {
16783 gtk_list_start_selection(&this);
16785 void toggle_add_mode()() {
16786 gtk_list_toggle_add_mode(&this);
16788 void toggle_focus_row()() {
16789 gtk_list_toggle_focus_row(&this);
16791 void toggle_row()(Widget* item) {
16792 gtk_list_toggle_row(&this, item);
16794 void undo_selection()() {
16795 gtk_list_undo_selection(&this);
16797 void unselect_all()() {
16798 gtk_list_unselect_all(&this);
16800 void unselect_child()(Widget* child) {
16801 gtk_list_unselect_child(&this, child);
16803 void unselect_item()(int item) {
16804 gtk_list_unselect_item(&this, item);
16806 extern (C) alias static void function (List* this_, Widget* object, void* user_data=null) signal_select_child;
16808 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16809 return super_.signal_connect!name(cb, data, cf);
16812 ulong signal_connect(string name:"select-child", CB:signal_select_child)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16813 return signal_connect_data!()(&this, cast(char*)"select-child",
16814 cast(GObject2.Callback)cb, data, null, cf);
16816 extern (C) alias static void function (List* this_, void* user_data=null) signal_selection_changed;
16817 ulong signal_connect(string name:"selection-changed", CB:signal_selection_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16818 return signal_connect_data!()(&this, cast(char*)"selection-changed",
16819 cast(GObject2.Callback)cb, data, null, cf);
16821 extern (C) alias static void function (List* this_, Widget* object, void* user_data=null) signal_unselect_child;
16822 ulong signal_connect(string name:"unselect-child", CB:signal_unselect_child)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16823 return signal_connect_data!()(&this, cast(char*)"unselect-child",
16824 cast(GObject2.Callback)cb, data, null, cf);
16828 struct ListClass {
16829 ContainerClass parent_class;
16830 extern (C) void function (List* list) selection_changed;
16831 extern (C) void function (List* list, Widget* child) select_child;
16832 extern (C) void function (List* list, Widget* child) unselect_child;
16835 struct ListItem /* : Item */ {
16836 mixin Atk.ImplementorIface.__interface__;
16837 mixin Buildable.__interface__;
16838 alias item this;
16839 alias item super_;
16840 Item item;
16842 static ListItem* new_()() {
16843 return gtk_list_item_new();
16845 static ListItem* new_with_label()(char* label) {
16846 return gtk_list_item_new_with_label(label);
16848 void deselect()() {
16849 gtk_list_item_deselect(&this);
16851 void select()() {
16852 gtk_list_item_select(&this);
16854 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_end_selection;
16856 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16857 return super_.signal_connect!name(cb, data, cf);
16860 ulong signal_connect(string name:"end-selection", CB:signal_end_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16861 return signal_connect_data!()(&this, cast(char*)"end-selection",
16862 cast(GObject2.Callback)cb, data, null, cf);
16864 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, c_int p1, void* user_data=null) signal_extend_selection;
16865 ulong signal_connect(string name:"extend-selection", CB:signal_extend_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16866 return signal_connect_data!()(&this, cast(char*)"extend-selection",
16867 cast(GObject2.Callback)cb, data, null, cf);
16869 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_horizontal;
16870 ulong signal_connect(string name:"scroll-horizontal", CB:signal_scroll_horizontal)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16871 return signal_connect_data!()(&this, cast(char*)"scroll-horizontal",
16872 cast(GObject2.Callback)cb, data, null, cf);
16874 extern (C) alias static void function (ListItem* this_, ScrollType* object, float p0, void* user_data=null) signal_scroll_vertical;
16875 ulong signal_connect(string name:"scroll-vertical", CB:signal_scroll_vertical)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16876 return signal_connect_data!()(&this, cast(char*)"scroll-vertical",
16877 cast(GObject2.Callback)cb, data, null, cf);
16879 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_select_all;
16880 ulong signal_connect(string name:"select-all", CB:signal_select_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16881 return signal_connect_data!()(&this, cast(char*)"select-all",
16882 cast(GObject2.Callback)cb, data, null, cf);
16884 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_start_selection;
16885 ulong signal_connect(string name:"start-selection", CB:signal_start_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16886 return signal_connect_data!()(&this, cast(char*)"start-selection",
16887 cast(GObject2.Callback)cb, data, null, cf);
16889 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_toggle_add_mode;
16890 ulong signal_connect(string name:"toggle-add-mode", CB:signal_toggle_add_mode)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16891 return signal_connect_data!()(&this, cast(char*)"toggle-add-mode",
16892 cast(GObject2.Callback)cb, data, null, cf);
16894 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_toggle_focus_row;
16895 ulong signal_connect(string name:"toggle-focus-row", CB:signal_toggle_focus_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16896 return signal_connect_data!()(&this, cast(char*)"toggle-focus-row",
16897 cast(GObject2.Callback)cb, data, null, cf);
16899 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_undo_selection;
16900 ulong signal_connect(string name:"undo-selection", CB:signal_undo_selection)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16901 return signal_connect_data!()(&this, cast(char*)"undo-selection",
16902 cast(GObject2.Callback)cb, data, null, cf);
16904 extern (C) alias static void function (ListItem* this_, void* user_data=null) signal_unselect_all;
16905 ulong signal_connect(string name:"unselect-all", CB:signal_unselect_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
16906 return signal_connect_data!()(&this, cast(char*)"unselect-all",
16907 cast(GObject2.Callback)cb, data, null, cf);
16911 struct ListItemClass {
16912 ItemClass parent_class;
16913 extern (C) void function (ListItem* list_item) toggle_focus_row;
16914 extern (C) void function (ListItem* list_item) select_all;
16915 extern (C) void function (ListItem* list_item) unselect_all;
16916 extern (C) void function (ListItem* list_item) undo_selection;
16917 extern (C) void function (ListItem* list_item) start_selection;
16918 extern (C) void function (ListItem* list_item) end_selection;
16919 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position, int auto_start_selection) extend_selection;
16920 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position) scroll_horizontal;
16921 extern (C) void function (ListItem* list_item, ScrollType scroll_type, float position) scroll_vertical;
16922 extern (C) void function (ListItem* list_item) toggle_add_mode;
16925 struct ListStore /* : GObject.Object */ {
16926 mixin Buildable.__interface__;
16927 mixin TreeDragDest.__interface__;
16928 mixin TreeDragSource.__interface__;
16929 mixin TreeModel.__interface__;
16930 mixin TreeSortable.__interface__;
16931 alias parent this;
16932 alias parent super_;
16933 alias parent object;
16934 GObject2.Object parent;
16935 private int stamp;
16936 private void* seq, _gtk_reserved1;
16937 private GLib2.List* sort_list;
16938 private int n_columns, sort_column_id;
16939 private SortType order;
16940 private Type* column_headers;
16941 private int length;
16942 private TreeIterCompareFunc default_sort_func;
16943 private void* default_sort_data;
16944 private GLib2.DestroyNotify default_sort_destroy;
16945 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
16946 uint, "columns_dirty", 1,
16947 uint, "__dummy32A", 31));
16950 // Unintrospectable constructor: new() / gtk_list_store_new()
16951 // Creates a new list store as with @n_columns columns each of the types passed
16952 // in. Note that only types derived from standard GObject fundamental types
16953 // are supported.
16954 // As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
16955 // GDK_TYPE_PIXBUF);</literal> will create a new #GtkListStore with three columns, of type
16956 // int, string and #GdkPixbuf respectively.
16957 // RETURNS: a new #GtkListStore
16958 // <n_columns>: number of columns in the list store
16959 alias gtk_list_store_new new_; // Variadic
16961 // Non-vararg creation function. Used primarily by language bindings.
16962 // RETURNS: a new #GtkListStore
16963 // <n_columns>: number of columns in the list store
16964 // <types>: an array of #GType types for the columns, from first to last
16965 static ListStore* newv()(int n_columns, Type* types) {
16966 return gtk_list_store_newv(n_columns, types);
16969 // Appends a new row to @list_store. @iter will be changed to point to this new
16970 // row. The row will be empty after this function is called. To fill in
16971 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
16972 // <iter>: An unset #GtkTreeIter to set to the appended row
16973 void append()(/*out*/ TreeIter* iter) {
16974 gtk_list_store_append(&this, iter);
16976 // Removes all rows from the list store.
16977 void clear()() {
16978 gtk_list_store_clear(&this);
16981 // Creates a new row at @position. @iter will be changed to point to this new
16982 // row. If @position is larger than the number of rows on the list, then the
16983 // new row will be appended to the list. The row will be empty after this
16984 // function is called. To fill in values, you need to call
16985 // gtk_list_store_set() or gtk_list_store_set_value().
16986 // <iter>: An unset #GtkTreeIter to set to the new row
16987 // <position>: position to insert the new row
16988 void insert()(/*out*/ TreeIter* iter, int position) {
16989 gtk_list_store_insert(&this, iter, position);
16992 // Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
16993 // prepended to the beginning of the list. @iter will be changed to point to
16994 // this new row. The row will be empty after this function is called. To fill
16995 // in values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
16996 // <iter>: An unset #GtkTreeIter to set to the new row
16997 // <sibling>: A valid #GtkTreeIter, or %NULL
16998 void insert_after()(/*out*/ TreeIter* iter, TreeIter* sibling=null) {
16999 gtk_list_store_insert_after(&this, iter, sibling);
17002 // Inserts a new row before @sibling. If @sibling is %NULL, then the row will
17003 // be appended to the end of the list. @iter will be changed to point to this
17004 // new row. The row will be empty after this function is called. To fill in
17005 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
17006 // <iter>: An unset #GtkTreeIter to set to the new row
17007 // <sibling>: A valid #GtkTreeIter, or %NULL
17008 void insert_before()(/*out*/ TreeIter* iter, TreeIter* sibling=null) {
17009 gtk_list_store_insert_before(&this, iter, sibling);
17012 // Unintrospectable method: insert_with_values() / gtk_list_store_insert_with_values()
17013 // VERSION: 2.6
17014 // Creates a new row at @position. @iter will be changed to point to this new
17015 // row. If @position is larger than the number of rows on the list, then the
17016 // new row will be appended to the list. The row will be filled with the
17017 // values given to this function.
17018 // Calling
17019 // <literal>gtk_list_store_insert_with_values(list_store, iter, position...)</literal>
17020 // has the same effect as calling
17021 // |[
17022 // gtk_list_store_insert (list_store, iter, position);
17023 // gtk_list_store_set (list_store, iter, ...);
17024 // ]|
17025 // with the difference that the former will only emit a row_inserted signal,
17026 // while the latter will emit row_inserted, row_changed and, if the list store
17027 // is sorted, rows_reordered. Since emitting the rows_reordered signal
17028 // repeatedly can affect the performance of the program,
17029 // gtk_list_store_insert_with_values() should generally be preferred when
17030 // inserting rows in a sorted list store.
17031 // <iter>: An unset #GtkTreeIter to set to the new row, or %NULL.
17032 // <position>: position to insert the new row
17033 /+ Not available -- variadic methods unsupported - use the C function directly.
17034 alias gtk_list_store_insert_with_values insert_with_values; // Variadic
17037 // VERSION: 2.6
17038 // A variant of gtk_list_store_insert_with_values() which
17039 // takes the columns and values as two arrays, instead of
17040 // varargs. This function is mainly intended for
17041 // language-bindings.
17042 // <iter>: An unset #GtkTreeIter to set to the new row, or %NULL.
17043 // <position>: position to insert the new row
17044 // <columns>: an array of column numbers
17045 // <values>: an array of GValues
17046 // <n_values>: the length of the @columns and @values arrays
17047 void insert_with_valuesv()(/*out*/ TreeIter* iter, int position, int* columns, GObject2.Value* values, int n_values) {
17048 gtk_list_store_insert_with_valuesv(&this, iter, position, columns, values, n_values);
17051 // VERSION: 2.2
17052 // <warning>This function is slow. Only use it for debugging and/or testing
17053 // purposes.</warning>
17054 // Checks if the given iter is a valid iter for this #GtkListStore.
17055 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
17056 // <iter>: A #GtkTreeIter.
17057 int iter_is_valid()(TreeIter* iter) {
17058 return gtk_list_store_iter_is_valid(&this, iter);
17061 // VERSION: 2.2
17062 // Moves @iter in @store to the position after @position. Note that this
17063 // function only works with unsorted stores. If @position is %NULL, @iter
17064 // will be moved to the start of the list.
17065 // <iter>: A #GtkTreeIter.
17066 // <position>: A #GtkTreeIter or %NULL.
17067 void move_after()(TreeIter* iter, TreeIter* position=null) {
17068 gtk_list_store_move_after(&this, iter, position);
17071 // VERSION: 2.2
17072 // Moves @iter in @store to the position before @position. Note that this
17073 // function only works with unsorted stores. If @position is %NULL, @iter
17074 // will be moved to the end of the list.
17075 // <iter>: A #GtkTreeIter.
17076 // <position>: A #GtkTreeIter, or %NULL.
17077 void move_before()(TreeIter* iter, TreeIter* position=null) {
17078 gtk_list_store_move_before(&this, iter, position);
17081 // Prepends a new row to @list_store. @iter will be changed to point to this new
17082 // row. The row will be empty after this function is called. To fill in
17083 // values, you need to call gtk_list_store_set() or gtk_list_store_set_value().
17084 // <iter>: An unset #GtkTreeIter to set to the prepend row
17085 void prepend()(/*out*/ TreeIter* iter) {
17086 gtk_list_store_prepend(&this, iter);
17089 // Removes the given row from the list store. After being removed,
17090 // to the last row in @list_store.
17091 // RETURNS: %TRUE if @iter is valid, %FALSE if not.
17092 // <iter>: A valid #GtkTreeIter
17093 int remove()(TreeIter* iter) {
17094 return gtk_list_store_remove(&this, iter);
17097 // VERSION: 2.2
17098 // Reorders @store to follow the order indicated by @new_order. Note that
17099 // this function only works with unsorted stores.
17100 // <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>.
17101 void reorder()(int* new_order) {
17102 gtk_list_store_reorder(&this, new_order);
17105 // Unintrospectable method: set() / gtk_list_store_set()
17106 // Sets the value of one or more cells in the row referenced by @iter.
17107 // The variable argument list should contain integer column numbers,
17108 // each column number followed by the value to be set.
17109 // The list is terminated by a -1. For example, to set column 0 with type
17110 // %G_TYPE_STRING to "Foo", you would write <literal>gtk_list_store_set (store, iter,
17111 // 0, "Foo", -1)</literal>.
17112 // The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
17113 // will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
17114 // <iter>: row iterator
17115 /+ Not available -- variadic methods unsupported - use the C function directly.
17116 alias gtk_list_store_set set; // Variadic
17119 // This function is meant primarily for #GObjects that inherit from #GtkListStore,
17120 // and should only be used when constructing a new #GtkListStore. It will not
17121 // function after a row has been added, or a method on the #GtkTreeModel
17122 // interface is called.
17123 // <n_columns>: Number of columns for the list store
17124 // <types>: An array length n of #GTypes
17125 void set_column_types()(int n_columns, Type* types) {
17126 gtk_list_store_set_column_types(&this, n_columns, types);
17129 // Unintrospectable method: set_valist() / gtk_list_store_set_valist()
17130 // See gtk_list_store_set(); this version takes a va_list for use by language
17131 // bindings.
17132 // <iter>: A valid #GtkTreeIter for the row being modified
17133 // <var_args>: va_list of column/value pairs
17134 void set_valist()(TreeIter* iter, va_list var_args) {
17135 gtk_list_store_set_valist(&this, iter, var_args);
17138 // Sets the data in the cell specified by @iter and @column.
17139 // The type of @value must be convertible to the type of the
17140 // column.
17141 // <iter>: A valid #GtkTreeIter for the row being modified
17142 // <column>: column number to modify
17143 // <value>: new value for the cell
17144 void set_value()(TreeIter* iter, int column, GObject2.Value* value) {
17145 gtk_list_store_set_value(&this, iter, column, value);
17148 // VERSION: 2.12
17149 // A variant of gtk_list_store_set_valist() which
17150 // takes the columns and values as two arrays, instead of
17151 // varargs. This function is mainly intended for
17152 // language-bindings and in case the number of columns to
17153 // change is not known until run-time.
17154 // <iter>: A valid #GtkTreeIter for the row being modified
17155 // <columns>: an array of column numbers
17156 // <values>: an array of GValues
17157 // <n_values>: the length of the @columns and @values arrays
17158 void set_valuesv()(TreeIter* iter, int* columns, GObject2.Value* values, int n_values) {
17159 gtk_list_store_set_valuesv(&this, iter, columns, values, n_values);
17162 // VERSION: 2.2
17163 // Swaps @a and @b in @store. Note that this function only works with
17164 // unsorted stores.
17165 // <a>: A #GtkTreeIter.
17166 // <b>: Another #GtkTreeIter.
17167 void swap()(TreeIter* a, TreeIter* b) {
17168 gtk_list_store_swap(&this, a, b);
17172 struct ListStoreClass {
17173 GObject2.ObjectClass parent_class;
17174 extern (C) void function () _gtk_reserved1;
17175 extern (C) void function () _gtk_reserved2;
17176 extern (C) void function () _gtk_reserved3;
17177 extern (C) void function () _gtk_reserved4;
17180 enum int MAJOR_VERSION = 2;
17181 enum int MAX_COMPOSE_LEN = 7;
17182 enum int MICRO_VERSION = 8;
17183 enum int MINOR_VERSION = 24;
17184 enum MatchType {
17185 ALL = 0,
17186 ALL_TAIL = 1,
17187 HEAD = 2,
17188 TAIL = 3,
17189 EXACT = 4,
17190 LAST = 5
17192 struct Menu /* : MenuShell */ {
17193 mixin Atk.ImplementorIface.__interface__;
17194 mixin Buildable.__interface__;
17195 alias menu_shell this;
17196 alias menu_shell super_;
17197 alias menu_shell menushell;
17198 MenuShell menu_shell;
17199 Widget* parent_menu_item, old_active_menu_item;
17200 AccelGroup* accel_group;
17201 char* accel_path;
17202 MenuPositionFunc position_func;
17203 void* position_func_data;
17204 uint toggle_size;
17205 Widget* toplevel, tearoff_window, tearoff_hbox, tearoff_scrollbar;
17206 Adjustment* tearoff_adjustment;
17207 Gdk2.Window* view_window, bin_window;
17208 int scroll_offset, saved_scroll_offset, scroll_step;
17209 uint timeout_id;
17210 Gdk2.Region* navigation_region;
17211 uint navigation_timeout;
17212 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
17213 uint, "needs_destruction_ref_count", 1,
17214 uint, "torn_off", 1,
17215 uint, "tearoff_active", 1,
17216 uint, "scroll_fast", 1,
17217 uint, "upper_arrow_visible", 1,
17218 uint, "lower_arrow_visible", 1,
17219 uint, "upper_arrow_prelight", 1,
17220 uint, "lower_arrow_prelight", 1,
17221 uint, "__dummy32A", 24));
17223 static Menu* new_()() {
17224 return gtk_menu_new();
17227 // VERSION: 2.6
17228 // Returns a list of the menus which are attached to this widget.
17229 // This list is owned by GTK+ and must not be modified.
17230 // RETURNS: the list of menus attached to his widget.
17231 // <widget>: a #GtkWidget
17232 static GLib2.List* get_for_attach_widget()(Widget* widget) {
17233 return gtk_menu_get_for_attach_widget(widget);
17236 // VERSION: 2.4
17237 // Adds a new #GtkMenuItem to a (table) menu. The number of 'cells' that
17238 // an item will occupy is specified by @left_attach, @right_attach,
17239 // rightmost, uppermost and lower column and row numbers of the table.
17240 // (Columns and rows are indexed from zero).
17241 // Note that this function is not related to gtk_menu_detach().
17242 // <child>: a #GtkMenuItem.
17243 // <left_attach>: The column number to attach the left side of the item to.
17244 // <right_attach>: The column number to attach the right side of the item to.
17245 // <top_attach>: The row number to attach the top of the item to.
17246 // <bottom_attach>: The row number to attach the bottom of the item to.
17247 void attach()(Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) {
17248 gtk_menu_attach(&this, child, left_attach, right_attach, top_attach, bottom_attach);
17250 // Unintrospectable method: attach_to_widget() / gtk_menu_attach_to_widget()
17251 void attach_to_widget()(Widget* attach_widget, MenuDetachFunc detacher) {
17252 gtk_menu_attach_to_widget(&this, attach_widget, detacher);
17254 void detach()() {
17255 gtk_menu_detach(&this);
17258 // Gets the #GtkAccelGroup which holds global accelerators for the
17259 // menu. See gtk_menu_set_accel_group().
17260 // RETURNS: the #GtkAccelGroup associated with the menu.
17261 AccelGroup* get_accel_group()() {
17262 return gtk_menu_get_accel_group(&this);
17265 // VERSION: 2.14
17266 // Retrieves the accelerator path set on the menu.
17267 // RETURNS: the accelerator path set on the menu.
17268 char* get_accel_path()() {
17269 return gtk_menu_get_accel_path(&this);
17272 // Returns the selected menu item from the menu. This is used by the
17273 // #GtkOptionMenu.
17274 // in the menu. If a selection has not yet been made, the
17275 // first menu item is selected.
17276 // RETURNS: the #GtkMenuItem that was last selected
17277 Widget* get_active()() {
17278 return gtk_menu_get_active(&this);
17281 // Returns the #GtkWidget that the menu is attached to.
17282 // RETURNS: the #GtkWidget that the menu is attached to
17283 Widget* get_attach_widget()() {
17284 return gtk_menu_get_attach_widget(&this);
17287 // VERSION: 2.14
17288 // Retrieves the number of the monitor on which to show the menu.
17289 // be popped up or -1, if no monitor has been set
17290 // RETURNS: the number of the monitor on which the menu should
17291 int get_monitor()() {
17292 return gtk_menu_get_monitor(&this);
17295 // VERSION: 2.18
17296 // Returns whether the menu reserves space for toggles and
17297 // icons, regardless of their actual presence.
17298 // RETURNS: Whether the menu reserves toggle space
17299 int get_reserve_toggle_size()() {
17300 return gtk_menu_get_reserve_toggle_size(&this);
17303 // Returns whether the menu is torn off. See
17304 // gtk_menu_set_tearoff_state ().
17305 // RETURNS: %TRUE if the menu is currently torn off.
17306 int get_tearoff_state()() {
17307 return gtk_menu_get_tearoff_state(&this);
17310 // Returns the title of the menu. See gtk_menu_set_title().
17311 // title set on it. This string is owned by the widget and should
17312 // not be modified or freed.
17313 // RETURNS: the title of the menu, or %NULL if the menu has no
17314 char* get_title()() {
17315 return gtk_menu_get_title(&this);
17317 void popdown()() {
17318 gtk_menu_popdown(&this);
17321 // Unintrospectable method: popup() / gtk_menu_popup()
17322 // Displays a menu and makes it available for selection. Applications can use
17323 // this function to display context-sensitive menus, and will typically supply
17324 // %NULL for the @parent_menu_shell, @parent_menu_item, @func and @data
17325 // parameters. The default menu positioning function will position the menu
17326 // at the current mouse cursor position.
17327 // The @button parameter should be the mouse button pressed to initiate
17328 // the menu popup. If the menu popup was initiated by something other than
17329 // a mouse button press, such as a mouse button release or a keypress,
17330 // The @activate_time parameter is used to conflict-resolve initiation of
17331 // concurrent requests for mouse/keyboard grab requests. To function
17332 // properly, this needs to be the time stamp of the user event (such as
17333 // a mouse click or key press) that caused the initiation of the popup.
17334 // Only if no such event is available, gtk_get_current_event_time() can
17335 // be used instead.
17336 // <parent_menu_shell>: the menu shell containing the triggering menu item, or %NULL
17337 // <parent_menu_item>: the menu item whose activation triggered the popup, or %NULL
17338 // <func>: a user supplied function used to position the menu, or %NULL
17339 // <data>: user supplied data to be passed to @func.
17340 // <button>: the mouse button which was pressed to initiate the event.
17341 // <activate_time>: the time at which the activation event occurred.
17342 void popup()(Widget* parent_menu_shell, Widget* parent_menu_item, MenuPositionFunc func, void* data, uint button, uint activate_time) {
17343 gtk_menu_popup(&this, parent_menu_shell, parent_menu_item, func, data, button, activate_time);
17345 void reorder_child()(Widget* child, int position) {
17346 gtk_menu_reorder_child(&this, child, position);
17348 void reposition()() {
17349 gtk_menu_reposition(&this);
17351 void set_accel_group()(AccelGroup* accel_group=null) {
17352 gtk_menu_set_accel_group(&this, accel_group);
17355 // Sets an accelerator path for this menu from which accelerator paths
17356 // for its immediate children, its menu items, can be constructed.
17357 // The main purpose of this function is to spare the programmer the
17358 // inconvenience of having to call gtk_menu_item_set_accel_path() on
17359 // each menu item that should support runtime user changable accelerators.
17360 // Instead, by just calling gtk_menu_set_accel_path() on their parent,
17361 // each menu item of this menu, that contains a label describing its purpose,
17362 // automatically gets an accel path assigned. For example, a menu containing
17363 // menu items "New" and "Exit", will, after
17364 // <literal>gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</literal>
17365 // has been called, assign its items the accel paths:
17366 // <literal>"&lt;Gnumeric-Sheet&gt;/File/New"</literal> and <literal>"&lt;Gnumeric-Sheet&gt;/File/Exit"</literal>.
17367 // Assigning accel paths to menu items then enables the user to change
17368 // their accelerators at runtime. More details about accelerator paths
17369 // and their default setups can be found at gtk_accel_map_add_entry().
17370 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
17371 // pass a static string, you can save some memory by interning it first with
17372 // g_intern_static_string().
17373 // <accel_path>: a valid accelerator path
17374 void set_accel_path()(char* accel_path=null) {
17375 gtk_menu_set_accel_path(&this, accel_path);
17377 void set_active()(uint index_) {
17378 gtk_menu_set_active(&this, index_);
17381 // VERSION: 2.4
17382 // Informs GTK+ on which monitor a menu should be popped up.
17383 // See gdk_screen_get_monitor_geometry().
17384 // This function should be called from a #GtkMenuPositionFunc if the
17385 // menu should not appear on the same monitor as the pointer. This
17386 // information can't be reliably inferred from the coordinates returned
17387 // by a #GtkMenuPositionFunc, since, for very long menus, these coordinates
17388 // may extend beyond the monitor boundaries or even the screen boundaries.
17389 // <monitor_num>: the number of the monitor on which the menu should be popped up
17390 void set_monitor()(int monitor_num) {
17391 gtk_menu_set_monitor(&this, monitor_num);
17394 // VERSION: 2.18
17395 // Sets whether the menu should reserve space for drawing toggles
17396 // or icons, regardless of their actual presence.
17397 // <reserve_toggle_size>: whether to reserve size for toggles
17398 void set_reserve_toggle_size()(int reserve_toggle_size) {
17399 gtk_menu_set_reserve_toggle_size(&this, reserve_toggle_size);
17402 // VERSION: 2.2
17403 // Sets the #GdkScreen on which the menu will be displayed.
17404 // <screen>: a #GdkScreen, or %NULL if the screen should be determined by the widget the menu is attached to.
17405 void set_screen()(Gdk2.Screen* screen=null) {
17406 gtk_menu_set_screen(&this, screen);
17408 void set_tearoff_state()(int torn_off) {
17409 gtk_menu_set_tearoff_state(&this, torn_off);
17412 // Sets the title string for the menu. The title is displayed when the menu
17413 // is shown as a tearoff menu. If @title is %NULL, the menu will see if it is
17414 // attached to a parent menu item, and if so it will try to use the same text as
17415 // that menu item's label.
17416 // <title>: a string containing the title for the menu.
17417 void set_title()(char* title) {
17418 gtk_menu_set_title(&this, title);
17420 extern (C) alias static void function (Menu* this_, ScrollType* object, void* user_data=null) signal_move_scroll;
17422 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17423 return super_.signal_connect!name(cb, data, cf);
17426 ulong signal_connect(string name:"move-scroll", CB:signal_move_scroll)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17427 return signal_connect_data!()(&this, cast(char*)"move-scroll",
17428 cast(GObject2.Callback)cb, data, null, cf);
17432 struct MenuBar /* : MenuShell */ {
17433 mixin Atk.ImplementorIface.__interface__;
17434 mixin Buildable.__interface__;
17435 alias menu_shell this;
17436 alias menu_shell super_;
17437 alias menu_shell menushell;
17438 MenuShell menu_shell;
17440 static MenuBar* new_()() {
17441 return gtk_menu_bar_new();
17444 // VERSION: 2.8
17445 // Retrieves the current child pack direction of the menubar.
17446 // See gtk_menu_bar_set_child_pack_direction().
17447 // RETURNS: the child pack direction
17448 PackDirection get_child_pack_direction()() {
17449 return gtk_menu_bar_get_child_pack_direction(&this);
17452 // VERSION: 2.8
17453 // Retrieves the current pack direction of the menubar.
17454 // See gtk_menu_bar_set_pack_direction().
17455 // RETURNS: the pack direction
17456 PackDirection get_pack_direction()() {
17457 return gtk_menu_bar_get_pack_direction(&this);
17460 // VERSION: 2.8
17461 // Sets how widgets should be packed inside the children of a menubar.
17462 // <child_pack_dir>: a new #GtkPackDirection
17463 void set_child_pack_direction()(PackDirection child_pack_dir) {
17464 gtk_menu_bar_set_child_pack_direction(&this, child_pack_dir);
17467 // VERSION: 2.8
17468 // Sets how items should be packed inside a menubar.
17469 // <pack_dir>: a new #GtkPackDirection
17470 void set_pack_direction()(PackDirection pack_dir) {
17471 gtk_menu_bar_set_pack_direction(&this, pack_dir);
17475 struct MenuBarClass {
17476 MenuShellClass parent_class;
17477 extern (C) void function () _gtk_reserved1;
17478 extern (C) void function () _gtk_reserved2;
17479 extern (C) void function () _gtk_reserved3;
17480 extern (C) void function () _gtk_reserved4;
17483 extern (C) alias void function (Widget* widget, void* user_data) MenuCallback;
17485 struct MenuClass {
17486 MenuShellClass parent_class;
17487 extern (C) void function () _gtk_reserved1;
17488 extern (C) void function () _gtk_reserved2;
17489 extern (C) void function () _gtk_reserved3;
17490 extern (C) void function () _gtk_reserved4;
17493 extern (C) alias void function (Widget* attach_widget, Menu* menu) MenuDetachFunc;
17495 enum MenuDirectionType {
17496 PARENT = 0,
17497 CHILD = 1,
17498 NEXT = 2,
17499 PREV = 3
17501 struct MenuEntry {
17502 char* path, accelerator;
17503 MenuCallback callback;
17504 void* callback_data;
17505 Widget* widget;
17508 struct MenuItem /* : Item */ {
17509 mixin Atk.ImplementorIface.__interface__;
17510 mixin Activatable.__interface__;
17511 mixin Buildable.__interface__;
17512 alias item this;
17513 alias item super_;
17514 Item item;
17515 Widget* submenu;
17516 Gdk2.Window* event_window;
17517 ushort toggle_size, accelerator_width;
17518 char* accel_path;
17519 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
17520 uint, "show_submenu_indicator", 1,
17521 uint, "submenu_placement", 1,
17522 uint, "submenu_direction", 1,
17523 uint, "right_justify", 1,
17524 uint, "timer_from_keypress", 1,
17525 uint, "from_menubar", 1,
17526 uint, "__dummy32A", 26));
17527 uint timer;
17529 static MenuItem* new_()() {
17530 return gtk_menu_item_new();
17532 static MenuItem* new_with_label()(char* label) {
17533 return gtk_menu_item_new_with_label(label);
17536 // Creates a new #GtkMenuItem containing a label. The label
17537 // will be created using gtk_label_new_with_mnemonic(), so underscores
17538 // in @label indicate the mnemonic for the menu item.
17539 // RETURNS: a new #GtkMenuItem
17540 // <label>: The text of the button, with an underscore in front of the mnemonic character
17541 static MenuItem* new_with_mnemonic()(char* label) {
17542 return gtk_menu_item_new_with_mnemonic(label);
17544 void activate()() {
17545 gtk_menu_item_activate(&this);
17547 void deselect()() {
17548 gtk_menu_item_deselect(&this);
17551 // VERSION: 2.14
17552 // Retrieve the accelerator path that was previously set on @menu_item.
17553 // See gtk_menu_item_set_accel_path() for details.
17554 // functionality, or %NULL if not set
17555 // RETURNS: the accelerator path corresponding to this menu item's
17556 char* get_accel_path()() {
17557 return gtk_menu_item_get_accel_path(&this);
17560 // VERSION: 2.16
17561 // Sets @text on the @menu_item label
17562 // string used by the label, and must not be modified.
17563 // RETURNS: The text in the @menu_item label. This is the internal
17564 char* get_label()() {
17565 return gtk_menu_item_get_label(&this);
17568 // Gets whether the menu item appears justified at the right
17569 // side of the menu bar.
17570 // far right if added to a menu bar.
17571 // RETURNS: %TRUE if the menu item will appear at the
17572 int get_right_justified()() {
17573 return gtk_menu_item_get_right_justified(&this);
17576 // Gets the submenu underneath this menu item, if any.
17577 // See gtk_menu_item_set_submenu().
17578 // RETURNS: submenu for this menu item, or %NULL if none.
17579 Widget* get_submenu()() {
17580 return gtk_menu_item_get_submenu(&this);
17583 // VERSION: 2.16
17584 // Checks if an underline in the text indicates the next character should be
17585 // used for the mnemonic accelerator key.
17586 // the mnemonic accelerator key.
17587 // RETURNS: %TRUE if an embedded underline in the label indicates
17588 int get_use_underline()() {
17589 return gtk_menu_item_get_use_underline(&this);
17592 // DEPRECATED (v2.12) method: remove_submenu - gtk_menu_item_remove_submenu() is deprecated and
17593 // Removes the widget's submenu.
17594 // should not be used in newly written code. Use
17595 // gtk_menu_item_set_submenu() instead.
17596 void remove_submenu()() {
17597 gtk_menu_item_remove_submenu(&this);
17599 void select()() {
17600 gtk_menu_item_select(&this);
17603 // Set the accelerator path on @menu_item, through which runtime changes of the
17604 // menu item's accelerator caused by the user can be identified and saved to
17605 // persistant storage (see gtk_accel_map_save() on this).
17606 // To setup a default accelerator for this menu item, call
17607 // gtk_accel_map_add_entry() with the same @accel_path.
17608 // See also gtk_accel_map_add_entry() on the specifics of accelerator paths,
17609 // and gtk_menu_set_accel_path() for a more convenient variant of this function.
17610 // This function is basically a convenience wrapper that handles calling
17611 // gtk_widget_set_accel_path() with the appropriate accelerator group for
17612 // the menu item.
17613 // Note that you do need to set an accelerator on the parent menu with
17614 // gtk_menu_set_accel_group() for this to work.
17615 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
17616 // pass a static string, you can save some memory by interning it first with
17617 // g_intern_static_string().
17618 // <accel_path>: accelerator path, corresponding to this menu item's functionality, or %NULL to unset the current path.
17619 void set_accel_path()(char* accel_path=null) {
17620 gtk_menu_item_set_accel_path(&this, accel_path);
17623 // VERSION: 2.16
17624 // Sets @text on the @menu_item label
17625 // <label>: the text you want to set
17626 void set_label()(char* label) {
17627 gtk_menu_item_set_label(&this, label);
17630 // Sets whether the menu item appears justified at the right
17631 // side of a menu bar. This was traditionally done for "Help" menu
17632 // items, but is now considered a bad idea. (If the widget
17633 // layout is reversed for a right-to-left language like Hebrew
17634 // or Arabic, right-justified-menu-items appear at the left.)
17635 // <right_justified>: if %TRUE the menu item will appear at the far right if added to a menu bar.
17636 void set_right_justified()(int right_justified) {
17637 gtk_menu_item_set_right_justified(&this, right_justified);
17640 // Sets or replaces the menu item's submenu, or removes it when a %NULL
17641 // submenu is passed.
17642 // <submenu>: the submenu, or %NULL
17643 void set_submenu()(Widget* submenu=null) {
17644 gtk_menu_item_set_submenu(&this, submenu);
17647 // VERSION: 2.16
17648 // If true, an underline in the text indicates the next character should be
17649 // used for the mnemonic accelerator key.
17650 // <setting>: %TRUE if underlines in the text indicate mnemonics
17651 void set_use_underline()(int setting) {
17652 gtk_menu_item_set_use_underline(&this, setting);
17654 void toggle_size_allocate()(int allocation) {
17655 gtk_menu_item_toggle_size_allocate(&this, allocation);
17657 void toggle_size_request()(int* requisition) {
17658 gtk_menu_item_toggle_size_request(&this, requisition);
17660 extern (C) alias static void function (MenuItem* this_, void* user_data=null) signal_activate;
17662 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17663 return super_.signal_connect!name(cb, data, cf);
17666 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17667 return signal_connect_data!()(&this, cast(char*)"activate",
17668 cast(GObject2.Callback)cb, data, null, cf);
17670 extern (C) alias static void function (MenuItem* this_, void* user_data=null) signal_activate_item;
17671 ulong signal_connect(string name:"activate-item", CB:signal_activate_item)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17672 return signal_connect_data!()(&this, cast(char*)"activate-item",
17673 cast(GObject2.Callback)cb, data, null, cf);
17675 extern (C) alias static void function (MenuItem* this_, int object, void* user_data=null) signal_toggle_size_allocate;
17676 ulong signal_connect(string name:"toggle-size-allocate", CB:signal_toggle_size_allocate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17677 return signal_connect_data!()(&this, cast(char*)"toggle-size-allocate",
17678 cast(GObject2.Callback)cb, data, null, cf);
17680 extern (C) alias static void function (MenuItem* this_, void* object, void* user_data=null) signal_toggle_size_request;
17681 ulong signal_connect(string name:"toggle-size-request", CB:signal_toggle_size_request)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17682 return signal_connect_data!()(&this, cast(char*)"toggle-size-request",
17683 cast(GObject2.Callback)cb, data, null, cf);
17687 struct MenuItemClass {
17688 ItemClass parent_class;
17689 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
17690 uint, "hide_on_activate", 1,
17691 uint, "__dummy32A", 31));
17692 extern (C) void function (MenuItem* menu_item) activate;
17693 extern (C) void function (MenuItem* menu_item) activate_item;
17694 extern (C) void function (MenuItem* menu_item, int* requisition) toggle_size_request;
17695 extern (C) void function (MenuItem* menu_item, int allocation) toggle_size_allocate;
17696 // <label>: the text you want to set
17697 extern (C) void function (MenuItem* menu_item, char* label) set_label;
17698 // RETURNS: The text in the @menu_item label. This is the internal
17699 extern (C) char* function (MenuItem* menu_item) get_label;
17700 extern (C) void function () _gtk_reserved1;
17701 extern (C) void function () _gtk_reserved2;
17704 extern (C) alias void function (Menu* menu, int* x, int* y, int* push_in, void* user_data) MenuPositionFunc;
17706 struct MenuShell /* : Container */ {
17707 mixin Atk.ImplementorIface.__interface__;
17708 mixin Buildable.__interface__;
17709 alias container this;
17710 alias container super_;
17711 Container container;
17712 GLib2.List* children;
17713 Widget* active_menu_item, parent_menu_shell;
17714 uint button;
17715 uint activate_time;
17716 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
17717 uint, "active", 1,
17718 uint, "have_grab", 1,
17719 uint, "have_xgrab", 1,
17720 uint, "ignore_leave", 1,
17721 uint, "menu_flag", 1,
17722 uint, "ignore_enter", 1,
17723 uint, "keyboard_mode", 1,
17724 uint, "__dummy32A", 25));
17726 void activate_item()(Widget* menu_item, int force_deactivate) {
17727 gtk_menu_shell_activate_item(&this, menu_item, force_deactivate);
17729 void append()(Widget* child) {
17730 gtk_menu_shell_append(&this, child);
17733 // VERSION: 2.4
17734 // Cancels the selection within the menu shell.
17735 void cancel()() {
17736 gtk_menu_shell_cancel(&this);
17738 void deactivate()() {
17739 gtk_menu_shell_deactivate(&this);
17741 void deselect()() {
17742 gtk_menu_shell_deselect(&this);
17745 // VERSION: 2.8
17746 // Returns %TRUE if the menu shell will take the keyboard focus on popup.
17747 // RETURNS: %TRUE if the menu shell will take the keyboard focus on popup.
17748 int get_take_focus()() {
17749 return gtk_menu_shell_get_take_focus(&this);
17751 void insert()(Widget* child, int position) {
17752 gtk_menu_shell_insert(&this, child, position);
17754 void prepend()(Widget* child) {
17755 gtk_menu_shell_prepend(&this, child);
17758 // VERSION: 2.2
17759 // Select the first visible or selectable child of the menu shell;
17760 // don't select tearoff items unless the only item is a tearoff
17761 // item.
17762 // <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.
17763 void select_first()(int search_sensitive) {
17764 gtk_menu_shell_select_first(&this, search_sensitive);
17766 void select_item()(Widget* menu_item) {
17767 gtk_menu_shell_select_item(&this, menu_item);
17770 // VERSION: 2.8
17771 // If @take_focus is %TRUE (the default) the menu shell will take the keyboard
17772 // focus so that it will receive all keyboard events which is needed to enable
17773 // keyboard navigation in menus.
17774 // Setting @take_focus to %FALSE is useful only for special applications
17775 // like virtual keyboard implementations which should not take keyboard
17776 // focus.
17777 // The @take_focus state of a menu or menu bar is automatically propagated
17778 // to submenus whenever a submenu is popped up, so you don't have to worry
17779 // about recursively setting it for your entire menu hierarchy. Only when
17780 // programmatically picking a submenu and popping it up manually, the
17781 // Note that setting it to %FALSE has side-effects:
17782 // If the focus is in some other app, it keeps the focus and keynav in
17783 // the menu doesn't work. Consequently, keynav on the menu will only
17784 // work if the focus is on some toplevel owned by the onscreen keyboard.
17785 // To avoid confusing the user, menus with @take_focus set to %FALSE
17786 // should not display mnemonics or accelerators, since it cannot be
17787 // guaranteed that they will work.
17788 // See also gdk_keyboard_grab()
17789 // <take_focus>: %TRUE if the menu shell should take the keyboard focus on popup.
17790 void set_take_focus()(int take_focus) {
17791 gtk_menu_shell_set_take_focus(&this, take_focus);
17793 extern (C) alias static void function (MenuShell* this_, c_int object, void* user_data=null) signal_activate_current;
17795 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17796 return super_.signal_connect!name(cb, data, cf);
17799 ulong signal_connect(string name:"activate-current", CB:signal_activate_current)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17800 return signal_connect_data!()(&this, cast(char*)"activate-current",
17801 cast(GObject2.Callback)cb, data, null, cf);
17803 extern (C) alias static void function (MenuShell* this_, void* user_data=null) signal_cancel;
17804 ulong signal_connect(string name:"cancel", CB:signal_cancel)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17805 return signal_connect_data!()(&this, cast(char*)"cancel",
17806 cast(GObject2.Callback)cb, data, null, cf);
17808 extern (C) alias static void function (MenuShell* this_, DirectionType* object, void* user_data=null) signal_cycle_focus;
17809 ulong signal_connect(string name:"cycle-focus", CB:signal_cycle_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17810 return signal_connect_data!()(&this, cast(char*)"cycle-focus",
17811 cast(GObject2.Callback)cb, data, null, cf);
17813 extern (C) alias static void function (MenuShell* this_, void* user_data=null) signal_deactivate;
17814 ulong signal_connect(string name:"deactivate", CB:signal_deactivate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17815 return signal_connect_data!()(&this, cast(char*)"deactivate",
17816 cast(GObject2.Callback)cb, data, null, cf);
17818 extern (C) alias static void function (MenuShell* this_, MenuDirectionType* object, void* user_data=null) signal_move_current;
17819 ulong signal_connect(string name:"move-current", CB:signal_move_current)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17820 return signal_connect_data!()(&this, cast(char*)"move-current",
17821 cast(GObject2.Callback)cb, data, null, cf);
17824 // VERSION: 2.12
17825 // The ::move-selected signal is emitted to move the selection to
17826 // another item.
17827 // RETURNS: %TRUE to stop the signal emission, %FALSE to continue
17828 // <distance>: +1 to move to the next item, -1 to move to the previous
17829 extern (C) alias static c_int function (MenuShell* this_, int distance, void* user_data=null) signal_move_selected;
17830 ulong signal_connect(string name:"move-selected", CB:signal_move_selected)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17831 return signal_connect_data!()(&this, cast(char*)"move-selected",
17832 cast(GObject2.Callback)cb, data, null, cf);
17834 extern (C) alias static void function (MenuShell* this_, void* user_data=null) signal_selection_done;
17835 ulong signal_connect(string name:"selection-done", CB:signal_selection_done)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17836 return signal_connect_data!()(&this, cast(char*)"selection-done",
17837 cast(GObject2.Callback)cb, data, null, cf);
17841 struct MenuShellClass {
17842 ContainerClass parent_class;
17843 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
17844 uint, "submenu_placement", 1,
17845 uint, "__dummy32A", 31));
17846 extern (C) void function (MenuShell* menu_shell) deactivate;
17847 extern (C) void function (MenuShell* menu_shell) selection_done;
17848 extern (C) void function (MenuShell* menu_shell, MenuDirectionType direction) move_current;
17849 extern (C) void function (MenuShell* menu_shell, int force_hide) activate_current;
17850 extern (C) void function (MenuShell* menu_shell) cancel;
17851 extern (C) void function (MenuShell* menu_shell, Widget* menu_item) select_item;
17852 extern (C) void function (MenuShell* menu_shell, Widget* child, int position) insert;
17853 extern (C) int function (MenuShell* menu_shell) get_popup_delay;
17854 extern (C) int function (MenuShell* menu_shell, int distance) move_selected;
17855 extern (C) void function () _gtk_reserved1;
17856 extern (C) void function () _gtk_reserved2;
17859 struct MenuToolButton /* : ToolButton */ {
17860 mixin Atk.ImplementorIface.__interface__;
17861 mixin Activatable.__interface__;
17862 mixin Buildable.__interface__;
17863 alias parent this;
17864 alias parent super_;
17865 alias parent toolbutton;
17866 ToolButton parent;
17867 private MenuToolButtonPrivate* priv;
17870 // VERSION: 2.6
17871 // Creates a new #GtkMenuToolButton using @icon_widget as icon and
17872 // RETURNS: the new #GtkMenuToolButton
17873 // <icon_widget>: a widget that will be used as icon widget, or %NULL
17874 // <label>: a string that will be used as label, or %NULL
17875 static MenuToolButton* new_()(Widget* icon_widget=null, char* label=null) {
17876 return gtk_menu_tool_button_new(icon_widget, label);
17879 // VERSION: 2.6
17880 // Creates a new #GtkMenuToolButton.
17881 // The new #GtkMenuToolButton will contain an icon and label from
17882 // the stock item indicated by @stock_id.
17883 // RETURNS: the new #GtkMenuToolButton
17884 // <stock_id>: the name of a stock item
17885 static MenuToolButton* new_from_stock()(char* stock_id) {
17886 return gtk_menu_tool_button_new_from_stock(stock_id);
17889 // VERSION: 2.6
17890 // Gets the #GtkMenu associated with #GtkMenuToolButton.
17891 // with #GtkMenuToolButton
17892 // RETURNS: the #GtkMenu associated
17893 Widget* get_menu()() {
17894 return gtk_menu_tool_button_get_menu(&this);
17897 // VERSION: 2.6
17898 // DEPRECATED (v2.12) method: set_arrow_tooltip - Use gtk_menu_tool_button_set_arrow_tooltip_text()
17899 // Sets the #GtkTooltips object to be used for arrow button which
17900 // pops up the menu. See gtk_tool_item_set_tooltip() for setting
17901 // a tooltip on the whole #GtkMenuToolButton.
17902 // instead.
17903 // <tooltips>: the #GtkTooltips object to be used
17904 // <tip_text>: text to be used as tooltip text for tool_item
17905 // <tip_private>: text to be used as private tooltip text
17906 void set_arrow_tooltip()(Tooltips* tooltips, char* tip_text=null, char* tip_private=null) {
17907 gtk_menu_tool_button_set_arrow_tooltip(&this, tooltips, tip_text, tip_private);
17910 // VERSION: 2.12
17911 // Sets the tooltip markup text to be used as tooltip for the arrow button
17912 // which pops up the menu. See gtk_tool_item_set_tooltip() for setting a
17913 // tooltip on the whole #GtkMenuToolButton.
17914 // <markup>: markup text to be used as tooltip text for button's arrow button
17915 void set_arrow_tooltip_markup()(char* markup) {
17916 gtk_menu_tool_button_set_arrow_tooltip_markup(&this, markup);
17919 // VERSION: 2.12
17920 // Sets the tooltip text to be used as tooltip for the arrow button which
17921 // pops up the menu. See gtk_tool_item_set_tooltip() for setting a tooltip
17922 // on the whole #GtkMenuToolButton.
17923 // <text>: text to be used as tooltip text for button's arrow button
17924 void set_arrow_tooltip_text()(char* text) {
17925 gtk_menu_tool_button_set_arrow_tooltip_text(&this, text);
17928 // VERSION: 2.6
17929 // Sets the #GtkMenu that is popped up when the user clicks on the arrow.
17930 // If @menu is NULL, the arrow button becomes insensitive.
17931 // <menu>: the #GtkMenu associated with #GtkMenuToolButton
17932 void set_menu()(Widget* menu) {
17933 gtk_menu_tool_button_set_menu(&this, menu);
17936 // The ::show-menu signal is emitted before the menu is shown.
17937 // It can be used to populate the menu on demand, using
17938 // gtk_menu_tool_button_get_menu().
17939 // Note that even if you populate the menu dynamically in this way,
17940 // you must set an empty menu on the #GtkMenuToolButton beforehand,
17941 // since the arrow is made insensitive if the menu is not set.
17942 extern (C) alias static void function (MenuToolButton* this_, void* user_data=null) signal_show_menu;
17944 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17945 return super_.signal_connect!name(cb, data, cf);
17948 ulong signal_connect(string name:"show-menu", CB:signal_show_menu)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
17949 return signal_connect_data!()(&this, cast(char*)"show-menu",
17950 cast(GObject2.Callback)cb, data, null, cf);
17954 struct MenuToolButtonClass {
17955 ToolButtonClass parent_class;
17956 extern (C) void function (MenuToolButton* button) show_menu;
17957 extern (C) void function () _gtk_reserved1;
17958 extern (C) void function () _gtk_reserved2;
17959 extern (C) void function () _gtk_reserved3;
17960 extern (C) void function () _gtk_reserved4;
17963 struct MenuToolButtonPrivate {
17967 // #GtkMessageDialog presents a dialog with an image representing the type of
17968 // message (Error, Question, etc.) alongside some message text. It's simply a
17969 // convenience widget; you could construct the equivalent of #GtkMessageDialog
17970 // from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
17971 // The easiest way to do a modal message dialog is to use gtk_dialog_run(), though
17972 // you can also pass in the %GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically
17973 // makes the dialog modal and waits for the user to respond to it. gtk_dialog_run()
17974 // returns when any dialog button is clicked.
17975 // <example>
17976 // <title>A modal dialog.</title>
17977 // <programlisting>
17978 // dialog = gtk_message_dialog_new (main_application_window,
17979 // GTK_DIALOG_DESTROY_WITH_PARENT,
17980 // GTK_MESSAGE_ERROR,
17981 // GTK_BUTTONS_CLOSE,
17982 // "Error loading file '&percnt;s': &percnt;s",
17983 // filename, g_strerror (errno));
17984 // gtk_dialog_run (GTK_DIALOG (dialog));
17985 // gtk_widget_destroy (dialog);
17986 // </programlisting>
17987 // </example>
17988 // You might do a non-modal #GtkMessageDialog as follows:
17989 // <example>
17990 // <title>A non-modal dialog.</title>
17991 // <programlisting>
17992 // dialog = gtk_message_dialog_new (main_application_window,
17993 // GTK_DIALOG_DESTROY_WITH_PARENT,
17994 // GTK_MESSAGE_ERROR,
17995 // GTK_BUTTONS_CLOSE,
17996 // "Error loading file '&percnt;s': &percnt;s",
17997 // filename, g_strerror (errno));
17998 // /&ast; Destroy the dialog when the user responds to it (e.g. clicks a button) &ast;/
17999 // g_signal_connect_swapped (dialog, "response",
18000 // G_CALLBACK (gtk_widget_destroy),
18001 // dialog);
18002 // </programlisting>
18003 // </example>
18004 // <refsect2 id="GtkMessageDialog-BUILDER-UI">
18005 // <title>GtkMessageDialog as GtkBuildable</title>
18006 // <para>
18007 // The GtkMessageDialog implementation of the GtkBuildable interface exposes
18008 // the message area as an internal child with the name "message_area".
18009 // </para>
18010 // </refsect2>
18011 struct MessageDialog /* : Dialog */ {
18012 mixin Atk.ImplementorIface.__interface__;
18013 mixin Buildable.__interface__;
18014 alias parent_instance this;
18015 alias parent_instance super_;
18016 alias parent_instance dialog;
18017 Dialog parent_instance;
18018 private Widget* image, label;
18021 // Unintrospectable constructor: new() / gtk_message_dialog_new()
18022 // Creates a new message dialog, which is a simple dialog with an icon
18023 // indicating the dialog type (error, warning, etc.) and some text the
18024 // user may want to see. When the user clicks a button a "response"
18025 // signal is emitted with response IDs from #GtkResponseType. See
18026 // #GtkDialog for more details.
18027 // RETURNS: a new #GtkMessageDialog
18028 // <parent>: transient parent, or %NULL for none
18029 // <flags>: flags
18030 // <type>: type of message
18031 // <buttons>: set of buttons to use
18032 // <message_format>: printf()-style format string, or %NULL
18033 alias gtk_message_dialog_new new_; // Variadic
18035 // Unintrospectable constructor: new_with_markup() / gtk_message_dialog_new_with_markup()
18036 // VERSION: 2.4
18037 // Creates a new message dialog, which is a simple dialog with an icon
18038 // indicating the dialog type (error, warning, etc.) and some text which
18039 // is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
18040 // When the user clicks a button a "response" signal is emitted with
18041 // response IDs from #GtkResponseType. See #GtkDialog for more details.
18042 // Special XML characters in the printf() arguments passed to this
18043 // function will automatically be escaped as necessary.
18044 // (See g_markup_printf_escaped() for how this is implemented.)
18045 // Usually this is what you want, but if you have an existing
18046 // Pango markup string that you want to use literally as the
18047 // label, then you need to use gtk_message_dialog_set_markup()
18048 // instead, since you can't pass the markup string either
18049 // as the format (it might contain '%' characters) or as a string
18050 // argument.
18051 // |[
18052 // GtkWidget *dialog;
18053 // dialog = gtk_message_dialog_new (main_application_window,
18054 // GTK_DIALOG_DESTROY_WITH_PARENT,
18055 // GTK_MESSAGE_ERROR,
18056 // GTK_BUTTONS_CLOSE,
18057 // NULL);
18058 // gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
18059 // markup);
18060 // ]|
18061 // RETURNS: a new #GtkMessageDialog
18062 // <parent>: transient parent, or %NULL for none
18063 // <flags>: flags
18064 // <type>: type of message
18065 // <buttons>: set of buttons to use
18066 // <message_format>: printf()-style format string, or %NULL
18067 alias gtk_message_dialog_new_with_markup new_with_markup; // Variadic
18069 // Unintrospectable method: format_secondary_markup() / gtk_message_dialog_format_secondary_markup()
18070 // VERSION: 2.6
18071 // Sets the secondary text of the message dialog to be @message_format (with
18072 // printf()-style), which is marked up with the
18073 // <link linkend="PangoMarkupFormat">Pango text markup language</link>.
18074 // Note that setting a secondary text makes the primary text become
18075 // bold, unless you have provided explicit markup.
18076 // Due to an oversight, this function does not escape special XML characters
18077 // like gtk_message_dialog_new_with_markup() does. Thus, if the arguments
18078 // may contain special XML characters, you should use g_markup_printf_escaped()
18079 // to escape it.
18080 // <informalexample><programlisting>
18081 // gchar *msg;
18082 // msg = g_markup_printf_escaped (message_format, ...);
18083 // gtk_message_dialog_format_secondary_markup (message_dialog, "&percnt;s", msg);
18084 // g_free (msg);
18085 // </programlisting></informalexample>
18086 // <message_format>: printf()-style markup string (see
18087 /+ Not available -- variadic methods unsupported - use the C function directly.
18088 alias gtk_message_dialog_format_secondary_markup format_secondary_markup; // Variadic
18091 // Unintrospectable method: format_secondary_text() / gtk_message_dialog_format_secondary_text()
18092 // VERSION: 2.6
18093 // Sets the secondary text of the message dialog to be @message_format
18094 // (with printf()-style).
18095 // Note that setting a secondary text makes the primary text become
18096 // bold, unless you have provided explicit markup.
18097 // <message_format>: printf()-style format string, or %NULL
18098 /+ Not available -- variadic methods unsupported - use the C function directly.
18099 alias gtk_message_dialog_format_secondary_text format_secondary_text; // Variadic
18102 // VERSION: 2.14
18103 // Gets the dialog's image.
18104 // RETURNS: the dialog's image
18105 Widget* get_image()() {
18106 return gtk_message_dialog_get_image(&this);
18109 // VERSION: 2.22
18110 // Returns the message area of the dialog. This is the box where the
18111 // dialog's primary and secondary labels are packed. You can add your
18112 // own extra content to that box and it will appear below those labels,
18113 // on the right side of the dialog's image (or on the left for right-to-left
18114 // languages). See gtk_dialog_get_content_area() for the corresponding
18115 // function in the parent #GtkDialog.
18116 // "message area" in the @message_dialog.
18117 // RETURNS: A #GtkVBox corresponding to the
18118 Widget* get_message_area()() {
18119 return gtk_message_dialog_get_message_area(&this);
18122 // VERSION: 2.10
18123 // Sets the dialog's image to @image.
18124 // <image>: the image
18125 void set_image()(Widget* image) {
18126 gtk_message_dialog_set_image(&this, image);
18129 // VERSION: 2.4
18130 // Sets the text of the message dialog to be @str, which is marked
18131 // up with the <link linkend="PangoMarkupFormat">Pango text markup
18132 // language</link>.
18133 // <str>: markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
18134 void set_markup()(char* str) {
18135 gtk_message_dialog_set_markup(&this, str);
18139 struct MessageDialogClass {
18140 DialogClass parent_class;
18141 extern (C) void function () _gtk_reserved1;
18142 extern (C) void function () _gtk_reserved2;
18143 extern (C) void function () _gtk_reserved3;
18144 extern (C) void function () _gtk_reserved4;
18147 // The type of message being displayed in the dialog.
18148 enum MessageType {
18149 INFO = 0,
18150 WARNING = 1,
18151 QUESTION = 2,
18152 ERROR = 3,
18153 OTHER = 4
18155 enum MetricType {
18156 PIXELS = 0,
18157 INCHES = 1,
18158 CENTIMETERS = 2
18160 struct Misc /* : Widget */ {
18161 mixin Atk.ImplementorIface.__interface__;
18162 mixin Buildable.__interface__;
18163 alias widget this;
18164 alias widget super_;
18165 Widget widget;
18166 float xalign, yalign;
18167 ushort xpad, ypad;
18170 // Gets the X and Y alignment of the widget within its allocation.
18171 // See gtk_misc_set_alignment().
18172 // <xalign>: location to store X alignment of @misc, or %NULL
18173 // <yalign>: location to store Y alignment of @misc, or %NULL
18174 void get_alignment()(/*out*/ float* xalign=null, /*out*/ float* yalign=null) {
18175 gtk_misc_get_alignment(&this, xalign, yalign);
18178 // Gets the padding in the X and Y directions of the widget.
18179 // See gtk_misc_set_padding().
18180 // <xpad>: location to store padding in the X direction, or %NULL
18181 // <ypad>: location to store padding in the Y direction, or %NULL
18182 void get_padding()(/*out*/ int* xpad=null, /*out*/ int* ypad=null) {
18183 gtk_misc_get_padding(&this, xpad, ypad);
18185 void set_alignment()(float xalign, float yalign) {
18186 gtk_misc_set_alignment(&this, xalign, yalign);
18188 void set_padding()(int xpad, int ypad) {
18189 gtk_misc_set_padding(&this, xpad, ypad);
18193 struct MiscClass {
18194 WidgetClass parent_class;
18197 extern (C) alias void function (Gdk2.Display* display) ModuleDisplayInitFunc;
18199 extern (C) alias void function (int* argc, char*** argv) ModuleInitFunc;
18201 // This should not be accessed directly. Use the accessor functions below.
18202 struct MountOperation /* : Gio.MountOperation */ {
18203 alias parent_instance this;
18204 alias parent_instance super_;
18205 alias parent_instance mountoperation;
18206 Gio2.MountOperation parent_instance;
18207 MountOperationPrivate* priv;
18210 // VERSION: 2.14
18211 // Creates a new #GtkMountOperation
18212 // RETURNS: a new #GtkMountOperation
18213 // <parent>: transient parent of the window, or %NULL
18214 static MountOperation* /*new*/ new_()(Window* parent=null) {
18215 return gtk_mount_operation_new(parent);
18218 // VERSION: 2.14
18219 // Gets the transient parent used by the #GtkMountOperation
18220 // RETURNS: the transient parent for windows shown by @op
18221 Window* get_parent()() {
18222 return gtk_mount_operation_get_parent(&this);
18225 // VERSION: 2.14
18226 // Gets the screen on which windows of the #GtkMountOperation
18227 // will be shown.
18228 // RETURNS: the screen on which windows of @op are shown
18229 Gdk2.Screen* get_screen()() {
18230 return gtk_mount_operation_get_screen(&this);
18233 // VERSION: 2.14
18234 // Returns whether the #GtkMountOperation is currently displaying
18235 // a window.
18236 // RETURNS: %TRUE if @op is currently displaying a window
18237 int is_showing()() {
18238 return gtk_mount_operation_is_showing(&this);
18241 // VERSION: 2.14
18242 // Sets the transient parent for windows shown by the
18243 // #GtkMountOperation.
18244 // <parent>: transient parent of the window, or %NULL
18245 void set_parent()(Window* parent=null) {
18246 gtk_mount_operation_set_parent(&this, parent);
18249 // VERSION: 2.14
18250 // Sets the screen to show windows of the #GtkMountOperation on.
18251 // <screen>: a #GdkScreen
18252 void set_screen()(Gdk2.Screen* screen) {
18253 gtk_mount_operation_set_screen(&this, screen);
18257 struct MountOperationClass {
18258 Gio2.MountOperationClass parent_class;
18259 extern (C) void function () _gtk_reserved1;
18260 extern (C) void function () _gtk_reserved2;
18261 extern (C) void function () _gtk_reserved3;
18262 extern (C) void function () _gtk_reserved4;
18265 struct MountOperationPrivate {
18268 enum MovementStep {
18269 LOGICAL_POSITIONS = 0,
18270 VISUAL_POSITIONS = 1,
18271 WORDS = 2,
18272 DISPLAY_LINES = 3,
18273 DISPLAY_LINE_ENDS = 4,
18274 PARAGRAPHS = 5,
18275 PARAGRAPH_ENDS = 6,
18276 PAGES = 7,
18277 BUFFER_ENDS = 8,
18278 HORIZONTAL_PAGES = 9
18280 enum int NO_TEXT_INPUT_MOD_MASK = 0;
18281 struct Notebook /* : Container */ {
18282 mixin Atk.ImplementorIface.__interface__;
18283 mixin Buildable.__interface__;
18284 alias container this;
18285 alias container super_;
18286 Container container;
18287 NotebookPage* cur_page;
18288 GLib2.List* children, first_tab, focus_tab;
18289 Widget* menu;
18290 Gdk2.Window* event_window;
18291 uint timer;
18292 ushort tab_hborder, tab_vborder;
18293 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
18294 uint, "show_tabs", 1,
18295 uint, "homogeneous", 1,
18296 uint, "show_border", 1,
18297 uint, "tab_pos", 2,
18298 uint, "scrollable", 1,
18299 uint, "in_child", 3,
18300 uint, "click_child", 3,
18301 uint, "button", 2,
18302 uint, "need_timer", 1,
18303 uint, "child_has_focus", 1,
18304 uint, "have_visible_child", 1,
18305 uint, "focus_out", 1,
18306 uint, "has_before_previous", 1,
18307 uint, "has_before_next", 1,
18308 uint, "has_after_previous", 1,
18309 uint, "has_after_next", 1,
18310 uint, "__dummy32A", 10));
18313 // Creates a new #GtkNotebook widget with no pages.
18314 // RETURNS: the newly created #GtkNotebook
18315 static Notebook* new_()() {
18316 return gtk_notebook_new();
18319 // Unintrospectable function: set_window_creation_hook() / gtk_notebook_set_window_creation_hook()
18320 // VERSION: 2.10
18321 // DEPRECATED (v2.24) function: set_window_creation_hook - Use the #GtkNotebook::create-window signal instead
18322 // Installs a global function used to create a window
18323 // when a detached tab is dropped in an empty area.
18324 // <func>: the #GtkNotebookWindowCreationFunc, or %NULL
18325 // <data>: user data for @func
18326 // <destroy>: Destroy notifier for @data, or %NULL
18327 static void set_window_creation_hook()(NotebookWindowCreationFunc func, void* data, GLib2.DestroyNotify destroy=null) {
18328 gtk_notebook_set_window_creation_hook(func, data, destroy);
18331 // Appends a page to @notebook.
18332 // page in the notebook, or -1 if function fails
18333 // RETURNS: the index (starting from 0) of the appended
18334 // <child>: the #GtkWidget to use as the contents of the page.
18335 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
18336 int append_page()(Widget* child, Widget* tab_label=null) {
18337 return gtk_notebook_append_page(&this, child, tab_label);
18340 // Appends a page to @notebook, specifying the widget to use as the
18341 // label in the popup menu.
18342 // page in the notebook, or -1 if function fails
18343 // RETURNS: the index (starting from 0) of the appended
18344 // <child>: the #GtkWidget to use as the contents of the page.
18345 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
18346 // <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.
18347 int append_page_menu()(Widget* child, Widget* tab_label=null, Widget* menu_label=null) {
18348 return gtk_notebook_append_page_menu(&this, child, tab_label, menu_label);
18351 // VERSION: 2.20
18352 // Gets one of the action widgets. See gtk_notebook_set_action_widget().
18353 // or %NULL when this action widget has not been set
18354 // RETURNS: The action widget with the given @pack_type
18355 // <pack_type>: pack type of the action widget to receive
18356 Widget* get_action_widget()(PackType pack_type) {
18357 return gtk_notebook_get_action_widget(&this, pack_type);
18360 // Returns the page number of the current page.
18361 // page in the notebook. If the notebook has no pages, then
18362 // -1 will be returned.
18363 // RETURNS: the index (starting from 0) of the current
18364 int get_current_page()() {
18365 return gtk_notebook_get_current_page(&this);
18368 // VERSION: 2.12
18369 // DEPRECATED (v2.24) method: get_group - Use gtk_notebook_get_group_name() instead
18370 // Gets the current group identificator pointer for @notebook.
18371 // or %NULL if none is set.
18372 // RETURNS: the group identificator,
18373 void* get_group()() {
18374 return gtk_notebook_get_group(&this);
18377 // VERSION: 2.10
18378 // DEPRECATED (v2.12) method: get_group_id - use gtk_notebook_get_group_name() instead.
18379 // Gets the current group identificator for @notebook.
18380 // RETURNS: the group identificator, or -1 if none is set.
18381 int get_group_id()() {
18382 return gtk_notebook_get_group_id(&this);
18385 // VERSION: 2.24
18386 // Gets the current group name for @notebook.
18387 // Note that this funtion can emphasis not be used
18388 // together with gtk_notebook_set_group() or
18389 // gtk_notebook_set_group_id().
18390 // or %NULL if none is set.
18391 char* get_group_name()() {
18392 return gtk_notebook_get_group_name(&this);
18395 // Retrieves the menu label widget of the page containing @child.
18396 // notebook page does not have a menu label other than the
18397 // default (the tab label).
18398 // RETURNS: the menu label, or %NULL if the
18399 // <child>: a widget contained in a page of @notebook
18400 Widget* get_menu_label()(Widget* child) {
18401 return gtk_notebook_get_menu_label(&this, child);
18404 // Retrieves the text of the menu label for the page containing
18405 // widget does not have a menu label other than
18406 // the default menu label, or the menu label widget
18407 // is not a #GtkLabel. The string is owned by
18408 // the widget and must not be freed.
18409 // RETURNS: the text of the tab label, or %NULL if the
18410 // <child>: the child widget of a page of the notebook.
18411 char* get_menu_label_text()(Widget* child) {
18412 return gtk_notebook_get_menu_label_text(&this, child);
18415 // VERSION: 2.2
18416 // Gets the number of pages in a notebook.
18417 // RETURNS: the number of pages in the notebook.
18418 int get_n_pages()() {
18419 return gtk_notebook_get_n_pages(&this);
18422 // Returns the child widget contained in page number @page_num.
18423 // out of bounds.
18424 // RETURNS: the child widget, or %NULL if @page_num is
18425 // <page_num>: the index of a page in the notebook, or -1 to get the last page.
18426 Widget* get_nth_page()(int page_num) {
18427 return gtk_notebook_get_nth_page(&this, page_num);
18430 // Returns whether the tab label area has arrows for scrolling. See
18431 // gtk_notebook_set_scrollable().
18432 // RETURNS: %TRUE if arrows for scrolling are present
18433 int get_scrollable()() {
18434 return gtk_notebook_get_scrollable(&this);
18437 // Returns whether a bevel will be drawn around the notebook pages. See
18438 // gtk_notebook_set_show_border().
18439 // RETURNS: %TRUE if the bevel is drawn
18440 int get_show_border()() {
18441 return gtk_notebook_get_show_border(&this);
18444 // Returns whether the tabs of the notebook are shown. See
18445 // gtk_notebook_set_show_tabs().
18446 // RETURNS: %TRUE if the tabs are shown
18447 int get_show_tabs()() {
18448 return gtk_notebook_get_show_tabs(&this);
18451 // VERSION: 2.10
18452 // Returns whether the tab contents can be detached from @notebook.
18453 // RETURNS: TRUE if the tab is detachable.
18454 // <child>: a child #GtkWidget
18455 int get_tab_detachable()(Widget* child) {
18456 return gtk_notebook_get_tab_detachable(&this, child);
18459 // VERSION: 2.22
18460 // Returns the horizontal width of a tab border.
18461 // RETURNS: horizontal width of a tab border
18462 ushort get_tab_hborder()() {
18463 return gtk_notebook_get_tab_hborder(&this);
18466 // Returns the tab label widget for the page @child. %NULL is returned
18467 // if @child is not in @notebook or if no tab label has specifically
18468 // been set for @child.
18469 // RETURNS: the tab label
18470 // <child>: the page
18471 Widget* get_tab_label()(Widget* child) {
18472 return gtk_notebook_get_tab_label(&this, child);
18475 // Retrieves the text of the tab label for the page containing
18476 // tab label widget is not a #GtkLabel. The
18477 // string is owned by the widget and must not
18478 // be freed.
18479 // RETURNS: the text of the tab label, or %NULL if the
18480 // <child>: a widget contained in a page of @notebook
18481 char* get_tab_label_text()(Widget* child) {
18482 return gtk_notebook_get_tab_label_text(&this, child);
18485 // Gets the edge at which the tabs for switching pages in the
18486 // notebook are drawn.
18487 // RETURNS: the edge at which the tabs are drawn
18488 PositionType get_tab_pos()() {
18489 return gtk_notebook_get_tab_pos(&this);
18492 // VERSION: 2.10
18493 // Gets whether the tab can be reordered via drag and drop or not.
18494 // RETURNS: %TRUE if the tab is reorderable.
18495 // <child>: a child #GtkWidget
18496 int get_tab_reorderable()(Widget* child) {
18497 return gtk_notebook_get_tab_reorderable(&this, child);
18500 // VERSION: 2.22
18501 // Returns the vertical width of a tab border.
18502 // RETURNS: vertical width of a tab border
18503 ushort get_tab_vborder()() {
18504 return gtk_notebook_get_tab_vborder(&this);
18507 // Insert a page into @notebook at the given position.
18508 // page in the notebook, or -1 if function fails
18509 // RETURNS: the index (starting from 0) of the inserted
18510 // <child>: the #GtkWidget to use as the contents of the page.
18511 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
18512 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
18513 int insert_page()(Widget* child, Widget* tab_label, int position) {
18514 return gtk_notebook_insert_page(&this, child, tab_label, position);
18517 // Insert a page into @notebook at the given position, specifying
18518 // the widget to use as the label in the popup menu.
18519 // page in the notebook
18520 // RETURNS: the index (starting from 0) of the inserted
18521 // <child>: the #GtkWidget to use as the contents of the page.
18522 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
18523 // <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.
18524 // <position>: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
18525 int insert_page_menu()(Widget* child, Widget* tab_label, Widget* menu_label, int position) {
18526 return gtk_notebook_insert_page_menu(&this, child, tab_label, menu_label, position);
18529 // Switches to the next page. Nothing happens if the current page is
18530 // the last page.
18531 void next_page()() {
18532 gtk_notebook_next_page(&this);
18535 // Finds the index of the page which contains the given child
18536 // widget.
18537 // -1 if @child is not in the notebook.
18538 // RETURNS: the index of the page containing @child, or
18539 // <child>: a #GtkWidget
18540 int page_num()(Widget* child) {
18541 return gtk_notebook_page_num(&this, child);
18543 // Disables the popup menu.
18544 void popup_disable()() {
18545 gtk_notebook_popup_disable(&this);
18547 // the tab labels, a menu with all the pages will be popped up.
18548 void popup_enable()() {
18549 gtk_notebook_popup_enable(&this);
18552 // Prepends a page to @notebook.
18553 // page in the notebook, or -1 if function fails
18554 // RETURNS: the index (starting from 0) of the prepended
18555 // <child>: the #GtkWidget to use as the contents of the page.
18556 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
18557 int prepend_page()(Widget* child, Widget* tab_label=null) {
18558 return gtk_notebook_prepend_page(&this, child, tab_label);
18561 // Prepends a page to @notebook, specifying the widget to use as the
18562 // label in the popup menu.
18563 // page in the notebook, or -1 if function fails
18564 // RETURNS: the index (starting from 0) of the prepended
18565 // <child>: the #GtkWidget to use as the contents of the page.
18566 // <tab_label>: the #GtkWidget to be used as the label for the page, or %NULL to use the default label, 'page N'.
18567 // <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.
18568 int prepend_page_menu()(Widget* child, Widget* tab_label=null, Widget* menu_label=null) {
18569 return gtk_notebook_prepend_page_menu(&this, child, tab_label, menu_label);
18572 // Switches to the previous page. Nothing happens if the current page
18573 // is the first page.
18574 void prev_page()() {
18575 gtk_notebook_prev_page(&this);
18578 // DEPRECATED (v2.20) method: query_tab_label_packing - Modify the #GtkNotebook:tab-expand and
18579 // Query the packing attributes for the tab label of the page
18580 // containing @child.
18581 // #GtkNotebook:tab-fill child properties instead.
18582 // <child>: the page
18583 // <expand>: location to store the expand value (or NULL)
18584 // <fill>: location to store the fill value (or NULL)
18585 // <pack_type>: location to store the pack_type (or NULL)
18586 void query_tab_label_packing()(Widget* child, int* expand, int* fill, PackType* pack_type) {
18587 gtk_notebook_query_tab_label_packing(&this, child, expand, fill, pack_type);
18590 // Removes a page from the notebook given its index
18591 // in the notebook.
18592 // <page_num>: the index of a notebook page, starting from 0. If -1, the last page will be removed.
18593 void remove_page()(int page_num) {
18594 gtk_notebook_remove_page(&this, page_num);
18597 // Reorders the page containing @child, so that it appears in position
18598 // children in the list or negative, @child will be moved to the end
18599 // of the list.
18600 // <child>: the child to move
18601 // <position>: the new position, or -1 to move to the end
18602 void reorder_child()(Widget* child, int position) {
18603 gtk_notebook_reorder_child(&this, child, position);
18606 // VERSION: 2.20
18607 // Sets @widget as one of the action widgets. Depending on the pack type
18608 // the widget will be placed before or after the tabs. You can use
18609 // a #GtkBox if you need to pack more than one widget on the same side.
18610 // Note that action widgets are "internal" children of the notebook and thus
18611 // not included in the list returned from gtk_container_foreach().
18612 // <widget>: a #GtkWidget
18613 // <pack_type>: pack type of the action widget
18614 void set_action_widget()(Widget* widget, PackType pack_type) {
18615 gtk_notebook_set_action_widget(&this, widget, pack_type);
18618 // Switches to the page number @page_num.
18619 // Note that due to historical reasons, GtkNotebook refuses
18620 // to switch to a page unless the child widget is visible.
18621 // Therefore, it is recommended to show child widgets before
18622 // adding them to a notebook.
18623 // <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.
18624 void set_current_page()(int page_num) {
18625 gtk_notebook_set_current_page(&this, page_num);
18628 // VERSION: 2.12
18629 // DEPRECATED (v2.24) method: set_group - Use gtk_notebook_set_group_name() instead
18630 // Sets a group identificator pointer for @notebook, notebooks sharing
18631 // the same group identificator pointer will be able to exchange tabs
18632 // via drag and drop. A notebook with a %NULL group identificator will
18633 // not be able to exchange tabs with any other notebook.
18634 // <group>: a pointer to identify the notebook group, or %NULL to unset it
18635 void set_group()(void* group=null) {
18636 gtk_notebook_set_group(&this, group);
18639 // VERSION: 2.10
18640 // DEPRECATED (v2.12) method: set_group_id - use gtk_notebook_set_group_name() instead.
18641 // Sets an group identificator for @notebook, notebooks sharing
18642 // the same group identificator will be able to exchange tabs
18643 // via drag and drop. A notebook with group identificator -1 will
18644 // not be able to exchange tabs with any other notebook.
18645 // <group_id>: a group identificator, or -1 to unset it
18646 void set_group_id()(int group_id) {
18647 gtk_notebook_set_group_id(&this, group_id);
18650 // VERSION: 2.24
18651 // Sets a group name for @notebook.
18652 // Notebooks with the same name will be able to exchange tabs
18653 // via drag and drop. A notebook with a %NULL group name will
18654 // not be able to exchange tabs with any other notebook.
18655 void set_group_name()(char* group_name) {
18656 gtk_notebook_set_group_name(&this, group_name);
18659 // Sets whether the tabs must have all the same size or not.
18660 // <homogeneous>: %TRUE if all tabs should be the same size.
18661 void set_homogeneous_tabs()(int homogeneous) {
18662 gtk_notebook_set_homogeneous_tabs(&this, homogeneous);
18665 // Changes the menu label for the page containing @child.
18666 // <child>: the child widget
18667 // <menu_label>: the menu label, or NULL for default
18668 void set_menu_label()(Widget* child, Widget* menu_label=null) {
18669 gtk_notebook_set_menu_label(&this, child, menu_label);
18672 // Creates a new label and sets it as the menu label of @child.
18673 // <child>: the child widget
18674 // <menu_text>: the label text
18675 void set_menu_label_text()(Widget* child, char* menu_text) {
18676 gtk_notebook_set_menu_label_text(&this, child, menu_text);
18679 // Sets whether the tab label area will have arrows for scrolling if
18680 // there are too many tabs to fit in the area.
18681 // <scrollable>: %TRUE if scroll arrows should be added
18682 void set_scrollable()(int scrollable) {
18683 gtk_notebook_set_scrollable(&this, scrollable);
18686 // Sets whether a bevel will be drawn around the notebook pages.
18687 // This only has a visual effect when the tabs are not shown.
18688 // See gtk_notebook_set_show_tabs().
18689 // <show_border>: %TRUE if a bevel should be drawn around the notebook.
18690 void set_show_border()(int show_border) {
18691 gtk_notebook_set_show_border(&this, show_border);
18694 // Sets whether to show the tabs for the notebook or not.
18695 // <show_tabs>: %TRUE if the tabs should be shown.
18696 void set_show_tabs()(int show_tabs) {
18697 gtk_notebook_set_show_tabs(&this, show_tabs);
18700 // Sets the width the border around the tab labels
18701 // in a notebook. This is equivalent to calling
18702 // gtk_notebook_set_tab_hborder (@notebook, @border_width) followed
18703 // by gtk_notebook_set_tab_vborder (@notebook, @border_width).
18704 // <border_width>: width of the border around the tab labels.
18705 void set_tab_border()(uint border_width) {
18706 gtk_notebook_set_tab_border(&this, border_width);
18709 // VERSION: 2.10
18710 // Sets whether the tab can be detached from @notebook to another
18711 // notebook or widget.
18712 // Note that 2 notebooks must share a common group identificator
18713 // (see gtk_notebook_set_group_id ()) to allow automatic tabs
18714 // interchange between them.
18715 // If you want a widget to interact with a notebook through DnD
18716 // (i.e.: accept dragged tabs from it) it must be set as a drop
18717 // destination and accept the target "GTK_NOTEBOOK_TAB". The notebook
18718 // will fill the selection with a GtkWidget** pointing to the child
18719 // widget that corresponds to the dropped tab.
18720 // |[
18721 // static void
18722 // on_drop_zone_drag_data_received (GtkWidget *widget,
18723 // GdkDragContext *context,
18724 // gint x,
18725 // gint y,
18726 // GtkSelectionData *selection_data,
18727 // guint info,
18728 // guint time,
18729 // gpointer user_data)
18730 // {
18731 // GtkWidget *notebook;
18732 // GtkWidget **child;
18733 // notebook = gtk_drag_get_source_widget (context);
18734 // child = (void*) selection_data->data;
18735 // process_widget (*child);
18736 // gtk_container_remove (GTK_CONTAINER (notebook), *child);
18737 // }
18738 // ]|
18739 // If you want a notebook to accept drags from other widgets,
18740 // you will have to set your own DnD code to do it.
18741 // <child>: a child #GtkWidget
18742 // <detachable>: whether the tab is detachable or not
18743 void set_tab_detachable()(Widget* child, int detachable) {
18744 gtk_notebook_set_tab_detachable(&this, child, detachable);
18747 // Sets the width of the horizontal border of tab labels.
18748 // <tab_hborder>: width of the horizontal border of tab labels.
18749 void set_tab_hborder()(uint tab_hborder) {
18750 gtk_notebook_set_tab_hborder(&this, tab_hborder);
18753 // Changes the tab label for @child. If %NULL is specified
18754 // for @tab_label, then the page will have the label 'page N'.
18755 // <child>: the page
18756 // <tab_label>: the tab label widget to use, or %NULL for default tab label.
18757 void set_tab_label()(Widget* child, Widget* tab_label=null) {
18758 gtk_notebook_set_tab_label(&this, child, tab_label);
18761 // DEPRECATED (v2.20) method: set_tab_label_packing - Modify the #GtkNotebook:tab-expand and
18762 // Sets the packing parameters for the tab label of the page
18763 // containing @child. See gtk_box_pack_start() for the exact meaning
18764 // of the parameters.
18765 // #GtkNotebook:tab-fill child properties instead.
18766 // Modifying the packing of the tab label is a deprecated feature and
18767 // shouldn't be done anymore.
18768 // <child>: the child widget
18769 // <expand>: whether to expand the tab label or not
18770 // <fill>: whether the tab label should fill the allocated area or not
18771 // <pack_type>: the position of the tab label
18772 void set_tab_label_packing()(Widget* child, int expand, int fill, PackType pack_type) {
18773 gtk_notebook_set_tab_label_packing(&this, child, expand, fill, pack_type);
18776 // Creates a new label and sets it as the tab label for the page
18777 // containing @child.
18778 // <child>: the page
18779 // <tab_text>: the label text
18780 void set_tab_label_text()(Widget* child, char* tab_text) {
18781 gtk_notebook_set_tab_label_text(&this, child, tab_text);
18784 // Sets the edge at which the tabs for switching pages in the
18785 // notebook are drawn.
18786 // <pos>: the edge to draw the tabs at.
18787 void set_tab_pos()(PositionType pos) {
18788 gtk_notebook_set_tab_pos(&this, pos);
18791 // VERSION: 2.10
18792 // Sets whether the notebook tab can be reordered
18793 // via drag and drop or not.
18794 // <child>: a child #GtkWidget
18795 // <reorderable>: whether the tab is reorderable or not.
18796 void set_tab_reorderable()(Widget* child, int reorderable) {
18797 gtk_notebook_set_tab_reorderable(&this, child, reorderable);
18800 // Sets the width of the vertical border of tab labels.
18801 // <tab_vborder>: width of the vertical border of tab labels.
18802 void set_tab_vborder()(uint tab_vborder) {
18803 gtk_notebook_set_tab_vborder(&this, tab_vborder);
18805 extern (C) alias static c_int function (Notebook* this_, int object, void* user_data=null) signal_change_current_page;
18807 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18808 return super_.signal_connect!name(cb, data, cf);
18811 ulong signal_connect(string name:"change-current-page", CB:signal_change_current_page)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18812 return signal_connect_data!()(&this, cast(char*)"change-current-page",
18813 cast(GObject2.Callback)cb, data, null, cf);
18816 // VERSION: 2.12
18817 // The ::create-window signal is emitted when a detachable
18818 // tab is dropped on the root window.
18819 // A handler for this signal can create a window containing
18820 // a notebook where the tab will be attached. It is also
18821 // responsible for moving/resizing the window and adding the
18822 // necessary properties to the notebook (e.g. the
18823 // #GtkNotebook:group ).
18824 // The default handler uses the global window creation hook,
18825 // if one has been set with gtk_notebook_set_window_creation_hook().
18826 // added to, or %NULL.
18827 // RETURNS: a #GtkNotebook that @page should be
18828 // <page>: the tab of @notebook that is being detached
18829 // <x>: the X coordinate where the drop happens
18830 // <y>: the Y coordinate where the drop happens
18831 extern (C) alias static Notebook* function (Notebook* this_, Widget* page, int x, int y, void* user_data=null) signal_create_window;
18832 ulong signal_connect(string name:"create-window", CB:signal_create_window)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18833 return signal_connect_data!()(&this, cast(char*)"create-window",
18834 cast(GObject2.Callback)cb, data, null, cf);
18836 extern (C) alias static c_int function (Notebook* this_, NotebookTab* object, void* user_data=null) signal_focus_tab;
18837 ulong signal_connect(string name:"focus-tab", CB:signal_focus_tab)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18838 return signal_connect_data!()(&this, cast(char*)"focus-tab",
18839 cast(GObject2.Callback)cb, data, null, cf);
18841 extern (C) alias static void function (Notebook* this_, DirectionType* object, void* user_data=null) signal_move_focus_out;
18842 ulong signal_connect(string name:"move-focus-out", CB:signal_move_focus_out)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18843 return signal_connect_data!()(&this, cast(char*)"move-focus-out",
18844 cast(GObject2.Callback)cb, data, null, cf);
18847 // VERSION: 2.10
18848 // the ::page-added signal is emitted in the notebook
18849 // right after a page is added to the notebook.
18850 // <child>: the child #GtkWidget affected
18851 // <page_num>: the new page number for @child
18852 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) signal_page_added;
18853 ulong signal_connect(string name:"page-added", CB:signal_page_added)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18854 return signal_connect_data!()(&this, cast(char*)"page-added",
18855 cast(GObject2.Callback)cb, data, null, cf);
18858 // VERSION: 2.10
18859 // the ::page-removed signal is emitted in the notebook
18860 // right after a page is removed from the notebook.
18861 // <child>: the child #GtkWidget affected
18862 // <page_num>: the @child page number
18863 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) signal_page_removed;
18864 ulong signal_connect(string name:"page-removed", CB:signal_page_removed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18865 return signal_connect_data!()(&this, cast(char*)"page-removed",
18866 cast(GObject2.Callback)cb, data, null, cf);
18869 // VERSION: 2.10
18870 // the ::page-reordered signal is emitted in the notebook
18871 // right after a page has been reordered.
18872 // <child>: the child #GtkWidget affected
18873 // <page_num>: the new page number for @child
18874 extern (C) alias static void function (Notebook* this_, Widget* child, c_uint page_num, void* user_data=null) signal_page_reordered;
18875 ulong signal_connect(string name:"page-reordered", CB:signal_page_reordered)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18876 return signal_connect_data!()(&this, cast(char*)"page-reordered",
18877 cast(GObject2.Callback)cb, data, null, cf);
18879 extern (C) alias static c_int function (Notebook* this_, DirectionType* object, c_int p0, void* user_data=null) signal_reorder_tab;
18880 ulong signal_connect(string name:"reorder-tab", CB:signal_reorder_tab)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18881 return signal_connect_data!()(&this, cast(char*)"reorder-tab",
18882 cast(GObject2.Callback)cb, data, null, cf);
18884 extern (C) alias static c_int function (Notebook* this_, c_int object, void* user_data=null) signal_select_page;
18885 ulong signal_connect(string name:"select-page", CB:signal_select_page)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18886 return signal_connect_data!()(&this, cast(char*)"select-page",
18887 cast(GObject2.Callback)cb, data, null, cf);
18889 extern (C) alias static void function (Notebook* this_, void* object, c_uint p0, void* user_data=null) signal_switch_page;
18890 ulong signal_connect(string name:"switch-page", CB:signal_switch_page)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
18891 return signal_connect_data!()(&this, cast(char*)"switch-page",
18892 cast(GObject2.Callback)cb, data, null, cf);
18896 struct NotebookClass {
18897 ContainerClass parent_class;
18898 extern (C) void function (Notebook* notebook, NotebookPage* page, uint page_num) switch_page;
18899 extern (C) int function (Notebook* notebook, int move_focus) select_page;
18900 extern (C) int function (Notebook* notebook, NotebookTab type) focus_tab;
18901 extern (C) int function (Notebook* notebook, int offset) change_current_page;
18902 extern (C) void function (Notebook* notebook, DirectionType direction) move_focus_out;
18903 extern (C) int function (Notebook* notebook, DirectionType direction, int move_to_last) reorder_tab;
18904 extern (C) int function (Notebook* notebook, Widget* child, Widget* tab_label, Widget* menu_label, int position) insert_page;
18905 // Unintrospectable functionp: create_window() / ()
18906 extern (C) Notebook* function (Notebook* notebook, Widget* page, int x, int y) create_window;
18907 extern (C) void function () _gtk_reserved1;
18910 struct NotebookPage {
18913 enum NotebookTab {
18914 FIRST = 0,
18915 LAST = 1
18917 // Unintrospectable callback: NotebookWindowCreationFunc() / ()
18918 extern (C) alias Notebook* function (Notebook* source, Widget* page, int x, int y, void* data) NotebookWindowCreationFunc;
18920 enum NumberUpLayout {
18921 GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM = 0,
18922 GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP = 1,
18923 GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM = 2,
18924 GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP = 3,
18925 GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT = 4,
18926 GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT = 5,
18927 GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT = 6,
18928 GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT = 7
18930 struct Object /* : GObject.InitiallyUnowned */ {
18931 alias parent_instance this;
18932 alias parent_instance super_;
18933 alias parent_instance initiallyunowned;
18934 GObject2.InitiallyUnowned parent_instance;
18935 uint flags;
18937 // Unintrospectable constructor: new() / gtk_object_new()
18938 alias gtk_object_new new_; // Variadic
18939 static void add_arg_type()(char* arg_name, Type arg_type, uint arg_flags, uint arg_id) {
18940 gtk_object_add_arg_type(arg_name, arg_type, arg_flags, arg_id);
18942 void destroy()() {
18943 gtk_object_destroy(&this);
18945 // Unintrospectable method: get() / gtk_object_get()
18946 /+ Not available -- variadic methods unsupported - use the C function directly.
18947 alias gtk_object_get get; // Variadic
18949 // Unintrospectable method: get_data() / gtk_object_get_data()
18950 void* get_data()(char* key) {
18951 return gtk_object_get_data(&this, key);
18953 // Unintrospectable method: get_data_by_id() / gtk_object_get_data_by_id()
18954 void* get_data_by_id()(GLib2.Quark data_id) {
18955 return gtk_object_get_data_by_id(&this, data_id);
18957 // Unintrospectable method: get_user_data() / gtk_object_get_user_data()
18958 void* get_user_data()() {
18959 return gtk_object_get_user_data(&this);
18961 // Unintrospectable method: ref() / gtk_object_ref()
18962 Object* ref_()() {
18963 return gtk_object_ref(&this);
18965 void remove_data()(char* key) {
18966 gtk_object_remove_data(&this, key);
18968 void remove_data_by_id()(GLib2.Quark data_id) {
18969 gtk_object_remove_data_by_id(&this, data_id);
18971 void remove_no_notify()(char* key) {
18972 gtk_object_remove_no_notify(&this, key);
18974 void remove_no_notify_by_id()(GLib2.Quark key_id) {
18975 gtk_object_remove_no_notify_by_id(&this, key_id);
18977 // Unintrospectable method: set() / gtk_object_set()
18978 /+ Not available -- variadic methods unsupported - use the C function directly.
18979 alias gtk_object_set set; // Variadic
18981 void set_data()(char* key, void* data) {
18982 gtk_object_set_data(&this, key, data);
18984 void set_data_by_id()(GLib2.Quark data_id, void* data) {
18985 gtk_object_set_data_by_id(&this, data_id, data);
18987 void set_data_by_id_full()(GLib2.Quark data_id, void* data, GLib2.DestroyNotify destroy) {
18988 gtk_object_set_data_by_id_full(&this, data_id, data, destroy);
18990 void set_data_full()(char* key, void* data, GLib2.DestroyNotify destroy) {
18991 gtk_object_set_data_full(&this, key, data, destroy);
18993 void set_user_data()(void* data) {
18994 gtk_object_set_user_data(&this, data);
18996 void sink()() {
18997 gtk_object_sink(&this);
18999 void unref()() {
19000 gtk_object_unref(&this);
19002 void weakref()(GLib2.DestroyNotify notify, void* data) {
19003 gtk_object_weakref(&this, notify, data);
19005 void weakunref()(GLib2.DestroyNotify notify, void* data) {
19006 gtk_object_weakunref(&this, notify, data);
19008 extern (C) alias static void function (Object* this_, void* user_data=null) signal_destroy;
19010 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19011 return super_.signal_connect!name(cb, data, cf);
19014 ulong signal_connect(string name:"destroy", CB:signal_destroy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19015 return signal_connect_data!()(&this, cast(char*)"destroy",
19016 cast(GObject2.Callback)cb, data, null, cf);
19020 struct ObjectClass {
19021 GObject2.InitiallyUnownedClass parent_class;
19022 extern (C) void function (Object* object, Arg* arg, uint arg_id) set_arg;
19023 extern (C) void function (Object* object, Arg* arg, uint arg_id) get_arg;
19024 extern (C) void function (Object* object) destroy;
19027 enum ObjectFlags {
19028 IN_DESTRUCTION = 1,
19029 FLOATING = 2,
19030 RESERVED_1 = 4,
19031 RESERVED_2 = 8
19034 // #GtkOffscreenWindow is strictly intended to be used for obtaining
19035 // snapshots of widgets that are not part of a normal widget hierarchy.
19036 // It differs from gtk_widget_get_snapshot() in that the widget you
19037 // want to get a snapshot of need not be displayed on the user's screen
19038 // as a part of a widget hierarchy. However, since #GtkOffscreenWindow
19039 // is a toplevel widget you cannot obtain snapshots of a full window
19040 // with it since you cannot pack a toplevel widget in another toplevel.
19041 // The idea is to take a widget and manually set the state of it,
19042 // add it to a #GtkOffscreenWindow and then retrieve the snapshot
19043 // as a #GdkPixmap or #GdkPixbuf.
19044 // #GtkOffscreenWindow derives from #GtkWindow only as an implementation
19045 // detail. Applications should not use any API specific to #GtkWindow
19046 // to operate on this object. It should be treated as a #GtkBin that
19047 // has no parent widget.
19048 // When contained offscreen widgets are redrawn, #GtkOffscreenWindow
19049 // will emit a #GtkWidget::damage-event signal.
19050 struct OffscreenWindow /* : Window */ {
19051 mixin Atk.ImplementorIface.__interface__;
19052 mixin Buildable.__interface__;
19053 alias parent_object this;
19054 alias parent_object super_;
19055 alias parent_object window;
19056 Window parent_object;
19059 // VERSION: 2.20
19060 // Creates a toplevel container widget that is used to retrieve
19061 // snapshots of widgets without showing them on the screen. For
19062 // widgets that are on the screen and part of a normal widget
19063 // hierarchy, gtk_widget_get_snapshot() can be used instead.
19064 // RETURNS: A pointer to a #GtkWidget
19065 static OffscreenWindow* new_()() {
19066 return gtk_offscreen_window_new();
19069 // VERSION: 2.20
19070 // Retrieves a snapshot of the contained widget in the form of
19071 // a #GdkPixbuf. This is a new pixbuf with a reference count of 1,
19072 // and the application should unreference it once it is no longer
19073 // needed.
19074 // RETURNS: A #GdkPixbuf pointer, or %NULL.
19075 GdkPixbuf2.Pixbuf* /*new*/ get_pixbuf()() {
19076 return gtk_offscreen_window_get_pixbuf(&this);
19079 // VERSION: 2.20
19080 // Retrieves a snapshot of the contained widget in the form of
19081 // a #GdkPixmap. If you need to keep this around over window
19082 // resizes then you should add a reference to it.
19083 // or %NULL.
19084 // RETURNS: A #GdkPixmap pointer to the offscreen pixmap,
19085 Gdk2.Pixmap* get_pixmap()() {
19086 return gtk_offscreen_window_get_pixmap(&this);
19090 struct OffscreenWindowClass {
19091 WindowClass parent_class;
19094 struct OldEditable /* : Widget */ {
19095 mixin Atk.ImplementorIface.__interface__;
19096 mixin Buildable.__interface__;
19097 mixin Editable.__interface__;
19098 alias widget this;
19099 alias widget super_;
19100 Widget widget;
19101 uint current_pos, selection_start_pos, selection_end_pos;
19102 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19103 uint, "has_selection", 1,
19104 uint, "editable", 1,
19105 uint, "visible", 1,
19106 uint, "__dummy32A", 29));
19107 private char* clipboard_text;
19109 // Emits the ::changed signal on @old_editable.
19110 void changed()() {
19111 gtk_old_editable_changed(&this);
19114 // Claims or gives up ownership of the selection.
19115 // <claim>: if %TRUE, claim ownership of the selection, if %FALSE, give up ownership
19116 // <time_>: timestamp for this operation
19117 void claim_selection()(int claim, uint time_) {
19118 gtk_old_editable_claim_selection(&this, claim, time_);
19120 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_activate;
19122 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19123 return super_.signal_connect!name(cb, data, cf);
19126 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19127 return signal_connect_data!()(&this, cast(char*)"activate",
19128 cast(GObject2.Callback)cb, data, null, cf);
19130 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_copy_clipboard;
19131 ulong signal_connect(string name:"copy-clipboard", CB:signal_copy_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19132 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
19133 cast(GObject2.Callback)cb, data, null, cf);
19135 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_cut_clipboard;
19136 ulong signal_connect(string name:"cut-clipboard", CB:signal_cut_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19137 return signal_connect_data!()(&this, cast(char*)"cut-clipboard",
19138 cast(GObject2.Callback)cb, data, null, cf);
19140 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_kill_char;
19141 ulong signal_connect(string name:"kill-char", CB:signal_kill_char)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19142 return signal_connect_data!()(&this, cast(char*)"kill-char",
19143 cast(GObject2.Callback)cb, data, null, cf);
19145 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_kill_line;
19146 ulong signal_connect(string name:"kill-line", CB:signal_kill_line)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19147 return signal_connect_data!()(&this, cast(char*)"kill-line",
19148 cast(GObject2.Callback)cb, data, null, cf);
19150 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_kill_word;
19151 ulong signal_connect(string name:"kill-word", CB:signal_kill_word)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19152 return signal_connect_data!()(&this, cast(char*)"kill-word",
19153 cast(GObject2.Callback)cb, data, null, cf);
19155 extern (C) alias static void function (OldEditable* this_, int object, int p0, void* user_data=null) signal_move_cursor;
19156 ulong signal_connect(string name:"move-cursor", CB:signal_move_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19157 return signal_connect_data!()(&this, cast(char*)"move-cursor",
19158 cast(GObject2.Callback)cb, data, null, cf);
19160 extern (C) alias static void function (OldEditable* this_, int object, int p0, void* user_data=null) signal_move_page;
19161 ulong signal_connect(string name:"move-page", CB:signal_move_page)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19162 return signal_connect_data!()(&this, cast(char*)"move-page",
19163 cast(GObject2.Callback)cb, data, null, cf);
19165 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_move_to_column;
19166 ulong signal_connect(string name:"move-to-column", CB:signal_move_to_column)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19167 return signal_connect_data!()(&this, cast(char*)"move-to-column",
19168 cast(GObject2.Callback)cb, data, null, cf);
19170 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_move_to_row;
19171 ulong signal_connect(string name:"move-to-row", CB:signal_move_to_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19172 return signal_connect_data!()(&this, cast(char*)"move-to-row",
19173 cast(GObject2.Callback)cb, data, null, cf);
19175 extern (C) alias static void function (OldEditable* this_, int object, void* user_data=null) signal_move_word;
19176 ulong signal_connect(string name:"move-word", CB:signal_move_word)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19177 return signal_connect_data!()(&this, cast(char*)"move-word",
19178 cast(GObject2.Callback)cb, data, null, cf);
19180 extern (C) alias static void function (OldEditable* this_, void* user_data=null) signal_paste_clipboard;
19181 ulong signal_connect(string name:"paste-clipboard", CB:signal_paste_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19182 return signal_connect_data!()(&this, cast(char*)"paste-clipboard",
19183 cast(GObject2.Callback)cb, data, null, cf);
19185 extern (C) alias static void function (OldEditable* this_, c_int object, void* user_data=null) signal_set_editable;
19186 ulong signal_connect(string name:"set-editable", CB:signal_set_editable)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19187 return signal_connect_data!()(&this, cast(char*)"set-editable",
19188 cast(GObject2.Callback)cb, data, null, cf);
19192 struct OldEditableClass {
19193 WidgetClass parent_class;
19194 extern (C) void function (OldEditable* editable) activate;
19195 extern (C) void function (OldEditable* editable, int is_editable) set_editable;
19196 extern (C) void function (OldEditable* editable, int x, int y) move_cursor;
19197 extern (C) void function (OldEditable* editable, int n) move_word;
19198 extern (C) void function (OldEditable* editable, int x, int y) move_page;
19199 extern (C) void function (OldEditable* editable, int row) move_to_row;
19200 extern (C) void function (OldEditable* editable, int row) move_to_column;
19201 extern (C) void function (OldEditable* editable, int direction) kill_char;
19202 extern (C) void function (OldEditable* editable, int direction) kill_word;
19203 extern (C) void function (OldEditable* editable, int direction) kill_line;
19204 extern (C) void function (OldEditable* editable) cut_clipboard;
19205 extern (C) void function (OldEditable* editable) copy_clipboard;
19206 extern (C) void function (OldEditable* editable) paste_clipboard;
19207 extern (C) void function (OldEditable* editable, int start_pos, int end_pos) update_text;
19208 extern (C) char* /*new*/ function (OldEditable* editable, int start_pos, int end_pos) get_chars;
19209 extern (C) void function (OldEditable* editable, int start_pos, int end_pos) set_selection;
19210 extern (C) void function (OldEditable* editable, int position) set_position;
19213 struct OptionMenu /* : Button */ {
19214 mixin Atk.ImplementorIface.__interface__;
19215 mixin Activatable.__interface__;
19216 mixin Buildable.__interface__;
19217 alias button this;
19218 alias button super_;
19219 Button button;
19220 Widget* menu, menu_item;
19221 ushort width, height;
19223 static OptionMenu* new_()() {
19224 return gtk_option_menu_new();
19227 // DEPRECATED (v2.4) method: get_history - Use #GtkComboBox instead.
19228 // Retrieves the index of the currently selected menu item. The menu
19229 // items are numbered from top to bottom, starting with 0.
19230 // RETURNS: index of the selected menu item, or -1 if there are no menu items
19231 int get_history()() {
19232 return gtk_option_menu_get_history(&this);
19234 // Unintrospectable method: get_menu() / gtk_option_menu_get_menu()
19235 Widget* get_menu()() {
19236 return gtk_option_menu_get_menu(&this);
19238 void remove_menu()() {
19239 gtk_option_menu_remove_menu(&this);
19241 void set_history()(uint index_) {
19242 gtk_option_menu_set_history(&this, index_);
19244 void set_menu()(Widget* menu) {
19245 gtk_option_menu_set_menu(&this, menu);
19247 extern (C) alias static void function (OptionMenu* this_, void* user_data=null) signal_changed;
19249 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19250 return super_.signal_connect!name(cb, data, cf);
19253 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19254 return signal_connect_data!()(&this, cast(char*)"changed",
19255 cast(GObject2.Callback)cb, data, null, cf);
19259 struct OptionMenuClass {
19260 ButtonClass parent_class;
19261 extern (C) void function (OptionMenu* option_menu) changed;
19262 extern (C) void function () _gtk_reserved1;
19263 extern (C) void function () _gtk_reserved2;
19264 extern (C) void function () _gtk_reserved3;
19265 extern (C) void function () _gtk_reserved4;
19268 struct Orientable /* Interface */ {
19269 mixin template __interface__() {
19270 // VERSION: 2.16
19271 // Retrieves the orientation of the @orientable.
19272 // RETURNS: the orientation of the @orientable.
19273 Orientation get_orientation()() {
19274 return gtk_orientable_get_orientation(cast(Orientable*)&this);
19277 // VERSION: 2.16
19278 // Sets the orientation of the @orientable.
19279 // <orientation>: the orientable's new orientation.
19280 void set_orientation()(Orientation orientation) {
19281 gtk_orientable_set_orientation(cast(Orientable*)&this, orientation);
19284 mixin __interface__;
19287 struct OrientableIface {
19288 GObject2.TypeInterface base_iface;
19291 enum Orientation {
19292 HORIZONTAL = 0,
19293 VERTICAL = 1
19295 enum PAPER_NAME_A3 = "iso_a3";
19296 enum PAPER_NAME_A4 = "iso_a4";
19297 enum PAPER_NAME_A5 = "iso_a5";
19298 enum PAPER_NAME_B5 = "iso_b5";
19299 enum PAPER_NAME_EXECUTIVE = "na_executive";
19300 enum PAPER_NAME_LEGAL = "na_legal";
19301 enum PAPER_NAME_LETTER = "na_letter";
19302 enum int PARAM_READABLE = 0;
19303 enum int PARAM_READWRITE = 0;
19304 enum int PARAM_WRITABLE = 0;
19305 enum int PATH_PRIO_MASK = 15;
19306 enum PRINT_SETTINGS_COLLATE = "collate";
19307 enum PRINT_SETTINGS_DEFAULT_SOURCE = "default-source";
19308 enum PRINT_SETTINGS_DITHER = "dither";
19309 enum PRINT_SETTINGS_DUPLEX = "duplex";
19310 enum PRINT_SETTINGS_FINISHINGS = "finishings";
19311 enum PRINT_SETTINGS_MEDIA_TYPE = "media-type";
19312 enum PRINT_SETTINGS_NUMBER_UP = "number-up";
19313 enum PRINT_SETTINGS_NUMBER_UP_LAYOUT = "number-up-layout";
19314 enum PRINT_SETTINGS_N_COPIES = "n-copies";
19315 enum PRINT_SETTINGS_ORIENTATION = "orientation";
19316 enum PRINT_SETTINGS_OUTPUT_BIN = "output-bin";
19317 enum PRINT_SETTINGS_OUTPUT_FILE_FORMAT = "output-file-format";
19318 enum PRINT_SETTINGS_OUTPUT_URI = "output-uri";
19319 enum PRINT_SETTINGS_PAGE_RANGES = "page-ranges";
19320 enum PRINT_SETTINGS_PAGE_SET = "page-set";
19321 enum PRINT_SETTINGS_PAPER_FORMAT = "paper-format";
19322 enum PRINT_SETTINGS_PAPER_HEIGHT = "paper-height";
19323 enum PRINT_SETTINGS_PAPER_WIDTH = "paper-width";
19324 enum PRINT_SETTINGS_PRINTER = "printer";
19325 enum PRINT_SETTINGS_PRINTER_LPI = "printer-lpi";
19326 enum PRINT_SETTINGS_PRINT_PAGES = "print-pages";
19327 enum PRINT_SETTINGS_QUALITY = "quality";
19328 enum PRINT_SETTINGS_RESOLUTION = "resolution";
19329 enum PRINT_SETTINGS_RESOLUTION_X = "resolution-x";
19330 enum PRINT_SETTINGS_RESOLUTION_Y = "resolution-y";
19331 enum PRINT_SETTINGS_REVERSE = "reverse";
19332 enum PRINT_SETTINGS_SCALE = "scale";
19333 enum PRINT_SETTINGS_USE_COLOR = "use-color";
19334 enum PRINT_SETTINGS_WIN32_DRIVER_EXTRA = "win32-driver-extra";
19335 enum PRINT_SETTINGS_WIN32_DRIVER_VERSION = "win32-driver-version";
19336 enum int PRIORITY_REDRAW = 20;
19337 enum int PRIORITY_RESIZE = 10;
19338 enum PackDirection {
19339 LTR = 0,
19340 RTL = 1,
19341 TTB = 2,
19342 BTT = 3
19344 enum PackType {
19345 START = 0,
19346 END = 1
19348 enum PageOrientation {
19349 PORTRAIT = 0,
19350 LANDSCAPE = 1,
19351 REVERSE_PORTRAIT = 2,
19352 REVERSE_LANDSCAPE = 3
19354 struct PageRange {
19355 int start, end;
19358 enum PageSet {
19359 ALL = 0,
19360 EVEN = 1,
19361 ODD = 2
19363 struct PageSetup /* : GObject.Object */ {
19364 alias method_parent this;
19365 alias method_parent super_;
19366 alias method_parent object;
19367 GObject2.Object method_parent;
19370 // VERSION: 2.10
19371 // Creates a new #GtkPageSetup.
19372 // RETURNS: a new #GtkPageSetup.
19373 static PageSetup* /*new*/ new_()() {
19374 return gtk_page_setup_new();
19377 // VERSION: 2.12
19378 // Reads the page setup from the file @file_name. Returns a
19379 // new #GtkPageSetup object with the restored page setup,
19380 // or %NULL if an error occurred. See gtk_page_setup_to_file().
19381 // RETURNS: the restored #GtkPageSetup
19382 // <file_name>: the filename to read the page setup from
19383 static PageSetup* /*new*/ new_from_file()(char* file_name, GLib2.Error** error=null) {
19384 return gtk_page_setup_new_from_file(file_name, error);
19387 // VERSION: 2.12
19388 // Reads the page setup from the group @group_name in the key file
19389 // page setup, or %NULL if an error occurred.
19390 // RETURNS: the restored #GtkPageSetup
19391 // <key_file>: the #GKeyFile to retrieve the page_setup from
19392 // <group_name>: the name of the group in the key_file to read, or %NULL to use the default name "Page Setup"
19393 static PageSetup* /*new*/ new_from_key_file()(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
19394 return gtk_page_setup_new_from_key_file(key_file, group_name, error);
19397 // VERSION: 2.10
19398 // Copies a #GtkPageSetup.
19399 // RETURNS: a copy of @other
19400 PageSetup* /*new*/ copy()() {
19401 return gtk_page_setup_copy(&this);
19404 // VERSION: 2.10
19405 // Gets the bottom margin in units of @unit.
19406 // RETURNS: the bottom margin
19407 // <unit>: the unit for the return value
19408 double get_bottom_margin()(Unit unit) {
19409 return gtk_page_setup_get_bottom_margin(&this, unit);
19412 // VERSION: 2.10
19413 // Gets the left margin in units of @unit.
19414 // RETURNS: the left margin
19415 // <unit>: the unit for the return value
19416 double get_left_margin()(Unit unit) {
19417 return gtk_page_setup_get_left_margin(&this, unit);
19420 // VERSION: 2.10
19421 // Gets the page orientation of the #GtkPageSetup.
19422 // RETURNS: the page orientation
19423 PageOrientation get_orientation()() {
19424 return gtk_page_setup_get_orientation(&this);
19427 // VERSION: 2.10
19428 // Returns the page height in units of @unit.
19429 // Note that this function takes orientation and
19430 // margins into consideration.
19431 // See gtk_page_setup_get_paper_height().
19432 // RETURNS: the page height.
19433 // <unit>: the unit for the return value
19434 double get_page_height()(Unit unit) {
19435 return gtk_page_setup_get_page_height(&this, unit);
19438 // VERSION: 2.10
19439 // Returns the page width in units of @unit.
19440 // Note that this function takes orientation and
19441 // margins into consideration.
19442 // See gtk_page_setup_get_paper_width().
19443 // RETURNS: the page width.
19444 // <unit>: the unit for the return value
19445 double get_page_width()(Unit unit) {
19446 return gtk_page_setup_get_page_width(&this, unit);
19449 // VERSION: 2.10
19450 // Returns the paper height in units of @unit.
19451 // Note that this function takes orientation, but
19452 // not margins into consideration.
19453 // See gtk_page_setup_get_page_height().
19454 // RETURNS: the paper height.
19455 // <unit>: the unit for the return value
19456 double get_paper_height()(Unit unit) {
19457 return gtk_page_setup_get_paper_height(&this, unit);
19460 // VERSION: 2.10
19461 // Gets the paper size of the #GtkPageSetup.
19462 // RETURNS: the paper size
19463 PaperSize* /*new*/ get_paper_size()() {
19464 return gtk_page_setup_get_paper_size(&this);
19467 // VERSION: 2.10
19468 // Returns the paper width in units of @unit.
19469 // Note that this function takes orientation, but
19470 // not margins into consideration.
19471 // See gtk_page_setup_get_page_width().
19472 // RETURNS: the paper width.
19473 // <unit>: the unit for the return value
19474 double get_paper_width()(Unit unit) {
19475 return gtk_page_setup_get_paper_width(&this, unit);
19478 // VERSION: 2.10
19479 // Gets the right margin in units of @unit.
19480 // RETURNS: the right margin
19481 // <unit>: the unit for the return value
19482 double get_right_margin()(Unit unit) {
19483 return gtk_page_setup_get_right_margin(&this, unit);
19486 // VERSION: 2.10
19487 // Gets the top margin in units of @unit.
19488 // RETURNS: the top margin
19489 // <unit>: the unit for the return value
19490 double get_top_margin()(Unit unit) {
19491 return gtk_page_setup_get_top_margin(&this, unit);
19494 // VERSION: 2.14
19495 // Reads the page setup from the file @file_name.
19496 // See gtk_page_setup_to_file().
19497 // RETURNS: %TRUE on success
19498 // <file_name>: the filename to read the page setup from
19499 int load_file()(char* file_name, GLib2.Error** error=null) {
19500 return gtk_page_setup_load_file(&this, file_name, error);
19503 // VERSION: 2.14
19504 // Reads the page setup from the group @group_name in the key file
19505 // RETURNS: %TRUE on success
19506 // <key_file>: the #GKeyFile to retrieve the page_setup from
19507 // <group_name>: the name of the group in the key_file to read, or %NULL to use the default name "Page Setup"
19508 int load_key_file()(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
19509 return gtk_page_setup_load_key_file(&this, key_file, group_name, error);
19512 // VERSION: 2.10
19513 // Sets the bottom margin of the #GtkPageSetup.
19514 // <margin>: the new bottom margin in units of @unit
19515 // <unit>: the units for @margin
19516 void set_bottom_margin()(double margin, Unit unit) {
19517 gtk_page_setup_set_bottom_margin(&this, margin, unit);
19520 // VERSION: 2.10
19521 // Sets the left margin of the #GtkPageSetup.
19522 // <margin>: the new left margin in units of @unit
19523 // <unit>: the units for @margin
19524 void set_left_margin()(double margin, Unit unit) {
19525 gtk_page_setup_set_left_margin(&this, margin, unit);
19528 // VERSION: 2.10
19529 // Sets the page orientation of the #GtkPageSetup.
19530 // <orientation>: a #GtkPageOrientation value
19531 void set_orientation()(PageOrientation orientation) {
19532 gtk_page_setup_set_orientation(&this, orientation);
19535 // VERSION: 2.10
19536 // Sets the paper size of the #GtkPageSetup without
19537 // changing the margins. See
19538 // gtk_page_setup_set_paper_size_and_default_margins().
19539 // <size>: a #GtkPaperSize
19540 void set_paper_size()(PaperSize* size) {
19541 gtk_page_setup_set_paper_size(&this, size);
19544 // VERSION: 2.10
19545 // Sets the paper size of the #GtkPageSetup and modifies
19546 // the margins according to the new paper size.
19547 // <size>: a #GtkPaperSize
19548 void set_paper_size_and_default_margins()(PaperSize* size) {
19549 gtk_page_setup_set_paper_size_and_default_margins(&this, size);
19552 // VERSION: 2.10
19553 // Sets the right margin of the #GtkPageSetup.
19554 // <margin>: the new right margin in units of @unit
19555 // <unit>: the units for @margin
19556 void set_right_margin()(double margin, Unit unit) {
19557 gtk_page_setup_set_right_margin(&this, margin, unit);
19560 // VERSION: 2.10
19561 // Sets the top margin of the #GtkPageSetup.
19562 // <margin>: the new top margin in units of @unit
19563 // <unit>: the units for @margin
19564 void set_top_margin()(double margin, Unit unit) {
19565 gtk_page_setup_set_top_margin(&this, margin, unit);
19568 // VERSION: 2.12
19569 // This function saves the information from @setup to @file_name.
19570 // RETURNS: %TRUE on success
19571 // <file_name>: the file to save to
19572 int to_file()(char* file_name, GLib2.Error** error=null) {
19573 return gtk_page_setup_to_file(&this, file_name, error);
19576 // VERSION: 2.12
19577 // This function adds the page setup from @setup to @key_file.
19578 // <key_file>: the #GKeyFile to save the page setup to
19579 // <group_name>: the group to add the settings to in @key_file, or %NULL to use the default name "Page Setup"
19580 void to_key_file()(GLib2.KeyFile* key_file, char* group_name) {
19581 gtk_page_setup_to_key_file(&this, key_file, group_name);
19585 extern (C) alias void function (PageSetup* page_setup, void* data) PageSetupDoneFunc;
19587 struct Paned /* : Container */ {
19588 mixin Atk.ImplementorIface.__interface__;
19589 mixin Buildable.__interface__;
19590 mixin Orientable.__interface__;
19591 alias container this;
19592 alias container super_;
19593 Container container;
19594 Widget* child1, child2;
19595 Gdk2.Window* handle;
19596 Gdk2.GC* xor_gc;
19597 Gdk2.CursorType cursor_type;
19598 private Gdk2.Rectangle handle_pos;
19599 private int child1_size, last_allocation, min_position, max_position;
19600 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19601 uint, "position_set", 1,
19602 uint, "in_drag", 1,
19603 uint, "child1_shrink", 1,
19604 uint, "child1_resize", 1,
19605 uint, "child2_shrink", 1,
19606 uint, "child2_resize", 1,
19607 uint, "orientation", 1,
19608 uint, "in_recursion", 1,
19609 uint, "handle_prelit", 1,
19610 uint, "__dummy32A", 23));
19611 private Widget* last_child1_focus, last_child2_focus;
19612 private PanedPrivate* priv;
19613 private int drag_pos, original_position;
19615 void add1()(Widget* child) {
19616 gtk_paned_add1(&this, child);
19618 void add2()(Widget* child) {
19619 gtk_paned_add2(&this, child);
19621 void compute_position()(int allocation, int child1_req, int child2_req) {
19622 gtk_paned_compute_position(&this, allocation, child1_req, child2_req);
19625 // VERSION: 2.4
19626 // Obtains the first child of the paned widget.
19627 // RETURNS: first child, or %NULL if it is not set.
19628 Widget* get_child1()() {
19629 return gtk_paned_get_child1(&this);
19632 // VERSION: 2.4
19633 // Obtains the second child of the paned widget.
19634 // RETURNS: second child, or %NULL if it is not set.
19635 Widget* get_child2()() {
19636 return gtk_paned_get_child2(&this);
19639 // VERSION: 2.20
19640 // Returns the #GdkWindow of the handle. This function is
19641 // useful when handling button or motion events because it
19642 // enables the callback to distinguish between the window
19643 // of the paned, a child and the handle.
19644 // RETURNS: the paned's handle window.
19645 Gdk2.Window* get_handle_window()() {
19646 return gtk_paned_get_handle_window(&this);
19649 // Obtains the position of the divider between the two panes.
19650 // RETURNS: position of the divider
19651 int get_position()() {
19652 return gtk_paned_get_position(&this);
19654 void pack1()(Widget* child, int resize, int shrink) {
19655 gtk_paned_pack1(&this, child, resize, shrink);
19657 void pack2()(Widget* child, int resize, int shrink) {
19658 gtk_paned_pack2(&this, child, resize, shrink);
19661 // Sets the position of the divider between the two panes.
19662 // <position>: pixel position of divider, a negative value means that the position is unset.
19663 void set_position()(int position) {
19664 gtk_paned_set_position(&this, position);
19667 // VERSION: 2.0
19668 // The ::accept-position signal is a
19669 // <link linkend="keybinding-signals">keybinding signal</link>
19670 // which gets emitted to accept the current position of the handle when
19671 // moving it using key bindings.
19672 // The default binding for this signal is Return or Space.
19673 extern (C) alias static c_int function (Paned* this_, void* user_data=null) signal_accept_position;
19675 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19676 return super_.signal_connect!name(cb, data, cf);
19679 ulong signal_connect(string name:"accept-position", CB:signal_accept_position)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19680 return signal_connect_data!()(&this, cast(char*)"accept-position",
19681 cast(GObject2.Callback)cb, data, null, cf);
19684 // VERSION: 2.0
19685 // The ::cancel-position signal is a
19686 // <link linkend="keybinding-signals">keybinding signal</link>
19687 // which gets emitted to cancel moving the position of the handle using key
19688 // bindings. The position of the handle will be reset to the value prior to
19689 // moving it.
19690 // The default binding for this signal is Escape.
19691 extern (C) alias static c_int function (Paned* this_, void* user_data=null) signal_cancel_position;
19692 ulong signal_connect(string name:"cancel-position", CB:signal_cancel_position)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19693 return signal_connect_data!()(&this, cast(char*)"cancel-position",
19694 cast(GObject2.Callback)cb, data, null, cf);
19697 // VERSION: 2.0
19698 // The ::cycle-child-focus signal is a
19699 // <link linkend="keybinding-signals">keybinding signal</link>
19700 // which gets emitted to cycle the focus between the children of the paned.
19701 // The default binding is f6.
19702 // <reversed>: whether cycling backward or forward
19703 extern (C) alias static c_int function (Paned* this_, c_int reversed, void* user_data=null) signal_cycle_child_focus;
19704 ulong signal_connect(string name:"cycle-child-focus", CB:signal_cycle_child_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19705 return signal_connect_data!()(&this, cast(char*)"cycle-child-focus",
19706 cast(GObject2.Callback)cb, data, null, cf);
19709 // VERSION: 2.0
19710 // The ::cycle-handle-focus signal is a
19711 // <link linkend="keybinding-signals">keybinding signal</link>
19712 // which gets emitted to cycle whether the paned should grab focus to allow
19713 // the user to change position of the handle by using key bindings.
19714 // The default binding for this signal is f8.
19715 // <reversed>: whether cycling backward or forward
19716 extern (C) alias static c_int function (Paned* this_, c_int reversed, void* user_data=null) signal_cycle_handle_focus;
19717 ulong signal_connect(string name:"cycle-handle-focus", CB:signal_cycle_handle_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19718 return signal_connect_data!()(&this, cast(char*)"cycle-handle-focus",
19719 cast(GObject2.Callback)cb, data, null, cf);
19722 // VERSION: 2.0
19723 // The ::move-handle signal is a
19724 // <link linkend="keybinding-signals">keybinding signal</link>
19725 // which gets emitted to move the handle when the user is using key bindings
19726 // to move it.
19727 // <scroll_type>: a #GtkScrollType
19728 extern (C) alias static c_int function (Paned* this_, ScrollType* scroll_type, void* user_data=null) signal_move_handle;
19729 ulong signal_connect(string name:"move-handle", CB:signal_move_handle)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19730 return signal_connect_data!()(&this, cast(char*)"move-handle",
19731 cast(GObject2.Callback)cb, data, null, cf);
19734 // VERSION: 2.0
19735 // The ::toggle-handle-focus is a
19736 // <link linkend="keybinding-signals">keybinding signal</link>
19737 // which gets emitted to accept the current position of the handle and then
19738 // move focus to the next widget in the focus chain.
19739 // The default binding is Tab.
19740 extern (C) alias static c_int function (Paned* this_, void* user_data=null) signal_toggle_handle_focus;
19741 ulong signal_connect(string name:"toggle-handle-focus", CB:signal_toggle_handle_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
19742 return signal_connect_data!()(&this, cast(char*)"toggle-handle-focus",
19743 cast(GObject2.Callback)cb, data, null, cf);
19747 struct PanedClass {
19748 ContainerClass parent_class;
19749 extern (C) int function (Paned* paned, int reverse) cycle_child_focus;
19750 extern (C) int function (Paned* paned) toggle_handle_focus;
19751 extern (C) int function (Paned* paned, ScrollType scroll) move_handle;
19752 extern (C) int function (Paned* paned, int reverse) cycle_handle_focus;
19753 extern (C) int function (Paned* paned) accept_position;
19754 extern (C) int function (Paned* paned) cancel_position;
19755 extern (C) void function () _gtk_reserved1;
19756 extern (C) void function () _gtk_reserved2;
19757 extern (C) void function () _gtk_reserved3;
19758 extern (C) void function () _gtk_reserved4;
19761 struct PanedPrivate {
19764 struct PaperSize {
19766 // VERSION: 2.10
19767 // Creates a new #GtkPaperSize object by parsing a
19768 // <ulink url="ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf">PWG 5101.1-2002</ulink>
19769 // paper name.
19770 // If @name is %NULL, the default paper size is returned,
19771 // see gtk_paper_size_get_default().
19772 // to free it
19773 // RETURNS: a new #GtkPaperSize, use gtk_paper_size_free()
19774 // <name>: a paper size name, or %NULL
19775 static PaperSize* /*new*/ new_()(char* name=null) {
19776 return gtk_paper_size_new(name);
19779 // VERSION: 2.10
19780 // Creates a new #GtkPaperSize object with the
19781 // given parameters.
19782 // to free it
19783 // RETURNS: a new #GtkPaperSize object, use gtk_paper_size_free()
19784 // <name>: the paper name
19785 // <display_name>: the human-readable name
19786 // <width>: the paper width, in units of @unit
19787 // <height>: the paper height, in units of @unit
19788 // <unit>: the unit for @width and @height
19789 static PaperSize* /*new*/ new_custom()(char* name, char* display_name, double width, double height, Unit unit) {
19790 return gtk_paper_size_new_custom(name, display_name, width, height, unit);
19793 // VERSION: 2.12
19794 // Reads a paper size from the group @group_name in the key file
19795 // paper size, or %NULL if an error occurred.
19796 // RETURNS: a new #GtkPaperSize object with the restored
19797 // <key_file>: the #GKeyFile to retrieve the papersize from
19798 // <group_name>: the name ofthe group in the key file to read, or %NULL to read the first group
19799 static PaperSize* /*new*/ new_from_key_file()(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
19800 return gtk_paper_size_new_from_key_file(key_file, group_name, error);
19803 // VERSION: 2.10
19804 // Creates a new #GtkPaperSize object by using
19805 // PPD information.
19806 // If @ppd_name is not a recognized PPD paper name,
19807 // construct a custom #GtkPaperSize object.
19808 // to free it
19809 // RETURNS: a new #GtkPaperSize, use gtk_paper_size_free()
19810 // <ppd_name>: a PPD paper name
19811 // <ppd_display_name>: the corresponding human-readable name
19812 // <width>: the paper width, in points
19813 // <height>: the paper height in points
19814 static PaperSize* /*new*/ new_from_ppd()(char* ppd_name, char* ppd_display_name, double width, double height) {
19815 return gtk_paper_size_new_from_ppd(ppd_name, ppd_display_name, width, height);
19818 // VERSION: 2.10
19819 // Copies an existing #GtkPaperSize.
19820 // RETURNS: a copy of @other
19821 PaperSize* /*new*/ copy()() {
19822 return gtk_paper_size_copy(&this);
19825 // VERSION: 2.10
19826 // Free the given #GtkPaperSize object.
19827 void free()() {
19828 gtk_paper_size_free(&this);
19831 // VERSION: 2.10
19832 // Gets the default bottom margin for the #GtkPaperSize.
19833 // RETURNS: the default bottom margin
19834 // <unit>: the unit for the return value
19835 double get_default_bottom_margin()(Unit unit) {
19836 return gtk_paper_size_get_default_bottom_margin(&this, unit);
19839 // VERSION: 2.10
19840 // Gets the default left margin for the #GtkPaperSize.
19841 // RETURNS: the default left margin
19842 // <unit>: the unit for the return value
19843 double get_default_left_margin()(Unit unit) {
19844 return gtk_paper_size_get_default_left_margin(&this, unit);
19847 // VERSION: 2.10
19848 // Gets the default right margin for the #GtkPaperSize.
19849 // RETURNS: the default right margin
19850 // <unit>: the unit for the return value
19851 double get_default_right_margin()(Unit unit) {
19852 return gtk_paper_size_get_default_right_margin(&this, unit);
19855 // VERSION: 2.10
19856 // Gets the default top margin for the #GtkPaperSize.
19857 // RETURNS: the default top margin
19858 // <unit>: the unit for the return value
19859 double get_default_top_margin()(Unit unit) {
19860 return gtk_paper_size_get_default_top_margin(&this, unit);
19863 // VERSION: 2.10
19864 // Gets the human-readable name of the #GtkPaperSize.
19865 // RETURNS: the human-readable name of @size
19866 char* get_display_name()() {
19867 return gtk_paper_size_get_display_name(&this);
19870 // VERSION: 2.10
19871 // Gets the paper height of the #GtkPaperSize, in
19872 // units of @unit.
19873 // RETURNS: the paper height
19874 // <unit>: the unit for the return value
19875 double get_height()(Unit unit) {
19876 return gtk_paper_size_get_height(&this, unit);
19879 // VERSION: 2.10
19880 // Gets the name of the #GtkPaperSize.
19881 // RETURNS: the name of @size
19882 char* get_name()() {
19883 return gtk_paper_size_get_name(&this);
19886 // VERSION: 2.10
19887 // Gets the PPD name of the #GtkPaperSize, which
19888 // may be %NULL.
19889 // RETURNS: the PPD name of @size
19890 char* get_ppd_name()() {
19891 return gtk_paper_size_get_ppd_name(&this);
19894 // VERSION: 2.10
19895 // Gets the paper width of the #GtkPaperSize, in
19896 // units of @unit.
19897 // RETURNS: the paper width
19898 // <unit>: the unit for the return value
19899 double get_width()(Unit unit) {
19900 return gtk_paper_size_get_width(&this, unit);
19903 // Returns %TRUE if @size is not a standard paper size.
19904 // RETURNS: whether @size is a custom paper size.
19905 int is_custom()() {
19906 return gtk_paper_size_is_custom(&this);
19909 // VERSION: 2.10
19910 // Compares two #GtkPaperSize objects.
19911 // represent the same paper size
19912 // RETURNS: %TRUE, if @size1 and @size2
19913 // <size2>: another #GtkPaperSize object
19914 int is_equal()(PaperSize* size2) {
19915 return gtk_paper_size_is_equal(&this, size2);
19918 // VERSION: 2.10
19919 // Changes the dimensions of a @size to @width x @height.
19920 // <width>: the new width in units of @unit
19921 // <height>: the new height in units of @unit
19922 // <unit>: the unit for @width and @height
19923 void set_size()(double width, double height, Unit unit) {
19924 gtk_paper_size_set_size(&this, width, height, unit);
19927 // VERSION: 2.12
19928 // This function adds the paper size from @size to @key_file.
19929 // <key_file>: the #GKeyFile to save the paper size to
19930 // <group_name>: the group to add the settings to in @key_file
19931 void to_key_file()(GLib2.KeyFile* key_file, char* group_name) {
19932 gtk_paper_size_to_key_file(&this, key_file, group_name);
19936 enum PathPriorityType {
19937 LOWEST = 0,
19938 GTK = 4,
19939 APPLICATION = 8,
19940 THEME = 10,
19941 RC = 12,
19942 HIGHEST = 15
19944 enum PathType {
19945 WIDGET = 0,
19946 WIDGET_CLASS = 1,
19947 CLASS = 2
19949 struct Pixmap /* : Misc */ {
19950 mixin Atk.ImplementorIface.__interface__;
19951 mixin Buildable.__interface__;
19952 alias misc this;
19953 alias misc super_;
19954 Misc misc;
19955 Gdk2.Pixmap* pixmap;
19956 Gdk2.Bitmap* mask;
19957 Gdk2.Pixmap* pixmap_insensitive;
19958 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
19959 uint, "build_insensitive", 1,
19960 uint, "__dummy32A", 31));
19962 static Pixmap* new_()(Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
19963 return gtk_pixmap_new(pixmap, mask);
19965 void get()(Gdk2.Pixmap** val, Gdk2.Bitmap** mask) {
19966 gtk_pixmap_get(&this, val, mask);
19968 void set()(Gdk2.Pixmap* val, Gdk2.Bitmap* mask) {
19969 gtk_pixmap_set(&this, val, mask);
19971 void set_build_insensitive()(int build) {
19972 gtk_pixmap_set_build_insensitive(&this, build);
19976 struct PixmapClass {
19977 MiscClass parent_class;
19981 // Together with #GtkSocket, #GtkPlug provides the ability
19982 // to embed widgets from one process into another process
19983 // in a fashion that is transparent to the user. One
19984 // process creates a #GtkSocket widget and passes the
19985 // ID of that widget's window to the other process,
19986 // which then creates a #GtkPlug with that window ID.
19987 // Any widgets contained in the #GtkPlug then will appear
19988 // inside the first application's window.
19989 // <note>
19990 // The #GtkPlug and #GtkSocket widgets are currently not available
19991 // on all platforms supported by GTK+.
19992 // </note>
19993 struct Plug /* : Window */ {
19994 mixin Atk.ImplementorIface.__interface__;
19995 mixin Buildable.__interface__;
19996 alias window this;
19997 alias window super_;
19998 Window window;
19999 Gdk2.Window* socket_window;
20000 Widget* modality_window;
20001 WindowGroup* modality_group;
20002 GLib2.HashTable* grabbed_keys;
20003 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
20004 uint, "same_app", 1,
20005 uint, "__dummy32A", 31));
20008 // Creates a new plug widget inside the #GtkSocket identified
20009 // by @socket_id. If @socket_id is 0, the plug is left "unplugged" and
20010 // can later be plugged into a #GtkSocket by gtk_socket_add_id().
20011 // RETURNS: the new #GtkPlug widget.
20012 // <socket_id>: the window ID of the socket, or 0.
20013 static Plug* new_()(Gdk2.NativeWindow socket_id) {
20014 return gtk_plug_new(socket_id);
20017 // VERSION: 2.2
20018 // Create a new plug widget inside the #GtkSocket identified by socket_id.
20019 // RETURNS: the new #GtkPlug widget.
20020 // <display>: the #GdkDisplay on which @socket_id is displayed
20021 // <socket_id>: the XID of the socket's window.
20022 static Plug* new_for_display()(Gdk2.Display* display, Gdk2.NativeWindow socket_id) {
20023 return gtk_plug_new_for_display(display, socket_id);
20026 // Finish the initialization of @plug for a given #GtkSocket identified by
20027 // <socket_id>: the XID of the socket's window.
20028 void construct()(Gdk2.NativeWindow socket_id) {
20029 gtk_plug_construct(&this, socket_id);
20032 // VERSION: 2.2
20033 // Finish the initialization of @plug for a given #GtkSocket identified by
20034 // This function will generally only be used by classes deriving from #GtkPlug.
20035 // <display>: the #GdkDisplay associated with @socket_id's #GtkSocket.
20036 // <socket_id>: the XID of the socket's window.
20037 void construct_for_display()(Gdk2.Display* display, Gdk2.NativeWindow socket_id) {
20038 gtk_plug_construct_for_display(&this, display, socket_id);
20041 // VERSION: 2.14
20042 // Determines whether the plug is embedded in a socket.
20043 // RETURNS: %TRUE if the plug is embedded in a socket
20044 int get_embedded()() {
20045 return gtk_plug_get_embedded(&this);
20048 // Gets the window ID of a #GtkPlug widget, which can then
20049 // be used to embed this window inside another window, for
20050 // instance with gtk_socket_add_id().
20051 // RETURNS: the window ID for the plug
20052 Gdk2.NativeWindow get_id()() {
20053 return gtk_plug_get_id(&this);
20056 // VERSION: 2.14
20057 // Retrieves the socket the plug is embedded in.
20058 // RETURNS: the window of the socket, or %NULL
20059 Gdk2.Window* get_socket_window()() {
20060 return gtk_plug_get_socket_window(&this);
20062 // Gets emitted when the plug becomes embedded in a socket.
20063 extern (C) alias static void function (Plug* this_, void* user_data=null) signal_embedded;
20065 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20066 return super_.signal_connect!name(cb, data, cf);
20069 ulong signal_connect(string name:"embedded", CB:signal_embedded)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20070 return signal_connect_data!()(&this, cast(char*)"embedded",
20071 cast(GObject2.Callback)cb, data, null, cf);
20075 struct PlugClass {
20076 WindowClass parent_class;
20077 extern (C) void function (Plug* plug) embedded;
20078 extern (C) void function () _gtk_reserved1;
20079 extern (C) void function () _gtk_reserved2;
20080 extern (C) void function () _gtk_reserved3;
20081 extern (C) void function () _gtk_reserved4;
20084 enum PolicyType {
20085 ALWAYS = 0,
20086 AUTOMATIC = 1,
20087 NEVER = 2
20089 enum PositionType {
20090 LEFT = 0,
20091 RIGHT = 1,
20092 TOP = 2,
20093 BOTTOM = 3
20095 struct Preview /* : Widget */ {
20096 mixin Atk.ImplementorIface.__interface__;
20097 mixin Buildable.__interface__;
20098 alias widget this;
20099 alias widget super_;
20100 Widget widget;
20101 ubyte* buffer;
20102 ushort buffer_width, buffer_height, bpp, rowstride;
20103 Gdk2.RgbDither dither;
20104 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
20105 uint, "type", 1,
20106 uint, "expand", 1,
20107 uint, "__dummy32A", 30));
20109 static Preview* new_()(PreviewType type) {
20110 return gtk_preview_new(type);
20112 // Unintrospectable function: get_cmap() / gtk_preview_get_cmap()
20113 static Gdk2.Colormap* get_cmap()() {
20114 return gtk_preview_get_cmap();
20116 // Unintrospectable function: get_info() / gtk_preview_get_info()
20117 static PreviewInfo* get_info()() {
20118 return gtk_preview_get_info();
20120 // Unintrospectable function: get_visual() / gtk_preview_get_visual()
20121 static Gdk2.Visual* get_visual()() {
20122 return gtk_preview_get_visual();
20124 static void reset()() {
20125 gtk_preview_reset();
20127 static void set_color_cube()(uint nred_shades, uint ngreen_shades, uint nblue_shades, uint ngray_shades) {
20128 gtk_preview_set_color_cube(nred_shades, ngreen_shades, nblue_shades, ngray_shades);
20130 static void set_gamma()(double gamma_) {
20131 gtk_preview_set_gamma(gamma_);
20133 static void set_install_cmap()(int install_cmap) {
20134 gtk_preview_set_install_cmap(install_cmap);
20136 static void set_reserved()(int nreserved) {
20137 gtk_preview_set_reserved(nreserved);
20139 static void uninit()() {
20140 gtk_preview_uninit();
20142 void draw_row()(ubyte* data, int x, int y, int w) {
20143 gtk_preview_draw_row(&this, data, x, y, w);
20145 void put()(Gdk2.Window* window, Gdk2.GC* gc, int srcx, int srcy, int destx, int desty, int width, int height) {
20146 gtk_preview_put(&this, window, gc, srcx, srcy, destx, desty, width, height);
20148 void set_dither()(Gdk2.RgbDither dither) {
20149 gtk_preview_set_dither(&this, dither);
20151 void set_expand()(int expand) {
20152 gtk_preview_set_expand(&this, expand);
20154 void size()(int width, int height) {
20155 gtk_preview_size(&this, width, height);
20159 struct PreviewClass {
20160 WidgetClass parent_class;
20161 PreviewInfo info;
20164 struct PreviewInfo {
20165 ubyte* lookup;
20166 double gamma;
20169 enum PreviewType {
20170 COLOR = 0,
20171 GRAYSCALE = 1
20173 struct PrintContext /* : GObject.Object */ {
20174 alias method_parent this;
20175 alias method_parent super_;
20176 alias method_parent object;
20177 GObject2.Object method_parent;
20180 // VERSION: 2.10
20181 // Creates a new #PangoContext that can be used with the
20182 // #GtkPrintContext.
20183 // RETURNS: a new Pango context for @context
20184 Pango.Context* /*new*/ create_pango_context()() {
20185 return gtk_print_context_create_pango_context(&this);
20188 // VERSION: 2.10
20189 // Creates a new #PangoLayout that is suitable for use
20190 // with the #GtkPrintContext.
20191 // RETURNS: a new Pango layout for @context
20192 Pango.Layout* /*new*/ create_pango_layout()() {
20193 return gtk_print_context_create_pango_layout(&this);
20196 // VERSION: 2.10
20197 // Obtains the cairo context that is associated with the
20198 // #GtkPrintContext.
20199 // RETURNS: the cairo context of @context
20200 cairo.Context* get_cairo_context()() {
20201 return gtk_print_context_get_cairo_context(&this);
20204 // VERSION: 2.10
20205 // Obtains the horizontal resolution of the #GtkPrintContext,
20206 // in dots per inch.
20207 // RETURNS: the horizontal resolution of @context
20208 double get_dpi_x()() {
20209 return gtk_print_context_get_dpi_x(&this);
20212 // VERSION: 2.10
20213 // Obtains the vertical resolution of the #GtkPrintContext,
20214 // in dots per inch.
20215 // RETURNS: the vertical resolution of @context
20216 double get_dpi_y()() {
20217 return gtk_print_context_get_dpi_y(&this);
20220 // VERSION: 2.20
20221 // Obtains the hardware printer margins of the #GtkPrintContext, in units.
20222 // RETURNS: %TRUE if the hard margins were retrieved
20223 // <top>: top hardware printer margin
20224 // <bottom>: bottom hardware printer margin
20225 // <left>: left hardware printer margin
20226 // <right>: right hardware printer margin
20227 int get_hard_margins()(/*out*/ double* top, /*out*/ double* bottom, /*out*/ double* left, /*out*/ double* right) {
20228 return gtk_print_context_get_hard_margins(&this, top, bottom, left, right);
20231 // VERSION: 2.10
20232 // Obtains the height of the #GtkPrintContext, in pixels.
20233 // RETURNS: the height of @context
20234 double get_height()() {
20235 return gtk_print_context_get_height(&this);
20238 // VERSION: 2.10
20239 // Obtains the #GtkPageSetup that determines the page
20240 // dimensions of the #GtkPrintContext.
20241 // RETURNS: the page setup of @context
20242 PageSetup* get_page_setup()() {
20243 return gtk_print_context_get_page_setup(&this);
20246 // VERSION: 2.10
20247 // Returns a #PangoFontMap that is suitable for use
20248 // with the #GtkPrintContext.
20249 // RETURNS: the font map of @context
20250 Pango.FontMap* get_pango_fontmap()() {
20251 return gtk_print_context_get_pango_fontmap(&this);
20254 // VERSION: 2.10
20255 // Obtains the width of the #GtkPrintContext, in pixels.
20256 // RETURNS: the width of @context
20257 double get_width()() {
20258 return gtk_print_context_get_width(&this);
20261 // VERSION: 2.10
20262 // Sets a new cairo context on a print context.
20263 // This function is intended to be used when implementing
20264 // an internal print preview, it is not needed for printing,
20265 // since GTK+ itself creates a suitable cairo context in that
20266 // case.
20267 // <cr>: the cairo context
20268 // <dpi_x>: the horizontal resolution to use with @cr
20269 // <dpi_y>: the vertical resolution to use with @cr
20270 void set_cairo_context()(cairo.Context* cr, double dpi_x, double dpi_y) {
20271 gtk_print_context_set_cairo_context(&this, cr, dpi_x, dpi_y);
20275 enum PrintDuplex {
20276 SIMPLEX = 0,
20277 HORIZONTAL = 1,
20278 VERTICAL = 2
20280 enum PrintError {
20281 GENERAL = 0,
20282 INTERNAL_ERROR = 1,
20283 NOMEM = 2,
20284 INVALID_FILE = 3
20286 extern (C) alias void function (void* func_data, char* str) PrintFunc;
20288 struct PrintOperation /* : GObject.Object */ {
20289 mixin PrintOperationPreview.__interface__;
20290 alias parent_instance this;
20291 alias parent_instance super_;
20292 alias parent_instance object;
20293 GObject2.Object parent_instance;
20294 PrintOperationPrivate* priv;
20297 // VERSION: 2.10
20298 // Creates a new #GtkPrintOperation.
20299 // RETURNS: a new #GtkPrintOperation
20300 static PrintOperation* /*new*/ new_()() {
20301 return gtk_print_operation_new();
20304 // VERSION: 2.10
20305 // Cancels a running print operation. This function may
20306 // be called from a #GtkPrintOperation::begin-print,
20307 // #GtkPrintOperation::paginate or #GtkPrintOperation::draw-page
20308 // signal handler to stop the currently running print
20309 // operation.
20310 void cancel()() {
20311 gtk_print_operation_cancel(&this);
20314 // VERSION: 2.16
20315 // Signalize that drawing of particular page is complete.
20316 // It is called after completion of page drawing (e.g. drawing in another
20317 // thread).
20318 // If gtk_print_operation_set_defer_drawing() was called before, then this function
20319 // has to be called by application. In another case it is called by the library
20320 // itself.
20321 void draw_page_finish()() {
20322 gtk_print_operation_draw_page_finish(&this);
20325 // VERSION: 2.10
20326 // Returns the default page setup, see
20327 // gtk_print_operation_set_default_page_setup().
20328 // RETURNS: the default page setup
20329 PageSetup* get_default_page_setup()() {
20330 return gtk_print_operation_get_default_page_setup(&this);
20333 // VERSION: 2.18
20334 // Gets the value of #GtkPrintOperation::embed-page-setup property.
20335 // RETURNS: whether page setup selection combos are embedded
20336 int get_embed_page_setup()() {
20337 return gtk_print_operation_get_embed_page_setup(&this);
20340 // VERSION: 2.10
20341 // Call this when the result of a print operation is
20342 // %GTK_PRINT_OPERATION_RESULT_ERROR, either as returned by
20343 // gtk_print_operation_run(), or in the #GtkPrintOperation::done signal
20344 // handler. The returned #GError will contain more details on what went wrong.
20345 void get_error()(GLib2.Error** error=null) {
20346 gtk_print_operation_get_error(&this, error);
20349 // VERSION: 2.18
20350 // Gets the value of #GtkPrintOperation::has-selection property.
20351 // RETURNS: whether there is a selection
20352 int get_has_selection()() {
20353 return gtk_print_operation_get_has_selection(&this);
20356 // VERSION: 2.18
20357 // Returns the number of pages that will be printed.
20358 // Note that this value is set during print preparation phase
20359 // (%GTK_PRINT_STATUS_PREPARING), so this function should never be
20360 // called before the data generation phase (%GTK_PRINT_STATUS_GENERATING_DATA).
20361 // You can connect to the #GtkPrintOperation::status-changed signal
20362 // and call gtk_print_operation_get_n_pages_to_print() when
20363 // print status is %GTK_PRINT_STATUS_GENERATING_DATA.
20364 // This is typically used to track the progress of print operation.
20365 // RETURNS: the number of pages that will be printed
20366 int get_n_pages_to_print()() {
20367 return gtk_print_operation_get_n_pages_to_print(&this);
20370 // VERSION: 2.10
20371 // Returns the current print settings.
20372 // Note that the return value is %NULL until either
20373 // gtk_print_operation_set_print_settings() or
20374 // gtk_print_operation_run() have been called.
20375 // RETURNS: the current print settings of @op.
20376 PrintSettings* get_print_settings()() {
20377 return gtk_print_operation_get_print_settings(&this);
20380 // VERSION: 2.10
20381 // Returns the status of the print operation.
20382 // Also see gtk_print_operation_get_status_string().
20383 // RETURNS: the status of the print operation
20384 PrintStatus get_status()() {
20385 return gtk_print_operation_get_status(&this);
20388 // VERSION: 2.10
20389 // Returns a string representation of the status of the
20390 // print operation. The string is translated and suitable
20391 // for displaying the print status e.g. in a #GtkStatusbar.
20392 // Use gtk_print_operation_get_status() to obtain a status
20393 // value that is suitable for programmatic use.
20394 // of the print operation
20395 // RETURNS: a string representation of the status
20396 char* get_status_string()() {
20397 return gtk_print_operation_get_status_string(&this);
20400 // VERSION: 2.18
20401 // Gets the value of #GtkPrintOperation::support-selection property.
20402 // RETURNS: whether the application supports print of selection
20403 int get_support_selection()() {
20404 return gtk_print_operation_get_support_selection(&this);
20407 // VERSION: 2.10
20408 // A convenience function to find out if the print operation
20409 // is finished, either successfully (%GTK_PRINT_STATUS_FINISHED)
20410 // or unsuccessfully (%GTK_PRINT_STATUS_FINISHED_ABORTED).
20411 // can be in a non-finished state even after done has been called, as
20412 // the operation status then tracks the print job status on the printer.
20413 // RETURNS: %TRUE, if the print operation is finished.
20414 int is_finished()() {
20415 return gtk_print_operation_is_finished(&this);
20418 // VERSION: 2.10
20419 // Runs the print operation, by first letting the user modify
20420 // print settings in the print dialog, and then print the document.
20421 // Normally that this function does not return until the rendering of all
20422 // pages is complete. You can connect to the
20423 // #GtkPrintOperation::status-changed signal on @op to obtain some
20424 // information about the progress of the print operation.
20425 // Furthermore, it may use a recursive mainloop to show the print dialog.
20426 // If you call gtk_print_operation_set_allow_async() or set the
20427 // #GtkPrintOperation:allow-async property the operation will run
20428 // asynchronously if this is supported on the platform. The
20429 // #GtkPrintOperation::done signal will be emitted with the result of the
20430 // operation when the it is done (i.e. when the dialog is canceled, or when
20431 // the print succeeds or fails).
20432 // |[
20433 // if (settings != NULL)
20434 // gtk_print_operation_set_print_settings (print, settings);
20435 // if (page_setup != NULL)
20436 // gtk_print_operation_set_default_page_setup (print, page_setup);
20437 // g_signal_connect (print, "begin-print",
20438 // G_CALLBACK (begin_print), &data);
20439 // g_signal_connect (print, "draw-page",
20440 // G_CALLBACK (draw_page), &data);
20441 // res = gtk_print_operation_run (print,
20442 // GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
20443 // parent,
20444 // &error);
20445 // if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
20446 // {
20447 // error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
20448 // GTK_DIALOG_DESTROY_WITH_PARENT,
20449 // GTK_MESSAGE_ERROR,
20450 // GTK_BUTTONS_CLOSE,
20451 // "Error printing file:\n%s",
20452 // error->message);
20453 // g_signal_connect (error_dialog, "response",
20454 // G_CALLBACK (gtk_widget_destroy), NULL);
20455 // gtk_widget_show (error_dialog);
20456 // g_error_free (error);
20457 // }
20458 // else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
20459 // {
20460 // if (settings != NULL)
20461 // g_object_unref (settings);
20462 // settings = g_object_ref (gtk_print_operation_get_print_settings (print));
20463 // }
20464 // ]|
20465 // Note that gtk_print_operation_run() can only be called once on a
20466 // given #GtkPrintOperation.
20467 // %GTK_PRINT_OPERATION_RESULT_APPLY indicates that the printing was
20468 // completed successfully. In this case, it is a good idea to obtain
20469 // the used print settings with gtk_print_operation_get_print_settings()
20470 // and store them for reuse with the next print operation. A value of
20471 // %GTK_PRINT_OPERATION_RESULT_IN_PROGRESS means the operation is running
20472 // asynchronously, and will emit the #GtkPrintOperation::done signal when
20473 // done.
20474 // RETURNS: the result of the print operation. A return value of
20475 // <action>: the action to start
20476 // <parent>: Transient parent of the dialog
20477 PrintOperationResult run()(PrintOperationAction action, Window* parent, GLib2.Error** error=null) {
20478 return gtk_print_operation_run(&this, action, parent, error);
20481 // VERSION: 2.10
20482 // Sets whether the gtk_print_operation_run() may return
20483 // before the print operation is completed. Note that
20484 // some platforms may not allow asynchronous operation.
20485 // <allow_async>: %TRUE to allow asynchronous operation
20486 void set_allow_async()(int allow_async) {
20487 gtk_print_operation_set_allow_async(&this, allow_async);
20490 // VERSION: 2.10
20491 // Sets the current page.
20492 // If this is called before gtk_print_operation_run(),
20493 // the user will be able to select to print only the current page.
20494 // Note that this only makes sense for pre-paginated documents.
20495 // <current_page>: the current page, 0-based
20496 void set_current_page()(int current_page) {
20497 gtk_print_operation_set_current_page(&this, current_page);
20500 // VERSION: 2.10
20501 // Sets the label for the tab holding custom widgets.
20502 // <label>: the label to use, or %NULL to use the default label
20503 void set_custom_tab_label()(char* label=null) {
20504 gtk_print_operation_set_custom_tab_label(&this, label);
20507 // VERSION: 2.10
20508 // Makes @default_page_setup the default page setup for @op.
20509 // This page setup will be used by gtk_print_operation_run(),
20510 // but it can be overridden on a per-page basis by connecting
20511 // to the #GtkPrintOperation::request-page-setup signal.
20512 // <default_page_setup>: a #GtkPageSetup, or %NULL
20513 void set_default_page_setup()(PageSetup* default_page_setup=null) {
20514 gtk_print_operation_set_default_page_setup(&this, default_page_setup);
20517 // VERSION: 2.16
20518 // Sets up the #GtkPrintOperation to wait for calling of
20519 // gtk_print_operation_draw_page_finish() from application. It can
20520 // be used for drawing page in another thread.
20521 // This function must be called in the callback of "draw-page" signal.
20522 void set_defer_drawing()() {
20523 gtk_print_operation_set_defer_drawing(&this);
20526 // VERSION: 2.18
20527 // Embed page size combo box and orientation combo box into page setup page.
20528 // Selected page setup is stored as default page setup in #GtkPrintOperation.
20529 // <embed>: %TRUE to embed page setup selection in the #GtkPrintDialog
20530 void set_embed_page_setup()(int embed) {
20531 gtk_print_operation_set_embed_page_setup(&this, embed);
20534 // VERSION: 2.10
20535 // Sets up the #GtkPrintOperation to generate a file instead
20536 // of showing the print dialog. The indended use of this function
20537 // is for implementing "Export to PDF" actions. Currently, PDF
20538 // is the only supported format.
20539 // "Print to PDF" support is independent of this and is done
20540 // by letting the user pick the "Print to PDF" item from the list
20541 // of printers in the print dialog.
20542 // <filename>: the filename for the exported file
20543 void set_export_filename()(char* filename) {
20544 gtk_print_operation_set_export_filename(&this, filename);
20547 // VERSION: 2.18
20548 // Sets whether there is a selection to print.
20549 // Application has to set number of pages to which the selection
20550 // will draw by gtk_print_operation_set_n_pages() in a callback of
20551 // #GtkPrintOperation::begin-print.
20552 // <has_selection>: %TRUE indicates that a selection exists
20553 void set_has_selection()(int has_selection) {
20554 gtk_print_operation_set_has_selection(&this, has_selection);
20557 // VERSION: 2.10
20558 // Sets the name of the print job. The name is used to identify
20559 // the job (e.g. in monitoring applications like eggcups).
20560 // If you don't set a job name, GTK+ picks a default one by
20561 // numbering successive print jobs.
20562 // <job_name>: a string that identifies the print job
20563 void set_job_name()(char* job_name) {
20564 gtk_print_operation_set_job_name(&this, job_name);
20567 // VERSION: 2.10
20568 // Sets the number of pages in the document.
20569 // This <emphasis>must</emphasis> be set to a positive number
20570 // before the rendering starts. It may be set in a
20571 // #GtkPrintOperation::begin-print signal hander.
20572 // Note that the page numbers passed to the
20573 // #GtkPrintOperation::request-page-setup
20574 // and #GtkPrintOperation::draw-page signals are 0-based, i.e. if
20575 // the user chooses to print all pages, the last ::draw-page signal
20576 // will be for page @n_pages - 1.
20577 // <n_pages>: the number of pages
20578 void set_n_pages()(int n_pages) {
20579 gtk_print_operation_set_n_pages(&this, n_pages);
20582 // VERSION: 2.10
20583 // Sets the print settings for @op. This is typically used to
20584 // re-establish print settings from a previous print operation,
20585 // see gtk_print_operation_run().
20586 // <print_settings>: #GtkPrintSettings
20587 void set_print_settings()(PrintSettings* print_settings=null) {
20588 gtk_print_operation_set_print_settings(&this, print_settings);
20591 // VERSION: 2.10
20592 // If @show_progress is %TRUE, the print operation will show a
20593 // progress dialog during the print operation.
20594 // <show_progress>: %TRUE to show a progress dialog
20595 void set_show_progress()(int show_progress) {
20596 gtk_print_operation_set_show_progress(&this, show_progress);
20599 // VERSION: 2.18
20600 // Sets whether selection is supported by #GtkPrintOperation.
20601 // <support_selection>: %TRUE to support selection
20602 void set_support_selection()(int support_selection) {
20603 gtk_print_operation_set_support_selection(&this, support_selection);
20606 // VERSION: 2.10
20607 // If track_status is %TRUE, the print operation will try to continue report
20608 // on the status of the print job in the printer queues and printer. This
20609 // can allow your application to show things like "out of paper" issues,
20610 // and when the print job actually reaches the printer.
20611 // This function is often implemented using some form of polling, so it should
20612 // not be enabled unless needed.
20613 // <track_status>: %TRUE to track status after printing
20614 void set_track_print_status()(int track_status) {
20615 gtk_print_operation_set_track_print_status(&this, track_status);
20618 // VERSION: 2.10
20619 // Sets up the transformation for the cairo context obtained from
20620 // #GtkPrintContext in such a way that distances are measured in
20621 // units of @unit.
20622 // <unit>: the unit to use
20623 void set_unit()(Unit unit) {
20624 gtk_print_operation_set_unit(&this, unit);
20627 // VERSION: 2.10
20628 // If @full_page is %TRUE, the transformation for the cairo context
20629 // obtained from #GtkPrintContext puts the origin at the top left
20630 // corner of the page (which may not be the top left corner of the
20631 // sheet, depending on page orientation and the number of pages per
20632 // sheet). Otherwise, the origin is at the top left corner of the
20633 // imageable area (i.e. inside the margins).
20634 // <full_page>: %TRUE to set up the #GtkPrintContext for the full page
20635 void set_use_full_page()(int full_page) {
20636 gtk_print_operation_set_use_full_page(&this, full_page);
20639 // VERSION: 2.10
20640 // Emitted after the user has finished changing print settings
20641 // in the dialog, before the actual rendering starts.
20642 // A typical use for ::begin-print is to use the parameters from the
20643 // #GtkPrintContext and paginate the document accordingly, and then
20644 // set the number of pages with gtk_print_operation_set_n_pages().
20645 // <context>: the #GtkPrintContext for the current operation
20646 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, void* user_data=null) signal_begin_print;
20648 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20649 return super_.signal_connect!name(cb, data, cf);
20652 ulong signal_connect(string name:"begin-print", CB:signal_begin_print)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20653 return signal_connect_data!()(&this, cast(char*)"begin-print",
20654 cast(GObject2.Callback)cb, data, null, cf);
20657 // VERSION: 2.10
20658 // Emitted when displaying the print dialog. If you return a
20659 // widget in a handler for this signal it will be added to a custom
20660 // tab in the print dialog. You typically return a container widget
20661 // with multiple widgets in it.
20662 // The print dialog owns the returned widget, and its lifetime is not
20663 // controlled by the application. However, the widget is guaranteed
20664 // to stay around until the #GtkPrintOperation::custom-widget-apply
20665 // signal is emitted on the operation. Then you can read out any
20666 // information you need from the widgets.
20667 // the print dialog, or %NULL
20668 // RETURNS: A custom widget that gets embedded in
20669 extern (C) alias static GObject2.Object* function (PrintOperation* this_, void* user_data=null) signal_create_custom_widget;
20670 ulong signal_connect(string name:"create-custom-widget", CB:signal_create_custom_widget)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20671 return signal_connect_data!()(&this, cast(char*)"create-custom-widget",
20672 cast(GObject2.Callback)cb, data, null, cf);
20675 // VERSION: 2.10
20676 // Emitted right before #GtkPrintOperation::begin-print if you added
20677 // a custom widget in the #GtkPrintOperation::create-custom-widget handler.
20678 // When you get this signal you should read the information from the
20679 // custom widgets, as the widgets are not guaraneed to be around at a
20680 // later time.
20681 // <widget>: the custom widget added in create-custom-widget
20682 extern (C) alias static void function (PrintOperation* this_, Widget* widget, void* user_data=null) signal_custom_widget_apply;
20683 ulong signal_connect(string name:"custom-widget-apply", CB:signal_custom_widget_apply)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20684 return signal_connect_data!()(&this, cast(char*)"custom-widget-apply",
20685 cast(GObject2.Callback)cb, data, null, cf);
20688 // VERSION: 2.10
20689 // Emitted when the print operation run has finished doing
20690 // everything required for printing.
20691 // If @result is %GTK_PRINT_OPERATION_RESULT_ERROR then you can call
20692 // gtk_print_operation_get_error() for more information.
20693 // If you enabled print status tracking then
20694 // gtk_print_operation_is_finished() may still return %FALSE
20695 // after #GtkPrintOperation::done was emitted.
20696 // <result>: the result of the print operation
20697 extern (C) alias static void function (PrintOperation* this_, PrintOperationResult* result, void* user_data=null) signal_done;
20698 ulong signal_connect(string name:"done", CB:signal_done)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20699 return signal_connect_data!()(&this, cast(char*)"done",
20700 cast(GObject2.Callback)cb, data, null, cf);
20703 // VERSION: 2.10
20704 // Emitted for every page that is printed. The signal handler
20705 // must render the @page_nr's page onto the cairo context obtained
20706 // from @context using gtk_print_context_get_cairo_context().
20707 // |[
20708 // static void
20709 // draw_page (GtkPrintOperation *operation,
20710 // GtkPrintContext *context,
20711 // gint page_nr,
20712 // gpointer user_data)
20713 // {
20714 // cairo_t *cr;
20715 // PangoLayout *layout;
20716 // gdouble width, text_height;
20717 // gint layout_height;
20718 // PangoFontDescription *desc;
20719 // cr = gtk_print_context_get_cairo_context (context);
20720 // width = gtk_print_context_get_width (context);
20721 // cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
20722 // cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
20723 // cairo_fill (cr);
20724 // layout = gtk_print_context_create_pango_layout (context);
20725 // desc = pango_font_description_from_string ("sans 14");
20726 // pango_layout_set_font_description (layout, desc);
20727 // pango_font_description_free (desc);
20728 // pango_layout_set_text (layout, "some text", -1);
20729 // pango_layout_set_width (layout, width * PANGO_SCALE);
20730 // pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
20731 // pango_layout_get_size (layout, NULL, &layout_height);
20732 // text_height = (gdouble)layout_height / PANGO_SCALE;
20733 // cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2);
20734 // pango_cairo_show_layout (cr, layout);
20735 // g_object_unref (layout);
20736 // }
20737 // ]|
20738 // Use gtk_print_operation_set_use_full_page() and
20739 // gtk_print_operation_set_unit() before starting the print operation
20740 // to set up the transformation of the cairo context according to your
20741 // needs.
20742 // <context>: the #GtkPrintContext for the current operation
20743 // <page_nr>: the number of the currently printed page (0-based)
20744 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, int page_nr, void* user_data=null) signal_draw_page;
20745 ulong signal_connect(string name:"draw-page", CB:signal_draw_page)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20746 return signal_connect_data!()(&this, cast(char*)"draw-page",
20747 cast(GObject2.Callback)cb, data, null, cf);
20750 // VERSION: 2.10
20751 // Emitted after all pages have been rendered.
20752 // A handler for this signal can clean up any resources that have
20753 // been allocated in the #GtkPrintOperation::begin-print handler.
20754 // <context>: the #GtkPrintContext for the current operation
20755 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, void* user_data=null) signal_end_print;
20756 ulong signal_connect(string name:"end-print", CB:signal_end_print)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20757 return signal_connect_data!()(&this, cast(char*)"end-print",
20758 cast(GObject2.Callback)cb, data, null, cf);
20761 // VERSION: 2.10
20762 // Emitted after the #GtkPrintOperation::begin-print signal, but before
20763 // the actual rendering starts. It keeps getting emitted until a connected
20764 // signal handler returns %TRUE.
20765 // The ::paginate signal is intended to be used for paginating a document
20766 // in small chunks, to avoid blocking the user interface for a long
20767 // time. The signal handler should update the number of pages using
20768 // gtk_print_operation_set_n_pages(), and return %TRUE if the document
20769 // has been completely paginated.
20770 // If you don't need to do pagination in chunks, you can simply do
20771 // it all in the ::begin-print handler, and set the number of pages
20772 // from there.
20773 // RETURNS: %TRUE if pagination is complete
20774 // <context>: the #GtkPrintContext for the current operation
20775 extern (C) alias static c_int function (PrintOperation* this_, PrintContext* context, void* user_data=null) signal_paginate;
20776 ulong signal_connect(string name:"paginate", CB:signal_paginate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20777 return signal_connect_data!()(&this, cast(char*)"paginate",
20778 cast(GObject2.Callback)cb, data, null, cf);
20781 // VERSION: 2.10
20782 // Gets emitted when a preview is requested from the native dialog.
20783 // The default handler for this signal uses an external viewer
20784 // application to preview.
20785 // To implement a custom print preview, an application must return
20786 // %TRUE from its handler for this signal. In order to use the
20787 // provided @context for the preview implementation, it must be
20788 // given a suitable cairo context with gtk_print_context_set_cairo_context().
20789 // The custom preview implementation can use
20790 // gtk_print_operation_preview_is_selected() and
20791 // gtk_print_operation_preview_render_page() to find pages which
20792 // are selected for print and render them. The preview must be
20793 // finished by calling gtk_print_operation_preview_end_preview()
20794 // (typically in response to the user clicking a close button).
20795 // RETURNS: %TRUE if the listener wants to take over control of the preview
20796 // <preview>: the #GtkPrintPreviewOperation for the current operation
20797 // <context>: the #GtkPrintContext that will be used
20798 // <parent>: the #GtkWindow to use as window parent, or %NULL
20799 extern (C) alias static c_int function (PrintOperation* this_, PrintOperationPreview* preview, PrintContext* context, Window* parent=null, void* user_data=null) signal_preview;
20800 ulong signal_connect(string name:"preview", CB:signal_preview)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20801 return signal_connect_data!()(&this, cast(char*)"preview",
20802 cast(GObject2.Callback)cb, data, null, cf);
20805 // VERSION: 2.10
20806 // Emitted once for every page that is printed, to give
20807 // the application a chance to modify the page setup. Any changes
20808 // done to @setup will be in force only for printing this page.
20809 // <context>: the #GtkPrintContext for the current operation
20810 // <page_nr>: the number of the currently printed page (0-based)
20811 // <setup>: the #GtkPageSetup
20812 extern (C) alias static void function (PrintOperation* this_, PrintContext* context, int page_nr, PageSetup* setup, void* user_data=null) signal_request_page_setup;
20813 ulong signal_connect(string name:"request-page-setup", CB:signal_request_page_setup)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20814 return signal_connect_data!()(&this, cast(char*)"request-page-setup",
20815 cast(GObject2.Callback)cb, data, null, cf);
20818 // VERSION: 2.10
20819 // Emitted at between the various phases of the print operation.
20820 // See #GtkPrintStatus for the phases that are being discriminated.
20821 // Use gtk_print_operation_get_status() to find out the current
20822 // status.
20823 extern (C) alias static void function (PrintOperation* this_, void* user_data=null) signal_status_changed;
20824 ulong signal_connect(string name:"status-changed", CB:signal_status_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20825 return signal_connect_data!()(&this, cast(char*)"status-changed",
20826 cast(GObject2.Callback)cb, data, null, cf);
20829 // VERSION: 2.18
20830 // Emitted after change of selected printer. The actual page setup and
20831 // print settings are passed to the custom widget, which can actualize
20832 // itself according to this change.
20833 // <widget>: the custom widget added in create-custom-widget
20834 // <setup>: actual page setup
20835 // <settings>: actual print settings
20836 extern (C) alias static void function (PrintOperation* this_, Widget* widget, PageSetup* setup, PrintSettings* settings, void* user_data=null) signal_update_custom_widget;
20837 ulong signal_connect(string name:"update-custom-widget", CB:signal_update_custom_widget)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20838 return signal_connect_data!()(&this, cast(char*)"update-custom-widget",
20839 cast(GObject2.Callback)cb, data, null, cf);
20843 enum PrintOperationAction {
20844 PRINT_DIALOG = 0,
20845 PRINT = 1,
20846 PREVIEW = 2,
20847 EXPORT = 3
20849 struct PrintOperationClass {
20850 GObject2.ObjectClass parent_class;
20851 extern (C) void function (PrintOperation* operation, PrintOperationResult result) done;
20852 extern (C) void function (PrintOperation* operation, PrintContext* context) begin_print;
20853 extern (C) int function (PrintOperation* operation, PrintContext* context) paginate;
20854 extern (C) void function (PrintOperation* operation, PrintContext* context, int page_nr, PageSetup* setup) request_page_setup;
20855 extern (C) void function (PrintOperation* operation, PrintContext* context, int page_nr) draw_page;
20856 extern (C) void function (PrintOperation* operation, PrintContext* context) end_print;
20857 extern (C) void function (PrintOperation* operation) status_changed;
20858 // Unintrospectable functionp: create_custom_widget() / ()
20859 extern (C) Widget* function (PrintOperation* operation) create_custom_widget;
20860 extern (C) void function (PrintOperation* operation, Widget* widget) custom_widget_apply;
20861 extern (C) int function (PrintOperation* operation, PrintOperationPreview* preview, PrintContext* context, Window* parent) preview;
20862 extern (C) void function (PrintOperation* operation, Widget* widget, PageSetup* setup, PrintSettings* settings) update_custom_widget;
20863 extern (C) void function () _gtk_reserved1;
20864 extern (C) void function () _gtk_reserved2;
20865 extern (C) void function () _gtk_reserved3;
20866 extern (C) void function () _gtk_reserved4;
20867 extern (C) void function () _gtk_reserved5;
20868 extern (C) void function () _gtk_reserved6;
20871 struct PrintOperationPreview /* Interface */ {
20872 mixin template __interface__() {
20873 // VERSION: 2.10
20874 // Ends a preview.
20875 // This function must be called to finish a custom print preview.
20876 void end_preview()() {
20877 gtk_print_operation_preview_end_preview(cast(PrintOperationPreview*)&this);
20880 // VERSION: 2.10
20881 // Returns whether the given page is included in the set of pages that
20882 // have been selected for printing.
20883 // RETURNS: %TRUE if the page has been selected for printing
20884 // <page_nr>: a page number
20885 int is_selected()(int page_nr) {
20886 return gtk_print_operation_preview_is_selected(cast(PrintOperationPreview*)&this, page_nr);
20889 // VERSION: 2.10
20890 // Renders a page to the preview, using the print context that
20891 // was passed to the #GtkPrintOperation::preview handler together
20892 // with @preview.
20893 // A custom iprint preview should use this function in its ::expose
20894 // handler to render the currently selected page.
20895 // Note that this function requires a suitable cairo context to
20896 // be associated with the print context.
20897 // <page_nr>: the page to render
20898 void render_page()(int page_nr) {
20899 gtk_print_operation_preview_render_page(cast(PrintOperationPreview*)&this, page_nr);
20902 // The ::got-page-size signal is emitted once for each page
20903 // that gets rendered to the preview.
20904 // A handler for this signal should update the @context
20905 // according to @page_setup and set up a suitable cairo
20906 // context, using gtk_print_context_set_cairo_context().
20907 // <context>: the current #GtkPrintContext
20908 // <page_setup>: the #GtkPageSetup for the current page
20909 extern (C) alias static void function (PrintOperationPreview* this_, PrintContext* context, PageSetup* page_setup, void* user_data=null) signal_got_page_size;
20911 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20912 return super_.signal_connect!name(cb, data, cf);
20915 ulong signal_connect(string name:"got-page-size", CB:signal_got_page_size)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20916 return signal_connect_data!()(&this, cast(char*)"got-page-size",
20917 cast(GObject2.Callback)cb, data, null, cf);
20920 // The ::ready signal gets emitted once per preview operation,
20921 // before the first page is rendered.
20922 // A handler for this signal can be used for setup tasks.
20923 // <context>: the current #GtkPrintContext
20924 extern (C) alias static void function (PrintOperationPreview* this_, PrintContext* context, void* user_data=null) signal_ready;
20925 ulong signal_connect(string name:"ready", CB:signal_ready)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
20926 return signal_connect_data!()(&this, cast(char*)"ready",
20927 cast(GObject2.Callback)cb, data, null, cf);
20930 mixin __interface__;
20933 struct PrintOperationPreviewIface {
20934 GObject2.TypeInterface g_iface;
20935 extern (C) void function (PrintOperationPreview* preview, PrintContext* context) ready;
20936 extern (C) void function (PrintOperationPreview* preview, PrintContext* context, PageSetup* page_setup) got_page_size;
20937 // <page_nr>: the page to render
20938 extern (C) void function (PrintOperationPreview* preview, int page_nr) render_page;
20940 // RETURNS: %TRUE if the page has been selected for printing
20941 // <page_nr>: a page number
20942 extern (C) int function (PrintOperationPreview* preview, int page_nr) is_selected;
20943 extern (C) void function (PrintOperationPreview* preview) end_preview;
20944 extern (C) void function () _gtk_reserved1;
20945 extern (C) void function () _gtk_reserved2;
20946 extern (C) void function () _gtk_reserved3;
20947 extern (C) void function () _gtk_reserved4;
20948 extern (C) void function () _gtk_reserved5;
20949 extern (C) void function () _gtk_reserved6;
20950 extern (C) void function () _gtk_reserved7;
20953 struct PrintOperationPrivate {
20956 enum PrintOperationResult {
20957 ERROR = 0,
20958 APPLY = 1,
20959 CANCEL = 2,
20960 IN_PROGRESS = 3
20962 enum PrintPages {
20963 ALL = 0,
20964 CURRENT = 1,
20965 RANGES = 2,
20966 SELECTION = 3
20968 enum PrintQuality {
20969 LOW = 0,
20970 NORMAL = 1,
20971 HIGH = 2,
20972 DRAFT = 3
20974 struct PrintSettings /* : GObject.Object */ {
20975 alias method_parent this;
20976 alias method_parent super_;
20977 alias method_parent object;
20978 GObject2.Object method_parent;
20981 // VERSION: 2.10
20982 // Creates a new #GtkPrintSettings object.
20983 // RETURNS: a new #GtkPrintSettings object
20984 static PrintSettings* /*new*/ new_()() {
20985 return gtk_print_settings_new();
20988 // VERSION: 2.12
20989 // Reads the print settings from @file_name. Returns a new #GtkPrintSettings
20990 // object with the restored settings, or %NULL if an error occurred. If the
20991 // file could not be loaded then error is set to either a #GFileError or
20992 // #GKeyFileError. See gtk_print_settings_to_file().
20993 // RETURNS: the restored #GtkPrintSettings
20994 // <file_name>: the filename to read the settings from
20995 static PrintSettings* /*new*/ new_from_file()(char* file_name, GLib2.Error** error=null) {
20996 return gtk_print_settings_new_from_file(file_name, error);
20999 // VERSION: 2.12
21000 // Reads the print settings from the group @group_name in @key_file. Returns a
21001 // new #GtkPrintSettings object with the restored settings, or %NULL if an
21002 // error occurred. If the file could not be loaded then error is set to either
21003 // a #GFileError or #GKeyFileError.
21004 // RETURNS: the restored #GtkPrintSettings
21005 // <key_file>: the #GKeyFile to retrieve the settings from
21006 // <group_name>: the name of the group to use, or %NULL to use the default "Print Settings"
21007 static PrintSettings* /*new*/ new_from_key_file()(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
21008 return gtk_print_settings_new_from_key_file(key_file, group_name, error);
21011 // VERSION: 2.10
21012 // Copies a #GtkPrintSettings object.
21013 // RETURNS: a newly allocated copy of @other
21014 PrintSettings* /*new*/ copy()() {
21015 return gtk_print_settings_copy(&this);
21018 // VERSION: 2.10
21019 // Calls @func for each key-value pair of @settings.
21020 // <func>: the function to call
21021 // <user_data>: user data for @func
21022 void foreach_()(PrintSettingsFunc func, void* user_data) {
21023 gtk_print_settings_foreach(&this, func, user_data);
21026 // VERSION: 2.10
21027 // Looks up the string value associated with @key.
21028 // RETURNS: the string value for @key
21029 // <key>: a key
21030 char* get()(char* key) {
21031 return gtk_print_settings_get(&this, key);
21034 // VERSION: 2.10
21035 // Returns the boolean represented by the value
21036 // that is associated with @key.
21037 // The string "true" represents %TRUE, any other
21038 // string %FALSE.
21039 // RETURNS: %TRUE, if @key maps to a true value.
21040 // <key>: a key
21041 int get_bool()(char* key) {
21042 return gtk_print_settings_get_bool(&this, key);
21045 // VERSION: 2.10
21046 // Gets the value of %GTK_PRINT_SETTINGS_COLLATE.
21047 // RETURNS: whether to collate the printed pages
21048 int get_collate()() {
21049 return gtk_print_settings_get_collate(&this);
21052 // VERSION: 2.10
21053 // Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
21054 // RETURNS: the default source
21055 char* get_default_source()() {
21056 return gtk_print_settings_get_default_source(&this);
21059 // VERSION: 2.10
21060 // Gets the value of %GTK_PRINT_SETTINGS_DITHER.
21061 // RETURNS: the dithering that is used
21062 char* get_dither()() {
21063 return gtk_print_settings_get_dither(&this);
21066 // VERSION: 2.10
21067 // Returns the double value associated with @key, or 0.
21068 // RETURNS: the double value of @key
21069 // <key>: a key
21070 double get_double()(char* key) {
21071 return gtk_print_settings_get_double(&this, key);
21074 // VERSION: 2.10
21075 // Returns the floating point number represented by
21076 // the value that is associated with @key, or @default_val
21077 // if the value does not represent a floating point number.
21078 // Floating point numbers are parsed with g_ascii_strtod().
21079 // RETURNS: the floating point number associated with @key
21080 // <key>: a key
21081 // <def>: the default value
21082 double get_double_with_default()(char* key, double def) {
21083 return gtk_print_settings_get_double_with_default(&this, key, def);
21086 // VERSION: 2.10
21087 // Gets the value of %GTK_PRINT_SETTINGS_DUPLEX.
21088 // RETURNS: whether to print the output in duplex.
21089 PrintDuplex get_duplex()() {
21090 return gtk_print_settings_get_duplex(&this);
21093 // VERSION: 2.10
21094 // Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
21095 // RETURNS: the finishings
21096 char* get_finishings()() {
21097 return gtk_print_settings_get_finishings(&this);
21100 // VERSION: 2.10
21101 // Returns the integer value of @key, or 0.
21102 // RETURNS: the integer value of @key
21103 // <key>: a key
21104 int get_int()(char* key) {
21105 return gtk_print_settings_get_int(&this, key);
21108 // VERSION: 2.10
21109 // Returns the value of @key, interpreted as
21110 // an integer, or the default value.
21111 // RETURNS: the integer value of @key
21112 // <key>: a key
21113 // <def>: the default value
21114 int get_int_with_default()(char* key, int def) {
21115 return gtk_print_settings_get_int_with_default(&this, key, def);
21118 // VERSION: 2.10
21119 // Returns the value associated with @key, interpreted
21120 // as a length. The returned value is converted to @units.
21121 // RETURNS: the length value of @key, converted to @unit
21122 // <key>: a key
21123 // <unit>: the unit of the return value
21124 double get_length()(char* key, Unit unit) {
21125 return gtk_print_settings_get_length(&this, key, unit);
21128 // VERSION: 2.10
21129 // Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
21130 // The set of media types is defined in PWG 5101.1-2002 PWG.
21131 // <!-- FIXME link here -->
21132 // RETURNS: the media type
21133 char* get_media_type()() {
21134 return gtk_print_settings_get_media_type(&this);
21137 // VERSION: 2.10
21138 // Gets the value of %GTK_PRINT_SETTINGS_N_COPIES.
21139 // RETURNS: the number of copies to print
21140 int get_n_copies()() {
21141 return gtk_print_settings_get_n_copies(&this);
21144 // VERSION: 2.10
21145 // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
21146 // RETURNS: the number of pages per sheet
21147 int get_number_up()() {
21148 return gtk_print_settings_get_number_up(&this);
21151 // VERSION: 2.14
21152 // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
21153 // RETURNS: layout of page in number-up mode
21154 NumberUpLayout get_number_up_layout()() {
21155 return gtk_print_settings_get_number_up_layout(&this);
21158 // VERSION: 2.10
21159 // Get the value of %GTK_PRINT_SETTINGS_ORIENTATION,
21160 // converted to a #GtkPageOrientation.
21161 // RETURNS: the orientation
21162 PageOrientation get_orientation()() {
21163 return gtk_print_settings_get_orientation(&this);
21166 // VERSION: 2.10
21167 // Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
21168 // RETURNS: the output bin
21169 char* get_output_bin()() {
21170 return gtk_print_settings_get_output_bin(&this);
21173 // VERSION: 2.10
21174 // Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
21175 // of #GtkPageRange<!-- -->s. Use g_free() to free the array when
21176 // it is no longer needed.
21177 // RETURNS: an array
21178 // <num_ranges>: return location for the length of the returned array
21179 PageRange* /*new*/ get_page_ranges()(/*out*/ int* num_ranges) {
21180 return gtk_print_settings_get_page_ranges(&this, num_ranges);
21183 // VERSION: 2.10
21184 // Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
21185 // RETURNS: the set of pages to print
21186 PageSet get_page_set()() {
21187 return gtk_print_settings_get_page_set(&this);
21190 // VERSION: 2.10
21191 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT,
21192 // converted to @unit.
21193 // RETURNS: the paper height, in units of @unit
21194 // <unit>: the unit for the return value
21195 double get_paper_height()(Unit unit) {
21196 return gtk_print_settings_get_paper_height(&this, unit);
21199 // VERSION: 2.10
21200 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
21201 // converted to a #GtkPaperSize.
21202 // RETURNS: the paper size
21203 PaperSize* /*new*/ get_paper_size()() {
21204 return gtk_print_settings_get_paper_size(&this);
21207 // VERSION: 2.10
21208 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH,
21209 // converted to @unit.
21210 // RETURNS: the paper width, in units of @unit
21211 // <unit>: the unit for the return value
21212 double get_paper_width()(Unit unit) {
21213 return gtk_print_settings_get_paper_width(&this, unit);
21216 // VERSION: 2.10
21217 // Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
21218 // RETURNS: which pages to print
21219 PrintPages get_print_pages()() {
21220 return gtk_print_settings_get_print_pages(&this);
21223 // VERSION: 2.10
21224 // Convenience function to obtain the value of
21225 // %GTK_PRINT_SETTINGS_PRINTER.
21226 // RETURNS: the printer name
21227 char* get_printer()() {
21228 return gtk_print_settings_get_printer(&this);
21231 // VERSION: 2.16
21232 // Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
21233 // RETURNS: the resolution in lpi (lines per inch)
21234 double get_printer_lpi()() {
21235 return gtk_print_settings_get_printer_lpi(&this);
21238 // VERSION: 2.10
21239 // Gets the value of %GTK_PRINT_SETTINGS_QUALITY.
21240 // RETURNS: the print quality
21241 PrintQuality get_quality()() {
21242 return gtk_print_settings_get_quality(&this);
21245 // VERSION: 2.10
21246 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION.
21247 // RETURNS: the resolution in dpi
21248 int get_resolution()() {
21249 return gtk_print_settings_get_resolution(&this);
21252 // VERSION: 2.16
21253 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X.
21254 // RETURNS: the horizontal resolution in dpi
21255 int get_resolution_x()() {
21256 return gtk_print_settings_get_resolution_x(&this);
21259 // VERSION: 2.16
21260 // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y.
21261 // RETURNS: the vertical resolution in dpi
21262 int get_resolution_y()() {
21263 return gtk_print_settings_get_resolution_y(&this);
21266 // VERSION: 2.10
21267 // Gets the value of %GTK_PRINT_SETTINGS_REVERSE.
21268 // RETURNS: whether to reverse the order of the printed pages
21269 int get_reverse()() {
21270 return gtk_print_settings_get_reverse(&this);
21273 // VERSION: 2.10
21274 // Gets the value of %GTK_PRINT_SETTINGS_SCALE.
21275 // RETURNS: the scale in percent
21276 double get_scale()() {
21277 return gtk_print_settings_get_scale(&this);
21280 // VERSION: 2.10
21281 // Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
21282 // RETURNS: whether to use color
21283 int get_use_color()() {
21284 return gtk_print_settings_get_use_color(&this);
21287 // VERSION: 2.10
21288 // Returns %TRUE, if a value is associated with @key.
21289 // RETURNS: %TRUE, if @key has a value
21290 // <key>: a key
21291 int has_key()(char* key) {
21292 return gtk_print_settings_has_key(&this, key);
21295 // VERSION: 2.14
21296 // Reads the print settings from @file_name. If the file could not be loaded
21297 // then error is set to either a #GFileError or #GKeyFileError.
21298 // See gtk_print_settings_to_file().
21299 // RETURNS: %TRUE on success
21300 // <file_name>: the filename to read the settings from
21301 int load_file()(char* file_name, GLib2.Error** error=null) {
21302 return gtk_print_settings_load_file(&this, file_name, error);
21305 // VERSION: 2.14
21306 // Reads the print settings from the group @group_name in @key_file. If the
21307 // file could not be loaded then error is set to either a #GFileError or
21308 // #GKeyFileError.
21309 // RETURNS: %TRUE on success
21310 // <key_file>: the #GKeyFile to retrieve the settings from
21311 // <group_name>: the name of the group to use, or %NULL to use the default "Print Settings"
21312 int load_key_file()(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error=null) {
21313 return gtk_print_settings_load_key_file(&this, key_file, group_name, error);
21316 // VERSION: 2.10
21317 // Associates @value with @key.
21318 // <key>: a key
21319 // <value>: a string value, or %NULL
21320 void set()(char* key, char* value=null) {
21321 gtk_print_settings_set(&this, key, value);
21324 // VERSION: 2.10
21325 // Sets @key to a boolean value.
21326 // <key>: a key
21327 // <value>: a boolean
21328 void set_bool()(char* key, int value) {
21329 gtk_print_settings_set_bool(&this, key, value);
21332 // VERSION: 2.10
21333 // Sets the value of %GTK_PRINT_SETTINGS_COLLATE.
21334 // <collate>: whether to collate the output
21335 void set_collate()(int collate) {
21336 gtk_print_settings_set_collate(&this, collate);
21339 // VERSION: 2.10
21340 // Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
21341 // <default_source>: the default source
21342 void set_default_source()(char* default_source) {
21343 gtk_print_settings_set_default_source(&this, default_source);
21346 // VERSION: 2.10
21347 // Sets the value of %GTK_PRINT_SETTINGS_DITHER.
21348 // <dither>: the dithering that is used
21349 void set_dither()(char* dither) {
21350 gtk_print_settings_set_dither(&this, dither);
21353 // VERSION: 2.10
21354 // Sets @key to a double value.
21355 // <key>: a key
21356 // <value>: a double value
21357 void set_double()(char* key, double value) {
21358 gtk_print_settings_set_double(&this, key, value);
21361 // VERSION: 2.10
21362 // Sets the value of %GTK_PRINT_SETTINGS_DUPLEX.
21363 // <duplex>: a #GtkPrintDuplex value
21364 void set_duplex()(PrintDuplex duplex) {
21365 gtk_print_settings_set_duplex(&this, duplex);
21368 // VERSION: 2.10
21369 // Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
21370 // <finishings>: the finishings
21371 void set_finishings()(char* finishings) {
21372 gtk_print_settings_set_finishings(&this, finishings);
21375 // VERSION: 2.10
21376 // Sets @key to an integer value.
21377 // <key>: a key
21378 // <value>: an integer
21379 void set_int()(char* key, int value) {
21380 gtk_print_settings_set_int(&this, key, value);
21383 // VERSION: 2.10
21384 // Associates a length in units of @unit with @key.
21385 // <key>: a key
21386 // <value>: a length
21387 // <unit>: the unit of @length
21388 void set_length()(char* key, double value, Unit unit) {
21389 gtk_print_settings_set_length(&this, key, value, unit);
21392 // VERSION: 2.10
21393 // Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
21394 // The set of media types is defined in PWG 5101.1-2002 PWG.
21395 // <!-- FIXME link here -->
21396 // <media_type>: the media type
21397 void set_media_type()(char* media_type) {
21398 gtk_print_settings_set_media_type(&this, media_type);
21401 // VERSION: 2.10
21402 // Sets the value of %GTK_PRINT_SETTINGS_N_COPIES.
21403 // <num_copies>: the number of copies
21404 void set_n_copies()(int num_copies) {
21405 gtk_print_settings_set_n_copies(&this, num_copies);
21408 // VERSION: 2.10
21409 // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
21410 // <number_up>: the number of pages per sheet
21411 void set_number_up()(int number_up) {
21412 gtk_print_settings_set_number_up(&this, number_up);
21415 // VERSION: 2.14
21416 // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
21417 // <number_up_layout>: a #GtkNumberUpLayout value
21418 void set_number_up_layout()(NumberUpLayout number_up_layout) {
21419 gtk_print_settings_set_number_up_layout(&this, number_up_layout);
21422 // VERSION: 2.10
21423 // Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION.
21424 // <orientation>: a page orientation
21425 void set_orientation()(PageOrientation orientation) {
21426 gtk_print_settings_set_orientation(&this, orientation);
21429 // VERSION: 2.10
21430 // Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
21431 // <output_bin>: the output bin
21432 void set_output_bin()(char* output_bin) {
21433 gtk_print_settings_set_output_bin(&this, output_bin);
21436 // VERSION: 2.10
21437 // Sets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
21438 // <page_ranges>: an array of #GtkPageRange<!-- -->s
21439 // <num_ranges>: the length of @page_ranges
21440 void set_page_ranges()(PageRange* page_ranges, int num_ranges) {
21441 gtk_print_settings_set_page_ranges(&this, page_ranges, num_ranges);
21444 // VERSION: 2.10
21445 // Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
21446 // <page_set>: a #GtkPageSet value
21447 void set_page_set()(PageSet page_set) {
21448 gtk_print_settings_set_page_set(&this, page_set);
21451 // VERSION: 2.10
21452 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
21453 // <height>: the paper height
21454 // <unit>: the units of @height
21455 void set_paper_height()(double height, Unit unit) {
21456 gtk_print_settings_set_paper_height(&this, height, unit);
21459 // VERSION: 2.10
21460 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
21461 // %GTK_PRINT_SETTINGS_PAPER_WIDTH and
21462 // %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
21463 // <paper_size>: a paper size
21464 void set_paper_size()(PaperSize* paper_size) {
21465 gtk_print_settings_set_paper_size(&this, paper_size);
21468 // VERSION: 2.10
21469 // Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH.
21470 // <width>: the paper width
21471 // <unit>: the units of @width
21472 void set_paper_width()(double width, Unit unit) {
21473 gtk_print_settings_set_paper_width(&this, width, unit);
21476 // VERSION: 2.10
21477 // Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
21478 // <pages>: a #GtkPrintPages value
21479 void set_print_pages()(PrintPages pages) {
21480 gtk_print_settings_set_print_pages(&this, pages);
21483 // VERSION: 2.10
21484 // Convenience function to set %GTK_PRINT_SETTINGS_PRINTER
21485 // to @printer.
21486 // <printer>: the printer name
21487 void set_printer()(char* printer) {
21488 gtk_print_settings_set_printer(&this, printer);
21491 // VERSION: 2.16
21492 // Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
21493 // <lpi>: the resolution in lpi (lines per inch)
21494 void set_printer_lpi()(double lpi) {
21495 gtk_print_settings_set_printer_lpi(&this, lpi);
21498 // VERSION: 2.10
21499 // Sets the value of %GTK_PRINT_SETTINGS_QUALITY.
21500 // <quality>: a #GtkPrintQuality value
21501 void set_quality()(PrintQuality quality) {
21502 gtk_print_settings_set_quality(&this, quality);
21505 // VERSION: 2.10
21506 // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
21507 // %GTK_PRINT_SETTINGS_RESOLUTION_X and
21508 // %GTK_PRINT_SETTINGS_RESOLUTION_Y.
21509 // <resolution>: the resolution in dpi
21510 void set_resolution()(int resolution) {
21511 gtk_print_settings_set_resolution(&this, resolution);
21514 // VERSION: 2.16
21515 // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
21516 // %GTK_PRINT_SETTINGS_RESOLUTION_X and
21517 // %GTK_PRINT_SETTINGS_RESOLUTION_Y.
21518 // <resolution_x>: the horizontal resolution in dpi
21519 // <resolution_y>: the vertical resolution in dpi
21520 void set_resolution_xy()(int resolution_x, int resolution_y) {
21521 gtk_print_settings_set_resolution_xy(&this, resolution_x, resolution_y);
21524 // VERSION: 2.10
21525 // Sets the value of %GTK_PRINT_SETTINGS_REVERSE.
21526 // <reverse>: whether to reverse the output
21527 void set_reverse()(int reverse) {
21528 gtk_print_settings_set_reverse(&this, reverse);
21531 // VERSION: 2.10
21532 // Sets the value of %GTK_PRINT_SETTINGS_SCALE.
21533 // <scale>: the scale in percent
21534 void set_scale()(double scale) {
21535 gtk_print_settings_set_scale(&this, scale);
21538 // VERSION: 2.10
21539 // Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
21540 // <use_color>: whether to use color
21541 void set_use_color()(int use_color) {
21542 gtk_print_settings_set_use_color(&this, use_color);
21545 // VERSION: 2.12
21546 // This function saves the print settings from @settings to @file_name. If the
21547 // file could not be loaded then error is set to either a #GFileError or
21548 // #GKeyFileError.
21549 // RETURNS: %TRUE on success
21550 // <file_name>: the file to save to
21551 int to_file()(char* file_name, GLib2.Error** error=null) {
21552 return gtk_print_settings_to_file(&this, file_name, error);
21555 // VERSION: 2.12
21556 // This function adds the print settings from @settings to @key_file.
21557 // <key_file>: the #GKeyFile to save the print settings to
21558 // <group_name>: the group to add the settings to in @key_file, or %NULL to use the default "Print Settings"
21559 void to_key_file()(GLib2.KeyFile* key_file, char* group_name) {
21560 gtk_print_settings_to_key_file(&this, key_file, group_name);
21563 // VERSION: 2.10
21564 // Removes any value associated with @key.
21565 // This has the same effect as setting the value to %NULL.
21566 // <key>: a key
21567 void unset()(char* key) {
21568 gtk_print_settings_unset(&this, key);
21572 extern (C) alias void function (char* key, char* value, void* user_data) PrintSettingsFunc;
21574 enum PrintStatus {
21575 INITIAL = 0,
21576 PREPARING = 1,
21577 GENERATING_DATA = 2,
21578 SENDING_DATA = 3,
21579 PENDING = 4,
21580 PENDING_ISSUE = 5,
21581 PRINTING = 6,
21582 FINISHED = 7,
21583 FINISHED_ABORTED = 8
21585 enum PrivateFlags {
21586 USER_STYLE = 1,
21587 RESIZE_PENDING = 4,
21588 HAS_POINTER = 8,
21589 SHADOWED = 16,
21590 HAS_SHAPE_MASK = 32,
21591 IN_REPARENT = 64,
21592 DIRECTION_SET = 128,
21593 DIRECTION_LTR = 256,
21594 ANCHORED = 512,
21595 CHILD_VISIBLE = 1024,
21596 REDRAW_ON_ALLOC = 2048,
21597 ALLOC_NEEDED = 4096,
21598 REQUEST_NEEDED = 8192
21600 struct Progress /* : Widget */ {
21601 mixin Atk.ImplementorIface.__interface__;
21602 mixin Buildable.__interface__;
21603 alias widget this;
21604 alias widget super_;
21605 Widget widget;
21606 Adjustment* adjustment;
21607 Gdk2.Pixmap* offscreen_pixmap;
21608 char* format;
21609 float x_align, y_align;
21610 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
21611 uint, "show_text", 1,
21612 uint, "activity_mode", 1,
21613 uint, "use_text_format", 1,
21614 uint, "__dummy32A", 29));
21616 void configure()(double value, double min, double max) {
21617 gtk_progress_configure(&this, value, min, max);
21619 double get_current_percentage()() {
21620 return gtk_progress_get_current_percentage(&this);
21622 char* /*new*/ get_current_text()() {
21623 return gtk_progress_get_current_text(&this);
21625 double get_percentage_from_value()(double value) {
21626 return gtk_progress_get_percentage_from_value(&this, value);
21628 char* /*new*/ get_text_from_value()(double value) {
21629 return gtk_progress_get_text_from_value(&this, value);
21631 double get_value()() {
21632 return gtk_progress_get_value(&this);
21634 void set_activity_mode()(int activity_mode) {
21635 gtk_progress_set_activity_mode(&this, activity_mode);
21637 void set_adjustment()(Adjustment* adjustment) {
21638 gtk_progress_set_adjustment(&this, adjustment);
21640 void set_format_string()(char* format) {
21641 gtk_progress_set_format_string(&this, format);
21643 void set_percentage()(double percentage) {
21644 gtk_progress_set_percentage(&this, percentage);
21646 void set_show_text()(int show_text) {
21647 gtk_progress_set_show_text(&this, show_text);
21649 void set_text_alignment()(float x_align, float y_align) {
21650 gtk_progress_set_text_alignment(&this, x_align, y_align);
21652 void set_value()(double value) {
21653 gtk_progress_set_value(&this, value);
21657 struct ProgressBar /* : Progress */ {
21658 mixin Atk.ImplementorIface.__interface__;
21659 mixin Buildable.__interface__;
21660 alias progress this;
21661 alias progress super_;
21662 Progress progress;
21663 ProgressBarStyle bar_style;
21664 ProgressBarOrientation orientation;
21665 uint blocks;
21666 int in_block, activity_pos;
21667 uint activity_step, activity_blocks;
21668 double pulse_fraction;
21669 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
21670 uint, "activity_dir", 1,
21671 uint, "ellipsize", 3,
21672 uint, "dirty", 1,
21673 uint, "__dummy32A", 27));
21676 // Creates a new #GtkProgressBar.
21677 // RETURNS: a #GtkProgressBar.
21678 static ProgressBar* new_()() {
21679 return gtk_progress_bar_new();
21682 // Creates a new #GtkProgressBar with an associated #GtkAdjustment.
21683 // RETURNS: a #GtkProgressBar.
21684 static ProgressBar* new_with_adjustment()(Adjustment* adjustment=null) {
21685 return gtk_progress_bar_new_with_adjustment(adjustment);
21688 // VERSION: 2.6
21689 // Returns the ellipsizing position of the progressbar.
21690 // See gtk_progress_bar_set_ellipsize().
21691 // RETURNS: #PangoEllipsizeMode
21692 Pango.EllipsizeMode get_ellipsize()() {
21693 return gtk_progress_bar_get_ellipsize(&this);
21696 // Returns the current fraction of the task that's been completed.
21697 // RETURNS: a fraction from 0.0 to 1.0
21698 double get_fraction()() {
21699 return gtk_progress_bar_get_fraction(&this);
21702 // Retrieves the current progress bar orientation.
21703 // RETURNS: orientation of the progress bar
21704 ProgressBarOrientation get_orientation()() {
21705 return gtk_progress_bar_get_orientation(&this);
21708 // Retrieves the pulse step set with gtk_progress_bar_set_pulse_step()
21709 // RETURNS: a fraction from 0.0 to 1.0
21710 double get_pulse_step()() {
21711 return gtk_progress_bar_get_pulse_step(&this);
21714 // Retrieves the text displayed superimposed on the progress bar,
21715 // if any, otherwise %NULL. The return value is a reference
21716 // to the text, not a copy of it, so will become invalid
21717 // if you change the text in the progress bar.
21718 // and should not be modified or freed.
21719 // RETURNS: text, or %NULL; this string is owned by the widget
21720 char* get_text()() {
21721 return gtk_progress_bar_get_text(&this);
21724 // Indicates that some progress is made, but you don't know how much.
21725 // Causes the progress bar to enter "activity mode," where a block
21726 // bounces back and forth. Each call to gtk_progress_bar_pulse()
21727 // causes the block to move by a little bit (the amount of movement
21728 // per pulse is determined by gtk_progress_bar_set_pulse_step()).
21729 void pulse()() {
21730 gtk_progress_bar_pulse(&this);
21732 void set_activity_blocks()(uint blocks) {
21733 gtk_progress_bar_set_activity_blocks(&this, blocks);
21735 void set_activity_step()(uint step) {
21736 gtk_progress_bar_set_activity_step(&this, step);
21738 void set_bar_style()(ProgressBarStyle style) {
21739 gtk_progress_bar_set_bar_style(&this, style);
21741 void set_discrete_blocks()(uint blocks) {
21742 gtk_progress_bar_set_discrete_blocks(&this, blocks);
21745 // VERSION: 2.6
21746 // if there is not enough space to render the entire string.
21747 // <mode>: a #PangoEllipsizeMode
21748 void set_ellipsize()(Pango.EllipsizeMode mode) {
21749 gtk_progress_bar_set_ellipsize(&this, mode);
21752 // Causes the progress bar to "fill in" the given fraction
21753 // of the bar. The fraction should be between 0.0 and 1.0,
21754 // inclusive.
21755 // <fraction>: fraction of the task that's been completed
21756 void set_fraction()(double fraction) {
21757 gtk_progress_bar_set_fraction(&this, fraction);
21760 // Causes the progress bar to switch to a different orientation
21761 // (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
21762 // <orientation>: orientation of the progress bar
21763 void set_orientation()(ProgressBarOrientation orientation) {
21764 gtk_progress_bar_set_orientation(&this, orientation);
21767 // Sets the fraction of total progress bar length to move the
21768 // bouncing block for each call to gtk_progress_bar_pulse().
21769 // <fraction>: fraction between 0.0 and 1.0
21770 void set_pulse_step()(double fraction) {
21771 gtk_progress_bar_set_pulse_step(&this, fraction);
21774 // Causes the given @text to appear superimposed on the progress bar.
21775 // <text>: a UTF-8 string, or %NULL
21776 void set_text()(char* text=null) {
21777 gtk_progress_bar_set_text(&this, text);
21779 void update()(double percentage) {
21780 gtk_progress_bar_update(&this, percentage);
21784 struct ProgressBarClass {
21785 ProgressClass parent_class;
21786 extern (C) void function () _gtk_reserved1;
21787 extern (C) void function () _gtk_reserved2;
21788 extern (C) void function () _gtk_reserved3;
21789 extern (C) void function () _gtk_reserved4;
21792 enum ProgressBarOrientation {
21793 LEFT_TO_RIGHT = 0,
21794 RIGHT_TO_LEFT = 1,
21795 BOTTOM_TO_TOP = 2,
21796 TOP_TO_BOTTOM = 3
21798 enum ProgressBarStyle {
21799 CONTINUOUS = 0,
21800 DISCRETE = 1
21802 struct ProgressClass {
21803 WidgetClass parent_class;
21804 extern (C) void function (Progress* progress) paint;
21805 extern (C) void function (Progress* progress) update;
21806 extern (C) void function (Progress* progress) act_mode_enter;
21807 extern (C) void function () _gtk_reserved1;
21808 extern (C) void function () _gtk_reserved2;
21809 extern (C) void function () _gtk_reserved3;
21810 extern (C) void function () _gtk_reserved4;
21813 struct RadioAction /* : ToggleAction */ {
21814 mixin Buildable.__interface__;
21815 alias parent this;
21816 alias parent super_;
21817 alias parent toggleaction;
21818 ToggleAction parent;
21819 private RadioActionPrivate* private_data;
21822 // VERSION: 2.4
21823 // Creates a new #GtkRadioAction object. To add the action to
21824 // a #GtkActionGroup and set the accelerator for the action,
21825 // call gtk_action_group_add_action_with_accel().
21826 // RETURNS: a new #GtkRadioAction
21827 // <name>: A unique name for the action
21828 // <label>: The label displayed in menu items and on buttons, or %NULL
21829 // <tooltip>: A tooltip for this action, or %NULL
21830 // <stock_id>: The stock icon to display in widgets representing this action, or %NULL
21831 // <value>: The value which gtk_radio_action_get_current_value() should return if this action is selected.
21832 static RadioAction* /*new*/ new_()(char* name, char* label, char* tooltip, char* stock_id, int value) {
21833 return gtk_radio_action_new(name, label, tooltip, stock_id, value);
21836 // VERSION: 2.4
21837 // Obtains the value property of the currently active member of
21838 // the group to which @action belongs.
21839 // RETURNS: The value of the currently active group member
21840 int get_current_value()() {
21841 return gtk_radio_action_get_current_value(&this);
21844 // VERSION: 2.4
21845 // Returns the list representing the radio group for this object.
21846 // Note that the returned list is only valid until the next change
21847 // to the group.
21848 // A common way to set up a group of radio group is the following:
21849 // |[
21850 // GSList *group = NULL;
21851 // GtkRadioAction *action;
21852 // while (/&ast; more actions to add &ast;/)
21853 // {
21854 // action = gtk_radio_action_new (...);
21855 // gtk_radio_action_set_group (action, group);
21856 // group = gtk_radio_action_get_group (action);
21857 // }
21858 // ]|
21859 // RETURNS: the list representing the radio group for this object
21860 GLib2.SList* get_group()() {
21861 return gtk_radio_action_get_group(&this);
21864 // VERSION: 2.10
21865 // Sets the currently active group member to the member with value
21866 // property @current_value.
21867 // <current_value>: the new value
21868 void set_current_value()(int current_value) {
21869 gtk_radio_action_set_current_value(&this, current_value);
21872 // VERSION: 2.4
21873 // Sets the radio group for the radio action object.
21874 // <group>: a list representing a radio group
21875 void set_group()(GLib2.SList* group) {
21876 gtk_radio_action_set_group(&this, group);
21879 // VERSION: 2.4
21880 // The ::changed signal is emitted on every member of a radio group when the
21881 // active member is changed. The signal gets emitted after the ::activate signals
21882 // for the previous and current active members.
21883 // <current>: the member of @action<!-- -->s group which has just been activated
21884 extern (C) alias static void function (RadioAction* this_, RadioAction* current, void* user_data=null) signal_changed;
21886 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21887 return super_.signal_connect!name(cb, data, cf);
21890 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
21891 return signal_connect_data!()(&this, cast(char*)"changed",
21892 cast(GObject2.Callback)cb, data, null, cf);
21896 struct RadioActionClass {
21897 ToggleActionClass parent_class;
21898 extern (C) void function (RadioAction* action, RadioAction* current) changed;
21899 extern (C) void function () _gtk_reserved1;
21900 extern (C) void function () _gtk_reserved2;
21901 extern (C) void function () _gtk_reserved3;
21902 extern (C) void function () _gtk_reserved4;
21905 struct RadioActionEntry {
21906 char* name, stock_id, label, accelerator, tooltip;
21907 int value;
21910 struct RadioActionPrivate {
21913 struct RadioButton /* : CheckButton */ {
21914 mixin Atk.ImplementorIface.__interface__;
21915 mixin Activatable.__interface__;
21916 mixin Buildable.__interface__;
21917 alias check_button this;
21918 alias check_button super_;
21919 alias check_button checkbutton;
21920 CheckButton check_button;
21921 GLib2.SList* group;
21924 // Creates a new #GtkRadioButton. To be of any practical value, a widget should
21925 // then be packed into the radio button.
21926 // RETURNS: a new radio button
21927 // <group>: an existing radio button group, or %NULL if you are creating a new group.
21928 static RadioButton* new_()(GLib2.SList* group=null) {
21929 return gtk_radio_button_new(group);
21932 // Creates a new #GtkRadioButton with a text label.
21933 // RETURNS: a new radio button.
21934 // <group>: an existing radio button group, or %NULL if you are creating a new group.
21935 // <label>: the text label to display next to the radio button.
21936 static RadioButton* new_with_label()(GLib2.SList* group, char* label) {
21937 return gtk_radio_button_new_with_label(group, label);
21940 // Creates a new #GtkRadioButton with a text label, adding it to
21941 // the same group as @radio_group_member.
21942 // RETURNS: a new radio button.
21943 // <radio_group_member>: widget to get radio group from or %NULL
21944 // <label>: a text string to display next to the radio button.
21945 static RadioButton* new_with_label_from_widget()(RadioButton* radio_group_member, char* label) {
21946 return gtk_radio_button_new_with_label_from_widget(radio_group_member, label);
21949 // Creates a new #GtkRadioButton containing a label, adding it to the same
21950 // group as @group. The label will be created using
21951 // gtk_label_new_with_mnemonic(), so underscores in @label indicate the
21952 // mnemonic for the button.
21953 // RETURNS: a new #GtkRadioButton
21954 // <group>: the radio button group
21955 // <label>: the text of the button, with an underscore in front of the mnemonic character
21956 static RadioButton* new_with_mnemonic()(GLib2.SList* group, char* label) {
21957 return gtk_radio_button_new_with_mnemonic(group, label);
21960 // Creates a new #GtkRadioButton containing a label. The label
21961 // will be created using gtk_label_new_with_mnemonic(), so underscores
21962 // in @label indicate the mnemonic for the button.
21963 // RETURNS: a new #GtkRadioButton
21964 // <radio_group_member>: widget to get radio group from or %NULL
21965 // <label>: the text of the button, with an underscore in front of the mnemonic character
21966 static RadioButton* new_with_mnemonic_from_widget()(RadioButton* radio_group_member, char* label) {
21967 return gtk_radio_button_new_with_mnemonic_from_widget(radio_group_member, label);
21970 // Retrieves the group assigned to a radio button.
21971 // containing all the radio buttons in the same group
21972 // as @radio_button. The returned list is owned by the radio button
21973 // and must not be modified or freed.
21974 // RETURNS: a linked list
21975 GLib2.SList* get_group()() {
21976 return gtk_radio_button_get_group(&this);
21979 // Creates a new #GtkRadioButton, adding it to the same group as
21980 // should be packed into the radio button.
21981 // RETURNS: a new radio button.
21982 Widget* new_from_widget()() {
21983 return gtk_radio_button_new_from_widget(&this);
21986 // Sets a #GtkRadioButton's group. It should be noted that this does not change
21987 // the layout of your interface in any way, so if you are changing the group,
21988 // it is likely you will need to re-arrange the user interface to reflect these
21989 // changes.
21990 // <group>: an existing radio button group, such as one returned from gtk_radio_button_get_group().
21991 void set_group()(GLib2.SList* group) {
21992 gtk_radio_button_set_group(&this, group);
21995 // VERSION: 2.4
21996 // Emitted when the group of radio buttons that a radio button belongs
21997 // to changes. This is emitted when a radio button switches from
21998 // being alone to being part of a group of 2 or more buttons, or
21999 // vice-versa, and when a button is moved from one group of 2 or
22000 // more buttons to a different one, but not when the composition
22001 // of the group that a button belongs to changes.
22002 extern (C) alias static void function (RadioButton* this_, void* user_data=null) signal_group_changed;
22004 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22005 return super_.signal_connect!name(cb, data, cf);
22008 ulong signal_connect(string name:"group-changed", CB:signal_group_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22009 return signal_connect_data!()(&this, cast(char*)"group-changed",
22010 cast(GObject2.Callback)cb, data, null, cf);
22014 struct RadioButtonClass {
22015 CheckButtonClass parent_class;
22016 extern (C) void function (RadioButton* radio_button) group_changed;
22017 extern (C) void function () _gtk_reserved2;
22018 extern (C) void function () _gtk_reserved3;
22019 extern (C) void function () _gtk_reserved4;
22022 struct RadioMenuItem /* : CheckMenuItem */ {
22023 mixin Atk.ImplementorIface.__interface__;
22024 mixin Activatable.__interface__;
22025 mixin Buildable.__interface__;
22026 alias check_menu_item this;
22027 alias check_menu_item super_;
22028 alias check_menu_item checkmenuitem;
22029 CheckMenuItem check_menu_item;
22030 GLib2.SList* group;
22032 static RadioMenuItem* new_()(GLib2.SList* group) {
22033 return gtk_radio_menu_item_new(group);
22036 // Creates a new #GtkRadioMenuItem whose child is a simple #GtkLabel.
22037 // RETURNS: A new #GtkRadioMenuItem
22038 // <label>: the text for the label
22039 static RadioMenuItem* new_with_label()(GLib2.SList* group, char* label) {
22040 return gtk_radio_menu_item_new_with_label(group, label);
22043 // Creates a new #GtkRadioMenuItem containing a label. The label
22044 // will be created using gtk_label_new_with_mnemonic(), so underscores
22045 // in @label indicate the mnemonic for the menu item.
22046 // RETURNS: a new #GtkRadioMenuItem
22047 // <group>: group the radio menu item is inside
22048 // <label>: the text of the button, with an underscore in front of the mnemonic character
22049 static RadioMenuItem* new_with_mnemonic()(GLib2.SList* group, char* label) {
22050 return gtk_radio_menu_item_new_with_mnemonic(group, label);
22053 // Returns the group to which the radio menu item belongs, as a #GList of
22054 // #GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
22055 // RETURNS: the group of @radio_menu_item
22056 GLib2.SList* get_group()() {
22057 return gtk_radio_menu_item_get_group(&this);
22060 // VERSION: 2.4
22061 // Creates a new #GtkRadioMenuItem adding it to the same group as @group.
22062 // RETURNS: The new #GtkRadioMenuItem
22063 Widget* new_from_widget()() {
22064 return gtk_radio_menu_item_new_from_widget(&this);
22067 // VERSION: 2.4
22068 // Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
22069 // The new #GtkRadioMenuItem is added to the same group as @group.
22070 // RETURNS: The new #GtkRadioMenuItem
22071 // <label>: the text for the label
22072 Widget* new_with_label_from_widget()(char* label) {
22073 return gtk_radio_menu_item_new_with_label_from_widget(&this, label);
22076 // VERSION: 2.4
22077 // Creates a new GtkRadioMenuItem containing a label. The label will be
22078 // created using gtk_label_new_with_mnemonic(), so underscores in label
22079 // indicate the mnemonic for the menu item.
22080 // The new #GtkRadioMenuItem is added to the same group as @group.
22081 // RETURNS: The new #GtkRadioMenuItem
22082 // <label>: the text of the button, with an underscore in front of the mnemonic character
22083 Widget* new_with_mnemonic_from_widget()(char* label) {
22084 return gtk_radio_menu_item_new_with_mnemonic_from_widget(&this, label);
22086 void set_group()(GLib2.SList* group) {
22087 gtk_radio_menu_item_set_group(&this, group);
22089 extern (C) alias static void function (RadioMenuItem* this_, void* user_data=null) signal_group_changed;
22091 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22092 return super_.signal_connect!name(cb, data, cf);
22095 ulong signal_connect(string name:"group-changed", CB:signal_group_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22096 return signal_connect_data!()(&this, cast(char*)"group-changed",
22097 cast(GObject2.Callback)cb, data, null, cf);
22101 struct RadioMenuItemClass {
22102 CheckMenuItemClass parent_class;
22103 extern (C) void function (RadioMenuItem* radio_menu_item) group_changed;
22104 extern (C) void function () _gtk_reserved2;
22105 extern (C) void function () _gtk_reserved3;
22106 extern (C) void function () _gtk_reserved4;
22109 struct RadioToolButton /* : ToggleToolButton */ {
22110 mixin Atk.ImplementorIface.__interface__;
22111 mixin Activatable.__interface__;
22112 mixin Buildable.__interface__;
22113 alias parent this;
22114 alias parent super_;
22115 alias parent toggletoolbutton;
22116 ToggleToolButton parent;
22119 // VERSION: 2.4
22120 // Creates a new #GtkRadioToolButton, adding it to @group.
22121 // RETURNS: The new #GtkRadioToolButton
22122 // <group>: An existing radio button group, or %NULL if you are creating a new group
22123 static RadioToolButton* new_()(GLib2.SList* group=null) {
22124 return gtk_radio_tool_button_new(group);
22127 // VERSION: 2.4
22128 // Creates a new #GtkRadioToolButton, adding it to @group.
22129 // The new #GtkRadioToolButton will contain an icon and label from the
22130 // stock item indicated by @stock_id.
22131 // RETURNS: The new #GtkRadioToolItem
22132 // <group>: an existing radio button group, or %NULL if you are creating a new group
22133 // <stock_id>: the name of a stock item
22134 static RadioToolButton* new_from_stock()(GLib2.SList* group, char* stock_id) {
22135 return gtk_radio_tool_button_new_from_stock(group, stock_id);
22138 // VERSION: 2.4
22139 // Returns the radio button group @button belongs to.
22140 // RETURNS: The group @button belongs to.
22141 GLib2.SList* get_group()() {
22142 return gtk_radio_tool_button_get_group(&this);
22145 // VERSION: 2.4
22146 // Creates a new #GtkRadioToolButton adding it to the same group as @gruup
22147 // RETURNS: The new #GtkRadioToolButton
22148 ToolItem* new_from_widget()() {
22149 return gtk_radio_tool_button_new_from_widget(&this);
22152 // VERSION: 2.4
22153 // Creates a new #GtkRadioToolButton adding it to the same group as @group.
22154 // The new #GtkRadioToolButton will contain an icon and label from the
22155 // stock item indicated by @stock_id.
22156 // RETURNS: A new #GtkRadioToolButton
22157 // <stock_id>: the name of a stock item
22158 ToolItem* new_with_stock_from_widget()(char* stock_id) {
22159 return gtk_radio_tool_button_new_with_stock_from_widget(&this, stock_id);
22162 // VERSION: 2.4
22163 // Adds @button to @group, removing it from the group it belonged to before.
22164 // <group>: an existing radio button group
22165 void set_group()(GLib2.SList* group) {
22166 gtk_radio_tool_button_set_group(&this, group);
22170 struct RadioToolButtonClass {
22171 ToggleToolButtonClass parent_class;
22172 extern (C) void function () _gtk_reserved1;
22173 extern (C) void function () _gtk_reserved2;
22174 extern (C) void function () _gtk_reserved3;
22175 extern (C) void function () _gtk_reserved4;
22178 struct Range /* : Widget */ {
22179 mixin Atk.ImplementorIface.__interface__;
22180 mixin Buildable.__interface__;
22181 mixin Orientable.__interface__;
22182 alias widget this;
22183 alias widget super_;
22184 Widget widget;
22185 Adjustment* adjustment;
22186 UpdateType update_policy;
22187 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
22188 uint, "inverted", 1,
22189 uint, "flippable", 1,
22190 uint, "has_stepper_a", 1,
22191 uint, "has_stepper_b", 1,
22192 uint, "has_stepper_c", 1,
22193 uint, "has_stepper_d", 1,
22194 uint, "need_recalc", 1,
22195 uint, "slider_size_fixed", 1,
22196 uint, "__dummy32A", 24));
22197 int min_slider_size;
22198 Orientation orientation;
22199 Gdk2.Rectangle range_rect;
22200 int slider_start, slider_end, round_digits;
22201 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
22202 uint, "trough_click_forward", 1,
22203 uint, "update_pending", 1,
22204 uint, "__dummy32B", 30));
22205 private RangeLayout* layout;
22206 private RangeStepTimer* timer;
22207 private int slide_initial_slider_position, slide_initial_coordinate;
22208 private uint update_timeout_id;
22209 private Gdk2.Window* event_window;
22212 // Get the #GtkAdjustment which is the "model" object for #GtkRange.
22213 // See gtk_range_set_adjustment() for details.
22214 // The return value does not have a reference added, so should not
22215 // be unreferenced.
22216 // RETURNS: a #GtkAdjustment
22217 Adjustment* get_adjustment()() {
22218 return gtk_range_get_adjustment(&this);
22221 // VERSION: 2.12
22222 // Gets the current position of the fill level indicator.
22223 // RETURNS: The current fill level
22224 double get_fill_level()() {
22225 return gtk_range_get_fill_level(&this);
22228 // VERSION: 2.18
22229 // Gets the value set by gtk_range_set_flippable().
22230 // RETURNS: %TRUE if the range is flippable
22231 int get_flippable()() {
22232 return gtk_range_get_flippable(&this);
22235 // Gets the value set by gtk_range_set_inverted().
22236 // RETURNS: %TRUE if the range is inverted
22237 int get_inverted()() {
22238 return gtk_range_get_inverted(&this);
22241 // VERSION: 2.10
22242 // Gets the sensitivity policy for the stepper that points to the
22243 // 'lower' end of the GtkRange's adjustment.
22244 // RETURNS: The lower stepper's sensitivity policy.
22245 SensitivityType get_lower_stepper_sensitivity()() {
22246 return gtk_range_get_lower_stepper_sensitivity(&this);
22249 // VERSION: 2.20
22250 // This function is useful mainly for #GtkRange subclasses.
22251 // See gtk_range_set_min_slider_size().
22252 // RETURNS: The minimum size of the range's slider.
22253 int get_min_slider_size()() {
22254 return gtk_range_get_min_slider_size(&this);
22257 // VERSION: 2.20
22258 // This function returns the area that contains the range's trough
22259 // and its steppers, in widget->window coordinates.
22260 // This function is useful mainly for #GtkRange subclasses.
22261 // <range_rect>: return location for the range rectangle
22262 void get_range_rect()(/*out*/ Gdk2.Rectangle* range_rect) {
22263 gtk_range_get_range_rect(&this, range_rect);
22266 // VERSION: 2.12
22267 // Gets whether the range is restricted to the fill level.
22268 // RETURNS: %TRUE if @range is restricted to the fill level.
22269 int get_restrict_to_fill_level()() {
22270 return gtk_range_get_restrict_to_fill_level(&this);
22273 // VERSION: 2.24
22274 // Gets the number of digits to round the value to when
22275 // it changes. See #GtkRange::change-value.
22276 // RETURNS: the number of digits to round to
22277 int get_round_digits()() {
22278 return gtk_range_get_round_digits(&this);
22281 // VERSION: 2.12
22282 // Gets whether the range displays the fill level graphically.
22283 // RETURNS: %TRUE if @range shows the fill level.
22284 int get_show_fill_level()() {
22285 return gtk_range_get_show_fill_level(&this);
22288 // VERSION: 2.20
22289 // This function returns sliders range along the long dimension,
22290 // in widget->window coordinates.
22291 // This function is useful mainly for #GtkRange subclasses.
22292 // <slider_start>: return location for the slider's start, or %NULL
22293 // <slider_end>: return location for the slider's end, or %NULL
22294 void get_slider_range()(/*out*/ int* slider_start=null, /*out*/ int* slider_end=null) {
22295 gtk_range_get_slider_range(&this, slider_start, slider_end);
22298 // VERSION: 2.20
22299 // This function is useful mainly for #GtkRange subclasses.
22300 // See gtk_range_set_slider_size_fixed().
22301 // RETURNS: whether the range's slider has a fixed size.
22302 int get_slider_size_fixed()() {
22303 return gtk_range_get_slider_size_fixed(&this);
22306 // DEPRECATED (v2.24) method: get_update_policy - There is no replacement. If you require delayed
22307 // Gets the update policy of @range. See gtk_range_set_update_policy().
22308 // updates, you need to code it yourself.
22309 // RETURNS: the current update policy
22310 UpdateType get_update_policy()() {
22311 return gtk_range_get_update_policy(&this);
22314 // VERSION: 2.10
22315 // Gets the sensitivity policy for the stepper that points to the
22316 // 'upper' end of the GtkRange's adjustment.
22317 // RETURNS: The upper stepper's sensitivity policy.
22318 SensitivityType get_upper_stepper_sensitivity()() {
22319 return gtk_range_get_upper_stepper_sensitivity(&this);
22322 // Gets the current value of the range.
22323 // RETURNS: current value of the range.
22324 double get_value()() {
22325 return gtk_range_get_value(&this);
22328 // Sets the adjustment to be used as the "model" object for this range
22329 // widget. The adjustment indicates the current range value, the
22330 // minimum and maximum range values, the step/page increments used
22331 // for keybindings and scrolling, and the page size. The page size
22332 // is normally 0 for #GtkScale and nonzero for #GtkScrollbar, and
22333 // indicates the size of the visible area of the widget being scrolled.
22334 // The page size affects the size of the scrollbar slider.
22335 // <adjustment>: a #GtkAdjustment
22336 void set_adjustment()(Adjustment* adjustment) {
22337 gtk_range_set_adjustment(&this, adjustment);
22340 // VERSION: 2.12
22341 // Set the new position of the fill level indicator.
22342 // The "fill level" is probably best described by its most prominent
22343 // use case, which is an indicator for the amount of pre-buffering in
22344 // a streaming media player. In that use case, the value of the range
22345 // would indicate the current play position, and the fill level would
22346 // be the position up to which the file/stream has been downloaded.
22347 // This amount of prebuffering can be displayed on the range's trough
22348 // and is themeable separately from the trough. To enable fill level
22349 // display, use gtk_range_set_show_fill_level(). The range defaults
22350 // to not showing the fill level.
22351 // Additionally, it's possible to restrict the range's slider position
22352 // to values which are smaller than the fill level. This is controller
22353 // by gtk_range_set_restrict_to_fill_level() and is by default
22354 // enabled.
22355 // <fill_level>: the new position of the fill level indicator
22356 void set_fill_level()(double fill_level) {
22357 gtk_range_set_fill_level(&this, fill_level);
22360 // VERSION: 2.18
22361 // If a range is flippable, it will switch its direction if it is
22362 // horizontal and its direction is %GTK_TEXT_DIR_RTL.
22363 // See gtk_widget_get_direction().
22364 // <flippable>: %TRUE to make the range flippable
22365 void set_flippable()(int flippable) {
22366 gtk_range_set_flippable(&this, flippable);
22369 // Sets the step and page sizes for the range.
22370 // The step size is used when the user clicks the #GtkScrollbar
22371 // arrows or moves #GtkScale via arrow keys. The page size
22372 // is used for example when moving via Page Up or Page Down keys.
22373 // <step>: step size
22374 // <page>: page size
22375 void set_increments()(double step, double page) {
22376 gtk_range_set_increments(&this, step, page);
22379 // Ranges normally move from lower to higher values as the
22380 // slider moves from top to bottom or left to right. Inverted
22381 // ranges have higher values at the top or on the right rather than
22382 // on the bottom or left.
22383 // <setting>: %TRUE to invert the range
22384 void set_inverted()(int setting) {
22385 gtk_range_set_inverted(&this, setting);
22388 // VERSION: 2.10
22389 // Sets the sensitivity policy for the stepper that points to the
22390 // 'lower' end of the GtkRange's adjustment.
22391 // <sensitivity>: the lower stepper's sensitivity policy.
22392 void set_lower_stepper_sensitivity()(SensitivityType sensitivity) {
22393 gtk_range_set_lower_stepper_sensitivity(&this, sensitivity);
22396 // VERSION: 2.20
22397 // Sets the minimum size of the range's slider.
22398 // This function is useful mainly for #GtkRange subclasses.
22399 // <min_size>: The slider's minimum size
22400 void set_min_slider_size()(int min_size) {
22401 gtk_range_set_min_slider_size(&this, min_size);
22404 // Sets the allowable values in the #GtkRange, and clamps the range
22405 // value to be between @min and @max. (If the range has a non-zero
22406 // page size, it is clamped between @min and @max - page-size.)
22407 // <min>: minimum range value
22408 // <max>: maximum range value
22409 void set_range()(double min, double max) {
22410 gtk_range_set_range(&this, min, max);
22413 // VERSION: 2.12
22414 // Sets whether the slider is restricted to the fill level. See
22415 // gtk_range_set_fill_level() for a general description of the fill
22416 // level concept.
22417 // <restrict_to_fill_level>: Whether the fill level restricts slider movement.
22418 void set_restrict_to_fill_level()(int restrict_to_fill_level) {
22419 gtk_range_set_restrict_to_fill_level(&this, restrict_to_fill_level);
22422 // VERSION: 2.24
22423 // Sets the number of digits to round the value to when
22424 // it changes. See #GtkRange::change-value.
22425 // <round_digits>: the precision in digits, or -1
22426 void set_round_digits()(int round_digits) {
22427 gtk_range_set_round_digits(&this, round_digits);
22430 // VERSION: 2.12
22431 // Sets whether a graphical fill level is show on the trough. See
22432 // gtk_range_set_fill_level() for a general description of the fill
22433 // level concept.
22434 // <show_fill_level>: Whether a fill level indicator graphics is shown.
22435 void set_show_fill_level()(int show_fill_level) {
22436 gtk_range_set_show_fill_level(&this, show_fill_level);
22439 // VERSION: 2.20
22440 // Sets whether the range's slider has a fixed size, or a size that
22441 // depends on it's adjustment's page size.
22442 // This function is useful mainly for #GtkRange subclasses.
22443 // <size_fixed>: %TRUE to make the slider size constant
22444 void set_slider_size_fixed()(int size_fixed) {
22445 gtk_range_set_slider_size_fixed(&this, size_fixed);
22448 // DEPRECATED (v2.24) method: set_update_policy - There is no replacement. If you require delayed
22449 // Sets the update policy for the range. #GTK_UPDATE_CONTINUOUS means that
22450 // anytime the range slider is moved, the range value will change and the
22451 // value_changed signal will be emitted. #GTK_UPDATE_DELAYED means that
22452 // the value will be updated after a brief timeout where no slider motion
22453 // occurs, so updates are spaced by a short time rather than
22454 // continuous. #GTK_UPDATE_DISCONTINUOUS means that the value will only
22455 // be updated when the user releases the button and ends the slider
22456 // drag operation.
22457 // updates, you need to code it yourself.
22458 // <policy>: update policy
22459 void set_update_policy()(UpdateType policy) {
22460 gtk_range_set_update_policy(&this, policy);
22463 // VERSION: 2.10
22464 // Sets the sensitivity policy for the stepper that points to the
22465 // 'upper' end of the GtkRange's adjustment.
22466 // <sensitivity>: the upper stepper's sensitivity policy.
22467 void set_upper_stepper_sensitivity()(SensitivityType sensitivity) {
22468 gtk_range_set_upper_stepper_sensitivity(&this, sensitivity);
22471 // Sets the current value of the range; if the value is outside the
22472 // minimum or maximum range values, it will be clamped to fit inside
22473 // them. The range emits the #GtkRange::value-changed signal if the
22474 // value changes.
22475 // <value>: new value of the range
22476 void set_value()(double value) {
22477 gtk_range_set_value(&this, value);
22479 extern (C) alias static void function (Range* this_, double object, void* user_data=null) signal_adjust_bounds;
22481 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22482 return super_.signal_connect!name(cb, data, cf);
22485 ulong signal_connect(string name:"adjust-bounds", CB:signal_adjust_bounds)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22486 return signal_connect_data!()(&this, cast(char*)"adjust-bounds",
22487 cast(GObject2.Callback)cb, data, null, cf);
22490 // VERSION: 2.6
22491 // The ::change-value signal is emitted when a scroll action is
22492 // performed on a range. It allows an application to determine the
22493 // type of scroll event that occurred and the resultant new value.
22494 // The application can handle the event itself and return %TRUE to
22495 // prevent further processing. Or, by returning %FALSE, it can pass
22496 // the event to other handlers until the default GTK+ handler is
22497 // reached.
22498 // The value parameter is unrounded. An application that overrides
22499 // the ::change-value signal is responsible for clamping the value to
22500 // the desired number of decimal digits; the default GTK+ handler
22501 // clamps the value based on #GtkRange:round_digits.
22502 // It is not possible to use delayed update policies in an overridden
22503 // ::change-value handler.
22504 // RETURNS: %TRUE to prevent other handlers from being invoked for the signal, %FALSE to propagate the signal further
22505 // <scroll>: the type of scroll action that was performed
22506 // <value>: the new value resulting from the scroll action
22507 extern (C) alias static c_int function (Range* this_, ScrollType* scroll, double value, void* user_data=null) signal_change_value;
22508 ulong signal_connect(string name:"change-value", CB:signal_change_value)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22509 return signal_connect_data!()(&this, cast(char*)"change-value",
22510 cast(GObject2.Callback)cb, data, null, cf);
22513 // Virtual function that moves the slider. Used for keybindings.
22514 // <step>: how to move the slider
22515 extern (C) alias static void function (Range* this_, ScrollType* step, void* user_data=null) signal_move_slider;
22516 ulong signal_connect(string name:"move-slider", CB:signal_move_slider)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22517 return signal_connect_data!()(&this, cast(char*)"move-slider",
22518 cast(GObject2.Callback)cb, data, null, cf);
22520 // Emitted when the range value changes.
22521 extern (C) alias static void function (Range* this_, void* user_data=null) signal_value_changed;
22522 ulong signal_connect(string name:"value-changed", CB:signal_value_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
22523 return signal_connect_data!()(&this, cast(char*)"value-changed",
22524 cast(GObject2.Callback)cb, data, null, cf);
22528 struct RangeClass {
22529 WidgetClass parent_class;
22530 char* slider_detail, stepper_detail;
22531 extern (C) void function (Range* range) value_changed;
22532 extern (C) void function (Range* range, double new_value) adjust_bounds;
22533 extern (C) void function (Range* range, ScrollType scroll) move_slider;
22534 extern (C) void function (Range* range, Border* border_) get_range_border;
22535 extern (C) int function (Range* range, ScrollType scroll, double new_value) change_value;
22536 extern (C) void function () _gtk_reserved1;
22537 extern (C) void function () _gtk_reserved2;
22538 extern (C) void function () _gtk_reserved3;
22541 struct RangeLayout {
22544 struct RangeStepTimer {
22547 struct RcContext {
22550 enum RcFlags {
22551 FG = 1,
22552 BG = 2,
22553 TEXT = 4,
22554 BASE = 8
22556 struct RcProperty {
22557 GLib2.Quark type_name, property_name;
22558 char* origin;
22559 GObject2.Value value;
22562 extern (C) alias int function (GObject2.ParamSpec* pspec, GLib2.String* rc_string, GObject2.Value* property_value) RcPropertyParser;
22564 struct RcStyle /* : GObject.Object */ {
22565 alias parent_instance this;
22566 alias parent_instance super_;
22567 alias parent_instance object;
22568 GObject2.Object parent_instance;
22569 char* name;
22570 char*[5] bg_pixmap_name;
22571 Pango.FontDescription* font_desc;
22572 RcFlags[5] color_flags;
22573 Gdk2.Color[5] fg, bg, text, base;
22574 int xthickness, ythickness;
22575 private void*[0] rc_properties;
22576 private GLib2.SList* rc_style_lists, icon_factories;
22577 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
22578 uint, "engine_specified", 1,
22579 uint, "__dummy32A", 31));
22581 static RcStyle* /*new*/ new_()() {
22582 return gtk_rc_style_new();
22585 // Makes a copy of the specified #GtkRcStyle. This function
22586 // will correctly copy an RC style that is a member of a class
22587 // derived from #GtkRcStyle.
22588 // RETURNS: the resulting #GtkRcStyle
22589 RcStyle* /*new*/ copy()() {
22590 return gtk_rc_style_copy(&this);
22592 void ref_()() {
22593 gtk_rc_style_ref(&this);
22595 void unref()() {
22596 gtk_rc_style_unref(&this);
22600 struct RcStyleClass {
22601 GObject2.ObjectClass parent_class;
22602 // Unintrospectable functionp: create_rc_style() / ()
22603 extern (C) RcStyle* function (RcStyle* rc_style) create_rc_style;
22604 extern (C) uint function (RcStyle* rc_style, Settings* settings, GLib2.Scanner* scanner) parse;
22605 extern (C) void function (RcStyle* dest, RcStyle* src) merge;
22606 // Unintrospectable functionp: create_style() / ()
22607 extern (C) Style* function (RcStyle* rc_style) create_style;
22608 extern (C) void function () _gtk_reserved1;
22609 extern (C) void function () _gtk_reserved2;
22610 extern (C) void function () _gtk_reserved3;
22611 extern (C) void function () _gtk_reserved4;
22614 enum RcTokenType {
22615 INVALID = 270,
22616 INCLUDE = 271,
22617 NORMAL = 272,
22618 ACTIVE = 273,
22619 PRELIGHT = 274,
22620 SELECTED = 275,
22621 INSENSITIVE = 276,
22622 FG = 277,
22623 BG = 278,
22624 TEXT = 279,
22625 BASE = 280,
22626 XTHICKNESS = 281,
22627 YTHICKNESS = 282,
22628 FONT = 283,
22629 FONTSET = 284,
22630 FONT_NAME = 285,
22631 BG_PIXMAP = 286,
22632 PIXMAP_PATH = 287,
22633 STYLE = 288,
22634 BINDING = 289,
22635 BIND = 290,
22636 WIDGET = 291,
22637 WIDGET_CLASS = 292,
22638 CLASS = 293,
22639 LOWEST = 294,
22640 GTK = 295,
22641 APPLICATION = 296,
22642 THEME = 297,
22643 RC = 298,
22644 HIGHEST = 299,
22645 ENGINE = 300,
22646 MODULE_PATH = 301,
22647 IM_MODULE_PATH = 302,
22648 IM_MODULE_FILE = 303,
22649 STOCK = 304,
22650 LTR = 305,
22651 RTL = 306,
22652 COLOR = 307,
22653 UNBIND = 308,
22654 LAST = 309
22656 struct RecentAction /* : Action */ {
22657 mixin Buildable.__interface__;
22658 mixin RecentChooser.__interface__;
22659 alias parent_instance this;
22660 alias parent_instance super_;
22661 alias parent_instance action;
22662 Action parent_instance;
22663 private RecentActionPrivate* priv;
22666 // VERSION: 2.12
22667 // Creates a new #GtkRecentAction object. To add the action to
22668 // a #GtkActionGroup and set the accelerator for the action,
22669 // call gtk_action_group_add_action_with_accel().
22670 // RETURNS: the newly created #GtkRecentAction.
22671 // <name>: a unique name for the action
22672 // <label>: the label displayed in menu items and on buttons, or %NULL
22673 // <tooltip>: a tooltip for the action, or %NULL
22674 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
22675 static RecentAction* /*new*/ new_()(char* name, char* label, char* tooltip, char* stock_id) {
22676 return gtk_recent_action_new(name, label, tooltip, stock_id);
22679 // VERSION: 2.12
22680 // Creates a new #GtkRecentAction object. To add the action to
22681 // a #GtkActionGroup and set the accelerator for the action,
22682 // call gtk_action_group_add_action_with_accel().
22683 // RETURNS: the newly created #GtkRecentAction
22684 // <name>: a unique name for the action
22685 // <label>: the label displayed in menu items and on buttons, or %NULL
22686 // <tooltip>: a tooltip for the action, or %NULL
22687 // <stock_id>: the stock icon to display in widgets representing the action, or %NULL
22688 // <manager>: a #GtkRecentManager, or %NULL for using the default #GtkRecentManager
22689 static RecentAction* /*new*/ new_for_manager()(char* name, char* label, char* tooltip, char* stock_id, RecentManager* manager=null) {
22690 return gtk_recent_action_new_for_manager(name, label, tooltip, stock_id, manager);
22693 // VERSION: 2.12
22694 // Returns the value set by gtk_recent_chooser_menu_set_show_numbers().
22695 // RETURNS: %TRUE if numbers should be shown.
22696 int get_show_numbers()() {
22697 return gtk_recent_action_get_show_numbers(&this);
22700 // VERSION: 2.12
22701 // Sets whether a number should be added to the items shown by the
22702 // widgets representing @action. The numbers are shown to provide
22703 // a unique character for a mnemonic to be used inside the menu item's
22704 // label. Only the first ten items get a number to avoid clashes.
22705 // <show_numbers>: %TRUE if the shown items should be numbered
22706 void set_show_numbers()(int show_numbers) {
22707 gtk_recent_action_set_show_numbers(&this, show_numbers);
22711 struct RecentActionClass {
22712 ActionClass parent_class;
22715 struct RecentActionPrivate {
22718 struct RecentChooser /* Interface */ {
22719 mixin template __interface__() {
22720 // VERSION: 2.10
22721 // Adds @filter to the list of #GtkRecentFilter objects held by @chooser.
22722 // If no previous filter objects were defined, this function will call
22723 // gtk_recent_chooser_set_filter().
22724 // <filter>: a #GtkRecentFilter
22725 void add_filter()(RecentFilter* filter) {
22726 gtk_recent_chooser_add_filter(cast(RecentChooser*)&this, filter);
22729 // VERSION: 2.10
22730 // Gets the #GtkRecentInfo currently selected by @chooser.
22731 // when you have finished using it.
22732 // RETURNS: a #GtkRecentInfo. Use gtk_recent_info_unref() when
22733 RecentInfo* /*new*/ get_current_item()() {
22734 return gtk_recent_chooser_get_current_item(cast(RecentChooser*)&this);
22737 // VERSION: 2.10
22738 // Gets the URI currently selected by @chooser.
22739 // RETURNS: a newly allocated string holding a URI.
22740 char* /*new*/ get_current_uri()() {
22741 return gtk_recent_chooser_get_current_uri(cast(RecentChooser*)&this);
22744 // VERSION: 2.10
22745 // Gets the #GtkRecentFilter object currently used by @chooser to affect
22746 // the display of the recently used resources.
22747 // RETURNS: a #GtkRecentFilter object.
22748 RecentFilter* get_filter()() {
22749 return gtk_recent_chooser_get_filter(cast(RecentChooser*)&this);
22752 // VERSION: 2.10
22753 // Gets the list of recently used resources in form of #GtkRecentInfo objects.
22754 // The return value of this function is affected by the "sort-type" and
22755 // "limit" properties of @chooser.
22756 // list of #GtkRecentInfo objects. You should
22757 // use gtk_recent_info_unref() on every item of the list, and then free
22758 // the list itself using g_list_free().
22759 // RETURNS: A newly allocated
22760 GLib2.List* /*new*/ get_items()() {
22761 return gtk_recent_chooser_get_items(cast(RecentChooser*)&this);
22764 // VERSION: 2.10
22765 // Gets the number of items returned by gtk_recent_chooser_get_items()
22766 // and gtk_recent_chooser_get_uris().
22767 // returned.
22768 // RETURNS: A positive integer, or -1 meaning that all items are
22769 int get_limit()() {
22770 return gtk_recent_chooser_get_limit(cast(RecentChooser*)&this);
22773 // VERSION: 2.10
22774 // Gets whether only local resources should be shown in the recently used
22775 // resources selector. See gtk_recent_chooser_set_local_only()
22776 // RETURNS: %TRUE if only local resources should be shown.
22777 int get_local_only()() {
22778 return gtk_recent_chooser_get_local_only(cast(RecentChooser*)&this);
22781 // VERSION: 2.10
22782 // Gets whether @chooser can select multiple items.
22783 // RETURNS: %TRUE if @chooser can select more than one item.
22784 int get_select_multiple()() {
22785 return gtk_recent_chooser_get_select_multiple(cast(RecentChooser*)&this);
22788 // VERSION: 2.10
22789 // Retrieves whether @chooser should show an icon near the resource.
22790 // RETURNS: %TRUE if the icons should be displayed, %FALSE otherwise.
22791 int get_show_icons()() {
22792 return gtk_recent_chooser_get_show_icons(cast(RecentChooser*)&this);
22795 // VERSION: 2.10
22796 // Retrieves whether @chooser should show the recently used resources that
22797 // were not found.
22798 // %FALSE otheriwse.
22799 // RETURNS: %TRUE if the resources not found should be displayed, and
22800 int get_show_not_found()() {
22801 return gtk_recent_chooser_get_show_not_found(cast(RecentChooser*)&this);
22804 // VERSION: 2.10
22805 // DEPRECATED (v2.12) method: get_show_numbers - use gtk_recent_chooser_menu_get_show_numbers() instead.
22806 // Returns whether @chooser should display recently used resources
22807 // prepended by a unique number.
22808 // %FALSE otherwise.
22809 // RETURNS: %TRUE if the recent chooser should show display numbers,
22810 int get_show_numbers()() {
22811 return gtk_recent_chooser_get_show_numbers(cast(RecentChooser*)&this);
22814 // VERSION: 2.10
22815 // Returns whether @chooser should display recently used resources
22816 // registered as private.
22817 // %FALSE otherwise.
22818 // RETURNS: %TRUE if the recent chooser should show private items,
22819 int get_show_private()() {
22820 return gtk_recent_chooser_get_show_private(cast(RecentChooser*)&this);
22823 // VERSION: 2.10
22824 // Gets whether @chooser should display tooltips containing the full path
22825 // of a recently user resource.
22826 // %FALSE otherwise.
22827 // RETURNS: %TRUE if the recent chooser should show tooltips,
22828 int get_show_tips()() {
22829 return gtk_recent_chooser_get_show_tips(cast(RecentChooser*)&this);
22832 // VERSION: 2.10
22833 // Gets the value set by gtk_recent_chooser_set_sort_type().
22834 // RETURNS: the sorting order of the @chooser.
22835 RecentSortType get_sort_type()() {
22836 return gtk_recent_chooser_get_sort_type(cast(RecentChooser*)&this);
22839 // VERSION: 2.10
22840 // Gets the URI of the recently used resources.
22841 // The return value of this function is affected by the "sort-type" and "limit"
22842 // properties of @chooser.
22843 // Since the returned array is %NULL terminated, @length may be %NULL.
22844 // A newly allocated, %NULL-terminated array of strings. Use
22845 // g_strfreev() to free it.
22846 // <length>: return location for a the length of the URI list, or %NULL
22847 char** /*new*/ get_uris()(/*out*/ size_t* length=null) {
22848 return gtk_recent_chooser_get_uris(cast(RecentChooser*)&this, length);
22851 // VERSION: 2.10
22852 // Gets the #GtkRecentFilter objects held by @chooser.
22853 // of #GtkRecentFilter objects. You
22854 // should just free the returned list using g_slist_free().
22855 // RETURNS: A singly linked list
22856 GLib2.SList* /*new container*/ list_filters()() {
22857 return gtk_recent_chooser_list_filters(cast(RecentChooser*)&this);
22860 // VERSION: 2.10
22861 // Removes @filter from the list of #GtkRecentFilter objects held by @chooser.
22862 // <filter>: a #GtkRecentFilter
22863 void remove_filter()(RecentFilter* filter) {
22864 gtk_recent_chooser_remove_filter(cast(RecentChooser*)&this, filter);
22867 // VERSION: 2.10
22868 // Selects all the items inside @chooser, if the @chooser supports
22869 // multiple selection.
22870 void select_all()() {
22871 gtk_recent_chooser_select_all(cast(RecentChooser*)&this);
22874 // VERSION: 2.10
22875 // Selects @uri inside @chooser.
22876 // RETURNS: %TRUE if @uri was found.
22877 // <uri>: a URI
22878 int select_uri()(char* uri, GLib2.Error** error=null) {
22879 return gtk_recent_chooser_select_uri(cast(RecentChooser*)&this, uri, error);
22882 // VERSION: 2.10
22883 // Sets @uri as the current URI for @chooser.
22884 // RETURNS: %TRUE if the URI was found.
22885 // <uri>: a URI
22886 int set_current_uri()(char* uri, GLib2.Error** error=null) {
22887 return gtk_recent_chooser_set_current_uri(cast(RecentChooser*)&this, uri, error);
22890 // VERSION: 2.10
22891 // Sets @filter as the current #GtkRecentFilter object used by @chooser
22892 // to affect the displayed recently used resources.
22893 // <filter>: a #GtkRecentFilter
22894 void set_filter()(RecentFilter* filter) {
22895 gtk_recent_chooser_set_filter(cast(RecentChooser*)&this, filter);
22898 // VERSION: 2.10
22899 // Sets the number of items that should be returned by
22900 // gtk_recent_chooser_get_items() and gtk_recent_chooser_get_uris().
22901 // <limit>: a positive integer, or -1 for all items
22902 void set_limit()(int limit) {
22903 gtk_recent_chooser_set_limit(cast(RecentChooser*)&this, limit);
22906 // VERSION: 2.10
22907 // Sets whether only local resources, that is resources using the file:// URI
22908 // scheme, should be shown in the recently used resources selector. If
22909 // to be accessible through the operating system native file system.
22910 // <local_only>: %TRUE if only local files can be shown
22911 void set_local_only()(int local_only) {
22912 gtk_recent_chooser_set_local_only(cast(RecentChooser*)&this, local_only);
22915 // VERSION: 2.10
22916 // Sets whether @chooser can select multiple items.
22917 // <select_multiple>: %TRUE if @chooser can select more than one item
22918 void set_select_multiple()(int select_multiple) {
22919 gtk_recent_chooser_set_select_multiple(cast(RecentChooser*)&this, select_multiple);
22922 // VERSION: 2.10
22923 // Sets whether @chooser should show an icon near the resource when
22924 // displaying it.
22925 // <show_icons>: whether to show an icon near the resource
22926 void set_show_icons()(int show_icons) {
22927 gtk_recent_chooser_set_show_icons(cast(RecentChooser*)&this, show_icons);
22930 // VERSION: 2.10
22931 // Sets whether @chooser should display the recently used resources that
22932 // it didn't find. This only applies to local resources.
22933 // <show_not_found>: whether to show the local items we didn't find
22934 void set_show_not_found()(int show_not_found) {
22935 gtk_recent_chooser_set_show_not_found(cast(RecentChooser*)&this, show_not_found);
22938 // VERSION: 2.10
22939 // DEPRECATED (v2.12) method: set_show_numbers - Use gtk_recent_chooser_menu_set_show_numbers() instead.
22940 // Whether to show recently used resources prepended by a unique number.
22941 // <show_numbers>: %TRUE to show numbers, %FALSE otherwise
22942 void set_show_numbers()(int show_numbers) {
22943 gtk_recent_chooser_set_show_numbers(cast(RecentChooser*)&this, show_numbers);
22946 // VERSION: 2.10
22947 // Whether to show recently used resources marked registered as private.
22948 // <show_private>: %TRUE to show private items, %FALSE otherwise
22949 void set_show_private()(int show_private) {
22950 gtk_recent_chooser_set_show_private(cast(RecentChooser*)&this, show_private);
22953 // VERSION: 2.10
22954 // Sets whether to show a tooltips containing the full path of each
22955 // recently used resource in a #GtkRecentChooser widget.
22956 // <show_tips>: %TRUE if tooltips should be shown
22957 void set_show_tips()(int show_tips) {
22958 gtk_recent_chooser_set_show_tips(cast(RecentChooser*)&this, show_tips);
22961 // VERSION: 2.10
22962 // Sets the comparison function used when sorting to be @sort_func. If
22963 // the @chooser has the sort type set to #GTK_RECENT_SORT_CUSTOM then
22964 // the chooser will sort using this function.
22965 // To the comparison function will be passed two #GtkRecentInfo structs and
22966 // item comes before the second, zero if the two items are equal and
22967 // a negative integer if the first item comes after the second.
22968 // <sort_func>: the comparison function
22969 // <sort_data>: user data to pass to @sort_func, or %NULL
22970 // <data_destroy>: destroy notifier for @sort_data, or %NULL
22971 void set_sort_func()(RecentSortFunc sort_func, void* sort_data=null, GLib2.DestroyNotify data_destroy=null) {
22972 gtk_recent_chooser_set_sort_func(cast(RecentChooser*)&this, sort_func, sort_data, data_destroy);
22975 // VERSION: 2.10
22976 // Changes the sorting order of the recently used resources list displayed by
22977 // <sort_type>: sort order that the chooser should use
22978 void set_sort_type()(RecentSortType sort_type) {
22979 gtk_recent_chooser_set_sort_type(cast(RecentChooser*)&this, sort_type);
22982 // VERSION: 2.10
22983 // Unselects all the items inside @chooser.
22984 void unselect_all()() {
22985 gtk_recent_chooser_unselect_all(cast(RecentChooser*)&this);
22988 // VERSION: 2.10
22989 // Unselects @uri inside @chooser.
22990 // <uri>: a URI
22991 void unselect_uri()(char* uri) {
22992 gtk_recent_chooser_unselect_uri(cast(RecentChooser*)&this, uri);
22995 // VERSION: 2.10
22996 // This signal is emitted when the user "activates" a recent item
22997 // in the recent chooser. This can happen by double-clicking on an item
22998 // in the recently used resources list, or by pressing
22999 // <keycap>Enter</keycap>.
23000 extern (C) alias static void function (RecentChooser* this_, void* user_data=null) signal_item_activated;
23002 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23003 return super_.signal_connect!name(cb, data, cf);
23006 ulong signal_connect(string name:"item-activated", CB:signal_item_activated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23007 return signal_connect_data!()(&this, cast(char*)"item-activated",
23008 cast(GObject2.Callback)cb, data, null, cf);
23011 // VERSION: 2.10
23012 // This signal is emitted when there is a change in the set of
23013 // selected recently used resources. This can happen when a user
23014 // modifies the selection with the mouse or the keyboard, or when
23015 // explicitely calling functions to change the selection.
23016 extern (C) alias static void function (RecentChooser* this_, void* user_data=null) signal_selection_changed;
23017 ulong signal_connect(string name:"selection-changed", CB:signal_selection_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23018 return signal_connect_data!()(&this, cast(char*)"selection-changed",
23019 cast(GObject2.Callback)cb, data, null, cf);
23022 mixin __interface__;
23025 struct RecentChooserDialog /* : Dialog */ {
23026 mixin Atk.ImplementorIface.__interface__;
23027 mixin Buildable.__interface__;
23028 mixin RecentChooser.__interface__;
23029 alias parent_instance this;
23030 alias parent_instance super_;
23031 alias parent_instance dialog;
23032 Dialog parent_instance;
23033 private RecentChooserDialogPrivate* priv;
23036 // Unintrospectable constructor: new() / gtk_recent_chooser_dialog_new()
23037 // VERSION: 2.10
23038 // Creates a new #GtkRecentChooserDialog. This function is analogous to
23039 // gtk_dialog_new_with_buttons().
23040 // RETURNS: a new #GtkRecentChooserDialog
23041 // <title>: Title of the dialog, or %NULL
23042 // <parent>: Transient parent of the dialog, or %NULL,
23043 // <first_button_text>: stock ID or text to go in the first button, or %NULL
23044 alias gtk_recent_chooser_dialog_new new_; // Variadic
23046 // Unintrospectable constructor: new_for_manager() / gtk_recent_chooser_dialog_new_for_manager()
23047 // VERSION: 2.10
23048 // Creates a new #GtkRecentChooserDialog with a specified recent manager.
23049 // This is useful if you have implemented your own recent manager, or if you
23050 // have a customized instance of a #GtkRecentManager object.
23051 // RETURNS: a new #GtkRecentChooserDialog
23052 // <title>: Title of the dialog, or %NULL
23053 // <parent>: Transient parent of the dialog, or %NULL,
23054 // <manager>: a #GtkRecentManager
23055 // <first_button_text>: stock ID or text to go in the first button, or %NULL
23056 alias gtk_recent_chooser_dialog_new_for_manager new_for_manager; // Variadic
23059 struct RecentChooserDialogClass {
23060 DialogClass parent_class;
23063 struct RecentChooserDialogPrivate {
23066 enum RecentChooserError {
23067 NOT_FOUND = 0,
23068 INVALID_URI = 1
23070 struct RecentChooserIface {
23071 GObject2.TypeInterface base_iface;
23073 // RETURNS: %TRUE if the URI was found.
23074 // <uri>: a URI
23075 extern (C) int function (RecentChooser* chooser, char* uri, GLib2.Error** error=null) set_current_uri;
23076 // RETURNS: a newly allocated string holding a URI.
23077 extern (C) char* /*new*/ function (RecentChooser* chooser) get_current_uri;
23079 // RETURNS: %TRUE if @uri was found.
23080 // <uri>: a URI
23081 extern (C) int function (RecentChooser* chooser, char* uri, GLib2.Error** error=null) select_uri;
23082 // <uri>: a URI
23083 extern (C) void function (RecentChooser* chooser, char* uri) unselect_uri;
23084 extern (C) void function (RecentChooser* chooser) select_all;
23085 extern (C) void function (RecentChooser* chooser) unselect_all;
23086 // RETURNS: A newly allocated
23087 extern (C) GLib2.List* /*new*/ function (RecentChooser* chooser) get_items;
23088 // Unintrospectable functionp: get_recent_manager() / ()
23089 extern (C) RecentManager* function (RecentChooser* chooser) get_recent_manager;
23090 // <filter>: a #GtkRecentFilter
23091 extern (C) void function (RecentChooser* chooser, RecentFilter* filter) add_filter;
23092 // <filter>: a #GtkRecentFilter
23093 extern (C) void function (RecentChooser* chooser, RecentFilter* filter) remove_filter;
23094 // RETURNS: A singly linked list
23095 extern (C) GLib2.SList* /*new container*/ function (RecentChooser* chooser) list_filters;
23096 // <sort_func>: the comparison function
23097 extern (C) void function (RecentChooser* chooser, RecentSortFunc sort_func, void* data, GLib2.DestroyNotify destroy) set_sort_func;
23098 extern (C) void function (RecentChooser* chooser) item_activated;
23099 extern (C) void function (RecentChooser* chooser) selection_changed;
23102 struct RecentChooserMenu /* : Menu */ {
23103 mixin Atk.ImplementorIface.__interface__;
23104 mixin Activatable.__interface__;
23105 mixin Buildable.__interface__;
23106 mixin RecentChooser.__interface__;
23107 alias parent_instance this;
23108 alias parent_instance super_;
23109 alias parent_instance menu;
23110 Menu parent_instance;
23111 private RecentChooserMenuPrivate* priv;
23114 // VERSION: 2.10
23115 // Creates a new #GtkRecentChooserMenu widget.
23116 // This kind of widget shows the list of recently used resources as
23117 // a menu, each item as a menu item. Each item inside the menu might
23118 // have an icon, representing its MIME type, and a number, for mnemonic
23119 // access.
23120 // This widget implements the #GtkRecentChooser interface.
23121 // This widget creates its own #GtkRecentManager object. See the
23122 // gtk_recent_chooser_menu_new_for_manager() function to know how to create
23123 // a #GtkRecentChooserMenu widget bound to another #GtkRecentManager object.
23124 // RETURNS: a new #GtkRecentChooserMenu
23125 static RecentChooserMenu* new_()() {
23126 return gtk_recent_chooser_menu_new();
23129 // VERSION: 2.10
23130 // Creates a new #GtkRecentChooserMenu widget using @manager as
23131 // the underlying recently used resources manager.
23132 // This is useful if you have implemented your own recent manager,
23133 // or if you have a customized instance of a #GtkRecentManager
23134 // object or if you wish to share a common #GtkRecentManager object
23135 // among multiple #GtkRecentChooser widgets.
23136 // RETURNS: a new #GtkRecentChooserMenu, bound to @manager.
23137 // <manager>: a #GtkRecentManager
23138 static RecentChooserMenu* new_for_manager()(RecentManager* manager) {
23139 return gtk_recent_chooser_menu_new_for_manager(manager);
23142 // VERSION: 2.10
23143 // Returns the value set by gtk_recent_chooser_menu_set_show_numbers().
23144 // RETURNS: %TRUE if numbers should be shown.
23145 int get_show_numbers()() {
23146 return gtk_recent_chooser_menu_get_show_numbers(&this);
23149 // VERSION: 2.10
23150 // Sets whether a number should be added to the items of @menu. The
23151 // numbers are shown to provide a unique character for a mnemonic to
23152 // be used inside ten menu item's label. Only the first the items
23153 // get a number to avoid clashes.
23154 // <show_numbers>: whether to show numbers
23155 void set_show_numbers()(int show_numbers) {
23156 gtk_recent_chooser_menu_set_show_numbers(&this, show_numbers);
23160 struct RecentChooserMenuClass {
23161 MenuClass parent_class;
23162 extern (C) void function () gtk_recent1;
23163 extern (C) void function () gtk_recent2;
23164 extern (C) void function () gtk_recent3;
23165 extern (C) void function () gtk_recent4;
23168 struct RecentChooserMenuPrivate {
23171 struct RecentChooserWidget /* : VBox */ {
23172 mixin Atk.ImplementorIface.__interface__;
23173 mixin Buildable.__interface__;
23174 mixin Orientable.__interface__;
23175 mixin RecentChooser.__interface__;
23176 alias parent_instance this;
23177 alias parent_instance super_;
23178 alias parent_instance vbox;
23179 VBox parent_instance;
23180 private RecentChooserWidgetPrivate* priv;
23183 // VERSION: 2.10
23184 // Creates a new #GtkRecentChooserWidget object. This is an embeddable widget
23185 // used to access the recently used resources list.
23186 // RETURNS: a new #GtkRecentChooserWidget
23187 static RecentChooserWidget* new_()() {
23188 return gtk_recent_chooser_widget_new();
23191 // VERSION: 2.10
23192 // Creates a new #GtkRecentChooserWidget with a specified recent manager.
23193 // This is useful if you have implemented your own recent manager, or if you
23194 // have a customized instance of a #GtkRecentManager object.
23195 // RETURNS: a new #GtkRecentChooserWidget
23196 // <manager>: a #GtkRecentManager
23197 static RecentChooserWidget* new_for_manager()(RecentManager* manager) {
23198 return gtk_recent_chooser_widget_new_for_manager(manager);
23202 struct RecentChooserWidgetClass {
23203 VBoxClass parent_class;
23206 struct RecentChooserWidgetPrivate {
23210 // Meta-data to be passed to gtk_recent_manager_add_full() when
23211 // registering a recently used resource.
23212 struct RecentData {
23213 char* display_name, description, mime_type, app_name, app_exec;
23214 char** groups;
23215 int is_private;
23218 struct RecentFilter /* : Object */ {
23219 alias method_parent this;
23220 alias method_parent super_;
23221 alias method_parent object;
23222 Object method_parent;
23225 // VERSION: 2.10
23226 // Creates a new #GtkRecentFilter with no rules added to it.
23227 // Such filter does not accept any recently used resources, so is not
23228 // particularly useful until you add rules with
23229 // gtk_recent_filter_add_pattern(), gtk_recent_filter_add_mime_type(),
23230 // gtk_recent_filter_add_application(), gtk_recent_filter_add_age().
23231 // To create a filter that accepts any recently used resource, use:
23232 // |[
23233 // GtkRecentFilter *filter = gtk_recent_filter_new ();
23234 // gtk_recent_filter_add_pattern (filter, "*");
23235 // ]|
23236 // RETURNS: a new #GtkRecentFilter
23237 static RecentFilter* new_()() {
23238 return gtk_recent_filter_new();
23241 // VERSION: 2.10
23242 // Adds a rule that allows resources based on their age - that is, the number
23243 // of days elapsed since they were last modified.
23244 // <days>: number of days
23245 void add_age()(int days) {
23246 gtk_recent_filter_add_age(&this, days);
23249 // VERSION: 2.10
23250 // Adds a rule that allows resources based on the name of the application
23251 // that has registered them.
23252 // <application>: an application name
23253 void add_application()(char* application) {
23254 gtk_recent_filter_add_application(&this, application);
23257 // VERSION: 2.10
23258 // Adds a rule to a filter that allows resources based on a custom callback
23259 // function. The bitfield @needed which is passed in provides information
23260 // about what sorts of information that the filter function needs;
23261 // this allows GTK+ to avoid retrieving expensive information when
23262 // it isn't needed by the filter.
23263 // <needed>: bitfield of flags indicating the information that the custom filter function needs.
23264 // <func>: callback function; if the function returns %TRUE, then the file will be displayed.
23265 // <data>: data to pass to @func
23266 // <data_destroy>: function to call to free @data when it is no longer needed.
23267 void add_custom()(RecentFilterFlags needed, RecentFilterFunc func, void* data, GLib2.DestroyNotify data_destroy) {
23268 gtk_recent_filter_add_custom(&this, needed, func, data, data_destroy);
23271 // VERSION: 2.10
23272 // Adds a rule that allows resources based on the name of the group
23273 // to which they belong
23274 // <group>: a group name
23275 void add_group()(char* group) {
23276 gtk_recent_filter_add_group(&this, group);
23279 // VERSION: 2.10
23280 // Adds a rule that allows resources based on their registered MIME type.
23281 // <mime_type>: a MIME type
23282 void add_mime_type()(char* mime_type) {
23283 gtk_recent_filter_add_mime_type(&this, mime_type);
23286 // VERSION: 2.10
23287 // Adds a rule that allows resources based on a pattern matching their
23288 // display name.
23289 // <pattern>: a file pattern
23290 void add_pattern()(char* pattern) {
23291 gtk_recent_filter_add_pattern(&this, pattern);
23294 // VERSION: 2.10
23295 // Adds a rule allowing image files in the formats supported
23296 // by GdkPixbuf.
23297 void add_pixbuf_formats()() {
23298 gtk_recent_filter_add_pixbuf_formats(&this);
23301 // VERSION: 2.10
23302 // Tests whether a file should be displayed according to @filter.
23303 // The #GtkRecentFilterInfo structure @filter_info should include
23304 // the fields returned from gtk_recent_filter_get_needed().
23305 // This function will not typically be used by applications; it
23306 // is intended principally for use in the implementation of
23307 // #GtkRecentChooser.
23308 // RETURNS: %TRUE if the file should be displayed
23309 // <filter_info>: a #GtkRecentFilterInfo structure containing information about a recently used resource
23310 int filter()(RecentFilterInfo* filter_info) {
23311 return gtk_recent_filter_filter(&this, filter_info);
23314 // VERSION: 2.10
23315 // Gets the human-readable name for the filter.
23316 // See gtk_recent_filter_set_name().
23317 // is owned by the filter object and should not be freed.
23318 // RETURNS: the name of the filter, or %NULL. The returned string
23319 char* get_name()() {
23320 return gtk_recent_filter_get_name(&this);
23323 // VERSION: 2.10
23324 // Gets the fields that need to be filled in for the structure
23325 // passed to gtk_recent_filter_filter()
23326 // This function will not typically be used by applications; it
23327 // is intended principally for use in the implementation of
23328 // #GtkRecentChooser.
23329 // calling gtk_recent_filter_filter()
23330 // RETURNS: bitfield of flags indicating needed fields when
23331 RecentFilterFlags get_needed()() {
23332 return gtk_recent_filter_get_needed(&this);
23335 // VERSION: 2.10
23336 // Sets the human-readable name of the filter; this is the string
23337 // that will be displayed in the recently used resources selector
23338 // user interface if there is a selectable list of filters.
23339 // <name>: then human readable name of @filter
23340 void set_name()(char* name) {
23341 gtk_recent_filter_set_name(&this, name);
23345 enum RecentFilterFlags {
23346 URI = 1,
23347 DISPLAY_NAME = 2,
23348 MIME_TYPE = 4,
23349 APPLICATION = 8,
23350 GROUP = 16,
23351 AGE = 32
23353 extern (C) alias int function (RecentFilterInfo* filter_info, void* user_data) RecentFilterFunc;
23355 struct RecentFilterInfo {
23356 RecentFilterFlags contains;
23357 char* uri, display_name, mime_type;
23358 char** applications, groups;
23359 int age;
23362 struct RecentInfo {
23364 // VERSION: 2.10
23365 // Checks whether the resource pointed by @info still exists. At
23366 // the moment this check is done only on resources pointing to local files.
23367 // RETURNS: %TRUE if the resource exists
23368 int exists()() {
23369 return gtk_recent_info_exists(&this);
23372 // VERSION: 2.10
23373 // Gets the timestamp (seconds from system's Epoch) when the resource
23374 // was added to the recently used resources list.
23375 // the resource was added to the list, or -1 on failure.
23376 // RETURNS: the number of seconds elapsed from system's Epoch when
23377 time_t get_added()() {
23378 return gtk_recent_info_get_added(&this);
23381 // VERSION: 2.10
23382 // Gets the number of days elapsed since the last update of the resource
23383 // pointed by @info.
23384 // since the time this resource was last modified.
23385 // RETURNS: a positive integer containing the number of days elapsed
23386 int get_age()() {
23387 return gtk_recent_info_get_age(&this);
23390 // VERSION: 2.10
23391 // Gets the data regarding the application that has registered the resource
23392 // pointed by @info.
23393 // If the command line contains any escape characters defined inside the
23394 // storage specification, they will be expanded.
23395 // resource inside the recently used list, or %FALSE otherwise. The
23396 // modified or freed
23397 // RETURNS: %TRUE if an application with @app_name has registered this
23398 // <app_name>: the name of the application that has registered this item
23399 // <app_exec>: return location for the string containing the command line
23400 // <count>: return location for the number of times this item was registered
23401 // <time_>: return location for the timestamp this item was last registered for this application
23402 int get_application_info()(char* app_name, /*out*/ char** app_exec, /*out*/ uint* count, /*out*/ time_t* time_) {
23403 return gtk_recent_info_get_application_info(&this, app_name, app_exec, count, time_);
23406 // VERSION: 2.10
23407 // Retrieves the list of applications that have registered this resource.
23408 // a newly allocated %NULL-terminated array of strings.
23409 // Use g_strfreev() to free it.
23410 // <length>: return location for the length of the returned list
23411 char** /*new*/ get_applications()(/*out*/ size_t* length=null) {
23412 return gtk_recent_info_get_applications(&this, length);
23415 // VERSION: 2.10
23416 // Gets the (short) description of the resource.
23417 // is owned by the recent manager, and should not be freed.
23418 // RETURNS: the description of the resource. The returned string
23419 char* get_description()() {
23420 return gtk_recent_info_get_description(&this);
23423 // VERSION: 2.10
23424 // Gets the name of the resource. If none has been defined, the basename
23425 // of the resource is obtained.
23426 // is owned by the recent manager, and should not be freed.
23427 // RETURNS: the display name of the resource. The returned string
23428 char* get_display_name()() {
23429 return gtk_recent_info_get_display_name(&this);
23432 // VERSION: 2.10
23433 // Returns all groups registered for the recently used item @info. The
23434 // array of returned group names will be %NULL terminated, so length might
23435 // optionally be %NULL.
23436 // a newly allocated %NULL terminated array of strings.
23437 // Use g_strfreev() to free it.
23438 // <length>: return location for the number of groups returned
23439 char** /*new*/ get_groups()(/*out*/ size_t* length=null) {
23440 return gtk_recent_info_get_groups(&this, length);
23443 // VERSION: 2.10
23444 // Retrieves the icon of size @size associated to the resource MIME type.
23445 // or %NULL. Use g_object_unref() when finished using the icon.
23446 // RETURNS: a #GdkPixbuf containing the icon,
23447 // <size>: the size of the icon in pixels
23448 GdkPixbuf2.Pixbuf* /*new*/ get_icon()(int size) {
23449 return gtk_recent_info_get_icon(&this, size);
23452 // VERSION: 2.10
23453 // Gets the MIME type of the resource.
23454 // is owned by the recent manager, and should not be freed.
23455 // RETURNS: the MIME type of the resource. The returned string
23456 char* get_mime_type()() {
23457 return gtk_recent_info_get_mime_type(&this);
23460 // VERSION: 2.10
23461 // Gets the timestamp (seconds from system's Epoch) when the resource
23462 // was last modified.
23463 // the resource was last modified, or -1 on failure.
23464 // RETURNS: the number of seconds elapsed from system's Epoch when
23465 time_t get_modified()() {
23466 return gtk_recent_info_get_modified(&this);
23469 // VERSION: 2.10
23470 // Gets the value of the "private" flag. Resources in the recently used
23471 // list that have this flag set to %TRUE should only be displayed by the
23472 // applications that have registered them.
23473 // RETURNS: %TRUE if the private flag was found, %FALSE otherwise.
23474 int get_private_hint()() {
23475 return gtk_recent_info_get_private_hint(&this);
23478 // VERSION: 2.10
23479 // Computes a valid UTF-8 string that can be used as the name of the item in a
23480 // menu or list. For example, calling this function on an item that refers to
23481 // "file:///foo/bar.txt" will yield "bar.txt".
23482 // g_free().
23483 // RETURNS: A newly-allocated string in UTF-8 encoding; free it with
23484 char* /*new*/ get_short_name()() {
23485 return gtk_recent_info_get_short_name(&this);
23488 // VERSION: 2.10
23489 // Gets the URI of the resource.
23490 // owned by the recent manager, and should not be freed.
23491 // RETURNS: the URI of the resource. The returned string is
23492 char* get_uri()() {
23493 return gtk_recent_info_get_uri(&this);
23496 // VERSION: 2.10
23497 // Gets a displayable version of the resource's URI. If the resource
23498 // is local, it returns a local path; if the resource is not local,
23499 // it returns the UTF-8 encoded content of gtk_recent_info_get_uri().
23500 // resource's URI or %NULL. Use g_free() when done using it.
23501 // RETURNS: a newly allocated UTF-8 string containing the
23502 char* /*new*/ get_uri_display()() {
23503 return gtk_recent_info_get_uri_display(&this);
23506 // VERSION: 2.10
23507 // Gets the timestamp (seconds from system's Epoch) when the resource
23508 // was last visited.
23509 // the resource was last visited, or -1 on failure.
23510 // RETURNS: the number of seconds elapsed from system's Epoch when
23511 time_t get_visited()() {
23512 return gtk_recent_info_get_visited(&this);
23515 // VERSION: 2.10
23516 // Checks whether an application registered this resource using @app_name.
23517 // %FALSE otherwise.
23518 // RETURNS: %TRUE if an application with name @app_name was found,
23519 // <app_name>: a string containing an application name
23520 int has_application()(char* app_name) {
23521 return gtk_recent_info_has_application(&this, app_name);
23524 // VERSION: 2.10
23525 // Checks whether @group_name appears inside the groups registered for the
23526 // recently used item @info.
23527 // RETURNS: %TRUE if the group was found.
23528 // <group_name>: name of a group
23529 int has_group()(char* group_name) {
23530 return gtk_recent_info_has_group(&this, group_name);
23533 // VERSION: 2.10
23534 // Checks whether the resource is local or not by looking at the
23535 // scheme of its URI.
23536 // RETURNS: %TRUE if the resource is local.
23537 int is_local()() {
23538 return gtk_recent_info_is_local(&this);
23541 // VERSION: 2.10
23542 // Gets the name of the last application that have registered the
23543 // recently used resource represented by @info.
23544 // RETURNS: an application name. Use g_free() to free it.
23545 char* /*new*/ last_application()() {
23546 return gtk_recent_info_last_application(&this);
23549 // VERSION: 2.10
23550 // Checks whether two #GtkRecentInfo structures point to the same
23551 // resource.
23552 // resource, %FALSE otherwise.
23553 // RETURNS: %TRUE if both #GtkRecentInfo structures point to se same
23554 // <info_b>: a #GtkRecentInfo
23555 int match()(RecentInfo* info_b) {
23556 return gtk_recent_info_match(&this, info_b);
23559 // VERSION: 2.10
23560 // Increases the reference count of @recent_info by one.
23561 // by one.
23562 // RETURNS: the recent info object with its reference count increased
23563 RecentInfo* /*new*/ ref_()() {
23564 return gtk_recent_info_ref(&this);
23567 // VERSION: 2.10
23568 // Decreases the reference count of @info by one. If the reference
23569 // count reaches zero, @info is deallocated, and the memory freed.
23570 void unref()() {
23571 gtk_recent_info_unref(&this);
23575 struct RecentManager /* : GObject.Object */ {
23576 alias parent_instance this;
23577 alias parent_instance super_;
23578 alias parent_instance object;
23579 GObject2.Object parent_instance;
23580 private RecentManagerPrivate* priv;
23583 // VERSION: 2.10
23584 // Creates a new recent manager object. Recent manager objects are used to
23585 // handle the list of recently used resources. A #GtkRecentManager object
23586 // monitors the recently used resources list, and emits the "changed" signal
23587 // each time something inside the list changes.
23588 // #GtkRecentManager objects are expensive: be sure to create them only when
23589 // needed. You should use gtk_recent_manager_get_default() instead.
23590 // RETURNS: A newly created #GtkRecentManager object.
23591 static RecentManager* /*new*/ new_()() {
23592 return gtk_recent_manager_new();
23595 // VERSION: 2.10
23596 // Gets a unique instance of #GtkRecentManager, that you can share
23597 // in your application without caring about memory management. The
23598 // returned instance will be freed when you application terminates.
23599 // RETURNS: A unique #GtkRecentManager. Do not ref or unref it.
23600 static RecentManager* get_default()() {
23601 return gtk_recent_manager_get_default();
23604 // Unintrospectable function: get_for_screen() / gtk_recent_manager_get_for_screen()
23605 // VERSION: 2.10
23606 // DEPRECATED (v2.12) function: get_for_screen - This function has been deprecated and should
23607 // Gets the recent manager object associated with @screen; if this
23608 // function has not previously been called for the given screen,
23609 // a new recent manager object will be created and associated with
23610 // the screen. Recent manager objects are fairly expensive to create,
23611 // so using this function is usually a better choice than calling
23612 // gtk_recent_manager_new() and setting the screen yourself; by using
23613 // this function a single recent manager object will be shared between
23614 // users.
23615 // screen. This recent manager is associated to the with the screen
23616 // and can be used as long as the screen is open. Do not ref or
23617 // unref it.
23618 // not be used in newly written code. Calling this function is
23619 // equivalent to calling gtk_recent_manager_get_default().
23620 // RETURNS: A unique #GtkRecentManager associated with the given
23621 // <screen>: a #GdkScreen
23622 static RecentManager* get_for_screen()(Gdk2.Screen* screen) {
23623 return gtk_recent_manager_get_for_screen(screen);
23626 // VERSION: 2.10
23627 // Adds a new resource, pointed by @uri, into the recently used
23628 // resources list, using the metadata specified inside the #GtkRecentData
23629 // structure passed in @recent_data.
23630 // The passed URI will be used to identify this resource inside the
23631 // list.
23632 // In order to register the new recently used resource, metadata about
23633 // the resource must be passed as well as the URI; the metadata is
23634 // stored in a #GtkRecentData structure, which must contain the MIME
23635 // type of the resource pointed by the URI; the name of the application
23636 // that is registering the item, and a command line to be used when
23637 // launching the item.
23638 // Optionally, a #GtkRecentData structure might contain a UTF-8 string
23639 // to be used when viewing the item instead of the last component of the
23640 // URI; a short description of the item; whether the item should be
23641 // considered private - that is, should be displayed only by the
23642 // applications that have registered it.
23643 // recently used resources list, %FALSE otherwise.
23644 // RETURNS: %TRUE if the new item was successfully added to the
23645 // <uri>: a valid URI
23646 // <recent_data>: metadata of the resource
23647 int add_full()(char* uri, RecentData* recent_data) {
23648 return gtk_recent_manager_add_full(&this, uri, recent_data);
23651 // VERSION: 2.10
23652 // Adds a new resource, pointed by @uri, into the recently used
23653 // resources list.
23654 // This function automatically retrieves some of the needed
23655 // metadata and setting other metadata to common default values; it
23656 // then feeds the data to gtk_recent_manager_add_full().
23657 // See gtk_recent_manager_add_full() if you want to explicitly
23658 // define the metadata for the resource pointed by @uri.
23659 // to the recently used resources list
23660 // RETURNS: %TRUE if the new item was successfully added
23661 // <uri>: a valid URI
23662 int add_item()(char* uri) {
23663 return gtk_recent_manager_add_item(&this, uri);
23666 // VERSION: 2.10
23667 // Gets the list of recently used resources.
23668 // newly allocated #GtkRecentInfo objects. Use
23669 // gtk_recent_info_unref() on each item inside the list, and then
23670 // free the list itself using g_list_free().
23671 // RETURNS: a list of
23672 GLib2.List* /*new*/ get_items()() {
23673 return gtk_recent_manager_get_items(&this);
23676 // VERSION: 2.10
23677 // DEPRECATED (v2.22) method: get_limit - The length of the list should be managed by the
23678 // Gets the maximum number of items that the gtk_recent_manager_get_items()
23679 // function should return.
23680 // view (implementing #GtkRecentChooser), and not by the model (the
23681 // #GtkRecentManager). See #GtkRecentChooser:limit.
23682 // RETURNS: the number of items to return, or -1 for every item.
23683 int get_limit()() {
23684 return gtk_recent_manager_get_limit(&this);
23687 // VERSION: 2.10
23688 // Checks whether there is a recently used resource registered
23689 // with @uri inside the recent manager.
23690 // RETURNS: %TRUE if the resource was found, %FALSE otherwise.
23691 // <uri>: a URI
23692 int has_item()(char* uri) {
23693 return gtk_recent_manager_has_item(&this, uri);
23696 // VERSION: 2.10
23697 // Searches for a URI inside the recently used resources list, and
23698 // returns a structure containing informations about the resource
23699 // like its MIME type, or its display name.
23700 // about the resource pointed by @uri, or %NULL if the URI was
23701 // not registered in the recently used resources list. Free with
23702 // gtk_recent_info_unref().
23703 // RETURNS: a #GtkRecentInfo structure containing information
23704 // <uri>: a URI
23705 RecentInfo* /*new*/ lookup_item()(char* uri, GLib2.Error** error=null) {
23706 return gtk_recent_manager_lookup_item(&this, uri, error);
23709 // VERSION: 2.10
23710 // Changes the location of a recently used resource from @uri to @new_uri.
23711 // Please note that this function will not affect the resource pointed
23712 // by the URIs, but only the URI used in the recently used resources list.
23713 // RETURNS: %TRUE on success.
23714 // <uri>: the URI of a recently used resource
23715 // <new_uri>: the new URI of the recently used resource, or %NULL to remove the item pointed by @uri in the list
23716 int move_item()(char* uri, char* new_uri, GLib2.Error** error=null) {
23717 return gtk_recent_manager_move_item(&this, uri, new_uri, error);
23720 // VERSION: 2.10
23721 // Purges every item from the recently used resources list.
23722 // recently used resources list.
23723 // RETURNS: the number of items that have been removed from the
23724 int purge_items()(GLib2.Error** error=null) {
23725 return gtk_recent_manager_purge_items(&this, error);
23728 // VERSION: 2.10
23729 // Removes a resource pointed by @uri from the recently used resources
23730 // list handled by a recent manager.
23731 // removed by the recently used resources list, and %FALSE otherwise.
23732 // RETURNS: %TRUE if the item pointed by @uri has been successfully
23733 // <uri>: the URI of the item you wish to remove
23734 int remove_item()(char* uri, GLib2.Error** error=null) {
23735 return gtk_recent_manager_remove_item(&this, uri, error);
23738 // VERSION: 2.10
23739 // DEPRECATED (v2.22) method: set_limit - The length of the list should be managed by the
23740 // Sets the maximum number of item that the gtk_recent_manager_get_items()
23741 // function should return. If @limit is set to -1, then return all the
23742 // items.
23743 // view (implementing #GtkRecentChooser), and not by the model (the
23744 // #GtkRecentManager). See #GtkRecentChooser:limit.
23745 // <limit>: the maximum number of items to return, or -1.
23746 void set_limit()(int limit) {
23747 gtk_recent_manager_set_limit(&this, limit);
23750 // VERSION: 2.10
23751 // DEPRECATED (v2.12) method: set_screen - This function has been deprecated and should
23752 // Sets the screen for a recent manager; the screen is used to
23753 // track the user's currently configured recently used documents
23754 // storage.
23755 // not be used in newly written code. Calling this function has
23756 // no effect.
23757 // <screen>: a #GdkScreen
23758 void set_screen()(Gdk2.Screen* screen) {
23759 gtk_recent_manager_set_screen(&this, screen);
23762 // VERSION: 2.10
23763 // Emitted when the current recently used resources manager changes its
23764 // contents.
23765 extern (C) alias static void function (RecentManager* this_, void* user_data=null) signal_changed;
23767 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23768 return super_.signal_connect!name(cb, data, cf);
23771 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
23772 return signal_connect_data!()(&this, cast(char*)"changed",
23773 cast(GObject2.Callback)cb, data, null, cf);
23777 struct RecentManagerClass {
23778 private GObject2.ObjectClass parent_class;
23779 extern (C) void function (RecentManager* manager) changed;
23780 extern (C) void function () _gtk_recent1;
23781 extern (C) void function () _gtk_recent2;
23782 extern (C) void function () _gtk_recent3;
23783 extern (C) void function () _gtk_recent4;
23786 // Error codes for GtkRecentManager operations
23787 enum RecentManagerError {
23788 NOT_FOUND = 0,
23789 INVALID_URI = 1,
23790 INVALID_ENCODING = 2,
23791 NOT_REGISTERED = 3,
23792 READ = 4,
23793 WRITE = 5,
23794 UNKNOWN = 6
23796 struct RecentManagerPrivate {
23799 extern (C) alias int function (RecentInfo* a, RecentInfo* b, void* user_data) RecentSortFunc;
23802 // Used to specify the sorting method to be applyed to the recently
23803 // used resource list.
23804 enum RecentSortType {
23805 NONE = 0,
23806 MRU = 1,
23807 LRU = 2,
23808 CUSTOM = 3
23810 enum ReliefStyle {
23811 NORMAL = 0,
23812 HALF = 1,
23813 NONE = 2
23816 // A <structname>GtkRequisition</structname> represents the desired size of a widget. See
23817 // <xref linkend="size-requisition"/> for more information.
23818 struct Requisition {
23819 int width, height;
23822 // Copies a #GtkRequisition.
23823 // RETURNS: a copy of @requisition
23824 Requisition* /*new*/ copy()() {
23825 return gtk_requisition_copy(&this);
23827 // Frees a #GtkRequisition.
23828 void free()() {
23829 gtk_requisition_free(&this);
23833 enum ResizeMode {
23834 PARENT = 0,
23835 QUEUE = 1,
23836 IMMEDIATE = 2
23838 enum ResponseType {
23839 NONE = -1,
23840 REJECT = -2,
23841 ACCEPT = -3,
23842 DELETE_EVENT = -4,
23843 OK = -5,
23844 CANCEL = -6,
23845 CLOSE = -7,
23846 YES = -8,
23847 NO = -9,
23848 APPLY = -10,
23849 HELP = -11
23851 struct Ruler /* : Widget */ {
23852 mixin Atk.ImplementorIface.__interface__;
23853 mixin Buildable.__interface__;
23854 mixin Orientable.__interface__;
23855 alias widget this;
23856 alias widget super_;
23857 Widget widget;
23858 Gdk2.Pixmap* backing_store;
23859 Gdk2.GC* non_gr_exp_gc;
23860 RulerMetric* metric;
23861 int xsrc, ysrc, slider_size;
23862 double lower, upper, position, max_size;
23864 void draw_pos()() {
23865 gtk_ruler_draw_pos(&this);
23867 void draw_ticks()() {
23868 gtk_ruler_draw_ticks(&this);
23871 // Gets the units used for a #GtkRuler. See gtk_ruler_set_metric().
23872 // unmaintained and too specialized. There is no replacement.
23873 // RETURNS: the units currently used for @ruler
23874 MetricType get_metric()() {
23875 return gtk_ruler_get_metric(&this);
23878 // Retrieves values indicating the range and current position of a #GtkRuler.
23879 // See gtk_ruler_set_range().
23880 // unmaintained and too specialized. There is no replacement.
23881 // <lower>: location to store lower limit of the ruler, or %NULL
23882 // <upper>: location to store upper limit of the ruler, or %NULL
23883 // <position>: location to store the current position of the mark on the ruler, or %NULL
23884 // <max_size>: location to store the maximum size of the ruler used when calculating the space to leave for the text, or %NULL.
23885 void get_range()(double* lower, double* upper, double* position, double* max_size) {
23886 gtk_ruler_get_range(&this, lower, upper, position, max_size);
23888 void set_metric()(MetricType metric) {
23889 gtk_ruler_set_metric(&this, metric);
23892 // This sets the range of the ruler.
23893 // unmaintained and too specialized. There is no replacement.
23894 // <lower>: the lower limit of the ruler
23895 // <upper>: the upper limit of the ruler
23896 // <position>: the mark on the ruler
23897 // <max_size>: the maximum size of the ruler used when calculating the space to leave for the text
23898 void set_range()(double lower, double upper, double position, double max_size) {
23899 gtk_ruler_set_range(&this, lower, upper, position, max_size);
23903 struct RulerClass {
23904 WidgetClass parent_class;
23905 extern (C) void function (Ruler* ruler) draw_ticks;
23906 extern (C) void function (Ruler* ruler) draw_pos;
23907 extern (C) void function () _gtk_reserved1;
23908 extern (C) void function () _gtk_reserved2;
23909 extern (C) void function () _gtk_reserved3;
23910 extern (C) void function () _gtk_reserved4;
23913 struct RulerMetric {
23914 char* metric_name, abbrev;
23915 double pixels_per_unit;
23916 double[10] ruler_scale;
23917 int[5] subdivide;
23920 enum STOCK_ABOUT = "gtk-about";
23921 enum STOCK_ADD = "gtk-add";
23922 enum STOCK_APPLY = "gtk-apply";
23923 enum STOCK_BOLD = "gtk-bold";
23924 enum STOCK_CANCEL = "gtk-cancel";
23925 enum STOCK_CAPS_LOCK_WARNING = "gtk-caps-lock-warning";
23926 enum STOCK_CDROM = "gtk-cdrom";
23927 enum STOCK_CLEAR = "gtk-clear";
23928 enum STOCK_CLOSE = "gtk-close";
23929 enum STOCK_COLOR_PICKER = "gtk-color-picker";
23930 enum STOCK_CONNECT = "gtk-connect";
23931 enum STOCK_CONVERT = "gtk-convert";
23932 enum STOCK_COPY = "gtk-copy";
23933 enum STOCK_CUT = "gtk-cut";
23934 enum STOCK_DELETE = "gtk-delete";
23935 enum STOCK_DIALOG_AUTHENTICATION = "gtk-dialog-authentication";
23936 enum STOCK_DIALOG_ERROR = "gtk-dialog-error";
23937 enum STOCK_DIALOG_INFO = "gtk-dialog-info";
23938 enum STOCK_DIALOG_QUESTION = "gtk-dialog-question";
23939 enum STOCK_DIALOG_WARNING = "gtk-dialog-warning";
23940 enum STOCK_DIRECTORY = "gtk-directory";
23941 enum STOCK_DISCARD = "gtk-discard";
23942 enum STOCK_DISCONNECT = "gtk-disconnect";
23943 enum STOCK_DND = "gtk-dnd";
23944 enum STOCK_DND_MULTIPLE = "gtk-dnd-multiple";
23945 enum STOCK_EDIT = "gtk-edit";
23946 enum STOCK_EXECUTE = "gtk-execute";
23947 enum STOCK_FILE = "gtk-file";
23948 enum STOCK_FIND = "gtk-find";
23949 enum STOCK_FIND_AND_REPLACE = "gtk-find-and-replace";
23950 enum STOCK_FLOPPY = "gtk-floppy";
23951 enum STOCK_FULLSCREEN = "gtk-fullscreen";
23952 enum STOCK_GOTO_BOTTOM = "gtk-goto-bottom";
23953 enum STOCK_GOTO_FIRST = "gtk-goto-first";
23954 enum STOCK_GOTO_LAST = "gtk-goto-last";
23955 enum STOCK_GOTO_TOP = "gtk-goto-top";
23956 enum STOCK_GO_BACK = "gtk-go-back";
23957 enum STOCK_GO_DOWN = "gtk-go-down";
23958 enum STOCK_GO_FORWARD = "gtk-go-forward";
23959 enum STOCK_GO_UP = "gtk-go-up";
23960 enum STOCK_HARDDISK = "gtk-harddisk";
23961 enum STOCK_HELP = "gtk-help";
23962 enum STOCK_HOME = "gtk-home";
23963 enum STOCK_INDENT = "gtk-indent";
23964 enum STOCK_INDEX = "gtk-index";
23965 enum STOCK_INFO = "gtk-info";
23966 enum STOCK_ITALIC = "gtk-italic";
23967 enum STOCK_JUMP_TO = "gtk-jump-to";
23968 enum STOCK_JUSTIFY_CENTER = "gtk-justify-center";
23969 enum STOCK_JUSTIFY_FILL = "gtk-justify-fill";
23970 enum STOCK_JUSTIFY_LEFT = "gtk-justify-left";
23971 enum STOCK_JUSTIFY_RIGHT = "gtk-justify-right";
23972 enum STOCK_LEAVE_FULLSCREEN = "gtk-leave-fullscreen";
23973 enum STOCK_MEDIA_FORWARD = "gtk-media-forward";
23974 enum STOCK_MEDIA_NEXT = "gtk-media-next";
23975 enum STOCK_MEDIA_PAUSE = "gtk-media-pause";
23976 enum STOCK_MEDIA_PLAY = "gtk-media-play";
23977 enum STOCK_MEDIA_PREVIOUS = "gtk-media-previous";
23978 enum STOCK_MEDIA_RECORD = "gtk-media-record";
23979 enum STOCK_MEDIA_REWIND = "gtk-media-rewind";
23980 enum STOCK_MEDIA_STOP = "gtk-media-stop";
23981 enum STOCK_MISSING_IMAGE = "gtk-missing-image";
23982 enum STOCK_NETWORK = "gtk-network";
23983 enum STOCK_NEW = "gtk-new";
23984 enum STOCK_NO = "gtk-no";
23985 enum STOCK_OK = "gtk-ok";
23986 enum STOCK_OPEN = "gtk-open";
23987 enum STOCK_ORIENTATION_LANDSCAPE = "gtk-orientation-landscape";
23988 enum STOCK_ORIENTATION_PORTRAIT = "gtk-orientation-portrait";
23989 enum STOCK_ORIENTATION_REVERSE_LANDSCAPE = "gtk-orientation-reverse-landscape";
23990 enum STOCK_ORIENTATION_REVERSE_PORTRAIT = "gtk-orientation-reverse-portrait";
23991 enum STOCK_PAGE_SETUP = "gtk-page-setup";
23992 enum STOCK_PASTE = "gtk-paste";
23993 enum STOCK_PREFERENCES = "gtk-preferences";
23994 enum STOCK_PRINT = "gtk-print";
23995 enum STOCK_PRINT_ERROR = "gtk-print-error";
23996 enum STOCK_PRINT_PAUSED = "gtk-print-paused";
23997 enum STOCK_PRINT_PREVIEW = "gtk-print-preview";
23998 enum STOCK_PRINT_REPORT = "gtk-print-report";
23999 enum STOCK_PRINT_WARNING = "gtk-print-warning";
24000 enum STOCK_PROPERTIES = "gtk-properties";
24001 enum STOCK_QUIT = "gtk-quit";
24002 enum STOCK_REDO = "gtk-redo";
24003 enum STOCK_REFRESH = "gtk-refresh";
24004 enum STOCK_REMOVE = "gtk-remove";
24005 enum STOCK_REVERT_TO_SAVED = "gtk-revert-to-saved";
24006 enum STOCK_SAVE = "gtk-save";
24007 enum STOCK_SAVE_AS = "gtk-save-as";
24008 enum STOCK_SELECT_ALL = "gtk-select-all";
24009 enum STOCK_SELECT_COLOR = "gtk-select-color";
24010 enum STOCK_SELECT_FONT = "gtk-select-font";
24011 enum STOCK_SORT_ASCENDING = "gtk-sort-ascending";
24012 enum STOCK_SORT_DESCENDING = "gtk-sort-descending";
24013 enum STOCK_SPELL_CHECK = "gtk-spell-check";
24014 enum STOCK_STOP = "gtk-stop";
24015 enum STOCK_STRIKETHROUGH = "gtk-strikethrough";
24016 enum STOCK_UNDELETE = "gtk-undelete";
24017 enum STOCK_UNDERLINE = "gtk-underline";
24018 enum STOCK_UNDO = "gtk-undo";
24019 enum STOCK_UNINDENT = "gtk-unindent";
24020 enum STOCK_YES = "gtk-yes";
24021 enum STOCK_ZOOM_100 = "gtk-zoom-100";
24022 enum STOCK_ZOOM_FIT = "gtk-zoom-fit";
24023 enum STOCK_ZOOM_IN = "gtk-zoom-in";
24024 enum STOCK_ZOOM_OUT = "gtk-zoom-out";
24025 struct Scale /* : Range */ {
24026 mixin Atk.ImplementorIface.__interface__;
24027 mixin Buildable.__interface__;
24028 mixin Orientable.__interface__;
24029 alias range this;
24030 alias range super_;
24031 Range range;
24032 int digits;
24033 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24034 uint, "draw_value", 1,
24035 uint, "value_pos", 2,
24036 uint, "__dummy32A", 29));
24039 // VERSION: 2.16
24040 // Adds a mark at @value.
24041 // A mark is indicated visually by drawing a tick mark next to the scale,
24042 // and GTK+ makes it easy for the user to position the scale exactly at the
24043 // marks value.
24044 // If @markup is not %NULL, text is shown next to the tick mark.
24045 // To remove marks from a scale, use gtk_scale_clear_marks().
24046 // <value>: the value at which the mark is placed, must be between the lower and upper limits of the scales' adjustment
24047 // <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.
24048 // <markup>: Text to be shown at the mark, using <link linkend="PangoMarkupFormat">Pango markup</link>, or %NULL
24049 void add_mark()(double value, PositionType position, char* markup=null) {
24050 gtk_scale_add_mark(&this, value, position, markup);
24053 // VERSION: 2.16
24054 // Removes any marks that have been added with gtk_scale_add_mark().
24055 void clear_marks()() {
24056 gtk_scale_clear_marks(&this);
24059 // Gets the number of decimal places that are displayed in the value.
24060 // RETURNS: the number of decimal places that are displayed
24061 int get_digits()() {
24062 return gtk_scale_get_digits(&this);
24065 // Returns whether the current value is displayed as a string
24066 // next to the slider.
24067 // RETURNS: whether the current value is displayed as a string
24068 int get_draw_value()() {
24069 return gtk_scale_get_draw_value(&this);
24072 // VERSION: 2.4
24073 // Gets the #PangoLayout used to display the scale. The returned
24074 // object is owned by the scale so does not need to be freed by
24075 // the caller.
24076 // or %NULL if the #GtkScale:draw-value property is %FALSE.
24077 // RETURNS: the #PangoLayout for this scale,
24078 Pango.Layout* get_layout()() {
24079 return gtk_scale_get_layout(&this);
24082 // VERSION: 2.4
24083 // Obtains the coordinates where the scale will draw the
24084 // #PangoLayout representing the text in the scale. Remember
24085 // when using the #PangoLayout function you need to convert to
24086 // and from pixels using PANGO_PIXELS() or #PANGO_SCALE.
24087 // If the #GtkScale:draw-value property is %FALSE, the return
24088 // values are undefined.
24089 // <x>: location to store X offset of layout, or %NULL
24090 // <y>: location to store Y offset of layout, or %NULL
24091 void get_layout_offsets()(/*out*/ int* x=null, /*out*/ int* y=null) {
24092 gtk_scale_get_layout_offsets(&this, x, y);
24095 // Gets the position in which the current value is displayed.
24096 // RETURNS: the position in which the current value is displayed
24097 PositionType get_value_pos()() {
24098 return gtk_scale_get_value_pos(&this);
24101 // Sets the number of decimal places that are displayed in the value.
24102 // Also causes the value of the adjustment to be rounded off to this
24103 // number of digits, so the retrieved value matches the value the user saw.
24104 // <digits>: the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00, etc
24105 void set_digits()(int digits) {
24106 gtk_scale_set_digits(&this, digits);
24109 // Specifies whether the current value is displayed as a string next
24110 // to the slider.
24111 // <draw_value>: %TRUE to draw the value
24112 void set_draw_value()(int draw_value) {
24113 gtk_scale_set_draw_value(&this, draw_value);
24116 // Sets the position in which the current value is displayed.
24117 // <pos>: the position in which the current value is displayed
24118 void set_value_pos()(PositionType pos) {
24119 gtk_scale_set_value_pos(&this, pos);
24122 // Signal which allows you to change how the scale value is displayed.
24123 // Connect a signal handler which returns an allocated string representing
24124 // Here's an example signal handler which displays a value 1.0 as
24125 // with "--&gt;1.0&lt;--".
24126 // |[
24127 // static gchar*
24128 // format_value_callback (GtkScale *scale,
24129 // gdouble value)
24130 // {
24131 // return g_strdup_printf ("--&gt;&percnt;0.*g&lt;--",
24132 // gtk_scale_get_digits (scale), value);
24133 // }
24134 // ]|
24135 // RETURNS: allocated string representing @value
24136 // <value>: the value to format
24137 extern (C) alias static char* /*new*/ function (Scale* this_, double value, void* user_data=null) signal_format_value;
24139 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24140 return super_.signal_connect!name(cb, data, cf);
24143 ulong signal_connect(string name:"format-value", CB:signal_format_value)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24144 return signal_connect_data!()(&this, cast(char*)"format-value",
24145 cast(GObject2.Callback)cb, data, null, cf);
24149 struct ScaleButton /* : Button */ {
24150 mixin Atk.ImplementorIface.__interface__;
24151 mixin Activatable.__interface__;
24152 mixin Buildable.__interface__;
24153 mixin Orientable.__interface__;
24154 alias parent this;
24155 alias parent super_;
24156 alias parent button;
24157 Button parent;
24158 Widget* plus_button, minus_button;
24159 private ScaleButtonPrivate* priv;
24162 // VERSION: 2.12
24163 // Creates a #GtkScaleButton, with a range between @min and @max, with
24164 // a stepping of @step.
24165 // RETURNS: a new #GtkScaleButton
24166 // <size>: a stock icon size
24167 // <min>: the minimum value of the scale (usually 0)
24168 // <max>: the maximum value of the scale (usually 100)
24169 // <step>: the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2)
24170 // <icons>: a %NULL-terminated array of icon names, or %NULL if you want to set the list later with gtk_scale_button_set_icons()
24171 static ScaleButton* new_()(IconSize size, double min, double max, double step, char** icons=null) {
24172 return gtk_scale_button_new(size, min, max, step, icons);
24175 // VERSION: 2.12
24176 // Gets the #GtkAdjustment associated with the #GtkScaleButton's scale.
24177 // See gtk_range_get_adjustment() for details.
24178 // RETURNS: the adjustment associated with the scale
24179 Adjustment* get_adjustment()() {
24180 return gtk_scale_button_get_adjustment(&this);
24183 // VERSION: 2.14
24184 // Retrieves the minus button of the #GtkScaleButton.
24185 // RETURNS: the minus button of the #GtkScaleButton
24186 Widget* get_minus_button()() {
24187 return gtk_scale_button_get_minus_button(&this);
24190 // VERSION: 2.14
24191 // DEPRECATED (v2.16) method: get_orientation - Use gtk_orientable_get_orientation() instead.
24192 // Gets the orientation of the #GtkScaleButton's popup window.
24193 // RETURNS: the #GtkScaleButton's orientation.
24194 Orientation get_orientation()() {
24195 return gtk_scale_button_get_orientation(&this);
24198 // VERSION: 2.14
24199 // Retrieves the plus button of the #GtkScaleButton.
24200 // RETURNS: the plus button of the #GtkScaleButton
24201 Widget* get_plus_button()() {
24202 return gtk_scale_button_get_plus_button(&this);
24205 // VERSION: 2.14
24206 // Retrieves the popup of the #GtkScaleButton.
24207 // RETURNS: the popup of the #GtkScaleButton
24208 Widget* get_popup()() {
24209 return gtk_scale_button_get_popup(&this);
24212 // VERSION: 2.12
24213 // Gets the current value of the scale button.
24214 // RETURNS: current value of the scale button
24215 double get_value()() {
24216 return gtk_scale_button_get_value(&this);
24219 // VERSION: 2.12
24220 // Sets the #GtkAdjustment to be used as a model
24221 // for the #GtkScaleButton's scale.
24222 // See gtk_range_set_adjustment() for details.
24223 // <adjustment>: a #GtkAdjustment
24224 void set_adjustment()(Adjustment* adjustment) {
24225 gtk_scale_button_set_adjustment(&this, adjustment);
24228 // VERSION: 2.12
24229 // Sets the icons to be used by the scale button.
24230 // For details, see the #GtkScaleButton:icons property.
24231 // <icons>: a %NULL-terminated array of icon names
24232 void set_icons()(char** icons) {
24233 gtk_scale_button_set_icons(&this, icons);
24236 // VERSION: 2.14
24237 // DEPRECATED (v2.16) method: set_orientation - Use gtk_orientable_set_orientation() instead.
24238 // Sets the orientation of the #GtkScaleButton's popup window.
24239 // <orientation>: the new orientation
24240 void set_orientation()(Orientation orientation) {
24241 gtk_scale_button_set_orientation(&this, orientation);
24244 // VERSION: 2.12
24245 // Sets the current value of the scale; if the value is outside
24246 // the minimum or maximum range values, it will be clamped to fit
24247 // inside them. The scale button emits the #GtkScaleButton::value-changed
24248 // signal if the value changes.
24249 // <value>: new value of the scale button
24250 void set_value()(double value) {
24251 gtk_scale_button_set_value(&this, value);
24254 // VERSION: 2.12
24255 // The ::popdown signal is a
24256 // <link linkend="keybinding-signals">keybinding signal</link>
24257 // which gets emitted to popdown the scale widget.
24258 // The default binding for this signal is Escape.
24259 extern (C) alias static void function (ScaleButton* this_, void* user_data=null) signal_popdown;
24261 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24262 return super_.signal_connect!name(cb, data, cf);
24265 ulong signal_connect(string name:"popdown", CB:signal_popdown)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24266 return signal_connect_data!()(&this, cast(char*)"popdown",
24267 cast(GObject2.Callback)cb, data, null, cf);
24270 // VERSION: 2.12
24271 // The ::popup signal is a
24272 // <link linkend="keybinding-signals">keybinding signal</link>
24273 // which gets emitted to popup the scale widget.
24274 // The default bindings for this signal are Space, Enter and Return.
24275 extern (C) alias static void function (ScaleButton* this_, void* user_data=null) signal_popup;
24276 ulong signal_connect(string name:"popup", CB:signal_popup)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24277 return signal_connect_data!()(&this, cast(char*)"popup",
24278 cast(GObject2.Callback)cb, data, null, cf);
24281 // VERSION: 2.12
24282 // The ::value-changed signal is emitted when the value field has
24283 // changed.
24284 // <value>: the new value
24285 extern (C) alias static void function (ScaleButton* this_, double value, void* user_data=null) signal_value_changed;
24286 ulong signal_connect(string name:"value-changed", CB:signal_value_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24287 return signal_connect_data!()(&this, cast(char*)"value-changed",
24288 cast(GObject2.Callback)cb, data, null, cf);
24292 struct ScaleButtonClass {
24293 ButtonClass parent_class;
24294 extern (C) void function (ScaleButton* button, double value) value_changed;
24295 extern (C) void function () _gtk_reserved1;
24296 extern (C) void function () _gtk_reserved2;
24297 extern (C) void function () _gtk_reserved3;
24298 extern (C) void function () _gtk_reserved4;
24301 struct ScaleButtonPrivate {
24304 struct ScaleClass {
24305 RangeClass parent_class;
24306 extern (C) char* /*new*/ function (Scale* scale, double value) format_value;
24307 extern (C) void function (Scale* scale) draw_value;
24309 // <x>: location to store X offset of layout, or %NULL
24310 // <y>: location to store Y offset of layout, or %NULL
24311 extern (C) void function (Scale* scale, /*out*/ int* x=null, /*out*/ int* y=null) get_layout_offsets;
24312 extern (C) void function () _gtk_reserved1;
24313 extern (C) void function () _gtk_reserved2;
24314 extern (C) void function () _gtk_reserved3;
24317 enum ScrollStep {
24318 STEPS = 0,
24319 PAGES = 1,
24320 ENDS = 2,
24321 HORIZONTAL_STEPS = 3,
24322 HORIZONTAL_PAGES = 4,
24323 HORIZONTAL_ENDS = 5
24325 enum ScrollType {
24326 NONE = 0,
24327 JUMP = 1,
24328 STEP_BACKWARD = 2,
24329 STEP_FORWARD = 3,
24330 PAGE_BACKWARD = 4,
24331 PAGE_FORWARD = 5,
24332 STEP_UP = 6,
24333 STEP_DOWN = 7,
24334 PAGE_UP = 8,
24335 PAGE_DOWN = 9,
24336 STEP_LEFT = 10,
24337 STEP_RIGHT = 11,
24338 PAGE_LEFT = 12,
24339 PAGE_RIGHT = 13,
24340 START = 14,
24341 END = 15
24343 struct Scrollbar /* : Range */ {
24344 mixin Atk.ImplementorIface.__interface__;
24345 mixin Buildable.__interface__;
24346 mixin Orientable.__interface__;
24347 alias range this;
24348 alias range super_;
24349 Range range;
24352 struct ScrollbarClass {
24353 RangeClass parent_class;
24354 extern (C) void function () _gtk_reserved1;
24355 extern (C) void function () _gtk_reserved2;
24356 extern (C) void function () _gtk_reserved3;
24357 extern (C) void function () _gtk_reserved4;
24360 struct ScrolledWindow /* : Bin */ {
24361 mixin Atk.ImplementorIface.__interface__;
24362 mixin Buildable.__interface__;
24363 alias container this;
24364 alias container super_;
24365 alias container bin;
24366 Bin container;
24367 Widget* hscrollbar, vscrollbar;
24368 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24369 uint, "hscrollbar_policy", 2,
24370 uint, "vscrollbar_policy", 2,
24371 uint, "hscrollbar_visible", 1,
24372 uint, "vscrollbar_visible", 1,
24373 uint, "window_placement", 2,
24374 uint, "focus_out", 1,
24375 uint, "__dummy32A", 23));
24376 private ushort shadow_type;
24379 // Creates a new scrolled window.
24380 // The two arguments are the scrolled window's adjustments; these will be
24381 // shared with the scrollbars and the child widget to keep the bars in sync
24382 // with the child. Usually you want to pass %NULL for the adjustments, which
24383 // will cause the scrolled window to create them for you.
24384 // RETURNS: a new scrolled window
24385 // <hadjustment>: horizontal adjustment
24386 // <vadjustment>: vertical adjustment
24387 static ScrolledWindow* new_()(Adjustment* hadjustment=null, Adjustment* vadjustment=null) {
24388 return gtk_scrolled_window_new(hadjustment, vadjustment);
24391 // Used to add children without native scrolling capabilities. This
24392 // is simply a convenience function; it is equivalent to adding the
24393 // unscrollable child to a viewport, then adding the viewport to the
24394 // scrolled window. If a child has native scrolling, use
24395 // gtk_container_add() instead of this function.
24396 // The viewport scrolls the child by moving its #GdkWindow, and takes
24397 // the size of the child to be the size of its toplevel #GdkWindow.
24398 // This will be very wrong for most widgets that support native scrolling;
24399 // for example, if you add a widget such as #GtkTreeView with a viewport,
24400 // the whole widget will scroll, including the column headings. Thus,
24401 // widgets with native scrolling support should not be used with the
24402 // #GtkViewport proxy.
24403 // A widget supports scrolling natively if the
24404 // set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero,
24405 // i.e. has been filled in with a valid signal identifier.
24406 // <child>: the widget you want to scroll
24407 void add_with_viewport()(Widget* child) {
24408 gtk_scrolled_window_add_with_viewport(&this, child);
24411 // Returns the horizontal scrollbar's adjustment, used to connect the
24412 // horizontal scrollbar to the child widget's horizontal scroll
24413 // functionality.
24414 // RETURNS: the horizontal #GtkAdjustment
24415 Adjustment* get_hadjustment()() {
24416 return gtk_scrolled_window_get_hadjustment(&this);
24419 // VERSION: 2.8
24420 // Returns the horizontal scrollbar of @scrolled_window.
24421 // or %NULL if it does not have one.
24422 // RETURNS: the horizontal scrollbar of the scrolled window,
24423 Widget* get_hscrollbar()() {
24424 return gtk_scrolled_window_get_hscrollbar(&this);
24427 // Gets the placement of the contents with respect to the scrollbars
24428 // for the scrolled window. See gtk_scrolled_window_set_placement().
24429 // See also gtk_scrolled_window_set_placement() and
24430 // gtk_scrolled_window_unset_placement().
24431 // RETURNS: the current placement value.
24432 CornerType get_placement()() {
24433 return gtk_scrolled_window_get_placement(&this);
24436 // Retrieves the current policy values for the horizontal and vertical
24437 // scrollbars. See gtk_scrolled_window_set_policy().
24438 // <hscrollbar_policy>: location to store the policy for the horizontal scrollbar, or %NULL.
24439 // <vscrollbar_policy>: location to store the policy for the vertical scrollbar, or %NULL.
24440 void get_policy()(/*out*/ PolicyType* hscrollbar_policy=null, /*out*/ PolicyType* vscrollbar_policy=null) {
24441 gtk_scrolled_window_get_policy(&this, hscrollbar_policy, vscrollbar_policy);
24444 // Gets the shadow type of the scrolled window. See
24445 // gtk_scrolled_window_set_shadow_type().
24446 // RETURNS: the current shadow type
24447 ShadowType get_shadow_type()() {
24448 return gtk_scrolled_window_get_shadow_type(&this);
24451 // Returns the vertical scrollbar's adjustment, used to connect the
24452 // vertical scrollbar to the child widget's vertical scroll functionality.
24453 // RETURNS: the vertical #GtkAdjustment
24454 Adjustment* get_vadjustment()() {
24455 return gtk_scrolled_window_get_vadjustment(&this);
24458 // VERSION: 2.8
24459 // Returns the vertical scrollbar of @scrolled_window.
24460 // or %NULL if it does not have one.
24461 // RETURNS: the vertical scrollbar of the scrolled window,
24462 Widget* get_vscrollbar()() {
24463 return gtk_scrolled_window_get_vscrollbar(&this);
24466 // Sets the #GtkAdjustment for the horizontal scrollbar.
24467 // <hadjustment>: horizontal scroll adjustment
24468 void set_hadjustment()(Adjustment* hadjustment) {
24469 gtk_scrolled_window_set_hadjustment(&this, hadjustment);
24472 // Sets the placement of the contents with respect to the scrollbars
24473 // for the scrolled window.
24474 // The default is %GTK_CORNER_TOP_LEFT, meaning the child is
24475 // in the top left, with the scrollbars underneath and to the right.
24476 // Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT,
24477 // %GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.
24478 // See also gtk_scrolled_window_get_placement() and
24479 // gtk_scrolled_window_unset_placement().
24480 // <window_placement>: position of the child window
24481 void set_placement()(CornerType window_placement) {
24482 gtk_scrolled_window_set_placement(&this, window_placement);
24485 // Sets the scrollbar policy for the horizontal and vertical scrollbars.
24486 // The policy determines when the scrollbar should appear; it is a value
24487 // from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the
24488 // scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is
24489 // never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only
24490 // if needed (that is, if the slider part of the bar would be smaller
24491 // than the trough - the display is larger than the page size).
24492 // <hscrollbar_policy>: policy for horizontal bar
24493 // <vscrollbar_policy>: policy for vertical bar
24494 void set_policy()(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy) {
24495 gtk_scrolled_window_set_policy(&this, hscrollbar_policy, vscrollbar_policy);
24498 // Changes the type of shadow drawn around the contents of
24499 // <type>: kind of shadow to draw around scrolled window contents
24500 void set_shadow_type()(ShadowType type) {
24501 gtk_scrolled_window_set_shadow_type(&this, type);
24504 // Sets the #GtkAdjustment for the vertical scrollbar.
24505 // <vadjustment>: vertical scroll adjustment
24506 void set_vadjustment()(Adjustment* vadjustment) {
24507 gtk_scrolled_window_set_vadjustment(&this, vadjustment);
24510 // VERSION: 2.10
24511 // Unsets the placement of the contents with respect to the scrollbars
24512 // for the scrolled window. If no window placement is set for a scrolled
24513 // window, it obeys the "gtk-scrolled-window-placement" XSETTING.
24514 // See also gtk_scrolled_window_set_placement() and
24515 // gtk_scrolled_window_get_placement().
24516 void unset_placement()() {
24517 gtk_scrolled_window_unset_placement(&this);
24519 extern (C) alias static void function (ScrolledWindow* this_, DirectionType* object, void* user_data=null) signal_move_focus_out;
24521 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24522 return super_.signal_connect!name(cb, data, cf);
24525 ulong signal_connect(string name:"move-focus-out", CB:signal_move_focus_out)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24526 return signal_connect_data!()(&this, cast(char*)"move-focus-out",
24527 cast(GObject2.Callback)cb, data, null, cf);
24529 extern (C) alias static c_int function (ScrolledWindow* this_, ScrollType* object, c_int p0, void* user_data=null) signal_scroll_child;
24530 ulong signal_connect(string name:"scroll-child", CB:signal_scroll_child)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
24531 return signal_connect_data!()(&this, cast(char*)"scroll-child",
24532 cast(GObject2.Callback)cb, data, null, cf);
24536 struct ScrolledWindowClass {
24537 BinClass parent_class;
24538 int scrollbar_spacing;
24539 extern (C) int function (ScrolledWindow* scrolled_window, ScrollType scroll, int horizontal) scroll_child;
24540 extern (C) void function (ScrolledWindow* scrolled_window, DirectionType direction) move_focus_out;
24541 extern (C) void function () _gtk_reserved1;
24542 extern (C) void function () _gtk_reserved2;
24543 extern (C) void function () _gtk_reserved3;
24544 extern (C) void function () _gtk_reserved4;
24547 struct SelectionData {
24548 Gdk2.Atom selection, target, type;
24549 int format;
24550 ubyte* data;
24551 int length;
24552 Gdk2.Display* display;
24555 // Makes a copy of a #GtkSelectionData structure and its data.
24556 // RETURNS: a pointer to a copy of @data.
24557 SelectionData* /*new*/ copy()() {
24558 return gtk_selection_data_copy(&this);
24561 // Frees a #GtkSelectionData structure returned from
24562 // gtk_selection_data_copy().
24563 void free()() {
24564 gtk_selection_data_free(&this);
24567 // VERSION: 2.14
24568 // Retrieves the raw data of the selection.
24569 // RETURNS: the raw data of the selection.
24570 ubyte* get_data()() {
24571 return gtk_selection_data_get_data(&this);
24574 // VERSION: 2.14
24575 // Retrieves the data type of the selection.
24576 // RETURNS: the data type of the selection.
24577 Gdk2.Atom get_data_type()() {
24578 return gtk_selection_data_get_data_type(&this);
24581 // VERSION: 2.14
24582 // Retrieves the display of the selection.
24583 // RETURNS: the display of the selection.
24584 Gdk2.Display* get_display()() {
24585 return gtk_selection_data_get_display(&this);
24588 // VERSION: 2.14
24589 // Retrieves the format of the selection.
24590 // RETURNS: the format of the selection.
24591 int get_format()() {
24592 return gtk_selection_data_get_format(&this);
24595 // VERSION: 2.14
24596 // Retrieves the length of the raw data of the selection.
24597 // RETURNS: the length of the data of the selection.
24598 int get_length()() {
24599 return gtk_selection_data_get_length(&this);
24602 // VERSION: 2.6
24603 // Gets the contents of the selection data as a #GdkPixbuf.
24604 // image type and it could be converted to a #GdkPixbuf, a
24605 // newly allocated pixbuf is returned, otherwise %NULL.
24606 // If the result is non-%NULL it must be freed with g_object_unref().
24607 // RETURNS: if the selection data contained a recognized
24608 GdkPixbuf2.Pixbuf* /*new*/ get_pixbuf()() {
24609 return gtk_selection_data_get_pixbuf(&this);
24612 // VERSION: 2.16
24613 // Retrieves the selection #GdkAtom of the selection data.
24614 // RETURNS: the selection #GdkAtom of the selection data.
24615 Gdk2.Atom get_selection()() {
24616 return gtk_selection_data_get_selection(&this);
24619 // VERSION: 2.14
24620 // Retrieves the target of the selection.
24621 // RETURNS: the target of the selection.
24622 Gdk2.Atom get_target()() {
24623 return gtk_selection_data_get_target(&this);
24626 // Gets the contents of @selection_data as an array of targets.
24627 // This can be used to interpret the results of getting
24628 // the standard TARGETS target that is always supplied for
24629 // any selection.
24630 // array of targets, otherwise %FALSE.
24631 // RETURNS: %TRUE if @selection_data contains a valid
24632 // <targets>: location to store an array of targets. The result stored here must be freed with g_free().
24633 // <n_atoms>: location to store number of items in @targets.
24634 int get_targets()(/*out*/ Gdk2.Atom** targets, /*out*/ int* n_atoms) {
24635 return gtk_selection_data_get_targets(&this, targets, n_atoms);
24638 // Gets the contents of the selection data as a UTF-8 string.
24639 // text type and it could be converted to UTF-8, a newly allocated
24640 // string containing the converted text, otherwise %NULL.
24641 // If the result is non-%NULL it must be freed with g_free().
24642 // RETURNS: if the selection data contained a recognized
24643 ubyte* get_text()() {
24644 return gtk_selection_data_get_text(&this);
24647 // VERSION: 2.6
24648 // Gets the contents of the selection data as array of URIs.
24649 // the selection data contains a list of
24650 // URIs, a newly allocated %NULL-terminated string array
24651 // containing the URIs, otherwise %NULL. If the result is
24652 // non-%NULL it must be freed with g_strfreev().
24653 // RETURNS: if
24654 char** /*new*/ get_uris()() {
24655 return gtk_selection_data_get_uris(&this);
24658 // Stores new data into a #GtkSelectionData object. Should
24659 // <emphasis>only</emphasis> be called from a selection handler callback.
24660 // Zero-terminates the stored data.
24661 // <type>: the type of selection data
24662 // <format>: format (number of bits in a unit)
24663 // <data>: pointer to the data (will be copied)
24664 // <length>: length of the data
24665 void set()(Gdk2.Atom type, int format, ubyte* data, int length) {
24666 gtk_selection_data_set(&this, type, format, data, length);
24669 // VERSION: 2.6
24670 // Sets the contents of the selection from a #GdkPixbuf
24671 // The pixbuf is converted to the form determined by
24672 // otherwise %FALSE.
24673 // RETURNS: %TRUE if the selection was successfully set,
24674 // <pixbuf>: a #GdkPixbuf
24675 int set_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf) {
24676 return gtk_selection_data_set_pixbuf(&this, pixbuf);
24679 // Sets the contents of the selection from a UTF-8 encoded string.
24680 // The string is converted to the form determined by
24681 // otherwise %FALSE.
24682 // RETURNS: %TRUE if the selection was successfully set,
24683 // <str>: a UTF-8 string
24684 // <len>: the length of @str, or -1 if @str is nul-terminated.
24685 int set_text()(char* str, int len) {
24686 return gtk_selection_data_set_text(&this, str, len);
24689 // VERSION: 2.6
24690 // Sets the contents of the selection from a list of URIs.
24691 // The string is converted to the form determined by
24692 // otherwise %FALSE.
24693 // RETURNS: %TRUE if the selection was successfully set,
24694 // <uris>: a %NULL-terminated array of strings holding URIs
24695 int set_uris()(char** uris) {
24696 return gtk_selection_data_set_uris(&this, uris);
24699 // VERSION: 2.6
24700 // Given a #GtkSelectionData object holding a list of targets,
24701 // determines if any of the targets in @targets can be used to
24702 // provide a #GdkPixbuf.
24703 // and a suitable target for images is included, otherwise %FALSE.
24704 // RETURNS: %TRUE if @selection_data holds a list of targets,
24705 // <writable>: whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format
24706 int targets_include_image()(int writable) {
24707 return gtk_selection_data_targets_include_image(&this, writable);
24710 // VERSION: 2.10
24711 // Given a #GtkSelectionData object holding a list of targets,
24712 // determines if any of the targets in @targets can be used to
24713 // provide rich text.
24714 // and a suitable target for rich text is included,
24715 // otherwise %FALSE.
24716 // RETURNS: %TRUE if @selection_data holds a list of targets,
24717 // <buffer>: a #GtkTextBuffer
24718 int targets_include_rich_text()(TextBuffer* buffer) {
24719 return gtk_selection_data_targets_include_rich_text(&this, buffer);
24722 // Given a #GtkSelectionData object holding a list of targets,
24723 // determines if any of the targets in @targets can be used to
24724 // provide text.
24725 // and a suitable target for text is included, otherwise %FALSE.
24726 // RETURNS: %TRUE if @selection_data holds a list of targets,
24727 int targets_include_text()() {
24728 return gtk_selection_data_targets_include_text(&this);
24731 // VERSION: 2.10
24732 // Given a #GtkSelectionData object holding a list of targets,
24733 // determines if any of the targets in @targets can be used to
24734 // provide a list or URIs.
24735 // and a suitable target for URI lists is included, otherwise %FALSE.
24736 // RETURNS: %TRUE if @selection_data holds a list of targets,
24737 int targets_include_uri()() {
24738 return gtk_selection_data_targets_include_uri(&this);
24742 enum SelectionMode {
24743 NONE = 0,
24744 SINGLE = 1,
24745 BROWSE = 2,
24746 MULTIPLE = 3,
24747 EXTENDED = 3
24749 enum SensitivityType {
24750 AUTO = 0,
24751 ON = 1,
24752 OFF = 2
24754 struct Separator /* : Widget */ {
24755 mixin Atk.ImplementorIface.__interface__;
24756 mixin Buildable.__interface__;
24757 mixin Orientable.__interface__;
24758 alias widget this;
24759 alias widget super_;
24760 Widget widget;
24763 struct SeparatorClass {
24764 WidgetClass parent_class;
24767 struct SeparatorMenuItem /* : MenuItem */ {
24768 mixin Atk.ImplementorIface.__interface__;
24769 mixin Activatable.__interface__;
24770 mixin Buildable.__interface__;
24771 alias menu_item this;
24772 alias menu_item super_;
24773 alias menu_item menuitem;
24774 MenuItem menu_item;
24776 static SeparatorMenuItem* new_()() {
24777 return gtk_separator_menu_item_new();
24781 struct SeparatorMenuItemClass {
24782 MenuItemClass parent_class;
24785 struct SeparatorToolItem /* : ToolItem */ {
24786 mixin Atk.ImplementorIface.__interface__;
24787 mixin Activatable.__interface__;
24788 mixin Buildable.__interface__;
24789 alias parent this;
24790 alias parent super_;
24791 alias parent toolitem;
24792 ToolItem parent;
24793 private SeparatorToolItemPrivate* priv;
24796 // VERSION: 2.4
24797 // Create a new #GtkSeparatorToolItem
24798 // RETURNS: the new #GtkSeparatorToolItem
24799 static SeparatorToolItem* new_()() {
24800 return gtk_separator_tool_item_new();
24803 // VERSION: 2.4
24804 // Returns whether @item is drawn as a line, or just blank.
24805 // See gtk_separator_tool_item_set_draw().
24806 // RETURNS: %TRUE if @item is drawn as a line, or just blank.
24807 int get_draw()() {
24808 return gtk_separator_tool_item_get_draw(&this);
24811 // VERSION: 2.4
24812 // Whether @item is drawn as a vertical line, or just blank.
24813 // Setting this to %FALSE along with gtk_tool_item_set_expand() is useful
24814 // to create an item that forces following items to the end of the toolbar.
24815 // <draw>: whether @item is drawn as a vertical line
24816 void set_draw()(int draw) {
24817 gtk_separator_tool_item_set_draw(&this, draw);
24821 struct SeparatorToolItemClass {
24822 ToolItemClass parent_class;
24823 extern (C) void function () _gtk_reserved1;
24824 extern (C) void function () _gtk_reserved2;
24825 extern (C) void function () _gtk_reserved3;
24826 extern (C) void function () _gtk_reserved4;
24829 struct SeparatorToolItemPrivate {
24832 struct Settings /* : GObject.Object */ {
24833 alias parent_instance this;
24834 alias parent_instance super_;
24835 alias parent_instance object;
24836 GObject2.Object parent_instance;
24837 GLib2.Data* queued_settings;
24838 SettingsPropertyValue* property_values;
24839 RcContext* rc_context;
24840 Gdk2.Screen* screen;
24843 // Gets the #GtkSettings object for the default GDK screen, creating
24844 // it if necessary. See gtk_settings_get_for_screen().
24845 // screen, then returns %NULL.
24846 // RETURNS: a #GtkSettings object. If there is no default
24847 static Settings* get_default()() {
24848 return gtk_settings_get_default();
24851 // VERSION: 2.2
24852 // Gets the #GtkSettings object for @screen, creating it if necessary.
24853 // RETURNS: a #GtkSettings object.
24854 // <screen>: a #GdkScreen.
24855 static Settings* get_for_screen()(Gdk2.Screen* screen) {
24856 return gtk_settings_get_for_screen(screen);
24858 static void install_property()(GObject2.ParamSpec* pspec) {
24859 gtk_settings_install_property(pspec);
24861 // Unintrospectable function: install_property_parser() / gtk_settings_install_property_parser()
24862 static void install_property_parser()(GObject2.ParamSpec* pspec, RcPropertyParser parser) {
24863 gtk_settings_install_property_parser(pspec, parser);
24865 void set_double_property()(char* name, double v_double, char* origin) {
24866 gtk_settings_set_double_property(&this, name, v_double, origin);
24868 void set_long_property()(char* name, c_long v_long, char* origin) {
24869 gtk_settings_set_long_property(&this, name, v_long, origin);
24871 void set_property_value()(char* name, SettingsValue* svalue) {
24872 gtk_settings_set_property_value(&this, name, svalue);
24874 void set_string_property()(char* name, char* v_string, char* origin) {
24875 gtk_settings_set_string_property(&this, name, v_string, origin);
24879 struct SettingsClass {
24880 GObject2.ObjectClass parent_class;
24883 struct SettingsPropertyValue {
24886 struct SettingsValue {
24887 char* origin;
24888 GObject2.Value value;
24891 enum ShadowType {
24892 NONE = 0,
24893 IN = 1,
24894 OUT = 2,
24895 ETCHED_IN = 3,
24896 ETCHED_OUT = 4
24898 enum SideType {
24899 TOP = 0,
24900 BOTTOM = 1,
24901 LEFT = 2,
24902 RIGHT = 3
24904 extern (C) alias void function () SignalFunc;
24906 enum SignalRunType {
24907 FIRST = 1,
24908 LAST = 2,
24909 BOTH = 3,
24910 NO_RECURSE = 8,
24911 ACTION = 32,
24912 NO_HOOKS = 64
24914 struct SizeGroup /* : GObject.Object */ {
24915 mixin Buildable.__interface__;
24916 alias parent_instance this;
24917 alias parent_instance super_;
24918 alias parent_instance object;
24919 GObject2.Object parent_instance;
24920 private GLib2.SList* widgets;
24921 private ubyte mode;
24922 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
24923 uint, "have_width", 1,
24924 uint, "have_height", 1,
24925 uint, "ignore_hidden", 1,
24926 uint, "__dummy32A", 29));
24927 private Requisition requisition;
24930 // Create a new #GtkSizeGroup.
24931 // RETURNS: a newly created #GtkSizeGroup
24932 // <mode>: the mode for the new size group.
24933 static SizeGroup* /*new*/ new_()(SizeGroupMode mode) {
24934 return gtk_size_group_new(mode);
24937 // Adds a widget to a #GtkSizeGroup. In the future, the requisition
24938 // of the widget will be determined as the maximum of its requisition
24939 // and the requisition of the other widgets in the size group.
24940 // Whether this applies horizontally, vertically, or in both directions
24941 // depends on the mode of the size group. See gtk_size_group_set_mode().
24942 // When the widget is destroyed or no longer referenced elsewhere, it will
24943 // be removed from the size group.
24944 // <widget>: the #GtkWidget to add
24945 void add_widget()(Widget* widget) {
24946 gtk_size_group_add_widget(&this, widget);
24949 // VERSION: 2.8
24950 // Returns if invisible widgets are ignored when calculating the size.
24951 // RETURNS: %TRUE if invisible widgets are ignored.
24952 int get_ignore_hidden()() {
24953 return gtk_size_group_get_ignore_hidden(&this);
24956 // Gets the current mode of the size group. See gtk_size_group_set_mode().
24957 // RETURNS: the current mode of the size group.
24958 SizeGroupMode get_mode()() {
24959 return gtk_size_group_get_mode(&this);
24962 // VERSION: 2.10
24963 // Returns the list of widgets associated with @size_group.
24964 // widgets. The list is owned by GTK+ and should not be modified.
24965 // RETURNS: a #GSList of
24966 GLib2.SList* get_widgets()() {
24967 return gtk_size_group_get_widgets(&this);
24970 // Removes a widget from a #GtkSizeGroup.
24971 // <widget>: the #GtkWidget to remove
24972 void remove_widget()(Widget* widget) {
24973 gtk_size_group_remove_widget(&this, widget);
24976 // VERSION: 2.8
24977 // Sets whether unmapped widgets should be ignored when
24978 // calculating the size.
24979 // <ignore_hidden>: whether unmapped widgets should be ignored when calculating the size
24980 void set_ignore_hidden()(int ignore_hidden) {
24981 gtk_size_group_set_ignore_hidden(&this, ignore_hidden);
24984 // Sets the #GtkSizeGroupMode of the size group. The mode of the size
24985 // group determines whether the widgets in the size group should
24986 // all have the same horizontal requisition (%GTK_SIZE_GROUP_MODE_HORIZONTAL)
24987 // all have the same vertical requisition (%GTK_SIZE_GROUP_MODE_VERTICAL),
24988 // or should all have the same requisition in both directions
24989 // (%GTK_SIZE_GROUP_MODE_BOTH).
24990 // <mode>: the mode to set for the size group.
24991 void set_mode()(SizeGroupMode mode) {
24992 gtk_size_group_set_mode(&this, mode);
24996 struct SizeGroupClass {
24997 GObject2.ObjectClass parent_class;
24998 extern (C) void function () _gtk_reserved1;
24999 extern (C) void function () _gtk_reserved2;
25000 extern (C) void function () _gtk_reserved3;
25001 extern (C) void function () _gtk_reserved4;
25005 // The mode of the size group determines the directions in which the size
25006 // group affects the requested sizes of its component widgets.
25007 enum SizeGroupMode {
25008 NONE = 0,
25009 HORIZONTAL = 1,
25010 VERTICAL = 2,
25011 BOTH = 3
25014 // Together with #GtkPlug, #GtkSocket provides the ability
25015 // to embed widgets from one process into another process
25016 // in a fashion that is transparent to the user. One
25017 // process creates a #GtkSocket widget and passes
25018 // that widget's window ID to the other process,
25019 // which then creates a #GtkPlug with that window ID.
25020 // Any widgets contained in the #GtkPlug then will appear
25021 // inside the first application's window.
25022 // The socket's window ID is obtained by using
25023 // gtk_socket_get_id(). Before using this function,
25024 // the socket must have been realized, and for hence,
25025 // have been added to its parent.
25026 // <example>
25027 // <title>Obtaining the window ID of a socket.</title>
25028 // <programlisting>
25029 // GtkWidget *socket = gtk_socket_new (<!-- -->);
25030 // gtk_widget_show (socket);
25031 // gtk_container_add (GTK_CONTAINER (parent), socket);
25032 // /<!---->* The following call is only necessary if one of
25033 // * the ancestors of the socket is not yet visible.
25034 // *<!---->/
25035 // gtk_widget_realize (socket);
25036 // g_print ("The ID of the sockets window is %#x\n",
25037 // gtk_socket_get_id (socket));
25038 // </programlisting>
25039 // </example>
25040 // Note that if you pass the window ID of the socket to another
25041 // process that will create a plug in the socket, you
25042 // must make sure that the socket widget is not destroyed
25043 // until that plug is created. Violating this rule will
25044 // cause unpredictable consequences, the most likely
25045 // consequence being that the plug will appear as a
25046 // separate toplevel window. You can check if the plug
25047 // has been created by using gtk_socket_get_plug_window(). If
25048 // it returns a non-%NULL value, then the plug has been
25049 // successfully created inside of the socket.
25050 // When GTK+ is notified that the embedded window has been
25051 // destroyed, then it will destroy the socket as well. You
25052 // should always, therefore, be prepared for your sockets
25053 // to be destroyed at any time when the main event loop
25054 // is running. To prevent this from happening, you can
25055 // connect to the #GtkSocket::plug-removed signal.
25056 // The communication between a #GtkSocket and a #GtkPlug follows the
25057 // <ulink url="http://www.freedesktop.org/Standards/xembed-spec">XEmbed</ulink>
25058 // protocol. This protocol has also been implemented in other toolkits, e.g.
25059 // <application>Qt</application>, allowing the same level of integration
25060 // when embedding a <application>Qt</application> widget in GTK or vice versa.
25061 // A socket can also be used to swallow arbitrary
25062 // pre-existing top-level windows using gtk_socket_steal(),
25063 // though the integration when this is done will not be as close
25064 // as between a #GtkPlug and a #GtkSocket.
25065 // <note>
25066 // The #GtkPlug and #GtkSocket widgets are currently not available
25067 // on all platforms supported by GTK+.
25068 // </note>
25069 struct Socket /* : Container */ {
25070 mixin Atk.ImplementorIface.__interface__;
25071 mixin Buildable.__interface__;
25072 alias container this;
25073 alias container super_;
25074 Container container;
25075 ushort request_width, request_height, current_width, current_height;
25076 Gdk2.Window* plug_window;
25077 Widget* plug_widget;
25078 short xembed_version;
25079 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
25080 uint, "same_app", 1,
25081 uint, "focus_in", 1,
25082 uint, "have_size", 1,
25083 uint, "need_map", 1,
25084 uint, "is_mapped", 1,
25085 uint, "active", 1,
25086 uint, "__dummy32A", 26));
25087 AccelGroup* accel_group;
25088 Widget* toplevel;
25091 // Create a new empty #GtkSocket.
25092 // RETURNS: the new #GtkSocket.
25093 static Socket* new_()() {
25094 return gtk_socket_new();
25097 // Adds an XEMBED client, such as a #GtkPlug, to the #GtkSocket. The
25098 // client may be in the same process or in a different process.
25099 // To embed a #GtkPlug in a #GtkSocket, you can either create the
25100 // #GtkPlug with <literal>gtk_plug_new (0)</literal>, call
25101 // gtk_plug_get_id() to get the window ID of the plug, and then pass that to the
25102 // gtk_socket_add_id(), or you can call gtk_socket_get_id() to get the
25103 // window ID for the socket, and call gtk_plug_new() passing in that
25104 // ID.
25105 // The #GtkSocket must have already be added into a toplevel window
25106 // before you can make this call.
25107 // <window_id>: the window ID of a client participating in the XEMBED protocol.
25108 void add_id()(Gdk2.NativeWindow window_id) {
25109 gtk_socket_add_id(&this, window_id);
25112 // Gets the window ID of a #GtkSocket widget, which can then
25113 // be used to create a client embedded inside the socket, for
25114 // instance with gtk_plug_new().
25115 // The #GtkSocket must have already be added into a toplevel window
25116 // before you can make this call.
25117 // RETURNS: the window ID for the socket
25118 Gdk2.NativeWindow get_id()() {
25119 return gtk_socket_get_id(&this);
25122 // VERSION: 2.14
25123 // Retrieves the window of the plug. Use this to check if the plug has
25124 // been created inside of the socket.
25125 // RETURNS: the window of the plug if available, or %NULL
25126 Gdk2.Window* get_plug_window()() {
25127 return gtk_socket_get_plug_window(&this);
25130 // Reparents a pre-existing toplevel window into a #GtkSocket. This is
25131 // meant to embed clients that do not know about embedding into a
25132 // #GtkSocket, however doing so is inherently unreliable, and using
25133 // this function is not recommended.
25134 // The #GtkSocket must have already be added into a toplevel window
25135 // before you can make this call.
25136 // <wid>: the window ID of an existing toplevel window.
25137 void steal()(Gdk2.NativeWindow wid) {
25138 gtk_socket_steal(&this, wid);
25141 // This signal is emitted when a client is successfully
25142 // added to the socket.
25143 extern (C) alias static void function (Socket* this_, void* user_data=null) signal_plug_added;
25145 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25146 return super_.signal_connect!name(cb, data, cf);
25149 ulong signal_connect(string name:"plug-added", CB:signal_plug_added)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25150 return signal_connect_data!()(&this, cast(char*)"plug-added",
25151 cast(GObject2.Callback)cb, data, null, cf);
25154 // This signal is emitted when a client is removed from the socket.
25155 // The default action is to destroy the #GtkSocket widget, so if you
25156 // want to reuse it you must add a signal handler that returns %TRUE.
25157 // RETURNS: %TRUE to stop other handlers from being invoked.
25158 extern (C) alias static c_int function (Socket* this_, void* user_data=null) signal_plug_removed;
25159 ulong signal_connect(string name:"plug-removed", CB:signal_plug_removed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25160 return signal_connect_data!()(&this, cast(char*)"plug-removed",
25161 cast(GObject2.Callback)cb, data, null, cf);
25165 struct SocketClass {
25166 ContainerClass parent_class;
25167 extern (C) void function (Socket* socket_) plug_added;
25168 extern (C) int function (Socket* socket_) plug_removed;
25169 extern (C) void function () _gtk_reserved1;
25170 extern (C) void function () _gtk_reserved2;
25171 extern (C) void function () _gtk_reserved3;
25172 extern (C) void function () _gtk_reserved4;
25175 enum SortType {
25176 ASCENDING = 0,
25177 DESCENDING = 1
25179 struct SpinButton /* : Entry */ {
25180 mixin Atk.ImplementorIface.__interface__;
25181 mixin Buildable.__interface__;
25182 mixin CellEditable.__interface__;
25183 mixin Editable.__interface__;
25184 alias entry this;
25185 alias entry super_;
25186 Entry entry;
25187 Adjustment* adjustment;
25188 Gdk2.Window* panel;
25189 uint timer;
25190 double climb_rate, timer_step;
25191 SpinButtonUpdatePolicy update_policy;
25192 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
25193 uint, "in_child", 2,
25194 uint, "click_child", 2,
25195 uint, "button", 2,
25196 uint, "need_timer", 1,
25197 uint, "timer_calls", 3,
25198 uint, "digits", 10,
25199 uint, "numeric", 1,
25200 uint, "wrap", 1,
25201 uint, "snap_to_ticks", 1,
25202 uint, "__dummy32A", 9));
25204 static SpinButton* new_()(Adjustment* adjustment, double climb_rate, uint digits) {
25205 return gtk_spin_button_new(adjustment, climb_rate, digits);
25208 // This is a convenience constructor that allows creation of a numeric
25209 // #GtkSpinButton without manually creating an adjustment. The value is
25210 // initially set to the minimum value and a page increment of 10 * @step
25211 // is the default. The precision of the spin button is equivalent to the
25212 // precision of @step.
25213 // Note that the way in which the precision is derived works best if @step
25214 // is a power of ten. If the resulting precision is not suitable for your
25215 // needs, use gtk_spin_button_set_digits() to correct it.
25216 // RETURNS: The new spin button as a #GtkWidget.
25217 // <min>: Minimum allowable value
25218 // <max>: Maximum allowable value
25219 // <step>: Increment added or subtracted by spinning the widget
25220 static SpinButton* new_with_range()(double min, double max, double step) {
25221 return gtk_spin_button_new_with_range(min, max, step);
25224 // Changes the properties of an existing spin button. The adjustment, climb rate,
25225 // and number of decimal places are all changed accordingly, after this function call.
25226 // <adjustment>: a #GtkAdjustment.
25227 // <climb_rate>: the new climb rate.
25228 // <digits>: the number of decimal places to display in the spin button.
25229 void configure()(Adjustment* adjustment, double climb_rate, uint digits) {
25230 gtk_spin_button_configure(&this, adjustment, climb_rate, digits);
25233 // Get the adjustment associated with a #GtkSpinButton
25234 // RETURNS: the #GtkAdjustment of @spin_button
25235 Adjustment* get_adjustment()() {
25236 return gtk_spin_button_get_adjustment(&this);
25239 // Fetches the precision of @spin_button. See gtk_spin_button_set_digits().
25240 // RETURNS: the current precision
25241 uint get_digits()() {
25242 return gtk_spin_button_get_digits(&this);
25245 // Gets the current step and page the increments used by @spin_button. See
25246 // gtk_spin_button_set_increments().
25247 // <step>: location to store step increment, or %NULL
25248 // <page>: location to store page increment, or %NULL
25249 void get_increments()(/*out*/ double* step=null, /*out*/ double* page=null) {
25250 gtk_spin_button_get_increments(&this, step, page);
25253 // Returns whether non-numeric text can be typed into the spin button.
25254 // See gtk_spin_button_set_numeric().
25255 // RETURNS: %TRUE if only numeric text can be entered
25256 int get_numeric()() {
25257 return gtk_spin_button_get_numeric(&this);
25260 // Gets the range allowed for @spin_button. See
25261 // gtk_spin_button_set_range().
25262 // <min>: location to store minimum allowed value, or %NULL
25263 // <max>: location to store maximum allowed value, or %NULL
25264 void get_range()(/*out*/ double* min=null, /*out*/ double* max=null) {
25265 gtk_spin_button_get_range(&this, min, max);
25268 // Returns whether the values are corrected to the nearest step. See
25269 // gtk_spin_button_set_snap_to_ticks().
25270 // RETURNS: %TRUE if values are snapped to the nearest step.
25271 int get_snap_to_ticks()() {
25272 return gtk_spin_button_get_snap_to_ticks(&this);
25275 // Gets the update behavior of a spin button. See
25276 // gtk_spin_button_set_update_policy().
25277 // RETURNS: the current update policy
25278 SpinButtonUpdatePolicy get_update_policy()() {
25279 return gtk_spin_button_get_update_policy(&this);
25282 // Get the value in the @spin_button.
25283 // RETURNS: the value of @spin_button
25284 double get_value()() {
25285 return gtk_spin_button_get_value(&this);
25288 // Get the value @spin_button represented as an integer.
25289 // RETURNS: the value of @spin_button
25290 int get_value_as_int()() {
25291 return gtk_spin_button_get_value_as_int(&this);
25294 // Returns whether the spin button's value wraps around to the
25295 // opposite limit when the upper or lower limit of the range is
25296 // exceeded. See gtk_spin_button_set_wrap().
25297 // RETURNS: %TRUE if the spin button wraps around
25298 int get_wrap()() {
25299 return gtk_spin_button_get_wrap(&this);
25302 // Replaces the #GtkAdjustment associated with @spin_button.
25303 // <adjustment>: a #GtkAdjustment to replace the existing adjustment
25304 void set_adjustment()(Adjustment* adjustment) {
25305 gtk_spin_button_set_adjustment(&this, adjustment);
25308 // Set the precision to be displayed by @spin_button. Up to 20 digit precision
25309 // is allowed.
25310 // <digits>: the number of digits after the decimal point to be displayed for the spin button's value
25311 void set_digits()(uint digits) {
25312 gtk_spin_button_set_digits(&this, digits);
25315 // Sets the step and page increments for spin_button. This affects how
25316 // quickly the value changes when the spin button's arrows are activated.
25317 // <step>: increment applied for a button 1 press.
25318 // <page>: increment applied for a button 2 press.
25319 void set_increments()(double step, double page) {
25320 gtk_spin_button_set_increments(&this, step, page);
25323 // Sets the flag that determines if non-numeric text can be typed into
25324 // the spin button.
25325 // <numeric>: flag indicating if only numeric entry is allowed.
25326 void set_numeric()(int numeric) {
25327 gtk_spin_button_set_numeric(&this, numeric);
25330 // Sets the minimum and maximum allowable values for @spin_button
25331 // <min>: minimum allowable value
25332 // <max>: maximum allowable value
25333 void set_range()(double min, double max) {
25334 gtk_spin_button_set_range(&this, min, max);
25337 // Sets the policy as to whether values are corrected to the nearest step
25338 // increment when a spin button is activated after providing an invalid value.
25339 // <snap_to_ticks>: a flag indicating if invalid values should be corrected.
25340 void set_snap_to_ticks()(int snap_to_ticks) {
25341 gtk_spin_button_set_snap_to_ticks(&this, snap_to_ticks);
25344 // Sets the update behavior of a spin button. This determines whether the
25345 // spin button is always updated or only when a valid value is set.
25346 // <policy>: a #GtkSpinButtonUpdatePolicy value
25347 void set_update_policy()(SpinButtonUpdatePolicy policy) {
25348 gtk_spin_button_set_update_policy(&this, policy);
25351 // Set the value of @spin_button.
25352 // <value>: the new value
25353 void set_value()(double value) {
25354 gtk_spin_button_set_value(&this, value);
25357 // Sets the flag that determines if a spin button value wraps around to the
25358 // opposite limit when the upper or lower limit of the range is exceeded.
25359 // <wrap>: a flag indicating if wrapping behavior is performed.
25360 void set_wrap()(int wrap) {
25361 gtk_spin_button_set_wrap(&this, wrap);
25364 // Increment or decrement a spin button's value in a specified direction
25365 // by a specified amount.
25366 // <direction>: a #GtkSpinType indicating the direction to spin.
25367 // <increment>: step increment to apply in the specified direction.
25368 void spin()(SpinType direction, double increment) {
25369 gtk_spin_button_spin(&this, direction, increment);
25371 // Manually force an update of the spin button.
25372 void update()() {
25373 gtk_spin_button_update(&this);
25375 extern (C) alias static void function (SpinButton* this_, ScrollType* object, void* user_data=null) signal_change_value;
25377 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25378 return super_.signal_connect!name(cb, data, cf);
25381 ulong signal_connect(string name:"change-value", CB:signal_change_value)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25382 return signal_connect_data!()(&this, cast(char*)"change-value",
25383 cast(GObject2.Callback)cb, data, null, cf);
25385 extern (C) alias static int function (SpinButton* this_, void* object, void* user_data=null) signal_input;
25386 ulong signal_connect(string name:"input", CB:signal_input)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25387 return signal_connect_data!()(&this, cast(char*)"input",
25388 cast(GObject2.Callback)cb, data, null, cf);
25391 // The ::output signal can be used to change to formatting
25392 // of the value that is displayed in the spin buttons entry.
25393 // |[
25394 // /&ast; show leading zeros &ast;/
25395 // static gboolean
25396 // on_output (GtkSpinButton *spin,
25397 // gpointer data)
25398 // {
25399 // GtkAdjustment *adj;
25400 // gchar *text;
25401 // int value;
25402 // adj = gtk_spin_button_get_adjustment (spin);
25403 // value = (int)gtk_adjustment_get_value (adj);
25404 // text = g_strdup_printf ("%02d", value);
25405 // gtk_entry_set_text (GTK_ENTRY (spin), text);
25406 // g_free (text);
25407 // return TRUE;
25408 // }
25409 // ]|
25410 // RETURNS: %TRUE if the value has been displayed.
25411 extern (C) alias static c_int function (SpinButton* this_, void* user_data=null) signal_output;
25412 ulong signal_connect(string name:"output", CB:signal_output)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25413 return signal_connect_data!()(&this, cast(char*)"output",
25414 cast(GObject2.Callback)cb, data, null, cf);
25416 extern (C) alias static void function (SpinButton* this_, void* user_data=null) signal_value_changed;
25417 ulong signal_connect(string name:"value-changed", CB:signal_value_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25418 return signal_connect_data!()(&this, cast(char*)"value-changed",
25419 cast(GObject2.Callback)cb, data, null, cf);
25422 // VERSION: 2.10
25423 // The wrapped signal is emitted right after the spinbutton wraps
25424 // from its maximum to minimum value or vice-versa.
25425 extern (C) alias static void function (SpinButton* this_, void* user_data=null) signal_wrapped;
25426 ulong signal_connect(string name:"wrapped", CB:signal_wrapped)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25427 return signal_connect_data!()(&this, cast(char*)"wrapped",
25428 cast(GObject2.Callback)cb, data, null, cf);
25432 struct SpinButtonClass {
25433 EntryClass parent_class;
25434 extern (C) int function (SpinButton* spin_button, double* new_value) input;
25435 extern (C) int function (SpinButton* spin_button) output;
25436 extern (C) void function (SpinButton* spin_button) value_changed;
25437 extern (C) void function (SpinButton* spin_button, ScrollType scroll) change_value;
25438 extern (C) void function (SpinButton* spin_button) wrapped;
25439 extern (C) void function () _gtk_reserved1;
25440 extern (C) void function () _gtk_reserved2;
25441 extern (C) void function () _gtk_reserved3;
25444 enum SpinButtonUpdatePolicy {
25445 ALWAYS = 0,
25446 IF_VALID = 1
25448 enum SpinType {
25449 STEP_FORWARD = 0,
25450 STEP_BACKWARD = 1,
25451 PAGE_FORWARD = 2,
25452 PAGE_BACKWARD = 3,
25453 HOME = 4,
25454 END = 5,
25455 USER_DEFINED = 6
25458 // A GtkSpinner widget displays an icon-size spinning animation.
25459 // It is often used as an alternative to a #GtkProgressBar for
25460 // displaying indefinite activity, instead of actual progress.
25461 // To start the animation, use gtk_spinner_start(), to stop it
25462 // use gtk_spinner_stop().
25463 struct Spinner /* : DrawingArea */ {
25464 mixin Atk.ImplementorIface.__interface__;
25465 mixin Buildable.__interface__;
25466 alias parent this;
25467 alias parent super_;
25468 alias parent drawingarea;
25469 DrawingArea parent;
25470 SpinnerPrivate* priv;
25473 // VERSION: 2.20
25474 // Returns a new spinner widget. Not yet started.
25475 // RETURNS: a new #GtkSpinner
25476 static Spinner* new_()() {
25477 return gtk_spinner_new();
25480 // VERSION: 2.20
25481 // Starts the animation of the spinner.
25482 void start()() {
25483 gtk_spinner_start(&this);
25486 // VERSION: 2.20
25487 // Stops the animation of the spinner.
25488 void stop()() {
25489 gtk_spinner_stop(&this);
25493 struct SpinnerClass {
25494 DrawingAreaClass parent_class;
25497 struct SpinnerPrivate {
25500 enum StateType {
25501 NORMAL = 0,
25502 ACTIVE = 1,
25503 PRELIGHT = 2,
25504 SELECTED = 3,
25505 INSENSITIVE = 4
25507 struct StatusIcon /* : GObject.Object */ {
25508 alias parent_instance this;
25509 alias parent_instance super_;
25510 alias parent_instance object;
25511 GObject2.Object parent_instance;
25512 StatusIconPrivate* priv;
25515 // VERSION: 2.10
25516 // Creates an empty status icon object.
25517 // RETURNS: a new #GtkStatusIcon
25518 static StatusIcon* /*new*/ new_()() {
25519 return gtk_status_icon_new();
25522 // VERSION: 2.10
25523 // Creates a status icon displaying the file @filename.
25524 // The image will be scaled down to fit in the available
25525 // space in the notification area, if necessary.
25526 // RETURNS: a new #GtkStatusIcon
25527 // <filename>: a filename
25528 static StatusIcon* /*new*/ new_from_file()(char* filename) {
25529 return gtk_status_icon_new_from_file(filename);
25532 // VERSION: 2.14
25533 // Creates a status icon displaying a #GIcon. If the icon is a
25534 // themed icon, it will be updated when the theme changes.
25535 // RETURNS: a new #GtkStatusIcon
25536 // <icon>: a #GIcon
25537 static StatusIcon* /*new*/ new_from_gicon()(Gio2.Icon* icon) {
25538 return gtk_status_icon_new_from_gicon(icon);
25541 // VERSION: 2.10
25542 // Creates a status icon displaying an icon from the current icon theme.
25543 // If the current icon theme is changed, the icon will be updated
25544 // appropriately.
25545 // RETURNS: a new #GtkStatusIcon
25546 // <icon_name>: an icon name
25547 static StatusIcon* /*new*/ new_from_icon_name()(char* icon_name) {
25548 return gtk_status_icon_new_from_icon_name(icon_name);
25551 // VERSION: 2.10
25552 // Creates a status icon displaying @pixbuf.
25553 // The image will be scaled down to fit in the available
25554 // space in the notification area, if necessary.
25555 // RETURNS: a new #GtkStatusIcon
25556 // <pixbuf>: a #GdkPixbuf
25557 static StatusIcon* /*new*/ new_from_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf) {
25558 return gtk_status_icon_new_from_pixbuf(pixbuf);
25561 // VERSION: 2.10
25562 // Creates a status icon displaying a stock icon. Sample stock icon
25563 // names are #GTK_STOCK_OPEN, #GTK_STOCK_QUIT. You can register your
25564 // own stock icon names, see gtk_icon_factory_add_default() and
25565 // gtk_icon_factory_add().
25566 // RETURNS: a new #GtkStatusIcon
25567 // <stock_id>: a stock icon id
25568 static StatusIcon* /*new*/ new_from_stock()(char* stock_id) {
25569 return gtk_status_icon_new_from_stock(stock_id);
25572 // VERSION: 2.10
25573 // Menu positioning function to use with gtk_menu_popup()
25574 // to position @menu aligned to the status icon @user_data.
25575 // <menu>: the #GtkMenu
25576 // <x>: return location for the x position
25577 // <y>: return location for the y position
25578 // <push_in>: whether the first menu item should be offset (pushed in) to be aligned with the menu popup position (only useful for GtkOptionMenu).
25579 // <user_data>: the status icon to position the menu on
25580 static void position_menu()(Menu* menu, int* x, int* y, int* push_in, void* user_data) {
25581 gtk_status_icon_position_menu(menu, x, y, push_in, user_data);
25584 // VERSION: 2.10
25585 // DEPRECATED (v2.22) method: get_blinking - This function will be removed in GTK+ 3
25586 // Returns whether the icon is blinking, see
25587 // gtk_status_icon_set_blinking().
25588 // RETURNS: %TRUE if the icon is blinking
25589 int get_blinking()() {
25590 return gtk_status_icon_get_blinking(&this);
25593 // VERSION: 2.10
25594 // Obtains information about the location of the status icon
25595 // on screen. This information can be used to e.g. position
25596 // popups like notification bubbles.
25597 // See gtk_status_icon_position_menu() for a more convenient
25598 // alternative for positioning menus.
25599 // Note that some platforms do not allow GTK+ to provide
25600 // this information, and even on platforms that do allow it,
25601 // the information is not reliable unless the status icon
25602 // is embedded in a notification area, see
25603 // gtk_status_icon_is_embedded().
25604 // been filled in
25605 // RETURNS: %TRUE if the location information has
25606 // <screen>: return location for the screen, or %NULL if the information is not needed
25607 // <area>: return location for the area occupied by the status icon, or %NULL
25608 // <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.
25609 int get_geometry()(/*out*/ Gdk2.Screen** screen=null, /*out*/ Gdk2.Rectangle* area=null, /*out*/ Orientation* orientation=null) {
25610 return gtk_status_icon_get_geometry(&this, screen, area, orientation);
25613 // VERSION: 2.14
25614 // Retrieves the #GIcon being displayed by the #GtkStatusIcon.
25615 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
25616 // %GTK_IMAGE_GICON (see gtk_status_icon_get_storage_type()).
25617 // The caller of this function does not own a reference to the
25618 // returned #GIcon.
25619 // If this function fails, @icon is left unchanged;
25620 // RETURNS: the displayed icon, or %NULL if the image is empty
25621 Gio2.Icon* get_gicon()() {
25622 return gtk_status_icon_get_gicon(&this);
25625 // VERSION: 2.16
25626 // Returns the current value of the has-tooltip property.
25627 // See #GtkStatusIcon:has-tooltip for more information.
25628 // RETURNS: current value of has-tooltip on @status_icon.
25629 int get_has_tooltip()() {
25630 return gtk_status_icon_get_has_tooltip(&this);
25633 // VERSION: 2.10
25634 // Gets the name of the icon being displayed by the #GtkStatusIcon.
25635 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
25636 // %GTK_IMAGE_ICON_NAME (see gtk_status_icon_get_storage_type()).
25637 // The returned string is owned by the #GtkStatusIcon and should not
25638 // be freed or modified.
25639 // RETURNS: name of the displayed icon, or %NULL if the image is empty.
25640 char* get_icon_name()() {
25641 return gtk_status_icon_get_icon_name(&this);
25644 // VERSION: 2.10
25645 // Gets the #GdkPixbuf being displayed by the #GtkStatusIcon.
25646 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
25647 // %GTK_IMAGE_PIXBUF (see gtk_status_icon_get_storage_type()).
25648 // The caller of this function does not own a reference to the
25649 // returned pixbuf.
25650 // or %NULL if the image is empty.
25651 // RETURNS: the displayed pixbuf,
25652 GdkPixbuf2.Pixbuf* get_pixbuf()() {
25653 return gtk_status_icon_get_pixbuf(&this);
25656 // VERSION: 2.12
25657 // Returns the #GdkScreen associated with @status_icon.
25658 // RETURNS: a #GdkScreen.
25659 Gdk2.Screen* get_screen()() {
25660 return gtk_status_icon_get_screen(&this);
25663 // VERSION: 2.10
25664 // Gets the size in pixels that is available for the image.
25665 // Stock icons and named icons adapt their size automatically
25666 // if the size of the notification area changes. For other
25667 // storage types, the size-changed signal can be used to
25668 // react to size changes.
25669 // Note that the returned size is only meaningful while the
25670 // status icon is embedded (see gtk_status_icon_is_embedded()).
25671 // RETURNS: the size that is available for the image
25672 int get_size()() {
25673 return gtk_status_icon_get_size(&this);
25676 // VERSION: 2.10
25677 // Gets the id of the stock icon being displayed by the #GtkStatusIcon.
25678 // The storage type of the status icon must be %GTK_IMAGE_EMPTY or
25679 // %GTK_IMAGE_STOCK (see gtk_status_icon_get_storage_type()).
25680 // The returned string is owned by the #GtkStatusIcon and should not
25681 // be freed or modified.
25682 // or %NULL if the image is empty.
25683 // RETURNS: stock id of the displayed stock icon,
25684 char* get_stock()() {
25685 return gtk_status_icon_get_stock(&this);
25688 // VERSION: 2.10
25689 // Gets the type of representation being used by the #GtkStatusIcon
25690 // to store image data. If the #GtkStatusIcon has no image data,
25691 // the return value will be %GTK_IMAGE_EMPTY.
25692 // RETURNS: the image representation being used
25693 ImageType get_storage_type()() {
25694 return gtk_status_icon_get_storage_type(&this);
25697 // VERSION: 2.18
25698 // Gets the title of this tray icon. See gtk_status_icon_set_title().
25699 // RETURNS: the title of the status icon
25700 char* get_title()() {
25701 return gtk_status_icon_get_title(&this);
25704 // VERSION: 2.16
25705 // Gets the contents of the tooltip for @status_icon.
25706 // returned string with g_free() when done.
25707 // RETURNS: the tooltip text, or %NULL. You should free the
25708 char* /*new*/ get_tooltip_markup()() {
25709 return gtk_status_icon_get_tooltip_markup(&this);
25712 // VERSION: 2.16
25713 // Gets the contents of the tooltip for @status_icon.
25714 // returned string with g_free() when done.
25715 // RETURNS: the tooltip text, or %NULL. You should free the
25716 char* /*new*/ get_tooltip_text()() {
25717 return gtk_status_icon_get_tooltip_text(&this);
25720 // VERSION: 2.10
25721 // Returns whether the status icon is visible or not.
25722 // Note that being visible does not guarantee that
25723 // the user can actually see the icon, see also
25724 // gtk_status_icon_is_embedded().
25725 // RETURNS: %TRUE if the status icon is visible
25726 int get_visible()() {
25727 return gtk_status_icon_get_visible(&this);
25730 // VERSION: 2.14
25731 // This function is only useful on the X11/freedesktop.org platform.
25732 // It returns a window ID for the widget in the underlying
25733 // status icon implementation. This is useful for the Galago
25734 // notification service, which can send a window ID in the protocol
25735 // in order for the server to position notification windows
25736 // pointing to a status icon reliably.
25737 // This function is not intended for other use cases which are
25738 // more likely to be met by one of the non-X11 specific methods, such
25739 // as gtk_status_icon_position_menu().
25740 // underlying X11 Window
25741 // RETURNS: An 32 bit unsigned integer identifier for the
25742 uint get_x11_window_id()() {
25743 return gtk_status_icon_get_x11_window_id(&this);
25746 // VERSION: 2.10
25747 // Returns whether the status icon is embedded in a notification
25748 // area.
25749 // a notification area.
25750 // RETURNS: %TRUE if the status icon is embedded in
25751 int is_embedded()() {
25752 return gtk_status_icon_is_embedded(&this);
25755 // VERSION: 2.10
25756 // DEPRECATED (v2.22) method: set_blinking - This function will be removed in GTK+ 3
25757 // Makes the status icon start or stop blinking.
25758 // Note that blinking user interface elements may be problematic
25759 // for some users, and thus may be turned off, in which case
25760 // this setting has no effect.
25761 // <blinking>: %TRUE to turn blinking on, %FALSE to turn it off
25762 void set_blinking()(int blinking) {
25763 gtk_status_icon_set_blinking(&this, blinking);
25766 // VERSION: 2.10
25767 // Makes @status_icon display the file @filename.
25768 // See gtk_status_icon_new_from_file() for details.
25769 // <filename>: a filename
25770 void set_from_file()(char* filename) {
25771 gtk_status_icon_set_from_file(&this, filename);
25774 // VERSION: 2.14
25775 // Makes @status_icon display the #GIcon.
25776 // See gtk_status_icon_new_from_gicon() for details.
25777 // <icon>: a GIcon
25778 void set_from_gicon()(Gio2.Icon* icon) {
25779 gtk_status_icon_set_from_gicon(&this, icon);
25782 // VERSION: 2.10
25783 // Makes @status_icon display the icon named @icon_name from the
25784 // current icon theme.
25785 // See gtk_status_icon_new_from_icon_name() for details.
25786 // <icon_name>: an icon name
25787 void set_from_icon_name()(char* icon_name) {
25788 gtk_status_icon_set_from_icon_name(&this, icon_name);
25791 // VERSION: 2.10
25792 // Makes @status_icon display @pixbuf.
25793 // See gtk_status_icon_new_from_pixbuf() for details.
25794 // <pixbuf>: a #GdkPixbuf or %NULL
25795 void set_from_pixbuf()(GdkPixbuf2.Pixbuf* pixbuf=null) {
25796 gtk_status_icon_set_from_pixbuf(&this, pixbuf);
25799 // VERSION: 2.10
25800 // Makes @status_icon display the stock icon with the id @stock_id.
25801 // See gtk_status_icon_new_from_stock() for details.
25802 // <stock_id>: a stock icon id
25803 void set_from_stock()(char* stock_id) {
25804 gtk_status_icon_set_from_stock(&this, stock_id);
25807 // VERSION: 2.16
25808 // Sets the has-tooltip property on @status_icon to @has_tooltip.
25809 // See #GtkStatusIcon:has-tooltip for more information.
25810 // <has_tooltip>: whether or not @status_icon has a tooltip
25811 void set_has_tooltip()(int has_tooltip) {
25812 gtk_status_icon_set_has_tooltip(&this, has_tooltip);
25815 // VERSION: 2.20
25816 // Sets the name of this tray icon.
25817 // This should be a string identifying this icon. It is may be
25818 // used for sorting the icons in the tray and will not be shown to
25819 // the user.
25820 // <name>: the name
25821 void set_name()(char* name) {
25822 gtk_status_icon_set_name(&this, name);
25825 // VERSION: 2.12
25826 // Sets the #GdkScreen where @status_icon is displayed; if
25827 // the icon is already mapped, it will be unmapped, and
25828 // then remapped on the new screen.
25829 // <screen>: a #GdkScreen
25830 void set_screen()(Gdk2.Screen* screen) {
25831 gtk_status_icon_set_screen(&this, screen);
25834 // VERSION: 2.18
25835 // Sets the title of this tray icon.
25836 // This should be a short, human-readable, localized string
25837 // describing the tray icon. It may be used by tools like screen
25838 // readers to render the tray icon.
25839 // <title>: the title
25840 void set_title()(char* title) {
25841 gtk_status_icon_set_title(&this, title);
25844 // VERSION: 2.10
25845 // DEPRECATED (v2.16) method: set_tooltip - Use gtk_status_icon_set_tooltip_text() instead.
25846 // Sets the tooltip of the status icon.
25847 // <tooltip_text>: the tooltip text, or %NULL
25848 void set_tooltip()(char* tooltip_text=null) {
25849 gtk_status_icon_set_tooltip(&this, tooltip_text);
25852 // VERSION: 2.16
25853 // Sets @markup as the contents of the tooltip, which is marked up with
25854 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
25855 // This function will take care of setting #GtkStatusIcon:has-tooltip to %TRUE
25856 // and of the default handler for the #GtkStatusIcon::query-tooltip signal.
25857 // See also the #GtkStatusIcon:tooltip-markup property and
25858 // gtk_tooltip_set_markup().
25859 // <markup>: the contents of the tooltip for @status_icon, or %NULL
25860 void set_tooltip_markup()(char* markup=null) {
25861 gtk_status_icon_set_tooltip_markup(&this, markup);
25864 // VERSION: 2.16
25865 // Sets @text as the contents of the tooltip.
25866 // This function will take care of setting #GtkStatusIcon:has-tooltip to
25867 // %TRUE and of the default handler for the #GtkStatusIcon::query-tooltip
25868 // signal.
25869 // See also the #GtkStatusIcon:tooltip-text property and
25870 // gtk_tooltip_set_text().
25871 // <text>: the contents of the tooltip for @status_icon
25872 void set_tooltip_text()(char* text) {
25873 gtk_status_icon_set_tooltip_text(&this, text);
25876 // VERSION: 2.10
25877 // Shows or hides a status icon.
25878 // <visible>: %TRUE to show the status icon, %FALSE to hide it
25879 void set_visible()(int visible) {
25880 gtk_status_icon_set_visible(&this, visible);
25883 // VERSION: 2.10
25884 // Gets emitted when the user activates the status icon.
25885 // If and how status icons can activated is platform-dependent.
25886 // Unlike most G_SIGNAL_ACTION signals, this signal is meant to
25887 // be used by applications and should be wrapped by language bindings.
25888 extern (C) alias static void function (StatusIcon* this_, void* user_data=null) signal_activate;
25890 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25891 return super_.signal_connect!name(cb, data, cf);
25894 ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25895 return signal_connect_data!()(&this, cast(char*)"activate",
25896 cast(GObject2.Callback)cb, data, null, cf);
25899 // VERSION: 2.14
25900 // The ::button-press-event signal will be emitted when a button
25901 // (typically from a mouse) is pressed.
25902 // Whether this event is emitted is platform-dependent. Use the ::activate
25903 // and ::popup-menu signals in preference.
25904 // for the event. %FALSE to propagate the event further.
25905 // RETURNS: %TRUE to stop other handlers from being invoked
25906 // <event>: the #GdkEventButton which triggered this signal
25907 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) signal_button_press_event;
25908 ulong signal_connect(string name:"button-press-event", CB:signal_button_press_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25909 return signal_connect_data!()(&this, cast(char*)"button-press-event",
25910 cast(GObject2.Callback)cb, data, null, cf);
25913 // VERSION: 2.14
25914 // The ::button-release-event signal will be emitted when a button
25915 // (typically from a mouse) is released.
25916 // Whether this event is emitted is platform-dependent. Use the ::activate
25917 // and ::popup-menu signals in preference.
25918 // for the event. %FALSE to propagate the event further.
25919 // RETURNS: %TRUE to stop other handlers from being invoked
25920 // <event>: the #GdkEventButton which triggered this signal
25921 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) signal_button_release_event;
25922 ulong signal_connect(string name:"button-release-event", CB:signal_button_release_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25923 return signal_connect_data!()(&this, cast(char*)"button-release-event",
25924 cast(GObject2.Callback)cb, data, null, cf);
25927 // VERSION: 2.10
25928 // Gets emitted when the user brings up the context menu
25929 // of the status icon. Whether status icons can have context
25930 // menus and how these are activated is platform-dependent.
25931 // The @button and @activate_time parameters should be
25932 // passed as the last to arguments to gtk_menu_popup().
25933 // Unlike most G_SIGNAL_ACTION signals, this signal is meant to
25934 // be used by applications and should be wrapped by language bindings.
25935 // <button>: the button that was pressed, or 0 if the signal is not emitted in response to a button press event
25936 // <activate_time>: the timestamp of the event that triggered the signal emission
25937 extern (C) alias static void function (StatusIcon* this_, c_uint button, c_uint activate_time, void* user_data=null) signal_popup_menu;
25938 ulong signal_connect(string name:"popup-menu", CB:signal_popup_menu)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25939 return signal_connect_data!()(&this, cast(char*)"popup-menu",
25940 cast(GObject2.Callback)cb, data, null, cf);
25943 // VERSION: 2.16
25944 // Emitted when the #GtkSettings:gtk-tooltip-timeout has expired with the
25945 // cursor hovering above @status_icon; or emitted when @status_icon got
25946 // focus in keyboard mode.
25947 // Using the given coordinates, the signal handler should determine
25948 // whether a tooltip should be shown for @status_icon. If this is
25949 // the case %TRUE should be returned, %FALSE otherwise. Note that if
25950 // should not be used.
25951 // The signal handler is free to manipulate @tooltip with the therefore
25952 // destined function calls.
25953 // Whether this signal is emitted is platform-dependent.
25954 // For plain text tooltips, use #GtkStatusIcon:tooltip-text in preference.
25955 // RETURNS: %TRUE if @tooltip should be shown right now, %FALSE otherwise.
25956 // <x>: the x coordinate of the cursor position where the request has been emitted, relative to @status_icon
25957 // <y>: the y coordinate of the cursor position where the request has been emitted, relative to @status_icon
25958 // <keyboard_mode>: %TRUE if the tooltip was trigged using the keyboard
25959 // <tooltip>: a #GtkTooltip
25960 extern (C) alias static c_int function (StatusIcon* this_, int x, int y, c_int keyboard_mode, Tooltip* tooltip, void* user_data=null) signal_query_tooltip;
25961 ulong signal_connect(string name:"query-tooltip", CB:signal_query_tooltip)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25962 return signal_connect_data!()(&this, cast(char*)"query-tooltip",
25963 cast(GObject2.Callback)cb, data, null, cf);
25966 // The ::scroll-event signal is emitted when a button in the 4 to 7
25967 // range is pressed. Wheel mice are usually configured to generate
25968 // button press events for buttons 4 and 5 when the wheel is turned.
25969 // Whether this event is emitted is platform-dependent.
25970 // %FALSE to propagate the event further.
25971 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
25972 // <event>: the #GdkEventScroll which triggered this signal
25973 extern (C) alias static c_int function (StatusIcon* this_, Gdk2.Event* event, void* user_data=null) signal_scroll_event;
25974 ulong signal_connect(string name:"scroll-event", CB:signal_scroll_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25975 return signal_connect_data!()(&this, cast(char*)"scroll-event",
25976 cast(GObject2.Callback)cb, data, null, cf);
25979 // VERSION: 2.10
25980 // Gets emitted when the size available for the image
25981 // changes, e.g. because the notification area got resized.
25982 // size. Otherwise, GTK+ will scale the icon as necessary.
25983 // RETURNS: %TRUE if the icon was updated for the new
25984 // <size>: the new size
25985 extern (C) alias static c_int function (StatusIcon* this_, int size, void* user_data=null) signal_size_changed;
25986 ulong signal_connect(string name:"size-changed", CB:signal_size_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
25987 return signal_connect_data!()(&this, cast(char*)"size-changed",
25988 cast(GObject2.Callback)cb, data, null, cf);
25992 struct StatusIconClass {
25993 GObject2.ObjectClass parent_class;
25994 extern (C) void function (StatusIcon* status_icon) activate;
25995 extern (C) void function (StatusIcon* status_icon, uint button, uint activate_time) popup_menu;
25996 extern (C) int function (StatusIcon* status_icon, int size) size_changed;
25997 extern (C) int function (StatusIcon* status_icon, Gdk2.EventButton* event) button_press_event;
25998 extern (C) int function (StatusIcon* status_icon, Gdk2.EventButton* event) button_release_event;
25999 extern (C) int function (StatusIcon* status_icon, Gdk2.EventScroll* event) scroll_event;
26000 extern (C) int function (StatusIcon* status_icon, int x, int y, int keyboard_mode, Tooltip* tooltip) query_tooltip;
26001 void* __gtk_reserved1, __gtk_reserved2;
26004 struct StatusIconPrivate {
26007 struct Statusbar /* : HBox */ {
26008 mixin Atk.ImplementorIface.__interface__;
26009 mixin Buildable.__interface__;
26010 mixin Orientable.__interface__;
26011 alias parent_widget this;
26012 alias parent_widget super_;
26013 alias parent_widget hbox;
26014 HBox parent_widget;
26015 Widget* frame, label;
26016 GLib2.SList* messages, keys;
26017 uint seq_context_id, seq_message_id;
26018 Gdk2.Window* grip_window;
26019 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26020 uint, "has_resize_grip", 1,
26021 uint, "__dummy32A", 31));
26024 // Creates a new #GtkStatusbar ready for messages.
26025 // RETURNS: the new #GtkStatusbar
26026 static Statusbar* new_()() {
26027 return gtk_statusbar_new();
26030 // Returns a new context identifier, given a description
26031 // of the actual context. Note that the description is
26032 // <emphasis>not</emphasis> shown in the UI.
26033 // RETURNS: an integer id
26034 // <context_description>: textual description of what context the new message is being used in
26035 uint get_context_id()(char* context_description) {
26036 return gtk_statusbar_get_context_id(&this, context_description);
26039 // Returns whether the statusbar has a resize grip.
26040 // RETURNS: %TRUE if the statusbar has a resize grip.
26041 int get_has_resize_grip()() {
26042 return gtk_statusbar_get_has_resize_grip(&this);
26045 // VERSION: 2.20
26046 // Retrieves the box containing the label widget.
26047 // RETURNS: a #GtkBox
26048 Widget* get_message_area()() {
26049 return gtk_statusbar_get_message_area(&this);
26052 // Removes the first message in the #GtkStatusBar's stack
26053 // with the given context id.
26054 // Note that this may not change the displayed message, if
26055 // the message at the top of the stack has a different
26056 // context id.
26057 // <context_id>: a context identifier
26058 void pop()(uint context_id) {
26059 gtk_statusbar_pop(&this, context_id);
26062 // Pushes a new message onto a statusbar's stack.
26063 // gtk_statusbar_remove().
26064 // RETURNS: a message id that can be used with
26065 // <context_id>: the message's context id, as returned by gtk_statusbar_get_context_id()
26066 // <text>: the message to add to the statusbar
26067 uint push()(uint context_id, char* text) {
26068 return gtk_statusbar_push(&this, context_id, text);
26071 // Forces the removal of a message from a statusbar's stack.
26072 // The exact @context_id and @message_id must be specified.
26073 // <context_id>: a context identifier
26074 // <message_id>: a message identifier, as returned by gtk_statusbar_push()
26075 void remove()(uint context_id, uint message_id) {
26076 gtk_statusbar_remove(&this, context_id, message_id);
26079 // VERSION: 2.22
26080 // Forces the removal of all messages from a statusbar's
26081 // stack with the exact @context_id.
26082 // <context_id>: a context identifier
26083 void remove_all()(uint context_id) {
26084 gtk_statusbar_remove_all(&this, context_id);
26087 // Sets whether the statusbar has a resize grip.
26088 // %TRUE by default.
26089 // <setting>: %TRUE to have a resize grip
26090 void set_has_resize_grip()(int setting) {
26091 gtk_statusbar_set_has_resize_grip(&this, setting);
26094 // Is emitted whenever a new message is popped off a statusbar's stack.
26095 // <context_id>: the context id of the relevant message/statusbar.
26096 // <text>: the message that was just popped.
26097 extern (C) alias static void function (Statusbar* this_, c_uint context_id, char* text, void* user_data=null) signal_text_popped;
26099 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26100 return super_.signal_connect!name(cb, data, cf);
26103 ulong signal_connect(string name:"text-popped", CB:signal_text_popped)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26104 return signal_connect_data!()(&this, cast(char*)"text-popped",
26105 cast(GObject2.Callback)cb, data, null, cf);
26108 // Is emitted whenever a new message gets pushed onto a statusbar's stack.
26109 // <context_id>: the context id of the relevant message/statusbar.
26110 // <text>: the message that was pushed.
26111 extern (C) alias static void function (Statusbar* this_, c_uint context_id, char* text, void* user_data=null) signal_text_pushed;
26112 ulong signal_connect(string name:"text-pushed", CB:signal_text_pushed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26113 return signal_connect_data!()(&this, cast(char*)"text-pushed",
26114 cast(GObject2.Callback)cb, data, null, cf);
26118 struct StatusbarClass {
26119 HBoxClass parent_class;
26120 void* reserved;
26121 extern (C) void function (Statusbar* statusbar, uint context_id, char* text) text_pushed;
26122 extern (C) void function (Statusbar* statusbar, uint context_id, char* text) text_popped;
26123 extern (C) void function () _gtk_reserved1;
26124 extern (C) void function () _gtk_reserved2;
26125 extern (C) void function () _gtk_reserved3;
26126 extern (C) void function () _gtk_reserved4;
26129 struct StockItem {
26130 char* stock_id, label;
26131 Gdk2.ModifierType modifier;
26132 uint keyval;
26133 char* translation_domain;
26136 // Unintrospectable method: copy() / gtk_stock_item_copy()
26137 // Copies a stock item, mostly useful for language bindings and not in applications.
26138 // RETURNS: a new #GtkStockItem
26139 StockItem* copy()() {
26140 return gtk_stock_item_copy(&this);
26143 // Frees a stock item allocated on the heap, such as one returned by
26144 // gtk_stock_item_copy(). Also frees the fields inside the stock item,
26145 // if they are not %NULL.
26146 void free()() {
26147 gtk_stock_item_free(&this);
26151 struct Style /* : GObject.Object */ {
26152 alias parent_instance this;
26153 alias parent_instance super_;
26154 alias parent_instance object;
26155 GObject2.Object parent_instance;
26156 Gdk2.Color[5] fg, bg, light, dark, mid, text, base, text_aa;
26157 Gdk2.Color black, white;
26158 Pango.FontDescription* font_desc;
26159 int xthickness, ythickness;
26160 Gdk2.GC*[5] fg_gc, bg_gc, light_gc, dark_gc, mid_gc, text_gc, base_gc, text_aa_gc;
26161 Gdk2.GC* black_gc, white_gc;
26162 Gdk2.Pixmap*[5] bg_pixmap;
26163 private int attach_count, depth;
26164 private Gdk2.Colormap* colormap;
26165 private Gdk2.Font* private_font;
26166 private Pango.FontDescription* private_font_desc;
26167 private RcStyle* rc_style;
26168 private GLib2.SList* styles;
26169 private void*[0] property_cache;
26170 private GLib2.SList* icon_factories;
26173 // Creates a new #GtkStyle.
26174 // RETURNS: a new #GtkStyle.
26175 static Style* /*new*/ new_()() {
26176 return gtk_style_new();
26178 void apply_default_background()(Gdk2.Window* window, int set_bg, StateType state_type, Gdk2.Rectangle* area, int x, int y, int width, int height) {
26179 gtk_style_apply_default_background(&this, window, set_bg, state_type, area, x, y, width, height);
26182 // Unintrospectable method: attach() / gtk_style_attach()
26183 // Attaches a style to a window; this process allocates the
26184 // colors and creates the GC's for the style - it specializes
26185 // it to a particular visual and colormap. The process may
26186 // involve the creation of a new style if the style has already
26187 // been attached to a window with a different style and colormap.
26188 // Since this function may return a new object, you have to use it
26189 // in the following way:
26190 // <literal>style = gtk_style_attach (style, window)</literal>
26191 // If the style is newly created, the style parameter
26192 // will be unref'ed, and the new style will have
26193 // a reference count belonging to the caller.
26194 // RETURNS: Either @style, or a newly-created #GtkStyle.
26195 // <window>: a #GdkWindow.
26196 Style* attach()(Gdk2.Window* window) {
26197 return gtk_style_attach(&this, window);
26200 // Creates a copy of the passed in #GtkStyle object.
26201 // RETURNS: a copy of @style
26202 Style* /*new*/ copy()() {
26203 return gtk_style_copy(&this);
26206 // Detaches a style from a window. If the style is not attached
26207 // to any windows anymore, it is unrealized. See gtk_style_attach().
26208 void detach()() {
26209 gtk_style_detach(&this);
26212 // Unintrospectable method: get() / gtk_style_get()
26213 // VERSION: 2.16
26214 // Gets the values of a multiple style properties for @widget_type
26215 // from @style.
26216 // <widget_type>: the #GType of a descendant of #GtkWidget
26217 // <first_property_name>: the name of the first style property to get
26218 /+ Not available -- variadic methods unsupported - use the C function directly.
26219 alias gtk_style_get get; // Variadic
26222 // Gets the #GdkFont to use for the given style. This is
26223 // meant only as a replacement for direct access to @style->font
26224 // and should not be used in new code. New code should
26225 // use @style->font_desc instead.
26226 // by the style; if you want to keep around a copy, you must
26227 // call gdk_font_ref().
26228 // RETURNS: the #GdkFont for the style. This font is owned
26229 Gdk2.Font* /*new*/ get_font()() {
26230 return gtk_style_get_font(&this);
26233 // VERSION: 2.16
26234 // Queries the value of a style property corresponding to a
26235 // widget class is in the given style.
26236 // <widget_type>: the #GType of a descendant of #GtkWidget
26237 // <property_name>: the name of the style property to get
26238 // <value>: a #GValue where the value of the property being queried will be stored
26239 void get_style_property()(Type widget_type, char* property_name, GObject2.Value* value) {
26240 gtk_style_get_style_property(&this, widget_type, property_name, value);
26243 // Unintrospectable method: get_valist() / gtk_style_get_valist()
26244 // VERSION: 2.16
26245 // Non-vararg variant of gtk_style_get().
26246 // Used primarily by language bindings.
26247 // <widget_type>: the #GType of a descendant of #GtkWidget
26248 // <first_property_name>: the name of the first style property to get
26249 // <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.
26250 void get_valist()(Type widget_type, char* first_property_name, va_list var_args) {
26251 gtk_style_get_valist(&this, widget_type, first_property_name, var_args);
26254 // VERSION: 2.10
26255 // Looks up @color_name in the style's logical color mappings,
26256 // filling in @color and returning %TRUE if found, otherwise
26257 // returning %FALSE. Do not cache the found mapping, because
26258 // it depends on the #GtkStyle and might change when a theme
26259 // switch occurs.
26260 // RETURNS: %TRUE if the mapping was found.
26261 // <color_name>: the name of the logical color to look up
26262 // <color>: the #GdkColor to fill in
26263 int lookup_color()(char* color_name, /*out*/ Gdk2.Color* color) {
26264 return gtk_style_lookup_color(&this, color_name, color);
26267 // Looks up @stock_id in the icon factories associated with @style
26268 // and the default icon factory, returning an icon set if found,
26269 // otherwise %NULL.
26270 // RETURNS: icon set of @stock_id
26271 // <stock_id>: an icon name
26272 IconSet* lookup_icon_set()(char* stock_id) {
26273 return gtk_style_lookup_icon_set(&this, stock_id);
26276 // Unintrospectable method: ref() / gtk_style_ref()
26277 // DEPRECATED (v2.0) method: ref - use g_object_ref() instead.
26278 // Increase the reference count of @style.
26279 // RETURNS: @style.
26280 Style* ref_()() {
26281 return gtk_style_ref(&this);
26284 // Renders the icon specified by @source at the given @size
26285 // according to the given parameters and returns the result in a
26286 // pixbuf.
26287 // containing the rendered icon
26288 // RETURNS: a newly-created #GdkPixbuf
26289 // <source>: the #GtkIconSource specifying the icon to render
26290 // <direction>: a text direction
26291 // <state>: a state
26292 // <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.
26293 // <widget>: the widget
26294 // <detail>: a style detail
26295 GdkPixbuf2.Pixbuf* /*new*/ render_icon()(IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null) {
26296 return gtk_style_render_icon(&this, source, direction, state, size, widget, detail);
26299 // Sets the background of @window to the background color or pixmap
26300 // specified by @style for the given state.
26301 // <window>: a #GdkWindow
26302 // <state_type>: a state
26303 void set_background()(Gdk2.Window* window, StateType state_type) {
26304 gtk_style_set_background(&this, window, state_type);
26307 // Sets the #GdkFont to use for a given style. This is
26308 // meant only as a replacement for direct access to style->font
26309 // and should not be used in new code. New code should
26310 // use style->font_desc instead.
26311 // <font>: a #GdkFont, or %NULL to use the #GdkFont corresponding to style->font_desc.
26312 void set_font()(Gdk2.Font* font=null) {
26313 gtk_style_set_font(&this, font);
26316 // DEPRECATED (v2.0) method: unref - use g_object_unref() instead.
26317 // Decrease the reference count of @style.
26318 void unref()() {
26319 gtk_style_unref(&this);
26322 // VERSION: 2.4
26323 // Emitted when the style has been initialized for a particular
26324 // colormap and depth. Connecting to this signal is probably seldom
26325 // useful since most of the time applications and widgets only
26326 // deal with styles that have been already realized.
26327 extern (C) alias static void function (Style* this_, void* user_data=null) signal_realize;
26329 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26330 return super_.signal_connect!name(cb, data, cf);
26333 ulong signal_connect(string name:"realize", CB:signal_realize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26334 return signal_connect_data!()(&this, cast(char*)"realize",
26335 cast(GObject2.Callback)cb, data, null, cf);
26338 // VERSION: 2.4
26339 // Emitted when the aspects of the style specific to a particular colormap
26340 // and depth are being cleaned up. A connection to this signal can be useful
26341 // if a widget wants to cache objects like a #GdkGC as object data on #GtkStyle.
26342 // This signal provides a convenient place to free such cached objects.
26343 extern (C) alias static void function (Style* this_, void* user_data=null) signal_unrealize;
26344 ulong signal_connect(string name:"unrealize", CB:signal_unrealize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
26345 return signal_connect_data!()(&this, cast(char*)"unrealize",
26346 cast(GObject2.Callback)cb, data, null, cf);
26350 struct StyleClass {
26351 GObject2.ObjectClass parent_class;
26352 extern (C) void function (Style* style) realize;
26353 extern (C) void function (Style* style) unrealize;
26354 extern (C) void function (Style* style, Style* src) copy;
26355 // Unintrospectable functionp: clone() / ()
26356 extern (C) Style* function (Style* style) clone;
26357 extern (C) void function (Style* style, RcStyle* rc_style) init_from_rc;
26359 // <window>: a #GdkWindow
26360 // <state_type>: a state
26361 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type) set_background;
26363 // RETURNS: a newly-created #GdkPixbuf
26364 // <source>: the #GtkIconSource specifying the icon to render
26365 // <direction>: a text direction
26366 // <state>: a state
26367 // <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.
26368 // <widget>: the widget
26369 // <detail>: a style detail
26370 extern (C) GdkPixbuf2.Pixbuf* /*new*/ function (Style* style, IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null) render_icon;
26371 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x1, int x2, int y) draw_hline;
26372 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int y1_, int y2_, int x) draw_vline;
26373 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_shadow;
26374 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.Point* point, int npoints, int fill) draw_polygon;
26375 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, ArrowType arrow_type, int fill, int x, int y, int width, int height) draw_arrow;
26376 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_diamond;
26377 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, char* string_) draw_string;
26378 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_box;
26379 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_flat_box;
26380 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_check;
26381 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_option;
26382 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_tab;
26383 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) draw_shadow_gap;
26384 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) draw_box_gap;
26385 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side) draw_extension;
26386 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) draw_focus;
26387 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) draw_slider;
26388 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) draw_handle;
26389 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, ExpanderStyle expander_style) draw_expander;
26390 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, int use_text, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, Pango.Layout* layout) draw_layout;
26391 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.WindowEdge edge, int x, int y, int width, int height) draw_resize_grip;
26392 extern (C) void function (Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, uint step, int x, int y, int width, int height) draw_spinner;
26393 extern (C) void function () _gtk_reserved1;
26394 extern (C) void function () _gtk_reserved2;
26395 extern (C) void function () _gtk_reserved3;
26396 extern (C) void function () _gtk_reserved4;
26397 extern (C) void function () _gtk_reserved5;
26398 extern (C) void function () _gtk_reserved6;
26399 extern (C) void function () _gtk_reserved7;
26400 extern (C) void function () _gtk_reserved8;
26401 extern (C) void function () _gtk_reserved9;
26402 extern (C) void function () _gtk_reserved10;
26403 extern (C) void function () _gtk_reserved11;
26406 enum SubmenuDirection {
26407 LEFT = 0,
26408 RIGHT = 1
26410 enum SubmenuPlacement {
26411 TOP_BOTTOM = 0,
26412 LEFT_RIGHT = 1
26414 enum int TEXT_VIEW_PRIORITY_VALIDATE = 5;
26415 enum int TYPE_FUNDAMENTAL_LAST = -1;
26416 struct Table /* : Container */ {
26417 mixin Atk.ImplementorIface.__interface__;
26418 mixin Buildable.__interface__;
26419 alias container this;
26420 alias container super_;
26421 Container container;
26422 GLib2.List* children;
26423 TableRowCol* rows, cols;
26424 ushort nrows, ncols, column_spacing, row_spacing;
26425 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26426 uint, "homogeneous", 1,
26427 uint, "__dummy32A", 31));
26429 static Table* new_()(uint rows, uint columns, int homogeneous) {
26430 return gtk_table_new(rows, columns, homogeneous);
26432 void attach()(Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach, AttachOptions xoptions, AttachOptions yoptions, uint xpadding, uint ypadding) {
26433 gtk_table_attach(&this, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding);
26435 void attach_defaults()(Widget* widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) {
26436 gtk_table_attach_defaults(&this, widget, left_attach, right_attach, top_attach, bottom_attach);
26439 // Gets the amount of space between column @col, and
26440 // column @col + 1. See gtk_table_set_col_spacing().
26441 // RETURNS: the column spacing
26442 // <column>: a column in the table, 0 indicates the first column
26443 uint get_col_spacing()(uint column) {
26444 return gtk_table_get_col_spacing(&this, column);
26447 // Gets the default column spacing for the table. This is
26448 // the spacing that will be used for newly added columns.
26449 // (See gtk_table_set_col_spacings())
26450 // RETURNS: the default column spacing
26451 uint get_default_col_spacing()() {
26452 return gtk_table_get_default_col_spacing(&this);
26455 // Gets the default row spacing for the table. This is
26456 // the spacing that will be used for newly added rows.
26457 // (See gtk_table_set_row_spacings())
26458 // RETURNS: the default row spacing
26459 uint get_default_row_spacing()() {
26460 return gtk_table_get_default_row_spacing(&this);
26463 // Returns whether the table cells are all constrained to the same
26464 // width and height. (See gtk_table_set_homogenous ())
26465 // RETURNS: %TRUE if the cells are all constrained to the same size
26466 int get_homogeneous()() {
26467 return gtk_table_get_homogeneous(&this);
26470 // Gets the amount of space between row @row, and
26471 // row @row + 1. See gtk_table_set_row_spacing().
26472 // RETURNS: the row spacing
26473 // <row>: a row in the table, 0 indicates the first row
26474 uint get_row_spacing()(uint row) {
26475 return gtk_table_get_row_spacing(&this, row);
26478 // VERSION: 2.22
26479 // Returns the number of rows and columns in the table.
26480 // <rows>: return location for the number of rows, or %NULL
26481 // <columns>: return location for the number of columns, or %NULL
26482 void get_size()(/*out*/ uint* rows=null, /*out*/ uint* columns=null) {
26483 gtk_table_get_size(&this, rows, columns);
26485 void resize()(uint rows, uint columns) {
26486 gtk_table_resize(&this, rows, columns);
26488 void set_col_spacing()(uint column, uint spacing) {
26489 gtk_table_set_col_spacing(&this, column, spacing);
26491 void set_col_spacings()(uint spacing) {
26492 gtk_table_set_col_spacings(&this, spacing);
26494 void set_homogeneous()(int homogeneous) {
26495 gtk_table_set_homogeneous(&this, homogeneous);
26497 void set_row_spacing()(uint row, uint spacing) {
26498 gtk_table_set_row_spacing(&this, row, spacing);
26500 void set_row_spacings()(uint spacing) {
26501 gtk_table_set_row_spacings(&this, spacing);
26505 struct TableChild {
26506 Widget* widget;
26507 ushort left_attach, right_attach, top_attach, bottom_attach, xpadding, ypadding;
26508 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26509 uint, "xexpand", 1,
26510 uint, "yexpand", 1,
26511 uint, "xshrink", 1,
26512 uint, "yshrink", 1,
26513 uint, "xfill", 1,
26514 uint, "yfill", 1,
26515 uint, "__dummy32A", 26));
26518 struct TableClass {
26519 ContainerClass parent_class;
26522 struct TableRowCol {
26523 ushort requisition, allocation, spacing;
26524 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26525 uint, "need_expand", 1,
26526 uint, "need_shrink", 1,
26527 uint, "expand", 1,
26528 uint, "shrink", 1,
26529 uint, "empty", 1,
26530 uint, "__dummy32A", 27));
26533 struct TargetEntry {
26534 char* target;
26535 uint flags, info;
26538 enum TargetFlags {
26539 SAME_APP = 1,
26540 SAME_WIDGET = 2,
26541 OTHER_APP = 4,
26542 OTHER_WIDGET = 8
26544 struct TargetList {
26545 GLib2.List* list;
26546 uint ref_count;
26549 // Creates a new #GtkTargetList from an array of #GtkTargetEntry.
26550 // RETURNS: the new #GtkTargetList.
26551 // <targets>: Pointer to an array of #GtkTargetEntry
26552 // <ntargets>: number of entries in @targets.
26553 static TargetList* /*new*/ new_()(TargetEntry* targets, uint ntargets) {
26554 return gtk_target_list_new(targets, ntargets);
26557 // Appends another target to a #GtkTargetList.
26558 // <target>: the interned atom representing the target
26559 // <flags>: the flags for this target
26560 // <info>: an ID that will be passed back to the application
26561 void add()(Gdk2.Atom target, uint flags, uint info) {
26562 gtk_target_list_add(&this, target, flags, info);
26565 // VERSION: 2.6
26566 // Appends the image targets supported by #GtkSelection to
26567 // the target list. All targets are added with the same @info.
26568 // <info>: an ID that will be passed back to the application
26569 // <writable>: whether to add only targets for which GTK+ knows how to convert a pixbuf into the format
26570 void add_image_targets()(uint info, int writable) {
26571 gtk_target_list_add_image_targets(&this, info, writable);
26574 // VERSION: 2.10
26575 // Appends the rich text targets registered with
26576 // gtk_text_buffer_register_serialize_format() or
26577 // gtk_text_buffer_register_deserialize_format() to the target list. All
26578 // targets are added with the same @info.
26579 // <info>: an ID that will be passed back to the application
26580 // <deserializable>: if %TRUE, then deserializable rich text formats will be added, serializable formats otherwise.
26581 // <buffer>: a #GtkTextBuffer.
26582 void add_rich_text_targets()(uint info, int deserializable, TextBuffer* buffer) {
26583 gtk_target_list_add_rich_text_targets(&this, info, deserializable, buffer);
26586 // Prepends a table of #GtkTargetEntry to a target list.
26587 // <targets>: the table of #GtkTargetEntry
26588 // <ntargets>: number of targets in the table
26589 void add_table()(TargetEntry* targets, uint ntargets) {
26590 gtk_target_list_add_table(&this, targets, ntargets);
26593 // VERSION: 2.6
26594 // Appends the text targets supported by #GtkSelection to
26595 // the target list. All targets are added with the same @info.
26596 // <info>: an ID that will be passed back to the application
26597 void add_text_targets()(uint info) {
26598 gtk_target_list_add_text_targets(&this, info);
26601 // VERSION: 2.6
26602 // Appends the URI targets supported by #GtkSelection to
26603 // the target list. All targets are added with the same @info.
26604 // <info>: an ID that will be passed back to the application
26605 void add_uri_targets()(uint info) {
26606 gtk_target_list_add_uri_targets(&this, info);
26609 // Looks up a given target in a #GtkTargetList.
26610 // RETURNS: %TRUE if the target was found, otherwise %FALSE
26611 // <target>: an interned atom representing the target to search for
26612 // <info>: a pointer to the location to store application info for target, or %NULL
26613 int find()(Gdk2.Atom target, uint* info) {
26614 return gtk_target_list_find(&this, target, info);
26617 // Increases the reference count of a #GtkTargetList by one.
26618 // RETURNS: the passed in #GtkTargetList.
26619 TargetList* /*new*/ ref_()() {
26620 return gtk_target_list_ref(&this);
26623 // Removes a target from a target list.
26624 // <target>: the interned atom representing the target
26625 void remove()(Gdk2.Atom target) {
26626 gtk_target_list_remove(&this, target);
26629 // Decreases the reference count of a #GtkTargetList by one.
26630 // If the resulting reference count is zero, frees the list.
26631 void unref()() {
26632 gtk_target_list_unref(&this);
26636 struct TargetPair {
26637 Gdk2.Atom target;
26638 uint flags, info;
26641 struct TearoffMenuItem /* : MenuItem */ {
26642 mixin Atk.ImplementorIface.__interface__;
26643 mixin Activatable.__interface__;
26644 mixin Buildable.__interface__;
26645 alias menu_item this;
26646 alias menu_item super_;
26647 alias menu_item menuitem;
26648 MenuItem menu_item;
26649 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26650 uint, "torn_off", 1,
26651 uint, "__dummy32A", 31));
26653 static TearoffMenuItem* new_()() {
26654 return gtk_tearoff_menu_item_new();
26658 struct TearoffMenuItemClass {
26659 MenuItemClass parent_class;
26660 extern (C) void function () _gtk_reserved1;
26661 extern (C) void function () _gtk_reserved2;
26662 extern (C) void function () _gtk_reserved3;
26663 extern (C) void function () _gtk_reserved4;
26666 struct TextAppearance {
26667 Gdk2.Color bg_color, fg_color;
26668 Gdk2.Bitmap* bg_stipple, fg_stipple;
26669 int rise;
26670 private void* padding1;
26671 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26672 uint, "underline", 4,
26673 uint, "strikethrough", 1,
26674 uint, "draw_bg", 1,
26675 uint, "inside_selection", 1,
26676 uint, "is_text", 1,
26677 uint, "pad1", 1,
26678 uint, "pad2", 1,
26679 uint, "pad3", 1,
26680 uint, "pad4", 1,
26681 uint, "__dummy32A", 20));
26684 struct TextAttrAppearance {
26685 Pango.Attribute attr;
26686 TextAppearance appearance;
26689 struct TextAttributes {
26690 private uint refcount;
26691 TextAppearance appearance;
26692 Justification justification;
26693 TextDirection direction;
26694 Pango.FontDescription* font;
26695 double font_scale;
26696 int left_margin, indent, right_margin, pixels_above_lines, pixels_below_lines, pixels_inside_wrap;
26697 Pango.TabArray* tabs;
26698 WrapMode wrap_mode;
26699 Pango.Language* language;
26700 private Gdk2.Color* pg_bg_color;
26701 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26702 uint, "invisible", 1,
26703 uint, "bg_full_height", 1,
26704 uint, "editable", 1,
26705 uint, "realized", 1,
26706 uint, "pad1", 1,
26707 uint, "pad2", 1,
26708 uint, "pad3", 1,
26709 uint, "pad4", 1,
26710 uint, "__dummy32A", 24));
26713 // Creates a #GtkTextAttributes, which describes
26714 // a set of properties on some text.
26715 // RETURNS: a new #GtkTextAttributes
26716 static TextAttributes* /*new*/ new_()() {
26717 return gtk_text_attributes_new();
26720 // Copies @src and returns a new #GtkTextAttributes.
26721 // RETURNS: a copy of @src
26722 TextAttributes* /*new*/ copy()() {
26723 return gtk_text_attributes_copy(&this);
26726 // Copies the values from @src to @dest so that @dest has the same values
26727 // as @src. Frees existing values in @dest.
26728 // <dest>: another #GtkTextAttributes
26729 void copy_values()(TextAttributes* dest) {
26730 gtk_text_attributes_copy_values(&this, dest);
26733 // Increments the reference count on @values.
26734 // RETURNS: the #GtkTextAttributes that were passed in
26735 TextAttributes* /*new*/ ref_()() {
26736 return gtk_text_attributes_ref(&this);
26739 // Decrements the reference count on @values, freeing the structure
26740 // if the reference count reaches 0.
26741 void unref()() {
26742 gtk_text_attributes_unref(&this);
26746 struct TextBTree {
26749 struct TextBuffer /* : GObject.Object */ {
26750 alias parent_instance this;
26751 alias parent_instance super_;
26752 alias parent_instance object;
26753 GObject2.Object parent_instance;
26754 TextTagTable* tag_table;
26755 TextBTree* btree;
26756 GLib2.SList* clipboard_contents_buffers, selection_clipboards;
26757 TextLogAttrCache* log_attr_cache;
26758 uint user_action_count;
26759 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
26760 uint, "modified", 1,
26761 uint, "has_selection", 1,
26762 uint, "__dummy32A", 30));
26765 // Creates a new text buffer.
26766 // RETURNS: a new text buffer
26767 // <table>: a tag table, or %NULL to create a new one
26768 static TextBuffer* /*new*/ new_()(TextTagTable* table=null) {
26769 return gtk_text_buffer_new(table);
26772 // VERSION: 2.12
26773 // Adds the mark at position @where. The mark must not be added to
26774 // another buffer, and if its name is not %NULL then there must not
26775 // be another mark in the buffer with the same name.
26776 // Emits the "mark-set" signal as notification of the mark's initial
26777 // placement.
26778 // <mark>: the mark to add
26779 // <where>: location to place mark
26780 void add_mark()(TextMark* mark, TextIter* where) {
26781 gtk_text_buffer_add_mark(&this, mark, where);
26784 // Adds @clipboard to the list of clipboards in which the selection
26785 // contents of @buffer are available. In most cases, @clipboard will be
26786 // the #GtkClipboard of type %GDK_SELECTION_PRIMARY for a view of @buffer.
26787 // <clipboard>: a #GtkClipboard
26788 void add_selection_clipboard()(Clipboard* clipboard) {
26789 gtk_text_buffer_add_selection_clipboard(&this, clipboard);
26792 // Emits the "apply-tag" signal on @buffer. The default
26793 // handler for the signal applies @tag to the given range.
26794 // <tag>: a #GtkTextTag
26795 // <start>: one bound of range to be tagged
26796 // <end>: other bound of range to be tagged
26797 void apply_tag()(TextTag* tag, TextIter* start, TextIter* end) {
26798 gtk_text_buffer_apply_tag(&this, tag, start, end);
26801 // Calls gtk_text_tag_table_lookup() on the buffer's tag table to
26802 // get a #GtkTextTag, then calls gtk_text_buffer_apply_tag().
26803 // <name>: name of a named #GtkTextTag
26804 // <start>: one bound of range to be tagged
26805 // <end>: other bound of range to be tagged
26806 void apply_tag_by_name()(char* name, TextIter* start, TextIter* end) {
26807 gtk_text_buffer_apply_tag_by_name(&this, name, start, end);
26810 // VERSION: 2.6
26811 // Performs the appropriate action as if the user hit the delete
26812 // key with the cursor at the position specified by @iter. In the
26813 // normal case a single character will be deleted, but when
26814 // combining accents are involved, more than one character can
26815 // be deleted, and when precomposed character and accent combinations
26816 // are involved, less than one character will be deleted.
26817 // Because the buffer is modified, all outstanding iterators become
26818 // invalid after calling this function; however, the @iter will be
26819 // re-initialized to point to the location where text was deleted.
26820 // RETURNS: %TRUE if the buffer was modified
26821 // <iter>: a position in @buffer
26822 // <interactive>: whether the deletion is caused by user interaction
26823 // <default_editable>: whether the buffer is editable by default
26824 int backspace()(TextIter* iter, int interactive, int default_editable) {
26825 return gtk_text_buffer_backspace(&this, iter, interactive, default_editable);
26828 // Called to indicate that the buffer operations between here and a
26829 // call to gtk_text_buffer_end_user_action() are part of a single
26830 // user-visible operation. The operations between
26831 // gtk_text_buffer_begin_user_action() and
26832 // gtk_text_buffer_end_user_action() can then be grouped when creating
26833 // an undo stack. #GtkTextBuffer maintains a count of calls to
26834 // gtk_text_buffer_begin_user_action() that have not been closed with
26835 // a call to gtk_text_buffer_end_user_action(), and emits the
26836 // "begin-user-action" and "end-user-action" signals only for the
26837 // outermost pair of calls. This allows you to build user actions
26838 // from other user actions.
26839 // The "interactive" buffer mutation functions, such as
26840 // gtk_text_buffer_insert_interactive(), automatically call begin/end
26841 // user action around the buffer operations they perform, so there's
26842 // no need to add extra calls if you user action consists solely of a
26843 // single call to one of those functions.
26844 void begin_user_action()() {
26845 gtk_text_buffer_begin_user_action(&this);
26848 // Copies the currently-selected text to a clipboard.
26849 // <clipboard>: the #GtkClipboard object to copy to
26850 void copy_clipboard()(Clipboard* clipboard) {
26851 gtk_text_buffer_copy_clipboard(&this, clipboard);
26854 // This is a convenience function which simply creates a child anchor
26855 // with gtk_text_child_anchor_new() and inserts it into the buffer
26856 // with gtk_text_buffer_insert_child_anchor(). The new anchor is
26857 // owned by the buffer; no reference count is returned to
26858 // the caller of gtk_text_buffer_create_child_anchor().
26859 // RETURNS: the created child anchor
26860 // <iter>: location in the buffer
26861 TextChildAnchor* create_child_anchor()(TextIter* iter) {
26862 return gtk_text_buffer_create_child_anchor(&this, iter);
26865 // Creates a mark at position @where. If @mark_name is %NULL, the mark
26866 // is anonymous; otherwise, the mark can be retrieved by name using
26867 // gtk_text_buffer_get_mark(). If a mark has left gravity, and text is
26868 // inserted at the mark's current location, the mark will be moved to
26869 // the left of the newly-inserted text. If the mark has right gravity
26870 // (@left_gravity = %FALSE), the mark will end up on the right of
26871 // newly-inserted text. The standard left-to-right cursor is a mark
26872 // with right gravity (when you type, the cursor stays on the right
26873 // side of the text you're typing).
26874 // The caller of this function does <emphasis>not</emphasis> own a
26875 // reference to the returned #GtkTextMark, so you can ignore the
26876 // return value if you like. Marks are owned by the buffer and go
26877 // away when the buffer does.
26878 // Emits the "mark-set" signal as notification of the mark's initial
26879 // placement.
26880 // RETURNS: the new #GtkTextMark object
26881 // <mark_name>: name for mark, or %NULL
26882 // <where>: location to place mark
26883 // <left_gravity>: whether the mark has left gravity
26884 TextMark* create_mark()(char* mark_name, TextIter* where, int left_gravity) {
26885 return gtk_text_buffer_create_mark(&this, mark_name, where, left_gravity);
26888 // Unintrospectable method: create_tag() / gtk_text_buffer_create_tag()
26889 // Creates a tag and adds it to the tag table for @buffer.
26890 // Equivalent to calling gtk_text_tag_new() and then adding the
26891 // tag to the buffer's tag table. The returned tag is owned by
26892 // the buffer's tag table, so the ref count will be equal to one.
26893 // If @tag_name is %NULL, the tag is anonymous.
26894 // If @tag_name is non-%NULL, a tag called @tag_name must not already
26895 // exist in the tag table for this buffer.
26896 // The @first_property_name argument and subsequent arguments are a list
26897 // of properties to set on the tag, as with g_object_set().
26898 // RETURNS: a new tag
26899 // <tag_name>: name of the new tag, or %NULL
26900 // <first_property_name>: name of first property to set, or %NULL
26901 /+ Not available -- variadic methods unsupported - use the C function directly.
26902 alias gtk_text_buffer_create_tag create_tag; // Variadic
26905 // Copies the currently-selected text to a clipboard, then deletes
26906 // said text if it's editable.
26907 // <clipboard>: the #GtkClipboard object to cut to
26908 // <default_editable>: default editability of the buffer
26909 void cut_clipboard()(Clipboard* clipboard, int default_editable) {
26910 gtk_text_buffer_cut_clipboard(&this, clipboard, default_editable);
26913 // Deletes text between @start and @end. The order of @start and @end
26914 // is not actually relevant; gtk_text_buffer_delete() will reorder
26915 // them. This function actually emits the "delete-range" signal, and
26916 // the default handler of that signal deletes the text. Because the
26917 // buffer is modified, all outstanding iterators become invalid after
26918 // calling this function; however, the @start and @end will be
26919 // re-initialized to point to the location where text was deleted.
26920 // <start>: a position in @buffer
26921 // <end>: another position in @buffer
26922 void delete_()(TextIter* start, TextIter* end) {
26923 gtk_text_buffer_delete(&this, start, end);
26926 // Deletes all <emphasis>editable</emphasis> text in the given range.
26927 // Calls gtk_text_buffer_delete() for each editable sub-range of
26928 // [@start,@end). @start and @end are revalidated to point to
26929 // the location of the last deleted range, or left untouched if
26930 // no text was deleted.
26931 // RETURNS: whether some text was actually deleted
26932 // <start_iter>: start of range to delete
26933 // <end_iter>: end of range
26934 // <default_editable>: whether the buffer is editable by default
26935 int delete_interactive()(TextIter* start_iter, TextIter* end_iter, int default_editable) {
26936 return gtk_text_buffer_delete_interactive(&this, start_iter, end_iter, default_editable);
26939 // Deletes @mark, so that it's no longer located anywhere in the
26940 // buffer. Removes the reference the buffer holds to the mark, so if
26941 // you haven't called g_object_ref() on the mark, it will be freed. Even
26942 // if the mark isn't freed, most operations on @mark become
26943 // invalid, until it gets added to a buffer again with
26944 // gtk_text_buffer_add_mark(). Use gtk_text_mark_get_deleted() to
26945 // find out if a mark has been removed from its buffer.
26946 // The "mark-deleted" signal will be emitted as notification after
26947 // the mark is deleted.
26948 // <mark>: a #GtkTextMark in @buffer
26949 void delete_mark()(TextMark* mark) {
26950 gtk_text_buffer_delete_mark(&this, mark);
26953 // Deletes the mark named @name; the mark must exist. See
26954 // gtk_text_buffer_delete_mark() for details.
26955 // <name>: name of a mark in @buffer
26956 void delete_mark_by_name()(char* name) {
26957 gtk_text_buffer_delete_mark_by_name(&this, name);
26960 // Deletes the range between the "insert" and "selection_bound" marks,
26961 // that is, the currently-selected text. If @interactive is %TRUE,
26962 // the editability of the selection will be considered (users can't delete
26963 // uneditable text).
26964 // RETURNS: whether there was a non-empty selection to delete
26965 // <interactive>: whether the deletion is caused by user interaction
26966 // <default_editable>: whether the buffer is editable by default
26967 int delete_selection()(int interactive, int default_editable) {
26968 return gtk_text_buffer_delete_selection(&this, interactive, default_editable);
26971 // VERSION: 2.10
26972 // This function deserializes rich text in format @format and inserts
26973 // it at @iter.
26974 // gtk_text_buffer_register_deserialize_format() or
26975 // gtk_text_buffer_register_deserialize_tagset() beforehand.
26976 // RETURNS: %TRUE on success, %FALSE otherwise.
26977 // <content_buffer>: the #GtkTextBuffer to deserialize into
26978 // <format>: the rich text format to use for deserializing
26979 // <iter>: insertion point for the deserialized text
26980 // <data>: data to deserialize
26981 // <length>: length of @data
26982 int deserialize()(TextBuffer* content_buffer, Gdk2.Atom format, TextIter* iter, ubyte* data, size_t length, GLib2.Error** error=null) {
26983 return gtk_text_buffer_deserialize(&this, content_buffer, format, iter, data, length, error);
26986 // VERSION: 2.10
26987 // This functions returns the value set with
26988 // gtk_text_buffer_deserialize_set_can_create_tags()
26989 // RETURNS: whether deserializing this format may create tags
26990 // <format>: a #GdkAtom representing a registered rich text format
26991 int deserialize_get_can_create_tags()(Gdk2.Atom format) {
26992 return gtk_text_buffer_deserialize_get_can_create_tags(&this, format);
26995 // VERSION: 2.10
26996 // Use this function to allow a rich text deserialization function to
26997 // create new tags in the receiving buffer. Note that using this
26998 // function is almost always a bad idea, because the rich text
26999 // functions you register should know how to map the rich text format
27000 // they handler to your text buffers set of tags.
27001 // The ability of creating new (arbitrary!) tags in the receiving buffer
27002 // is meant for special rich text formats like the internal one that
27003 // is registered using gtk_text_buffer_register_deserialize_tagset(),
27004 // because that format is essentially a dump of the internal structure
27005 // of the source buffer, including its tag names.
27006 // You should allow creation of tags only if you know what you are
27007 // doing, e.g. if you defined a tagset name for your application
27008 // suite's text buffers and you know that it's fine to receive new
27009 // tags from these buffers, because you know that your application can
27010 // handle the newly created tags.
27011 // <format>: a #GdkAtom representing a registered rich text format
27012 // <can_create_tags>: whether deserializing this format may create tags
27013 void deserialize_set_can_create_tags()(Gdk2.Atom format, int can_create_tags) {
27014 gtk_text_buffer_deserialize_set_can_create_tags(&this, format, can_create_tags);
27017 // Should be paired with a call to gtk_text_buffer_begin_user_action().
27018 // See that function for a full explanation.
27019 void end_user_action()() {
27020 gtk_text_buffer_end_user_action(&this);
27023 // Retrieves the first and last iterators in the buffer, i.e. the
27024 // entire buffer lies within the range [@start,@end).
27025 // <start>: iterator to initialize with first position in the buffer
27026 // <end>: iterator to initialize with the end iterator
27027 void get_bounds()(/*out*/ TextIter* start, /*out*/ TextIter* end) {
27028 gtk_text_buffer_get_bounds(&this, start, end);
27031 // Gets the number of characters in the buffer; note that characters
27032 // and bytes are not the same, you can't e.g. expect the contents of
27033 // the buffer in string form to be this many bytes long. The character
27034 // count is cached, so this function is very fast.
27035 // RETURNS: number of characters in the buffer
27036 int get_char_count()() {
27037 return gtk_text_buffer_get_char_count(&this);
27040 // VERSION: 2.10
27041 // This function returns the list of targets this text buffer can
27042 // provide for copying and as DND source. The targets in the list are
27043 // added with %info values from the #GtkTextBufferTargetInfo enum,
27044 // using gtk_target_list_add_rich_text_targets() and
27045 // gtk_target_list_add_text_targets().
27046 // RETURNS: the #GtkTargetList
27047 TargetList* get_copy_target_list()() {
27048 return gtk_text_buffer_get_copy_target_list(&this);
27051 // VERSION: 2.10
27052 // This function returns the rich text deserialize formats registered
27053 // with @buffer using gtk_text_buffer_register_deserialize_format() or
27054 // gtk_text_buffer_register_deserialize_tagset()
27055 // #GdkAtom<!-- -->s representing the registered formats.
27056 // RETURNS: an array of
27057 // <n_formats>: return location for the number of formats
27058 Gdk2.Atom* /*new container*/ get_deserialize_formats()(/*out*/ int* n_formats) {
27059 return gtk_text_buffer_get_deserialize_formats(&this, n_formats);
27062 // Initializes @iter with the "end iterator," one past the last valid
27063 // character in the text buffer. If dereferenced with
27064 // gtk_text_iter_get_char(), the end iterator has a character value of
27065 // 0. The entire buffer lies in the range from the first position in
27066 // the buffer (call gtk_text_buffer_get_start_iter() to get
27067 // character position 0) to the end iterator.
27068 // <iter>: iterator to initialize
27069 void get_end_iter()(/*out*/ TextIter* iter) {
27070 gtk_text_buffer_get_end_iter(&this, iter);
27073 // VERSION: 2.10
27074 // Indicates whether the buffer has some text currently selected.
27075 // RETURNS: %TRUE if the there is text selected
27076 int get_has_selection()() {
27077 return gtk_text_buffer_get_has_selection(&this);
27080 // Returns the mark that represents the cursor (insertion point).
27081 // Equivalent to calling gtk_text_buffer_get_mark() to get the mark
27082 // named "insert", but very slightly more efficient, and involves less
27083 // typing.
27084 // RETURNS: insertion point mark
27085 TextMark* get_insert()() {
27086 return gtk_text_buffer_get_insert(&this);
27089 // Obtains the location of @anchor within @buffer.
27090 // <iter>: an iterator to be initialized
27091 // <anchor>: a child anchor that appears in @buffer
27092 void get_iter_at_child_anchor()(/*out*/ TextIter* iter, TextChildAnchor* anchor) {
27093 gtk_text_buffer_get_iter_at_child_anchor(&this, iter, anchor);
27096 // Initializes @iter to the start of the given line.
27097 // <iter>: iterator to initialize
27098 // <line_number>: line number counting from 0
27099 void get_iter_at_line()(/*out*/ TextIter* iter, int line_number) {
27100 gtk_text_buffer_get_iter_at_line(&this, iter, line_number);
27103 // Obtains an iterator pointing to @byte_index within the given line.
27104 // beyond the end of the line. Note <emphasis>bytes</emphasis>, not
27105 // characters; UTF-8 may encode one character as multiple bytes.
27106 // <iter>: iterator to initialize
27107 // <line_number>: line number counting from 0
27108 // <byte_index>: byte index from start of line
27109 void get_iter_at_line_index()(/*out*/ TextIter* iter, int line_number, int byte_index) {
27110 gtk_text_buffer_get_iter_at_line_index(&this, iter, line_number, byte_index);
27113 // Obtains an iterator pointing to @char_offset within the given
27114 // line. The @char_offset must exist, offsets off the end of the line
27115 // are not allowed. Note <emphasis>characters</emphasis>, not bytes;
27116 // UTF-8 may encode one character as multiple bytes.
27117 // <iter>: iterator to initialize
27118 // <line_number>: line number counting from 0
27119 // <char_offset>: char offset from start of line
27120 void get_iter_at_line_offset()(/*out*/ TextIter* iter, int line_number, int char_offset) {
27121 gtk_text_buffer_get_iter_at_line_offset(&this, iter, line_number, char_offset);
27124 // Initializes @iter with the current position of @mark.
27125 // <iter>: iterator to initialize
27126 // <mark>: a #GtkTextMark in @buffer
27127 void get_iter_at_mark()(/*out*/ TextIter* iter, TextMark* mark) {
27128 gtk_text_buffer_get_iter_at_mark(&this, iter, mark);
27131 // Initializes @iter to a position @char_offset chars from the start
27132 // of the entire buffer. If @char_offset is -1 or greater than the number
27133 // of characters in the buffer, @iter is initialized to the end iterator,
27134 // the iterator one past the last valid character in the buffer.
27135 // <iter>: iterator to initialize
27136 // <char_offset>: char offset from start of buffer, counting from 0, or -1
27137 void get_iter_at_offset()(/*out*/ TextIter* iter, int char_offset) {
27138 gtk_text_buffer_get_iter_at_offset(&this, iter, char_offset);
27141 // Obtains the number of lines in the buffer. This value is cached, so
27142 // the function is very fast.
27143 // RETURNS: number of lines in the buffer
27144 int get_line_count()() {
27145 return gtk_text_buffer_get_line_count(&this);
27148 // Returns the mark named @name in buffer @buffer, or %NULL if no such
27149 // mark exists in the buffer.
27150 // RETURNS: a #GtkTextMark, or %NULL
27151 // <name>: a mark name
27152 TextMark* get_mark()(char* name) {
27153 return gtk_text_buffer_get_mark(&this, name);
27156 // Indicates whether the buffer has been modified since the last call
27157 // to gtk_text_buffer_set_modified() set the modification flag to
27158 // %FALSE. Used for example to enable a "save" function in a text
27159 // editor.
27160 // RETURNS: %TRUE if the buffer has been modified
27161 int get_modified()() {
27162 return gtk_text_buffer_get_modified(&this);
27165 // VERSION: 2.10
27166 // This function returns the list of targets this text buffer supports
27167 // for pasting and as DND destination. The targets in the list are
27168 // added with %info values from the #GtkTextBufferTargetInfo enum,
27169 // using gtk_target_list_add_rich_text_targets() and
27170 // gtk_target_list_add_text_targets().
27171 // RETURNS: the #GtkTargetList
27172 TargetList* get_paste_target_list()() {
27173 return gtk_text_buffer_get_paste_target_list(&this);
27176 // Returns the mark that represents the selection bound. Equivalent
27177 // to calling gtk_text_buffer_get_mark() to get the mark named
27178 // "selection_bound", but very slightly more efficient, and involves
27179 // less typing.
27180 // The currently-selected text in @buffer is the region between the
27181 // "selection_bound" and "insert" marks. If "selection_bound" and
27182 // "insert" are in the same place, then there is no current selection.
27183 // gtk_text_buffer_get_selection_bounds() is another convenient function
27184 // for handling the selection, if you just want to know whether there's a
27185 // selection and what its bounds are.
27186 // RETURNS: selection bound mark
27187 TextMark* get_selection_bound()() {
27188 return gtk_text_buffer_get_selection_bound(&this);
27191 // Returns %TRUE if some text is selected; places the bounds
27192 // of the selection in @start and @end (if the selection has length 0,
27193 // then @start and @end are filled in with the same value).
27194 // NULL, then they are not filled in, but the return value still indicates
27195 // whether text is selected.
27196 // RETURNS: whether the selection has nonzero length
27197 // <start>: iterator to initialize with selection start
27198 // <end>: iterator to initialize with selection end
27199 int get_selection_bounds()(/*out*/ TextIter* start, /*out*/ TextIter* end) {
27200 return gtk_text_buffer_get_selection_bounds(&this, start, end);
27203 // VERSION: 2.10
27204 // This function returns the rich text serialize formats registered
27205 // with @buffer using gtk_text_buffer_register_serialize_format() or
27206 // gtk_text_buffer_register_serialize_tagset()
27207 // #GdkAtom<!-- -->s representing the registered formats.
27208 // RETURNS: an array of
27209 // <n_formats>: return location for the number of formats
27210 Gdk2.Atom* /*new container*/ get_serialize_formats()(/*out*/ int* n_formats) {
27211 return gtk_text_buffer_get_serialize_formats(&this, n_formats);
27214 // Returns the text in the range [@start,@end). Excludes undisplayed
27215 // text (text marked with tags that set the invisibility attribute) if
27216 // 0xFFFC character whenever the buffer contains
27217 // embedded images, so byte and character indexes into
27218 // the returned string <emphasis>do</emphasis> correspond to byte
27219 // and character indexes into the buffer. Contrast with
27220 // gtk_text_buffer_get_text(). Note that 0xFFFC can occur in normal
27221 // text as well, so it is not a reliable indicator that a pixbuf or
27222 // widget is in the buffer.
27223 // RETURNS: an allocated UTF-8 string
27224 // <start>: start of a range
27225 // <end>: end of a range
27226 // <include_hidden_chars>: whether to include invisible text
27227 char* /*new*/ get_slice()(TextIter* start, TextIter* end, int include_hidden_chars) {
27228 return gtk_text_buffer_get_slice(&this, start, end, include_hidden_chars);
27231 // Initialized @iter with the first position in the text buffer. This
27232 // is the same as using gtk_text_buffer_get_iter_at_offset() to get
27233 // the iter at character offset 0.
27234 // <iter>: iterator to initialize
27235 void get_start_iter()(/*out*/ TextIter* iter) {
27236 gtk_text_buffer_get_start_iter(&this, iter);
27239 // Get the #GtkTextTagTable associated with this buffer.
27240 // RETURNS: the buffer's tag table
27241 TextTagTable* get_tag_table()() {
27242 return gtk_text_buffer_get_tag_table(&this);
27245 // Returns the text in the range [@start,@end). Excludes undisplayed
27246 // text (text marked with tags that set the invisibility attribute) if
27247 // representing embedded images, so byte and character indexes into
27248 // the returned string do <emphasis>not</emphasis> correspond to byte
27249 // and character indexes into the buffer. Contrast with
27250 // gtk_text_buffer_get_slice().
27251 // RETURNS: an allocated UTF-8 string
27252 // <start>: start of a range
27253 // <end>: end of a range
27254 // <include_hidden_chars>: whether to include invisible text
27255 char* /*new*/ get_text()(TextIter* start, TextIter* end, int include_hidden_chars) {
27256 return gtk_text_buffer_get_text(&this, start, end, include_hidden_chars);
27259 // Inserts @len bytes of @text at position @iter. If @len is -1,
27260 // entirety. Emits the "insert-text" signal; insertion actually occurs
27261 // in the default handler for the signal. @iter is invalidated when
27262 // insertion occurs (because the buffer contents change), but the
27263 // default signal handler revalidates it to point to the end of the
27264 // inserted text.
27265 // <iter>: a position in the buffer
27266 // <text>: text in UTF-8 format
27267 // <len>: length of text in bytes, or -1
27268 void insert()(TextIter* iter, char* text, int len) {
27269 gtk_text_buffer_insert(&this, iter, text, len);
27272 // Simply calls gtk_text_buffer_insert(), using the current
27273 // cursor position as the insertion point.
27274 // <text>: text in UTF-8 format
27275 // <len>: length of text, in bytes
27276 void insert_at_cursor()(char* text, int len) {
27277 gtk_text_buffer_insert_at_cursor(&this, text, len);
27280 // Inserts a child widget anchor into the text buffer at @iter. The
27281 // anchor will be counted as one character in character counts, and
27282 // when obtaining the buffer contents as a string, will be represented
27283 // by the Unicode "object replacement character" 0xFFFC. Note that the
27284 // "slice" variants for obtaining portions of the buffer as a string
27285 // include this character for child anchors, but the "text" variants do
27286 // not. E.g. see gtk_text_buffer_get_slice() and
27287 // gtk_text_buffer_get_text(). Consider
27288 // gtk_text_buffer_create_child_anchor() as a more convenient
27289 // alternative to this function. The buffer will add a reference to
27290 // the anchor, so you can unref it after insertion.
27291 // <iter>: location to insert the anchor
27292 // <anchor>: a #GtkTextChildAnchor
27293 void insert_child_anchor()(TextIter* iter, TextChildAnchor* anchor) {
27294 gtk_text_buffer_insert_child_anchor(&this, iter, anchor);
27297 // Like gtk_text_buffer_insert(), but the insertion will not occur if
27298 // want to prevent insertions at ineditable locations if the insertion
27299 // results from a user action (is interactive).
27300 // have a tag affecting editability applied to it. Typically the
27301 // result of gtk_text_view_get_editable() is appropriate here.
27302 // RETURNS: whether text was actually inserted
27303 // <iter>: a position in @buffer
27304 // <text>: some UTF-8 text
27305 // <len>: length of text in bytes, or -1
27306 // <default_editable>: default editability of buffer
27307 int insert_interactive()(TextIter* iter, char* text, int len, int default_editable) {
27308 return gtk_text_buffer_insert_interactive(&this, iter, text, len, default_editable);
27311 // Calls gtk_text_buffer_insert_interactive() at the cursor
27312 // position.
27313 // have a tag affecting editability applied to it. Typically the
27314 // result of gtk_text_view_get_editable() is appropriate here.
27315 // RETURNS: whether text was actually inserted
27316 // <text>: text in UTF-8 format
27317 // <len>: length of text in bytes, or -1
27318 // <default_editable>: default editability of buffer
27319 int insert_interactive_at_cursor()(char* text, int len, int default_editable) {
27320 return gtk_text_buffer_insert_interactive_at_cursor(&this, text, len, default_editable);
27323 // Inserts an image into the text buffer at @iter. The image will be
27324 // counted as one character in character counts, and when obtaining
27325 // the buffer contents as a string, will be represented by the Unicode
27326 // "object replacement character" 0xFFFC. Note that the "slice"
27327 // variants for obtaining portions of the buffer as a string include
27328 // this character for pixbufs, but the "text" variants do
27329 // not. e.g. see gtk_text_buffer_get_slice() and
27330 // gtk_text_buffer_get_text().
27331 // <iter>: location to insert the pixbuf
27332 // <pixbuf>: a #GdkPixbuf
27333 void insert_pixbuf()(TextIter* iter, GdkPixbuf2.Pixbuf* pixbuf) {
27334 gtk_text_buffer_insert_pixbuf(&this, iter, pixbuf);
27337 // Copies text, tags, and pixbufs between @start and @end (the order
27338 // of @start and @end doesn't matter) and inserts the copy at @iter.
27339 // Used instead of simply getting/inserting text because it preserves
27340 // images and tags. If @start and @end are in a different buffer from
27341 // Implemented via emissions of the insert_text and apply_tag signals,
27342 // so expect those.
27343 // <iter>: a position in @buffer
27344 // <start>: a position in a #GtkTextBuffer
27345 // <end>: another position in the same buffer as @start
27346 void insert_range()(TextIter* iter, TextIter* start, TextIter* end) {
27347 gtk_text_buffer_insert_range(&this, iter, start, end);
27350 // Same as gtk_text_buffer_insert_range(), but does nothing if the
27351 // insertion point isn't editable. The @default_editable parameter
27352 // indicates whether the text is editable at @iter if no tags
27353 // enclosing @iter affect editability. Typically the result of
27354 // gtk_text_view_get_editable() is appropriate here.
27355 // RETURNS: whether an insertion was possible at @iter
27356 // <iter>: a position in @buffer
27357 // <start>: a position in a #GtkTextBuffer
27358 // <end>: another position in the same buffer as @start
27359 // <default_editable>: default editability of the buffer
27360 int insert_range_interactive()(TextIter* iter, TextIter* start, TextIter* end, int default_editable) {
27361 return gtk_text_buffer_insert_range_interactive(&this, iter, start, end, default_editable);
27364 // Unintrospectable method: insert_with_tags() / gtk_text_buffer_insert_with_tags()
27365 // Inserts @text into @buffer at @iter, applying the list of tags to
27366 // the newly-inserted text. The last tag specified must be NULL to
27367 // terminate the list. Equivalent to calling gtk_text_buffer_insert(),
27368 // then gtk_text_buffer_apply_tag() on the inserted text;
27369 // gtk_text_buffer_insert_with_tags() is just a convenience function.
27370 // <iter>: an iterator in @buffer
27371 // <text>: UTF-8 text
27372 // <len>: length of @text, or -1
27373 // <first_tag>: first tag to apply to @text
27374 /+ Not available -- variadic methods unsupported - use the C function directly.
27375 alias gtk_text_buffer_insert_with_tags insert_with_tags; // Variadic
27378 // Unintrospectable method: insert_with_tags_by_name() / gtk_text_buffer_insert_with_tags_by_name()
27379 // Same as gtk_text_buffer_insert_with_tags(), but allows you
27380 // to pass in tag names instead of tag objects.
27381 // <iter>: position in @buffer
27382 // <text>: UTF-8 text
27383 // <len>: length of @text, or -1
27384 // <first_tag_name>: name of a tag to apply to @text
27385 /+ Not available -- variadic methods unsupported - use the C function directly.
27386 alias gtk_text_buffer_insert_with_tags_by_name insert_with_tags_by_name; // Variadic
27389 // Moves @mark to the new location @where. Emits the "mark-set" signal
27390 // as notification of the move.
27391 // <mark>: a #GtkTextMark
27392 // <where>: new location for @mark in @buffer
27393 void move_mark()(TextMark* mark, TextIter* where) {
27394 gtk_text_buffer_move_mark(&this, mark, where);
27397 // Moves the mark named @name (which must exist) to location @where.
27398 // See gtk_text_buffer_move_mark() for details.
27399 // <name>: name of a mark
27400 // <where>: new location for mark
27401 void move_mark_by_name()(char* name, TextIter* where) {
27402 gtk_text_buffer_move_mark_by_name(&this, name, where);
27405 // Pastes the contents of a clipboard at the insertion point, or
27406 // we'll ask for the paste data and return, and at some point later
27407 // after the main loop runs, the paste data will be inserted.)
27408 // <clipboard>: the #GtkClipboard to paste from
27409 // <override_location>: location to insert pasted text, or %NULL for at the cursor
27410 // <default_editable>: whether the buffer is editable by default
27411 void paste_clipboard()(Clipboard* clipboard, TextIter* override_location, int default_editable) {
27412 gtk_text_buffer_paste_clipboard(&this, clipboard, override_location, default_editable);
27415 // This function moves the "insert" and "selection_bound" marks
27416 // simultaneously. If you move them to the same place in two steps
27417 // with gtk_text_buffer_move_mark(), you will temporarily select a
27418 // region in between their old and new locations, which can be pretty
27419 // inefficient since the temporarily-selected region will force stuff
27420 // to be recalculated. This function moves them as a unit, which can
27421 // be optimized.
27422 // <where>: where to put the cursor
27423 void place_cursor()(TextIter* where) {
27424 gtk_text_buffer_place_cursor(&this, where);
27427 // VERSION: 2.10
27428 // This function registers a rich text deserialization @function along with
27429 // its @mime_type with the passed @buffer.
27430 // newly registered format's mime-type.
27431 // RETURNS: the #GdkAtom that corresponds to the
27432 // <mime_type>: the format's mime-type
27433 // <function>: the deserialize function to register
27434 // <user_data>: @function's user_data
27435 // <user_data_destroy>: a function to call when @user_data is no longer needed
27436 Gdk2.Atom register_deserialize_format()(char* mime_type, TextBufferDeserializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy) {
27437 return gtk_text_buffer_register_deserialize_format(&this, mime_type, function_, user_data, user_data_destroy);
27440 // VERSION: 2.10
27441 // This function registers GTK+'s internal rich text serialization
27442 // format with the passed @buffer. See
27443 // gtk_text_buffer_register_serialize_tagset() for details.
27444 // newly registered format's mime-type.
27445 // RETURNS: the #GdkAtom that corresponds to the
27446 // <tagset_name>: an optional tagset name, on %NULL
27447 Gdk2.Atom register_deserialize_tagset()(char* tagset_name=null) {
27448 return gtk_text_buffer_register_deserialize_tagset(&this, tagset_name);
27451 // VERSION: 2.10
27452 // This function registers a rich text serialization @function along with
27453 // its @mime_type with the passed @buffer.
27454 // newly registered format's mime-type.
27455 // RETURNS: the #GdkAtom that corresponds to the
27456 // <mime_type>: the format's mime-type
27457 // <function>: the serialize function to register
27458 // <user_data>: %function's user_data
27459 // <user_data_destroy>: a function to call when @user_data is no longer needed
27460 Gdk2.Atom register_serialize_format()(char* mime_type, TextBufferSerializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy) {
27461 return gtk_text_buffer_register_serialize_format(&this, mime_type, function_, user_data, user_data_destroy);
27464 // VERSION: 2.10
27465 // This function registers GTK+'s internal rich text serialization
27466 // format with the passed @buffer. The internal format does not comply
27467 // to any standard rich text format and only works between #GtkTextBuffer
27468 // instances. It is capable of serializing all of a text buffer's tags
27469 // and embedded pixbufs.
27470 // This function is just a wrapper around
27471 // gtk_text_buffer_register_serialize_format(). The mime type used
27472 // for registering is "application/x-gtk-text-buffer-rich-text", or
27473 // "application/x-gtk-text-buffer-rich-text;format=@tagset_name" if a
27474 // The @tagset_name can be used to restrict the transfer of rich text
27475 // to buffers with compatible sets of tags, in order to avoid unknown
27476 // tags from being pasted. It is probably the common case to pass an
27477 // identifier != %NULL here, since the %NULL tagset requires the
27478 // receiving buffer to deal with with pasting of arbitrary tags.
27479 // newly registered format's mime-type.
27480 // RETURNS: the #GdkAtom that corresponds to the
27481 // <tagset_name>: an optional tagset name, on %NULL
27482 Gdk2.Atom register_serialize_tagset()(char* tagset_name=null) {
27483 return gtk_text_buffer_register_serialize_tagset(&this, tagset_name);
27486 // Removes all tags in the range between @start and @end. Be careful
27487 // with this function; it could remove tags added in code unrelated to
27488 // the code you're currently writing. That is, using this function is
27489 // probably a bad idea if you have two or more unrelated code sections
27490 // that add tags.
27491 // <start>: one bound of range to be untagged
27492 // <end>: other bound of range to be untagged
27493 void remove_all_tags()(TextIter* start, TextIter* end) {
27494 gtk_text_buffer_remove_all_tags(&this, start, end);
27497 // Removes a #GtkClipboard added with
27498 // gtk_text_buffer_add_selection_clipboard().
27499 // <clipboard>: a #GtkClipboard added to @buffer by gtk_text_buffer_add_selection_clipboard()
27500 void remove_selection_clipboard()(Clipboard* clipboard) {
27501 gtk_text_buffer_remove_selection_clipboard(&this, clipboard);
27504 // Emits the "remove-tag" signal. The default handler for the signal
27505 // removes all occurrences of @tag from the given range. @start and
27506 // <tag>: a #GtkTextTag
27507 // <start>: one bound of range to be untagged
27508 // <end>: other bound of range to be untagged
27509 void remove_tag()(TextTag* tag, TextIter* start, TextIter* end) {
27510 gtk_text_buffer_remove_tag(&this, tag, start, end);
27513 // Calls gtk_text_tag_table_lookup() on the buffer's tag table to
27514 // get a #GtkTextTag, then calls gtk_text_buffer_remove_tag().
27515 // <name>: name of a #GtkTextTag
27516 // <start>: one bound of range to be untagged
27517 // <end>: other bound of range to be untagged
27518 void remove_tag_by_name()(char* name, TextIter* start, TextIter* end) {
27519 gtk_text_buffer_remove_tag_by_name(&this, name, start, end);
27522 // VERSION: 2.4
27523 // This function moves the "insert" and "selection_bound" marks
27524 // simultaneously. If you move them in two steps
27525 // with gtk_text_buffer_move_mark(), you will temporarily select a
27526 // region in between their old and new locations, which can be pretty
27527 // inefficient since the temporarily-selected region will force stuff
27528 // to be recalculated. This function moves them as a unit, which can
27529 // be optimized.
27530 // <ins>: where to put the "insert" mark
27531 // <bound>: where to put the "selection_bound" mark
27532 void select_range()(TextIter* ins, TextIter* bound) {
27533 gtk_text_buffer_select_range(&this, ins, bound);
27536 // VERSION: 2.10
27537 // This function serializes the portion of text between @start
27538 // and @end in the rich text format represented by @format.
27539 // gtk_text_buffer_register_serialize_format() or
27540 // gtk_text_buffer_register_serialize_tagset() beforehand.
27541 // data, encoded as @format
27542 // RETURNS: the serialized
27543 // <content_buffer>: the #GtkTextBuffer to serialize
27544 // <format>: the rich text format to use for serializing
27545 // <start>: start of block of text to serialize
27546 // <end>: end of block of test to serialize
27547 // <length>: return location for the length of the serialized data
27548 ubyte* /*new*/ serialize()(TextBuffer* content_buffer, Gdk2.Atom format, TextIter* start, TextIter* end, /*out*/ size_t* length) {
27549 return gtk_text_buffer_serialize(&this, content_buffer, format, start, end, length);
27552 // Used to keep track of whether the buffer has been modified since the
27553 // last time it was saved. Whenever the buffer is saved to disk, call
27554 // gtk_text_buffer_set_modified (@buffer, FALSE). When the buffer is modified,
27555 // it will automatically toggled on the modified bit again. When the modified
27556 // bit flips, the buffer emits a "modified-changed" signal.
27557 // <setting>: modification flag setting
27558 void set_modified()(int setting) {
27559 gtk_text_buffer_set_modified(&this, setting);
27562 // Deletes current contents of @buffer, and inserts @text instead. If
27563 // <text>: UTF-8 text to insert
27564 // <len>: length of @text in bytes
27565 void set_text()(char* text, int len) {
27566 gtk_text_buffer_set_text(&this, text, len);
27569 // VERSION: 2.10
27570 // This function unregisters a rich text format that was previously
27571 // registered using gtk_text_buffer_register_deserialize_format() or
27572 // gtk_text_buffer_register_deserialize_tagset().
27573 // <format>: a #GdkAtom representing a registered rich text format.
27574 void unregister_deserialize_format()(Gdk2.Atom format) {
27575 gtk_text_buffer_unregister_deserialize_format(&this, format);
27578 // VERSION: 2.10
27579 // This function unregisters a rich text format that was previously
27580 // registered using gtk_text_buffer_register_serialize_format() or
27581 // gtk_text_buffer_register_serialize_tagset()
27582 // <format>: a #GdkAtom representing a registered rich text format.
27583 void unregister_serialize_format()(Gdk2.Atom format) {
27584 gtk_text_buffer_unregister_serialize_format(&this, format);
27587 // The ::apply-tag signal is emitted to apply a tag to a
27588 // range of text in a #GtkTextBuffer.
27589 // Applying actually occurs in the default handler.
27590 // Note that if your handler runs before the default handler it must not
27591 // invalidate the @start and @end iters (or has to revalidate them).
27592 // gtk_text_buffer_apply_tag(),
27593 // gtk_text_buffer_insert_with_tags(),
27594 // gtk_text_buffer_insert_range().
27595 // <tag>: the applied tag
27596 // <start>: the start of the range the tag is applied to
27597 // <end>: the end of the range the tag is applied to
27598 extern (C) alias static void function (TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end, void* user_data=null) signal_apply_tag;
27600 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27601 return super_.signal_connect!name(cb, data, cf);
27604 ulong signal_connect(string name:"apply-tag", CB:signal_apply_tag)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27605 return signal_connect_data!()(&this, cast(char*)"apply-tag",
27606 cast(GObject2.Callback)cb, data, null, cf);
27609 // The ::begin-user-action signal is emitted at the beginning of a single
27610 // user-visible operation on a #GtkTextBuffer.
27611 // gtk_text_buffer_begin_user_action(),
27612 // gtk_text_buffer_insert_interactive(),
27613 // gtk_text_buffer_insert_range_interactive(),
27614 // gtk_text_buffer_delete_interactive(),
27615 // gtk_text_buffer_backspace(),
27616 // gtk_text_buffer_delete_selection().
27617 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_begin_user_action;
27618 ulong signal_connect(string name:"begin-user-action", CB:signal_begin_user_action)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27619 return signal_connect_data!()(&this, cast(char*)"begin-user-action",
27620 cast(GObject2.Callback)cb, data, null, cf);
27623 // The ::changed signal is emitted when the content of a #GtkTextBuffer
27624 // has changed.
27625 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_changed;
27626 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27627 return signal_connect_data!()(&this, cast(char*)"changed",
27628 cast(GObject2.Callback)cb, data, null, cf);
27631 // The ::delete-range signal is emitted to delete a range
27632 // from a #GtkTextBuffer.
27633 // Note that if your handler runs before the default handler it must not
27634 // invalidate the @start and @end iters (or has to revalidate them).
27635 // The default signal handler revalidates the @start and @end iters to
27636 // both point point to the location where text was deleted. Handlers
27637 // which run after the default handler (see g_signal_connect_after())
27638 // do not have access to the deleted text.
27639 // <start>: the start of the range to be deleted
27640 // <end>: the end of the range to be deleted
27641 extern (C) alias static void function (TextBuffer* this_, TextIter* start, TextIter* end, void* user_data=null) signal_delete_range;
27642 ulong signal_connect(string name:"delete-range", CB:signal_delete_range)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27643 return signal_connect_data!()(&this, cast(char*)"delete-range",
27644 cast(GObject2.Callback)cb, data, null, cf);
27647 // The ::end-user-action signal is emitted at the end of a single
27648 // user-visible operation on the #GtkTextBuffer.
27649 // gtk_text_buffer_end_user_action(),
27650 // gtk_text_buffer_insert_interactive(),
27651 // gtk_text_buffer_insert_range_interactive(),
27652 // gtk_text_buffer_delete_interactive(),
27653 // gtk_text_buffer_backspace(),
27654 // gtk_text_buffer_delete_selection(),
27655 // gtk_text_buffer_backspace().
27656 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_end_user_action;
27657 ulong signal_connect(string name:"end-user-action", CB:signal_end_user_action)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27658 return signal_connect_data!()(&this, cast(char*)"end-user-action",
27659 cast(GObject2.Callback)cb, data, null, cf);
27662 // The ::insert-child-anchor signal is emitted to insert a
27663 // #GtkTextChildAnchor in a #GtkTextBuffer.
27664 // Insertion actually occurs in the default handler.
27665 // Note that if your handler runs before the default handler it must
27666 // not invalidate the @location iter (or has to revalidate it).
27667 // The default signal handler revalidates it to be placed after the
27668 // inserted @anchor.
27669 // <location>: position to insert @anchor in @textbuffer
27670 // <anchor>: the #GtkTextChildAnchor to be inserted
27671 extern (C) alias static void function (TextBuffer* this_, TextIter* location, TextChildAnchor* anchor, void* user_data=null) signal_insert_child_anchor;
27672 ulong signal_connect(string name:"insert-child-anchor", CB:signal_insert_child_anchor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27673 return signal_connect_data!()(&this, cast(char*)"insert-child-anchor",
27674 cast(GObject2.Callback)cb, data, null, cf);
27677 // The ::insert-pixbuf signal is emitted to insert a #GdkPixbuf
27678 // in a #GtkTextBuffer. Insertion actually occurs in the default handler.
27679 // Note that if your handler runs before the default handler it must not
27680 // invalidate the @location iter (or has to revalidate it).
27681 // The default signal handler revalidates it to be placed after the
27682 // inserted @pixbuf.
27683 // <location>: position to insert @pixbuf in @textbuffer
27684 // <pixbuf>: the #GdkPixbuf to be inserted
27685 extern (C) alias static void function (TextBuffer* this_, TextIter* location, GdkPixbuf2.Pixbuf* pixbuf, void* user_data=null) signal_insert_pixbuf;
27686 ulong signal_connect(string name:"insert-pixbuf", CB:signal_insert_pixbuf)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27687 return signal_connect_data!()(&this, cast(char*)"insert-pixbuf",
27688 cast(GObject2.Callback)cb, data, null, cf);
27691 // The ::insert-text signal is emitted to insert text in a #GtkTextBuffer.
27692 // Insertion actually occurs in the default handler.
27693 // Note that if your handler runs before the default handler it must not
27694 // invalidate the @location iter (or has to revalidate it).
27695 // The default signal handler revalidates it to point to the end of the
27696 // inserted text.
27697 // gtk_text_buffer_insert(),
27698 // gtk_text_buffer_insert_range().
27699 // <location>: position to insert @text in @textbuffer
27700 // <text>: the UTF-8 text to be inserted
27701 // <len>: length of the inserted text in bytes
27702 extern (C) alias static void function (TextBuffer* this_, TextIter* location, char* text, int len, void* user_data=null) signal_insert_text;
27703 ulong signal_connect(string name:"insert-text", CB:signal_insert_text)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27704 return signal_connect_data!()(&this, cast(char*)"insert-text",
27705 cast(GObject2.Callback)cb, data, null, cf);
27708 // The ::mark-deleted signal is emitted as notification
27709 // after a #GtkTextMark is deleted.
27710 // See also:
27711 // gtk_text_buffer_delete_mark().
27712 // <mark>: The mark that was deleted
27713 extern (C) alias static void function (TextBuffer* this_, TextMark* mark, void* user_data=null) signal_mark_deleted;
27714 ulong signal_connect(string name:"mark-deleted", CB:signal_mark_deleted)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27715 return signal_connect_data!()(&this, cast(char*)"mark-deleted",
27716 cast(GObject2.Callback)cb, data, null, cf);
27719 // The ::mark-set signal is emitted as notification
27720 // after a #GtkTextMark is set.
27721 // gtk_text_buffer_create_mark(),
27722 // gtk_text_buffer_move_mark().
27723 // <location>: The location of @mark in @textbuffer
27724 // <mark>: The mark that is set
27725 extern (C) alias static void function (TextBuffer* this_, TextIter* location, TextMark* mark, void* user_data=null) signal_mark_set;
27726 ulong signal_connect(string name:"mark-set", CB:signal_mark_set)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27727 return signal_connect_data!()(&this, cast(char*)"mark-set",
27728 cast(GObject2.Callback)cb, data, null, cf);
27731 // The ::modified-changed signal is emitted when the modified bit of a
27732 // #GtkTextBuffer flips.
27733 // See also:
27734 // gtk_text_buffer_set_modified().
27735 extern (C) alias static void function (TextBuffer* this_, void* user_data=null) signal_modified_changed;
27736 ulong signal_connect(string name:"modified-changed", CB:signal_modified_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27737 return signal_connect_data!()(&this, cast(char*)"modified-changed",
27738 cast(GObject2.Callback)cb, data, null, cf);
27741 // VERSION: 2.16
27742 // The paste-done signal is emitted after paste operation has been completed.
27743 // This is useful to properly scroll the view to the end of the pasted text.
27744 // See gtk_text_buffer_paste_clipboard() for more details.
27745 extern (C) alias static void function (TextBuffer* this_, Clipboard* since, void* user_data=null) signal_paste_done;
27746 ulong signal_connect(string name:"paste-done", CB:signal_paste_done)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27747 return signal_connect_data!()(&this, cast(char*)"paste-done",
27748 cast(GObject2.Callback)cb, data, null, cf);
27751 // The ::remove-tag signal is emitted to remove all occurrences of @tag from
27752 // a range of text in a #GtkTextBuffer.
27753 // Removal actually occurs in the default handler.
27754 // Note that if your handler runs before the default handler it must not
27755 // invalidate the @start and @end iters (or has to revalidate them).
27756 // gtk_text_buffer_remove_tag().
27757 // <tag>: the tag to be removed
27758 // <start>: the start of the range the tag is removed from
27759 // <end>: the end of the range the tag is removed from
27760 extern (C) alias static void function (TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end, void* user_data=null) signal_remove_tag;
27761 ulong signal_connect(string name:"remove-tag", CB:signal_remove_tag)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
27762 return signal_connect_data!()(&this, cast(char*)"remove-tag",
27763 cast(GObject2.Callback)cb, data, null, cf);
27767 struct TextBufferClass {
27768 GObject2.ObjectClass parent_class;
27769 extern (C) void function (TextBuffer* buffer, TextIter* pos, char* text, int length) insert_text;
27770 // <pixbuf>: a #GdkPixbuf
27771 extern (C) void function (TextBuffer* buffer, TextIter* pos, GdkPixbuf2.Pixbuf* pixbuf) insert_pixbuf;
27772 // <anchor>: a #GtkTextChildAnchor
27773 extern (C) void function (TextBuffer* buffer, TextIter* pos, TextChildAnchor* anchor) insert_child_anchor;
27774 extern (C) void function (TextBuffer* buffer, TextIter* start, TextIter* end) delete_range;
27775 extern (C) void function (TextBuffer* buffer) changed;
27776 extern (C) void function (TextBuffer* buffer) modified_changed;
27777 extern (C) void function (TextBuffer* buffer, TextIter* location, TextMark* mark) mark_set;
27778 extern (C) void function (TextBuffer* buffer, TextMark* mark) mark_deleted;
27779 // <tag>: a #GtkTextTag
27780 extern (C) void function (TextBuffer* buffer, TextTag* tag, TextIter* start_char, TextIter* end_char) apply_tag;
27781 // <tag>: a #GtkTextTag
27782 extern (C) void function (TextBuffer* buffer, TextTag* tag, TextIter* start_char, TextIter* end_char) remove_tag;
27783 extern (C) void function (TextBuffer* buffer) begin_user_action;
27784 extern (C) void function (TextBuffer* buffer) end_user_action;
27785 extern (C) void function (TextBuffer* buffer, Clipboard* clipboard) paste_done;
27786 extern (C) void function () _gtk_reserved1;
27787 extern (C) void function () _gtk_reserved2;
27788 extern (C) void function () _gtk_reserved3;
27789 extern (C) void function () _gtk_reserved4;
27790 extern (C) void function () _gtk_reserved5;
27793 extern (C) alias int function (TextBuffer* register_buffer, TextBuffer* content_buffer, TextIter* iter, ubyte* data, size_t length, int create_tags, void* user_data, GLib2.Error** error=null) TextBufferDeserializeFunc;
27795 extern (C) alias ubyte* function (TextBuffer* register_buffer, TextBuffer* content_buffer, TextIter* start, TextIter* end, size_t* length, void* user_data) TextBufferSerializeFunc;
27797 enum TextBufferTargetInfo {
27798 BUFFER_CONTENTS = -1,
27799 RICH_TEXT = -2,
27800 TEXT = -3
27802 extern (C) alias int function (dchar ch, void* user_data) TextCharPredicate;
27804 struct TextChildAnchor /* : GObject.Object */ {
27805 alias parent_instance this;
27806 alias parent_instance super_;
27807 alias parent_instance object;
27808 GObject2.Object parent_instance;
27809 void* segment;
27812 // Creates a new #GtkTextChildAnchor. Usually you would then insert
27813 // it into a #GtkTextBuffer with gtk_text_buffer_insert_child_anchor().
27814 // To perform the creation and insertion in one step, use the
27815 // convenience function gtk_text_buffer_create_child_anchor().
27816 // RETURNS: a new #GtkTextChildAnchor
27817 static TextChildAnchor* /*new*/ new_()() {
27818 return gtk_text_child_anchor_new();
27821 // Determines whether a child anchor has been deleted from
27822 // the buffer. Keep in mind that the child anchor will be
27823 // unreferenced when removed from the buffer, so you need to
27824 // hold your own reference (with g_object_ref()) if you plan
27825 // to use this function &mdash; otherwise all deleted child anchors
27826 // will also be finalized.
27827 // RETURNS: %TRUE if the child anchor has been deleted from its buffer
27828 int get_deleted()() {
27829 return gtk_text_child_anchor_get_deleted(&this);
27832 // Gets a list of all widgets anchored at this child anchor.
27833 // The returned list should be freed with g_list_free().
27834 // RETURNS: list of widgets anchored at @anchor
27835 GLib2.List* /*new container*/ get_widgets()() {
27836 return gtk_text_child_anchor_get_widgets(&this);
27838 void queue_resize()(TextLayout* layout) {
27839 gtk_text_child_anchor_queue_resize(&this, layout);
27841 void register_child()(Widget* child, TextLayout* layout) {
27842 gtk_text_child_anchor_register_child(&this, child, layout);
27844 void unregister_child()(Widget* child) {
27845 gtk_text_child_anchor_unregister_child(&this, child);
27849 struct TextChildAnchorClass {
27850 GObject2.ObjectClass parent_class;
27851 extern (C) void function () _gtk_reserved1;
27852 extern (C) void function () _gtk_reserved2;
27853 extern (C) void function () _gtk_reserved3;
27854 extern (C) void function () _gtk_reserved4;
27857 struct TextCursorDisplay {
27858 int x, y, height;
27859 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
27860 uint, "is_strong", 1,
27861 uint, "is_weak", 1,
27862 uint, "__dummy32A", 30));
27865 enum TextDirection {
27866 NONE = 0,
27867 LTR = 1,
27868 RTL = 2
27870 extern (C) alias void function (OldEditable* editable, uint time_) TextFunction;
27872 struct TextIter {
27873 private void* dummy1, dummy2;
27874 private int dummy3, dummy4, dummy5, dummy6, dummy7, dummy8;
27875 private void* dummy9, dummy10;
27876 private int dummy11, dummy12, dummy13;
27877 private void* dummy14;
27880 // Moves backward by one character offset. Returns %TRUE if movement
27881 // was possible; if @iter was the first in the buffer (character
27882 // offset 0), gtk_text_iter_backward_char () returns %FALSE for convenience when
27883 // writing loops.
27884 // RETURNS: whether movement was possible
27885 int backward_char()() {
27886 return gtk_text_iter_backward_char(&this);
27889 // Moves @count characters backward, if possible (if @count would move
27890 // past the start or end of the buffer, moves to the start or end of
27891 // the buffer). The return value indicates whether the iterator moved
27892 // onto a dereferenceable position; if the iterator didn't move, or
27893 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
27894 // the function does nothing and returns %FALSE.
27895 // RETURNS: whether @iter moved and is dereferenceable
27896 // <count>: number of characters to move
27897 int backward_chars()(int count) {
27898 return gtk_text_iter_backward_chars(&this, count);
27901 // Like gtk_text_iter_forward_cursor_position(), but moves backward.
27902 // RETURNS: %TRUE if we moved
27903 int backward_cursor_position()() {
27904 return gtk_text_iter_backward_cursor_position(&this);
27907 // Moves up to @count cursor positions. See
27908 // gtk_text_iter_forward_cursor_position() for details.
27909 // RETURNS: %TRUE if we moved and the new position is dereferenceable
27910 // <count>: number of positions to move
27911 int backward_cursor_positions()(int count) {
27912 return gtk_text_iter_backward_cursor_positions(&this, count);
27915 // Same as gtk_text_iter_forward_find_char(), but goes backward from @iter.
27916 // RETURNS: whether a match was found
27917 // <pred>: function to be called on each character
27918 // <user_data>: user data for @pred
27919 // <limit>: search limit, or %NULL for none
27920 int backward_find_char()(TextCharPredicate pred, void* user_data, TextIter* limit=null) {
27921 return gtk_text_iter_backward_find_char(&this, pred, user_data, limit);
27924 // Moves @iter to the start of the previous line. Returns %TRUE if
27925 // function returns %FALSE. Therefore if @iter was already on line 0,
27926 // but not at the start of the line, @iter is snapped to the start of
27927 // the line and the function returns %TRUE. (Note that this implies that
27928 // in a loop calling this function, the line number may not change on
27929 // every iteration, if your first iteration is on line 0.)
27930 // RETURNS: whether @iter moved
27931 int backward_line()() {
27932 return gtk_text_iter_backward_line(&this);
27935 // Moves @count lines backward, if possible (if @count would move
27936 // past the start or end of the buffer, moves to the start or end of
27937 // the buffer). The return value indicates whether the iterator moved
27938 // onto a dereferenceable position; if the iterator didn't move, or
27939 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
27940 // the function does nothing and returns %FALSE. If @count is negative,
27941 // moves forward by 0 - @count lines.
27942 // RETURNS: whether @iter moved and is dereferenceable
27943 // <count>: number of lines to move backward
27944 int backward_lines()(int count) {
27945 return gtk_text_iter_backward_lines(&this, count);
27948 // Same as gtk_text_iter_forward_search(), but moves backward.
27949 // RETURNS: whether a match was found
27950 // <str>: search string
27951 // <flags>: bitmask of flags affecting the search
27952 // <match_start>: return location for start of match, or %NULL
27953 // <match_end>: return location for end of match, or %NULL
27954 // <limit>: location of last possible @match_start, or %NULL for start of buffer
27955 int backward_search()(char* str, TextSearchFlags flags, /*out*/ TextIter* match_start=null, /*out*/ TextIter* match_end=null, TextIter* limit=null) {
27956 return gtk_text_iter_backward_search(&this, str, flags, match_start, match_end, limit);
27959 // Moves backward to the previous sentence start; if @iter is already at
27960 // the start of a sentence, moves backward to the next one. Sentence
27961 // boundaries are determined by Pango and should be correct for nearly
27962 // any language (if not, the correct fix would be to the Pango text
27963 // boundary algorithms).
27964 // RETURNS: %TRUE if @iter moved and is not the end iterator
27965 int backward_sentence_start()() {
27966 return gtk_text_iter_backward_sentence_start(&this);
27969 // Calls gtk_text_iter_backward_sentence_start() up to @count times,
27970 // or until it returns %FALSE. If @count is negative, moves forward
27971 // instead of backward.
27972 // RETURNS: %TRUE if @iter moved and is not the end iterator
27973 // <count>: number of sentences to move
27974 int backward_sentence_starts()(int count) {
27975 return gtk_text_iter_backward_sentence_starts(&this, count);
27978 // Moves backward to the next toggle (on or off) of the
27979 // #GtkTextTag @tag, or to the next toggle of any tag if
27980 // returns %FALSE, otherwise %TRUE. Does not return toggles
27981 // located at @iter, only toggles before @iter. Sets @iter
27982 // to the location of the toggle, or the start of the buffer
27983 // if no toggle is found.
27984 // RETURNS: whether we found a tag toggle before @iter
27985 // <tag>: a #GtkTextTag, or %NULL
27986 int backward_to_tag_toggle()(TextTag* tag=null) {
27987 return gtk_text_iter_backward_to_tag_toggle(&this, tag);
27990 // VERSION: 2.4
27991 // Moves @iter forward to the previous visible cursor position. See
27992 // gtk_text_iter_backward_cursor_position() for details.
27993 // RETURNS: %TRUE if we moved and the new position is dereferenceable
27994 int backward_visible_cursor_position()() {
27995 return gtk_text_iter_backward_visible_cursor_position(&this);
27998 // VERSION: 2.4
27999 // Moves up to @count visible cursor positions. See
28000 // gtk_text_iter_backward_cursor_position() for details.
28001 // RETURNS: %TRUE if we moved and the new position is dereferenceable
28002 // <count>: number of positions to move
28003 int backward_visible_cursor_positions()(int count) {
28004 return gtk_text_iter_backward_visible_cursor_positions(&this, count);
28007 // VERSION: 2.8
28008 // Moves @iter to the start of the previous visible line. Returns %TRUE if
28009 // function returns %FALSE. Therefore if @iter was already on line 0,
28010 // but not at the start of the line, @iter is snapped to the start of
28011 // the line and the function returns %TRUE. (Note that this implies that
28012 // in a loop calling this function, the line number may not change on
28013 // every iteration, if your first iteration is on line 0.)
28014 // RETURNS: whether @iter moved
28015 int backward_visible_line()() {
28016 return gtk_text_iter_backward_visible_line(&this);
28019 // VERSION: 2.8
28020 // Moves @count visible lines backward, if possible (if @count would move
28021 // past the start or end of the buffer, moves to the start or end of
28022 // the buffer). The return value indicates whether the iterator moved
28023 // onto a dereferenceable position; if the iterator didn't move, or
28024 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
28025 // the function does nothing and returns %FALSE. If @count is negative,
28026 // moves forward by 0 - @count lines.
28027 // RETURNS: whether @iter moved and is dereferenceable
28028 // <count>: number of lines to move backward
28029 int backward_visible_lines()(int count) {
28030 return gtk_text_iter_backward_visible_lines(&this, count);
28033 // VERSION: 2.4
28034 // Moves backward to the previous visible word start. (If @iter is currently
28035 // on a word start, moves backward to the next one after that.) Word breaks
28036 // are determined by Pango and should be correct for nearly any
28037 // language (if not, the correct fix would be to the Pango word break
28038 // algorithms).
28039 // RETURNS: %TRUE if @iter moved and is not the end iterator
28040 int backward_visible_word_start()() {
28041 return gtk_text_iter_backward_visible_word_start(&this);
28044 // VERSION: 2.4
28045 // Calls gtk_text_iter_backward_visible_word_start() up to @count times.
28046 // RETURNS: %TRUE if @iter moved and is not the end iterator
28047 // <count>: number of times to move
28048 int backward_visible_word_starts()(int count) {
28049 return gtk_text_iter_backward_visible_word_starts(&this, count);
28052 // Moves backward to the previous word start. (If @iter is currently on a
28053 // word start, moves backward to the next one after that.) Word breaks
28054 // are determined by Pango and should be correct for nearly any
28055 // language (if not, the correct fix would be to the Pango word break
28056 // algorithms).
28057 // RETURNS: %TRUE if @iter moved and is not the end iterator
28058 int backward_word_start()() {
28059 return gtk_text_iter_backward_word_start(&this);
28062 // Calls gtk_text_iter_backward_word_start() up to @count times.
28063 // RETURNS: %TRUE if @iter moved and is not the end iterator
28064 // <count>: number of times to move
28065 int backward_word_starts()(int count) {
28066 return gtk_text_iter_backward_word_starts(&this, count);
28069 // Returns %TRUE if @tag is toggled on at exactly this point. If @tag
28070 // is %NULL, returns %TRUE if any tag is toggled on at this point. Note
28071 // that the gtk_text_iter_begins_tag () returns %TRUE if @iter is the
28072 // <emphasis>start</emphasis> of the tagged range;
28073 // gtk_text_iter_has_tag () tells you whether an iterator is
28074 // <emphasis>within</emphasis> a tagged range.
28075 // RETURNS: whether @iter is the start of a range tagged with @tag
28076 // <tag>: a #GtkTextTag, or %NULL
28077 int begins_tag()(TextTag* tag=null) {
28078 return gtk_text_iter_begins_tag(&this, tag);
28081 // Considering the default editability of the buffer, and tags that
28082 // affect editability, determines whether text inserted at @iter would
28083 // be editable. If text inserted at @iter would be editable then the
28084 // user should be allowed to insert text at @iter.
28085 // gtk_text_buffer_insert_interactive() uses this function to decide
28086 // whether insertions are allowed at a given position.
28087 // RETURNS: whether text inserted at @iter would be editable
28088 // <default_editability>: %TRUE if text is editable by default
28089 int can_insert()(int default_editability) {
28090 return gtk_text_iter_can_insert(&this, default_editability);
28093 // A qsort()-style function that returns negative if @lhs is less than
28094 // Ordering is in character offset order, i.e. the first character in the buffer
28095 // is less than the second character in the buffer.
28096 // RETURNS: -1 if @lhs is less than @rhs, 1 if @lhs is greater, 0 if they are equal
28097 // <rhs>: another #GtkTextIter
28098 int compare()(TextIter* rhs) {
28099 return gtk_text_iter_compare(&this, rhs);
28102 // Creates a dynamically-allocated copy of an iterator. This function
28103 // is not useful in applications, because iterators can be copied with a
28104 // simple assignment (<literal>GtkTextIter i = j;</literal>). The
28105 // function is used by language bindings.
28106 // RETURNS: a copy of the @iter, free with gtk_text_iter_free ()
28107 TextIter* /*new*/ copy()() {
28108 return gtk_text_iter_copy(&this);
28111 // Returns whether the character at @iter is within an editable region
28112 // of text. Non-editable text is "locked" and can't be changed by the
28113 // user via #GtkTextView. This function is simply a convenience
28114 // wrapper around gtk_text_iter_get_attributes (). If no tags applied
28115 // to this text affect editability, @default_setting will be returned.
28116 // You don't want to use this function to decide whether text can be
28117 // inserted at @iter, because for insertion you don't want to know
28118 // whether the char at @iter is inside an editable range, you want to
28119 // know whether a new character inserted at @iter would be inside an
28120 // editable range. Use gtk_text_iter_can_insert() to handle this
28121 // case.
28122 // RETURNS: whether @iter is inside an editable range
28123 // <default_setting>: %TRUE if text is editable by default
28124 int editable()(int default_setting) {
28125 return gtk_text_iter_editable(&this, default_setting);
28128 // Returns %TRUE if @iter points to the start of the paragraph
28129 // delimiter characters for a line (delimiters will be either a
28130 // newline, a carriage return, a carriage return followed by a
28131 // newline, or a Unicode paragraph separator character). Note that an
28132 // iterator pointing to the \n of a \r\n pair will not be counted as
28133 // the end of a line, the line ends before the \r. The end iterator is
28134 // considered to be at the end of a line, even though there are no
28135 // paragraph delimiter chars there.
28136 // RETURNS: whether @iter is at the end of a line
28137 int ends_line()() {
28138 return gtk_text_iter_ends_line(&this);
28141 // Determines whether @iter ends a sentence. Sentence boundaries are
28142 // determined by Pango and should be correct for nearly any language
28143 // (if not, the correct fix would be to the Pango text boundary
28144 // algorithms).
28145 // RETURNS: %TRUE if @iter is at the end of a sentence.
28146 int ends_sentence()() {
28147 return gtk_text_iter_ends_sentence(&this);
28150 // Returns %TRUE if @tag is toggled off at exactly this point. If @tag
28151 // is %NULL, returns %TRUE if any tag is toggled off at this point. Note
28152 // that the gtk_text_iter_ends_tag () returns %TRUE if @iter is the
28153 // <emphasis>end</emphasis> of the tagged range;
28154 // gtk_text_iter_has_tag () tells you whether an iterator is
28155 // <emphasis>within</emphasis> a tagged range.
28156 // RETURNS: whether @iter is the end of a range tagged with @tag
28157 // <tag>: a #GtkTextTag, or %NULL
28158 int ends_tag()(TextTag* tag=null) {
28159 return gtk_text_iter_ends_tag(&this, tag);
28162 // Determines whether @iter ends a natural-language word. Word breaks
28163 // are determined by Pango and should be correct for nearly any
28164 // language (if not, the correct fix would be to the Pango word break
28165 // algorithms).
28166 // RETURNS: %TRUE if @iter is at the end of a word
28167 int ends_word()() {
28168 return gtk_text_iter_ends_word(&this);
28171 // Tests whether two iterators are equal, using the fastest possible
28172 // mechanism. This function is very fast; you can expect it to perform
28173 // better than e.g. getting the character offset for each iterator and
28174 // comparing the offsets yourself. Also, it's a bit faster than
28175 // gtk_text_iter_compare().
28176 // RETURNS: %TRUE if the iterators point to the same place in the buffer
28177 // <rhs>: another #GtkTextIter
28178 int equal()(TextIter* rhs) {
28179 return gtk_text_iter_equal(&this, rhs);
28182 // Moves @iter forward by one character offset. Note that images
28183 // embedded in the buffer occupy 1 character slot, so
28184 // gtk_text_iter_forward_char () may actually move onto an image instead
28185 // of a character, if you have images in your buffer. If @iter is the
28186 // end iterator or one character before it, @iter will now point at
28187 // the end iterator, and gtk_text_iter_forward_char () returns %FALSE for
28188 // convenience when writing loops.
28189 // RETURNS: whether @iter moved and is dereferenceable
28190 int forward_char()() {
28191 return gtk_text_iter_forward_char(&this);
28194 // Moves @count characters if possible (if @count would move past the
28195 // start or end of the buffer, moves to the start or end of the
28196 // buffer). The return value indicates whether the new position of
28197 // (the last iterator in the buffer is not dereferenceable). If @count
28198 // is 0, the function does nothing and returns %FALSE.
28199 // RETURNS: whether @iter moved and is dereferenceable
28200 // <count>: number of characters to move, may be negative
28201 int forward_chars()(int count) {
28202 return gtk_text_iter_forward_chars(&this, count);
28205 // Moves @iter forward by a single cursor position. Cursor positions
28206 // are (unsurprisingly) positions where the cursor can appear. Perhaps
28207 // surprisingly, there may not be a cursor position between all
28208 // characters. The most common example for European languages would be
28209 // a carriage return/newline sequence. For some Unicode characters,
28210 // the equivalent of say the letter "a" with an accent mark will be
28211 // represented as two characters, first the letter then a "combining
28212 // mark" that causes the accent to be rendered; so the cursor can't go
28213 // between those two characters. See also the #PangoLogAttr structure and
28214 // pango_break() function.
28215 // RETURNS: %TRUE if we moved and the new position is dereferenceable
28216 int forward_cursor_position()() {
28217 return gtk_text_iter_forward_cursor_position(&this);
28220 // Moves up to @count cursor positions. See
28221 // gtk_text_iter_forward_cursor_position() for details.
28222 // RETURNS: %TRUE if we moved and the new position is dereferenceable
28223 // <count>: number of positions to move
28224 int forward_cursor_positions()(int count) {
28225 return gtk_text_iter_forward_cursor_positions(&this, count);
28228 // Advances @iter, calling @pred on each character. If
28229 // If @pred never returns %TRUE, @iter is set to @limit if
28230 // RETURNS: whether a match was found
28231 // <pred>: a function to be called on each character
28232 // <user_data>: user data for @pred
28233 // <limit>: search limit, or %NULL for none
28234 int forward_find_char()(TextCharPredicate pred, void* user_data, TextIter* limit=null) {
28235 return gtk_text_iter_forward_find_char(&this, pred, user_data, limit);
28238 // Moves @iter to the start of the next line. If the iter is already on the
28239 // last line of the buffer, moves the iter to the end of the current line.
28240 // If after the operation, the iter is at the end of the buffer and not
28241 // dereferencable, returns %FALSE. Otherwise, returns %TRUE.
28242 // RETURNS: whether @iter can be dereferenced
28243 int forward_line()() {
28244 return gtk_text_iter_forward_line(&this);
28247 // Moves @count lines forward, if possible (if @count would move
28248 // past the start or end of the buffer, moves to the start or end of
28249 // the buffer). The return value indicates whether the iterator moved
28250 // onto a dereferenceable position; if the iterator didn't move, or
28251 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
28252 // the function does nothing and returns %FALSE. If @count is negative,
28253 // moves backward by 0 - @count lines.
28254 // RETURNS: whether @iter moved and is dereferenceable
28255 // <count>: number of lines to move forward
28256 int forward_lines()(int count) {
28257 return gtk_text_iter_forward_lines(&this, count);
28260 // Searches forward for @str. Any match is returned by setting
28261 // first character after the match. The search will not continue past
28262 // may wish to use @limit to avoid locking up your UI on large
28263 // buffers.
28264 // If the #GTK_TEXT_SEARCH_VISIBLE_ONLY flag is present, the match may
28265 // have invisible text interspersed in @str. i.e. @str will be a
28266 // possibly-noncontiguous subsequence of the matched range. similarly,
28267 // if you specify #GTK_TEXT_SEARCH_TEXT_ONLY, the match may have
28268 // pixbufs or child widgets mixed inside the matched range. If these
28269 // flags are not given, the match must be exact; the special 0xFFFC
28270 // character in @str will match embedded pixbufs or child widgets.
28271 // RETURNS: whether a match was found
28272 // <str>: a search string
28273 // <flags>: flags affecting how the search is done
28274 // <match_start>: return location for start of match, or %NULL
28275 // <match_end>: return location for end of match, or %NULL
28276 // <limit>: bound for the search, or %NULL for the end of the buffer
28277 int forward_search()(char* str, TextSearchFlags flags, /*out*/ TextIter* match_start=null, /*out*/ TextIter* match_end=null, TextIter* limit=null) {
28278 return gtk_text_iter_forward_search(&this, str, flags, match_start, match_end, limit);
28281 // Moves forward to the next sentence end. (If @iter is at the end of
28282 // a sentence, moves to the next end of sentence.) Sentence
28283 // boundaries are determined by Pango and should be correct for nearly
28284 // any language (if not, the correct fix would be to the Pango text
28285 // boundary algorithms).
28286 // RETURNS: %TRUE if @iter moved and is not the end iterator
28287 int forward_sentence_end()() {
28288 return gtk_text_iter_forward_sentence_end(&this);
28291 // Calls gtk_text_iter_forward_sentence_end() @count times (or until
28292 // gtk_text_iter_forward_sentence_end() returns %FALSE). If @count is
28293 // negative, moves backward instead of forward.
28294 // RETURNS: %TRUE if @iter moved and is not the end iterator
28295 // <count>: number of sentences to move
28296 int forward_sentence_ends()(int count) {
28297 return gtk_text_iter_forward_sentence_ends(&this, count);
28300 // Moves @iter forward to the "end iterator," which points one past the last
28301 // valid character in the buffer. gtk_text_iter_get_char() called on the
28302 // end iterator returns 0, which is convenient for writing loops.
28303 void forward_to_end()() {
28304 gtk_text_iter_forward_to_end(&this);
28307 // Moves the iterator to point to the paragraph delimiter characters,
28308 // which will be either a newline, a carriage return, a carriage
28309 // return/newline in sequence, or the Unicode paragraph separator
28310 // character. If the iterator is already at the paragraph delimiter
28311 // characters, moves to the paragraph delimiter characters for the
28312 // next line. If @iter is on the last line in the buffer, which does
28313 // not end in paragraph delimiters, moves to the end iterator (end of
28314 // the last line), and returns %FALSE.
28315 // RETURNS: %TRUE if we moved and the new location is not the end iterator
28316 int forward_to_line_end()() {
28317 return gtk_text_iter_forward_to_line_end(&this);
28320 // Moves forward to the next toggle (on or off) of the
28321 // #GtkTextTag @tag, or to the next toggle of any tag if
28322 // returns %FALSE, otherwise %TRUE. Does not return toggles
28323 // located at @iter, only toggles after @iter. Sets @iter to
28324 // the location of the toggle, or to the end of the buffer
28325 // if no toggle is found.
28326 // RETURNS: whether we found a tag toggle after @iter
28327 // <tag>: a #GtkTextTag, or %NULL
28328 int forward_to_tag_toggle()(TextTag* tag=null) {
28329 return gtk_text_iter_forward_to_tag_toggle(&this, tag);
28332 // VERSION: 2.4
28333 // Moves @iter forward to the next visible cursor position. See
28334 // gtk_text_iter_forward_cursor_position() for details.
28335 // RETURNS: %TRUE if we moved and the new position is dereferenceable
28336 int forward_visible_cursor_position()() {
28337 return gtk_text_iter_forward_visible_cursor_position(&this);
28340 // VERSION: 2.4
28341 // Moves up to @count visible cursor positions. See
28342 // gtk_text_iter_forward_cursor_position() for details.
28343 // RETURNS: %TRUE if we moved and the new position is dereferenceable
28344 // <count>: number of positions to move
28345 int forward_visible_cursor_positions()(int count) {
28346 return gtk_text_iter_forward_visible_cursor_positions(&this, count);
28349 // VERSION: 2.8
28350 // Moves @iter to the start of the next visible line. Returns %TRUE if there
28351 // was a next line to move to, and %FALSE if @iter was simply moved to
28352 // the end of the buffer and is now not dereferenceable, or if @iter was
28353 // already at the end of the buffer.
28354 // RETURNS: whether @iter can be dereferenced
28355 int forward_visible_line()() {
28356 return gtk_text_iter_forward_visible_line(&this);
28359 // VERSION: 2.8
28360 // Moves @count visible lines forward, if possible (if @count would move
28361 // past the start or end of the buffer, moves to the start or end of
28362 // the buffer). The return value indicates whether the iterator moved
28363 // onto a dereferenceable position; if the iterator didn't move, or
28364 // moved onto the end iterator, then %FALSE is returned. If @count is 0,
28365 // the function does nothing and returns %FALSE. If @count is negative,
28366 // moves backward by 0 - @count lines.
28367 // RETURNS: whether @iter moved and is dereferenceable
28368 // <count>: number of lines to move forward
28369 int forward_visible_lines()(int count) {
28370 return gtk_text_iter_forward_visible_lines(&this, count);
28373 // VERSION: 2.4
28374 // Moves forward to the next visible word end. (If @iter is currently on a
28375 // word end, moves forward to the next one after that.) Word breaks
28376 // are determined by Pango and should be correct for nearly any
28377 // language (if not, the correct fix would be to the Pango word break
28378 // algorithms).
28379 // RETURNS: %TRUE if @iter moved and is not the end iterator
28380 int forward_visible_word_end()() {
28381 return gtk_text_iter_forward_visible_word_end(&this);
28384 // VERSION: 2.4
28385 // Calls gtk_text_iter_forward_visible_word_end() up to @count times.
28386 // RETURNS: %TRUE if @iter moved and is not the end iterator
28387 // <count>: number of times to move
28388 int forward_visible_word_ends()(int count) {
28389 return gtk_text_iter_forward_visible_word_ends(&this, count);
28392 // Moves forward to the next word end. (If @iter is currently on a
28393 // word end, moves forward to the next one after that.) Word breaks
28394 // are determined by Pango and should be correct for nearly any
28395 // language (if not, the correct fix would be to the Pango word break
28396 // algorithms).
28397 // RETURNS: %TRUE if @iter moved and is not the end iterator
28398 int forward_word_end()() {
28399 return gtk_text_iter_forward_word_end(&this);
28402 // Calls gtk_text_iter_forward_word_end() up to @count times.
28403 // RETURNS: %TRUE if @iter moved and is not the end iterator
28404 // <count>: number of times to move
28405 int forward_word_ends()(int count) {
28406 return gtk_text_iter_forward_word_ends(&this, count);
28409 // Free an iterator allocated on the heap. This function
28410 // is intended for use in language bindings, and is not
28411 // especially useful for applications, because iterators can
28412 // simply be allocated on the stack.
28413 void free()() {
28414 gtk_text_iter_free(&this);
28417 // Computes the effect of any tags applied to this spot in the
28418 // text. The @values parameter should be initialized to the default
28419 // settings you wish to use if no tags are in effect. You'd typically
28420 // obtain the defaults from gtk_text_view_get_default_attributes().
28421 // gtk_text_iter_get_attributes () will modify @values, applying the
28422 // effects of any tags present at @iter. If any tags affected @values,
28423 // the function returns %TRUE.
28424 // RETURNS: %TRUE if @values was modified
28425 // <values>: a #GtkTextAttributes to be filled in
28426 int get_attributes()(/*out*/ TextAttributes* values) {
28427 return gtk_text_iter_get_attributes(&this, values);
28430 // Returns the #GtkTextBuffer this iterator is associated with.
28431 // RETURNS: the buffer
28432 TextBuffer* get_buffer()() {
28433 return gtk_text_iter_get_buffer(&this);
28436 // Returns the number of bytes in the line containing @iter,
28437 // including the paragraph delimiters.
28438 // RETURNS: number of bytes in the line
28439 int get_bytes_in_line()() {
28440 return gtk_text_iter_get_bytes_in_line(&this);
28443 // Returns the Unicode character at this iterator. (Equivalent to
28444 // operator* on a C++ iterator.) If the element at this iterator is a
28445 // non-character element, such as an image embedded in the buffer, the
28446 // Unicode "unknown" character 0xFFFC is returned. If invoked on
28447 // the end iterator, zero is returned; zero is not a valid Unicode character.
28448 // So you can write a loop which ends when gtk_text_iter_get_char ()
28449 // returns 0.
28450 // RETURNS: a Unicode character, or 0 if @iter is not dereferenceable
28451 dchar get_char()() {
28452 return gtk_text_iter_get_char(&this);
28455 // Returns the number of characters in the line containing @iter,
28456 // including the paragraph delimiters.
28457 // RETURNS: number of characters in the line
28458 int get_chars_in_line()() {
28459 return gtk_text_iter_get_chars_in_line(&this);
28462 // If the location at @iter contains a child anchor, the
28463 // anchor is returned (with no new reference count added). Otherwise,
28464 // %NULL is returned.
28465 // RETURNS: the anchor at @iter
28466 TextChildAnchor* get_child_anchor()() {
28467 return gtk_text_iter_get_child_anchor(&this);
28470 // A convenience wrapper around gtk_text_iter_get_attributes (),
28471 // which returns the language in effect at @iter. If no tags affecting
28472 // language apply to @iter, the return value is identical to that of
28473 // gtk_get_default_language ().
28474 // RETURNS: language in effect at @iter
28475 Pango.Language* /*new*/ get_language()() {
28476 return gtk_text_iter_get_language(&this);
28479 // Returns the line number containing the iterator. Lines in
28480 // a #GtkTextBuffer are numbered beginning with 0 for the first
28481 // line in the buffer.
28482 // RETURNS: a line number
28483 int get_line()() {
28484 return gtk_text_iter_get_line(&this);
28487 // Returns the byte index of the iterator, counting
28488 // from the start of a newline-terminated line.
28489 // Remember that #GtkTextBuffer encodes text in
28490 // UTF-8, and that characters can require a variable
28491 // number of bytes to represent.
28492 // RETURNS: distance from start of line, in bytes
28493 int get_line_index()() {
28494 return gtk_text_iter_get_line_index(&this);
28497 // Returns the character offset of the iterator,
28498 // counting from the start of a newline-terminated line.
28499 // The first character on the line has offset 0.
28500 // RETURNS: offset from start of line
28501 int get_line_offset()() {
28502 return gtk_text_iter_get_line_offset(&this);
28505 // Returns a list of all #GtkTextMark at this location. Because marks
28506 // are not iterable (they don't take up any "space" in the buffer,
28507 // they are just marks in between iterable locations), multiple marks
28508 // can exist in the same place. The returned list is not in any
28509 // meaningful order.
28510 // RETURNS: list of #GtkTextMark
28511 GLib2.SList* /*new container*/ get_marks()() {
28512 return gtk_text_iter_get_marks(&this);
28515 // Returns the character offset of an iterator.
28516 // Each character in a #GtkTextBuffer has an offset,
28517 // starting with 0 for the first character in the buffer.
28518 // Use gtk_text_buffer_get_iter_at_offset () to convert an
28519 // offset back into an iterator.
28520 // RETURNS: a character offset
28521 int get_offset()() {
28522 return gtk_text_iter_get_offset(&this);
28525 // If the element at @iter is a pixbuf, the pixbuf is returned
28526 // (with no new reference count added). Otherwise,
28527 // %NULL is returned.
28528 // RETURNS: the pixbuf at @iter
28529 GdkPixbuf2.Pixbuf* get_pixbuf()() {
28530 return gtk_text_iter_get_pixbuf(&this);
28533 // Returns the text in the given range. A "slice" is an array of
28534 // characters encoded in UTF-8 format, including the Unicode "unknown"
28535 // character 0xFFFC for iterable non-character elements in the buffer,
28536 // such as images. Because images are encoded in the slice, byte and
28537 // character offsets in the returned array will correspond to byte
28538 // offsets in the text buffer. Note that 0xFFFC can occur in normal
28539 // text as well, so it is not a reliable indicator that a pixbuf or
28540 // widget is in the buffer.
28541 // RETURNS: slice of text from the buffer
28542 // <end>: iterator at end of a range
28543 char* /*new*/ get_slice()(TextIter* end) {
28544 return gtk_text_iter_get_slice(&this, end);
28547 // Returns a list of tags that apply to @iter, in ascending order of
28548 // priority (highest-priority tags are last). The #GtkTextTag in the
28549 // list don't have a reference added, but you have to free the list
28550 // itself.
28551 // RETURNS: list of #GtkTextTag
28552 GLib2.SList* /*new container*/ get_tags()() {
28553 return gtk_text_iter_get_tags(&this);
28556 // Returns <emphasis>text</emphasis> in the given range. If the range
28557 // contains non-text elements such as images, the character and byte
28558 // offsets in the returned string will not correspond to character and
28559 // byte offsets in the buffer. If you want offsets to correspond, see
28560 // gtk_text_iter_get_slice ().
28561 // RETURNS: array of characters from the buffer
28562 // <end>: iterator at end of a range
28563 char* /*new*/ get_text()(TextIter* end) {
28564 return gtk_text_iter_get_text(&this, end);
28567 // Returns a list of #GtkTextTag that are toggled on or off at this
28568 // point. (If @toggled_on is %TRUE, the list contains tags that are
28569 // toggled on.) If a tag is toggled on at @iter, then some non-empty
28570 // range of characters following @iter has that tag applied to it. If
28571 // a tag is toggled off, then some non-empty range following @iter
28572 // does <emphasis>not</emphasis> have the tag applied to it.
28573 // RETURNS: tags toggled at this point
28574 // <toggled_on>: %TRUE to get toggled-on tags
28575 GLib2.SList* /*new container*/ get_toggled_tags()(int toggled_on) {
28576 return gtk_text_iter_get_toggled_tags(&this, toggled_on);
28579 // Returns the number of bytes from the start of the
28580 // line to the given @iter, not counting bytes that
28581 // are invisible due to tags with the "invisible" flag
28582 // toggled on.
28583 // RETURNS: byte index of @iter with respect to the start of the line
28584 int get_visible_line_index()() {
28585 return gtk_text_iter_get_visible_line_index(&this);
28588 // Returns the offset in characters from the start of the
28589 // line to the given @iter, not counting characters that
28590 // are invisible due to tags with the "invisible" flag
28591 // toggled on.
28592 // RETURNS: offset in visible characters from the start of the line
28593 int get_visible_line_offset()() {
28594 return gtk_text_iter_get_visible_line_offset(&this);
28597 // Like gtk_text_iter_get_slice (), but invisible text is not included.
28598 // Invisible text is usually invisible because a #GtkTextTag with the
28599 // "invisible" attribute turned on has been applied to it.
28600 // RETURNS: slice of text from the buffer
28601 // <end>: iterator at end of range
28602 char* /*new*/ get_visible_slice()(TextIter* end) {
28603 return gtk_text_iter_get_visible_slice(&this, end);
28606 // Like gtk_text_iter_get_text (), but invisible text is not included.
28607 // Invisible text is usually invisible because a #GtkTextTag with the
28608 // "invisible" attribute turned on has been applied to it.
28609 // RETURNS: string containing visible text in the range
28610 // <end>: iterator at end of range
28611 char* /*new*/ get_visible_text()(TextIter* end) {
28612 return gtk_text_iter_get_visible_text(&this, end);
28615 // Returns %TRUE if @iter is within a range tagged with @tag.
28616 // RETURNS: whether @iter is tagged with @tag
28617 // <tag>: a #GtkTextTag
28618 int has_tag()(TextTag* tag) {
28619 return gtk_text_iter_has_tag(&this, tag);
28622 // Checks whether @iter falls in the range [@start, @end).
28623 // RETURNS: %TRUE if @iter is in the range
28624 // <start>: start of range
28625 // <end>: end of range
28626 int in_range()(TextIter* start, TextIter* end) {
28627 return gtk_text_iter_in_range(&this, start, end);
28630 // Determines whether @iter is inside a sentence (as opposed to in
28631 // between two sentences, e.g. after a period and before the first
28632 // letter of the next sentence). Sentence boundaries are determined
28633 // by Pango and should be correct for nearly any language (if not, the
28634 // correct fix would be to the Pango text boundary algorithms).
28635 // RETURNS: %TRUE if @iter is inside a sentence.
28636 int inside_sentence()() {
28637 return gtk_text_iter_inside_sentence(&this);
28640 // Determines whether @iter is inside a natural-language word (as
28641 // opposed to say inside some whitespace). Word breaks are determined
28642 // by Pango and should be correct for nearly any language (if not, the
28643 // correct fix would be to the Pango word break algorithms).
28644 // RETURNS: %TRUE if @iter is inside a word
28645 int inside_word()() {
28646 return gtk_text_iter_inside_word(&this);
28649 // See gtk_text_iter_forward_cursor_position() or #PangoLogAttr or
28650 // pango_break() for details on what a cursor position is.
28651 // RETURNS: %TRUE if the cursor can be placed at @iter
28652 int is_cursor_position()() {
28653 return gtk_text_iter_is_cursor_position(&this);
28656 // Returns %TRUE if @iter is the end iterator, i.e. one past the last
28657 // dereferenceable iterator in the buffer. gtk_text_iter_is_end () is
28658 // the most efficient way to check whether an iterator is the end
28659 // iterator.
28660 // RETURNS: whether @iter is the end iterator
28661 int is_end()() {
28662 return gtk_text_iter_is_end(&this);
28665 // Returns %TRUE if @iter is the first iterator in the buffer, that is
28666 // if @iter has a character offset of 0.
28667 // RETURNS: whether @iter is the first in the buffer
28668 int is_start()() {
28669 return gtk_text_iter_is_start(&this);
28672 // Swaps the value of @first and @second if @second comes before
28673 // in sequence. Most text buffer functions that take a range call this
28674 // automatically on your behalf, so there's no real reason to call it yourself
28675 // in those cases. There are some exceptions, such as gtk_text_iter_in_range(),
28676 // that expect a pre-sorted range.
28677 // <second>: another #GtkTextIter
28678 void order()(TextIter* second) {
28679 gtk_text_iter_order(&this, second);
28682 // Moves iterator @iter to the start of the line @line_number. If
28683 // buffer, moves @iter to the start of the last line in the buffer.
28684 // <line_number>: line number (counted from 0)
28685 void set_line()(int line_number) {
28686 gtk_text_iter_set_line(&this, line_number);
28689 // Same as gtk_text_iter_set_line_offset(), but works with a
28690 // <emphasis>byte</emphasis> index. The given byte index must be at
28691 // the start of a character, it can't be in the middle of a UTF-8
28692 // encoded character.
28693 // <byte_on_line>: a byte index relative to the start of @iter's current line
28694 void set_line_index()(int byte_on_line) {
28695 gtk_text_iter_set_line_index(&this, byte_on_line);
28698 // Moves @iter within a line, to a new <emphasis>character</emphasis>
28699 // (not byte) offset. The given character offset must be less than or
28700 // equal to the number of characters in the line; if equal, @iter
28701 // moves to the start of the next line. See
28702 // gtk_text_iter_set_line_index() if you have a byte index rather than
28703 // a character offset.
28704 // <char_on_line>: a character offset relative to the start of @iter's current line
28705 void set_line_offset()(int char_on_line) {
28706 gtk_text_iter_set_line_offset(&this, char_on_line);
28709 // Sets @iter to point to @char_offset. @char_offset counts from the start
28710 // of the entire text buffer, starting with 0.
28711 // <char_offset>: a character number
28712 void set_offset()(int char_offset) {
28713 gtk_text_iter_set_offset(&this, char_offset);
28716 // Like gtk_text_iter_set_line_index(), but the index is in visible
28717 // bytes, i.e. text with a tag making it invisible is not counted
28718 // in the index.
28719 // <byte_on_line>: a byte index
28720 void set_visible_line_index()(int byte_on_line) {
28721 gtk_text_iter_set_visible_line_index(&this, byte_on_line);
28724 // Like gtk_text_iter_set_line_offset(), but the offset is in visible
28725 // characters, i.e. text with a tag making it invisible is not
28726 // counted in the offset.
28727 // <char_on_line>: a character offset
28728 void set_visible_line_offset()(int char_on_line) {
28729 gtk_text_iter_set_visible_line_offset(&this, char_on_line);
28732 // Returns %TRUE if @iter begins a paragraph,
28733 // i.e. if gtk_text_iter_get_line_offset () would return 0.
28734 // However this function is potentially more efficient than
28735 // gtk_text_iter_get_line_offset () because it doesn't have to compute
28736 // the offset, it just has to see whether it's 0.
28737 // RETURNS: whether @iter begins a line
28738 int starts_line()() {
28739 return gtk_text_iter_starts_line(&this);
28742 // Determines whether @iter begins a sentence. Sentence boundaries are
28743 // determined by Pango and should be correct for nearly any language
28744 // (if not, the correct fix would be to the Pango text boundary
28745 // algorithms).
28746 // RETURNS: %TRUE if @iter is at the start of a sentence.
28747 int starts_sentence()() {
28748 return gtk_text_iter_starts_sentence(&this);
28751 // Determines whether @iter begins a natural-language word. Word
28752 // breaks are determined by Pango and should be correct for nearly any
28753 // language (if not, the correct fix would be to the Pango word break
28754 // algorithms).
28755 // RETURNS: %TRUE if @iter is at the start of a word
28756 int starts_word()() {
28757 return gtk_text_iter_starts_word(&this);
28760 // This is equivalent to (gtk_text_iter_begins_tag () ||
28761 // gtk_text_iter_ends_tag ()), i.e. it tells you whether a range with
28762 // RETURNS: whether @tag is toggled on or off at @iter
28763 // <tag>: a #GtkTextTag, or %NULL
28764 int toggles_tag()(TextTag* tag=null) {
28765 return gtk_text_iter_toggles_tag(&this, tag);
28769 struct TextLayout /* : GObject.Object */ {
28770 alias parent_instance this;
28771 alias parent_instance super_;
28772 alias parent_instance object;
28773 GObject2.Object parent_instance;
28774 int screen_width, width, height;
28775 TextBuffer* buffer;
28776 TextAttributes* default_style;
28777 Pango.Context* ltr_context, rtl_context;
28778 TextAttributes* one_style_cache;
28779 TextLineDisplay* one_display_cache;
28780 int wrap_loop_count;
28781 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28782 uint, "cursor_visible", 1,
28783 uint, "cursor_direction", 2,
28784 uint, "keyboard_direction", 2,
28785 uint, "__dummy32A", 27));
28786 char* preedit_string;
28787 Pango.AttrList* preedit_attrs;
28788 int preedit_len, preedit_cursor;
28789 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
28790 uint, "overwrite_mode", 1,
28791 uint, "__dummy32B", 31));
28793 static TextLayout* /*new*/ new_()() {
28794 return gtk_text_layout_new();
28796 void changed()(int y, int old_height, int new_height) {
28797 gtk_text_layout_changed(&this, y, old_height, new_height);
28800 // If the iterator is not fully in the range @top <= y < @bottom,
28801 // then, if possible, move it the minimum distance so that the
28802 // iterator in this range.
28803 // RETURNS: %TRUE if the iterator was moved, otherwise %FALSE.
28804 // <iter>: a #GtkTextIter
28805 // <top>: the top of the range
28806 // <bottom>: the bottom the range
28807 int clamp_iter_to_vrange()(TextIter* iter, int top, int bottom) {
28808 return gtk_text_layout_clamp_iter_to_vrange(&this, iter, top, bottom);
28810 void cursors_changed()(int y, int old_height, int new_height) {
28811 gtk_text_layout_cursors_changed(&this, y, old_height, new_height);
28813 void default_style_changed()() {
28814 gtk_text_layout_default_style_changed(&this);
28816 void draw()(Widget* widget, Gdk2.Drawable* drawable, Gdk2.GC* cursor_gc, int x_offset, int y_offset, int x, int y, int width, int height, GLib2.List** widgets) {
28817 gtk_text_layout_draw(&this, widget, drawable, cursor_gc, x_offset, y_offset, x, y, width, height, widgets);
28819 void free_line_data()(TextLine* line, TextLineData* line_data) {
28820 gtk_text_layout_free_line_data(&this, line, line_data);
28822 void free_line_display()(TextLineDisplay* display) {
28823 gtk_text_layout_free_line_display(&this, display);
28826 // Unintrospectable method: get_buffer() / gtk_text_layout_get_buffer()
28827 // Gets the text buffer used by the layout. See
28828 // gtk_text_layout_set_buffer().
28829 // RETURNS: the text buffer used by the layout.
28830 TextBuffer* get_buffer()() {
28831 return gtk_text_layout_get_buffer(&this);
28834 // Given an iterator within a text layout, determine the positions of the
28835 // strong and weak cursors if the insertion point is at that
28836 // iterator. The position of each cursor is stored as a zero-width
28837 // rectangle. The strong cursor location is the location where
28838 // characters of the directionality equal to the base direction of the
28839 // paragraph are inserted. The weak cursor location is the location
28840 // where characters of the directionality opposite to the base
28841 // direction of the paragraph are inserted.
28842 // <iter>: a #GtkTextIter
28843 // <strong_pos>: location to store the strong cursor position (may be %NULL)
28844 // <weak_pos>: location to store the weak cursor position (may be %NULL)
28845 void get_cursor_locations()(TextIter* iter, Gdk2.Rectangle* strong_pos=null, Gdk2.Rectangle* weak_pos=null) {
28846 gtk_text_layout_get_cursor_locations(&this, iter, strong_pos, weak_pos);
28849 // Returns whether the insertion cursor will be shown.
28850 // shown, even if the text is editable.
28851 // RETURNS: if %FALSE, the insertion cursor will not be
28852 int get_cursor_visible()() {
28853 return gtk_text_layout_get_cursor_visible(&this);
28855 void get_iter_at_line()(TextIter* iter, TextLine* line, int byte_offset) {
28856 gtk_text_layout_get_iter_at_line(&this, iter, line, byte_offset);
28858 void get_iter_at_pixel()(TextIter* iter, int x, int y) {
28859 gtk_text_layout_get_iter_at_pixel(&this, iter, x, y);
28861 void get_iter_at_position()(TextIter* iter, int* trailing, int x, int y) {
28862 gtk_text_layout_get_iter_at_position(&this, iter, trailing, x, y);
28864 void get_iter_location()(TextIter* iter, Gdk2.Rectangle* rect) {
28865 gtk_text_layout_get_iter_location(&this, iter, rect);
28868 // Get the iter at the beginning of the line which is displayed
28869 // at the given y.
28870 // <target_iter>: the iterator in which the result is stored
28871 // <y>: the y positition
28872 // <line_top>: location to store the y coordinate of the top of the line. (Can by %NULL)
28873 void get_line_at_y()(TextIter* target_iter, int y, int* line_top) {
28874 gtk_text_layout_get_line_at_y(&this, target_iter, y, line_top);
28876 // Unintrospectable method: get_line_display() / gtk_text_layout_get_line_display()
28877 TextLineDisplay* get_line_display()(TextLine* line, int size_only) {
28878 return gtk_text_layout_get_line_display(&this, line, size_only);
28881 // Find the range of y coordinates for the paragraph containing
28882 // the given iter.
28883 // <iter>: a #GtkTextIter
28884 // <y>: location to store the top of the paragraph in pixels, or %NULL. or %NULL.
28885 void get_line_yrange()(TextIter* iter, int* y, int* height) {
28886 gtk_text_layout_get_line_yrange(&this, iter, y, height);
28888 GLib2.SList* /*new container*/ get_lines()(int top_y, int bottom_y, int* first_line_y) {
28889 return gtk_text_layout_get_lines(&this, top_y, bottom_y, first_line_y);
28891 void get_size()(int* width, int* height) {
28892 gtk_text_layout_get_size(&this, width, height);
28894 void invalidate()(TextIter* start, TextIter* end) {
28895 gtk_text_layout_invalidate(&this, start, end);
28897 void invalidate_cursors()(TextIter* start, TextIter* end) {
28898 gtk_text_layout_invalidate_cursors(&this, start, end);
28901 // Check if there are any invalid regions in a #GtkTextLayout's buffer
28902 // RETURNS: %TRUE if any invalid regions were found
28903 int is_valid()() {
28904 return gtk_text_layout_is_valid(&this);
28907 // Tests whether an iterator is at the start of a display line.
28908 // <iter>: iterator to test
28909 int iter_starts_line()(TextIter* iter) {
28910 return gtk_text_layout_iter_starts_line(&this, iter);
28913 // Move to the beginning or end of a display line.
28914 // <direction>: if negative, move to beginning of line, otherwise
28915 int move_iter_to_line_end()(TextIter* iter, int direction) {
28916 return gtk_text_layout_move_iter_to_line_end(&this, iter, direction);
28919 // Move the iterator to the beginning of the next line. The
28920 // lines of a wrapped paragraph are treated as distinct for
28921 // this operation.
28922 // <iter>: a #GtkTextIter
28923 int move_iter_to_next_line()(TextIter* iter) {
28924 return gtk_text_layout_move_iter_to_next_line(&this, iter);
28927 // Move the iterator to the beginning of the previous line. The lines
28928 // of a wrapped paragraph are treated as distinct for this operation.
28929 // <iter>: a #GtkTextIter
28930 int move_iter_to_previous_line()(TextIter* iter) {
28931 return gtk_text_layout_move_iter_to_previous_line(&this, iter);
28934 // Keeping the iterator on the same line of the layout, move it to the
28935 // specified X coordinate. The lines of a wrapped paragraph are
28936 // treated as distinct for this operation.
28937 // <iter>: a #GtkTextIter
28938 // <x>: X coordinate
28939 void move_iter_to_x()(TextIter* iter, int x) {
28940 gtk_text_layout_move_iter_to_x(&this, iter, x);
28943 // Move the iterator a given number of characters visually, treating
28944 // it as the strong cursor position. If @count is positive, then the
28945 // new strong cursor position will be @count positions to the right of
28946 // the old cursor position. If @count is negative then the new strong
28947 // cursor position will be @count positions to the left of the old
28948 // cursor position.
28949 // In the presence of bidirection text, the correspondence
28950 // between logical and visual order will depend on the direction
28951 // of the current run, and there may be jumps when the cursor
28952 // is moved off of the end of a run.
28953 // <iter>: a #GtkTextIter
28954 // <count>: number of characters to move (negative moves left, positive moves right)
28955 int move_iter_visually()(TextIter* iter, int count) {
28956 return gtk_text_layout_move_iter_visually(&this, iter, count);
28958 void set_buffer()(TextBuffer* buffer=null) {
28959 gtk_text_layout_set_buffer(&this, buffer);
28961 void set_contexts()(Pango.Context* ltr_context, Pango.Context* rtl_context) {
28962 gtk_text_layout_set_contexts(&this, ltr_context, rtl_context);
28965 // Sets which text directions (left-to-right and/or right-to-left) for
28966 // which cursors will be drawn for the insertion point. The visual
28967 // point at which new text is inserted depends on whether the new
28968 // text is right-to-left or left-to-right, so it may be desired to
28969 // make the drawn position of the cursor depend on the keyboard state.
28970 // <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.)
28971 void set_cursor_direction()(TextDirection direction) {
28972 gtk_text_layout_set_cursor_direction(&this, direction);
28975 // Sets whether the insertion cursor should be shown. Generally,
28976 // widgets using #GtkTextLayout will hide the cursor when the
28977 // widget does not have the input focus.
28978 // <cursor_visible>: If %FALSE, then the insertion cursor will not be shown, even if the text is editable.
28979 void set_cursor_visible()(int cursor_visible) {
28980 gtk_text_layout_set_cursor_visible(&this, cursor_visible);
28982 void set_default_style()(TextAttributes* values) {
28983 gtk_text_layout_set_default_style(&this, values);
28986 // Sets the keyboard direction; this is used as for the bidirectional
28987 // base direction for the line with the cursor if the line contains
28988 // only neutral characters.
28989 // <keyboard_dir>: the current direction of the keyboard.
28990 void set_keyboard_direction()(TextDirection keyboard_dir) {
28991 gtk_text_layout_set_keyboard_direction(&this, keyboard_dir);
28994 // Sets overwrite mode
28995 // <overwrite>: overwrite mode
28996 void set_overwrite_mode()(int overwrite) {
28997 gtk_text_layout_set_overwrite_mode(&this, overwrite);
29000 // Set the preedit string and attributes. The preedit string is a
29001 // string showing text that is currently being edited and not
29002 // yet committed into the buffer.
29003 // <preedit_string>: a string to display at the insertion point
29004 // <preedit_attrs>: a #PangoAttrList of attributes that apply to @preedit_string
29005 // <cursor_pos>: position of cursor within preedit string in chars
29006 void set_preedit_string()(char* preedit_string, Pango.AttrList* preedit_attrs, int cursor_pos) {
29007 gtk_text_layout_set_preedit_string(&this, preedit_string, preedit_attrs, cursor_pos);
29009 void set_screen_width()(int width) {
29010 gtk_text_layout_set_screen_width(&this, width);
29012 void spew()() {
29013 gtk_text_layout_spew(&this);
29016 // Validate regions of a #GtkTextLayout. The ::changed signal will
29017 // be emitted for each region validated.
29018 // <max_pixels>: the maximum number of pixels to validate. (No more than one paragraph beyond this limit will be validated)
29019 void validate()(int max_pixels) {
29020 gtk_text_layout_validate(&this, max_pixels);
29023 // Ensure that a region of a #GtkTextLayout is valid. The ::changed
29024 // signal will be emitted if any lines are validated.
29025 // <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.)
29026 // <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.)
29027 void validate_yrange()(TextIter* anchor_line, int y0_, int y1_) {
29028 gtk_text_layout_validate_yrange(&this, anchor_line, y0_, y1_);
29030 // Unintrospectable method: wrap() / gtk_text_layout_wrap()
29031 TextLineData* wrap()(TextLine* line, TextLineData* line_data) {
29032 return gtk_text_layout_wrap(&this, line, line_data);
29034 void wrap_loop_end()() {
29035 gtk_text_layout_wrap_loop_end(&this);
29037 void wrap_loop_start()() {
29038 gtk_text_layout_wrap_loop_start(&this);
29040 extern (C) alias static void function (TextLayout* this_, Object* object, int p0, int p1, void* user_data=null) signal_allocate_child;
29042 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29043 return super_.signal_connect!name(cb, data, cf);
29046 ulong signal_connect(string name:"allocate-child", CB:signal_allocate_child)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29047 return signal_connect_data!()(&this, cast(char*)"allocate-child",
29048 cast(GObject2.Callback)cb, data, null, cf);
29050 extern (C) alias static void function (TextLayout* this_, int object, int p0, int p1, void* user_data=null) signal_changed;
29051 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29052 return signal_connect_data!()(&this, cast(char*)"changed",
29053 cast(GObject2.Callback)cb, data, null, cf);
29055 extern (C) alias static void function (TextLayout* this_, void* user_data=null) signal_invalidated;
29056 ulong signal_connect(string name:"invalidated", CB:signal_invalidated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29057 return signal_connect_data!()(&this, cast(char*)"invalidated",
29058 cast(GObject2.Callback)cb, data, null, cf);
29062 struct TextLayoutClass {
29063 GObject2.ObjectClass parent_class;
29064 extern (C) void function (TextLayout* layout) invalidated;
29065 extern (C) void function (TextLayout* layout, int y, int old_height, int new_height) changed;
29066 // Unintrospectable functionp: wrap() / ()
29067 extern (C) TextLineData* function (TextLayout* layout, TextLine* line, TextLineData* line_data) wrap;
29068 extern (C) void function (TextLayout* layout, TextLine* line, Pango.LogAttr** attrs, int* n_attrs) get_log_attrs;
29069 extern (C) void function (TextLayout* layout, TextIter* start, TextIter* end) invalidate;
29070 extern (C) void function (TextLayout* layout, TextLine* line, TextLineData* line_data) free_line_data;
29071 extern (C) void function (TextLayout* layout, Widget* child, int x, int y) allocate_child;
29072 extern (C) void function (TextLayout* layout, TextIter* start, TextIter* end) invalidate_cursors;
29073 extern (C) void function () _gtk_reserved1;
29074 extern (C) void function () _gtk_reserved2;
29075 extern (C) void function () _gtk_reserved3;
29078 struct TextLine {
29081 struct TextLineData {
29084 struct TextLineDisplay {
29085 Pango.Layout* layout;
29086 GLib2.SList* cursors, shaped_objects;
29087 TextDirection direction;
29088 int width, total_width, height, x_offset, left_margin, right_margin, top_margin, bottom_margin, insert_index;
29089 int size_only;
29090 TextLine* line;
29091 Gdk2.Color* pg_bg_color;
29092 Gdk2.Rectangle block_cursor;
29093 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29094 uint, "cursors_invalid", 1,
29095 uint, "has_block_cursor", 1,
29096 uint, "cursor_at_line_end", 1,
29097 uint, "__dummy32A", 29));
29100 struct TextLogAttrCache {
29103 struct TextMark /* : GObject.Object */ {
29104 alias parent_instance this;
29105 alias parent_instance super_;
29106 alias parent_instance object;
29107 GObject2.Object parent_instance;
29108 void* segment;
29111 // VERSION: 2.12
29112 // Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark().
29113 // If @name is %NULL, the mark is anonymous; otherwise, the mark can be
29114 // retrieved by name using gtk_text_buffer_get_mark(). If a mark has left
29115 // gravity, and text is inserted at the mark's current location, the mark
29116 // will be moved to the left of the newly-inserted text. If the mark has
29117 // right gravity (@left_gravity = %FALSE), the mark will end up on the
29118 // right of newly-inserted text. The standard left-to-right cursor is a
29119 // mark with right gravity (when you type, the cursor stays on the right
29120 // side of the text you're typing).
29121 // RETURNS: new #GtkTextMark
29122 // <name>: mark name or %NULL
29123 // <left_gravity>: whether the mark should have left gravity
29124 static TextMark* /*new*/ new_()(char* name, int left_gravity) {
29125 return gtk_text_mark_new(name, left_gravity);
29128 // Gets the buffer this mark is located inside,
29129 // or %NULL if the mark is deleted.
29130 // RETURNS: the mark's #GtkTextBuffer
29131 TextBuffer* get_buffer()() {
29132 return gtk_text_mark_get_buffer(&this);
29135 // Returns %TRUE if the mark has been removed from its buffer
29136 // with gtk_text_buffer_delete_mark(). See gtk_text_buffer_add_mark()
29137 // for a way to add it to a buffer again.
29138 // RETURNS: whether the mark is deleted
29139 int get_deleted()() {
29140 return gtk_text_mark_get_deleted(&this);
29143 // Determines whether the mark has left gravity.
29144 // RETURNS: %TRUE if the mark has left gravity, %FALSE otherwise
29145 int get_left_gravity()() {
29146 return gtk_text_mark_get_left_gravity(&this);
29149 // Returns the mark name; returns NULL for anonymous marks.
29150 // RETURNS: mark name
29151 char* get_name()() {
29152 return gtk_text_mark_get_name(&this);
29155 // Returns %TRUE if the mark is visible (i.e. a cursor is displayed
29156 // for it).
29157 // RETURNS: %TRUE if visible
29158 int get_visible()() {
29159 return gtk_text_mark_get_visible(&this);
29162 // Sets the visibility of @mark; the insertion point is normally
29163 // visible, i.e. you can see it as a vertical bar. Also, the text
29164 // widget uses a visible mark to indicate where a drop will occur when
29165 // dragging-and-dropping text. Most other marks are not visible.
29166 // Marks are not visible by default.
29167 // <setting>: visibility of mark
29168 void set_visible()(int setting) {
29169 gtk_text_mark_set_visible(&this, setting);
29173 struct TextMarkClass {
29174 GObject2.ObjectClass parent_class;
29175 extern (C) void function () _gtk_reserved1;
29176 extern (C) void function () _gtk_reserved2;
29177 extern (C) void function () _gtk_reserved3;
29178 extern (C) void function () _gtk_reserved4;
29181 struct TextPendingScroll {
29184 enum TextSearchFlags {
29185 VISIBLE_ONLY = 1,
29186 TEXT_ONLY = 2
29188 struct TextTag /* : GObject.Object */ {
29189 alias parent_instance this;
29190 alias parent_instance super_;
29191 alias parent_instance object;
29192 GObject2.Object parent_instance;
29193 TextTagTable* table;
29194 char* name;
29195 int priority;
29196 TextAttributes* values;
29197 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29198 uint, "bg_color_set", 1,
29199 uint, "bg_stipple_set", 1,
29200 uint, "fg_color_set", 1,
29201 uint, "scale_set", 1,
29202 uint, "fg_stipple_set", 1,
29203 uint, "justification_set", 1,
29204 uint, "left_margin_set", 1,
29205 uint, "indent_set", 1,
29206 uint, "rise_set", 1,
29207 uint, "strikethrough_set", 1,
29208 uint, "right_margin_set", 1,
29209 uint, "pixels_above_lines_set", 1,
29210 uint, "pixels_below_lines_set", 1,
29211 uint, "pixels_inside_wrap_set", 1,
29212 uint, "tabs_set", 1,
29213 uint, "underline_set", 1,
29214 uint, "wrap_mode_set", 1,
29215 uint, "bg_full_height_set", 1,
29216 uint, "invisible_set", 1,
29217 uint, "editable_set", 1,
29218 uint, "language_set", 1,
29219 uint, "pg_bg_color_set", 1,
29220 uint, "accumulative_margin", 1,
29221 uint, "pad1", 1,
29222 uint, "__dummy32A", 8));
29225 // Creates a #GtkTextTag. Configure the tag using object arguments,
29226 // i.e. using g_object_set().
29227 // RETURNS: a new #GtkTextTag
29228 // <name>: tag name, or %NULL
29229 static TextTag* /*new*/ new_()(char* name=null) {
29230 return gtk_text_tag_new(name);
29233 // Emits the "event" signal on the #GtkTextTag.
29234 // RETURNS: result of signal emission (whether the event was handled)
29235 // <event_object>: object that received the event, such as a widget
29236 // <event>: the event
29237 // <iter>: location where the event was received
29238 int event()(GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter) {
29239 return gtk_text_tag_event(&this, event_object, event, iter);
29242 // Get the tag priority.
29243 // RETURNS: The tag's priority.
29244 int get_priority()() {
29245 return gtk_text_tag_get_priority(&this);
29248 // Sets the priority of a #GtkTextTag. Valid priorities are
29249 // start at 0 and go to one less than gtk_text_tag_table_get_size().
29250 // Each tag in a table has a unique priority; setting the priority
29251 // of one tag shifts the priorities of all the other tags in the
29252 // table to maintain a unique priority for each tag. Higher priority
29253 // tags "win" if two tags both set the same text attribute. When adding
29254 // a tag to a tag table, it will be assigned the highest priority in
29255 // the table by default; so normally the precedence of a set of tags
29256 // is the order in which they were added to the table, or created with
29257 // gtk_text_buffer_create_tag(), which adds the tag to the buffer's table
29258 // automatically.
29259 // <priority>: the new priority
29260 void set_priority()(int priority) {
29261 gtk_text_tag_set_priority(&this, priority);
29264 // The ::event signal is emitted when an event occurs on a region of the
29265 // buffer marked with this tag.
29266 // event. %FALSE to propagate the event further.
29267 // RETURNS: %TRUE to stop other handlers from being invoked for the
29268 // <object>: the object the event was fired from (typically a #GtkTextView)
29269 // <event>: the event which triggered the signal
29270 // <iter>: a #GtkTextIter pointing at the location the event occured
29271 extern (C) alias static c_int function (TextTag* this_, GObject2.Object* object, Gdk2.Event* event, TextIter* iter, void* user_data=null) signal_event;
29273 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29274 return super_.signal_connect!name(cb, data, cf);
29277 ulong signal_connect(string name:"event", CB:signal_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29278 return signal_connect_data!()(&this, cast(char*)"event",
29279 cast(GObject2.Callback)cb, data, null, cf);
29283 struct TextTagClass {
29284 GObject2.ObjectClass parent_class;
29286 // RETURNS: result of signal emission (whether the event was handled)
29287 // <event_object>: object that received the event, such as a widget
29288 // <event>: the event
29289 // <iter>: location where the event was received
29290 extern (C) int function (TextTag* tag, GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter) event;
29291 extern (C) void function () _gtk_reserved1;
29292 extern (C) void function () _gtk_reserved2;
29293 extern (C) void function () _gtk_reserved3;
29294 extern (C) void function () _gtk_reserved4;
29298 // You may wish to begin by reading the <link linkend="TextWidget">text widget
29299 // conceptual overview</link> which gives an overview of all the objects and data
29300 // types related to the text widget and how they work together.
29301 // <refsect2 id="GtkTextTagTable-BUILDER-UI">
29302 // <title>GtkTextTagTables as GtkBuildable</title>
29303 // <para>
29304 // The GtkTextTagTable implementation of the GtkBuildable interface
29305 // supports adding tags by specifying "tag" as the "type"
29306 // attribute of a &lt;child&gt; element.
29307 // </para>
29308 // <example>
29309 // <title>A UI definition fragment specifying tags</title>
29310 // <programlisting><![CDATA[
29311 // <object class="GtkTextTagTable">
29312 // <child type="tag">
29313 // <object class="GtkTextTag"/>
29314 // </child>
29315 // </object>
29316 // ]]></programlisting>
29317 // </example>
29318 // </refsect2>
29319 struct TextTagTable /* : GObject.Object */ {
29320 mixin Buildable.__interface__;
29321 alias parent_instance this;
29322 alias parent_instance super_;
29323 alias parent_instance object;
29324 GObject2.Object parent_instance;
29325 GLib2.HashTable* hash;
29326 GLib2.SList* anonymous;
29327 int anon_count;
29328 GLib2.SList* buffers;
29331 // Creates a new #GtkTextTagTable. The table contains no tags by
29332 // default.
29333 // RETURNS: a new #GtkTextTagTable
29334 static TextTagTable* /*new*/ new_()() {
29335 return gtk_text_tag_table_new();
29338 // Add a tag to the table. The tag is assigned the highest priority
29339 // in the table.
29340 // the same name as an already-added tag.
29341 // <tag>: a #GtkTextTag
29342 void add()(TextTag* tag) {
29343 gtk_text_tag_table_add(&this, tag);
29346 // Calls @func on each tag in @table, with user data @data.
29347 // Note that the table may not be modified while iterating
29348 // over it (you can't add/remove tags).
29349 // <func>: a function to call on each tag
29350 // <data>: user data
29351 void foreach_()(TextTagTableForeach func, void* data) {
29352 gtk_text_tag_table_foreach(&this, func, data);
29355 // Returns the size of the table (number of tags)
29356 // RETURNS: number of tags in @table
29357 int get_size()() {
29358 return gtk_text_tag_table_get_size(&this);
29361 // Look up a named tag.
29362 // RETURNS: The tag, or %NULL if none by that name is in the table.
29363 // <name>: name of a tag
29364 TextTag* lookup()(char* name) {
29365 return gtk_text_tag_table_lookup(&this, name);
29368 // Remove a tag from the table. This will remove the table's
29369 // reference to the tag, so be careful - the tag will end
29370 // up destroyed if you don't have a reference to it.
29371 // <tag>: a #GtkTextTag
29372 void remove()(TextTag* tag) {
29373 gtk_text_tag_table_remove(&this, tag);
29375 extern (C) alias static void function (TextTagTable* this_, TextTag* object, void* user_data=null) signal_tag_added;
29377 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29378 return super_.signal_connect!name(cb, data, cf);
29381 ulong signal_connect(string name:"tag-added", CB:signal_tag_added)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29382 return signal_connect_data!()(&this, cast(char*)"tag-added",
29383 cast(GObject2.Callback)cb, data, null, cf);
29385 extern (C) alias static void function (TextTagTable* this_, TextTag* object, c_int p0, void* user_data=null) signal_tag_changed;
29386 ulong signal_connect(string name:"tag-changed", CB:signal_tag_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29387 return signal_connect_data!()(&this, cast(char*)"tag-changed",
29388 cast(GObject2.Callback)cb, data, null, cf);
29390 extern (C) alias static void function (TextTagTable* this_, TextTag* object, void* user_data=null) signal_tag_removed;
29391 ulong signal_connect(string name:"tag-removed", CB:signal_tag_removed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
29392 return signal_connect_data!()(&this, cast(char*)"tag-removed",
29393 cast(GObject2.Callback)cb, data, null, cf);
29397 struct TextTagTableClass {
29398 GObject2.ObjectClass parent_class;
29399 extern (C) void function (TextTagTable* table, TextTag* tag, int size_changed) tag_changed;
29400 extern (C) void function (TextTagTable* table, TextTag* tag) tag_added;
29401 extern (C) void function (TextTagTable* table, TextTag* tag) tag_removed;
29402 extern (C) void function () _gtk_reserved1;
29403 extern (C) void function () _gtk_reserved2;
29404 extern (C) void function () _gtk_reserved3;
29405 extern (C) void function () _gtk_reserved4;
29408 extern (C) alias void function (TextTag* tag, void* data) TextTagTableForeach;
29410 struct TextView /* : Container */ {
29411 mixin Atk.ImplementorIface.__interface__;
29412 mixin Buildable.__interface__;
29413 alias parent_instance this;
29414 alias parent_instance super_;
29415 alias parent_instance container;
29416 Container parent_instance;
29417 void** layout;
29418 TextBuffer* buffer;
29419 uint selection_drag_handler, scroll_timeout;
29420 int pixels_above_lines, pixels_below_lines, pixels_inside_wrap;
29421 WrapMode wrap_mode;
29422 Justification justify;
29423 int left_margin, right_margin, indent;
29424 Pango.TabArray* tabs;
29425 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
29426 uint, "editable", 1,
29427 uint, "overwrite_mode", 1,
29428 uint, "cursor_visible", 1,
29429 uint, "need_im_reset", 1,
29430 uint, "accepts_tab", 1,
29431 uint, "width_changed", 1,
29432 uint, "onscreen_validated", 1,
29433 uint, "mouse_cursor_obscured", 1,
29434 uint, "__dummy32A", 24));
29435 TextWindow* text_window, left_window, right_window, top_window, bottom_window;
29436 Adjustment* hadjustment, vadjustment;
29437 int xoffset, yoffset, width, height, virtual_cursor_x, virtual_cursor_y;
29438 TextMark* first_para_mark;
29439 int first_para_pixels;
29440 TextMark* dnd_mark;
29441 uint blink_timeout, first_validate_idle, incremental_validate_idle;
29442 IMContext* im_context;
29443 Widget* popup_menu;
29444 int drag_start_x, drag_start_y;
29445 GLib2.SList* children;
29446 TextPendingScroll* pending_scroll;
29447 int pending_place_cursor_button;
29450 // Creates a new #GtkTextView. If you don't call gtk_text_view_set_buffer()
29451 // before using the text view, an empty default buffer will be created
29452 // for you. Get the buffer with gtk_text_view_get_buffer(). If you want
29453 // to specify your own buffer, consider gtk_text_view_new_with_buffer().
29454 // RETURNS: a new #GtkTextView
29455 static TextView* new_()() {
29456 return gtk_text_view_new();
29459 // Creates a new #GtkTextView widget displaying the buffer
29460 // this function is equivalent to gtk_text_view_new(). The
29461 // text view adds its own reference count to the buffer; it does not
29462 // take over an existing reference.
29463 // RETURNS: a new #GtkTextView.
29464 // <buffer>: a #GtkTextBuffer
29465 static TextView* new_with_buffer()(TextBuffer* buffer) {
29466 return gtk_text_view_new_with_buffer(buffer);
29469 // Adds a child widget in the text buffer, at the given @anchor.
29470 // <child>: a #GtkWidget
29471 // <anchor>: a #GtkTextChildAnchor in the #GtkTextBuffer for @text_view
29472 void add_child_at_anchor()(Widget* child, TextChildAnchor* anchor) {
29473 gtk_text_view_add_child_at_anchor(&this, child, anchor);
29476 // Adds a child at fixed coordinates in one of the text widget's
29477 // windows. The window must have nonzero size (see
29478 // gtk_text_view_set_border_window_size()). Note that the child
29479 // coordinates are given relative to the #GdkWindow in question, and
29480 // that these coordinates have no sane relationship to scrolling. When
29481 // placing a child in #GTK_TEXT_WINDOW_WIDGET, scrolling is
29482 // irrelevant, the child floats above all scrollable areas. But when
29483 // placing a child in one of the scrollable windows (border windows or
29484 // text window), you'll need to compute the child's correct position
29485 // in buffer coordinates any time scrolling occurs or buffer changes
29486 // occur, and then call gtk_text_view_move_child() to update the
29487 // child's position. Unfortunately there's no good way to detect that
29488 // scrolling has occurred, using the current API; a possible hack
29489 // would be to update all child positions when the scroll adjustments
29490 // change or the text buffer changes. See bug 64518 on
29491 // bugzilla.gnome.org for status of fixing this issue.
29492 // <child>: a #GtkWidget
29493 // <which_window>: which window the child should appear in
29494 // <xpos>: X position of child in window coordinates
29495 // <ypos>: Y position of child in window coordinates
29496 void add_child_in_window()(Widget* child, TextWindowType which_window, int xpos, int ypos) {
29497 gtk_text_view_add_child_in_window(&this, child, which_window, xpos, ypos);
29500 // Moves the given @iter backward by one display (wrapped) line.
29501 // A display line is different from a paragraph. Paragraphs are
29502 // separated by newlines or other paragraph separator characters.
29503 // Display lines are created by line-wrapping a paragraph. If
29504 // wrapping is turned off, display lines and paragraphs will be the
29505 // same. Display lines are divided differently for each view, since
29506 // they depend on the view's width; paragraphs are the same in all
29507 // views, since they depend on the contents of the #GtkTextBuffer.
29508 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
29509 // <iter>: a #GtkTextIter
29510 int backward_display_line()(TextIter* iter) {
29511 return gtk_text_view_backward_display_line(&this, iter);
29514 // Moves the given @iter backward to the next display line start.
29515 // A display line is different from a paragraph. Paragraphs are
29516 // separated by newlines or other paragraph separator characters.
29517 // Display lines are created by line-wrapping a paragraph. If
29518 // wrapping is turned off, display lines and paragraphs will be the
29519 // same. Display lines are divided differently for each view, since
29520 // they depend on the view's width; paragraphs are the same in all
29521 // views, since they depend on the contents of the #GtkTextBuffer.
29522 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
29523 // <iter>: a #GtkTextIter
29524 int backward_display_line_start()(TextIter* iter) {
29525 return gtk_text_view_backward_display_line_start(&this, iter);
29528 // Converts coordinate (@buffer_x, @buffer_y) to coordinates for the window
29529 // Note that you can't convert coordinates for a nonexisting window (see
29530 // gtk_text_view_set_border_window_size()).
29531 // <win>: a #GtkTextWindowType except #GTK_TEXT_WINDOW_PRIVATE
29532 // <buffer_x>: buffer x coordinate
29533 // <buffer_y>: buffer y coordinate
29534 // <window_x>: window x coordinate return location or %NULL
29535 // <window_y>: window y coordinate return location or %NULL
29536 void buffer_to_window_coords()(TextWindowType win, int buffer_x, int buffer_y, /*out*/ int* window_x=null, /*out*/ int* window_y=null) {
29537 gtk_text_view_buffer_to_window_coords(&this, win, buffer_x, buffer_y, window_x, window_y);
29540 // Moves the given @iter forward by one display (wrapped) line.
29541 // A display line is different from a paragraph. Paragraphs are
29542 // separated by newlines or other paragraph separator characters.
29543 // Display lines are created by line-wrapping a paragraph. If
29544 // wrapping is turned off, display lines and paragraphs will be the
29545 // same. Display lines are divided differently for each view, since
29546 // they depend on the view's width; paragraphs are the same in all
29547 // views, since they depend on the contents of the #GtkTextBuffer.
29548 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
29549 // <iter>: a #GtkTextIter
29550 int forward_display_line()(TextIter* iter) {
29551 return gtk_text_view_forward_display_line(&this, iter);
29554 // Moves the given @iter forward to the next display line end.
29555 // A display line is different from a paragraph. Paragraphs are
29556 // separated by newlines or other paragraph separator characters.
29557 // Display lines are created by line-wrapping a paragraph. If
29558 // wrapping is turned off, display lines and paragraphs will be the
29559 // same. Display lines are divided differently for each view, since
29560 // they depend on the view's width; paragraphs are the same in all
29561 // views, since they depend on the contents of the #GtkTextBuffer.
29562 // RETURNS: %TRUE if @iter was moved and is not on the end iterator
29563 // <iter>: a #GtkTextIter
29564 int forward_display_line_end()(TextIter* iter) {
29565 return gtk_text_view_forward_display_line_end(&this, iter);
29568 // VERSION: 2.4
29569 // Returns whether pressing the Tab key inserts a tab characters.
29570 // gtk_text_view_set_accepts_tab().
29571 // %FALSE if pressing the Tab key moves the keyboard focus.
29572 // RETURNS: %TRUE if pressing the Tab key inserts a tab character,
29573 int get_accepts_tab()() {
29574 return gtk_text_view_get_accepts_tab(&this);
29577 // Gets the width of the specified border window. See
29578 // gtk_text_view_set_border_window_size().
29579 // RETURNS: width of window
29580 // <type>: window to return size from
29581 int get_border_window_size()(TextWindowType type) {
29582 return gtk_text_view_get_border_window_size(&this, type);
29585 // Returns the #GtkTextBuffer being displayed by this text view.
29586 // The reference count on the buffer is not incremented; the caller
29587 // of this function won't own a new reference.
29588 // RETURNS: a #GtkTextBuffer
29589 TextBuffer* get_buffer()() {
29590 return gtk_text_view_get_buffer(&this);
29593 // Find out whether the cursor is being displayed.
29594 // RETURNS: whether the insertion mark is visible
29595 int get_cursor_visible()() {
29596 return gtk_text_view_get_cursor_visible(&this);
29599 // Obtains a copy of the default text attributes. These are the
29600 // attributes used for text unless a tag overrides them.
29601 // You'd typically pass the default attributes in to
29602 // gtk_text_iter_get_attributes() in order to get the
29603 // attributes in effect at a given text position.
29604 // The return value is a copy owned by the caller of this function,
29605 // and should be freed.
29606 // RETURNS: a new #GtkTextAttributes
29607 TextAttributes* /*new*/ get_default_attributes()() {
29608 return gtk_text_view_get_default_attributes(&this);
29611 // Returns the default editability of the #GtkTextView. Tags in the
29612 // buffer may override this setting for some ranges of text.
29613 // RETURNS: whether text is editable by default
29614 int get_editable()() {
29615 return gtk_text_view_get_editable(&this);
29618 // VERSION: 2.22
29619 // Gets the horizontal-scrolling #GtkAdjustment.
29620 // RETURNS: pointer to the horizontal #GtkAdjustment
29621 Adjustment* get_hadjustment()() {
29622 return gtk_text_view_get_hadjustment(&this);
29625 // Gets the default indentation of paragraphs in @text_view.
29626 // Tags in the view's buffer may override the default.
29627 // The indentation may be negative.
29628 // RETURNS: number of pixels of indentation
29629 int get_indent()() {
29630 return gtk_text_view_get_indent(&this);
29633 // Retrieves the iterator at buffer coordinates @x and @y. Buffer
29634 // coordinates are coordinates for the entire buffer, not just the
29635 // currently-displayed portion. If you have coordinates from an
29636 // event, you have to convert those to buffer coordinates with
29637 // gtk_text_view_window_to_buffer_coords().
29638 // <iter>: a #GtkTextIter
29639 // <x>: x position, in buffer coordinates
29640 // <y>: y position, in buffer coordinates
29641 void get_iter_at_location()(/*out*/ TextIter* iter, int x, int y) {
29642 gtk_text_view_get_iter_at_location(&this, iter, x, y);
29645 // VERSION: 2.6
29646 // Retrieves the iterator pointing to the character at buffer
29647 // coordinates @x and @y. Buffer coordinates are coordinates for
29648 // the entire buffer, not just the currently-displayed portion.
29649 // If you have coordinates from an event, you have to convert
29650 // those to buffer coordinates with
29651 // gtk_text_view_window_to_buffer_coords().
29652 // Note that this is different from gtk_text_view_get_iter_at_location(),
29653 // which returns cursor locations, i.e. positions <emphasis>between</emphasis>
29654 // characters.
29655 // <iter>: a #GtkTextIter
29656 // <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.
29657 // <x>: x position, in buffer coordinates
29658 // <y>: y position, in buffer coordinates
29659 void get_iter_at_position()(/*out*/ TextIter* iter, /*out*/ int* trailing, int x, int y) {
29660 gtk_text_view_get_iter_at_position(&this, iter, trailing, x, y);
29663 // Gets a rectangle which roughly contains the character at @iter.
29664 // The rectangle position is in buffer coordinates; use
29665 // gtk_text_view_buffer_to_window_coords() to convert these
29666 // coordinates to coordinates for one of the windows in the text view.
29667 // <iter>: a #GtkTextIter
29668 // <location>: bounds of the character at @iter
29669 void get_iter_location()(TextIter* iter, /*out*/ Gdk2.Rectangle* location) {
29670 gtk_text_view_get_iter_location(&this, iter, location);
29673 // Gets the default justification of paragraphs in @text_view.
29674 // Tags in the buffer may override the default.
29675 // RETURNS: default justification
29676 Justification get_justification()() {
29677 return gtk_text_view_get_justification(&this);
29680 // Gets the default left margin size of paragraphs in the @text_view.
29681 // Tags in the buffer may override the default.
29682 // RETURNS: left margin in pixels
29683 int get_left_margin()() {
29684 return gtk_text_view_get_left_margin(&this);
29687 // Gets the #GtkTextIter at the start of the line containing
29688 // the coordinate @y. @y is in buffer coordinates, convert from
29689 // window coordinates with gtk_text_view_window_to_buffer_coords().
29690 // If non-%NULL, @line_top will be filled with the coordinate of the top
29691 // edge of the line.
29692 // <target_iter>: a #GtkTextIter
29693 // <y>: a y coordinate
29694 // <line_top>: return location for top coordinate of the line
29695 void get_line_at_y()(/*out*/ TextIter* target_iter, int y, /*out*/ int* line_top) {
29696 gtk_text_view_get_line_at_y(&this, target_iter, y, line_top);
29699 // Gets the y coordinate of the top of the line containing @iter,
29700 // and the height of the line. The coordinate is a buffer coordinate;
29701 // convert to window coordinates with gtk_text_view_buffer_to_window_coords().
29702 // <iter>: a #GtkTextIter
29703 // <y>: return location for a y coordinate
29704 // <height>: return location for a height
29705 void get_line_yrange()(TextIter* iter, /*out*/ int* y, /*out*/ int* height) {
29706 gtk_text_view_get_line_yrange(&this, iter, y, height);
29709 // VERSION: 2.4
29710 // Returns whether the #GtkTextView is in overwrite mode or not.
29711 // RETURNS: whether @text_view is in overwrite mode or not.
29712 int get_overwrite()() {
29713 return gtk_text_view_get_overwrite(&this);
29716 // Gets the default number of pixels to put above paragraphs.
29717 // RETURNS: default number of pixels above paragraphs
29718 int get_pixels_above_lines()() {
29719 return gtk_text_view_get_pixels_above_lines(&this);
29722 // Gets the value set by gtk_text_view_set_pixels_below_lines().
29723 // RETURNS: default number of blank pixels below paragraphs
29724 int get_pixels_below_lines()() {
29725 return gtk_text_view_get_pixels_below_lines(&this);
29728 // Gets the value set by gtk_text_view_set_pixels_inside_wrap().
29729 // RETURNS: default number of pixels of blank space between wrapped lines
29730 int get_pixels_inside_wrap()() {
29731 return gtk_text_view_get_pixels_inside_wrap(&this);
29734 // Gets the default right margin for text in @text_view. Tags
29735 // in the buffer may override the default.
29736 // RETURNS: right margin in pixels
29737 int get_right_margin()() {
29738 return gtk_text_view_get_right_margin(&this);
29741 // Gets the default tabs for @text_view. Tags in the buffer may
29742 // override the defaults. The returned array will be %NULL if
29743 // "standard" (8-space) tabs are used. Free the return value
29744 // with pango_tab_array_free().
29745 // tabs are used; must be freed with pango_tab_array_free().
29746 // RETURNS: copy of default tab array, or %NULL if "standard"
29747 Pango.TabArray* /*new*/ get_tabs()() {
29748 return gtk_text_view_get_tabs(&this);
29751 // VERSION: 2.22
29752 // Gets the vertical-scrolling #GtkAdjustment.
29753 // RETURNS: pointer to the vertical #GtkAdjustment
29754 Adjustment* get_vadjustment()() {
29755 return gtk_text_view_get_vadjustment(&this);
29758 // Fills @visible_rect with the currently-visible
29759 // region of the buffer, in buffer coordinates. Convert to window coordinates
29760 // with gtk_text_view_buffer_to_window_coords().
29761 // <visible_rect>: rectangle to fill
29762 void get_visible_rect()(/*out*/ Gdk2.Rectangle* visible_rect) {
29763 gtk_text_view_get_visible_rect(&this, visible_rect);
29766 // Retrieves the #GdkWindow corresponding to an area of the text view;
29767 // possible windows include the overall widget window, child windows
29768 // on the left, right, top, bottom, and the window that displays the
29769 // text buffer. Windows are %NULL and nonexistent if their width or
29770 // height is 0, and are nonexistent before the widget has been
29771 // realized.
29772 // RETURNS: a #GdkWindow, or %NULL
29773 // <win>: window to get
29774 Gdk2.Window* get_window()(TextWindowType win) {
29775 return gtk_text_view_get_window(&this, win);
29778 // Usually used to find out which window an event corresponds to.
29779 // If you connect to an event signal on @text_view, this function
29780 // should be called on <literal>event-&gt;window</literal> to
29781 // see which window it was.
29782 // RETURNS: the window type.
29783 // <window>: a window type
29784 TextWindowType get_window_type()(Gdk2.Window* window) {
29785 return gtk_text_view_get_window_type(&this, window);
29788 // Gets the line wrapping for the view.
29789 // RETURNS: the line wrap setting
29790 WrapMode get_wrap_mode()() {
29791 return gtk_text_view_get_wrap_mode(&this);
29794 // VERSION: 2.22
29795 // Allow the #GtkTextView input method to internally handle key press
29796 // and release events. If this function returns %TRUE, then no further
29797 // processing should be done for this key event. See
29798 // gtk_im_context_filter_keypress().
29799 // Note that you are expected to call this function from your handler
29800 // when overriding key event handling. This is needed in the case when
29801 // you need to insert your own key handling between the input method
29802 // and the default key event handling of the #GtkTextView.
29803 // |[
29804 // static gboolean
29805 // gtk_foo_bar_key_press_event (GtkWidget *widget,
29806 // GdkEventKey *event)
29807 // {
29808 // if ((key->keyval == GDK_Return || key->keyval == GDK_KP_Enter))
29809 // {
29810 // if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (view), event))
29811 // return TRUE;
29812 // }
29813 // /&ast; Do some stuff &ast;/
29814 // return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event);
29815 // }
29816 // ]|
29817 // RETURNS: %TRUE if the input method handled the key event.
29818 // <event>: the key event
29819 int im_context_filter_keypress()(Gdk2.EventKey* event) {
29820 return gtk_text_view_im_context_filter_keypress(&this, event);
29823 // Updates the position of a child, as for gtk_text_view_add_child_in_window().
29824 // <child>: child widget already added to the text view
29825 // <xpos>: new X position in window coordinates
29826 // <ypos>: new Y position in window coordinates
29827 void move_child()(Widget* child, int xpos, int ypos) {
29828 gtk_text_view_move_child(&this, child, xpos, ypos);
29831 // Moves a mark within the buffer so that it's
29832 // located within the currently-visible text area.
29833 // RETURNS: %TRUE if the mark moved (wasn't already onscreen)
29834 // <mark>: a #GtkTextMark
29835 int move_mark_onscreen()(TextMark* mark) {
29836 return gtk_text_view_move_mark_onscreen(&this, mark);
29839 // Move the iterator a given number of characters visually, treating
29840 // it as the strong cursor position. If @count is positive, then the
29841 // new strong cursor position will be @count positions to the right of
29842 // the old cursor position. If @count is negative then the new strong
29843 // cursor position will be @count positions to the left of the old
29844 // cursor position.
29845 // In the presence of bi-directional text, the correspondence
29846 // between logical and visual order will depend on the direction
29847 // of the current run, and there may be jumps when the cursor
29848 // is moved off of the end of a run.
29849 // RETURNS: %TRUE if @iter moved and is not on the end iterator
29850 // <iter>: a #GtkTextIter
29851 // <count>: number of characters to move (negative moves left, positive moves right)
29852 int move_visually()(TextIter* iter, int count) {
29853 return gtk_text_view_move_visually(&this, iter, count);
29856 // Moves the cursor to the currently visible region of the
29857 // buffer, it it isn't there already.
29858 // RETURNS: %TRUE if the cursor had to be moved.
29859 int place_cursor_onscreen()() {
29860 return gtk_text_view_place_cursor_onscreen(&this);
29863 // VERSION: 2.22
29864 // Reset the input method context of the text view if needed.
29865 // This can be necessary in the case where modifying the buffer
29866 // would confuse on-going input method behavior.
29867 void reset_im_context()() {
29868 gtk_text_view_reset_im_context(&this);
29871 // Scrolls @text_view the minimum distance such that @mark is contained
29872 // within the visible area of the widget.
29873 // <mark>: a mark in the buffer for @text_view
29874 void scroll_mark_onscreen()(TextMark* mark) {
29875 gtk_text_view_scroll_mark_onscreen(&this, mark);
29878 // Scrolls @text_view so that @iter is on the screen in the position
29879 // indicated by @xalign and @yalign. An alignment of 0.0 indicates
29880 // left or top, 1.0 indicates right or bottom, 0.5 means center.
29881 // If @use_align is %FALSE, the text scrolls the minimal distance to
29882 // get the mark onscreen, possibly not scrolling at all. The effective
29883 // screen for purposes of this function is reduced by a margin of size
29884 // Note that this function uses the currently-computed height of the
29885 // lines in the text buffer. Line heights are computed in an idle
29886 // handler; so this function may not have the desired effect if it's
29887 // called before the height computations. To avoid oddness, consider
29888 // using gtk_text_view_scroll_to_mark() which saves a point to be
29889 // scrolled to after line validation.
29890 // RETURNS: %TRUE if scrolling occurred
29891 // <iter>: a #GtkTextIter
29892 // <within_margin>: margin as a [0.0,0.5) fraction of screen size
29893 // <use_align>: whether to use alignment arguments (if %FALSE, just get the mark onscreen)
29894 // <xalign>: horizontal alignment of mark within visible area
29895 // <yalign>: vertical alignment of mark within visible area
29896 int scroll_to_iter()(TextIter* iter, double within_margin, int use_align, double xalign, double yalign) {
29897 return gtk_text_view_scroll_to_iter(&this, iter, within_margin, use_align, xalign, yalign);
29900 // Scrolls @text_view so that @mark is on the screen in the position
29901 // indicated by @xalign and @yalign. An alignment of 0.0 indicates
29902 // left or top, 1.0 indicates right or bottom, 0.5 means center.
29903 // If @use_align is %FALSE, the text scrolls the minimal distance to
29904 // get the mark onscreen, possibly not scrolling at all. The effective
29905 // screen for purposes of this function is reduced by a margin of size
29906 // <mark>: a #GtkTextMark
29907 // <within_margin>: margin as a [0.0,0.5) fraction of screen size
29908 // <use_align>: whether to use alignment arguments (if %FALSE, just get the mark onscreen)
29909 // <xalign>: horizontal alignment of mark within visible area
29910 // <yalign>: vertical alignment of mark within visible area
29911 void scroll_to_mark()(TextMark* mark, double within_margin, int use_align, double xalign, double yalign) {
29912 gtk_text_view_scroll_to_mark(&this, mark, within_margin, use_align, xalign, yalign);
29915 // VERSION: 2.4
29916 // Sets the behavior of the text widget when the Tab key is pressed.
29917 // If @accepts_tab is %TRUE, a tab character is inserted. If @accepts_tab
29918 // is %FALSE the keyboard focus is moved to the next widget in the focus
29919 // chain.
29920 // <accepts_tab>: %TRUE if pressing the Tab key should insert a tab character, %FALSE, if pressing the Tab key should move the keyboard focus.
29921 void set_accepts_tab()(int accepts_tab) {
29922 gtk_text_view_set_accepts_tab(&this, accepts_tab);
29925 // Sets the width of %GTK_TEXT_WINDOW_LEFT or %GTK_TEXT_WINDOW_RIGHT,
29926 // or the height of %GTK_TEXT_WINDOW_TOP or %GTK_TEXT_WINDOW_BOTTOM.
29927 // Automatically destroys the corresponding window if the size is set
29928 // to 0, and creates the window if the size is set to non-zero. This
29929 // function can only be used for the "border windows," it doesn't work
29930 // with #GTK_TEXT_WINDOW_WIDGET, #GTK_TEXT_WINDOW_TEXT, or
29931 // #GTK_TEXT_WINDOW_PRIVATE.
29932 // <type>: window to affect
29933 // <size>: width or height of the window
29934 void set_border_window_size()(TextWindowType type, int size) {
29935 gtk_text_view_set_border_window_size(&this, type, size);
29938 // Sets @buffer as the buffer being displayed by @text_view. The previous
29939 // buffer displayed by the text view is unreferenced, and a reference is
29940 // added to @buffer. If you owned a reference to @buffer before passing it
29941 // to this function, you must remove that reference yourself; #GtkTextView
29942 // will not "adopt" it.
29943 // <buffer>: a #GtkTextBuffer
29944 void set_buffer()(TextBuffer* buffer=null) {
29945 gtk_text_view_set_buffer(&this, buffer);
29948 // Toggles whether the insertion point is displayed. A buffer with no editable
29949 // text probably shouldn't have a visible cursor, so you may want to turn
29950 // the cursor off.
29951 // <setting>: whether to show the insertion cursor
29952 void set_cursor_visible()(int setting) {
29953 gtk_text_view_set_cursor_visible(&this, setting);
29956 // Sets the default editability of the #GtkTextView. You can override
29957 // this default setting with tags in the buffer, using the "editable"
29958 // attribute of tags.
29959 // <setting>: whether it's editable
29960 void set_editable()(int setting) {
29961 gtk_text_view_set_editable(&this, setting);
29964 // Sets the default indentation for paragraphs in @text_view.
29965 // Tags in the buffer may override the default.
29966 // <indent>: indentation in pixels
29967 void set_indent()(int indent) {
29968 gtk_text_view_set_indent(&this, indent);
29971 // Sets the default justification of text in @text_view.
29972 // Tags in the view's buffer may override the default.
29973 // <justification>: justification
29974 void set_justification()(Justification justification) {
29975 gtk_text_view_set_justification(&this, justification);
29978 // Sets the default left margin for text in @text_view.
29979 // Tags in the buffer may override the default.
29980 // <left_margin>: left margin in pixels
29981 void set_left_margin()(int left_margin) {
29982 gtk_text_view_set_left_margin(&this, left_margin);
29985 // VERSION: 2.4
29986 // Changes the #GtkTextView overwrite mode.
29987 // <overwrite>: %TRUE to turn on overwrite mode, %FALSE to turn it off
29988 void set_overwrite()(int overwrite) {
29989 gtk_text_view_set_overwrite(&this, overwrite);
29992 // Sets the default number of blank pixels above paragraphs in @text_view.
29993 // Tags in the buffer for @text_view may override the defaults.
29994 // <pixels_above_lines>: pixels above paragraphs
29995 void set_pixels_above_lines()(int pixels_above_lines) {
29996 gtk_text_view_set_pixels_above_lines(&this, pixels_above_lines);
29999 // Sets the default number of pixels of blank space
30000 // to put below paragraphs in @text_view. May be overridden
30001 // by tags applied to @text_view's buffer.
30002 // <pixels_below_lines>: pixels below paragraphs
30003 void set_pixels_below_lines()(int pixels_below_lines) {
30004 gtk_text_view_set_pixels_below_lines(&this, pixels_below_lines);
30007 // Sets the default number of pixels of blank space to leave between
30008 // display/wrapped lines within a paragraph. May be overridden by
30009 // tags in @text_view's buffer.
30010 // <pixels_inside_wrap>: default number of pixels between wrapped lines
30011 void set_pixels_inside_wrap()(int pixels_inside_wrap) {
30012 gtk_text_view_set_pixels_inside_wrap(&this, pixels_inside_wrap);
30015 // Sets the default right margin for text in the text view.
30016 // Tags in the buffer may override the default.
30017 // <right_margin>: right margin in pixels
30018 void set_right_margin()(int right_margin) {
30019 gtk_text_view_set_right_margin(&this, right_margin);
30022 // Sets the default tab stops for paragraphs in @text_view.
30023 // Tags in the buffer may override the default.
30024 // <tabs>: tabs as a #PangoTabArray
30025 void set_tabs()(Pango.TabArray* tabs) {
30026 gtk_text_view_set_tabs(&this, tabs);
30029 // Sets the line wrapping for the view.
30030 // <wrap_mode>: a #GtkWrapMode
30031 void set_wrap_mode()(WrapMode wrap_mode) {
30032 gtk_text_view_set_wrap_mode(&this, wrap_mode);
30035 // Determines whether @iter is at the start of a display line.
30036 // See gtk_text_view_forward_display_line() for an explanation of
30037 // display lines vs. paragraphs.
30038 // RETURNS: %TRUE if @iter begins a wrapped line
30039 // <iter>: a #GtkTextIter
30040 int starts_display_line()(TextIter* iter) {
30041 return gtk_text_view_starts_display_line(&this, iter);
30044 // Converts coordinates on the window identified by @win to buffer
30045 // coordinates, storing the result in (@buffer_x,@buffer_y).
30046 // Note that you can't convert coordinates for a nonexisting window (see
30047 // gtk_text_view_set_border_window_size()).
30048 // <win>: a #GtkTextWindowType except #GTK_TEXT_WINDOW_PRIVATE
30049 // <window_x>: window x coordinate
30050 // <window_y>: window y coordinate
30051 // <buffer_x>: buffer x coordinate return location or %NULL
30052 // <buffer_y>: buffer y coordinate return location or %NULL
30053 void window_to_buffer_coords()(TextWindowType win, int window_x, int window_y, /*out*/ int* buffer_x=null, /*out*/ int* buffer_y=null) {
30054 gtk_text_view_window_to_buffer_coords(&this, win, window_x, window_y, buffer_x, buffer_y);
30057 // The ::backspace signal is a
30058 // <link linkend="keybinding-signals">keybinding signal</link>
30059 // which gets emitted when the user asks for it.
30060 // The default bindings for this signal are
30061 // Backspace and Shift-Backspace.
30062 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_backspace;
30064 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30065 return super_.signal_connect!name(cb, data, cf);
30068 ulong signal_connect(string name:"backspace", CB:signal_backspace)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30069 return signal_connect_data!()(&this, cast(char*)"backspace",
30070 cast(GObject2.Callback)cb, data, null, cf);
30073 // The ::copy-clipboard signal is a
30074 // <link linkend="keybinding-signals">keybinding signal</link>
30075 // which gets emitted to copy the selection to the clipboard.
30076 // The default bindings for this signal are
30077 // Ctrl-c and Ctrl-Insert.
30078 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_copy_clipboard;
30079 ulong signal_connect(string name:"copy-clipboard", CB:signal_copy_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30080 return signal_connect_data!()(&this, cast(char*)"copy-clipboard",
30081 cast(GObject2.Callback)cb, data, null, cf);
30084 // The ::cut-clipboard signal is a
30085 // <link linkend="keybinding-signals">keybinding signal</link>
30086 // which gets emitted to cut the selection to the clipboard.
30087 // The default bindings for this signal are
30088 // Ctrl-x and Shift-Delete.
30089 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_cut_clipboard;
30090 ulong signal_connect(string name:"cut-clipboard", CB:signal_cut_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30091 return signal_connect_data!()(&this, cast(char*)"cut-clipboard",
30092 cast(GObject2.Callback)cb, data, null, cf);
30095 // The ::delete-from-cursor signal is a
30096 // <link linkend="keybinding-signals">keybinding signal</link>
30097 // which gets emitted when the user initiates a text deletion.
30098 // If the @type is %GTK_DELETE_CHARS, GTK+ deletes the selection
30099 // if there is one, otherwise it deletes the requested number
30100 // of characters.
30101 // The default bindings for this signal are
30102 // Delete for deleting a character, Ctrl-Delete for
30103 // deleting a word and Ctrl-Backspace for deleting a word
30104 // backwords.
30105 // <type>: the granularity of the deletion, as a #GtkDeleteType
30106 // <count>: the number of @type units to delete
30107 extern (C) alias static void function (TextView* this_, DeleteType* type, int count, void* user_data=null) signal_delete_from_cursor;
30108 ulong signal_connect(string name:"delete-from-cursor", CB:signal_delete_from_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30109 return signal_connect_data!()(&this, cast(char*)"delete-from-cursor",
30110 cast(GObject2.Callback)cb, data, null, cf);
30113 // The ::insert-at-cursor signal is a
30114 // <link linkend="keybinding-signals">keybinding signal</link>
30115 // which gets emitted when the user initiates the insertion of a
30116 // fixed string at the cursor.
30117 // This signal has no default bindings.
30118 // <string>: the string to insert
30119 extern (C) alias static void function (TextView* this_, char* string_, void* user_data=null) signal_insert_at_cursor;
30120 ulong signal_connect(string name:"insert-at-cursor", CB:signal_insert_at_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30121 return signal_connect_data!()(&this, cast(char*)"insert-at-cursor",
30122 cast(GObject2.Callback)cb, data, null, cf);
30125 // The ::move-cursor signal is a
30126 // <link linkend="keybinding-signals">keybinding signal</link>
30127 // which gets emitted when the user initiates a cursor movement.
30128 // If the cursor is not visible in @text_view, this signal causes
30129 // the viewport to be moved instead.
30130 // Applications should not connect to it, but may emit it with
30131 // g_signal_emit_by_name() if they need to control the cursor
30132 // programmatically.
30133 // The default bindings for this signal come in two variants,
30134 // the variant with the Shift modifier extends the selection,
30135 // the variant without the Shift modifer does not.
30136 // There are too many key combinations to list them all here.
30137 // <itemizedlist>
30138 // <listitem>Arrow keys move by individual characters/lines</listitem>
30139 // <listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
30140 // <listitem>Home/End keys move to the ends of the buffer</listitem>
30141 // <listitem>PageUp/PageDown keys move vertically by pages</listitem>
30142 // <listitem>Ctrl-PageUp/PageDown keys move horizontally by pages</listitem>
30143 // </itemizedlist>
30144 // <step>: the granularity of the move, as a #GtkMovementStep
30145 // <count>: the number of @step units to move
30146 // <extend_selection>: %TRUE if the move should extend the selection
30147 extern (C) alias static void function (TextView* this_, MovementStep* step, int count, c_int extend_selection, void* user_data=null) signal_move_cursor;
30148 ulong signal_connect(string name:"move-cursor", CB:signal_move_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30149 return signal_connect_data!()(&this, cast(char*)"move-cursor",
30150 cast(GObject2.Callback)cb, data, null, cf);
30153 // The ::move-viewport signal is a
30154 // <link linkend="keybinding-signals">keybinding signal</link>
30155 // which can be bound to key combinations to allow the user
30156 // to move the viewport, i.e. change what part of the text view
30157 // is visible in a containing scrolled window.
30158 // There are no default bindings for this signal.
30159 // <step>: the granularity of the move, as a #GtkMovementStep
30160 // <count>: the number of @step units to move
30161 extern (C) alias static void function (TextView* this_, ScrollStep* step, int count, void* user_data=null) signal_move_viewport;
30162 ulong signal_connect(string name:"move-viewport", CB:signal_move_viewport)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30163 return signal_connect_data!()(&this, cast(char*)"move-viewport",
30164 cast(GObject2.Callback)cb, data, null, cf);
30167 // The ::page-horizontally signal is a
30168 // <link linkend="keybinding-signals">keybinding signal</link>
30169 // which can be bound to key combinations to allow the user
30170 // to initiate horizontal cursor movement by pages.
30171 // This signal should not be used anymore, instead use the
30172 // #GtkTextview::move-cursor signal with the #GTK_MOVEMENT_HORIZONTAL_PAGES
30173 // granularity.
30174 // <count>: the number of @step units to move
30175 // <extend_selection>: %TRUE if the move should extend the selection
30176 extern (C) alias static void function (TextView* this_, int count, c_int extend_selection, void* user_data=null) signal_page_horizontally;
30177 ulong signal_connect(string name:"page-horizontally", CB:signal_page_horizontally)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30178 return signal_connect_data!()(&this, cast(char*)"page-horizontally",
30179 cast(GObject2.Callback)cb, data, null, cf);
30182 // The ::paste-clipboard signal is a
30183 // <link linkend="keybinding-signals">keybinding signal</link>
30184 // which gets emitted to paste the contents of the clipboard
30185 // into the text view.
30186 // The default bindings for this signal are
30187 // Ctrl-v and Shift-Insert.
30188 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_paste_clipboard;
30189 ulong signal_connect(string name:"paste-clipboard", CB:signal_paste_clipboard)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30190 return signal_connect_data!()(&this, cast(char*)"paste-clipboard",
30191 cast(GObject2.Callback)cb, data, null, cf);
30194 // The ::populate-popup signal gets emitted before showing the
30195 // context menu of the text view.
30196 // If you need to add items to the context menu, connect
30197 // to this signal and append your menuitems to the @menu.
30198 // <menu>: the menu that is being populated
30199 extern (C) alias static void function (TextView* this_, Menu* menu, void* user_data=null) signal_populate_popup;
30200 ulong signal_connect(string name:"populate-popup", CB:signal_populate_popup)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30201 return signal_connect_data!()(&this, cast(char*)"populate-popup",
30202 cast(GObject2.Callback)cb, data, null, cf);
30205 // VERSION: 2.20
30206 // If an input method is used, the typed text will not immediately
30207 // be committed to the buffer. So if you are interested in the text,
30208 // connect to this signal.
30209 // This signal is only emitted if the text at the given position
30210 // is actually editable.
30211 // <preedit>: the current preedit string
30212 extern (C) alias static void function (TextView* this_, char* preedit, void* user_data=null) signal_preedit_changed;
30213 ulong signal_connect(string name:"preedit-changed", CB:signal_preedit_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30214 return signal_connect_data!()(&this, cast(char*)"preedit-changed",
30215 cast(GObject2.Callback)cb, data, null, cf);
30218 // The ::select-all signal is a
30219 // <link linkend="keybinding-signals">keybinding signal</link>
30220 // which gets emitted to select or unselect the complete
30221 // contents of the text view.
30222 // The default bindings for this signal are Ctrl-a and Ctrl-/
30223 // for selecting and Shift-Ctrl-a and Ctrl-\ for unselecting.
30224 // <select>: %TRUE to select, %FALSE to unselect
30225 extern (C) alias static void function (TextView* this_, c_int select, void* user_data=null) signal_select_all;
30226 ulong signal_connect(string name:"select-all", CB:signal_select_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30227 return signal_connect_data!()(&this, cast(char*)"select-all",
30228 cast(GObject2.Callback)cb, data, null, cf);
30231 // The ::set-anchor signal is a
30232 // <link linkend="keybinding-signals">keybinding signal</link>
30233 // which gets emitted when the user initiates setting the "anchor"
30234 // mark. The "anchor" mark gets placed at the same position as the
30235 // "insert" mark.
30236 // This signal has no default bindings.
30237 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_set_anchor;
30238 ulong signal_connect(string name:"set-anchor", CB:signal_set_anchor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30239 return signal_connect_data!()(&this, cast(char*)"set-anchor",
30240 cast(GObject2.Callback)cb, data, null, cf);
30243 // Set the scroll adjustments for the text view. Usually scrolled containers
30244 // like #GtkScrolledWindow will emit this signal to connect two instances
30245 // of #GtkScrollbar to the scroll directions of the #GtkTextView.
30246 extern (C) alias static void function (TextView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
30247 ulong signal_connect(string name:"set-scroll-adjustments", CB:signal_set_scroll_adjustments)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30248 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
30249 cast(GObject2.Callback)cb, data, null, cf);
30252 // The ::toggle-cursor-visible signal is a
30253 // <link linkend="keybinding-signals">keybinding signal</link>
30254 // which gets emitted to toggle the visibility of the cursor.
30255 // The default binding for this signal is F7.
30256 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_toggle_cursor_visible;
30257 ulong signal_connect(string name:"toggle-cursor-visible", CB:signal_toggle_cursor_visible)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30258 return signal_connect_data!()(&this, cast(char*)"toggle-cursor-visible",
30259 cast(GObject2.Callback)cb, data, null, cf);
30262 // The ::toggle-overwrite signal is a
30263 // <link linkend="keybinding-signals">keybinding signal</link>
30264 // which gets emitted to toggle the overwrite mode of the text view.
30265 // The default bindings for this signal is Insert.
30266 extern (C) alias static void function (TextView* this_, void* user_data=null) signal_toggle_overwrite;
30267 ulong signal_connect(string name:"toggle-overwrite", CB:signal_toggle_overwrite)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30268 return signal_connect_data!()(&this, cast(char*)"toggle-overwrite",
30269 cast(GObject2.Callback)cb, data, null, cf);
30273 struct TextViewClass {
30274 ContainerClass parent_class;
30275 extern (C) void function (TextView* text_view, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
30276 extern (C) void function (TextView* text_view, Menu* menu) populate_popup;
30277 extern (C) void function (TextView* text_view, MovementStep step, int count, int extend_selection) move_cursor;
30278 extern (C) void function (TextView* text_view, int count, int extend_selection) page_horizontally;
30279 extern (C) void function (TextView* text_view) set_anchor;
30280 extern (C) void function (TextView* text_view, char* str) insert_at_cursor;
30281 extern (C) void function (TextView* text_view, DeleteType type, int count) delete_from_cursor;
30282 extern (C) void function (TextView* text_view) backspace;
30283 extern (C) void function (TextView* text_view) cut_clipboard;
30284 extern (C) void function (TextView* text_view) copy_clipboard;
30285 extern (C) void function (TextView* text_view) paste_clipboard;
30286 extern (C) void function (TextView* text_view) toggle_overwrite;
30287 extern (C) void function (TextView* text_view, DirectionType direction) move_focus;
30288 extern (C) void function () _gtk_reserved1;
30289 extern (C) void function () _gtk_reserved2;
30290 extern (C) void function () _gtk_reserved3;
30291 extern (C) void function () _gtk_reserved4;
30292 extern (C) void function () _gtk_reserved5;
30293 extern (C) void function () _gtk_reserved6;
30294 extern (C) void function () _gtk_reserved7;
30297 struct TextWindow {
30300 enum TextWindowType {
30301 PRIVATE = 0,
30302 WIDGET = 1,
30303 TEXT = 2,
30304 LEFT = 3,
30305 RIGHT = 4,
30306 TOP = 5,
30307 BOTTOM = 6
30309 struct ThemeEngine {
30312 struct TipsQuery /* : Label */ {
30313 mixin Atk.ImplementorIface.__interface__;
30314 mixin Buildable.__interface__;
30315 alias label this;
30316 alias label super_;
30317 Label label;
30318 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
30319 uint, "emit_always", 1,
30320 uint, "in_query", 1,
30321 uint, "__dummy32A", 30));
30322 char* label_inactive, label_no_tip;
30323 Widget* caller, last_crossed;
30324 Gdk2.Cursor* query_cursor;
30326 static TipsQuery* new_()() {
30327 return gtk_tips_query_new();
30329 void set_caller()(Widget* caller) {
30330 gtk_tips_query_set_caller(&this, caller);
30332 void set_labels()(char* label_inactive, char* label_no_tip) {
30333 gtk_tips_query_set_labels(&this, label_inactive, label_no_tip);
30335 void start_query()() {
30336 gtk_tips_query_start_query(&this);
30338 void stop_query()() {
30339 gtk_tips_query_stop_query(&this);
30341 extern (C) alias static void function (TipsQuery* this_, void* user_data=null) signal_start_query;
30343 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30344 return super_.signal_connect!name(cb, data, cf);
30347 ulong signal_connect(string name:"start-query", CB:signal_start_query)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30348 return signal_connect_data!()(&this, cast(char*)"start-query",
30349 cast(GObject2.Callback)cb, data, null, cf);
30351 extern (C) alias static void function (TipsQuery* this_, void* user_data=null) signal_stop_query;
30352 ulong signal_connect(string name:"stop-query", CB:signal_stop_query)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30353 return signal_connect_data!()(&this, cast(char*)"stop-query",
30354 cast(GObject2.Callback)cb, data, null, cf);
30356 extern (C) alias static void function (TipsQuery* this_, Widget* object, char* p0, char* p1, void* user_data=null) signal_widget_entered;
30357 ulong signal_connect(string name:"widget-entered", CB:signal_widget_entered)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30358 return signal_connect_data!()(&this, cast(char*)"widget-entered",
30359 cast(GObject2.Callback)cb, data, null, cf);
30361 extern (C) alias static c_int function (TipsQuery* this_, Widget* object, char* p0, char* p1, Gdk2.Event* p2, void* user_data=null) signal_widget_selected;
30362 ulong signal_connect(string name:"widget-selected", CB:signal_widget_selected)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30363 return signal_connect_data!()(&this, cast(char*)"widget-selected",
30364 cast(GObject2.Callback)cb, data, null, cf);
30368 struct TipsQueryClass {
30369 LabelClass parent_class;
30370 extern (C) void function (TipsQuery* tips_query) start_query;
30371 extern (C) void function (TipsQuery* tips_query) stop_query;
30372 extern (C) void function (TipsQuery* tips_query, Widget* widget, char* tip_text, char* tip_private) widget_entered;
30373 extern (C) int function (TipsQuery* tips_query, Widget* widget, char* tip_text, char* tip_private, Gdk2.EventButton* event) widget_selected;
30374 extern (C) void function () _gtk_reserved1;
30375 extern (C) void function () _gtk_reserved2;
30376 extern (C) void function () _gtk_reserved3;
30377 extern (C) void function () _gtk_reserved4;
30380 struct ToggleAction /* : Action */ {
30381 mixin Buildable.__interface__;
30382 alias parent this;
30383 alias parent super_;
30384 alias parent action;
30385 Action parent;
30386 private ToggleActionPrivate* private_data;
30389 // VERSION: 2.4
30390 // Creates a new #GtkToggleAction object. To add the action to
30391 // a #GtkActionGroup and set the accelerator for the action,
30392 // call gtk_action_group_add_action_with_accel().
30393 // RETURNS: a new #GtkToggleAction
30394 // <name>: A unique name for the action
30395 // <label>: The label displayed in menu items and on buttons, or %NULL
30396 // <tooltip>: A tooltip for the action, or %NULL
30397 // <stock_id>: The stock icon to display in widgets representing the action, or %NULL
30398 static ToggleAction* /*new*/ new_()(char* name, char* label, char* tooltip, char* stock_id) {
30399 return gtk_toggle_action_new(name, label, tooltip, stock_id);
30402 // VERSION: 2.4
30403 // Returns the checked state of the toggle action.
30404 // RETURNS: the checked state of the toggle action
30405 int get_active()() {
30406 return gtk_toggle_action_get_active(&this);
30409 // VERSION: 2.4
30410 // Returns whether the action should have proxies like a radio action.
30411 // RETURNS: whether the action should have proxies like a radio action.
30412 int get_draw_as_radio()() {
30413 return gtk_toggle_action_get_draw_as_radio(&this);
30416 // VERSION: 2.4
30417 // Sets the checked state on the toggle action.
30418 // <is_active>: whether the action should be checked or not
30419 void set_active()(int is_active) {
30420 gtk_toggle_action_set_active(&this, is_active);
30423 // VERSION: 2.4
30424 // Sets whether the action should have proxies like a radio action.
30425 // <draw_as_radio>: whether the action should have proxies like a radio action
30426 void set_draw_as_radio()(int draw_as_radio) {
30427 gtk_toggle_action_set_draw_as_radio(&this, draw_as_radio);
30430 // VERSION: 2.4
30431 // Emits the "toggled" signal on the toggle action.
30432 void toggled()() {
30433 gtk_toggle_action_toggled(&this);
30435 extern (C) alias static void function (ToggleAction* this_, void* user_data=null) signal_toggled;
30437 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30438 return super_.signal_connect!name(cb, data, cf);
30441 ulong signal_connect(string name:"toggled", CB:signal_toggled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30442 return signal_connect_data!()(&this, cast(char*)"toggled",
30443 cast(GObject2.Callback)cb, data, null, cf);
30447 struct ToggleActionClass {
30448 ActionClass parent_class;
30449 extern (C) void function (ToggleAction* action) toggled;
30450 extern (C) void function () _gtk_reserved1;
30451 extern (C) void function () _gtk_reserved2;
30452 extern (C) void function () _gtk_reserved3;
30453 extern (C) void function () _gtk_reserved4;
30456 struct ToggleActionEntry {
30457 char* name, stock_id, label, accelerator, tooltip;
30458 GObject2.Callback callback;
30459 int is_active;
30462 struct ToggleActionPrivate {
30465 struct ToggleButton /* : Button */ {
30466 mixin Atk.ImplementorIface.__interface__;
30467 mixin Activatable.__interface__;
30468 mixin Buildable.__interface__;
30469 alias button this;
30470 alias button super_;
30471 Button button;
30472 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
30473 uint, "active", 1,
30474 uint, "draw_indicator", 1,
30475 uint, "inconsistent", 1,
30476 uint, "__dummy32A", 29));
30478 static ToggleButton* new_()() {
30479 return gtk_toggle_button_new();
30481 static ToggleButton* new_with_label()(char* label) {
30482 return gtk_toggle_button_new_with_label(label);
30485 // Creates a new #GtkToggleButton containing a label. The label
30486 // will be created using gtk_label_new_with_mnemonic(), so underscores
30487 // in @label indicate the mnemonic for the button.
30488 // RETURNS: a new #GtkToggleButton
30489 // <label>: the text of the button, with an underscore in front of the mnemonic character
30490 static ToggleButton* new_with_mnemonic()(char* label) {
30491 return gtk_toggle_button_new_with_mnemonic(label);
30493 int get_active()() {
30494 return gtk_toggle_button_get_active(&this);
30497 // Gets the value set by gtk_toggle_button_set_inconsistent().
30498 // RETURNS: %TRUE if the button is displayed as inconsistent, %FALSE otherwise
30499 int get_inconsistent()() {
30500 return gtk_toggle_button_get_inconsistent(&this);
30503 // Retrieves whether the button is displayed as a separate indicator
30504 // and label. See gtk_toggle_button_set_mode().
30505 // and label.
30506 // RETURNS: %TRUE if the togglebutton is drawn as a separate indicator
30507 int get_mode()() {
30508 return gtk_toggle_button_get_mode(&this);
30510 void set_active()(int is_active) {
30511 gtk_toggle_button_set_active(&this, is_active);
30514 // If the user has selected a range of elements (such as some text or
30515 // spreadsheet cells) that are affected by a toggle button, and the
30516 // current values in that range are inconsistent, you may want to
30517 // display the toggle in an "in between" state. This function turns on
30518 // "in between" display. Normally you would turn off the inconsistent
30519 // state again if the user toggles the toggle button. This has to be
30520 // done manually, gtk_toggle_button_set_inconsistent() only affects
30521 // visual appearance, it doesn't affect the semantics of the button.
30522 // <setting>: %TRUE if state is inconsistent
30523 void set_inconsistent()(int setting) {
30524 gtk_toggle_button_set_inconsistent(&this, setting);
30527 // Sets whether the button is displayed as a separate indicator and label.
30528 // You can call this function on a checkbutton or a radiobutton with
30529 // This function only affects instances of classes like #GtkCheckButton
30530 // and #GtkRadioButton that derive from #GtkToggleButton,
30531 // not instances of #GtkToggleButton itself.
30532 // <draw_indicator>: if %TRUE, draw the button as a separate indicator and label; if %FALSE, draw the button like a normal button
30533 void set_mode()(int draw_indicator) {
30534 gtk_toggle_button_set_mode(&this, draw_indicator);
30536 void toggled()() {
30537 gtk_toggle_button_toggled(&this);
30539 extern (C) alias static void function (ToggleButton* this_, void* user_data=null) signal_toggled;
30541 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30542 return super_.signal_connect!name(cb, data, cf);
30545 ulong signal_connect(string name:"toggled", CB:signal_toggled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30546 return signal_connect_data!()(&this, cast(char*)"toggled",
30547 cast(GObject2.Callback)cb, data, null, cf);
30551 struct ToggleButtonClass {
30552 ButtonClass parent_class;
30553 extern (C) void function (ToggleButton* toggle_button) toggled;
30554 extern (C) void function () _gtk_reserved1;
30555 extern (C) void function () _gtk_reserved2;
30556 extern (C) void function () _gtk_reserved3;
30557 extern (C) void function () _gtk_reserved4;
30560 struct ToggleToolButton /* : ToolButton */ {
30561 mixin Atk.ImplementorIface.__interface__;
30562 mixin Activatable.__interface__;
30563 mixin Buildable.__interface__;
30564 alias parent this;
30565 alias parent super_;
30566 alias parent toolbutton;
30567 ToolButton parent;
30568 private ToggleToolButtonPrivate* priv;
30571 // VERSION: 2.4
30572 // Returns a new #GtkToggleToolButton
30573 // RETURNS: a newly created #GtkToggleToolButton
30574 static ToggleToolButton* new_()() {
30575 return gtk_toggle_tool_button_new();
30578 // VERSION: 2.4
30579 // Creates a new #GtkToggleToolButton containing the image and text from a
30580 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
30581 // and #GTK_STOCK_APPLY.
30582 // It is an error if @stock_id is not a name of a stock item.
30583 // RETURNS: A new #GtkToggleToolButton
30584 // <stock_id>: the name of the stock item
30585 static ToggleToolButton* new_from_stock()(char* stock_id) {
30586 return gtk_toggle_tool_button_new_from_stock(stock_id);
30589 // VERSION: 2.4
30590 // Queries a #GtkToggleToolButton and returns its current state.
30591 // Returns %TRUE if the toggle button is pressed in and %FALSE if it is raised.
30592 // RETURNS: %TRUE if the toggle tool button is pressed in, %FALSE if not
30593 int get_active()() {
30594 return gtk_toggle_tool_button_get_active(&this);
30597 // VERSION: 2.4
30598 // Sets the status of the toggle tool button. Set to %TRUE if you
30599 // want the GtkToggleButton to be 'pressed in', and %FALSE to raise it.
30600 // This action causes the toggled signal to be emitted.
30601 // <is_active>: whether @button should be active
30602 void set_active()(int is_active) {
30603 gtk_toggle_tool_button_set_active(&this, is_active);
30605 // Emitted whenever the toggle tool button changes state.
30606 extern (C) alias static void function (ToggleToolButton* this_, void* user_data=null) signal_toggled;
30608 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30609 return super_.signal_connect!name(cb, data, cf);
30612 ulong signal_connect(string name:"toggled", CB:signal_toggled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30613 return signal_connect_data!()(&this, cast(char*)"toggled",
30614 cast(GObject2.Callback)cb, data, null, cf);
30618 struct ToggleToolButtonClass {
30619 ToolButtonClass parent_class;
30620 extern (C) void function (ToggleToolButton* button) toggled;
30621 extern (C) void function () _gtk_reserved1;
30622 extern (C) void function () _gtk_reserved2;
30623 extern (C) void function () _gtk_reserved3;
30624 extern (C) void function () _gtk_reserved4;
30627 struct ToggleToolButtonPrivate {
30630 struct ToolButton /* : ToolItem */ {
30631 mixin Atk.ImplementorIface.__interface__;
30632 mixin Activatable.__interface__;
30633 mixin Buildable.__interface__;
30634 alias parent this;
30635 alias parent super_;
30636 alias parent toolitem;
30637 ToolItem parent;
30638 private ToolButtonPrivate* priv;
30641 // VERSION: 2.4
30642 // Creates a new %GtkToolButton using @icon_widget as icon and @label as
30643 // label.
30644 // RETURNS: A new #GtkToolButton
30645 // <icon_widget>: a #GtkMisc widget that will be used as icon widget, or %NULL
30646 // <label>: a string that will be used as label, or %NULL
30647 static ToolButton* new_()(Widget* icon_widget=null, char* label=null) {
30648 return gtk_tool_button_new(icon_widget, label);
30651 // VERSION: 2.4
30652 // Creates a new #GtkToolButton containing the image and text from a
30653 // stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK
30654 // and #GTK_STOCK_APPLY.
30655 // It is an error if @stock_id is not a name of a stock item.
30656 // RETURNS: A new #GtkToolButton
30657 // <stock_id>: the name of the stock item
30658 static ToolButton* new_from_stock()(char* stock_id) {
30659 return gtk_tool_button_new_from_stock(stock_id);
30662 // VERSION: 2.8
30663 // Returns the name of the themed icon for the tool button,
30664 // see gtk_tool_button_set_icon_name().
30665 // no themed icon
30666 // RETURNS: the icon name or %NULL if the tool button has
30667 char* get_icon_name()() {
30668 return gtk_tool_button_get_icon_name(&this);
30671 // VERSION: 2.4
30672 // Return the widget used as icon widget on @button.
30673 // See gtk_tool_button_set_icon_widget().
30674 // on @button, or %NULL.
30675 // RETURNS: The widget used as icon
30676 Widget* get_icon_widget()() {
30677 return gtk_tool_button_get_icon_widget(&this);
30680 // VERSION: 2.4
30681 // Returns the label used by the tool button, or %NULL if the tool button
30682 // doesn't have a label. or uses a the label from a stock item. The returned
30683 // string is owned by GTK+, and must not be modified or freed.
30684 // RETURNS: The label, or %NULL
30685 char* get_label()() {
30686 return gtk_tool_button_get_label(&this);
30689 // VERSION: 2.4
30690 // Returns the widget used as label on @button.
30691 // See gtk_tool_button_set_label_widget().
30692 // on @button, or %NULL.
30693 // RETURNS: The widget used as label
30694 Widget* get_label_widget()() {
30695 return gtk_tool_button_get_label_widget(&this);
30698 // VERSION: 2.4
30699 // Returns the name of the stock item. See gtk_tool_button_set_stock_id().
30700 // The returned string is owned by GTK+ and must not be freed or modifed.
30701 // RETURNS: the name of the stock item for @button.
30702 char* get_stock_id()() {
30703 return gtk_tool_button_get_stock_id(&this);
30706 // VERSION: 2.4
30707 // Returns whether underscores in the label property are used as mnemonics
30708 // on menu items on the overflow menu. See gtk_tool_button_set_use_underline().
30709 // mnemonics on menu items on the overflow menu.
30710 // RETURNS: %TRUE if underscores in the label property are used as
30711 int get_use_underline()() {
30712 return gtk_tool_button_get_use_underline(&this);
30715 // VERSION: 2.8
30716 // Sets the icon for the tool button from a named themed icon.
30717 // See the docs for #GtkIconTheme for more details.
30718 // The "icon_name" property only has an effect if not
30719 // overridden by non-%NULL "label", "icon_widget" and "stock_id"
30720 // properties.
30721 // <icon_name>: the name of the themed icon
30722 void set_icon_name()(char* icon_name=null) {
30723 gtk_tool_button_set_icon_name(&this, icon_name);
30726 // VERSION: 2.4
30727 // Sets @icon as the widget used as icon on @button. If @icon_widget is
30728 // %NULL the icon is determined by the "stock_id" property. If the
30729 // "stock_id" property is also %NULL, @button will not have an icon.
30730 // <icon_widget>: the widget used as icon, or %NULL
30731 void set_icon_widget()(Widget* icon_widget=null) {
30732 gtk_tool_button_set_icon_widget(&this, icon_widget);
30735 // VERSION: 2.4
30736 // Sets @label as the label used for the tool button. The "label" property
30737 // only has an effect if not overridden by a non-%NULL "label_widget" property.
30738 // If both the "label_widget" and "label" properties are %NULL, the label
30739 // is determined by the "stock_id" property. If the "stock_id" property is also
30740 // %NULL, @button will not have a label.
30741 // <label>: a string that will be used as label, or %NULL.
30742 void set_label()(char* label=null) {
30743 gtk_tool_button_set_label(&this, label);
30746 // VERSION: 2.4
30747 // Sets @label_widget as the widget that will be used as the label
30748 // for @button. If @label_widget is %NULL the "label" property is used
30749 // as label. If "label" is also %NULL, the label in the stock item
30750 // determined by the "stock_id" property is used as label. If
30751 // "stock_id" is also %NULL, @button does not have a label.
30752 // <label_widget>: the widget used as label, or %NULL
30753 void set_label_widget()(Widget* label_widget=null) {
30754 gtk_tool_button_set_label_widget(&this, label_widget);
30757 // VERSION: 2.4
30758 // Sets the name of the stock item. See gtk_tool_button_new_from_stock().
30759 // The stock_id property only has an effect if not
30760 // overridden by non-%NULL "label" and "icon_widget" properties.
30761 // <stock_id>: a name of a stock item, or %NULL
30762 void set_stock_id()(char* stock_id=null) {
30763 gtk_tool_button_set_stock_id(&this, stock_id);
30766 // VERSION: 2.4
30767 // If set, an underline in the label property indicates that the next character
30768 // should be used for the mnemonic accelerator key in the overflow menu. For
30769 // example, if the label property is "_Open" and @use_underline is %TRUE,
30770 // the label on the tool button will be "Open" and the item on the overflow
30771 // menu will have an underlined 'O'.
30772 // Labels shown on tool buttons never have mnemonics on them; this property
30773 // only affects the menu item on the overflow menu.
30774 // <use_underline>: whether the button label has the form "_Open"
30775 void set_use_underline()(int use_underline) {
30776 gtk_tool_button_set_use_underline(&this, use_underline);
30779 // This signal is emitted when the tool button is clicked with the mouse
30780 // or activated with the keyboard.
30781 extern (C) alias static void function (ToolButton* this_, void* user_data=null) signal_clicked;
30783 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30784 return super_.signal_connect!name(cb, data, cf);
30787 ulong signal_connect(string name:"clicked", CB:signal_clicked)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
30788 return signal_connect_data!()(&this, cast(char*)"clicked",
30789 cast(GObject2.Callback)cb, data, null, cf);
30793 struct ToolButtonClass {
30794 ToolItemClass parent_class;
30795 Type button_type;
30796 extern (C) void function (ToolButton* tool_item) clicked;
30797 extern (C) void function () _gtk_reserved1;
30798 extern (C) void function () _gtk_reserved2;
30799 extern (C) void function () _gtk_reserved3;
30800 extern (C) void function () _gtk_reserved4;
30803 struct ToolButtonPrivate {
30807 // #GtkToolItem<!-- -->s are widgets that can appear on a toolbar. To
30808 // create a toolbar item that contain something else than a button, use
30809 // gtk_tool_item_new(). Use gtk_container_add() to add a child
30810 // widget to the tool item.
30811 // For toolbar items that contain buttons, see the #GtkToolButton,
30812 // #GtkToggleToolButton and #GtkRadioToolButton classes.
30813 // See the #GtkToolbar class for a description of the toolbar widget, and
30814 // #GtkToolShell for a description of the tool shell interface.
30815 struct ToolItem /* : Bin */ {
30816 mixin Atk.ImplementorIface.__interface__;
30817 mixin Activatable.__interface__;
30818 mixin Buildable.__interface__;
30819 alias parent this;
30820 alias parent super_;
30821 alias parent bin;
30822 Bin parent;
30823 private ToolItemPrivate* priv;
30826 // VERSION: 2.4
30827 // Creates a new #GtkToolItem
30828 // RETURNS: the new #GtkToolItem
30829 static ToolItem* new_()() {
30830 return gtk_tool_item_new();
30833 // VERSION: 2.20
30834 // Returns the ellipsize mode used for @tool_item. Custom subclasses of
30835 // #GtkToolItem should call this function to find out how text should
30836 // be ellipsized.
30837 // should be ellipsized.
30838 // RETURNS: a #PangoEllipsizeMode indicating how text in @tool_item
30839 Pango.EllipsizeMode get_ellipsize_mode()() {
30840 return gtk_tool_item_get_ellipsize_mode(&this);
30843 // VERSION: 2.4
30844 // Returns whether @tool_item is allocated extra space.
30845 // See gtk_tool_item_set_expand().
30846 // RETURNS: %TRUE if @tool_item is allocated extra space.
30847 int get_expand()() {
30848 return gtk_tool_item_get_expand(&this);
30851 // VERSION: 2.4
30852 // Returns whether @tool_item is the same size as other homogeneous
30853 // items. See gtk_tool_item_set_homogeneous().
30854 // items.
30855 // RETURNS: %TRUE if the item is the same size as other homogeneous
30856 int get_homogeneous()() {
30857 return gtk_tool_item_get_homogeneous(&this);
30860 // VERSION: 2.4
30861 // Returns the icon size used for @tool_item. Custom subclasses of
30862 // #GtkToolItem should call this function to find out what size icons
30863 // they should use.
30864 // used for @tool_item
30865 // RETURNS: a #GtkIconSize indicating the icon size
30866 int get_icon_size()() {
30867 return gtk_tool_item_get_icon_size(&this);
30870 // VERSION: 2.4
30871 // Returns whether @tool_item is considered important. See
30872 // gtk_tool_item_set_is_important()
30873 // RETURNS: %TRUE if @tool_item is considered important.
30874 int get_is_important()() {
30875 return gtk_tool_item_get_is_important(&this);
30878 // VERSION: 2.4
30879 // Returns the orientation used for @tool_item. Custom subclasses of
30880 // #GtkToolItem should call this function to find out what size icons
30881 // they should use.
30882 // used for @tool_item
30883 // RETURNS: a #GtkOrientation indicating the orientation
30884 Orientation get_orientation()() {
30885 return gtk_tool_item_get_orientation(&this);
30888 // VERSION: 2.4
30889 // If @menu_item_id matches the string passed to
30890 // gtk_tool_item_set_proxy_menu_item() return the corresponding #GtkMenuItem.
30891 // Custom subclasses of #GtkToolItem should use this function to
30892 // update their menu item when the #GtkToolItem changes. That the
30893 // will not inadvertently change a menu item that they did not create.
30894 // gtk_tool_item_set_proxy_menu_item(), if the @menu_item_id<!-- -->s
30895 // match.
30896 // RETURNS: The #GtkMenuItem passed to
30897 // <menu_item_id>: a string used to identify the menu item
30898 Widget* get_proxy_menu_item()(char* menu_item_id) {
30899 return gtk_tool_item_get_proxy_menu_item(&this, menu_item_id);
30902 // VERSION: 2.4
30903 // Returns the relief style of @tool_item. See gtk_button_set_relief_style().
30904 // Custom subclasses of #GtkToolItem should call this function in the handler
30905 // of the #GtkToolItem::toolbar_reconfigured signal to find out the
30906 // relief style of buttons.
30907 // for @tool_item.
30908 // RETURNS: a #GtkReliefStyle indicating the relief style used
30909 ReliefStyle get_relief_style()() {
30910 return gtk_tool_item_get_relief_style(&this);
30913 // VERSION: 2.20
30914 // Returns the text alignment used for @tool_item. Custom subclasses of
30915 // #GtkToolItem should call this function to find out how text should
30916 // be aligned.
30917 // used for @tool_item
30918 // RETURNS: a #gfloat indicating the horizontal text alignment
30919 float get_text_alignment()() {
30920 return gtk_tool_item_get_text_alignment(&this);
30923 // VERSION: 2.20
30924 // Returns the text orientation used for @tool_item. Custom subclasses of
30925 // #GtkToolItem should call this function to find out how text should
30926 // be orientated.
30927 // used for @tool_item
30928 // RETURNS: a #GtkOrientation indicating the text orientation
30929 Orientation get_text_orientation()() {
30930 return gtk_tool_item_get_text_orientation(&this);
30933 // VERSION: 2.20
30934 // Returns the size group used for labels in @tool_item.
30935 // Custom subclasses of #GtkToolItem should call this function
30936 // and use the size group for labels.
30937 // RETURNS: a #GtkSizeGroup
30938 SizeGroup* get_text_size_group()() {
30939 return gtk_tool_item_get_text_size_group(&this);
30942 // VERSION: 2.4
30943 // Returns the toolbar style used for @tool_item. Custom subclasses of
30944 // #GtkToolItem should call this function in the handler of the
30945 // GtkToolItem::toolbar_reconfigured signal to find out in what style
30946 // the toolbar is displayed and change themselves accordingly
30947 // Possibilities are:
30948 // <itemizedlist>
30949 // <listitem> GTK_TOOLBAR_BOTH, meaning the tool item should show
30950 // both an icon and a label, stacked vertically </listitem>
30951 // <listitem> GTK_TOOLBAR_ICONS, meaning the toolbar shows
30952 // only icons </listitem>
30953 // <listitem> GTK_TOOLBAR_TEXT, meaning the tool item should only
30954 // show text</listitem>
30955 // <listitem> GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show
30956 // both an icon and a label, arranged horizontally (however, note the
30957 // #GtkToolButton::has_text_horizontally that makes tool buttons not
30958 // show labels when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ.
30959 // </listitem>
30960 // </itemizedlist>
30961 // for @tool_item.
30962 // RETURNS: A #GtkToolbarStyle indicating the toolbar style used
30963 ToolbarStyle get_toolbar_style()() {
30964 return gtk_tool_item_get_toolbar_style(&this);
30967 // VERSION: 2.4
30968 // Returns whether @tool_item has a drag window. See
30969 // gtk_tool_item_set_use_drag_window().
30970 // RETURNS: %TRUE if @tool_item uses a drag window.
30971 int get_use_drag_window()() {
30972 return gtk_tool_item_get_use_drag_window(&this);
30975 // VERSION: 2.4
30976 // Returns whether the @tool_item is visible on toolbars that are
30977 // docked horizontally.
30978 // docked horizontally.
30979 // RETURNS: %TRUE if @tool_item is visible on toolbars that are
30980 int get_visible_horizontal()() {
30981 return gtk_tool_item_get_visible_horizontal(&this);
30984 // VERSION: 2.4
30985 // Returns whether @tool_item is visible when the toolbar is docked vertically.
30986 // See gtk_tool_item_set_visible_vertical().
30987 // RETURNS: Whether @tool_item is visible when the toolbar is docked vertically
30988 int get_visible_vertical()() {
30989 return gtk_tool_item_get_visible_vertical(&this);
30992 // VERSION: 2.6
30993 // Calling this function signals to the toolbar that the
30994 // overflow menu item for @tool_item has changed. If the
30995 // overflow menu is visible when this function it called,
30996 // the menu will be rebuilt.
30997 // The function must be called when the tool item changes what it
30998 // will do in response to the #GtkToolItem::create-menu-proxy signal.
30999 void rebuild_menu()() {
31000 gtk_tool_item_rebuild_menu(&this);
31003 // VERSION: 2.4
31004 // Returns the #GtkMenuItem that was last set by
31005 // gtk_tool_item_set_proxy_menu_item(), ie. the #GtkMenuItem
31006 // that is going to appear in the overflow menu.
31007 // overflow menu for @tool_item.
31008 // RETURNS: The #GtkMenuItem that is going to appear in the
31009 Widget* retrieve_proxy_menu_item()() {
31010 return gtk_tool_item_retrieve_proxy_menu_item(&this);
31013 // VERSION: 2.4
31014 // Sets whether @tool_item is allocated extra space when there
31015 // is more room on the toolbar then needed for the items. The
31016 // effect is that the item gets bigger when the toolbar gets bigger
31017 // and smaller when the toolbar gets smaller.
31018 // <expand>: Whether @tool_item is allocated extra space
31019 void set_expand()(int expand) {
31020 gtk_tool_item_set_expand(&this, expand);
31023 // VERSION: 2.4
31024 // Sets whether @tool_item is to be allocated the same size as other
31025 // homogeneous items. The effect is that all homogeneous items will have
31026 // the same width as the widest of the items.
31027 // <homogeneous>: whether @tool_item is the same size as other homogeneous items
31028 void set_homogeneous()(int homogeneous) {
31029 gtk_tool_item_set_homogeneous(&this, homogeneous);
31032 // VERSION: 2.4
31033 // Sets whether @tool_item should be considered important. The #GtkToolButton
31034 // class uses this property to determine whether to show or hide its label
31035 // when the toolbar style is %GTK_TOOLBAR_BOTH_HORIZ. The result is that
31036 // only tool buttons with the "is_important" property set have labels, an
31037 // effect known as "priority text"
31038 // <is_important>: whether the tool item should be considered important
31039 void set_is_important()(int is_important) {
31040 gtk_tool_item_set_is_important(&this, is_important);
31043 // VERSION: 2.4
31044 // Sets the #GtkMenuItem used in the toolbar overflow menu. The
31045 // should also be used with gtk_tool_item_get_proxy_menu_item().
31046 // <menu_item_id>: a string used to identify @menu_item
31047 // <menu_item>: a #GtkMenuItem to be used in the overflow menu
31048 void set_proxy_menu_item()(char* menu_item_id, Widget* menu_item) {
31049 gtk_tool_item_set_proxy_menu_item(&this, menu_item_id, menu_item);
31052 // VERSION: 2.4
31053 // DEPRECATED (v2.12) method: set_tooltip - Use gtk_tool_item_set_tooltip_text() instead.
31054 // Sets the #GtkTooltips object to be used for @tool_item, the
31055 // text to be displayed as tooltip on the item and the private text
31056 // to be used. See gtk_tooltips_set_tip().
31057 // <tooltips>: The #GtkTooltips object to be used
31058 // <tip_text>: text to be used as tooltip text for @tool_item
31059 // <tip_private>: text to be used as private tooltip text
31060 void set_tooltip()(Tooltips* tooltips, char* tip_text=null, char* tip_private=null) {
31061 gtk_tool_item_set_tooltip(&this, tooltips, tip_text, tip_private);
31064 // VERSION: 2.12
31065 // Sets the markup text to be displayed as tooltip on the item.
31066 // See gtk_widget_set_tooltip_markup().
31067 // <markup>: markup text to be used as tooltip for @tool_item
31068 void set_tooltip_markup()(char* markup) {
31069 gtk_tool_item_set_tooltip_markup(&this, markup);
31072 // VERSION: 2.12
31073 // Sets the text to be displayed as tooltip on the item.
31074 // See gtk_widget_set_tooltip_text().
31075 // <text>: text to be used as tooltip for @tool_item
31076 void set_tooltip_text()(char* text) {
31077 gtk_tool_item_set_tooltip_text(&this, text);
31080 // VERSION: 2.4
31081 // Sets whether @tool_item has a drag window. When %TRUE the
31082 // toolitem can be used as a drag source through gtk_drag_source_set().
31083 // When @tool_item has a drag window it will intercept all events,
31084 // even those that would otherwise be sent to a child of @tool_item.
31085 // <use_drag_window>: Whether @tool_item has a drag window.
31086 void set_use_drag_window()(int use_drag_window) {
31087 gtk_tool_item_set_use_drag_window(&this, use_drag_window);
31090 // VERSION: 2.4
31091 // Sets whether @tool_item is visible when the toolbar is docked horizontally.
31092 // <visible_horizontal>: Whether @tool_item is visible when in horizontal mode
31093 void set_visible_horizontal()(int visible_horizontal) {
31094 gtk_tool_item_set_visible_horizontal(&this, visible_horizontal);
31097 // VERSION: 2.4
31098 // Sets whether @tool_item is visible when the toolbar is docked
31099 // vertically. Some tool items, such as text entries, are too wide to be
31100 // useful on a vertically docked toolbar. If @visible_vertical is %FALSE
31101 // <visible_vertical>: whether @tool_item is visible when the toolbar is in vertical mode
31102 void set_visible_vertical()(int visible_vertical) {
31103 gtk_tool_item_set_visible_vertical(&this, visible_vertical);
31106 // VERSION: 2.14
31107 // Emits the signal #GtkToolItem::toolbar_reconfigured on @tool_item.
31108 // #GtkToolbar and other #GtkToolShell implementations use this function
31109 // to notify children, when some aspect of their configuration changes.
31110 void toolbar_reconfigured()() {
31111 gtk_tool_item_toolbar_reconfigured(&this);
31114 // This signal is emitted when the toolbar needs information from @tool_item
31115 // about whether the item should appear in the toolbar overflow menu. In
31116 // response the tool item should either
31117 // <itemizedlist>
31118 // <listitem>call gtk_tool_item_set_proxy_menu_item() with a %NULL
31119 // pointer and return %TRUE to indicate that the item should not appear
31120 // in the overflow menu
31121 // </listitem>
31122 // <listitem> call gtk_tool_item_set_proxy_menu_item() with a new menu
31123 // item and return %TRUE, or
31124 // </listitem>
31125 // <listitem> return %FALSE to indicate that the signal was not
31126 // handled by the item. This means that
31127 // the item will not appear in the overflow menu unless a later handler
31128 // installs a menu item.
31129 // </listitem>
31130 // </itemizedlist>
31131 // The toolbar may cache the result of this signal. When the tool item changes
31132 // how it will respond to this signal it must call gtk_tool_item_rebuild_menu()
31133 // to invalidate the cache and ensure that the toolbar rebuilds its overflow
31134 // menu.
31135 // RETURNS: %TRUE if the signal was handled, %FALSE if not
31136 extern (C) alias static c_int function (ToolItem* this_, void* user_data=null) signal_create_menu_proxy;
31138 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31139 return super_.signal_connect!name(cb, data, cf);
31142 ulong signal_connect(string name:"create-menu-proxy", CB:signal_create_menu_proxy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31143 return signal_connect_data!()(&this, cast(char*)"create-menu-proxy",
31144 cast(GObject2.Callback)cb, data, null, cf);
31147 // DEPRECATED (v2.12) glib:signal: set-tooltip - With the new tooltip API, there is no
31148 // This signal is emitted when the toolitem's tooltip changes.
31149 // Application developers can use gtk_tool_item_set_tooltip() to
31150 // set the item's tooltip.
31151 // need to use this signal anymore.
31152 // RETURNS: %TRUE if the signal was handled, %FALSE if not
31153 // <tooltips>: the #GtkTooltips
31154 // <tip_text>: the tooltip text
31155 // <tip_private>: the tooltip private text
31156 extern (C) alias static c_int function (ToolItem* this_, Tooltips* tooltips, char* tip_text, char* tip_private, void* user_data=null) signal_set_tooltip;
31157 ulong signal_connect(string name:"set-tooltip", CB:signal_set_tooltip)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31158 return signal_connect_data!()(&this, cast(char*)"set-tooltip",
31159 cast(GObject2.Callback)cb, data, null, cf);
31162 // This signal is emitted when some property of the toolbar that the
31163 // item is a child of changes. For custom subclasses of #GtkToolItem,
31164 // the default handler of this signal use the functions
31165 // <itemizedlist>
31166 // <listitem>gtk_tool_shell_get_orientation()</listitem>
31167 // <listitem>gtk_tool_shell_get_style()</listitem>
31168 // <listitem>gtk_tool_shell_get_icon_size()</listitem>
31169 // <listitem>gtk_tool_shell_get_relief_style()</listitem>
31170 // </itemizedlist>
31171 // to find out what the toolbar should look like and change
31172 // themselves accordingly.
31173 extern (C) alias static void function (ToolItem* this_, void* user_data=null) signal_toolbar_reconfigured;
31174 ulong signal_connect(string name:"toolbar-reconfigured", CB:signal_toolbar_reconfigured)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31175 return signal_connect_data!()(&this, cast(char*)"toolbar-reconfigured",
31176 cast(GObject2.Callback)cb, data, null, cf);
31180 struct ToolItemClass {
31181 BinClass parent_class;
31182 extern (C) int function (ToolItem* tool_item) create_menu_proxy;
31183 extern (C) void function (ToolItem* tool_item) toolbar_reconfigured;
31184 extern (C) int function (ToolItem* tool_item, Tooltips* tooltips, char* tip_text, char* tip_private) set_tooltip;
31185 extern (C) void function () _gtk_reserved1;
31186 extern (C) void function () _gtk_reserved2;
31187 extern (C) void function () _gtk_reserved3;
31188 extern (C) void function () _gtk_reserved4;
31192 // A #GtkToolItemGroup is used together with #GtkToolPalette to add
31193 // #GtkToolItem<!-- -->s to a palette like container with different
31194 // categories and drag and drop support.
31195 struct ToolItemGroup /* : Container */ {
31196 mixin Atk.ImplementorIface.__interface__;
31197 mixin Buildable.__interface__;
31198 mixin ToolShell.__interface__;
31199 alias parent_instance this;
31200 alias parent_instance super_;
31201 alias parent_instance container;
31202 Container parent_instance;
31203 ToolItemGroupPrivate* priv;
31206 // VERSION: 2.20
31207 // Creates a new tool item group with label @label.
31208 // RETURNS: a new #GtkToolItemGroup.
31209 // <label>: the label of the new group
31210 static ToolItemGroup* new_()(char* label) {
31211 return gtk_tool_item_group_new(label);
31214 // VERSION: 2.20
31215 // Gets whether @group is collapsed or expanded.
31216 // RETURNS: %TRUE if @group is collapsed, %FALSE if it is expanded
31217 int get_collapsed()() {
31218 return gtk_tool_item_group_get_collapsed(&this);
31221 // VERSION: 2.20
31222 // Gets the tool item at position (x, y).
31223 // RETURNS: the #GtkToolItem at position (x, y)
31224 // <x>: the x position
31225 // <y>: the y position
31226 ToolItem* get_drop_item()(int x, int y) {
31227 return gtk_tool_item_group_get_drop_item(&this, x, y);
31230 // VERSION: 2.20
31231 // Gets the ellipsization mode of @group.
31232 // RETURNS: the #PangoEllipsizeMode of @group
31233 Pango.EllipsizeMode get_ellipsize()() {
31234 return gtk_tool_item_group_get_ellipsize(&this);
31237 // VERSION: 2.20
31238 // Gets the relief mode of the header button of @group.
31239 // RETURNS: the #GtkReliefStyle
31240 ReliefStyle get_header_relief()() {
31241 return gtk_tool_item_group_get_header_relief(&this);
31244 // VERSION: 2.20
31245 // Gets the position of @item in @group as index.
31246 // RETURNS: the index of @item in @group or -1 if @item is no child of @group
31247 // <item>: a #GtkToolItem
31248 int get_item_position()(ToolItem* item) {
31249 return gtk_tool_item_group_get_item_position(&this, item);
31252 // VERSION: 2.20
31253 // Gets the label of @group.
31254 // and must not be modified. Note that %NULL is returned if a custom
31255 // label has been set with gtk_tool_item_group_set_label_widget()
31256 // RETURNS: the label of @group. The label is an internal string of @group
31257 char* get_label()() {
31258 return gtk_tool_item_group_get_label(&this);
31261 // VERSION: 2.20
31262 // Gets the label widget of @group.
31263 // See gtk_tool_item_group_set_label_widget().
31264 // RETURNS: the label widget of @group
31265 Widget* get_label_widget()() {
31266 return gtk_tool_item_group_get_label_widget(&this);
31269 // VERSION: 2.20
31270 // Gets the number of tool items in @group.
31271 // RETURNS: the number of tool items in @group
31272 uint get_n_items()() {
31273 return gtk_tool_item_group_get_n_items(&this);
31276 // VERSION: 2.20
31277 // Gets the tool item at @index in group.
31278 // RETURNS: the #GtkToolItem at index
31279 // <index>: the index
31280 ToolItem* get_nth_item()(uint index) {
31281 return gtk_tool_item_group_get_nth_item(&this, index);
31284 // VERSION: 2.20
31285 // Inserts @item at @position in the list of children of @group.
31286 // <item>: the #GtkToolItem to insert into @group
31287 // <position>: the position of @item in @group, starting with 0. The position -1 means end of list.
31288 void insert()(ToolItem* item, int position) {
31289 gtk_tool_item_group_insert(&this, item, position);
31292 // VERSION: 2.20
31293 // Sets whether the @group should be collapsed or expanded.
31294 // <collapsed>: whether the @group should be collapsed or expanded
31295 void set_collapsed()(int collapsed) {
31296 gtk_tool_item_group_set_collapsed(&this, collapsed);
31299 // VERSION: 2.20
31300 // Sets the ellipsization mode which should be used by labels in @group.
31301 // <ellipsize>: the #PangoEllipsizeMode labels in @group should use
31302 void set_ellipsize()(Pango.EllipsizeMode ellipsize) {
31303 gtk_tool_item_group_set_ellipsize(&this, ellipsize);
31306 // VERSION: 2.20
31307 // Set the button relief of the group header.
31308 // See gtk_button_set_relief() for details.
31309 // <style>: the #GtkReliefStyle
31310 void set_header_relief()(ReliefStyle style) {
31311 gtk_tool_item_group_set_header_relief(&this, style);
31314 // VERSION: 2.20
31315 // Sets the position of @item in the list of children of @group.
31316 // <item>: the #GtkToolItem to move to a new position, should be a child of @group.
31317 // <position>: the new position of @item in @group, starting with 0. The position -1 means end of list.
31318 void set_item_position()(ToolItem* item, int position) {
31319 gtk_tool_item_group_set_item_position(&this, item, position);
31322 // VERSION: 2.20
31323 // Sets the label of the tool item group. The label is displayed in the header
31324 // of the group.
31325 // <label>: the new human-readable label of of the group
31326 void set_label()(char* label) {
31327 gtk_tool_item_group_set_label(&this, label);
31330 // VERSION: 2.20
31331 // Sets the label of the tool item group.
31332 // The label widget is displayed in the header of the group, in place
31333 // of the usual label.
31334 // <label_widget>: the widget to be displayed in place of the usual label
31335 void set_label_widget()(Widget* label_widget) {
31336 gtk_tool_item_group_set_label_widget(&this, label_widget);
31340 struct ToolItemGroupClass {
31341 ContainerClass parent_class;
31344 struct ToolItemGroupPrivate {
31347 struct ToolItemPrivate {
31351 // A #GtkToolPalette allows you to add #GtkToolItem<!-- -->s to a palette-like
31352 // container with different categories and drag and drop support.
31353 // A #GtkToolPalette is created with a call to gtk_tool_palette_new().
31354 // #GtkToolItem<!-- -->s cannot be added directly to a #GtkToolPalette -
31355 // instead they are added to a #GtkToolItemGroup which can than be added
31356 // to a #GtkToolPalette. To add a #GtkToolItemGroup to a #GtkToolPalette,
31357 // use gtk_container_add().
31358 // |[
31359 // GtkWidget *palette, *group;
31360 // GtkToolItem *item;
31361 // palette = gtk_tool_palette_new ();
31362 // group = gtk_tool_item_group_new (_("Test Category"));
31363 // gtk_container_add (GTK_CONTAINER (palette), group);
31364 // item = gtk_tool_button_new_from_stock (GTK_STOCK_OK);
31365 // gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
31366 // ]|
31367 // The easiest way to use drag and drop with #GtkToolPalette is to call
31368 // gtk_tool_palette_add_drag_dest() with the desired drag source @palette
31369 // and the desired drag target @widget. Then gtk_tool_palette_get_drag_item()
31370 // can be used to get the dragged item in the #GtkWidget::drag-data-received
31371 // signal handler of the drag target.
31372 // |[
31373 // static void
31374 // passive_canvas_drag_data_received (GtkWidget *widget,
31375 // GdkDragContext *context,
31376 // gint x,
31377 // gint y,
31378 // GtkSelectionData *selection,
31379 // guint info,
31380 // guint time,
31381 // gpointer data)
31382 // {
31383 // GtkWidget *palette;
31384 // GtkWidget *item;
31385 // /<!-- -->* Get the dragged item *<!-- -->/
31386 // palette = gtk_widget_get_ancestor (gtk_drag_get_source_widget (context),
31387 // GTK_TYPE_TOOL_PALETTE);
31388 // if (palette != NULL)
31389 // item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
31390 // selection);
31391 // /<!-- -->* Do something with item *<!-- -->/
31392 // }
31393 // GtkWidget *target, palette;
31394 // palette = gtk_tool_palette_new ();
31395 // target = gtk_drawing_area_new ();
31396 // g_signal_connect (G_OBJECT (target), "drag-data-received",
31397 // G_CALLBACK (passive_canvas_drag_data_received), NULL);
31398 // gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette), target,
31399 // GTK_DEST_DEFAULT_ALL,
31400 // GTK_TOOL_PALETTE_DRAG_ITEMS,
31401 // GDK_ACTION_COPY);
31402 // ]|
31403 struct ToolPalette /* : Container */ {
31404 mixin Atk.ImplementorIface.__interface__;
31405 mixin Buildable.__interface__;
31406 mixin Orientable.__interface__;
31407 alias parent_instance this;
31408 alias parent_instance super_;
31409 alias parent_instance container;
31410 Container parent_instance;
31411 ToolPalettePrivate* priv;
31414 // VERSION: 2.20
31415 // Creates a new tool palette.
31416 // RETURNS: a new #GtkToolPalette
31417 static ToolPalette* new_()() {
31418 return gtk_tool_palette_new();
31421 // VERSION: 2.20
31422 // Get the target entry for a dragged #GtkToolItemGroup.
31423 // RETURNS: the #GtkTargetEntry for a dragged group
31424 static TargetEntry* get_drag_target_group()() {
31425 return gtk_tool_palette_get_drag_target_group();
31428 // VERSION: 2.20
31429 // Gets the target entry for a dragged #GtkToolItem.
31430 // RETURNS: the #GtkTargetEntry for a dragged item.
31431 static TargetEntry* get_drag_target_item()() {
31432 return gtk_tool_palette_get_drag_target_item();
31435 // VERSION: 2.20
31436 // Sets @palette as drag source (see gtk_tool_palette_set_drag_source())
31437 // and sets @widget as a drag destination for drags from @palette.
31438 // See gtk_drag_dest_set().
31439 // <widget>: a #GtkWidget which should be a drag destination for @palette
31440 // <flags>: the flags that specify what actions GTK+ should take for drops on that widget
31441 // <targets>: the #GtkToolPaletteDragTarget<!-- -->s which the widget should support
31442 // <actions>: the #GdkDragAction<!-- -->s which the widget should suppport
31443 void add_drag_dest()(Widget* widget, DestDefaults flags, ToolPaletteDragTargets targets, Gdk2.DragAction actions) {
31444 gtk_tool_palette_add_drag_dest(&this, widget, flags, targets, actions);
31447 // VERSION: 2.20
31448 // Get the dragged item from the selection.
31449 // This could be a #GtkToolItem or a #GtkToolItemGroup.
31450 // RETURNS: the dragged item in selection
31451 // <selection>: a #GtkSelectionData
31452 Widget* get_drag_item()(SelectionData* selection) {
31453 return gtk_tool_palette_get_drag_item(&this, selection);
31456 // VERSION: 2.20
31457 // Gets the group at position (x, y).
31458 // if there is no such group
31459 // RETURNS: the #GtkToolItemGroup at position or %NULL
31460 // <x>: the x position
31461 // <y>: the y position
31462 ToolItemGroup* get_drop_group()(int x, int y) {
31463 return gtk_tool_palette_get_drop_group(&this, x, y);
31466 // VERSION: 2.20
31467 // Gets the item at position (x, y).
31468 // See gtk_tool_palette_get_drop_group().
31469 // RETURNS: the #GtkToolItem at position or %NULL if there is no such item
31470 // <x>: the x position
31471 // <y>: the y position
31472 ToolItem* get_drop_item()(int x, int y) {
31473 return gtk_tool_palette_get_drop_item(&this, x, y);
31476 // VERSION: 2.20
31477 // Gets whether @group is exclusive or not.
31478 // See gtk_tool_palette_set_exclusive().
31479 // RETURNS: %TRUE if @group is exclusive
31480 // <group>: a #GtkToolItemGroup which is a child of palette
31481 int get_exclusive()(ToolItemGroup* group) {
31482 return gtk_tool_palette_get_exclusive(&this, group);
31485 // VERSION: 2.20
31486 // Gets whether group should be given extra space.
31487 // See gtk_tool_palette_set_expand().
31488 // RETURNS: %TRUE if group should be given extra space, %FALSE otherwise
31489 // <group>: a #GtkToolItemGroup which is a child of palette
31490 int get_expand()(ToolItemGroup* group) {
31491 return gtk_tool_palette_get_expand(&this, group);
31494 // VERSION: 2.20
31495 // Gets the position of @group in @palette as index.
31496 // See gtk_tool_palette_set_group_position().
31497 // RETURNS: the index of group or -1 if @group is not a child of @palette
31498 // <group>: a #GtkToolItemGroup
31499 int get_group_position()(ToolItemGroup* group) {
31500 return gtk_tool_palette_get_group_position(&this, group);
31503 // VERSION: 2.20
31504 // Gets the horizontal adjustment of the tool palette.
31505 // RETURNS: the horizontal adjustment of @palette
31506 Adjustment* get_hadjustment()() {
31507 return gtk_tool_palette_get_hadjustment(&this);
31510 // VERSION: 2.20
31511 // Gets the size of icons in the tool palette.
31512 // See gtk_tool_palette_set_icon_size().
31513 // RETURNS: the #GtkIconSize of icons in the tool palette
31514 int get_icon_size()() {
31515 return gtk_tool_palette_get_icon_size(&this);
31518 // VERSION: 2.20
31519 // Gets the style (icons, text or both) of items in the tool palette.
31520 // RETURNS: the #GtkToolbarStyle of items in the tool palette.
31521 ToolbarStyle get_style()() {
31522 return gtk_tool_palette_get_style(&this);
31525 // VERSION: 2.20
31526 // Gets the vertical adjustment of the tool palette.
31527 // RETURNS: the vertical adjustment of @palette
31528 Adjustment* get_vadjustment()() {
31529 return gtk_tool_palette_get_vadjustment(&this);
31532 // VERSION: 2.20
31533 // Sets the tool palette as a drag source.
31534 // Enables all groups and items in the tool palette as drag sources
31535 // on button 1 and button 3 press with copy and move actions.
31536 // See gtk_drag_source_set().
31537 // <targets>: the #GtkToolPaletteDragTarget<!-- -->s which the widget should support
31538 void set_drag_source()(ToolPaletteDragTargets targets) {
31539 gtk_tool_palette_set_drag_source(&this, targets);
31542 // VERSION: 2.20
31543 // Sets whether the group should be exclusive or not.
31544 // If an exclusive group is expanded all other groups are collapsed.
31545 // <group>: a #GtkToolItemGroup which is a child of palette
31546 // <exclusive>: whether the group should be exclusive or not
31547 void set_exclusive()(ToolItemGroup* group, int exclusive) {
31548 gtk_tool_palette_set_exclusive(&this, group, exclusive);
31551 // VERSION: 2.20
31552 // Sets whether the group should be given extra space.
31553 // <group>: a #GtkToolItemGroup which is a child of palette
31554 // <expand>: whether the group should be given extra space
31555 void set_expand()(ToolItemGroup* group, int expand) {
31556 gtk_tool_palette_set_expand(&this, group, expand);
31559 // VERSION: 2.20
31560 // Sets the position of the group as an index of the tool palette.
31561 // If position is 0 the group will become the first child, if position is
31562 // -1 it will become the last child.
31563 // <group>: a #GtkToolItemGroup which is a child of palette
31564 // <position>: a new index for group
31565 void set_group_position()(ToolItemGroup* group, int position) {
31566 gtk_tool_palette_set_group_position(&this, group, position);
31569 // VERSION: 2.20
31570 // Sets the size of icons in the tool palette.
31571 // <icon_size>: the #GtkIconSize that icons in the tool palette shall have
31572 void set_icon_size()(int icon_size) {
31573 gtk_tool_palette_set_icon_size(&this, icon_size);
31576 // VERSION: 2.20
31577 // Sets the style (text, icons or both) of items in the tool palette.
31578 // <style>: the #GtkToolbarStyle that items in the tool palette shall have
31579 void set_style()(ToolbarStyle style) {
31580 gtk_tool_palette_set_style(&this, style);
31583 // VERSION: 2.20
31584 // Unsets the tool palette icon size set with gtk_tool_palette_set_icon_size(),
31585 // so that user preferences will be used to determine the icon size.
31586 void unset_icon_size()() {
31587 gtk_tool_palette_unset_icon_size(&this);
31590 // VERSION: 2.20
31591 // Unsets a toolbar style set with gtk_tool_palette_set_style(),
31592 // so that user preferences will be used to determine the toolbar style.
31593 void unset_style()() {
31594 gtk_tool_palette_unset_style(&this);
31597 // VERSION: 2.20
31598 // Set the scroll adjustments for the viewport.
31599 // Usually scrolled containers like GtkScrolledWindow will emit this
31600 // signal to connect two instances of GtkScrollbar to the scroll
31601 // directions of the GtkToolpalette.
31602 // <hadjustment>: The horizontal adjustment
31603 // <vadjustment>: The vertical adjustment
31604 extern (C) alias static void function (ToolPalette* this_, Adjustment* hadjustment, Adjustment* vadjustment, void* user_data=null) signal_set_scroll_adjustments;
31606 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31607 return super_.signal_connect!name(cb, data, cf);
31610 ulong signal_connect(string name:"set-scroll-adjustments", CB:signal_set_scroll_adjustments)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
31611 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
31612 cast(GObject2.Callback)cb, data, null, cf);
31616 struct ToolPaletteClass {
31617 ContainerClass parent_class;
31618 extern (C) void function (Widget* widget, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
31619 extern (C) void function () _gtk_reserved1;
31620 extern (C) void function () _gtk_reserved2;
31621 extern (C) void function () _gtk_reserved3;
31622 extern (C) void function () _gtk_reserved4;
31623 extern (C) void function () _gtk_reserved5;
31624 extern (C) void function () _gtk_reserved6;
31627 // Flags used to specify the supported drag targets.
31628 enum ToolPaletteDragTargets {
31629 ITEMS = 1,
31630 GROUPS = 2
31632 struct ToolPalettePrivate {
31636 // The #GtkToolShell interface allows container widgets to provide additional
31637 // information when embedding #GtkToolItem widgets.
31638 struct ToolShell /* Interface */ {
31639 mixin template __interface__() {
31640 // VERSION: 2.20
31641 // Retrieves the current ellipsize mode for the tool shell. Tool items must not
31642 // call this function directly, but rely on gtk_tool_item_get_ellipsize_mode()
31643 // instead.
31644 // RETURNS: the current ellipsize mode of @shell
31645 Pango.EllipsizeMode get_ellipsize_mode()() {
31646 return gtk_tool_shell_get_ellipsize_mode(cast(ToolShell*)&this);
31649 // VERSION: 2.14
31650 // Retrieves the icon size for the tool shell. Tool items must not call this
31651 // function directly, but rely on gtk_tool_item_get_icon_size() instead.
31652 // RETURNS: the current size for icons of @shell
31653 int get_icon_size()() {
31654 return gtk_tool_shell_get_icon_size(cast(ToolShell*)&this);
31657 // VERSION: 2.14
31658 // Retrieves the current orientation for the tool shell. Tool items must not
31659 // call this function directly, but rely on gtk_tool_item_get_orientation()
31660 // instead.
31661 // RETURNS: the current orientation of @shell
31663 // method "get_orientation" removed: "get_orientation" clashes with other interfaces in Toolbar.
31665 // VERSION: 2.14
31666 // Returns the relief style of buttons on @shell. Tool items must not call this
31667 // function directly, but rely on gtk_tool_item_get_relief_style() instead.
31668 // RETURNS: The relief style of buttons on @shell.
31669 ReliefStyle get_relief_style()() {
31670 return gtk_tool_shell_get_relief_style(cast(ToolShell*)&this);
31673 // VERSION: 2.14
31674 // Retrieves whether the tool shell has text, icons, or both. Tool items must
31675 // not call this function directly, but rely on gtk_tool_item_get_style()
31676 // instead.
31677 // RETURNS: the current style of @shell
31678 ToolbarStyle get_style()() {
31679 return gtk_tool_shell_get_style(cast(ToolShell*)&this);
31682 // VERSION: 2.20
31683 // Retrieves the current text alignment for the tool shell. Tool items must not
31684 // call this function directly, but rely on gtk_tool_item_get_text_alignment()
31685 // instead.
31686 // RETURNS: the current text alignment of @shell
31687 float get_text_alignment()() {
31688 return gtk_tool_shell_get_text_alignment(cast(ToolShell*)&this);
31691 // VERSION: 2.20
31692 // Retrieves the current text orientation for the tool shell. Tool items must not
31693 // call this function directly, but rely on gtk_tool_item_get_text_orientation()
31694 // instead.
31695 // RETURNS: the current text orientation of @shell
31696 Orientation get_text_orientation()() {
31697 return gtk_tool_shell_get_text_orientation(cast(ToolShell*)&this);
31700 // VERSION: 2.20
31701 // Retrieves the current text size group for the tool shell. Tool items must not
31702 // call this function directly, but rely on gtk_tool_item_get_text_size_group()
31703 // instead.
31704 // RETURNS: the current text size group of @shell
31705 SizeGroup* get_text_size_group()() {
31706 return gtk_tool_shell_get_text_size_group(cast(ToolShell*)&this);
31709 // VERSION: 2.14
31710 // Calling this function signals the tool shell that the overflow menu item for
31711 // tool items have changed. If there is an overflow menu and if it is visible
31712 // when this function it called, the menu will be rebuilt.
31713 // Tool items must not call this function directly, but rely on
31714 // gtk_tool_item_rebuild_menu() instead.
31715 void rebuild_menu()() {
31716 gtk_tool_shell_rebuild_menu(cast(ToolShell*)&this);
31719 mixin __interface__;
31722 // Virtual function table for the #GtkToolShell interface.
31723 struct ToolShellIface {
31724 private GObject2.TypeInterface g_iface;
31725 extern (C) IconSize function (ToolShell* shell) get_icon_size;
31726 // RETURNS: the current orientation of @shell
31727 extern (C) Orientation function (ToolShell* shell) get_orientation;
31728 // RETURNS: the current style of @shell
31729 extern (C) ToolbarStyle function (ToolShell* shell) get_style;
31730 // RETURNS: The relief style of buttons on @shell.
31731 extern (C) ReliefStyle function (ToolShell* shell) get_relief_style;
31732 extern (C) void function (ToolShell* shell) rebuild_menu;
31733 // RETURNS: the current text orientation of @shell
31734 extern (C) Orientation function (ToolShell* shell) get_text_orientation;
31735 // RETURNS: the current text alignment of @shell
31736 extern (C) float function (ToolShell* shell) get_text_alignment;
31737 // RETURNS: the current ellipsize mode of @shell
31738 extern (C) Pango.EllipsizeMode function (ToolShell* shell) get_ellipsize_mode;
31739 // RETURNS: the current text size group of @shell
31740 extern (C) SizeGroup* function (ToolShell* shell) get_text_size_group;
31743 struct Toolbar /* : Container */ {
31744 mixin Atk.ImplementorIface.__interface__;
31745 mixin Buildable.__interface__;
31746 mixin Orientable.__interface__;
31747 mixin ToolShell.__interface__;
31748 alias container this;
31749 alias container super_;
31750 Container container;
31751 int num_children;
31752 GLib2.List* children;
31753 Orientation orientation;
31754 ToolbarStyle style;
31755 IconSize icon_size;
31756 Tooltips* tooltips;
31757 private int button_maxw, button_maxh;
31758 private uint _gtk_reserved1, _gtk_reserved2;
31759 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
31760 uint, "style_set", 1,
31761 uint, "icon_size_set", 1,
31762 uint, "__dummy32A", 30));
31765 // Creates a new toolbar.
31766 // RETURNS: the newly-created toolbar.
31767 static Toolbar* new_()() {
31768 return gtk_toolbar_new();
31771 // Unintrospectable method: append_element() / gtk_toolbar_append_element()
31772 // DEPRECATED (v2.4) method: append_element - Use gtk_toolbar_insert() instead.
31773 // Adds a new element to the end of a toolbar.
31774 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
31775 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
31776 // the radio group for the new element. In all other cases, @widget must
31777 // be %NULL.
31778 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
31779 // RETURNS: the new toolbar element as a #GtkWidget.
31780 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
31781 // <widget>: a #GtkWidget, or %NULL.
31782 // <text>: the element's label.
31783 // <tooltip_text>: the element's tooltip.
31784 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
31785 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
31786 // <callback>: the function to be executed when the button is pressed.
31787 // <user_data>: any data you wish to pass to the callback.
31788 Widget* append_element()(ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
31789 return gtk_toolbar_append_element(&this, type, widget, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
31792 // Unintrospectable method: append_item() / gtk_toolbar_append_item()
31793 // DEPRECATED (v2.4) method: append_item - Use gtk_toolbar_insert() instead.
31794 // Inserts a new item into the toolbar. You must specify the position
31795 // in the toolbar where it will be inserted.
31796 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
31797 // RETURNS: the new toolbar item as a #GtkWidget.
31798 // <text>: give your toolbar button a label.
31799 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
31800 // <tooltip_private_text>: use with #GtkTipsQuery.
31801 // <icon>: a #GtkWidget that should be used as the button's icon.
31802 // <callback>: the function to be executed when the button is pressed.
31803 // <user_data>: a pointer to any data you wish to be passed to the callback.
31804 Widget* append_item()(char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
31805 return gtk_toolbar_append_item(&this, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
31808 // DEPRECATED (v2.4) method: append_space - Use gtk_toolbar_insert() instead.
31809 // Adds a new space to the end of the toolbar.
31810 void append_space()() {
31811 gtk_toolbar_append_space(&this);
31814 // DEPRECATED (v2.4) method: append_widget - Use gtk_toolbar_insert() instead.
31815 // Adds a widget to the end of the given toolbar.
31816 // <widget>: a #GtkWidget to add to the toolbar.
31817 // <tooltip_text>: the element's tooltip.
31818 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
31819 void append_widget()(Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null) {
31820 gtk_toolbar_append_widget(&this, widget, tooltip_text, tooltip_private_text);
31823 // VERSION: 2.4
31824 // Returns the position corresponding to the indicated point on
31825 // this function returns the position a new item should be
31826 // inserted.
31827 // RETURNS: The position corresponding to the point (@x, @y) on the toolbar.
31828 // <x>: x coordinate of a point on the toolbar
31829 // <y>: y coordinate of a point on the toolbar
31830 int get_drop_index()(int x, int y) {
31831 return gtk_toolbar_get_drop_index(&this, x, y);
31834 // Retrieves the icon size for the toolbar. See gtk_toolbar_set_icon_size().
31835 // the toolbar.
31836 // RETURNS: the current icon size for the icons on
31837 int get_icon_size()() {
31838 return gtk_toolbar_get_icon_size(&this);
31841 // VERSION: 2.4
31842 // Returns the position of @item on the toolbar, starting from 0.
31843 // It is an error if @item is not a child of the toolbar.
31844 // RETURNS: the position of item on the toolbar.
31845 // <item>: a #GtkToolItem that is a child of @toolbar
31846 int get_item_index()(ToolItem* item) {
31847 return gtk_toolbar_get_item_index(&this, item);
31850 // VERSION: 2.4
31851 // Returns the number of items on the toolbar.
31852 // RETURNS: the number of items on the toolbar
31853 int get_n_items()() {
31854 return gtk_toolbar_get_n_items(&this);
31857 // VERSION: 2.4
31858 // Returns the @n<!-- -->'th item on @toolbar, or %NULL if the
31859 // toolbar does not contain an @n<!-- -->'th item.
31860 // or %NULL if there isn't an @n<!-- -->'th item.
31861 // RETURNS: The @n<!-- -->'th #GtkToolItem on @toolbar,
31862 // <n>: A position on the toolbar
31863 ToolItem* get_nth_item()(int n) {
31864 return gtk_toolbar_get_nth_item(&this, n);
31867 // DEPRECATED (v2.16) method: get_orientation - Use gtk_orientable_get_orientation() instead.
31868 // Retrieves the current orientation of the toolbar. See
31869 // gtk_toolbar_set_orientation().
31870 // RETURNS: the orientation
31871 Orientation get_orientation()() {
31872 return gtk_toolbar_get_orientation(&this);
31875 // VERSION: 2.4
31876 // Returns the relief style of buttons on @toolbar. See
31877 // gtk_button_set_relief().
31878 // RETURNS: The relief style of buttons on @toolbar.
31879 ReliefStyle get_relief_style()() {
31880 return gtk_toolbar_get_relief_style(&this);
31883 // VERSION: 2.4
31884 // Returns whether the toolbar has an overflow menu.
31885 // See gtk_toolbar_set_show_arrow().
31886 // RETURNS: %TRUE if the toolbar has an overflow menu.
31887 int get_show_arrow()() {
31888 return gtk_toolbar_get_show_arrow(&this);
31891 // Retrieves whether the toolbar has text, icons, or both . See
31892 // gtk_toolbar_set_style().
31893 // RETURNS: the current style of @toolbar
31894 ToolbarStyle get_style()() {
31895 return gtk_toolbar_get_style(&this);
31898 // DEPRECATED (v2.14) method: get_tooltips - The toolkit-wide #GtkSettings:gtk-enable-tooltips property
31899 // Retrieves whether tooltips are enabled. See
31900 // gtk_toolbar_set_tooltips().
31901 // is now used instead.
31902 // RETURNS: %TRUE if tooltips are enabled
31903 int get_tooltips()() {
31904 return gtk_toolbar_get_tooltips(&this);
31907 // VERSION: 2.4
31908 // Insert a #GtkToolItem into the toolbar at position @pos. If @pos is
31909 // 0 the item is prepended to the start of the toolbar. If @pos is
31910 // negative, the item is appended to the end of the toolbar.
31911 // <item>: a #GtkToolItem
31912 // <pos>: the position of the new item
31913 void insert()(ToolItem* item, int pos) {
31914 gtk_toolbar_insert(&this, item, pos);
31917 // Unintrospectable method: insert_element() / gtk_toolbar_insert_element()
31918 // DEPRECATED (v2.4) method: insert_element - Use gtk_toolbar_insert() instead.
31919 // Inserts a new element in the toolbar at the given position.
31920 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
31921 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
31922 // the radio group for the new element. In all other cases, @widget must
31923 // be %NULL.
31924 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
31925 // RETURNS: the new toolbar element as a #GtkWidget.
31926 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
31927 // <widget>: a #GtkWidget, or %NULL.
31928 // <text>: the element's label.
31929 // <tooltip_text>: the element's tooltip.
31930 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
31931 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
31932 // <callback>: the function to be executed when the button is pressed.
31933 // <user_data>: any data you wish to pass to the callback.
31934 // <position>: the number of widgets to insert this element after.
31935 Widget* insert_element()(ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data, int position) {
31936 return gtk_toolbar_insert_element(&this, type, widget, text, tooltip_text, tooltip_private_text, icon, callback, user_data, position);
31939 // Unintrospectable method: insert_item() / gtk_toolbar_insert_item()
31940 // DEPRECATED (v2.4) method: insert_item - Use gtk_toolbar_insert() instead.
31941 // Inserts a new item into the toolbar. You must specify the position in the
31942 // toolbar where it will be inserted.
31943 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
31944 // RETURNS: the new toolbar item as a #GtkWidget.
31945 // <text>: give your toolbar button a label.
31946 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
31947 // <tooltip_private_text>: use with #GtkTipsQuery.
31948 // <icon>: a #GtkWidget that should be used as the button's icon.
31949 // <callback>: the function to be executed when the button is pressed.
31950 // <user_data>: a pointer to any data you wish to be passed to the callback.
31951 // <position>: the number of widgets to insert this item after.
31952 Widget* insert_item()(char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data, int position) {
31953 return gtk_toolbar_insert_item(&this, text, tooltip_text, tooltip_private_text, icon, callback, user_data, position);
31956 // DEPRECATED (v2.4) method: insert_space - Use gtk_toolbar_insert() instead.
31957 // Inserts a new space in the toolbar at the specified position.
31958 // <position>: the number of widgets after which a space should be inserted.
31959 void insert_space()(int position) {
31960 gtk_toolbar_insert_space(&this, position);
31963 // Unintrospectable method: insert_stock() / gtk_toolbar_insert_stock()
31964 // DEPRECATED (v2.4) method: insert_stock - Use gtk_toolbar_insert() instead.
31965 // Inserts a stock item at the specified position of the toolbar. If
31966 // except that underscores used to mark mnemonics are removed.
31967 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
31968 // RETURNS: the inserted widget
31969 // <stock_id>: The id of the stock item you want to insert
31970 // <tooltip_text>: The text in the tooltip of the toolbar button
31971 // <tooltip_private_text>: The private text of the tooltip
31972 // <callback>: The callback called when the toolbar button is clicked.
31973 // <user_data>: user data passed to callback
31974 // <position>: The position the button shall be inserted at. -1 means at the end.
31975 Widget* insert_stock()(char* stock_id, char* tooltip_text, char* tooltip_private_text, GObject2.Callback callback, void* user_data, int position) {
31976 return gtk_toolbar_insert_stock(&this, stock_id, tooltip_text, tooltip_private_text, callback, user_data, position);
31979 // DEPRECATED (v2.4) method: insert_widget - Use gtk_toolbar_insert() instead.
31980 // Inserts a widget in the toolbar at the given position.
31981 // <widget>: a #GtkWidget to add to the toolbar.
31982 // <tooltip_text>: the element's tooltip.
31983 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
31984 // <position>: the number of widgets to insert this widget after.
31985 void insert_widget()(Widget* widget, char* tooltip_text, char* tooltip_private_text, int position) {
31986 gtk_toolbar_insert_widget(&this, widget, tooltip_text, tooltip_private_text, position);
31989 // Unintrospectable method: prepend_element() / gtk_toolbar_prepend_element()
31990 // DEPRECATED (v2.4) method: prepend_element - Use gtk_toolbar_insert() instead.
31991 // Adds a new element to the beginning of a toolbar.
31992 // If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
31993 // If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
31994 // the radio group for the new element. In all other cases, @widget must
31995 // be %NULL.
31996 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
31997 // RETURNS: the new toolbar element as a #GtkWidget.
31998 // <type>: a value of type #GtkToolbarChildType that determines what @widget will be.
31999 // <widget>: a #GtkWidget, or %NULL
32000 // <text>: the element's label.
32001 // <tooltip_text>: the element's tooltip.
32002 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
32003 // <icon>: a #GtkWidget that provides pictorial representation of the element's function.
32004 // <callback>: the function to be executed when the button is pressed.
32005 // <user_data>: any data you wish to pass to the callback.
32006 Widget* prepend_element()(ToolbarChildType type, Widget* widget, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
32007 return gtk_toolbar_prepend_element(&this, type, widget, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
32010 // Unintrospectable method: prepend_item() / gtk_toolbar_prepend_item()
32011 // DEPRECATED (v2.4) method: prepend_item - Use gtk_toolbar_insert() instead.
32012 // Adds a new button to the beginning (top or left edges) of the given toolbar.
32013 // arguments. Use G_CALLBACK() to cast the function to #GCallback.
32014 // RETURNS: the new toolbar item as a #GtkWidget.
32015 // <text>: give your toolbar button a label.
32016 // <tooltip_text>: a string that appears when the user holds the mouse over this item.
32017 // <tooltip_private_text>: use with #GtkTipsQuery.
32018 // <icon>: a #GtkWidget that should be used as the button's icon.
32019 // <callback>: the function to be executed when the button is pressed.
32020 // <user_data>: a pointer to any data you wish to be passed to the callback.
32021 Widget* prepend_item()(char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data) {
32022 return gtk_toolbar_prepend_item(&this, text, tooltip_text, tooltip_private_text, icon, callback, user_data);
32025 // DEPRECATED (v2.4) method: prepend_space - Use gtk_toolbar_insert() instead.
32026 // Adds a new space to the beginning of the toolbar.
32027 void prepend_space()() {
32028 gtk_toolbar_prepend_space(&this);
32031 // DEPRECATED (v2.4) method: prepend_widget - Use gtk_toolbar_insert() instead.
32032 // Adds a widget to the beginning of the given toolbar.
32033 // <widget>: a #GtkWidget to add to the toolbar.
32034 // <tooltip_text>: the element's tooltip.
32035 // <tooltip_private_text>: used for context-sensitive help about this toolbar element.
32036 void prepend_widget()(Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null) {
32037 gtk_toolbar_prepend_widget(&this, widget, tooltip_text, tooltip_private_text);
32040 // DEPRECATED (v2.4) method: remove_space - Use gtk_toolbar_insert() instead.
32041 // Removes a space from the specified position.
32042 // <position>: the index of the space to remove.
32043 void remove_space()(int position) {
32044 gtk_toolbar_remove_space(&this, position);
32047 // VERSION: 2.4
32048 // Highlights @toolbar to give an idea of what it would look like
32049 // if @item was added to @toolbar at the position indicated by @index_.
32050 // If @item is %NULL, highlighting is turned off. In that case @index_
32051 // is ignored.
32052 // The @tool_item passed to this function must not be part of any widget
32053 // hierarchy. When an item is set as drop highlight item it can not
32054 // added to any widget hierarchy or used as highlight item for another
32055 // toolbar.
32056 // <tool_item>: a #GtkToolItem, or %NULL to turn of highlighting
32057 // <index_>: a position on @toolbar
32058 void set_drop_highlight_item()(ToolItem* tool_item, int index_) {
32059 gtk_toolbar_set_drop_highlight_item(&this, tool_item, index_);
32062 // This function sets the size of stock icons in the toolbar. You
32063 // can call it both before you add the icons and after they've been
32064 // added. The size you set will override user preferences for the default
32065 // icon size.
32066 // This should only be used for special-purpose toolbars, normal
32067 // application toolbars should respect the user preferences for the
32068 // size of icons.
32069 // <icon_size>: The #GtkIconSize that stock icons in the toolbar shall have.
32070 void set_icon_size()(int icon_size) {
32071 gtk_toolbar_set_icon_size(&this, icon_size);
32074 // DEPRECATED (v2.16) method: set_orientation - Use gtk_orientable_set_orientation() instead.
32075 // Sets whether a toolbar should appear horizontally or vertically.
32076 // <orientation>: a new #GtkOrientation.
32077 void set_orientation()(Orientation orientation) {
32078 gtk_toolbar_set_orientation(&this, orientation);
32081 // VERSION: 2.4
32082 // Sets whether to show an overflow menu when
32083 // items that there are not room are available through an
32084 // overflow menu.
32085 // <show_arrow>: Whether to show an overflow menu
32086 void set_show_arrow()(int show_arrow) {
32087 gtk_toolbar_set_show_arrow(&this, show_arrow);
32090 // Alters the view of @toolbar to display either icons only, text only, or both.
32091 // <style>: the new style for @toolbar.
32092 void set_style()(ToolbarStyle style) {
32093 gtk_toolbar_set_style(&this, style);
32096 // DEPRECATED (v2.14) method: set_tooltips - The toolkit-wide #GtkSettings:gtk-enable-tooltips property
32097 // Sets if the tooltips of a toolbar should be active or not.
32098 // is now used instead.
32099 // <enable>: set to %FALSE to disable the tooltips, or %TRUE to enable them.
32100 void set_tooltips()(int enable) {
32101 gtk_toolbar_set_tooltips(&this, enable);
32104 // Unsets toolbar icon size set with gtk_toolbar_set_icon_size(), so that
32105 // user preferences will be used to determine the icon size.
32106 void unset_icon_size()() {
32107 gtk_toolbar_unset_icon_size(&this);
32110 // Unsets a toolbar style set with gtk_toolbar_set_style(), so that
32111 // user preferences will be used to determine the toolbar style.
32112 void unset_style()() {
32113 gtk_toolbar_unset_style(&this);
32116 // A keybinding signal used internally by GTK+. This signal can't
32117 // be used in application code
32118 // RETURNS: %TRUE if the signal was handled, %FALSE if not
32119 // <focus_home>: %TRUE if the first item should be focused
32120 extern (C) alias static c_int function (Toolbar* this_, c_int focus_home, void* user_data=null) signal_focus_home_or_end;
32122 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32123 return super_.signal_connect!name(cb, data, cf);
32126 ulong signal_connect(string name:"focus-home-or-end", CB:signal_focus_home_or_end)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32127 return signal_connect_data!()(&this, cast(char*)"focus-home-or-end",
32128 cast(GObject2.Callback)cb, data, null, cf);
32131 // Emitted when the orientation of the toolbar changes.
32132 // <orientation>: the new #GtkOrientation of the toolbar
32133 extern (C) alias static void function (Toolbar* this_, Orientation* orientation, void* user_data=null) signal_orientation_changed;
32134 ulong signal_connect(string name:"orientation-changed", CB:signal_orientation_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32135 return signal_connect_data!()(&this, cast(char*)"orientation-changed",
32136 cast(GObject2.Callback)cb, data, null, cf);
32139 // Emitted when the user right-clicks the toolbar or uses the
32140 // keybinding to display a popup menu.
32141 // Application developers should handle this signal if they want
32142 // to display a context menu on the toolbar. The context-menu should
32143 // appear at the coordinates given by @x and @y. The mouse button
32144 // number is given by the @button parameter. If the menu was popped
32145 // up using the keybaord, @button is -1.
32146 // RETURNS: return %TRUE if the signal was handled, %FALSE if not
32147 // <x>: the x coordinate of the point where the menu should appear
32148 // <y>: the y coordinate of the point where the menu should appear
32149 // <button>: the mouse button the user pressed, or -1
32150 extern (C) alias static c_int function (Toolbar* this_, int x, int y, int button, void* user_data=null) signal_popup_context_menu;
32151 ulong signal_connect(string name:"popup-context-menu", CB:signal_popup_context_menu)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32152 return signal_connect_data!()(&this, cast(char*)"popup-context-menu",
32153 cast(GObject2.Callback)cb, data, null, cf);
32156 // Emitted when the style of the toolbar changes.
32157 // <style>: the new #GtkToolbarStyle of the toolbar
32158 extern (C) alias static void function (Toolbar* this_, ToolbarStyle* style, void* user_data=null) signal_style_changed;
32159 ulong signal_connect(string name:"style-changed", CB:signal_style_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32160 return signal_connect_data!()(&this, cast(char*)"style-changed",
32161 cast(GObject2.Callback)cb, data, null, cf);
32165 struct ToolbarChild {
32166 ToolbarChildType type;
32167 Widget* widget, icon, label;
32170 enum ToolbarChildType {
32171 SPACE = 0,
32172 BUTTON = 1,
32173 TOGGLEBUTTON = 2,
32174 RADIOBUTTON = 3,
32175 WIDGET = 4
32177 struct ToolbarClass {
32178 ContainerClass parent_class;
32179 extern (C) void function (Toolbar* toolbar, Orientation orientation) orientation_changed;
32180 extern (C) void function (Toolbar* toolbar, ToolbarStyle style) style_changed;
32181 extern (C) int function (Toolbar* toolbar, int x, int y, int button_number) popup_context_menu;
32182 extern (C) void function () _gtk_reserved1;
32183 extern (C) void function () _gtk_reserved2;
32184 extern (C) void function () _gtk_reserved3;
32187 struct ToolbarPrivate {
32190 enum ToolbarSpaceStyle {
32191 EMPTY = 0,
32192 LINE = 1
32194 enum ToolbarStyle {
32195 ICONS = 0,
32196 TEXT = 1,
32197 BOTH = 2,
32198 BOTH_HORIZ = 3
32200 struct Tooltip /* : GObject.Object */ {
32201 alias method_parent this;
32202 alias method_parent super_;
32203 alias method_parent object;
32204 GObject2.Object method_parent;
32207 // VERSION: 2.12
32208 // Triggers a new tooltip query on @display, in order to update the current
32209 // visible tooltip, or to show/hide the current tooltip. This function is
32210 // useful to call when, for example, the state of the widget changed by a
32211 // key press.
32212 // <display>: a #GdkDisplay
32213 static void trigger_tooltip_query()(Gdk2.Display* display) {
32214 gtk_tooltip_trigger_tooltip_query(display);
32217 // VERSION: 2.12
32218 // Replaces the widget packed into the tooltip with
32219 // away.
32220 // By default a box with a #GtkImage and #GtkLabel is embedded in
32221 // the tooltip, which can be configured using gtk_tooltip_set_markup()
32222 // and gtk_tooltip_set_icon().
32223 // <custom_widget>: a #GtkWidget, or %NULL to unset the old custom widget.
32224 void set_custom()(Widget* custom_widget=null) {
32225 gtk_tooltip_set_custom(&this, custom_widget);
32228 // VERSION: 2.12
32229 // Sets the icon of the tooltip (which is in front of the text) to be
32230 // <pixbuf>: a #GdkPixbuf, or %NULL
32231 void set_icon()(GdkPixbuf2.Pixbuf* pixbuf=null) {
32232 gtk_tooltip_set_icon(&this, pixbuf);
32235 // VERSION: 2.20
32236 // Sets the icon of the tooltip (which is in front of the text)
32237 // to be the icon indicated by @gicon with the size indicated
32238 // by @size. If @gicon is %NULL, the image will be hidden.
32239 // <gicon>: a #GIcon representing the icon, or %NULL
32240 // <size>: a stock icon size
32241 void set_icon_from_gicon()(Gio2.Icon* gicon, int size) {
32242 gtk_tooltip_set_icon_from_gicon(&this, gicon, size);
32245 // VERSION: 2.14
32246 // Sets the icon of the tooltip (which is in front of the text) to be
32247 // the icon indicated by @icon_name with the size indicated
32248 // by @size. If @icon_name is %NULL, the image will be hidden.
32249 // <icon_name>: an icon name, or %NULL
32250 // <size>: a stock icon size
32251 void set_icon_from_icon_name()(char* icon_name, int size) {
32252 gtk_tooltip_set_icon_from_icon_name(&this, icon_name, size);
32255 // VERSION: 2.12
32256 // Sets the icon of the tooltip (which is in front of the text) to be
32257 // the stock item indicated by @stock_id with the size indicated
32258 // by @size. If @stock_id is %NULL, the image will be hidden.
32259 // <stock_id>: a stock id, or %NULL
32260 // <size>: a stock icon size
32261 void set_icon_from_stock()(char* stock_id, int size) {
32262 gtk_tooltip_set_icon_from_stock(&this, stock_id, size);
32265 // VERSION: 2.12
32266 // Sets the text of the tooltip to be @markup, which is marked up
32267 // with the <link
32268 // linkend="PangoMarkupFormat">Pango text markup language</link>.
32269 // If @markup is %NULL, the label will be hidden.
32270 // <markup>: a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>) or %NULL
32271 void set_markup()(char* markup=null) {
32272 gtk_tooltip_set_markup(&this, markup);
32275 // VERSION: 2.12
32276 // Sets the text of the tooltip to be @text. If @text is %NULL, the label
32277 // will be hidden. See also gtk_tooltip_set_markup().
32278 // <text>: a text string or %NULL
32279 void set_text()(char* text=null) {
32280 gtk_tooltip_set_text(&this, text);
32283 // VERSION: 2.12
32284 // Sets the area of the widget, where the contents of this tooltip apply,
32285 // to be @rect (in widget coordinates). This is especially useful for
32286 // properly setting tooltips on #GtkTreeView rows and cells, #GtkIconViews,
32287 // etc.
32288 // For setting tooltips on #GtkTreeView, please refer to the convenience
32289 // gtk_tree_view_set_tooltip_cell().
32290 // <rect>: a #GdkRectangle
32291 void set_tip_area()(Gdk2.Rectangle* rect) {
32292 gtk_tooltip_set_tip_area(&this, rect);
32296 struct Tooltips /* : Object */ {
32297 alias parent_instance this;
32298 alias parent_instance super_;
32299 alias parent_instance object;
32300 Object parent_instance;
32301 private Widget* tip_window, tip_label;
32302 private TooltipsData* active_tips_data;
32303 private GLib2.List* tips_data_list;
32304 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
32305 uint, "delay", 30,
32306 uint, "enabled", 1,
32307 uint, "have_grab", 1,
32308 uint, "use_sticky_delay", 1,
32309 uint, "__dummy64A", 31));
32310 private int timer_tag;
32311 private GLib2.TimeVal last_popdown;
32313 static Tooltips* new_()() {
32314 return gtk_tooltips_new();
32317 // VERSION: 2.4
32318 // DEPRECATED function: get_info_from_tip_window - 2.12:
32319 // Determines the tooltips and the widget they belong to from the window in
32320 // which they are displayed.
32321 // This function is mostly intended for use by accessibility technologies;
32322 // applications should have little use for it.
32323 // RETURNS: %TRUE if @tip_window is displaying tooltips, otherwise %FALSE.
32324 // <tip_window>: a #GtkWindow
32325 // <tooltips>: the return location for the tooltips which are displayed in @tip_window, or %NULL
32326 // <current_widget>: the return location for the widget whose tooltips are displayed, or %NULL
32327 static int get_info_from_tip_window()(Window* tip_window, Tooltips** tooltips, Widget** current_widget) {
32328 return gtk_tooltips_get_info_from_tip_window(tip_window, tooltips, current_widget);
32330 void disable()() {
32331 gtk_tooltips_disable(&this);
32333 void enable()() {
32334 gtk_tooltips_enable(&this);
32336 void force_window()() {
32337 gtk_tooltips_force_window(&this);
32339 void set_delay()(uint delay) {
32340 gtk_tooltips_set_delay(&this, delay);
32343 // DEPRECATED method: set_tip - 2.12:
32344 // Adds a tooltip containing the message @tip_text to the specified #GtkWidget.
32345 // <widget>: the #GtkWidget you wish to associate the tip with.
32346 // <tip_text>: a string containing the tip itself.
32347 // <tip_private>: a string of any further information that may be useful if the user gets stuck.
32348 void set_tip()(Widget* widget, char* tip_text=null, char* tip_private=null) {
32349 gtk_tooltips_set_tip(&this, widget, tip_text, tip_private);
32353 struct TooltipsClass {
32354 ObjectClass parent_class;
32355 extern (C) void function () _gtk_reserved1;
32356 extern (C) void function () _gtk_reserved2;
32357 extern (C) void function () _gtk_reserved3;
32358 extern (C) void function () _gtk_reserved4;
32361 struct TooltipsData {
32362 Tooltips* tooltips;
32363 Widget* widget;
32364 char* tip_text, tip_private;
32367 extern (C) alias char* /*new*/ function (char* path, void* func_data) TranslateFunc;
32369 extern (C) alias void function (TreeViewColumn* tree_column, CellRenderer* cell, TreeModel* tree_model, TreeIter* iter, void* data) TreeCellDataFunc;
32371 extern (C) alias void function (TreeView* tree_view, TreePath* path, int children, void* user_data) TreeDestroyCountFunc;
32373 struct TreeDragDest /* Interface */ {
32374 mixin template __interface__() {
32375 // Asks the #GtkTreeDragDest to insert a row before the path @dest,
32376 // deriving the contents of the row from @selection_data. If @dest is
32377 // outside the tree so that inserting before it is impossible, %FALSE
32378 // will be returned. Also, %FALSE may be returned if the new row is
32379 // not created for some model-specific reason. Should robustly handle
32380 // a @dest no longer found in the model!
32381 // RETURNS: whether a new row was created before position @dest
32382 // <dest>: row to drop in front of
32383 // <selection_data>: data to drop
32384 int drag_data_received()(TreePath* dest, SelectionData* selection_data) {
32385 return gtk_tree_drag_dest_drag_data_received(cast(TreeDragDest*)&this, dest, selection_data);
32388 // Determines whether a drop is possible before the given @dest_path,
32389 // at the same depth as @dest_path. i.e., can we drop the data in
32390 // exist; the return value will almost certainly be %FALSE if the
32391 // parent of @dest_path doesn't exist, though.
32392 // RETURNS: %TRUE if a drop is possible before @dest_path
32393 // <dest_path>: destination row
32394 // <selection_data>: the data being dragged
32395 int row_drop_possible()(TreePath* dest_path, SelectionData* selection_data) {
32396 return gtk_tree_drag_dest_row_drop_possible(cast(TreeDragDest*)&this, dest_path, selection_data);
32399 mixin __interface__;
32402 struct TreeDragDestIface {
32403 GObject2.TypeInterface g_iface;
32405 // RETURNS: whether a new row was created before position @dest
32406 // <dest>: row to drop in front of
32407 // <selection_data>: data to drop
32408 extern (C) int function (TreeDragDest* drag_dest, TreePath* dest, SelectionData* selection_data) drag_data_received;
32410 // RETURNS: %TRUE if a drop is possible before @dest_path
32411 // <dest_path>: destination row
32412 // <selection_data>: the data being dragged
32413 extern (C) int function (TreeDragDest* drag_dest, TreePath* dest_path, SelectionData* selection_data) row_drop_possible;
32416 struct TreeDragSource /* Interface */ {
32417 mixin template __interface__() {
32418 // Asks the #GtkTreeDragSource to delete the row at @path, because
32419 // it was moved somewhere else via drag-and-drop. Returns %FALSE
32420 // if the deletion fails because @path no longer exists, or for
32421 // some model-specific reason. Should robustly handle a @path no
32422 // longer found in the model!
32423 // RETURNS: %TRUE if the row was successfully deleted
32424 // <path>: row that was being dragged
32425 int drag_data_delete()(TreePath* path) {
32426 return gtk_tree_drag_source_drag_data_delete(cast(TreeDragSource*)&this, path);
32429 // Asks the #GtkTreeDragSource to fill in @selection_data with a
32430 // representation of the row at @path. @selection_data->target gives
32431 // the required type of the data. Should robustly handle a @path no
32432 // longer found in the model!
32433 // RETURNS: %TRUE if data of the required type was provided
32434 // <path>: row that was dragged
32435 // <selection_data>: a #GtkSelectionData to fill with data from the dragged row
32436 int drag_data_get()(TreePath* path, /*out*/ SelectionData* selection_data) {
32437 return gtk_tree_drag_source_drag_data_get(cast(TreeDragSource*)&this, path, selection_data);
32440 // Asks the #GtkTreeDragSource whether a particular row can be used as
32441 // the source of a DND operation. If the source doesn't implement
32442 // this interface, the row is assumed draggable.
32443 // RETURNS: %TRUE if the row can be dragged
32444 // <path>: row on which user is initiating a drag
32445 int row_draggable()(TreePath* path) {
32446 return gtk_tree_drag_source_row_draggable(cast(TreeDragSource*)&this, path);
32449 mixin __interface__;
32452 struct TreeDragSourceIface {
32453 GObject2.TypeInterface g_iface;
32455 // RETURNS: %TRUE if the row can be dragged
32456 // <path>: row on which user is initiating a drag
32457 extern (C) int function (TreeDragSource* drag_source, TreePath* path) row_draggable;
32459 // RETURNS: %TRUE if data of the required type was provided
32460 // <path>: row that was dragged
32461 // <selection_data>: a #GtkSelectionData to fill with data from the dragged row
32462 extern (C) int function (TreeDragSource* drag_source, TreePath* path, /*out*/ SelectionData* selection_data) drag_data_get;
32464 // RETURNS: %TRUE if the row was successfully deleted
32465 // <path>: row that was being dragged
32466 extern (C) int function (TreeDragSource* drag_source, TreePath* path) drag_data_delete;
32469 struct TreeIter {
32470 int stamp;
32471 void* user_data, user_data2, user_data3;
32474 // Creates a dynamically allocated tree iterator as a copy of @iter.
32475 // This function is not intended for use in applications, because you
32476 // can just copy the structs by value
32477 // (<literal>GtkTreeIter new_iter = iter;</literal>).
32478 // You must free this iter with gtk_tree_iter_free().
32479 // RETURNS: a newly-allocated copy of @iter.
32480 TreeIter* /*new*/ copy()() {
32481 return gtk_tree_iter_copy(&this);
32484 // Frees an iterator that has been allocated by gtk_tree_iter_copy().
32485 // This function is mainly used for language bindings.
32486 void free()() {
32487 gtk_tree_iter_free(&this);
32491 extern (C) alias int function (TreeModel* model, TreeIter* a, TreeIter* b, void* user_data) TreeIterCompareFunc;
32493 struct TreeModel /* Interface */ {
32494 mixin template __interface__() {
32495 // VERSION: 2.4
32496 // Creates a new #GtkTreeModel, with @child_model as the child_model
32497 // and @root as the virtual root.
32498 // RETURNS: A new #GtkTreeModel.
32499 // <root>: A #GtkTreePath or %NULL.
32500 TreeModel* /*new*/ filter_new()(TreePath* root=null) {
32501 return gtk_tree_model_filter_new(cast(TreeModel*)&this, root);
32504 // Calls func on each node in model in a depth-first fashion.
32505 // If @func returns %TRUE, then the tree ceases to be walked, and
32506 // gtk_tree_model_foreach() returns.
32507 // <func>: A function to be called on each row
32508 // <user_data>: User data to passed to func.
32509 void foreach_()(TreeModelForeachFunc func, void* user_data) {
32510 gtk_tree_model_foreach(cast(TreeModel*)&this, func, user_data);
32513 // Unintrospectable method: get() / gtk_tree_model_get()
32514 // Gets the value of one or more cells in the row referenced by @iter.
32515 // The variable argument list should contain integer column numbers,
32516 // each column number followed by a place to store the value being
32517 // retrieved. The list is terminated by a -1. For example, to get a
32518 // value from column 0 with type %G_TYPE_STRING, you would
32519 // where <literal>place_string_here</literal> is a <type>gchar*</type> to be
32520 // filled with the string.
32521 // Returned values with type %G_TYPE_OBJECT have to be unreferenced, values
32522 // with type %G_TYPE_STRING or %G_TYPE_BOXED have to be freed. Other values are
32523 // passed by value.
32524 // <iter>: a row in @tree_model
32525 /+ Not available -- variadic methods unsupported - use the C function directly.
32526 alias gtk_tree_model_get get; // Variadic
32529 // Returns the type of the column.
32530 // RETURNS: The type of the column.
32531 // <index_>: The column index.
32532 Type get_column_type()(int index_) {
32533 return gtk_tree_model_get_column_type(cast(TreeModel*)&this, index_);
32536 // Returns a set of flags supported by this interface. The flags are a bitwise
32537 // combination of #GtkTreeModelFlags. The flags supported should not change
32538 // during the lifecycle of the @tree_model.
32539 // RETURNS: The flags supported by this interface.
32540 TreeModelFlags get_flags()() {
32541 return gtk_tree_model_get_flags(cast(TreeModel*)&this);
32544 // Sets @iter to a valid iterator pointing to @path.
32545 // RETURNS: %TRUE, if @iter was set.
32546 // <iter>: The uninitialized #GtkTreeIter.
32547 // <path>: The #GtkTreePath.
32548 int get_iter()(/*out*/ TreeIter* iter, TreePath* path) {
32549 return gtk_tree_model_get_iter(cast(TreeModel*)&this, iter, path);
32552 // Initializes @iter with the first iterator in the tree (the one at the path
32553 // "0") and returns %TRUE. Returns %FALSE if the tree is empty.
32554 // RETURNS: %TRUE, if @iter was set.
32555 // <iter>: The uninitialized #GtkTreeIter.
32556 int get_iter_first()(/*out*/ TreeIter* iter) {
32557 return gtk_tree_model_get_iter_first(cast(TreeModel*)&this, iter);
32560 // Sets @iter to a valid iterator pointing to @path_string, if it
32561 // exists. Otherwise, @iter is left invalid and %FALSE is returned.
32562 // RETURNS: %TRUE, if @iter was set.
32563 // <iter>: An uninitialized #GtkTreeIter.
32564 // <path_string>: A string representation of a #GtkTreePath.
32565 int get_iter_from_string()(/*out*/ TreeIter* iter, char* path_string) {
32566 return gtk_tree_model_get_iter_from_string(cast(TreeModel*)&this, iter, path_string);
32569 // Returns the number of columns supported by @tree_model.
32570 // RETURNS: The number of columns.
32571 int get_n_columns()() {
32572 return gtk_tree_model_get_n_columns(cast(TreeModel*)&this);
32575 // Returns a newly-created #GtkTreePath referenced by @iter. This path should
32576 // be freed with gtk_tree_path_free().
32577 // RETURNS: a newly-created #GtkTreePath.
32578 // <iter>: The #GtkTreeIter.
32579 TreePath* /*new*/ get_path()(TreeIter* iter) {
32580 return gtk_tree_model_get_path(cast(TreeModel*)&this, iter);
32583 // VERSION: 2.2
32584 // Generates a string representation of the iter. This string is a ':'
32585 // separated list of numbers. For example, "4:10:0:3" would be an
32586 // acceptable return value for this string.
32587 // RETURNS: A newly-allocated string. Must be freed with g_free().
32588 // <iter>: An #GtkTreeIter.
32589 char* /*new*/ get_string_from_iter()(TreeIter* iter) {
32590 return gtk_tree_model_get_string_from_iter(cast(TreeModel*)&this, iter);
32593 // Unintrospectable method: get_valist() / gtk_tree_model_get_valist()
32594 // See gtk_tree_model_get(), this version takes a <type>va_list</type>
32595 // for language bindings to use.
32596 // <iter>: a row in @tree_model
32597 // <var_args>: <type>va_list</type> of column/return location pairs
32598 void get_valist()(TreeIter* iter, va_list var_args) {
32599 gtk_tree_model_get_valist(cast(TreeModel*)&this, iter, var_args);
32602 // Initializes and sets @value to that at @column.
32603 // When done with @value, g_value_unset() needs to be called
32604 // to free any allocated memory.
32605 // <iter>: The #GtkTreeIter.
32606 // <column>: The column to lookup the value at.
32607 // <value>: An empty #GValue to set.
32608 void get_value()(TreeIter* iter, int column, /*out*/ GObject2.Value* value) {
32609 gtk_tree_model_get_value(cast(TreeModel*)&this, iter, column, value);
32612 // Sets @iter to point to the first child of @parent. If @parent has no
32613 // children, %FALSE is returned and @iter is set to be invalid. @parent
32614 // will remain a valid node after this function has been called.
32615 // If @parent is %NULL returns the first node, equivalent to
32616 // <literal>gtk_tree_model_get_iter_first (tree_model, iter);</literal>
32617 // RETURNS: %TRUE, if @child has been set to the first child.
32618 // <iter>: The new #GtkTreeIter to be set to the child.
32619 // <parent>: The #GtkTreeIter, or %NULL
32620 int iter_children()(/*out*/ TreeIter* iter, TreeIter* parent=null) {
32621 return gtk_tree_model_iter_children(cast(TreeModel*)&this, iter, parent);
32624 // Returns %TRUE if @iter has children, %FALSE otherwise.
32625 // RETURNS: %TRUE if @iter has children.
32626 // <iter>: The #GtkTreeIter to test for children.
32627 int iter_has_child()(TreeIter* iter) {
32628 return gtk_tree_model_iter_has_child(cast(TreeModel*)&this, iter);
32631 // Returns the number of children that @iter has. As a special case, if @iter
32632 // is %NULL, then the number of toplevel nodes is returned.
32633 // RETURNS: The number of children of @iter.
32634 // <iter>: The #GtkTreeIter, or %NULL.
32635 int iter_n_children()(TreeIter* iter=null) {
32636 return gtk_tree_model_iter_n_children(cast(TreeModel*)&this, iter);
32639 // Sets @iter to point to the node following it at the current level. If there
32640 // is no next @iter, %FALSE is returned and @iter is set to be invalid.
32641 // RETURNS: %TRUE if @iter has been changed to the next node.
32642 // <iter>: The #GtkTreeIter.
32643 int iter_next()(TreeIter* iter) {
32644 return gtk_tree_model_iter_next(cast(TreeModel*)&this, iter);
32647 // Sets @iter to be the child of @parent, using the given index. The first
32648 // index is 0. If @n is too big, or @parent has no children, @iter is set
32649 // to an invalid iterator and %FALSE is returned. @parent will remain a valid
32650 // node after this function has been called. As a special case, if @parent is
32651 // %NULL, then the @n<!-- -->th root node is set.
32652 // RETURNS: %TRUE, if @parent has an @n<!-- -->th child.
32653 // <iter>: The #GtkTreeIter to set to the nth child.
32654 // <parent>: The #GtkTreeIter to get the child from, or %NULL.
32655 // <n>: Then index of the desired child.
32656 int iter_nth_child()(/*out*/ TreeIter* iter, TreeIter* parent, int n) {
32657 return gtk_tree_model_iter_nth_child(cast(TreeModel*)&this, iter, parent, n);
32660 // Sets @iter to be the parent of @child. If @child is at the toplevel, and
32661 // doesn't have a parent, then @iter is set to an invalid iterator and %FALSE
32662 // is returned. @child will remain a valid node after this function has been
32663 // called.
32664 // RETURNS: %TRUE, if @iter is set to the parent of @child.
32665 // <iter>: The new #GtkTreeIter to set to the parent.
32666 // <child>: The #GtkTreeIter.
32667 int iter_parent()(/*out*/ TreeIter* iter, TreeIter* child) {
32668 return gtk_tree_model_iter_parent(cast(TreeModel*)&this, iter, child);
32671 // Lets the tree ref the node. This is an optional method for models to
32672 // implement. To be more specific, models may ignore this call as it exists
32673 // primarily for performance reasons.
32674 // This function is primarily meant as a way for views to let caching model
32675 // know when nodes are being displayed (and hence, whether or not to cache that
32676 // node.) For example, a file-system based model would not want to keep the
32677 // entire file-hierarchy in memory, just the sections that are currently being
32678 // displayed by every current view.
32679 // A model should be expected to be able to get an iter independent of its
32680 // reffed state.
32681 // <iter>: The #GtkTreeIter.
32682 void ref_node()(TreeIter* iter) {
32683 gtk_tree_model_ref_node(cast(TreeModel*)&this, iter);
32686 // Emits the "row-changed" signal on @tree_model.
32687 // <path>: A #GtkTreePath pointing to the changed row
32688 // <iter>: A valid #GtkTreeIter pointing to the changed row
32689 void row_changed()(TreePath* path, TreeIter* iter) {
32690 gtk_tree_model_row_changed(cast(TreeModel*)&this, path, iter);
32693 // Emits the "row-deleted" signal on @tree_model. This should be called by
32694 // models after a row has been removed. The location pointed to by @path
32695 // should be the location that the row previously was at. It may not be a
32696 // valid location anymore.
32697 // <path>: A #GtkTreePath pointing to the previous location of the deleted row.
32698 void row_deleted()(TreePath* path) {
32699 gtk_tree_model_row_deleted(cast(TreeModel*)&this, path);
32702 // Emits the "row-has-child-toggled" signal on @tree_model. This should be
32703 // called by models after the child state of a node changes.
32704 // <path>: A #GtkTreePath pointing to the changed row
32705 // <iter>: A valid #GtkTreeIter pointing to the changed row
32706 void row_has_child_toggled()(TreePath* path, TreeIter* iter) {
32707 gtk_tree_model_row_has_child_toggled(cast(TreeModel*)&this, path, iter);
32710 // Emits the "row-inserted" signal on @tree_model
32711 // <path>: A #GtkTreePath pointing to the inserted row
32712 // <iter>: A valid #GtkTreeIter pointing to the inserted row
32713 void row_inserted()(TreePath* path, TreeIter* iter) {
32714 gtk_tree_model_row_inserted(cast(TreeModel*)&this, path, iter);
32717 // Emits the "rows-reordered" signal on @tree_model. This should be called by
32718 // models when their rows have been reordered.
32719 // <path>: A #GtkTreePath pointing to the tree node whose children have been reordered
32720 // <iter>: A valid #GtkTreeIter pointing to the node whose children have been reordered, or %NULL if the depth of @path is 0.
32721 // <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>.
32722 void rows_reordered()(TreePath* path, TreeIter* iter, int* new_order) {
32723 gtk_tree_model_rows_reordered(cast(TreeModel*)&this, path, iter, new_order);
32726 // Creates a new #GtkTreeModel, with @child_model as the child model.
32727 // RETURNS: A new #GtkTreeModel.
32728 TreeModel* /*new*/ sort_new_with_model()() {
32729 return gtk_tree_model_sort_new_with_model(cast(TreeModel*)&this);
32732 // Lets the tree unref the node. This is an optional method for models to
32733 // implement. To be more specific, models may ignore this call as it exists
32734 // primarily for performance reasons.
32735 // For more information on what this means, see gtk_tree_model_ref_node().
32736 // Please note that nodes that are deleted are not unreffed.
32737 // <iter>: The #GtkTreeIter.
32738 void unref_node()(TreeIter* iter) {
32739 gtk_tree_model_unref_node(cast(TreeModel*)&this, iter);
32742 // This signal is emitted when a row in the model has changed.
32743 // <path>: a #GtkTreePath identifying the changed row
32744 // <iter>: a valid #GtkTreeIter pointing to the changed row
32745 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) signal_row_changed;
32747 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32748 return super_.signal_connect!name(cb, data, cf);
32751 ulong signal_connect(string name:"row-changed", CB:signal_row_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32752 return signal_connect_data!()(&this, cast(char*)"row-changed",
32753 cast(GObject2.Callback)cb, data, null, cf);
32756 // This signal is emitted when a row has been deleted.
32757 // Note that no iterator is passed to the signal handler,
32758 // since the row is already deleted.
32759 // This should be called by models after a row has been removed.
32760 // The location pointed to by @path should be the location that
32761 // the row previously was at. It may not be a valid location anymore.
32762 // <path>: a #GtkTreePath identifying the row
32763 extern (C) alias static void function (TreeModel* this_, TreePath* path, void* user_data=null) signal_row_deleted;
32764 ulong signal_connect(string name:"row-deleted", CB:signal_row_deleted)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32765 return signal_connect_data!()(&this, cast(char*)"row-deleted",
32766 cast(GObject2.Callback)cb, data, null, cf);
32769 // This signal is emitted when a row has gotten the first child row or lost
32770 // its last child row.
32771 // <path>: a #GtkTreePath identifying the row
32772 // <iter>: a valid #GtkTreeIter pointing to the row
32773 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) signal_row_has_child_toggled;
32774 ulong signal_connect(string name:"row-has-child-toggled", CB:signal_row_has_child_toggled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32775 return signal_connect_data!()(&this, cast(char*)"row-has-child-toggled",
32776 cast(GObject2.Callback)cb, data, null, cf);
32779 // This signal is emitted when a new row has been inserted in the model.
32780 // Note that the row may still be empty at this point, since
32781 // it is a common pattern to first insert an empty row, and
32782 // then fill it with the desired values.
32783 // <path>: a #GtkTreePath identifying the new row
32784 // <iter>: a valid #GtkTreeIter pointing to the new row
32785 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* user_data=null) signal_row_inserted;
32786 ulong signal_connect(string name:"row-inserted", CB:signal_row_inserted)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32787 return signal_connect_data!()(&this, cast(char*)"row-inserted",
32788 cast(GObject2.Callback)cb, data, null, cf);
32791 // This signal is emitted when the children of a node in the #GtkTreeModel
32792 // have been reordered.
32793 // Note that this signal is <emphasis>not</emphasis> emitted
32794 // when rows are reordered by DND, since this is implemented
32795 // by removing and then reinserting the row.
32796 // <path>: a #GtkTreePath identifying the tree node whose children have been reordered
32797 // <iter>: a valid #GtkTreeIter pointing to the node whose
32798 // <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>.
32799 extern (C) alias static void function (TreeModel* this_, TreePath* path, TreeIter* iter, void* new_order, void* user_data=null) signal_rows_reordered;
32800 ulong signal_connect(string name:"rows-reordered", CB:signal_rows_reordered)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
32801 return signal_connect_data!()(&this, cast(char*)"rows-reordered",
32802 cast(GObject2.Callback)cb, data, null, cf);
32805 mixin __interface__;
32808 struct TreeModelFilter /* : GObject.Object */ {
32809 mixin TreeDragSource.__interface__;
32810 mixin TreeModel.__interface__;
32811 alias parent this;
32812 alias parent super_;
32813 alias parent object;
32814 GObject2.Object parent;
32815 private TreeModelFilterPrivate* priv;
32818 // VERSION: 2.4
32819 // This function should almost never be called. It clears the @filter
32820 // of any cached iterators that haven't been reffed with
32821 // gtk_tree_model_ref_node(). This might be useful if the child model
32822 // being filtered is static (and doesn't change often) and there has been
32823 // a lot of unreffed access to nodes. As a side effect of this function,
32824 // all unreffed iters will be invalid.
32825 void clear_cache()() {
32826 gtk_tree_model_filter_clear_cache(&this);
32829 // VERSION: 2.4
32830 // Sets @filter_iter to point to the row in @filter that corresponds to the
32831 // row pointed at by @child_iter. If @filter_iter was not set, %FALSE is
32832 // returned.
32833 // valid iterator pointing to a visible row in child model.
32834 // RETURNS: %TRUE, if @filter_iter was set, i.e. if @child_iter is a
32835 // <filter_iter>: An uninitialized #GtkTreeIter.
32836 // <child_iter>: A valid #GtkTreeIter pointing to a row on the child model.
32837 int convert_child_iter_to_iter()(/*out*/ TreeIter* filter_iter, TreeIter* child_iter) {
32838 return gtk_tree_model_filter_convert_child_iter_to_iter(&this, filter_iter, child_iter);
32841 // VERSION: 2.4
32842 // Converts @child_path to a path relative to @filter. That is, @child_path
32843 // points to a path in the child model. The rerturned path will point to the
32844 // same row in the filtered model. If @child_path isn't a valid path on the
32845 // child model or points to a row which is not visible in @filter, then %NULL
32846 // is returned.
32847 // RETURNS: A newly allocated #GtkTreePath, or %NULL.
32848 // <child_path>: A #GtkTreePath to convert.
32849 TreePath* /*new*/ convert_child_path_to_path()(TreePath* child_path) {
32850 return gtk_tree_model_filter_convert_child_path_to_path(&this, child_path);
32853 // VERSION: 2.4
32854 // Sets @child_iter to point to the row pointed to by @filter_iter.
32855 // <child_iter>: An uninitialized #GtkTreeIter.
32856 // <filter_iter>: A valid #GtkTreeIter pointing to a row on @filter.
32857 void convert_iter_to_child_iter()(/*out*/ TreeIter* child_iter, TreeIter* filter_iter) {
32858 gtk_tree_model_filter_convert_iter_to_child_iter(&this, child_iter, filter_iter);
32861 // VERSION: 2.4
32862 // Converts @filter_path to a path on the child model of @filter. That is,
32863 // point to the same location in the model not being filtered. If @filter_path
32864 // does not point to a location in the child model, %NULL is returned.
32865 // RETURNS: A newly allocated #GtkTreePath, or %NULL.
32866 // <filter_path>: A #GtkTreePath to convert.
32867 TreePath* /*new*/ convert_path_to_child_path()(TreePath* filter_path) {
32868 return gtk_tree_model_filter_convert_path_to_child_path(&this, filter_path);
32871 // VERSION: 2.4
32872 // Returns a pointer to the child model of @filter.
32873 // RETURNS: A pointer to a #GtkTreeModel.
32874 TreeModel* get_model()() {
32875 return gtk_tree_model_filter_get_model(&this);
32878 // VERSION: 2.4
32879 // Emits ::row_changed for each row in the child model, which causes
32880 // the filter to re-evaluate whether a row is visible or not.
32881 void refilter()() {
32882 gtk_tree_model_filter_refilter(&this);
32885 // VERSION: 2.4
32886 // With the @n_columns and @types parameters, you give an array of column
32887 // types for this model (which will be exposed to the parent model/view).
32888 // The @func, @data and @destroy parameters are for specifying the modify
32889 // function. The modify function will get called for <emphasis>each</emphasis>
32890 // data access, the goal of the modify function is to return the data which
32891 // should be displayed at the location specified using the parameters of the
32892 // modify function.
32893 // <n_columns>: The number of columns in the filter model.
32894 // <types>: The #GType<!-- -->s of the columns.
32895 // <func>: A #GtkTreeModelFilterModifyFunc
32896 // <data>: User data to pass to the modify function, or %NULL.
32897 // <destroy>: Destroy notifier of @data, or %NULL.
32898 void set_modify_func()(int n_columns, Type* types, TreeModelFilterModifyFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
32899 gtk_tree_model_filter_set_modify_func(&this, n_columns, types, func, data, destroy);
32902 // VERSION: 2.4
32903 // Sets @column of the child_model to be the column where @filter should
32904 // look for visibility information. @columns should be a column of type
32905 // %G_TYPE_BOOLEAN, where %TRUE means that a row is visible, and %FALSE
32906 // if not.
32907 // <column>: A #gint which is the column containing the visible information.
32908 void set_visible_column()(int column) {
32909 gtk_tree_model_filter_set_visible_column(&this, column);
32912 // VERSION: 2.4
32913 // Sets the visible function used when filtering the @filter to be @func. The
32914 // function should return %TRUE if the given row should be visible and
32915 // %FALSE otherwise.
32916 // If the condition calculated by the function changes over time (e.g. because
32917 // it depends on some global parameters), you must call
32918 // gtk_tree_model_filter_refilter() to keep the visibility information of
32919 // the model uptodate.
32920 // Note that @func is called whenever a row is inserted, when it may still be
32921 // empty. The visible function should therefore take special care of empty
32922 // rows, like in the example below.
32923 // <informalexample><programlisting>
32924 // static gboolean
32925 // visible_func (GtkTreeModel *model,
32926 // GtkTreeIter *iter,
32927 // gpointer data)
32928 // {
32929 // /&ast; Visible if row is non-empty and first column is "HI" &ast;/
32930 // gchar *str;
32931 // gboolean visible = FALSE;
32932 // gtk_tree_model_get (model, iter, 0, &str, -1);
32933 // if (str && strcmp (str, "HI") == 0)
32934 // visible = TRUE;
32935 // g_free (str);
32936 // return visible;
32937 // }
32938 // </programlisting></informalexample>
32939 // <func>: A #GtkTreeModelFilterVisibleFunc, the visible function.
32940 // <data>: User data to pass to the visible function, or %NULL.
32941 // <destroy>: Destroy notifier of @data, or %NULL.
32942 void set_visible_func()(TreeModelFilterVisibleFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
32943 gtk_tree_model_filter_set_visible_func(&this, func, data, destroy);
32947 struct TreeModelFilterClass {
32948 GObject2.ObjectClass parent_class;
32949 extern (C) void function () _gtk_reserved0;
32950 extern (C) void function () _gtk_reserved1;
32951 extern (C) void function () _gtk_reserved2;
32952 extern (C) void function () _gtk_reserved3;
32955 extern (C) alias void function (TreeModel* model, TreeIter* iter, GObject2.Value* value, int column, void* data) TreeModelFilterModifyFunc;
32957 struct TreeModelFilterPrivate {
32960 extern (C) alias int function (TreeModel* model, TreeIter* iter, void* data) TreeModelFilterVisibleFunc;
32962 enum TreeModelFlags {
32963 ITERS_PERSIST = 1,
32964 LIST_ONLY = 2
32966 extern (C) alias int function (TreeModel* model, TreePath* path, TreeIter* iter, void* data) TreeModelForeachFunc;
32968 struct TreeModelIface {
32969 GObject2.TypeInterface g_iface;
32971 // <path>: A #GtkTreePath pointing to the changed row
32972 // <iter>: A valid #GtkTreeIter pointing to the changed row
32973 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) row_changed;
32975 // <path>: A #GtkTreePath pointing to the inserted row
32976 // <iter>: A valid #GtkTreeIter pointing to the inserted row
32977 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) row_inserted;
32979 // <path>: A #GtkTreePath pointing to the changed row
32980 // <iter>: A valid #GtkTreeIter pointing to the changed row
32981 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter) row_has_child_toggled;
32982 // <path>: A #GtkTreePath pointing to the previous location of the deleted row.
32983 extern (C) void function (TreeModel* tree_model, TreePath* path) row_deleted;
32985 // <path>: A #GtkTreePath pointing to the tree node whose children have been reordered
32986 // <iter>: A valid #GtkTreeIter pointing to the node whose children have been reordered, or %NULL if the depth of @path is 0.
32987 // <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>.
32988 extern (C) void function (TreeModel* tree_model, TreePath* path, TreeIter* iter, int* new_order) rows_reordered;
32989 // RETURNS: The flags supported by this interface.
32990 extern (C) TreeModelFlags function (TreeModel* tree_model) get_flags;
32991 // RETURNS: The number of columns.
32992 extern (C) int function (TreeModel* tree_model) get_n_columns;
32994 // RETURNS: The type of the column.
32995 // <index_>: The column index.
32996 extern (C) Type function (TreeModel* tree_model, int index_) get_column_type;
32998 // RETURNS: %TRUE, if @iter was set.
32999 // <iter>: The uninitialized #GtkTreeIter.
33000 // <path>: The #GtkTreePath.
33001 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreePath* path) get_iter;
33003 // RETURNS: a newly-created #GtkTreePath.
33004 // <iter>: The #GtkTreeIter.
33005 extern (C) TreePath* /*new*/ function (TreeModel* tree_model, TreeIter* iter) get_path;
33007 // <iter>: The #GtkTreeIter.
33008 // <column>: The column to lookup the value at.
33009 // <value>: An empty #GValue to set.
33010 extern (C) void function (TreeModel* tree_model, TreeIter* iter, int column, /*out*/ GObject2.Value* value) get_value;
33012 // RETURNS: %TRUE if @iter has been changed to the next node.
33013 // <iter>: The #GtkTreeIter.
33014 extern (C) int function (TreeModel* tree_model, TreeIter* iter) iter_next;
33016 // RETURNS: %TRUE, if @child has been set to the first child.
33017 // <iter>: The new #GtkTreeIter to be set to the child.
33018 // <parent>: The #GtkTreeIter, or %NULL
33019 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* parent=null) iter_children;
33021 // RETURNS: %TRUE if @iter has children.
33022 // <iter>: The #GtkTreeIter to test for children.
33023 extern (C) int function (TreeModel* tree_model, TreeIter* iter) iter_has_child;
33025 // RETURNS: The number of children of @iter.
33026 // <iter>: The #GtkTreeIter, or %NULL.
33027 extern (C) int function (TreeModel* tree_model, TreeIter* iter=null) iter_n_children;
33029 // RETURNS: %TRUE, if @parent has an @n<!-- -->th child.
33030 // <iter>: The #GtkTreeIter to set to the nth child.
33031 // <parent>: The #GtkTreeIter to get the child from, or %NULL.
33032 // <n>: Then index of the desired child.
33033 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* parent, int n) iter_nth_child;
33035 // RETURNS: %TRUE, if @iter is set to the parent of @child.
33036 // <iter>: The new #GtkTreeIter to set to the parent.
33037 // <child>: The #GtkTreeIter.
33038 extern (C) int function (TreeModel* tree_model, /*out*/ TreeIter* iter, TreeIter* child) iter_parent;
33039 // <iter>: The #GtkTreeIter.
33040 extern (C) void function (TreeModel* tree_model, TreeIter* iter) ref_node;
33041 // <iter>: The #GtkTreeIter.
33042 extern (C) void function (TreeModel* tree_model, TreeIter* iter) unref_node;
33045 struct TreeModelSort /* : GObject.Object */ {
33046 mixin TreeDragSource.__interface__;
33047 mixin TreeModel.__interface__;
33048 mixin TreeSortable.__interface__;
33049 alias parent this;
33050 alias parent super_;
33051 alias parent object;
33052 GObject2.Object parent;
33053 private void* root;
33054 private int stamp;
33055 private uint child_flags;
33056 private TreeModel* child_model;
33057 private int zero_ref_count;
33058 private GLib2.List* sort_list;
33059 private int sort_column_id;
33060 private SortType order;
33061 private TreeIterCompareFunc default_sort_func;
33062 private void* default_sort_data;
33063 private GLib2.DestroyNotify default_sort_destroy;
33064 private uint changed_id, inserted_id, has_child_toggled_id, deleted_id, reordered_id;
33067 // This function should almost never be called. It clears the @tree_model_sort
33068 // of any cached iterators that haven't been reffed with
33069 // gtk_tree_model_ref_node(). This might be useful if the child model being
33070 // sorted is static (and doesn't change often) and there has been a lot of
33071 // unreffed access to nodes. As a side effect of this function, all unreffed
33072 // iters will be invalid.
33073 void clear_cache()() {
33074 gtk_tree_model_sort_clear_cache(&this);
33077 // Sets @sort_iter to point to the row in @tree_model_sort that corresponds to
33078 // the row pointed at by @child_iter. If @sort_iter was not set, %FALSE
33079 // valid iterator pointer to a visible row in the child model.
33080 // RETURNS: %TRUE, if @sort_iter was set, i.e. if @sort_iter is a
33081 // <sort_iter>: An uninitialized #GtkTreeIter.
33082 // <child_iter>: A valid #GtkTreeIter pointing to a row on the child model
33083 int convert_child_iter_to_iter()(/*out*/ TreeIter* sort_iter, TreeIter* child_iter) {
33084 return gtk_tree_model_sort_convert_child_iter_to_iter(&this, sort_iter, child_iter);
33087 // Converts @child_path to a path relative to @tree_model_sort. That is,
33088 // point to the same row in the sorted model. If @child_path isn't a valid
33089 // path on the child model, then %NULL is returned.
33090 // RETURNS: A newly allocated #GtkTreePath, or %NULL
33091 // <child_path>: A #GtkTreePath to convert
33092 TreePath* /*new*/ convert_child_path_to_path()(TreePath* child_path) {
33093 return gtk_tree_model_sort_convert_child_path_to_path(&this, child_path);
33096 // Sets @child_iter to point to the row pointed to by @sorted_iter.
33097 // <child_iter>: An uninitialized #GtkTreeIter
33098 // <sorted_iter>: A valid #GtkTreeIter pointing to a row on @tree_model_sort.
33099 void convert_iter_to_child_iter()(/*out*/ TreeIter* child_iter, TreeIter* sorted_iter) {
33100 gtk_tree_model_sort_convert_iter_to_child_iter(&this, child_iter, sorted_iter);
33103 // Converts @sorted_path to a path on the child model of @tree_model_sort.
33104 // That is, @sorted_path points to a location in @tree_model_sort. The
33105 // returned path will point to the same location in the model not being
33106 // sorted. If @sorted_path does not point to a location in the child model,
33107 // %NULL is returned.
33108 // RETURNS: A newly allocated #GtkTreePath, or %NULL
33109 // <sorted_path>: A #GtkTreePath to convert
33110 TreePath* /*new*/ convert_path_to_child_path()(TreePath* sorted_path) {
33111 return gtk_tree_model_sort_convert_path_to_child_path(&this, sorted_path);
33114 // Returns the model the #GtkTreeModelSort is sorting.
33115 // RETURNS: the "child model" being sorted
33116 TreeModel* get_model()() {
33117 return gtk_tree_model_sort_get_model(&this);
33120 // VERSION: 2.2
33121 // <warning><para>
33122 // This function is slow. Only use it for debugging and/or testing purposes.
33123 // </para></warning>
33124 // Checks if the given iter is a valid iter for this #GtkTreeModelSort.
33125 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
33126 // <iter>: A #GtkTreeIter.
33127 int iter_is_valid()(TreeIter* iter) {
33128 return gtk_tree_model_sort_iter_is_valid(&this, iter);
33131 // This resets the default sort function to be in the 'unsorted' state. That
33132 // is, it is in the same order as the child model. It will re-sort the model
33133 // to be in the same order as the child model only if the #GtkTreeModelSort
33134 // is in 'unsorted' state.
33135 void reset_default_sort_func()() {
33136 gtk_tree_model_sort_reset_default_sort_func(&this);
33140 struct TreeModelSortClass {
33141 GObject2.ObjectClass parent_class;
33142 extern (C) void function () _gtk_reserved1;
33143 extern (C) void function () _gtk_reserved2;
33144 extern (C) void function () _gtk_reserved3;
33145 extern (C) void function () _gtk_reserved4;
33148 struct TreePath {
33150 // Creates a new #GtkTreePath. This structure refers to a row.
33151 // RETURNS: A newly created #GtkTreePath.
33152 static TreePath* /*new*/ new_()() {
33153 return gtk_tree_path_new();
33156 // Creates a new #GtkTreePath. The string representation of this path is "0"
33157 // RETURNS: A new #GtkTreePath.
33158 static TreePath* /*new*/ new_first()() {
33159 return gtk_tree_path_new_first();
33162 // Unintrospectable constructor: new_from_indices() / gtk_tree_path_new_from_indices()
33163 // VERSION: 2.2
33164 // Creates a new path with @first_index and @varargs as indices.
33165 // RETURNS: A newly created #GtkTreePath.
33166 // <first_index>: first integer
33167 alias gtk_tree_path_new_from_indices new_from_indices; // Variadic
33169 // Creates a new #GtkTreePath initialized to @path. @path is expected to be a
33170 // colon separated list of numbers. For example, the string "10:4:0" would
33171 // create a path of depth 3 pointing to the 11th child of the root node, the 5th
33172 // child of that 11th child, and the 1st child of that 5th child. If an invalid
33173 // path string is passed in, %NULL is returned.
33174 // RETURNS: A newly-created #GtkTreePath, or %NULL
33175 // <path>: The string representation of a path.
33176 static TreePath* /*new*/ new_from_string()(char* path) {
33177 return gtk_tree_path_new_from_string(path);
33180 // Appends a new index to a path. As a result, the depth of the path is
33181 // increased.
33182 // <index_>: The index.
33183 void append_index()(int index_) {
33184 gtk_tree_path_append_index(&this, index_);
33187 // Compares two paths. If @a appears before @b in a tree, then -1 is returned.
33188 // If @b appears before @a, then 1 is returned. If the two nodes are equal,
33189 // then 0 is returned.
33190 // RETURNS: The relative positions of @a and @b
33191 // <b>: A #GtkTreePath to compare with.
33192 int compare()(TreePath* b) {
33193 return gtk_tree_path_compare(&this, b);
33196 // Creates a new #GtkTreePath as a copy of @path.
33197 // RETURNS: A new #GtkTreePath.
33198 TreePath* /*new*/ copy()() {
33199 return gtk_tree_path_copy(&this);
33201 // Moves @path to point to the first child of the current path.
33202 void down()() {
33203 gtk_tree_path_down(&this);
33205 // Frees @path.
33206 void free()() {
33207 gtk_tree_path_free(&this);
33210 // Returns the current depth of @path.
33211 // RETURNS: The depth of @path
33212 int get_depth()() {
33213 return gtk_tree_path_get_depth(&this);
33216 // Returns the current indices of @path. This is an array of integers, each
33217 // representing a node in a tree. This value should not be freed.
33218 // RETURNS: The current indices, or %NULL.
33219 int* get_indices()() {
33220 return gtk_tree_path_get_indices(&this);
33223 // VERSION: 2.22
33224 // Returns the current indices of @path.
33225 // This is an array of integers, each representing a node in a tree.
33226 // It also returns the number of elements in the array.
33227 // The array should not be freed.
33228 // RETURNS: The current indices, or %NULL.
33229 // <depth>: Number of elements returned in the integer array
33230 int* get_indices_with_depth()(/*out*/ int* depth) {
33231 return gtk_tree_path_get_indices_with_depth(&this, depth);
33234 // Returns %TRUE if @descendant is a descendant of @path.
33235 // RETURNS: %TRUE if @descendant is contained inside @path
33236 // <descendant>: another #GtkTreePath
33237 int is_ancestor()(TreePath* descendant) {
33238 return gtk_tree_path_is_ancestor(&this, descendant);
33241 // Returns %TRUE if @path is a descendant of @ancestor.
33242 // RETURNS: %TRUE if @ancestor contains @path somewhere below it
33243 // <ancestor>: another #GtkTreePath
33244 int is_descendant()(TreePath* ancestor) {
33245 return gtk_tree_path_is_descendant(&this, ancestor);
33247 // Moves the @path to point to the next node at the current depth.
33248 void next()() {
33249 gtk_tree_path_next(&this);
33252 // Prepends a new index to a path. As a result, the depth of the path is
33253 // increased.
33254 // <index_>: The index.
33255 void prepend_index()(int index_) {
33256 gtk_tree_path_prepend_index(&this, index_);
33259 // Moves the @path to point to the previous node at the current depth,
33260 // if it exists.
33261 // RETURNS: %TRUE if @path has a previous node, and the move was made.
33262 int prev()() {
33263 return gtk_tree_path_prev(&this);
33266 // Generates a string representation of the path. This string is a ':'
33267 // separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.
33268 // RETURNS: A newly-allocated string. Must be freed with g_free().
33269 char* /*new*/ to_string()() {
33270 return gtk_tree_path_to_string(&this);
33273 // Moves the @path to point to its parent node, if it has a parent.
33274 // RETURNS: %TRUE if @path has a parent, and the move was made.
33275 int up()() {
33276 return gtk_tree_path_up(&this);
33280 struct TreeRowReference {
33282 // Creates a row reference based on @path. This reference will keep pointing
33283 // to the node pointed to by @path, so long as it exists. It listens to all
33284 // signals emitted by @model, and updates its path appropriately. If @path
33285 // isn't a valid path in @model, then %NULL is returned.
33286 // RETURNS: A newly allocated #GtkTreeRowReference, or %NULL
33287 // <model>: A #GtkTreeModel
33288 // <path>: A valid #GtkTreePath to monitor
33289 static TreeRowReference* /*new*/ new_()(TreeModel* model, TreePath* path) {
33290 return gtk_tree_row_reference_new(model, path);
33293 // You do not need to use this function. Creates a row reference based on
33294 // so long as it exists. If @path isn't a valid path in @model, then %NULL is
33295 // returned. However, unlike references created with
33296 // gtk_tree_row_reference_new(), it does not listen to the model for changes.
33297 // The creator of the row reference must do this explicitly using
33298 // gtk_tree_row_reference_inserted(), gtk_tree_row_reference_deleted(),
33299 // gtk_tree_row_reference_reordered().
33300 // These functions must be called exactly once per proxy when the
33301 // corresponding signal on the model is emitted. This single call
33302 // updates all row references for that proxy. Since built-in GTK+
33303 // objects like #GtkTreeView already use this mechanism internally,
33304 // using them as the proxy object will produce unpredictable results.
33305 // Further more, passing the same object as @model and @proxy
33306 // doesn't work for reasons of internal implementation.
33307 // This type of row reference is primarily meant by structures that need to
33308 // carefully monitor exactly when a row reference updates itself, and is not
33309 // generally needed by most applications.
33310 // RETURNS: A newly allocated #GtkTreeRowReference, or %NULL
33311 // <proxy>: A proxy #GObject
33312 // <model>: A #GtkTreeModel
33313 // <path>: A valid #GtkTreePath to monitor
33314 static TreeRowReference* /*new*/ new_proxy()(GObject2.Object* proxy, TreeModel* model, TreePath* path) {
33315 return gtk_tree_row_reference_new_proxy(proxy, model, path);
33318 // VERSION: 2.2
33319 // Copies a #GtkTreeRowReference.
33320 // RETURNS: a copy of @reference.
33321 TreeRowReference* /*new*/ copy()() {
33322 return gtk_tree_row_reference_copy(&this);
33324 // Free's @reference. @reference may be %NULL.
33325 void free()() {
33326 gtk_tree_row_reference_free(&this);
33329 // VERSION: 2.8
33330 // Returns the model that the row reference is monitoring.
33331 // RETURNS: the model
33332 TreeModel* get_model()() {
33333 return gtk_tree_row_reference_get_model(&this);
33336 // Returns a path that the row reference currently points to, or %NULL if the
33337 // path pointed to is no longer valid.
33338 // RETURNS: A current path, or %NULL.
33339 TreePath* /*new*/ get_path()() {
33340 return gtk_tree_row_reference_get_path(&this);
33343 // Returns %TRUE if the @reference is non-%NULL and refers to a current valid
33344 // path.
33345 // RETURNS: %TRUE if @reference points to a valid path.
33346 int valid()() {
33347 return gtk_tree_row_reference_valid(&this);
33351 struct TreeSelection /* : GObject.Object */ {
33352 alias parent this;
33353 alias parent super_;
33354 alias parent object;
33355 GObject2.Object parent;
33356 private TreeView* tree_view;
33357 private SelectionMode type;
33358 private TreeSelectionFunc user_func;
33359 private void* user_data;
33360 private GLib2.DestroyNotify destroy;
33363 // VERSION: 2.2
33364 // Returns the number of rows that have been selected in @tree.
33365 // RETURNS: The number of rows selected.
33366 int count_selected_rows()() {
33367 return gtk_tree_selection_count_selected_rows(&this);
33370 // Gets the selection mode for @selection. See
33371 // gtk_tree_selection_set_mode().
33372 // RETURNS: the current selection mode
33373 SelectionMode get_mode()() {
33374 return gtk_tree_selection_get_mode(&this);
33377 // Unintrospectable method: get_select_function() / gtk_tree_selection_get_select_function()
33378 // VERSION: 2.14
33379 // Returns the current selection function.
33380 // RETURNS: The function.
33381 TreeSelectionFunc get_select_function()() {
33382 return gtk_tree_selection_get_select_function(&this);
33385 // Sets @iter to the currently selected node if @selection is set to
33386 // #GTK_SELECTION_SINGLE or #GTK_SELECTION_BROWSE. @iter may be NULL if you
33387 // just want to test if @selection has any selected nodes. @model is filled
33388 // with the current model as a convenience. This function will not work if you
33389 // use @selection is #GTK_SELECTION_MULTIPLE.
33390 // RETURNS: TRUE, if there is a selected node.
33391 // <model>: A pointer to set to the #GtkTreeModel, or NULL.
33392 // <iter>: The #GtkTreeIter, or NULL.
33393 int get_selected()(/*out*/ TreeModel** model=null, /*out*/ TreeIter* iter=null) {
33394 return gtk_tree_selection_get_selected(&this, model, iter);
33397 // VERSION: 2.2
33398 // Creates a list of path of all selected rows. Additionally, if you are
33399 // planning on modifying the model after calling this function, you may
33400 // want to convert the returned list into a list of #GtkTreeRowReference<!-- -->s.
33401 // To do this, you can use gtk_tree_row_reference_new().
33402 // To free the return value, use:
33403 // |[
33404 // g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
33405 // g_list_free (list);
33406 // ]|
33407 // RETURNS: A #GList containing a #GtkTreePath for each selected row.
33408 // <model>: A pointer to set to the #GtkTreeModel, or %NULL.
33409 GLib2.List* /*new*/ get_selected_rows()(/*out*/ TreeModel** model=null) {
33410 return gtk_tree_selection_get_selected_rows(&this, model);
33413 // Returns the tree view associated with @selection.
33414 // RETURNS: A #GtkTreeView
33415 TreeView* get_tree_view()() {
33416 return gtk_tree_selection_get_tree_view(&this);
33419 // Unintrospectable method: get_user_data() / gtk_tree_selection_get_user_data()
33420 // Returns the user data for the selection function.
33421 // RETURNS: The user data.
33422 void* get_user_data()() {
33423 return gtk_tree_selection_get_user_data(&this);
33426 // Returns %TRUE if the row at @iter is currently selected.
33427 // RETURNS: %TRUE, if @iter is selected
33428 // <iter>: A valid #GtkTreeIter
33429 int iter_is_selected()(TreeIter* iter) {
33430 return gtk_tree_selection_iter_is_selected(&this, iter);
33433 // Returns %TRUE if the row pointed to by @path is currently selected. If @path
33434 // does not point to a valid location, %FALSE is returned
33435 // RETURNS: %TRUE if @path is selected.
33436 // <path>: A #GtkTreePath to check selection on.
33437 int path_is_selected()(TreePath* path) {
33438 return gtk_tree_selection_path_is_selected(&this, path);
33441 // Selects all the nodes. @selection must be set to #GTK_SELECTION_MULTIPLE
33442 // mode.
33443 void select_all()() {
33444 gtk_tree_selection_select_all(&this);
33447 // Selects the specified iterator.
33448 // <iter>: The #GtkTreeIter to be selected.
33449 void select_iter()(TreeIter* iter) {
33450 gtk_tree_selection_select_iter(&this, iter);
33453 // Select the row at @path.
33454 // <path>: The #GtkTreePath to be selected.
33455 void select_path()(TreePath* path) {
33456 gtk_tree_selection_select_path(&this, path);
33459 // Selects a range of nodes, determined by @start_path and @end_path inclusive.
33460 // <start_path>: The initial node of the range.
33461 // <end_path>: The final node of the range.
33462 void select_range()(TreePath* start_path, TreePath* end_path) {
33463 gtk_tree_selection_select_range(&this, start_path, end_path);
33466 // Calls a function for each selected node. Note that you cannot modify
33467 // the tree or selection from within this function. As a result,
33468 // gtk_tree_selection_get_selected_rows() might be more useful.
33469 // <func>: The function to call for each selected node.
33470 // <data>: user data to pass to the function.
33471 void selected_foreach()(TreeSelectionForeachFunc func, void* data) {
33472 gtk_tree_selection_selected_foreach(&this, func, data);
33475 // Sets the selection mode of the @selection. If the previous type was
33476 // #GTK_SELECTION_MULTIPLE, then the anchor is kept selected, if it was
33477 // previously selected.
33478 // <type>: The selection mode
33479 void set_mode()(SelectionMode type) {
33480 gtk_tree_selection_set_mode(&this, type);
33483 // Sets the selection function. If set, this function is called before any node
33484 // is selected or unselected, giving some control over which nodes are selected.
33485 // The select function should return %TRUE if the state of the node may be toggled,
33486 // and %FALSE if the state of the node should be left unchanged.
33487 // <func>: The selection function.
33488 // <data>: The selection function's data.
33489 // <destroy>: The destroy function for user data. May be NULL.
33490 void set_select_function()(TreeSelectionFunc func, void* data, GLib2.DestroyNotify destroy) {
33491 gtk_tree_selection_set_select_function(&this, func, data, destroy);
33493 // Unselects all the nodes.
33494 void unselect_all()() {
33495 gtk_tree_selection_unselect_all(&this);
33498 // Unselects the specified iterator.
33499 // <iter>: The #GtkTreeIter to be unselected.
33500 void unselect_iter()(TreeIter* iter) {
33501 gtk_tree_selection_unselect_iter(&this, iter);
33504 // Unselects the row at @path.
33505 // <path>: The #GtkTreePath to be unselected.
33506 void unselect_path()(TreePath* path) {
33507 gtk_tree_selection_unselect_path(&this, path);
33510 // VERSION: 2.2
33511 // Unselects a range of nodes, determined by @start_path and @end_path
33512 // inclusive.
33513 // <start_path>: The initial node of the range.
33514 // <end_path>: The initial node of the range.
33515 void unselect_range()(TreePath* start_path, TreePath* end_path) {
33516 gtk_tree_selection_unselect_range(&this, start_path, end_path);
33518 extern (C) alias static void function (TreeSelection* this_, void* user_data=null) signal_changed;
33520 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33521 return super_.signal_connect!name(cb, data, cf);
33524 ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33525 return signal_connect_data!()(&this, cast(char*)"changed",
33526 cast(GObject2.Callback)cb, data, null, cf);
33530 struct TreeSelectionClass {
33531 GObject2.ObjectClass parent_class;
33532 extern (C) void function (TreeSelection* selection) changed;
33533 extern (C) void function () _gtk_reserved1;
33534 extern (C) void function () _gtk_reserved2;
33535 extern (C) void function () _gtk_reserved3;
33536 extern (C) void function () _gtk_reserved4;
33539 extern (C) alias void function (TreeModel* model, TreePath* path, TreeIter* iter, void* data) TreeSelectionForeachFunc;
33541 extern (C) alias int function (TreeSelection* selection, TreeModel* model, TreePath* path, int path_currently_selected, void* data) TreeSelectionFunc;
33543 struct TreeSortable /* Interface */ {
33544 mixin template __interface__() {
33545 // Fills in @sort_column_id and @order with the current sort column and the
33546 // order. It returns %TRUE unless the @sort_column_id is
33547 // %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
33548 // %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
33549 // column ids.
33550 // RETURNS: %TRUE if the sort column is not one of the special sort
33551 // <sort_column_id>: The sort column id to be filled in
33552 // <order>: The #GtkSortType to be filled in
33553 int get_sort_column_id()(int* sort_column_id, SortType* order) {
33554 return gtk_tree_sortable_get_sort_column_id(cast(TreeSortable*)&this, sort_column_id, order);
33557 // Returns %TRUE if the model has a default sort function. This is used
33558 // primarily by GtkTreeViewColumns in order to determine if a model can
33559 // go back to the default state, or not.
33560 // RETURNS: %TRUE, if the model has a default sort function
33561 int has_default_sort_func()() {
33562 return gtk_tree_sortable_has_default_sort_func(cast(TreeSortable*)&this);
33565 // Sets the default comparison function used when sorting to be @sort_func.
33566 // If the current sort column id of @sortable is
33567 // %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using
33568 // this function.
33569 // If @sort_func is %NULL, then there will be no default comparison function.
33570 // This means that once the model has been sorted, it can't go back to the
33571 // default state. In this case, when the current sort column id of @sortable
33572 // is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
33573 // <sort_func>: The comparison function
33574 // <user_data>: User data to pass to @sort_func, or %NULL
33575 // <destroy>: Destroy notifier of @user_data, or %NULL
33576 void set_default_sort_func()(TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null) {
33577 gtk_tree_sortable_set_default_sort_func(cast(TreeSortable*)&this, sort_func, user_data, destroy);
33580 // Sets the current sort column to be @sort_column_id. The @sortable will
33581 // resort itself to reflect this change, after emitting a
33582 // #GtkTreeSortable::sort-column-changed signal. @sort_column_id may either be
33583 // a regular column id, or one of the following special values:
33584 // <variablelist>
33585 // <varlistentry>
33586 // <term>%GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID</term>
33587 // <listitem>the default sort function will be used, if it is set</listitem>
33588 // </varlistentry>
33589 // <varlistentry>
33590 // <term>%GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID</term>
33591 // <listitem>no sorting will occur</listitem>
33592 // </varlistentry>
33593 // </variablelist>
33594 // <sort_column_id>: the sort column id to set
33595 // <order>: The sort order of the column
33596 void set_sort_column_id()(int sort_column_id, SortType order) {
33597 gtk_tree_sortable_set_sort_column_id(cast(TreeSortable*)&this, sort_column_id, order);
33600 // Sets the comparison function used when sorting to be @sort_func. If the
33601 // current sort column id of @sortable is the same as @sort_column_id, then
33602 // the model will sort using this function.
33603 // <sort_column_id>: the sort column id to set the function for
33604 // <sort_func>: The comparison function
33605 // <user_data>: User data to pass to @sort_func, or %NULL
33606 // <destroy>: Destroy notifier of @user_data, or %NULL
33607 void set_sort_func()(int sort_column_id, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null) {
33608 gtk_tree_sortable_set_sort_func(cast(TreeSortable*)&this, sort_column_id, sort_func, user_data, destroy);
33610 // Emits a #GtkTreeSortable::sort-column-changed signal on @sortable.
33611 void sort_column_changed()() {
33612 gtk_tree_sortable_sort_column_changed(cast(TreeSortable*)&this);
33615 // The ::sort-column-changed signal is emitted when the sort column
33616 // or sort order of @sortable is changed. The signal is emitted before
33617 // the contents of @sortable are resorted.
33618 extern (C) alias static void function (TreeSortable* this_, void* user_data=null) signal_sort_column_changed;
33620 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33621 return super_.signal_connect!name(cb, data, cf);
33624 ulong signal_connect(string name:"sort-column-changed", CB:signal_sort_column_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
33625 return signal_connect_data!()(&this, cast(char*)"sort-column-changed",
33626 cast(GObject2.Callback)cb, data, null, cf);
33629 mixin __interface__;
33632 struct TreeSortableIface {
33633 GObject2.TypeInterface g_iface;
33634 extern (C) void function (TreeSortable* sortable) sort_column_changed;
33636 // RETURNS: %TRUE if the sort column is not one of the special sort
33637 // <sort_column_id>: The sort column id to be filled in
33638 // <order>: The #GtkSortType to be filled in
33639 extern (C) int function (TreeSortable* sortable, int* sort_column_id, SortType* order) get_sort_column_id;
33641 // <sort_column_id>: the sort column id to set
33642 // <order>: The sort order of the column
33643 extern (C) void function (TreeSortable* sortable, int sort_column_id, SortType order) set_sort_column_id;
33645 // <sort_column_id>: the sort column id to set the function for
33646 // <destroy>: Destroy notifier of @user_data, or %NULL
33647 extern (C) void function (TreeSortable* sortable, int sort_column_id, TreeIterCompareFunc func, void* data, GLib2.DestroyNotify destroy=null) set_sort_func;
33648 // <destroy>: Destroy notifier of @user_data, or %NULL
33649 extern (C) void function (TreeSortable* sortable, TreeIterCompareFunc func, void* data, GLib2.DestroyNotify destroy=null) set_default_sort_func;
33650 // RETURNS: %TRUE, if the model has a default sort function
33651 extern (C) int function (TreeSortable* sortable) has_default_sort_func;
33654 struct TreeStore /* : GObject.Object */ {
33655 mixin Buildable.__interface__;
33656 mixin TreeDragDest.__interface__;
33657 mixin TreeDragSource.__interface__;
33658 mixin TreeModel.__interface__;
33659 mixin TreeSortable.__interface__;
33660 alias parent this;
33661 alias parent super_;
33662 alias parent object;
33663 GObject2.Object parent;
33664 int stamp;
33665 void* root, last;
33666 int n_columns, sort_column_id;
33667 GLib2.List* sort_list;
33668 SortType order;
33669 Type* column_headers;
33670 TreeIterCompareFunc default_sort_func;
33671 void* default_sort_data;
33672 GLib2.DestroyNotify default_sort_destroy;
33673 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
33674 uint, "columns_dirty", 1,
33675 uint, "__dummy32A", 31));
33678 // Unintrospectable constructor: new() / gtk_tree_store_new()
33679 // Creates a new tree store as with @n_columns columns each of the types passed
33680 // in. Note that only types derived from standard GObject fundamental types
33681 // are supported.
33682 // As an example, <literal>gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
33683 // GDK_TYPE_PIXBUF);</literal> will create a new #GtkTreeStore with three columns, of type
33684 // <type>int</type>, <type>string</type> and #GdkPixbuf respectively.
33685 // RETURNS: a new #GtkTreeStore
33686 // <n_columns>: number of columns in the tree store
33687 alias gtk_tree_store_new new_; // Variadic
33689 // Non vararg creation function. Used primarily by language bindings.
33690 // RETURNS: a new #GtkTreeStore
33691 // <n_columns>: number of columns in the tree store
33692 // <types>: an array of #GType types for the columns, from first to last
33693 static TreeStore* /*new*/ newv()(int n_columns, Type* types) {
33694 return gtk_tree_store_newv(n_columns, types);
33697 // Appends a new row to @tree_store. If @parent is non-%NULL, then it will append the
33698 // new row after the last child of @parent, otherwise it will append a row to
33699 // the top level. @iter will be changed to point to this new row. The row will
33700 // be empty after this function is called. To fill in values, you need to call
33701 // gtk_tree_store_set() or gtk_tree_store_set_value().
33702 // <iter>: An unset #GtkTreeIter to set to the appended row
33703 // <parent>: A valid #GtkTreeIter, or %NULL
33704 void append()(/*out*/ TreeIter* iter, TreeIter* parent=null) {
33705 gtk_tree_store_append(&this, iter, parent);
33707 // Removes all rows from @tree_store
33708 void clear()() {
33709 gtk_tree_store_clear(&this);
33712 // Creates a new row at @position. If parent is non-%NULL, then the row will be
33713 // made a child of @parent. Otherwise, the row will be created at the toplevel.
33714 // If @position is larger than the number of rows at that level, then the new
33715 // row will be inserted to the end of the list. @iter will be changed to point
33716 // to this new row. The row will be empty after this function is called. To
33717 // fill in values, you need to call gtk_tree_store_set() or
33718 // gtk_tree_store_set_value().
33719 // <iter>: An unset #GtkTreeIter to set to the new row
33720 // <parent>: A valid #GtkTreeIter, or %NULL
33721 // <position>: position to insert the new row
33722 void insert()(/*out*/ TreeIter* iter, TreeIter* parent, int position) {
33723 gtk_tree_store_insert(&this, iter, parent, position);
33726 // Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
33727 // prepended to @parent 's children. If @parent and @sibling are %NULL, then
33728 // the row will be prepended to the toplevel. If both @sibling and @parent are
33729 // set, then @parent must be the parent of @sibling. When @sibling is set,
33730 // this function is called. To fill in values, you need to call
33731 // gtk_tree_store_set() or gtk_tree_store_set_value().
33732 // <iter>: An unset #GtkTreeIter to set to the new row
33733 // <parent>: A valid #GtkTreeIter, or %NULL
33734 // <sibling>: A valid #GtkTreeIter, or %NULL
33735 void insert_after()(/*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null) {
33736 gtk_tree_store_insert_after(&this, iter, parent, sibling);
33739 // Inserts a new row before @sibling. If @sibling is %NULL, then the row will
33740 // be appended to @parent 's children. If @parent and @sibling are %NULL, then
33741 // the row will be appended to the toplevel. If both @sibling and @parent are
33742 // set, then @parent must be the parent of @sibling. When @sibling is set,
33743 // this function is called. To fill in values, you need to call
33744 // gtk_tree_store_set() or gtk_tree_store_set_value().
33745 // <iter>: An unset #GtkTreeIter to set to the new row
33746 // <parent>: A valid #GtkTreeIter, or %NULL
33747 // <sibling>: A valid #GtkTreeIter, or %NULL
33748 void insert_before()(/*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null) {
33749 gtk_tree_store_insert_before(&this, iter, parent, sibling);
33752 // Unintrospectable method: insert_with_values() / gtk_tree_store_insert_with_values()
33753 // VERSION: 2.10
33754 // Creates a new row at @position. @iter will be changed to point to this
33755 // new row. If @position is larger than the number of rows on the list, then
33756 // the new row will be appended to the list. The row will be filled with
33757 // the values given to this function.
33758 // Calling
33759 // <literal>gtk_tree_store_insert_with_values (tree_store, iter, position, ...)</literal>
33760 // has the same effect as calling
33761 // |[
33762 // gtk_tree_store_insert (tree_store, iter, position);
33763 // gtk_tree_store_set (tree_store, iter, ...);
33764 // ]|
33765 // with the different that the former will only emit a row_inserted signal,
33766 // while the latter will emit row_inserted, row_changed and if the tree store
33767 // is sorted, rows_reordered. Since emitting the rows_reordered signal
33768 // repeatedly can affect the performance of the program,
33769 // gtk_tree_store_insert_with_values() should generally be preferred when
33770 // inserting rows in a sorted tree store.
33771 // <iter>: An unset #GtkTreeIter to set the new row, or %NULL.
33772 // <parent>: A valid #GtkTreeIter, or %NULL
33773 // <position>: position to insert the new row
33774 /+ Not available -- variadic methods unsupported - use the C function directly.
33775 alias gtk_tree_store_insert_with_values insert_with_values; // Variadic
33778 // VERSION: 2.10
33779 // A variant of gtk_tree_store_insert_with_values() which takes
33780 // the columns and values as two arrays, instead of varargs. This
33781 // function is mainly intended for language bindings.
33782 // <iter>: An unset #GtkTreeIter to set the new row, or %NULL.
33783 // <parent>: A valid #GtkTreeIter, or %NULL
33784 // <position>: position to insert the new row
33785 // <columns>: an array of column numbers
33786 // <values>: an array of GValues
33787 // <n_values>: the length of the @columns and @values arrays
33788 void insert_with_valuesv()(/*out*/ TreeIter* iter, TreeIter* parent, int position, int* columns, GObject2.Value* values, int n_values) {
33789 gtk_tree_store_insert_with_valuesv(&this, iter, parent, position, columns, values, n_values);
33792 // Returns %TRUE if @iter is an ancestor of @descendant. That is, @iter is the
33793 // parent (or grandparent or great-grandparent) of @descendant.
33794 // RETURNS: %TRUE, if @iter is an ancestor of @descendant
33795 // <iter>: A valid #GtkTreeIter
33796 // <descendant>: A valid #GtkTreeIter
33797 int is_ancestor()(TreeIter* iter, TreeIter* descendant) {
33798 return gtk_tree_store_is_ancestor(&this, iter, descendant);
33801 // Returns the depth of @iter. This will be 0 for anything on the root level, 1
33802 // for anything down a level, etc.
33803 // RETURNS: The depth of @iter
33804 // <iter>: A valid #GtkTreeIter
33805 int iter_depth()(TreeIter* iter) {
33806 return gtk_tree_store_iter_depth(&this, iter);
33809 // VERSION: 2.2
33810 // purposes.
33811 // Checks if the given iter is a valid iter for this #GtkTreeStore.
33812 // RETURNS: %TRUE if the iter is valid, %FALSE if the iter is invalid.
33813 // <iter>: A #GtkTreeIter.
33814 int iter_is_valid()(TreeIter* iter) {
33815 return gtk_tree_store_iter_is_valid(&this, iter);
33818 // VERSION: 2.2
33819 // Moves @iter in @tree_store to the position after @position. @iter and
33820 // works with unsorted stores. If @position is %NULL, @iter will be moved
33821 // to the start of the level.
33822 // <iter>: A #GtkTreeIter.
33823 // <position>: A #GtkTreeIter.
33824 void move_after()(TreeIter* iter, TreeIter* position=null) {
33825 gtk_tree_store_move_after(&this, iter, position);
33828 // VERSION: 2.2
33829 // Moves @iter in @tree_store to the position before @position. @iter and
33830 // works with unsorted stores. If @position is %NULL, @iter will be
33831 // moved to the end of the level.
33832 // <iter>: A #GtkTreeIter.
33833 // <position>: A #GtkTreeIter or %NULL.
33834 void move_before()(TreeIter* iter, TreeIter* position=null) {
33835 gtk_tree_store_move_before(&this, iter, position);
33838 // Prepends a new row to @tree_store. If @parent is non-%NULL, then it will prepend
33839 // the new row before the first child of @parent, otherwise it will prepend a row
33840 // to the top level. @iter will be changed to point to this new row. The row
33841 // will be empty after this function is called. To fill in values, you need to
33842 // call gtk_tree_store_set() or gtk_tree_store_set_value().
33843 // <iter>: An unset #GtkTreeIter to set to the prepended row
33844 // <parent>: A valid #GtkTreeIter, or %NULL
33845 void prepend()(/*out*/ TreeIter* iter, TreeIter* parent=null) {
33846 gtk_tree_store_prepend(&this, iter, parent);
33849 // Removes @iter from @tree_store. After being removed, @iter is set to the
33850 // next valid row at that level, or invalidated if it previously pointed to the
33851 // last one.
33852 // RETURNS: %TRUE if @iter is still valid, %FALSE if not.
33853 // <iter>: A valid #GtkTreeIter
33854 int remove()(TreeIter* iter) {
33855 return gtk_tree_store_remove(&this, iter);
33858 // VERSION: 2.2
33859 // Reorders the children of @parent in @tree_store to follow the order
33860 // indicated by @new_order. Note that this function only works with
33861 // unsorted stores.
33862 // <parent>: A #GtkTreeIter.
33863 // <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>.
33864 void reorder()(TreeIter* parent, int* new_order) {
33865 gtk_tree_store_reorder(&this, parent, new_order);
33868 // Unintrospectable method: set() / gtk_tree_store_set()
33869 // Sets the value of one or more cells in the row referenced by @iter.
33870 // The variable argument list should contain integer column numbers,
33871 // each column number followed by the value to be set.
33872 // The list is terminated by a -1. For example, to set column 0 with type
33873 // %G_TYPE_STRING to "Foo", you would write
33874 // <literal>gtk_tree_store_set (store, iter, 0, "Foo", -1)</literal>.
33875 // The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
33876 // will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.
33877 // <iter>: A valid #GtkTreeIter for the row being modified
33878 /+ Not available -- variadic methods unsupported - use the C function directly.
33879 alias gtk_tree_store_set set; // Variadic
33882 // This function is meant primarily for #GObjects that inherit from
33883 // #GtkTreeStore, and should only be used when constructing a new
33884 // #GtkTreeStore. It will not function after a row has been added,
33885 // or a method on the #GtkTreeModel interface is called.
33886 // <n_columns>: Number of columns for the tree store
33887 // <types>: An array of #GType types, one for each column
33888 void set_column_types()(int n_columns, Type* types) {
33889 gtk_tree_store_set_column_types(&this, n_columns, types);
33892 // Unintrospectable method: set_valist() / gtk_tree_store_set_valist()
33893 // See gtk_tree_store_set(); this version takes a <type>va_list</type> for
33894 // use by language bindings.
33895 // <iter>: A valid #GtkTreeIter for the row being modified
33896 // <var_args>: <type>va_list</type> of column/value pairs
33897 void set_valist()(TreeIter* iter, va_list var_args) {
33898 gtk_tree_store_set_valist(&this, iter, var_args);
33901 // Sets the data in the cell specified by @iter and @column.
33902 // The type of @value must be convertible to the type of the
33903 // column.
33904 // <iter>: A valid #GtkTreeIter for the row being modified
33905 // <column>: column number to modify
33906 // <value>: new value for the cell
33907 void set_value()(TreeIter* iter, int column, GObject2.Value* value) {
33908 gtk_tree_store_set_value(&this, iter, column, value);
33911 // VERSION: 2.12
33912 // A variant of gtk_tree_store_set_valist() which takes
33913 // the columns and values as two arrays, instead of varargs. This
33914 // function is mainly intended for language bindings or in case
33915 // the number of columns to change is not known until run-time.
33916 // <iter>: A valid #GtkTreeIter for the row being modified
33917 // <columns>: an array of column numbers
33918 // <values>: an array of GValues
33919 // <n_values>: the length of the @columns and @values arrays
33920 void set_valuesv()(TreeIter* iter, int* columns, GObject2.Value* values, int n_values) {
33921 gtk_tree_store_set_valuesv(&this, iter, columns, values, n_values);
33924 // VERSION: 2.2
33925 // Swaps @a and @b in the same level of @tree_store. Note that this function
33926 // only works with unsorted stores.
33927 // <a>: A #GtkTreeIter.
33928 // <b>: Another #GtkTreeIter.
33929 void swap()(TreeIter* a, TreeIter* b) {
33930 gtk_tree_store_swap(&this, a, b);
33934 struct TreeStoreClass {
33935 GObject2.ObjectClass parent_class;
33936 extern (C) void function () _gtk_reserved1;
33937 extern (C) void function () _gtk_reserved2;
33938 extern (C) void function () _gtk_reserved3;
33939 extern (C) void function () _gtk_reserved4;
33942 struct TreeView /* : Container */ {
33943 mixin Atk.ImplementorIface.__interface__;
33944 mixin Buildable.__interface__;
33945 alias parent this;
33946 alias parent super_;
33947 alias parent container;
33948 Container parent;
33949 TreeViewPrivate* priv;
33952 // Creates a new #GtkTreeView widget.
33953 // RETURNS: A newly created #GtkTreeView widget.
33954 static TreeView* new_()() {
33955 return gtk_tree_view_new();
33958 // Creates a new #GtkTreeView widget with the model initialized to @model.
33959 // RETURNS: A newly created #GtkTreeView widget.
33960 // <model>: the model.
33961 static TreeView* new_with_model()(TreeModel* model) {
33962 return gtk_tree_view_new_with_model(model);
33965 // Appends @column to the list of columns. If @tree_view has "fixed_height"
33966 // mode enabled, then @column must have its "sizing" property set to be
33967 // GTK_TREE_VIEW_COLUMN_FIXED.
33968 // RETURNS: The number of columns in @tree_view after appending.
33969 // <column>: The #GtkTreeViewColumn to add.
33970 int append_column()(TreeViewColumn* column) {
33971 return gtk_tree_view_append_column(&this, column);
33973 // Recursively collapses all visible, expanded nodes in @tree_view.
33974 void collapse_all()() {
33975 gtk_tree_view_collapse_all(&this);
33978 // Collapses a row (hides its child rows, if they exist).
33979 // RETURNS: %TRUE if the row was collapsed.
33980 // <path>: path to a row in the @tree_view
33981 int collapse_row()(TreePath* path) {
33982 return gtk_tree_view_collapse_row(&this, path);
33985 // Resizes all columns to their optimal width. Only works after the
33986 // treeview has been realized.
33987 void columns_autosize()() {
33988 gtk_tree_view_columns_autosize(&this);
33991 // VERSION: 2.12
33992 // Converts bin_window coordinates to coordinates for the
33993 // tree (the full scrollable area of the tree).
33994 // <bx>: X coordinate relative to bin_window
33995 // <by>: Y coordinate relative to bin_window
33996 // <tx>: return location for tree X coordinate
33997 // <ty>: return location for tree Y coordinate
33998 void convert_bin_window_to_tree_coords()(int bx, int by, /*out*/ int* tx, /*out*/ int* ty) {
33999 gtk_tree_view_convert_bin_window_to_tree_coords(&this, bx, by, tx, ty);
34002 // VERSION: 2.12
34003 // Converts bin_window coordinates (see gtk_tree_view_get_bin_window())
34004 // to widget relative coordinates.
34005 // <bx>: bin_window X coordinate
34006 // <by>: bin_window Y coordinate
34007 // <wx>: return location for widget X coordinate
34008 // <wy>: return location for widget Y coordinate
34009 void convert_bin_window_to_widget_coords()(int bx, int by, /*out*/ int* wx, /*out*/ int* wy) {
34010 gtk_tree_view_convert_bin_window_to_widget_coords(&this, bx, by, wx, wy);
34013 // VERSION: 2.12
34014 // Converts tree coordinates (coordinates in full scrollable area of the tree)
34015 // to bin_window coordinates.
34016 // <tx>: tree X coordinate
34017 // <ty>: tree Y coordinate
34018 // <bx>: return location for X coordinate relative to bin_window
34019 // <by>: return location for Y coordinate relative to bin_window
34020 void convert_tree_to_bin_window_coords()(int tx, int ty, /*out*/ int* bx, /*out*/ int* by) {
34021 gtk_tree_view_convert_tree_to_bin_window_coords(&this, tx, ty, bx, by);
34024 // VERSION: 2.12
34025 // Converts tree coordinates (coordinates in full scrollable area of the tree)
34026 // to widget coordinates.
34027 // <tx>: X coordinate relative to the tree
34028 // <ty>: Y coordinate relative to the tree
34029 // <wx>: return location for widget X coordinate
34030 // <wy>: return location for widget Y coordinate
34031 void convert_tree_to_widget_coords()(int tx, int ty, /*out*/ int* wx, /*out*/ int* wy) {
34032 gtk_tree_view_convert_tree_to_widget_coords(&this, tx, ty, wx, wy);
34035 // VERSION: 2.12
34036 // Converts widget coordinates to coordinates for the bin_window
34037 // (see gtk_tree_view_get_bin_window()).
34038 // <wx>: X coordinate relative to the widget
34039 // <wy>: Y coordinate relative to the widget
34040 // <bx>: return location for bin_window X coordinate
34041 // <by>: return location for bin_window Y coordinate
34042 void convert_widget_to_bin_window_coords()(int wx, int wy, /*out*/ int* bx, /*out*/ int* by) {
34043 gtk_tree_view_convert_widget_to_bin_window_coords(&this, wx, wy, bx, by);
34046 // VERSION: 2.12
34047 // Converts widget coordinates to coordinates for the
34048 // tree (the full scrollable area of the tree).
34049 // <wx>: X coordinate relative to the widget
34050 // <wy>: Y coordinate relative to the widget
34051 // <tx>: return location for tree X coordinate
34052 // <ty>: return location for tree Y coordinate
34053 void convert_widget_to_tree_coords()(int wx, int wy, /*out*/ int* tx, /*out*/ int* ty) {
34054 gtk_tree_view_convert_widget_to_tree_coords(&this, wx, wy, tx, ty);
34057 // Creates a #GdkPixmap representation of the row at @path.
34058 // This image is used for a drag icon.
34059 // RETURNS: a newly-allocated pixmap of the drag icon.
34060 // <path>: a #GtkTreePath in @tree_view
34061 Gdk2.Pixmap* create_row_drag_icon()(TreePath* path) {
34062 return gtk_tree_view_create_row_drag_icon(&this, path);
34065 // Turns @tree_view into a drop destination for automatic DND. Calling
34066 // this method sets #GtkTreeView:reorderable to %FALSE.
34067 // <targets>: the table of targets that the drag will support
34068 // <n_targets>: the number of items in @targets
34069 // <actions>: the bitmask of possible actions for a drag from this widget
34070 void enable_model_drag_dest()(TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
34071 gtk_tree_view_enable_model_drag_dest(&this, targets, n_targets, actions);
34074 // Turns @tree_view into a drag source for automatic DND. Calling this
34075 // method sets #GtkTreeView:reorderable to %FALSE.
34076 // <start_button_mask>: Mask of allowed buttons to start drag
34077 // <targets>: the table of targets that the drag will support
34078 // <n_targets>: the number of items in @targets
34079 // <actions>: the bitmask of possible actions for a drag from this widget
34080 void enable_model_drag_source()(Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
34081 gtk_tree_view_enable_model_drag_source(&this, start_button_mask, targets, n_targets, actions);
34083 // Recursively expands all nodes in the @tree_view.
34084 void expand_all()() {
34085 gtk_tree_view_expand_all(&this);
34088 // Opens the row so its children are visible.
34089 // RETURNS: %TRUE if the row existed and had children
34090 // <path>: path to a row
34091 // <open_all>: whether to recursively expand, or just expand immediate children
34092 int expand_row()(TreePath* path, int open_all) {
34093 return gtk_tree_view_expand_row(&this, path, open_all);
34096 // VERSION: 2.2
34097 // Expands the row at @path. This will also expand all parent rows of
34098 // <path>: path to a row.
34099 void expand_to_path()(TreePath* path) {
34100 gtk_tree_view_expand_to_path(&this, path);
34103 // Fills the bounding rectangle in bin_window coordinates for the cell at the
34104 // row specified by @path and the column specified by @column. If @path is
34105 // %NULL, or points to a node not found in the tree, the @y and @height fields of
34106 // the rectangle will be filled with 0. If @column is %NULL, the @x and @width
34107 // fields will be filled with 0. The returned rectangle is equivalent to the
34108 // areas tile to cover the entire bin window. Contrast with the @cell_area,
34109 // returned by gtk_tree_view_get_cell_area(), which returns only the cell
34110 // itself, excluding surrounding borders and the tree expander area.
34111 // <path>: a #GtkTreePath for the row, or %NULL to get only horizontal coordinates
34112 // <column>: a #GtkTreeViewColumn for the column, or %NULL to get only vertical coordiantes
34113 // <rect>: rectangle to fill with cell background rect
34114 void get_background_area()(TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect) {
34115 gtk_tree_view_get_background_area(&this, path, column, rect);
34118 // Returns the window that @tree_view renders to.
34119 // This is used primarily to compare to <literal>event->window</literal>
34120 // to confirm that the event on @tree_view is on the right window.
34121 // hasn't been realized yet
34122 // RETURNS: A #GdkWindow, or %NULL when @tree_view
34123 Gdk2.Window* get_bin_window()() {
34124 return gtk_tree_view_get_bin_window(&this);
34127 // Fills the bounding rectangle in bin_window coordinates for the cell at the
34128 // row specified by @path and the column specified by @column. If @path is
34129 // %NULL, or points to a path not currently displayed, the @y and @height fields
34130 // of the rectangle will be filled with 0. If @column is %NULL, the @x and @width
34131 // fields will be filled with 0. The sum of all cell rects does not cover the
34132 // entire tree; there are extra pixels in between rows, for example. The
34133 // returned rectangle is equivalent to the @cell_area passed to
34134 // gtk_cell_renderer_render(). This function is only valid if @tree_view is
34135 // realized.
34136 // <path>: a #GtkTreePath for the row, or %NULL to get only horizontal coordinates
34137 // <column>: a #GtkTreeViewColumn for the column, or %NULL to get only vertical coordinates
34138 // <rect>: rectangle to fill with cell rect
34139 void get_cell_area()(TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect) {
34140 gtk_tree_view_get_cell_area(&this, path, column, rect);
34143 // Gets the #GtkTreeViewColumn at the given position in the #tree_view.
34144 // position is outside the range of columns.
34145 // RETURNS: The #GtkTreeViewColumn, or %NULL if the
34146 // <n>: The position of the column, counting from 0.
34147 TreeViewColumn* get_column()(int n) {
34148 return gtk_tree_view_get_column(&this, n);
34151 // Returns a #GList of all the #GtkTreeViewColumn s currently in @tree_view.
34152 // The returned list must be freed with g_list_free ().
34153 // RETURNS: A list of #GtkTreeViewColumn s
34154 GLib2.List* /*new container*/ get_columns()() {
34155 return gtk_tree_view_get_columns(&this);
34158 // Fills in @path and @focus_column with the current path and focus column. If
34159 // the cursor isn't currently set, then *@path will be %NULL. If no column
34160 // currently has focus, then *@focus_column will be %NULL.
34161 // The returned #GtkTreePath must be freed with gtk_tree_path_free() when
34162 // you are done with it.
34163 // <path>: A pointer to be filled with the current cursor path, or %NULL
34164 // <focus_column>: A pointer to be filled with the current focus column, or %NULL
34165 void get_cursor()(/*out*/ TreePath** path=null, /*out*/ TreeViewColumn** focus_column=null) {
34166 gtk_tree_view_get_cursor(&this, path, focus_column);
34169 // Determines the destination row for a given position. @drag_x and
34170 // meaningful if @tree_view is realized. Therefore this function will always
34171 // return %FALSE if @tree_view is not realized or does not have a model.
34172 // is indeed the case.
34173 // RETURNS: whether there is a row at the given position, %TRUE if this
34174 // <drag_x>: the position to determine the destination row for
34175 // <drag_y>: the position to determine the destination row for
34176 // <path>: Return location for the path of the highlighted row, or %NULL.
34177 // <pos>: Return location for the drop position, or %NULL
34178 int get_dest_row_at_pos()(int drag_x, int drag_y, /*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null) {
34179 return gtk_tree_view_get_dest_row_at_pos(&this, drag_x, drag_y, path, pos);
34182 // Gets information about the row that is highlighted for feedback.
34183 // <path>: Return location for the path of the highlighted row, or %NULL.
34184 // <pos>: Return location for the drop position, or %NULL
34185 void get_drag_dest_row()(/*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null) {
34186 gtk_tree_view_get_drag_dest_row(&this, path, pos);
34189 // Returns whether or not the tree allows to start interactive searching
34190 // by typing in text.
34191 // RETURNS: whether or not to let the user search interactively
34192 int get_enable_search()() {
34193 return gtk_tree_view_get_enable_search(&this);
34196 // VERSION: 2.10
34197 // Returns whether or not tree lines are drawn in @tree_view.
34198 // otherwise.
34199 // RETURNS: %TRUE if tree lines are drawn in @tree_view, %FALSE
34200 int get_enable_tree_lines()() {
34201 return gtk_tree_view_get_enable_tree_lines(&this);
34204 // Returns the column that is the current expander column.
34205 // This column has the expander arrow drawn next to it.
34206 // RETURNS: The expander column.
34207 TreeViewColumn* get_expander_column()() {
34208 return gtk_tree_view_get_expander_column(&this);
34211 // VERSION: 2.6
34212 // Returns whether fixed height mode is turned on for @tree_view.
34213 // RETURNS: %TRUE if @tree_view is in fixed height mode
34214 int get_fixed_height_mode()() {
34215 return gtk_tree_view_get_fixed_height_mode(&this);
34218 // VERSION: 2.10
34219 // Returns which grid lines are enabled in @tree_view.
34220 // are enabled.
34221 // RETURNS: a #GtkTreeViewGridLines value indicating which grid lines
34222 TreeViewGridLines get_grid_lines()() {
34223 return gtk_tree_view_get_grid_lines(&this);
34226 // Gets the #GtkAdjustment currently being used for the horizontal aspect.
34227 // if none is currently being used.
34228 // RETURNS: A #GtkAdjustment object, or %NULL
34229 Adjustment* get_hadjustment()() {
34230 return gtk_tree_view_get_hadjustment(&this);
34233 // VERSION: 2.10
34234 // Returns whether all header columns are clickable.
34235 // RETURNS: %TRUE if all header columns are clickable, otherwise %FALSE
34236 int get_headers_clickable()() {
34237 return gtk_tree_view_get_headers_clickable(&this);
34240 // Returns %TRUE if the headers on the @tree_view are visible.
34241 // RETURNS: Whether the headers are visible or not.
34242 int get_headers_visible()() {
34243 return gtk_tree_view_get_headers_visible(&this);
34246 // VERSION: 2.6
34247 // Returns whether hover expansion mode is turned on for @tree_view.
34248 // RETURNS: %TRUE if @tree_view is in hover expansion mode
34249 int get_hover_expand()() {
34250 return gtk_tree_view_get_hover_expand(&this);
34253 // VERSION: 2.6
34254 // Returns whether hover selection mode is turned on for @tree_view.
34255 // RETURNS: %TRUE if @tree_view is in hover selection mode
34256 int get_hover_selection()() {
34257 return gtk_tree_view_get_hover_selection(&this);
34260 // VERSION: 2.12
34261 // Returns the amount, in pixels, of extra indentation for child levels
34262 // in @tree_view.
34263 // RETURNS: the amount of extra indentation for child levels in
34264 int get_level_indentation()() {
34265 return gtk_tree_view_get_level_indentation(&this);
34268 // Returns the model the #GtkTreeView is based on. Returns %NULL if the
34269 // model is unset.
34270 // RETURNS: A #GtkTreeModel, or %NULL if none is currently being used.
34271 TreeModel* get_model()() {
34272 return gtk_tree_view_get_model(&this);
34275 // Finds the path at the point (@x, @y), relative to bin_window coordinates
34276 // (please see gtk_tree_view_get_bin_window()).
34277 // That is, @x and @y are relative to an events coordinates. @x and @y must
34278 // come from an event on the @tree_view only where <literal>event->window ==
34279 // gtk_tree_view_get_bin_window (<!-- -->)</literal>. It is primarily for
34280 // things like popup menus. If @path is non-%NULL, then it will be filled
34281 // with the #GtkTreePath at that point. This path should be freed with
34282 // gtk_tree_path_free(). If @column is non-%NULL, then it will be filled
34283 // with the column at that point. @cell_x and @cell_y return the coordinates
34284 // relative to the cell background (i.e. the @background_area passed to
34285 // gtk_cell_renderer_render()). This function is only meaningful if
34286 // if @tree_view is not realized or does not have a model.
34287 // For converting widget coordinates (eg. the ones you get from
34288 // GtkWidget::query-tooltip), please see
34289 // gtk_tree_view_convert_widget_to_bin_window_coords().
34290 // RETURNS: %TRUE if a row exists at that coordinate.
34291 // <x>: The x position to be identified (relative to bin_window).
34292 // <y>: The y position to be identified (relative to bin_window).
34293 // <path>: A pointer to a #GtkTreePath pointer to be filled in, or %NULL
34294 // <column>: A pointer to a #GtkTreeViewColumn pointer to be filled in, or %NULL
34295 // <cell_x>: A pointer where the X coordinate relative to the cell can be placed, or %NULL
34296 // <cell_y>: A pointer where the Y coordinate relative to the cell can be placed, or %NULL
34297 int get_path_at_pos()(int x, int y, /*out*/ TreePath** path=null, /*out*/ TreeViewColumn** column=null, /*out*/ int* cell_x=null, /*out*/ int* cell_y=null) {
34298 return gtk_tree_view_get_path_at_pos(&this, x, y, path, column, cell_x, cell_y);
34301 // Retrieves whether the user can reorder the tree via drag-and-drop. See
34302 // gtk_tree_view_set_reorderable().
34303 // RETURNS: %TRUE if the tree can be reordered.
34304 int get_reorderable()() {
34305 return gtk_tree_view_get_reorderable(&this);
34308 // Unintrospectable method: get_row_separator_func() / gtk_tree_view_get_row_separator_func()
34309 // VERSION: 2.6
34310 // Returns the current row separator function.
34311 // RETURNS: the current row separator function.
34312 TreeViewRowSeparatorFunc get_row_separator_func()() {
34313 return gtk_tree_view_get_row_separator_func(&this);
34316 // VERSION: 2.10
34317 // Returns whether rubber banding is turned on for @tree_view. If the
34318 // selection mode is #GTK_SELECTION_MULTIPLE, rubber banding will allow the
34319 // user to select multiple rows by dragging the mouse.
34320 // RETURNS: %TRUE if rubber banding in @tree_view is enabled.
34321 int get_rubber_banding()() {
34322 return gtk_tree_view_get_rubber_banding(&this);
34325 // Gets the setting set by gtk_tree_view_set_rules_hint().
34326 // RETURNS: %TRUE if rules are useful for the user of this tree
34327 int get_rules_hint()() {
34328 return gtk_tree_view_get_rules_hint(&this);
34331 // Gets the column searched on by the interactive search code.
34332 // RETURNS: the column the interactive search code searches in.
34333 int get_search_column()() {
34334 return gtk_tree_view_get_search_column(&this);
34337 // VERSION: 2.10
34338 // Returns the #GtkEntry which is currently in use as interactive search
34339 // entry for @tree_view. In case the built-in entry is being used, %NULL
34340 // will be returned.
34341 // RETURNS: the entry currently in use as search entry.
34342 Entry* get_search_entry()() {
34343 return gtk_tree_view_get_search_entry(&this);
34346 // Unintrospectable method: get_search_equal_func() / gtk_tree_view_get_search_equal_func()
34347 // Returns the compare function currently in use.
34348 // RETURNS: the currently used compare function for the search code.
34349 TreeViewSearchEqualFunc get_search_equal_func()() {
34350 return gtk_tree_view_get_search_equal_func(&this);
34353 // Unintrospectable method: get_search_position_func() / gtk_tree_view_get_search_position_func()
34354 // VERSION: 2.10
34355 // Returns the positioning function currently in use.
34356 // RETURNS: the currently used function for positioning the search dialog.
34357 TreeViewSearchPositionFunc get_search_position_func()() {
34358 return gtk_tree_view_get_search_position_func(&this);
34361 // Gets the #GtkTreeSelection associated with @tree_view.
34362 // RETURNS: A #GtkTreeSelection object.
34363 TreeSelection* get_selection()() {
34364 return gtk_tree_view_get_selection(&this);
34367 // VERSION: 2.12
34368 // Returns whether or not expanders are drawn in @tree_view.
34369 // otherwise.
34370 // RETURNS: %TRUE if expanders are drawn in @tree_view, %FALSE
34371 int get_show_expanders()() {
34372 return gtk_tree_view_get_show_expanders(&this);
34375 // VERSION: 2.12
34376 // Returns the column of @tree_view's model which is being used for
34377 // displaying tooltips on @tree_view's rows.
34378 // used, or -1 if this is disabled.
34379 // RETURNS: the index of the tooltip column that is currently being
34380 int get_tooltip_column()() {
34381 return gtk_tree_view_get_tooltip_column(&this);
34384 // VERSION: 2.12
34385 // This function is supposed to be used in a #GtkWidget::query-tooltip
34386 // signal handler for #GtkTreeView. The @x, @y and @keyboard_tip values
34387 // which are received in the signal handler, should be passed to this
34388 // function without modification.
34389 // The return value indicates whether there is a tree view row at the given
34390 // coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
34391 // tooltips the row returned will be the cursor row. When %TRUE, then any of
34392 // that row and the corresponding model. @x and @y will always be converted
34393 // to be relative to @tree_view's bin_window if @keyboard_tooltip is %FALSE.
34394 // RETURNS: whether or not the given tooltip context points to a row.
34395 // <x>: the x coordinate (relative to widget coordinates)
34396 // <y>: the y coordinate (relative to widget coordinates)
34397 // <keyboard_tip>: whether this is a keyboard tooltip or not
34398 // <model>: a pointer to receive a #GtkTreeModel or %NULL
34399 // <path>: a pointer to receive a #GtkTreePath or %NULL
34400 // <iter>: a pointer to receive a #GtkTreeIter or %NULL
34401 int get_tooltip_context()(/*inout*/ int* x, /*inout*/ int* y, int keyboard_tip, /*out*/ TreeModel** model=null, /*out*/ TreePath** path=null, /*out*/ TreeIter* iter=null) {
34402 return gtk_tree_view_get_tooltip_context(&this, x, y, keyboard_tip, model, path, iter);
34405 // Gets the #GtkAdjustment currently being used for the vertical aspect.
34406 // if none is currently being used.
34407 // RETURNS: A #GtkAdjustment object, or %NULL
34408 Adjustment* get_vadjustment()() {
34409 return gtk_tree_view_get_vadjustment(&this);
34412 // VERSION: 2.8
34413 // Sets @start_path and @end_path to be the first and last visible path.
34414 // Note that there may be invisible paths in between.
34415 // The paths should be freed with gtk_tree_path_free() after use.
34416 // RETURNS: %TRUE, if valid paths were placed in @start_path and @end_path.
34417 // <start_path>: Return location for start of region, or %NULL.
34418 // <end_path>: Return location for end of region, or %NULL.
34419 int get_visible_range()(/*out*/ TreePath** start_path=null, /*out*/ TreePath** end_path=null) {
34420 return gtk_tree_view_get_visible_range(&this, start_path, end_path);
34423 // Fills @visible_rect with the currently-visible region of the
34424 // buffer, in tree coordinates. Convert to bin_window coordinates with
34425 // gtk_tree_view_convert_tree_to_bin_window_coords().
34426 // Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
34427 // scrollable area of the tree.
34428 // <visible_rect>: rectangle to fill
34429 void get_visible_rect()(/*out*/ Gdk2.Rectangle* visible_rect) {
34430 gtk_tree_view_get_visible_rect(&this, visible_rect);
34433 // This inserts the @column into the @tree_view at @position. If @position is
34434 // -1, then the column is inserted at the end. If @tree_view has
34435 // "fixed_height" mode enabled, then @column must have its "sizing" property
34436 // set to be GTK_TREE_VIEW_COLUMN_FIXED.
34437 // RETURNS: The number of columns in @tree_view after insertion.
34438 // <column>: The #GtkTreeViewColumn to be inserted.
34439 // <position>: The position to insert @column in.
34440 int insert_column()(TreeViewColumn* column, int position) {
34441 return gtk_tree_view_insert_column(&this, column, position);
34444 // Unintrospectable method: insert_column_with_attributes() / gtk_tree_view_insert_column_with_attributes()
34445 // Creates a new #GtkTreeViewColumn and inserts it into the @tree_view at
34446 // the end. The column is initialized with the attributes given. If @tree_view
34447 // has "fixed_height" mode enabled, then the new column will have its sizing
34448 // property set to be GTK_TREE_VIEW_COLUMN_FIXED.
34449 // RETURNS: The number of columns in @tree_view after insertion.
34450 // <position>: The position to insert the new column in.
34451 // <title>: The title to set the header to.
34452 // <cell>: The #GtkCellRenderer.
34453 /+ Not available -- variadic methods unsupported - use the C function directly.
34454 alias gtk_tree_view_insert_column_with_attributes insert_column_with_attributes; // Variadic
34457 // Convenience function that inserts a new column into the #GtkTreeView
34458 // with the given cell renderer and a #GtkCellDataFunc to set cell renderer
34459 // attributes (normally using data from the model). See also
34460 // gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
34461 // If @tree_view has "fixed_height" mode enabled, then the new column will have its
34462 // "sizing" property set to be GTK_TREE_VIEW_COLUMN_FIXED.
34463 // RETURNS: number of columns in the tree view post-insert
34464 // <position>: Position to insert, -1 for append
34465 // <title>: column title
34466 // <cell>: cell renderer for column
34467 // <func>: function to set attributes of cell renderer
34468 // <data>: data for @func
34469 // <dnotify>: destroy notifier for @data
34470 int insert_column_with_data_func()(int position, char* title, CellRenderer* cell, TreeCellDataFunc func, void* data, GLib2.DestroyNotify dnotify) {
34471 return gtk_tree_view_insert_column_with_data_func(&this, position, title, cell, func, data, dnotify);
34474 // VERSION: 2.12
34475 // Returns whether a rubber banding operation is currently being done
34476 // in @tree_view.
34477 // done in @tree_view.
34478 // RETURNS: %TRUE if a rubber banding operation is currently being
34479 int is_rubber_banding_active()() {
34480 return gtk_tree_view_is_rubber_banding_active(&this);
34483 // Calls @func on all expanded rows.
34484 // <func>: A function to be called
34485 // <data>: User data to be passed to the function.
34486 void map_expanded_rows()(TreeViewMappingFunc func, void* data) {
34487 gtk_tree_view_map_expanded_rows(&this, func, data);
34490 // Moves @column to be after to @base_column. If @base_column is %NULL, then
34491 // <column>: The #GtkTreeViewColumn to be moved.
34492 // <base_column>: The #GtkTreeViewColumn to be moved relative to, or %NULL.
34493 void move_column_after()(TreeViewColumn* column, TreeViewColumn* base_column=null) {
34494 gtk_tree_view_move_column_after(&this, column, base_column);
34497 // Removes @column from @tree_view.
34498 // RETURNS: The number of columns in @tree_view after removing.
34499 // <column>: The #GtkTreeViewColumn to remove.
34500 int remove_column()(TreeViewColumn* column) {
34501 return gtk_tree_view_remove_column(&this, column);
34504 // Activates the cell determined by @path and @column.
34505 // <path>: The #GtkTreePath to be activated.
34506 // <column>: The #GtkTreeViewColumn to be activated.
34507 void row_activated()(TreePath* path, TreeViewColumn* column) {
34508 gtk_tree_view_row_activated(&this, path, column);
34511 // Returns %TRUE if the node pointed to by @path is expanded in @tree_view.
34512 // RETURNS: %TRUE if #path is expanded.
34513 // <path>: A #GtkTreePath to test expansion state.
34514 int row_expanded()(TreePath* path) {
34515 return gtk_tree_view_row_expanded(&this, path);
34518 // Moves the alignments of @tree_view to the position specified by @column and
34519 // if @path is %NULL no vertical scrolling occurs. At a minimum, one of @column
34520 // or @path need to be non-%NULL. @row_align determines where the row is
34521 // placed, and @col_align determines where @column is placed. Both are expected
34522 // to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
34523 // right/bottom alignment, 0.5 means center.
34524 // If @use_align is %FALSE, then the alignment arguments are ignored, and the
34525 // tree does the minimum amount of work to scroll the cell onto the screen.
34526 // This means that the cell will be scrolled to the edge closest to its current
34527 // position. If the cell is currently visible on the screen, nothing is done.
34528 // This function only works if the model is set, and @path is a valid row on the
34529 // model. If the model changes before the @tree_view is realized, the centered
34530 // path will be modified to reflect this change.
34531 // <path>: The path of the row to move to, or %NULL.
34532 // <column>: The #GtkTreeViewColumn to move horizontally to, or %NULL.
34533 // <use_align>: whether to use alignment arguments, or %FALSE.
34534 // <row_align>: The vertical alignment of the row specified by @path.
34535 // <col_align>: The horizontal alignment of the column specified by @column.
34536 void scroll_to_cell()(TreePath* path, TreeViewColumn* column, int use_align, float row_align, float col_align) {
34537 gtk_tree_view_scroll_to_cell(&this, path, column, use_align, row_align, col_align);
34540 // Scrolls the tree view such that the top-left corner of the visible
34541 // area is @tree_x, @tree_y, where @tree_x and @tree_y are specified
34542 // in tree coordinates. The @tree_view must be realized before
34543 // this function is called. If it isn't, you probably want to be
34544 // using gtk_tree_view_scroll_to_cell().
34545 // If either @tree_x or @tree_y are -1, then that direction isn't scrolled.
34546 // <tree_x>: X coordinate of new top-left pixel of visible area, or -1
34547 // <tree_y>: Y coordinate of new top-left pixel of visible area, or -1
34548 void scroll_to_point()(int tree_x, int tree_y) {
34549 gtk_tree_view_scroll_to_point(&this, tree_x, tree_y);
34552 // Sets a user function for determining where a column may be dropped when
34553 // dragged. This function is called on every column pair in turn at the
34554 // beginning of a column drag to determine where a drop can take place. The
34555 // dragged, the two #GtkTreeViewColumn s determining the drop spot, and
34556 // are %NULL, then they indicate an edge. If @func is set to be %NULL, then
34557 // dropped everywhere.
34558 // <func>: A function to determine which columns are reorderable, or %NULL.
34559 // <user_data>: User data to be passed to @func, or %NULL
34560 // <destroy>: Destroy notifier for @user_data, or %NULL
34561 void set_column_drag_function()(TreeViewColumnDropFunc func=null, void* user_data=null, GLib2.DestroyNotify destroy=null) {
34562 gtk_tree_view_set_column_drag_function(&this, func, user_data, destroy);
34565 // Sets the current keyboard focus to be at @path, and selects it. This is
34566 // useful when you want to focus the user's attention on a particular row. If
34567 // it. Additionally, if @focus_column is specified, and @start_editing is
34568 // %TRUE, then editing should be started in the specified cell.
34569 // This function is often followed by @gtk_widget_grab_focus (@tree_view)
34570 // in order to give keyboard focus to the widget. Please note that editing
34571 // can only happen when the widget is realized.
34572 // If @path is invalid for @model, the current cursor (if any) will be unset
34573 // and the function will return without failing.
34574 // <path>: A #GtkTreePath
34575 // <focus_column>: A #GtkTreeViewColumn, or %NULL
34576 // <start_editing>: %TRUE if the specified cell should start being edited.
34577 void set_cursor()(TreePath* path, TreeViewColumn* focus_column, int start_editing) {
34578 gtk_tree_view_set_cursor(&this, path, focus_column, start_editing);
34581 // VERSION: 2.2
34582 // Sets the current keyboard focus to be at @path, and selects it. This is
34583 // useful when you want to focus the user's attention on a particular row. If
34584 // it. If @focus_column and @focus_cell are not %NULL, and @focus_column
34585 // contains 2 or more editable or activatable cells, then focus is given to
34586 // the cell specified by @focus_cell. Additionally, if @focus_column is
34587 // specified, and @start_editing is %TRUE, then editing should be started in
34588 // the specified cell. This function is often followed by
34589 // widget. Please note that editing can only happen when the widget is
34590 // realized.
34591 // If @path is invalid for @model, the current cursor (if any) will be unset
34592 // and the function will return without failing.
34593 // <path>: A #GtkTreePath
34594 // <focus_column>: A #GtkTreeViewColumn, or %NULL
34595 // <focus_cell>: A #GtkCellRenderer, or %NULL
34596 // <start_editing>: %TRUE if the specified cell should start being edited.
34597 void set_cursor_on_cell()(TreePath* path, TreeViewColumn* focus_column, CellRenderer* focus_cell, int start_editing) {
34598 gtk_tree_view_set_cursor_on_cell(&this, path, focus_column, focus_cell, start_editing);
34601 // This function should almost never be used. It is meant for private use by
34602 // ATK for determining the number of visible children that are removed when the
34603 // user collapses a row, or a row is deleted.
34604 // <func>: Function to be called when a view row is destroyed, or %NULL
34605 // <data>: User data to be passed to @func, or %NULL
34606 // <destroy>: Destroy notifier for @data, or %NULL
34607 void set_destroy_count_func()(TreeDestroyCountFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) {
34608 gtk_tree_view_set_destroy_count_func(&this, func, data, destroy);
34611 // Sets the row that is highlighted for feedback.
34612 // <path>: The path of the row to highlight, or %NULL.
34613 // <pos>: Specifies whether to drop before, after or into the row
34614 void set_drag_dest_row()(TreePath* path, TreeViewDropPosition pos) {
34615 gtk_tree_view_set_drag_dest_row(&this, path, pos);
34618 // If @enable_search is set, then the user can type in text to search through
34619 // the tree interactively (this is sometimes called "typeahead find").
34620 // Note that even if this is %FALSE, the user can still initiate a search
34621 // using the "start-interactive-search" key binding.
34622 // <enable_search>: %TRUE, if the user can search interactively
34623 void set_enable_search()(int enable_search) {
34624 gtk_tree_view_set_enable_search(&this, enable_search);
34627 // VERSION: 2.10
34628 // Sets whether to draw lines interconnecting the expanders in @tree_view.
34629 // This does not have any visible effects for lists.
34630 // <enabled>: %TRUE to enable tree line drawing, %FALSE otherwise.
34631 void set_enable_tree_lines()(int enabled) {
34632 gtk_tree_view_set_enable_tree_lines(&this, enabled);
34635 // Sets the column to draw the expander arrow at. It must be in @tree_view.
34636 // If @column is %NULL, then the expander arrow is always at the first
34637 // visible column.
34638 // If you do not want expander arrow to appear in your tree, set the
34639 // expander column to a hidden column.
34640 // <column>: %NULL, or the column to draw the expander arrow at.
34641 void set_expander_column()(TreeViewColumn* column) {
34642 gtk_tree_view_set_expander_column(&this, column);
34645 // VERSION: 2.6
34646 // Enables or disables the fixed height mode of @tree_view.
34647 // Fixed height mode speeds up #GtkTreeView by assuming that all
34648 // rows have the same height.
34649 // Only enable this option if all rows are the same height and all
34650 // columns are of type %GTK_TREE_VIEW_COLUMN_FIXED.
34651 // <enable>: %TRUE to enable fixed height mode
34652 void set_fixed_height_mode()(int enable) {
34653 gtk_tree_view_set_fixed_height_mode(&this, enable);
34656 // VERSION: 2.10
34657 // Sets which grid lines to draw in @tree_view.
34658 // <grid_lines>: a #GtkTreeViewGridLines value indicating which grid lines to enable.
34659 void set_grid_lines()(TreeViewGridLines grid_lines) {
34660 gtk_tree_view_set_grid_lines(&this, grid_lines);
34663 // Sets the #GtkAdjustment for the current horizontal aspect.
34664 // <adjustment>: The #GtkAdjustment to set, or %NULL
34665 void set_hadjustment()(Adjustment* adjustment=null) {
34666 gtk_tree_view_set_hadjustment(&this, adjustment);
34669 // Allow the column title buttons to be clicked.
34670 // <setting>: %TRUE if the columns are clickable.
34671 void set_headers_clickable()(int setting) {
34672 gtk_tree_view_set_headers_clickable(&this, setting);
34675 // Sets the visibility state of the headers.
34676 // <headers_visible>: %TRUE if the headers are visible
34677 void set_headers_visible()(int headers_visible) {
34678 gtk_tree_view_set_headers_visible(&this, headers_visible);
34681 // VERSION: 2.6
34682 // Enables of disables the hover expansion mode of @tree_view.
34683 // Hover expansion makes rows expand or collapse if the pointer
34684 // moves over them.
34685 // <expand>: %TRUE to enable hover selection mode
34686 void set_hover_expand()(int expand) {
34687 gtk_tree_view_set_hover_expand(&this, expand);
34690 // VERSION: 2.6
34691 // Enables of disables the hover selection mode of @tree_view.
34692 // Hover selection makes the selected row follow the pointer.
34693 // Currently, this works only for the selection modes
34694 // %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
34695 // <hover>: %TRUE to enable hover selection mode
34696 void set_hover_selection()(int hover) {
34697 gtk_tree_view_set_hover_selection(&this, hover);
34700 // VERSION: 2.12
34701 // Sets the amount of extra indentation for child levels to use in @tree_view
34702 // in addition to the default indentation. The value should be specified in
34703 // pixels, a value of 0 disables this feature and in this case only the default
34704 // indentation will be used.
34705 // This does not have any visible effects for lists.
34706 // <indentation>: the amount, in pixels, of extra indentation in @tree_view.
34707 void set_level_indentation()(int indentation) {
34708 gtk_tree_view_set_level_indentation(&this, indentation);
34711 // Sets the model for a #GtkTreeView. If the @tree_view already has a model
34712 // set, it will remove it before setting the new model. If @model is %NULL,
34713 // then it will unset the old model.
34714 // <model>: The model.
34715 void set_model()(TreeModel* model=null) {
34716 gtk_tree_view_set_model(&this, model);
34719 // This function is a convenience function to allow you to reorder
34720 // models that support the #GtkDragSourceIface and the
34721 // #GtkDragDestIface. Both #GtkTreeStore and #GtkListStore support
34722 // these. If @reorderable is %TRUE, then the user can reorder the
34723 // model by dragging and dropping rows. The developer can listen to
34724 // these changes by connecting to the model's row_inserted and
34725 // row_deleted signals. The reordering is implemented by setting up
34726 // the tree view as a drag source and destination. Therefore, drag and
34727 // drop can not be used in a reorderable view for any other purpose.
34728 // This function does not give you any degree of control over the order -- any
34729 // reordering is allowed. If more control is needed, you should probably
34730 // handle drag and drop manually.
34731 // <reorderable>: %TRUE, if the tree can be reordered.
34732 void set_reorderable()(int reorderable) {
34733 gtk_tree_view_set_reorderable(&this, reorderable);
34736 // VERSION: 2.6
34737 // Sets the row separator function, which is used to determine
34738 // whether a row should be drawn as a separator. If the row separator
34739 // function is %NULL, no separators are drawn. This is the default value.
34740 // <func>: a #GtkTreeViewRowSeparatorFunc
34741 // <data>: user data to pass to @func, or %NULL
34742 // <destroy>: destroy notifier for @data, or %NULL
34743 void set_row_separator_func()(TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null) {
34744 gtk_tree_view_set_row_separator_func(&this, func, data, destroy);
34747 // VERSION: 2.10
34748 // Enables or disables rubber banding in @tree_view. If the selection mode
34749 // is #GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
34750 // multiple rows by dragging the mouse.
34751 // <enable>: %TRUE to enable rubber banding
34752 void set_rubber_banding()(int enable) {
34753 gtk_tree_view_set_rubber_banding(&this, enable);
34756 // This function tells GTK+ that the user interface for your
34757 // application requires users to read across tree rows and associate
34758 // cells with one another. By default, GTK+ will then render the tree
34759 // with alternating row colors. Do <emphasis>not</emphasis> use it
34760 // just because you prefer the appearance of the ruled tree; that's a
34761 // question for the theme. Some themes will draw tree rows in
34762 // alternating colors even when rules are turned off, and users who
34763 // prefer that appearance all the time can choose those themes. You
34764 // should call this function only as a <emphasis>semantic</emphasis>
34765 // hint to the theme engine that your tree makes alternating colors
34766 // useful from a functional standpoint (since it has lots of columns,
34767 // generally).
34768 // <setting>: %TRUE if the tree requires reading across rows
34769 void set_rules_hint()(int setting) {
34770 gtk_tree_view_set_rules_hint(&this, setting);
34773 // Sets @column as the column where the interactive search code should
34774 // search in for the current model.
34775 // If the search column is set, users can use the "start-interactive-search"
34776 // key binding to bring up search popup. The enable-search property controls
34777 // whether simply typing text will also start an interactive search.
34778 // Note that @column refers to a column of the current model. The search
34779 // column is reset to -1 when the model is changed.
34780 // <column>: the column of the model to search in, or -1 to disable searching
34781 void set_search_column()(int column) {
34782 gtk_tree_view_set_search_column(&this, column);
34785 // VERSION: 2.10
34786 // Sets the entry which the interactive search code will use for this
34787 // in our interface at all time at a fixed position. Passing %NULL for
34788 // entry again.
34789 // <entry>: the entry the interactive search code of @tree_view should use or %NULL
34790 void set_search_entry()(Entry* entry=null) {
34791 gtk_tree_view_set_search_entry(&this, entry);
34794 // Sets the compare function for the interactive search capabilities; note
34795 // that somewhat like strcmp() returning 0 for equality
34796 // #GtkTreeViewSearchEqualFunc returns %FALSE on matches.
34797 // <search_equal_func>: the compare function to use during the search
34798 // <search_user_data>: user data to pass to @search_equal_func, or %NULL
34799 // <search_destroy>: Destroy notifier for @search_user_data, or %NULL
34800 void set_search_equal_func()(TreeViewSearchEqualFunc search_equal_func, void* search_user_data=null, GLib2.DestroyNotify search_destroy=null) {
34801 gtk_tree_view_set_search_equal_func(&this, search_equal_func, search_user_data, search_destroy);
34804 // VERSION: 2.10
34805 // Sets the function to use when positioning the search dialog.
34806 // <func>: the function to use to position the search dialog, or %NULL to use the default search position function
34807 // <data>: user data to pass to @func, or %NULL
34808 // <destroy>: Destroy notifier for @data, or %NULL
34809 void set_search_position_func()(TreeViewSearchPositionFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null) {
34810 gtk_tree_view_set_search_position_func(&this, func, data, destroy);
34813 // VERSION: 2.12
34814 // Sets whether to draw and enable expanders and indent child rows in
34815 // and there will be no way to expand and collapse rows by default. Also
34816 // note that hiding the expanders will disable the default indentation. You
34817 // can set a custom indentation in this case using
34818 // gtk_tree_view_set_level_indentation().
34819 // This does not have any visible effects for lists.
34820 // <enabled>: %TRUE to enable expander drawing, %FALSE otherwise.
34821 void set_show_expanders()(int enabled) {
34822 gtk_tree_view_set_show_expanders(&this, enabled);
34825 // VERSION: 2.12
34826 // Sets the tip area of @tooltip to the area @path, @column and @cell have
34827 // in common. For example if @path is %NULL and @column is set, the tip
34828 // area will be set to the full area covered by @column. See also
34829 // gtk_tooltip_set_tip_area().
34830 // Note that if @path is not specified and @cell is set and part of a column
34831 // containing the expander, the tooltip might not show and hide at the correct
34832 // position. In such cases @path must be set to the current node under the
34833 // mouse cursor for this function to operate correctly.
34834 // See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
34835 // <tooltip>: a #GtkTooltip
34836 // <path>: a #GtkTreePath or %NULL
34837 // <column>: a #GtkTreeViewColumn or %NULL
34838 // <cell>: a #GtkCellRenderer or %NULL
34839 void set_tooltip_cell()(Tooltip* tooltip, TreePath* path=null, TreeViewColumn* column=null, CellRenderer* cell=null) {
34840 gtk_tree_view_set_tooltip_cell(&this, tooltip, path, column, cell);
34843 // VERSION: 2.12
34844 // If you only plan to have simple (text-only) tooltips on full rows, you
34845 // can use this function to have #GtkTreeView handle these automatically
34846 // for you. @column should be set to the column in @tree_view's model
34847 // containing the tooltip texts, or -1 to disable this feature.
34848 // When enabled, #GtkWidget::has-tooltip will be set to %TRUE and
34849 // Note that the signal handler sets the text with gtk_tooltip_set_markup(),
34850 // so &amp;, &lt;, etc have to be escaped in the text.
34851 // <column>: an integer, which is a valid column number for @tree_view's model
34852 void set_tooltip_column()(int column) {
34853 gtk_tree_view_set_tooltip_column(&this, column);
34856 // VERSION: 2.12
34857 // Sets the tip area of @tooltip to be the area covered by the row at @path.
34858 // See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
34859 // See also gtk_tooltip_set_tip_area().
34860 // <tooltip>: a #GtkTooltip
34861 // <path>: a #GtkTreePath
34862 void set_tooltip_row()(Tooltip* tooltip, TreePath* path) {
34863 gtk_tree_view_set_tooltip_row(&this, tooltip, path);
34866 // Sets the #GtkAdjustment for the current vertical aspect.
34867 // <adjustment>: The #GtkAdjustment to set, or %NULL
34868 void set_vadjustment()(Adjustment* adjustment=null) {
34869 gtk_tree_view_set_vadjustment(&this, adjustment);
34872 // DEPRECATED (v2.12) method: tree_to_widget_coords - Due to historial reasons the name of this function is
34873 // Converts tree coordinates (coordinates in full scrollable area of the tree)
34874 // to bin_window coordinates.
34875 // incorrect. For converting bin_window coordinates to coordinates relative
34876 // to bin_window, please see
34877 // gtk_tree_view_convert_bin_window_to_widget_coords().
34878 // <tx>: tree X coordinate
34879 // <ty>: tree Y coordinate
34880 // <wx>: return location for X coordinate relative to bin_window
34881 // <wy>: return location for Y coordinate relative to bin_window
34882 void tree_to_widget_coords()(int tx, int ty, int* wx, int* wy) {
34883 gtk_tree_view_tree_to_widget_coords(&this, tx, ty, wx, wy);
34886 // Undoes the effect of
34887 // gtk_tree_view_enable_model_drag_dest(). Calling this method sets
34888 // #GtkTreeView:reorderable to %FALSE.
34889 void unset_rows_drag_dest()() {
34890 gtk_tree_view_unset_rows_drag_dest(&this);
34893 // Undoes the effect of
34894 // gtk_tree_view_enable_model_drag_source(). Calling this method sets
34895 // #GtkTreeView:reorderable to %FALSE.
34896 void unset_rows_drag_source()() {
34897 gtk_tree_view_unset_rows_drag_source(&this);
34900 // DEPRECATED (v2.12) method: widget_to_tree_coords - Due to historial reasons the name of this function is
34901 // Converts bin_window coordinates to coordinates for the
34902 // tree (the full scrollable area of the tree).
34903 // incorrect. For converting coordinates relative to the widget to
34904 // bin_window coordinates, please see
34905 // gtk_tree_view_convert_widget_to_bin_window_coords().
34906 // <wx>: X coordinate relative to bin_window
34907 // <wy>: Y coordinate relative to bin_window
34908 // <tx>: return location for tree X coordinate
34909 // <ty>: return location for tree Y coordinate
34910 void widget_to_tree_coords()(int wx, int wy, int* tx, int* ty) {
34911 gtk_tree_view_widget_to_tree_coords(&this, wx, wy, tx, ty);
34913 // The number of columns of the treeview has changed.
34914 extern (C) alias static void function (TreeView* this_, void* user_data=null) signal_columns_changed;
34916 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34917 return super_.signal_connect!name(cb, data, cf);
34920 ulong signal_connect(string name:"columns-changed", CB:signal_columns_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34921 return signal_connect_data!()(&this, cast(char*)"columns-changed",
34922 cast(GObject2.Callback)cb, data, null, cf);
34924 // The position of the cursor (focused cell) has changed.
34925 extern (C) alias static void function (TreeView* this_, void* user_data=null) signal_cursor_changed;
34926 ulong signal_connect(string name:"cursor-changed", CB:signal_cursor_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34927 return signal_connect_data!()(&this, cast(char*)"cursor-changed",
34928 cast(GObject2.Callback)cb, data, null, cf);
34930 extern (C) alias static c_int function (TreeView* this_, c_int object, c_int p0, c_int p1, void* user_data=null) signal_expand_collapse_cursor_row;
34931 ulong signal_connect(string name:"expand-collapse-cursor-row", CB:signal_expand_collapse_cursor_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34932 return signal_connect_data!()(&this, cast(char*)"expand-collapse-cursor-row",
34933 cast(GObject2.Callback)cb, data, null, cf);
34935 extern (C) alias static c_int function (TreeView* this_, MovementStep* object, int p0, void* user_data=null) signal_move_cursor;
34936 ulong signal_connect(string name:"move-cursor", CB:signal_move_cursor)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34937 return signal_connect_data!()(&this, cast(char*)"move-cursor",
34938 cast(GObject2.Callback)cb, data, null, cf);
34941 // The "row-activated" signal is emitted when the method
34942 // gtk_tree_view_row_activated() is called or the user double clicks
34943 // a treeview row. It is also emitted when a non-editable row is
34944 // Enter is pressed.
34945 // For selection handling refer to the <link linkend="TreeWidget">tree
34946 // widget conceptual overview</link> as well as #GtkTreeSelection.
34947 // <path>: the #GtkTreePath for the activated row
34948 // <column>: the #GtkTreeViewColumn in which the activation occurred
34949 extern (C) alias static void function (TreeView* this_, TreePath* path, TreeViewColumn* column, void* user_data=null) signal_row_activated;
34950 ulong signal_connect(string name:"row-activated", CB:signal_row_activated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34951 return signal_connect_data!()(&this, cast(char*)"row-activated",
34952 cast(GObject2.Callback)cb, data, null, cf);
34955 // The given row has been collapsed (child nodes are hidden).
34956 // <iter>: the tree iter of the collapsed row
34957 // <path>: a tree path that points to the row
34958 extern (C) alias static void function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_row_collapsed;
34959 ulong signal_connect(string name:"row-collapsed", CB:signal_row_collapsed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34960 return signal_connect_data!()(&this, cast(char*)"row-collapsed",
34961 cast(GObject2.Callback)cb, data, null, cf);
34964 // The given row has been expanded (child nodes are shown).
34965 // <iter>: the tree iter of the expanded row
34966 // <path>: a tree path that points to the row
34967 extern (C) alias static void function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_row_expanded;
34968 ulong signal_connect(string name:"row-expanded", CB:signal_row_expanded)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34969 return signal_connect_data!()(&this, cast(char*)"row-expanded",
34970 cast(GObject2.Callback)cb, data, null, cf);
34972 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_select_all;
34973 ulong signal_connect(string name:"select-all", CB:signal_select_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34974 return signal_connect_data!()(&this, cast(char*)"select-all",
34975 cast(GObject2.Callback)cb, data, null, cf);
34977 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_select_cursor_parent;
34978 ulong signal_connect(string name:"select-cursor-parent", CB:signal_select_cursor_parent)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34979 return signal_connect_data!()(&this, cast(char*)"select-cursor-parent",
34980 cast(GObject2.Callback)cb, data, null, cf);
34982 extern (C) alias static c_int function (TreeView* this_, c_int object, void* user_data=null) signal_select_cursor_row;
34983 ulong signal_connect(string name:"select-cursor-row", CB:signal_select_cursor_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34984 return signal_connect_data!()(&this, cast(char*)"select-cursor-row",
34985 cast(GObject2.Callback)cb, data, null, cf);
34988 // Set the scroll adjustments for the tree view. Usually scrolled containers
34989 // like #GtkScrolledWindow will emit this signal to connect two instances
34990 // of #GtkScrollbar to the scroll directions of the #GtkTreeView.
34991 extern (C) alias static void function (TreeView* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
34992 ulong signal_connect(string name:"set-scroll-adjustments", CB:signal_set_scroll_adjustments)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34993 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
34994 cast(GObject2.Callback)cb, data, null, cf);
34996 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_start_interactive_search;
34997 ulong signal_connect(string name:"start-interactive-search", CB:signal_start_interactive_search)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
34998 return signal_connect_data!()(&this, cast(char*)"start-interactive-search",
34999 cast(GObject2.Callback)cb, data, null, cf);
35002 // The given row is about to be collapsed (hide its children nodes). Use this
35003 // signal if you need to control the collapsibility of individual rows.
35004 // RETURNS: %FALSE to allow collapsing, %TRUE to reject
35005 // <iter>: the tree iter of the row to collapse
35006 // <path>: a tree path that points to the row
35007 extern (C) alias static c_int function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_test_collapse_row;
35008 ulong signal_connect(string name:"test-collapse-row", CB:signal_test_collapse_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35009 return signal_connect_data!()(&this, cast(char*)"test-collapse-row",
35010 cast(GObject2.Callback)cb, data, null, cf);
35013 // The given row is about to be expanded (show its children nodes). Use this
35014 // signal if you need to control the expandability of individual rows.
35015 // RETURNS: %FALSE to allow expansion, %TRUE to reject
35016 // <iter>: the tree iter of the row to expand
35017 // <path>: a tree path that points to the row
35018 extern (C) alias static c_int function (TreeView* this_, TreeIter* iter, TreePath* path, void* user_data=null) signal_test_expand_row;
35019 ulong signal_connect(string name:"test-expand-row", CB:signal_test_expand_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35020 return signal_connect_data!()(&this, cast(char*)"test-expand-row",
35021 cast(GObject2.Callback)cb, data, null, cf);
35023 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_toggle_cursor_row;
35024 ulong signal_connect(string name:"toggle-cursor-row", CB:signal_toggle_cursor_row)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35025 return signal_connect_data!()(&this, cast(char*)"toggle-cursor-row",
35026 cast(GObject2.Callback)cb, data, null, cf);
35028 extern (C) alias static c_int function (TreeView* this_, void* user_data=null) signal_unselect_all;
35029 ulong signal_connect(string name:"unselect-all", CB:signal_unselect_all)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35030 return signal_connect_data!()(&this, cast(char*)"unselect-all",
35031 cast(GObject2.Callback)cb, data, null, cf);
35035 struct TreeViewClass {
35036 ContainerClass parent_class;
35037 extern (C) void function (TreeView* tree_view, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
35039 // <path>: The #GtkTreePath to be activated.
35040 // <column>: The #GtkTreeViewColumn to be activated.
35041 extern (C) void function (TreeView* tree_view, TreePath* path, TreeViewColumn* column) row_activated;
35042 extern (C) int function (TreeView* tree_view, TreeIter* iter, TreePath* path) test_expand_row;
35043 extern (C) int function (TreeView* tree_view, TreeIter* iter, TreePath* path) test_collapse_row;
35044 extern (C) void function (TreeView* tree_view, TreeIter* iter, TreePath* path) row_expanded;
35045 extern (C) void function (TreeView* tree_view, TreeIter* iter, TreePath* path) row_collapsed;
35046 extern (C) void function (TreeView* tree_view) columns_changed;
35047 extern (C) void function (TreeView* tree_view) cursor_changed;
35048 extern (C) int function (TreeView* tree_view, MovementStep step, int count) move_cursor;
35049 extern (C) int function (TreeView* tree_view) select_all;
35050 extern (C) int function (TreeView* tree_view) unselect_all;
35051 extern (C) int function (TreeView* tree_view, int start_editing) select_cursor_row;
35052 extern (C) int function (TreeView* tree_view) toggle_cursor_row;
35053 extern (C) int function (TreeView* tree_view, int logical, int expand, int open_all) expand_collapse_cursor_row;
35054 extern (C) int function (TreeView* tree_view) select_cursor_parent;
35055 extern (C) int function (TreeView* tree_view) start_interactive_search;
35056 extern (C) void function () _gtk_reserved0;
35057 extern (C) void function () _gtk_reserved1;
35058 extern (C) void function () _gtk_reserved2;
35059 extern (C) void function () _gtk_reserved3;
35060 extern (C) void function () _gtk_reserved4;
35063 struct TreeViewColumn /* : Object */ {
35064 mixin Buildable.__interface__;
35065 mixin CellLayout.__interface__;
35066 alias parent this;
35067 alias parent super_;
35068 alias parent object;
35069 Object parent;
35070 Widget* tree_view, button, child, arrow, alignment;
35071 Gdk2.Window* window;
35072 CellEditable* editable_widget;
35073 float xalign;
35074 uint property_changed_signal;
35075 int spacing;
35076 TreeViewColumnSizing column_type;
35077 int requested_width, button_request, resized_width, width, fixed_width, min_width, max_width, drag_x, drag_y;
35078 char* title;
35079 GLib2.List* cell_list;
35080 uint sort_clicked_signal, sort_column_changed_signal;
35081 int sort_column_id;
35082 SortType sort_order;
35083 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
35084 uint, "visible", 1,
35085 uint, "resizable", 1,
35086 uint, "clickable", 1,
35087 uint, "dirty", 1,
35088 uint, "show_sort_indicator", 1,
35089 uint, "maybe_reordered", 1,
35090 uint, "reorderable", 1,
35091 uint, "use_resized_width", 1,
35092 uint, "expand", 1,
35093 uint, "__dummy32A", 23));
35096 // Creates a new #GtkTreeViewColumn.
35097 // RETURNS: A newly created #GtkTreeViewColumn.
35098 static TreeViewColumn* new_()() {
35099 return gtk_tree_view_column_new();
35102 // Unintrospectable constructor: new_with_attributes() / gtk_tree_view_column_new_with_attributes()
35103 // Creates a new #GtkTreeViewColumn with a number of default values. This is
35104 // equivalent to calling gtk_tree_view_column_set_title(),
35105 // gtk_tree_view_column_pack_start(), and
35106 // gtk_tree_view_column_set_attributes() on the newly created #GtkTreeViewColumn.
35107 // Here's a simple example:
35108 // |[
35109 // enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS };
35110 // ...
35111 // {
35112 // GtkTreeViewColumn *column;
35113 // GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
35114 // column = gtk_tree_view_column_new_with_attributes ("Title",
35115 // renderer,
35116 // "text", TEXT_COLUMN,
35117 // "foreground", COLOR_COLUMN,
35118 // NULL);
35119 // }
35120 // ]|
35121 // RETURNS: A newly created #GtkTreeViewColumn.
35122 // <title>: The title to set the header to.
35123 // <cell>: The #GtkCellRenderer.
35124 alias gtk_tree_view_column_new_with_attributes new_with_attributes; // Variadic
35126 // Adds an attribute mapping to the list in @tree_column. The @column is the
35127 // column of the model to get a value from, and the @attribute is the
35128 // parameter on @cell_renderer to be set from the value. So for example
35129 // if column 2 of the model contains strings, you could have the
35130 // "text" attribute of a #GtkCellRendererText get its values from
35131 // column 2.
35132 // <cell_renderer>: the #GtkCellRenderer to set attributes on
35133 // <attribute>: An attribute on the renderer
35134 // <column>: The column position on the model to get the attribute from.
35135 void add_attribute()(CellRenderer* cell_renderer, char* attribute, int column) {
35136 gtk_tree_view_column_add_attribute(&this, cell_renderer, attribute, column);
35139 // Obtains the horizontal position and size of a cell in a column. If the
35140 // cell is not found in the column, @start_pos and @width are not changed and
35141 // %FALSE is returned.
35142 // RETURNS: %TRUE if @cell belongs to @tree_column.
35143 // <cell_renderer>: a #GtkCellRenderer
35144 // <start_pos>: return location for the horizontal position of @cell within
35145 // <width>: return location for the width of @cell, may be %NULL
35146 int cell_get_position()(CellRenderer* cell_renderer, int* start_pos, int* width) {
35147 return gtk_tree_view_column_cell_get_position(&this, cell_renderer, start_pos, width);
35150 // Obtains the width and height needed to render the column. This is used
35151 // primarily by the #GtkTreeView.
35152 // <cell_area>: The area a cell in the column will be allocated, or %NULL
35153 // <x_offset>: location to return x offset of a cell relative to @cell_area, or %NULL
35154 // <y_offset>: location to return y offset of a cell relative to @cell_area, or %NULL
35155 // <width>: location to return width needed to render a cell, or %NULL
35156 // <height>: location to return height needed to render a cell, or %NULL
35157 void cell_get_size()(Gdk2.Rectangle* cell_area=null, /*out*/ int* x_offset=null, /*out*/ int* y_offset=null, /*out*/ int* width=null, /*out*/ int* height=null) {
35158 gtk_tree_view_column_cell_get_size(&this, cell_area, x_offset, y_offset, width, height);
35161 // Returns %TRUE if any of the cells packed into the @tree_column are visible.
35162 // For this to be meaningful, you must first initialize the cells with
35163 // gtk_tree_view_column_cell_set_cell_data()
35164 // RETURNS: %TRUE, if any of the cells packed into the @tree_column are currently visible
35165 int cell_is_visible()() {
35166 return gtk_tree_view_column_cell_is_visible(&this);
35169 // Sets the cell renderer based on the @tree_model and @iter. That is, for
35170 // every attribute mapping in @tree_column, it will get a value from the set
35171 // column on the @iter, and use that value to set the attribute on the cell
35172 // renderer. This is used primarily by the #GtkTreeView.
35173 // <tree_model>: The #GtkTreeModel to to get the cell renderers attributes from.
35174 // <iter>: The #GtkTreeIter to to get the cell renderer's attributes from.
35175 // <is_expander>: %TRUE, if the row has children
35176 // <is_expanded>: %TRUE, if the row has visible children
35177 void cell_set_cell_data()(TreeModel* tree_model, TreeIter* iter, int is_expander, int is_expanded) {
35178 gtk_tree_view_column_cell_set_cell_data(&this, tree_model, iter, is_expander, is_expanded);
35180 // Unsets all the mappings on all renderers on the @tree_column.
35181 void clear()() {
35182 gtk_tree_view_column_clear(&this);
35185 // Clears all existing attributes previously set with
35186 // gtk_tree_view_column_set_attributes().
35187 // <cell_renderer>: a #GtkCellRenderer to clear the attribute mapping on.
35188 void clear_attributes()(CellRenderer* cell_renderer) {
35189 gtk_tree_view_column_clear_attributes(&this, cell_renderer);
35191 // Emits the "clicked" signal on the column. This function will only work if
35192 void clicked()() {
35193 gtk_tree_view_column_clicked(&this);
35196 // VERSION: 2.2
35197 // Sets the current keyboard focus to be at @cell, if the column contains
35198 // 2 or more editable and activatable cells.
35199 // <cell>: A #GtkCellRenderer
35200 void focus_cell()(CellRenderer* cell) {
35201 gtk_tree_view_column_focus_cell(&this, cell);
35204 // Returns the current x alignment of @tree_column. This value can range
35205 // between 0.0 and 1.0.
35206 // RETURNS: The current alignent of @tree_column.
35207 float get_alignment()() {
35208 return gtk_tree_view_column_get_alignment(&this);
35211 // Unintrospectable method: get_cell_renderers() / gtk_tree_view_column_get_cell_renderers()
35212 // DEPRECATED (v2.18) method: get_cell_renderers - use gtk_cell_layout_get_cells() instead.
35213 // Returns a newly-allocated #GList of all the cell renderers in the column,
35214 // in no particular order. The list must be freed with g_list_free().
35215 // RETURNS: A list of #GtkCellRenderers
35216 GLib2.List* get_cell_renderers()() {
35217 return gtk_tree_view_column_get_cell_renderers(&this);
35220 // Returns %TRUE if the user can click on the header for the column.
35221 // RETURNS: %TRUE if user can click the column header.
35222 int get_clickable()() {
35223 return gtk_tree_view_column_get_clickable(&this);
35226 // VERSION: 2.4
35227 // Return %TRUE if the column expands to take any available space.
35228 // RETURNS: %TRUE, if the column expands
35229 int get_expand()() {
35230 return gtk_tree_view_column_get_expand(&this);
35233 // Gets the fixed width of the column. This value is only meaning may not be
35234 // the actual width of the column on the screen, just what is requested.
35235 // RETURNS: the fixed width of the column
35236 int get_fixed_width()() {
35237 return gtk_tree_view_column_get_fixed_width(&this);
35240 // Returns the maximum width in pixels of the @tree_column, or -1 if no maximum
35241 // width is set.
35242 // RETURNS: The maximum width of the @tree_column.
35243 int get_max_width()() {
35244 return gtk_tree_view_column_get_max_width(&this);
35247 // Returns the minimum width in pixels of the @tree_column, or -1 if no minimum
35248 // width is set.
35249 // RETURNS: The minimum width of the @tree_column.
35250 int get_min_width()() {
35251 return gtk_tree_view_column_get_min_width(&this);
35254 // Returns %TRUE if the @tree_column can be reordered by the user.
35255 // RETURNS: %TRUE if the @tree_column can be reordered by the user.
35256 int get_reorderable()() {
35257 return gtk_tree_view_column_get_reorderable(&this);
35260 // Returns %TRUE if the @tree_column can be resized by the end user.
35261 // RETURNS: %TRUE, if the @tree_column can be resized.
35262 int get_resizable()() {
35263 return gtk_tree_view_column_get_resizable(&this);
35266 // Returns the current type of @tree_column.
35267 // RETURNS: The type of @tree_column.
35268 TreeViewColumnSizing get_sizing()() {
35269 return gtk_tree_view_column_get_sizing(&this);
35272 // Gets the logical @sort_column_id that the model sorts on when this
35273 // column is selected for sorting.
35274 // See gtk_tree_view_column_set_sort_column_id().
35275 // this column can't be used for sorting.
35276 // RETURNS: the current @sort_column_id for this column, or -1 if
35277 int get_sort_column_id()() {
35278 return gtk_tree_view_column_get_sort_column_id(&this);
35281 // Gets the value set by gtk_tree_view_column_set_sort_indicator().
35282 // RETURNS: whether the sort indicator arrow is displayed
35283 int get_sort_indicator()() {
35284 return gtk_tree_view_column_get_sort_indicator(&this);
35287 // Gets the value set by gtk_tree_view_column_set_sort_order().
35288 // RETURNS: the sort order the sort indicator is indicating
35289 SortType get_sort_order()() {
35290 return gtk_tree_view_column_get_sort_order(&this);
35293 // Returns the spacing of @tree_column.
35294 // RETURNS: the spacing of @tree_column.
35295 int get_spacing()() {
35296 return gtk_tree_view_column_get_spacing(&this);
35299 // Returns the title of the widget.
35300 // modified or freed.
35301 // RETURNS: the title of the column. This string should not be
35302 char* get_title()() {
35303 return gtk_tree_view_column_get_title(&this);
35306 // VERSION: 2.12
35307 // Returns the #GtkTreeView wherein @tree_column has been inserted.
35308 // If @column is currently not inserted in any tree view, %NULL is
35309 // returned.
35310 // been inserted if any, %NULL otherwise.
35311 // RETURNS: The tree view wherein @column has
35312 Widget* get_tree_view()() {
35313 return gtk_tree_view_column_get_tree_view(&this);
35316 // Returns %TRUE if @tree_column is visible.
35317 // the tree will show the column.
35318 // RETURNS: whether the column is visible or not. If it is visible, then
35319 int get_visible()() {
35320 return gtk_tree_view_column_get_visible(&this);
35323 // Returns the #GtkWidget in the button on the column header.
35324 // If a custom widget has not been set then %NULL is returned.
35325 // header, or %NULL
35326 // RETURNS: The #GtkWidget in the column
35327 Widget* get_widget()() {
35328 return gtk_tree_view_column_get_widget(&this);
35331 // Returns the current size of @tree_column in pixels.
35332 // RETURNS: The current width of @tree_column.
35333 int get_width()() {
35334 return gtk_tree_view_column_get_width(&this);
35337 // Adds the @cell to end of the column. If @expand is %FALSE, then the @cell
35338 // is allocated no more space than it needs. Any unused space is divided
35339 // evenly between cells for which @expand is %TRUE.
35340 // <cell>: The #GtkCellRenderer.
35341 // <expand>: %TRUE if @cell is to be given extra space allocated to @tree_column.
35342 void pack_end()(CellRenderer* cell, int expand) {
35343 gtk_tree_view_column_pack_end(&this, cell, expand);
35346 // Packs the @cell into the beginning of the column. If @expand is %FALSE, then
35347 // the @cell is allocated no more space than it needs. Any unused space is divided
35348 // evenly between cells for which @expand is %TRUE.
35349 // <cell>: The #GtkCellRenderer.
35350 // <expand>: %TRUE if @cell is to be given extra space allocated to @tree_column.
35351 void pack_start()(CellRenderer* cell, int expand) {
35352 gtk_tree_view_column_pack_start(&this, cell, expand);
35355 // VERSION: 2.8
35356 // Flags the column, and the cell renderers added to this column, to have
35357 // their sizes renegotiated.
35358 void queue_resize()() {
35359 gtk_tree_view_column_queue_resize(&this);
35362 // Sets the alignment of the title or custom widget inside the column header.
35363 // The alignment determines its location inside the button -- 0.0 for left, 0.5
35364 // for center, 1.0 for right.
35365 // <xalign>: The alignment, which is between [0.0 and 1.0] inclusive.
35366 void set_alignment()(float xalign) {
35367 gtk_tree_view_column_set_alignment(&this, xalign);
35370 // Unintrospectable method: set_attributes() / gtk_tree_view_column_set_attributes()
35371 // Sets the attributes in the list as the attributes of @tree_column.
35372 // The attributes should be in attribute/column order, as in
35373 // gtk_tree_view_column_add_attribute(). All existing attributes
35374 // are removed, and replaced with the new attributes.
35375 // <cell_renderer>: the #GtkCellRenderer we're setting the attributes of
35376 /+ Not available -- variadic methods unsupported - use the C function directly.
35377 alias gtk_tree_view_column_set_attributes set_attributes; // Variadic
35380 // Sets the #GtkTreeViewColumnFunc to use for the column. This
35381 // function is used instead of the standard attributes mapping for
35382 // setting the column value, and should set the value of @tree_column's
35383 // cell renderer as appropriate. @func may be %NULL to remove an
35384 // older one.
35385 // <cell_renderer>: A #GtkCellRenderer
35386 // <func>: The #GtkTreeViewColumnFunc to use.
35387 // <func_data>: The user data for @func.
35388 // <destroy>: The destroy notification for @func_data
35389 void set_cell_data_func()(CellRenderer* cell_renderer, TreeCellDataFunc func, void* func_data, GLib2.DestroyNotify destroy) {
35390 gtk_tree_view_column_set_cell_data_func(&this, cell_renderer, func, func_data, destroy);
35393 // Sets the header to be active if @active is %TRUE. When the header is active,
35394 // then it can take keyboard focus, and can be clicked.
35395 // <clickable>: %TRUE if the header is active.
35396 void set_clickable()(int clickable) {
35397 gtk_tree_view_column_set_clickable(&this, clickable);
35400 // VERSION: 2.4
35401 // Sets the column to take available extra space. This space is shared equally
35402 // amongst all columns that have the expand set to %TRUE. If no column has this
35403 // option set, then the last column gets all extra space. By default, every
35404 // column is created with this %FALSE.
35405 // <expand>: %TRUE if the column should take available extra space, %FALSE if not
35406 void set_expand()(int expand) {
35407 gtk_tree_view_column_set_expand(&this, expand);
35410 // Sets the size of the column in pixels. This is meaningful only if the sizing
35411 // type is #GTK_TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
35412 // the min/max width for the column. Please note that the min/max width of the
35413 // column doesn't actually affect the "fixed_width" property of the widget, just
35414 // the actual size when displayed.
35415 // <fixed_width>: The size to set @tree_column to. Must be greater than 0.
35416 void set_fixed_width()(int fixed_width) {
35417 gtk_tree_view_column_set_fixed_width(&this, fixed_width);
35420 // Sets the maximum width of the @tree_column. If @max_width is -1, then the
35421 // maximum width is unset. Note, the column can actually be wider than max
35422 // width if it's the last column in a view. In this case, the column expands to
35423 // fill any extra space.
35424 // <max_width>: The maximum width of the column in pixels, or -1.
35425 void set_max_width()(int max_width) {
35426 gtk_tree_view_column_set_max_width(&this, max_width);
35429 // Sets the minimum width of the @tree_column. If @min_width is -1, then the
35430 // minimum width is unset.
35431 // <min_width>: The minimum width of the column in pixels, or -1.
35432 void set_min_width()(int min_width) {
35433 gtk_tree_view_column_set_min_width(&this, min_width);
35436 // If @reorderable is %TRUE, then the column can be reordered by the end user
35437 // dragging the header.
35438 // <reorderable>: %TRUE, if the column can be reordered.
35439 void set_reorderable()(int reorderable) {
35440 gtk_tree_view_column_set_reorderable(&this, reorderable);
35443 // If @resizable is %TRUE, then the user can explicitly resize the column by
35444 // grabbing the outer edge of the column button. If resizable is %TRUE and
35445 // sizing mode of the column is #GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
35446 // mode is changed to #GTK_TREE_VIEW_COLUMN_GROW_ONLY.
35447 // <resizable>: %TRUE, if the column can be resized
35448 void set_resizable()(int resizable) {
35449 gtk_tree_view_column_set_resizable(&this, resizable);
35452 // Sets the growth behavior of @tree_column to @type.
35453 // <type>: The #GtkTreeViewColumnSizing.
35454 void set_sizing()(TreeViewColumnSizing type) {
35455 gtk_tree_view_column_set_sizing(&this, type);
35458 // Sets the logical @sort_column_id that this column sorts on when this column
35459 // is selected for sorting. Doing so makes the column header clickable.
35460 // <sort_column_id>: The @sort_column_id of the model to sort on.
35461 void set_sort_column_id()(int sort_column_id) {
35462 gtk_tree_view_column_set_sort_column_id(&this, sort_column_id);
35465 // Call this function with a @setting of %TRUE to display an arrow in
35466 // the header button indicating the column is sorted. Call
35467 // gtk_tree_view_column_set_sort_order() to change the direction of
35468 // the arrow.
35469 // <setting>: %TRUE to display an indicator that the column is sorted
35470 void set_sort_indicator()(int setting) {
35471 gtk_tree_view_column_set_sort_indicator(&this, setting);
35474 // Changes the appearance of the sort indicator.
35475 // This <emphasis>does not</emphasis> actually sort the model. Use
35476 // gtk_tree_view_column_set_sort_column_id() if you want automatic sorting
35477 // support. This function is primarily for custom sorting behavior, and should
35478 // be used in conjunction with gtk_tree_sortable_set_sort_column() to do
35479 // that. For custom models, the mechanism will vary.
35480 // The sort indicator changes direction to indicate normal sort or reverse sort.
35481 // Note that you must have the sort indicator enabled to see anything when
35482 // calling this function; see gtk_tree_view_column_set_sort_indicator().
35483 // <order>: sort order that the sort indicator should indicate
35484 void set_sort_order()(SortType order) {
35485 gtk_tree_view_column_set_sort_order(&this, order);
35488 // Sets the spacing field of @tree_column, which is the number of pixels to
35489 // place between cell renderers packed into it.
35490 // <spacing>: distance between cell renderers in pixels.
35491 void set_spacing()(int spacing) {
35492 gtk_tree_view_column_set_spacing(&this, spacing);
35495 // Sets the title of the @tree_column. If a custom widget has been set, then
35496 // this value is ignored.
35497 // <title>: The title of the @tree_column.
35498 void set_title()(char* title) {
35499 gtk_tree_view_column_set_title(&this, title);
35502 // Sets the visibility of @tree_column.
35503 // <visible>: %TRUE if the @tree_column is visible.
35504 void set_visible()(int visible) {
35505 gtk_tree_view_column_set_visible(&this, visible);
35508 // Sets the widget in the header to be @widget. If widget is %NULL, then the
35509 // header button is set with a #GtkLabel set to the title of @tree_column.
35510 // <widget>: A child #GtkWidget, or %NULL.
35511 void set_widget()(Widget* widget=null) {
35512 gtk_tree_view_column_set_widget(&this, widget);
35514 extern (C) alias static void function (TreeViewColumn* this_, void* user_data=null) signal_clicked;
35516 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35517 return super_.signal_connect!name(cb, data, cf);
35520 ulong signal_connect(string name:"clicked", CB:signal_clicked)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35521 return signal_connect_data!()(&this, cast(char*)"clicked",
35522 cast(GObject2.Callback)cb, data, null, cf);
35526 struct TreeViewColumnClass {
35527 ObjectClass parent_class;
35528 extern (C) void function (TreeViewColumn* tree_column) clicked;
35529 extern (C) void function () _gtk_reserved1;
35530 extern (C) void function () _gtk_reserved2;
35531 extern (C) void function () _gtk_reserved3;
35532 extern (C) void function () _gtk_reserved4;
35535 extern (C) alias int function (TreeView* tree_view, TreeViewColumn* column, TreeViewColumn* prev_column, TreeViewColumn* next_column, void* data) TreeViewColumnDropFunc;
35537 enum TreeViewColumnSizing {
35538 GROW_ONLY = 0,
35539 AUTOSIZE = 1,
35540 FIXED = 2
35542 enum TreeViewDropPosition {
35543 BEFORE = 0,
35544 AFTER = 1,
35545 INTO_OR_BEFORE = 2,
35546 INTO_OR_AFTER = 3
35548 enum TreeViewGridLines {
35549 NONE = 0,
35550 HORIZONTAL = 1,
35551 VERTICAL = 2,
35552 BOTH = 3
35554 extern (C) alias void function (TreeView* tree_view, TreePath* path, void* user_data) TreeViewMappingFunc;
35556 enum TreeViewMode {
35557 LINE = 0,
35558 ITEM = 1
35560 struct TreeViewPrivate {
35563 extern (C) alias int function (TreeModel* model, TreeIter* iter, void* data) TreeViewRowSeparatorFunc;
35565 extern (C) alias int function (TreeModel* model, int column, char* key, TreeIter* iter, void* search_data) TreeViewSearchEqualFunc;
35567 extern (C) alias void function (TreeView* tree_view, Widget* search_dialog, void* user_data) TreeViewSearchPositionFunc;
35569 struct GTypeInfo {
35570 char* type_name;
35571 uint object_size, class_size;
35572 ClassInitFunc class_init_func;
35573 ObjectInitFunc object_init_func;
35574 void* reserved_1, reserved_2;
35575 ClassInitFunc base_class_init_func;
35578 struct UIManager /* : GObject.Object */ {
35579 mixin Buildable.__interface__;
35580 alias parent this;
35581 alias parent super_;
35582 alias parent object;
35583 GObject2.Object parent;
35584 private UIManagerPrivate* private_data;
35587 // VERSION: 2.4
35588 // Creates a new ui manager object.
35589 // RETURNS: a new ui manager object.
35590 static UIManager* /*new*/ new_()() {
35591 return gtk_ui_manager_new();
35594 // VERSION: 2.4
35595 // Adds a UI element to the current contents of @self.
35596 // If @type is %GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
35597 // separator if such an element can be inserted at the place determined by
35598 // the place determined by @path.
35599 // If @path points to a menuitem or toolitem, the new element will be inserted
35600 // before or after this item, depending on @top.
35601 // <merge_id>: the merge id for the merged UI, see gtk_ui_manager_new_merge_id()
35602 // <path>: a path
35603 // <name>: the name for the added UI element
35604 // <action>: the name of the action to be proxied, or %NULL to add a separator
35605 // <type>: the type of UI element to add.
35606 // <top>: if %TRUE, the UI element is added before its siblings, otherwise it is added after its siblings.
35607 void add_ui()(uint merge_id, char* path, char* name, char* action, UIManagerItemType type, int top) {
35608 gtk_ui_manager_add_ui(&this, merge_id, path, name, action, type, top);
35611 // VERSION: 2.4
35612 // Parses a file containing a <link linkend="XML-UI">UI definition</link> and
35613 // merges it with the current contents of @self.
35614 // to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
35615 // the return value is 0.
35616 // RETURNS: The merge id for the merged UI. The merge id can be used
35617 // <filename>: the name of the file to parse
35618 uint add_ui_from_file()(char* filename, GLib2.Error** error=null) {
35619 return gtk_ui_manager_add_ui_from_file(&this, filename, error);
35622 // VERSION: 2.4
35623 // Parses a string containing a <link linkend="XML-UI">UI definition</link> and
35624 // merges it with the current contents of @self. An enclosing &lt;ui&gt;
35625 // element is added if it is missing.
35626 // to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
35627 // the return value is 0.
35628 // RETURNS: The merge id for the merged UI. The merge id can be used
35629 // <buffer>: the string to parse
35630 // <length>: the length of @buffer (may be -1 if @buffer is nul-terminated)
35631 uint add_ui_from_string()(char* buffer, ssize_t length, GLib2.Error** error=null) {
35632 return gtk_ui_manager_add_ui_from_string(&this, buffer, length, error);
35635 // VERSION: 2.4
35636 // Makes sure that all pending updates to the UI have been completed.
35637 // This may occasionally be necessary, since #GtkUIManager updates the
35638 // UI in an idle function. A typical example where this function is
35639 // useful is to enforce that the menubar and toolbar have been added to
35640 // the main window before showing it:
35641 // |[
35642 // gtk_container_add (GTK_CONTAINER (window), vbox);
35643 // g_signal_connect (merge, "add-widget",
35644 // G_CALLBACK (add_widget), vbox);
35645 // gtk_ui_manager_add_ui_from_file (merge, "my-menus");
35646 // gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
35647 // gtk_ui_manager_ensure_update (merge);
35648 // gtk_widget_show (window);
35649 // ]|
35650 void ensure_update()() {
35651 gtk_ui_manager_ensure_update(&this);
35654 // VERSION: 2.4
35655 // Returns the #GtkAccelGroup associated with @self.
35656 // RETURNS: the #GtkAccelGroup.
35657 AccelGroup* get_accel_group()() {
35658 return gtk_ui_manager_get_accel_group(&this);
35661 // VERSION: 2.4
35662 // Looks up an action by following a path. See gtk_ui_manager_get_widget()
35663 // for more information about paths.
35664 // or %NULL if no widget was found.
35665 // RETURNS: the action whose proxy widget is found by following the path,
35666 // <path>: a path
35667 Action* get_action()(char* path) {
35668 return gtk_ui_manager_get_action(&this, path);
35671 // VERSION: 2.4
35672 // Returns the list of action groups associated with @self.
35673 // action groups. The list is owned by GTK+
35674 // and should not be modified.
35675 // RETURNS: a #GList of
35676 GLib2.List* get_action_groups()() {
35677 return gtk_ui_manager_get_action_groups(&this);
35680 // VERSION: 2.4
35681 // Returns whether menus generated by this #GtkUIManager
35682 // will have tearoff menu items.
35683 // RETURNS: whether tearoff menu items are added
35684 int get_add_tearoffs()() {
35685 return gtk_ui_manager_get_add_tearoffs(&this);
35688 // VERSION: 2.4
35689 // Obtains a list of all toplevel widgets of the requested types.
35690 // all toplevel widgets of the requested types. Free the returned list with g_slist_free().
35691 // RETURNS: a newly-allocated #GSList of
35692 // <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.
35693 GLib2.SList* /*new container*/ get_toplevels()(UIManagerItemType types) {
35694 return gtk_ui_manager_get_toplevels(&this, types);
35697 // VERSION: 2.4
35698 // Creates a <link linkend="XML-UI">UI definition</link> of the merged UI.
35699 // the merged UI.
35700 // RETURNS: A newly allocated string containing an XML representation of
35701 char* /*new*/ get_ui()() {
35702 return gtk_ui_manager_get_ui(&this);
35705 // VERSION: 2.4
35706 // Looks up a widget by following a path.
35707 // The path consists of the names specified in the XML description of the UI.
35708 // separated by '/'. Elements which don't have a name or action attribute in
35709 // the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name
35710 // (e.g. "popup"). The root element ("/ui") can be omitted in the path.
35711 // Note that the widget found by following a path that ends in a &lt;menu&gt;
35712 // element is the menuitem to which the menu is attached, not the menu itself.
35713 // Also note that the widgets constructed by a ui manager are not tied to
35714 // the lifecycle of the ui manager. If you add the widgets returned by this
35715 // function to some container or explicitly ref them, they will survive the
35716 // destruction of the ui manager.
35717 // was found.
35718 // RETURNS: the widget found by following the path, or %NULL if no widget
35719 // <path>: a path
35720 Widget* get_widget()(char* path) {
35721 return gtk_ui_manager_get_widget(&this, path);
35724 // VERSION: 2.4
35725 // Inserts an action group into the list of action groups associated
35726 // with @self. Actions in earlier groups hide actions with the same
35727 // name in later groups.
35728 // <action_group>: the action group to be inserted
35729 // <pos>: the position at which the group will be inserted.
35730 void insert_action_group()(ActionGroup* action_group, int pos) {
35731 gtk_ui_manager_insert_action_group(&this, action_group, pos);
35734 // VERSION: 2.4
35735 // Returns an unused merge id, suitable for use with
35736 // gtk_ui_manager_add_ui().
35737 // RETURNS: an unused merge id.
35738 uint new_merge_id()() {
35739 return gtk_ui_manager_new_merge_id(&this);
35742 // VERSION: 2.4
35743 // Removes an action group from the list of action groups associated
35744 // with @self.
35745 // <action_group>: the action group to be removed
35746 void remove_action_group()(ActionGroup* action_group) {
35747 gtk_ui_manager_remove_action_group(&this, action_group);
35750 // VERSION: 2.4
35751 // Unmerges the part of @self<!-- -->s content identified by @merge_id.
35752 // <merge_id>: a merge id as returned by gtk_ui_manager_add_ui_from_string()
35753 void remove_ui()(uint merge_id) {
35754 gtk_ui_manager_remove_ui(&this, merge_id);
35757 // VERSION: 2.4
35758 // Sets the "add_tearoffs" property, which controls whether menus
35759 // generated by this #GtkUIManager will have tearoff menu items.
35760 // Note that this only affects regular menus. Generated popup
35761 // menus never have tearoff menu items.
35762 // <add_tearoffs>: whether tearoff menu items are added
35763 void set_add_tearoffs()(int add_tearoffs) {
35764 gtk_ui_manager_set_add_tearoffs(&this, add_tearoffs);
35767 // VERSION: 2.4
35768 // The "actions-changed" signal is emitted whenever the set of actions
35769 // changes.
35770 extern (C) alias static void function (UIManager* this_, void* user_data=null) signal_actions_changed;
35772 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35773 return super_.signal_connect!name(cb, data, cf);
35776 ulong signal_connect(string name:"actions-changed", CB:signal_actions_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35777 return signal_connect_data!()(&this, cast(char*)"actions-changed",
35778 cast(GObject2.Callback)cb, data, null, cf);
35781 // VERSION: 2.4
35782 // The add_widget signal is emitted for each generated menubar and toolbar.
35783 // It is not emitted for generated popup menus, which can be obtained by
35784 // gtk_ui_manager_get_widget().
35785 // <widget>: the added widget
35786 extern (C) alias static void function (UIManager* this_, Widget* widget, void* user_data=null) signal_add_widget;
35787 ulong signal_connect(string name:"add-widget", CB:signal_add_widget)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35788 return signal_connect_data!()(&this, cast(char*)"add-widget",
35789 cast(GObject2.Callback)cb, data, null, cf);
35792 // VERSION: 2.4
35793 // The connect_proxy signal is emitted after connecting a proxy to
35794 // an action in the group.
35795 // This is intended for simple customizations for which a custom action
35796 // class would be too clumsy, e.g. showing tooltips for menuitems in the
35797 // statusbar.
35798 // <action>: the action
35799 // <proxy>: the proxy
35800 extern (C) alias static void function (UIManager* this_, Action* action, Widget* proxy, void* user_data=null) signal_connect_proxy;
35801 ulong signal_connect(string name:"connect-proxy", CB:signal_connect_proxy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35802 return signal_connect_data!()(&this, cast(char*)"connect-proxy",
35803 cast(GObject2.Callback)cb, data, null, cf);
35806 // VERSION: 2.4
35807 // The disconnect_proxy signal is emitted after disconnecting a proxy
35808 // from an action in the group.
35809 // <action>: the action
35810 // <proxy>: the proxy
35811 extern (C) alias static void function (UIManager* this_, Action* action, Widget* proxy, void* user_data=null) signal_disconnect_proxy;
35812 ulong signal_connect(string name:"disconnect-proxy", CB:signal_disconnect_proxy)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35813 return signal_connect_data!()(&this, cast(char*)"disconnect-proxy",
35814 cast(GObject2.Callback)cb, data, null, cf);
35817 // VERSION: 2.4
35818 // The post_activate signal is emitted just after the @action
35819 // is activated.
35820 // This is intended for applications to get notification
35821 // just after any action is activated.
35822 // <action>: the action
35823 extern (C) alias static void function (UIManager* this_, Action* action, void* user_data=null) signal_post_activate;
35824 ulong signal_connect(string name:"post-activate", CB:signal_post_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35825 return signal_connect_data!()(&this, cast(char*)"post-activate",
35826 cast(GObject2.Callback)cb, data, null, cf);
35829 // VERSION: 2.4
35830 // The pre_activate signal is emitted just before the @action
35831 // is activated.
35832 // This is intended for applications to get notification
35833 // just before any action is activated.
35834 // <action>: the action
35835 extern (C) alias static void function (UIManager* this_, Action* action, void* user_data=null) signal_pre_activate;
35836 ulong signal_connect(string name:"pre-activate", CB:signal_pre_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
35837 return signal_connect_data!()(&this, cast(char*)"pre-activate",
35838 cast(GObject2.Callback)cb, data, null, cf);
35842 struct UIManagerClass {
35843 GObject2.ObjectClass parent_class;
35844 extern (C) void function (UIManager* merge, Widget* widget) add_widget;
35845 extern (C) void function (UIManager* merge) actions_changed;
35846 extern (C) void function (UIManager* merge, Action* action, Widget* proxy) connect_proxy;
35847 extern (C) void function (UIManager* merge, Action* action, Widget* proxy) disconnect_proxy;
35848 extern (C) void function (UIManager* merge, Action* action) pre_activate;
35849 extern (C) void function (UIManager* merge, Action* action) post_activate;
35851 // RETURNS: the widget found by following the path, or %NULL if no widget
35852 // <path>: a path
35853 extern (C) Widget* function (UIManager* manager, char* path) get_widget;
35855 // RETURNS: the action whose proxy widget is found by following the path,
35856 // <path>: a path
35857 extern (C) Action* function (UIManager* manager, char* path) get_action;
35858 extern (C) void function () _gtk_reserved1;
35859 extern (C) void function () _gtk_reserved2;
35862 enum UIManagerItemType {
35863 AUTO = 0,
35864 MENUBAR = 1,
35865 MENU = 2,
35866 TOOLBAR = 4,
35867 PLACEHOLDER = 8,
35868 POPUP = 16,
35869 MENUITEM = 32,
35870 TOOLITEM = 64,
35871 SEPARATOR = 128,
35872 ACCELERATOR = 256,
35873 POPUP_WITH_ACCELS = 512
35875 struct UIManagerPrivate {
35878 enum Unit {
35879 PIXEL = 0,
35880 POINTS = 1,
35881 INCH = 2,
35882 MM = 3
35884 enum UpdateType {
35885 CONTINUOUS = 0,
35886 DISCONTINUOUS = 1,
35887 DELAYED = 2
35890 // A #GtkVBox is a container that organizes child widgets into a single column.
35891 // Use the #GtkBox packing interface to determine the arrangement,
35892 // spacing, height, and alignment of #GtkVBox children.
35893 // All children are allocated the same width.
35894 struct VBox /* : Box */ {
35895 mixin Atk.ImplementorIface.__interface__;
35896 mixin Buildable.__interface__;
35897 mixin Orientable.__interface__;
35898 alias box this;
35899 alias box super_;
35900 Box box;
35903 // Creates a new #GtkVBox.
35904 // RETURNS: a new #GtkVBox.
35905 // <homogeneous>: %TRUE if all children are to be given equal space allotments.
35906 // <spacing>: the number of pixels to place by default between children.
35907 static VBox* new_()(int homogeneous, int spacing) {
35908 return gtk_vbox_new(homogeneous, spacing);
35912 struct VBoxClass {
35913 BoxClass parent_class;
35916 struct VButtonBox /* : ButtonBox */ {
35917 mixin Atk.ImplementorIface.__interface__;
35918 mixin Buildable.__interface__;
35919 mixin Orientable.__interface__;
35920 alias button_box this;
35921 alias button_box super_;
35922 alias button_box buttonbox;
35923 ButtonBox button_box;
35926 // Creates a new vertical button box.
35927 // RETURNS: a new button box #GtkWidget.
35928 static VButtonBox* new_()() {
35929 return gtk_vbutton_box_new();
35932 // DEPRECATED (v2.0) function: get_layout_default - Use gtk_button_box_get_layout() instead.
35933 // Retrieves the current layout used to arrange buttons in button box widgets.
35934 // RETURNS: the current #GtkButtonBoxStyle.
35935 static ButtonBoxStyle get_layout_default()() {
35936 return gtk_vbutton_box_get_layout_default();
35939 // DEPRECATED (v2.0) function: get_spacing_default - Use gtk_box_get_spacing() instead.
35940 // Retrieves the current default spacing for vertical button boxes. This is the number of pixels
35941 // to be placed between the buttons when they are arranged.
35942 // RETURNS: the default number of pixels between buttons.
35943 static int get_spacing_default()() {
35944 return gtk_vbutton_box_get_spacing_default();
35947 // DEPRECATED (v2.0) function: set_layout_default - Use gtk_button_box_set_layout() instead.
35948 // Sets a new layout mode that will be used by all button boxes.
35949 // <layout>: a new #GtkButtonBoxStyle.
35950 static void set_layout_default()(ButtonBoxStyle layout) {
35951 gtk_vbutton_box_set_layout_default(layout);
35954 // DEPRECATED (v2.0) function: set_spacing_default - Use gtk_box_set_spacing() instead.
35955 // Changes the default spacing that is placed between widgets in an
35956 // vertical button box.
35957 // <spacing>: an integer value.
35958 static void set_spacing_default()(int spacing) {
35959 gtk_vbutton_box_set_spacing_default(spacing);
35963 struct VButtonBoxClass {
35964 ButtonBoxClass parent_class;
35968 // The VPaned widget is a container widget with two
35969 // children arranged vertically. The division between
35970 // the two panes is adjustable by the user by dragging
35971 // a handle. See #GtkPaned for details.
35972 struct VPaned /* : Paned */ {
35973 mixin Atk.ImplementorIface.__interface__;
35974 mixin Buildable.__interface__;
35975 mixin Orientable.__interface__;
35976 alias paned this;
35977 alias paned super_;
35978 Paned paned;
35981 // Create a new #GtkVPaned
35982 // RETURNS: the new #GtkVPaned
35983 static VPaned* new_()() {
35984 return gtk_vpaned_new();
35988 struct VPanedClass {
35989 PanedClass parent_class;
35993 // <note>
35994 // This widget is considered too specialized/little-used for
35995 // GTK+, and will be removed in GTK 3. If your application needs this widget,
35996 // feel free to use it, as the widget is useful in some applications; it's just
35997 // not of general interest. However, we are not accepting new features for the
35998 // widget, and it will move out of the GTK+ distribution.
35999 // </note>
36000 // The VRuler widget is a widget arranged vertically creating a ruler that is
36001 // utilized around other widgets such as a text widget. The ruler is used to show
36002 // the location of the mouse on the window and to show the size of the window in
36003 // specified units. The available units of measurement are GTK_PIXELS, GTK_INCHES
36004 // and GTK_CENTIMETERS. GTK_PIXELS is the default unit of measurement.
36005 struct VRuler /* : Ruler */ {
36006 mixin Atk.ImplementorIface.__interface__;
36007 mixin Buildable.__interface__;
36008 mixin Orientable.__interface__;
36009 alias ruler this;
36010 alias ruler super_;
36011 Ruler ruler;
36014 // Creates a new vertical ruler
36015 // unmaintained and too specialized. There is no replacement.
36016 // RETURNS: a new #GtkVRuler.
36017 static VRuler* new_()() {
36018 return gtk_vruler_new();
36022 struct VRulerClass {
36023 RulerClass parent_class;
36027 // The #GtkVScale widget is used to allow the user to select a value using
36028 // a vertical slider. To create one, use gtk_hscale_new_with_range().
36029 // The position to show the current value, and the number of decimal places
36030 // shown can be set using the parent #GtkScale class's functions.
36031 struct VScale /* : Scale */ {
36032 mixin Atk.ImplementorIface.__interface__;
36033 mixin Buildable.__interface__;
36034 mixin Orientable.__interface__;
36035 alias scale this;
36036 alias scale super_;
36037 Scale scale;
36040 // Creates a new #GtkVScale.
36041 // RETURNS: a new #GtkVScale.
36042 // <adjustment>: the #GtkAdjustment which sets the range of the scale.
36043 static VScale* new_()(Adjustment* adjustment) {
36044 return gtk_vscale_new(adjustment);
36047 // Creates a new vertical scale widget that lets the user input a
36048 // number between @min and @max (including @min and @max) with the
36049 // increment @step. @step must be nonzero; it's the distance the
36050 // slider moves when using the arrow keys to adjust the scale value.
36051 // Note that the way in which the precision is derived works best if @step
36052 // is a power of ten. If the resulting precision is not suitable for your
36053 // needs, use gtk_scale_set_digits() to correct it.
36054 // RETURNS: a new #GtkVScale
36055 // <min>: minimum value
36056 // <max>: maximum value
36057 // <step>: step increment (tick size) used with keyboard shortcuts
36058 static VScale* new_with_range()(double min, double max, double step) {
36059 return gtk_vscale_new_with_range(min, max, step);
36063 struct VScaleClass {
36064 ScaleClass parent_class;
36068 // The #GtkVScrollbar widget is a widget arranged vertically creating a
36069 // scrollbar. See #GtkScrollbar for details on
36070 // scrollbars. #GtkAdjustment pointers may be added to handle the
36071 // adjustment of the scrollbar or it may be left %NULL in which case one
36072 // will be created for you. See #GtkScrollbar for a description of what the
36073 // fields in an adjustment represent for a scrollbar.
36074 struct VScrollbar /* : Scrollbar */ {
36075 mixin Atk.ImplementorIface.__interface__;
36076 mixin Buildable.__interface__;
36077 mixin Orientable.__interface__;
36078 alias scrollbar this;
36079 alias scrollbar super_;
36080 Scrollbar scrollbar;
36083 // Creates a new vertical scrollbar.
36084 // RETURNS: the new #GtkVScrollbar
36085 // <adjustment>: the #GtkAdjustment to use, or %NULL to create a new adjustment
36086 static VScrollbar* new_()(Adjustment* adjustment=null) {
36087 return gtk_vscrollbar_new(adjustment);
36091 struct VScrollbarClass {
36092 ScrollbarClass parent_class;
36096 // The #GtkVSeparator widget is a vertical separator, used to group the
36097 // widgets within a window. It displays a vertical line with a shadow to
36098 // make it appear sunken into the interface.
36099 struct VSeparator /* : Separator */ {
36100 mixin Atk.ImplementorIface.__interface__;
36101 mixin Buildable.__interface__;
36102 mixin Orientable.__interface__;
36103 alias separator this;
36104 alias separator super_;
36105 Separator separator;
36108 // Creates a new #GtkVSeparator.
36109 // RETURNS: a new #GtkVSeparator.
36110 static VSeparator* new_()() {
36111 return gtk_vseparator_new();
36115 struct VSeparatorClass {
36116 SeparatorClass parent_class;
36120 // The #GtkViewport widget acts as an adaptor class, implementing
36121 // scrollability for child widgets that lack their own scrolling
36122 // capabilities. Use #GtkViewport to scroll child widgets such as
36123 // #GtkTable, #GtkBox, and so on.
36124 // If a widget has native scrolling abilities, such as #GtkTextView,
36125 // #GtkTreeView or #GtkIconview, it can be added to a #GtkScrolledWindow
36126 // with gtk_container_add(). If a widget does not, you must first add the
36127 // widget to a #GtkViewport, then add the viewport to the scrolled window.
36128 // The convenience function gtk_scrolled_window_add_with_viewport() does
36129 // exactly this, so you can ignore the presence of the viewport.
36130 struct Viewport /* : Bin */ {
36131 mixin Atk.ImplementorIface.__interface__;
36132 mixin Buildable.__interface__;
36133 alias bin this;
36134 alias bin super_;
36135 Bin bin;
36136 ShadowType shadow_type;
36137 Gdk2.Window* view_window, bin_window;
36138 Adjustment* hadjustment, vadjustment;
36141 // Creates a new #GtkViewport with the given adjustments.
36142 // RETURNS: a new #GtkViewport.
36143 // <hadjustment>: horizontal adjustment.
36144 // <vadjustment>: vertical adjustment.
36145 static Viewport* new_()(Adjustment* hadjustment, Adjustment* vadjustment) {
36146 return gtk_viewport_new(hadjustment, vadjustment);
36149 // VERSION: 2.20
36150 // Gets the bin window of the #GtkViewport.
36151 // RETURNS: a #GdkWindow
36152 Gdk2.Window* get_bin_window()() {
36153 return gtk_viewport_get_bin_window(&this);
36156 // Returns the horizontal adjustment of the viewport.
36157 // RETURNS: the horizontal adjustment of @viewport.
36158 Adjustment* get_hadjustment()() {
36159 return gtk_viewport_get_hadjustment(&this);
36162 // Gets the shadow type of the #GtkViewport. See
36163 // gtk_viewport_set_shadow_type().
36164 // RETURNS: the shadow type
36165 ShadowType get_shadow_type()() {
36166 return gtk_viewport_get_shadow_type(&this);
36169 // Returns the vertical adjustment of the viewport.
36170 // RETURNS: the vertical adjustment of @viewport.
36171 Adjustment* get_vadjustment()() {
36172 return gtk_viewport_get_vadjustment(&this);
36175 // VERSION: 2.22
36176 // Gets the view window of the #GtkViewport.
36177 // RETURNS: a #GdkWindow
36178 Gdk2.Window* get_view_window()() {
36179 return gtk_viewport_get_view_window(&this);
36182 // Sets the horizontal adjustment of the viewport.
36183 // <adjustment>: a #GtkAdjustment.
36184 void set_hadjustment()(Adjustment* adjustment=null) {
36185 gtk_viewport_set_hadjustment(&this, adjustment);
36188 // Sets the shadow type of the viewport.
36189 // <type>: the new shadow type.
36190 void set_shadow_type()(ShadowType type) {
36191 gtk_viewport_set_shadow_type(&this, type);
36194 // Sets the vertical adjustment of the viewport.
36195 // <adjustment>: a #GtkAdjustment.
36196 void set_vadjustment()(Adjustment* adjustment=null) {
36197 gtk_viewport_set_vadjustment(&this, adjustment);
36200 // Set the scroll adjustments for the viewport. Usually scrolled containers
36201 // like #GtkScrolledWindow will emit this signal to connect two instances
36202 // of #GtkScrollbar to the scroll directions of the #GtkViewport.
36203 extern (C) alias static void function (Viewport* this_, Adjustment* object, Adjustment* p0, void* user_data=null) signal_set_scroll_adjustments;
36205 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36206 return super_.signal_connect!name(cb, data, cf);
36209 ulong signal_connect(string name:"set-scroll-adjustments", CB:signal_set_scroll_adjustments)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
36210 return signal_connect_data!()(&this, cast(char*)"set-scroll-adjustments",
36211 cast(GObject2.Callback)cb, data, null, cf);
36215 struct ViewportClass {
36216 BinClass parent_class;
36217 extern (C) void function (Viewport* viewport, Adjustment* hadjustment, Adjustment* vadjustment) set_scroll_adjustments;
36220 enum Visibility {
36221 NONE = 0,
36222 PARTIAL = 1,
36223 FULL = 2
36226 // #GtkVolumeButton is a subclass of #GtkScaleButton that has
36227 // been tailored for use as a volume control widget with suitable
36228 // icons, tooltips and accessible labels.
36229 struct VolumeButton /* : ScaleButton */ {
36230 mixin Atk.ImplementorIface.__interface__;
36231 mixin Activatable.__interface__;
36232 mixin Buildable.__interface__;
36233 mixin Orientable.__interface__;
36234 alias parent this;
36235 alias parent super_;
36236 alias parent scalebutton;
36237 ScaleButton parent;
36240 // VERSION: 2.12
36241 // Creates a #GtkVolumeButton, with a range between 0.0 and 1.0, with
36242 // a stepping of 0.02. Volume values can be obtained and modified using
36243 // the functions from #GtkScaleButton.
36244 // RETURNS: a new #GtkVolumeButton
36245 static VolumeButton* new_()() {
36246 return gtk_volume_button_new();
36250 struct VolumeButtonClass {
36251 ScaleButtonClass parent_class;
36252 extern (C) void function () _gtk_reserved1;
36253 extern (C) void function () _gtk_reserved2;
36254 extern (C) void function () _gtk_reserved3;
36255 extern (C) void function () _gtk_reserved4;
36259 // GtkWidget is the base class all widgets in GTK+ derive from. It manages the
36260 // widget lifecycle, states and style.
36261 // <refsect2 id="style-properties">
36262 // <para>
36263 // <structname>GtkWidget</structname> introduces <firstterm>style
36264 // properties</firstterm> - these are basically object properties that are stored
36265 // not on the object, but in the style object associated to the widget. Style
36266 // properties are set in <link linkend="gtk-Resource-Files">resource files</link>.
36267 // This mechanism is used for configuring such things as the location of the
36268 // scrollbar arrows through the theme, giving theme authors more control over the
36269 // look of applications without the need to write a theme engine in C.
36270 // </para>
36271 // <para>
36272 // Use gtk_widget_class_install_style_property() to install style properties for
36273 // a widget class, gtk_widget_class_find_style_property() or
36274 // gtk_widget_class_list_style_properties() to get information about existing
36275 // style properties and gtk_widget_style_get_property(), gtk_widget_style_get() or
36276 // gtk_widget_style_get_valist() to obtain the value of a style property.
36277 // </para>
36278 // </refsect2>
36279 // <refsect2 id="GtkWidget-BUILDER-UI">
36280 // <title>GtkWidget as GtkBuildable</title>
36281 // <para>
36282 // The GtkWidget implementation of the GtkBuildable interface supports a
36283 // custom &lt;accelerator&gt; element, which has attributes named key,
36284 // modifiers and signal and allows to specify accelerators.
36285 // </para>
36286 // <example>
36287 // <title>A UI definition fragment specifying an accelerator</title>
36288 // <programlisting><![CDATA[
36289 // <object class="GtkButton">
36290 // <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
36291 // </object>
36292 // ]]></programlisting>
36293 // </example>
36294 // <para>
36295 // In addition to accelerators, <structname>GtkWidget</structname> also support a
36296 // custom &lt;accessible&gt; element, which supports actions and relations.
36297 // Properties on the accessible implementation of an object can be set by accessing the
36298 // internal child "accessible" of a <structname>GtkWidget</structname>.
36299 // </para>
36300 // <example>
36301 // <title>A UI definition fragment specifying an accessible</title>
36302 // <programlisting><![CDATA[
36303 // <object class="GtkButton" id="label1"/>
36304 // <property name="label">I am a Label for a Button</property>
36305 // </object>
36306 // <object class="GtkButton" id="button1">
36307 // <accessibility>
36308 // <action action_name="click" translatable="yes">Click the button.</action>
36309 // <relation target="label1" type="labelled-by"/>
36310 // </accessibility>
36311 // <child internal-child="accessible">
36312 // <object class="AtkObject" id="a11y-button1">
36313 // <property name="AtkObject::name">Clickable Button</property>
36314 // </object>
36315 // </child>
36316 // </object>
36317 // ]]></programlisting>
36318 // </example>
36319 // </refsect2>
36320 struct Widget /* : Object */ {
36321 mixin Atk.ImplementorIface.__interface__;
36322 mixin Buildable.__interface__;
36323 alias object this;
36324 alias object super_;
36325 Object object;
36326 ushort private_flags;
36327 ubyte state, saved_state;
36328 char* name;
36329 Style* style;
36330 Requisition requisition;
36331 Allocation allocation;
36332 Gdk2.Window* window;
36333 Widget* parent;
36336 // Unintrospectable constructor: new() / gtk_widget_new()
36337 // This is a convenience function for creating a widget and setting
36338 // its properties in one go. For example you might write:
36339 // <literal>gtk_widget_new (GTK_TYPE_LABEL, "label", "Hello World", "xalign",
36340 // 0.0, NULL)</literal> to create a left-aligned label. Equivalent to
36341 // g_object_new(), but returns a widget so you don't have to
36342 // cast the object yourself.
36343 // RETURNS: a new #GtkWidget of type @widget_type
36344 // <type>: type ID of the widget to create
36345 // <first_property_name>: name of first property to set
36346 alias gtk_widget_new new_; // Variadic
36348 // Obtains the default colormap used to create widgets.
36349 // RETURNS: default widget colormap
36350 static Gdk2.Colormap* get_default_colormap()() {
36351 return gtk_widget_get_default_colormap();
36354 // Obtains the current default reading direction. See
36355 // gtk_widget_set_default_direction().
36356 // RETURNS: the current default direction.
36357 static TextDirection get_default_direction()() {
36358 return gtk_widget_get_default_direction();
36361 // Returns the default style used by all widgets initially.
36362 // by GTK+ and should not be modified or freed.
36363 // RETURNS: the default style. This #GtkStyle object is owned
36364 static Style* get_default_style()() {
36365 return gtk_widget_get_default_style();
36368 // Obtains the visual of the default colormap. Not really useful;
36369 // used to be useful before gdk_colormap_get_visual() existed.
36370 // RETURNS: visual of the default colormap
36371 static Gdk2.Visual* get_default_visual()() {
36372 return gtk_widget_get_default_visual();
36374 // Removes a colormap pushed with gtk_widget_push_colormap().
36375 static void pop_colormap()() {
36376 gtk_widget_pop_colormap();
36378 // Cancels the effect of a previous call to gtk_widget_push_composite_child().
36379 static void pop_composite_child()() {
36380 gtk_widget_pop_composite_child();
36383 // Pushes @cmap onto a global stack of colormaps; the topmost
36384 // colormap on the stack will be used to create all widgets.
36385 // Remove @cmap with gtk_widget_pop_colormap(). There's little
36386 // reason to use this function.
36387 // <cmap>: a #GdkColormap
36388 static void push_colormap()(Gdk2.Colormap* cmap) {
36389 gtk_widget_push_colormap(cmap);
36392 // Makes all newly-created widgets as composite children until
36393 // the corresponding gtk_widget_pop_composite_child() call.
36394 // A composite child is a child that's an implementation detail of the
36395 // container it's inside and should not be visible to people using the
36396 // container. Composite children aren't treated differently by GTK (but
36397 // see gtk_container_foreach() vs. gtk_container_forall()), but e.g. GUI
36398 // builders might want to treat them in a different way.
36399 // Here is a simple example:
36400 // |[
36401 // gtk_widget_push_composite_child ();
36402 // scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
36403 // gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
36404 // gtk_widget_pop_composite_child ();
36405 // gtk_widget_set_parent (scrolled_window->hscrollbar,
36406 // GTK_WIDGET (scrolled_window));
36407 // g_object_ref (scrolled_window->hscrollbar);
36408 // ]|
36409 static void push_composite_child()() {
36410 gtk_widget_push_composite_child();
36413 // Sets the default colormap to use when creating widgets.
36414 // gtk_widget_push_colormap() is a better function to use if
36415 // you only want to affect a few widgets, rather than all widgets.
36416 // <colormap>: a #GdkColormap
36417 static void set_default_colormap()(Gdk2.Colormap* colormap) {
36418 gtk_widget_set_default_colormap(colormap);
36421 // Sets the default reading direction for widgets where the
36422 // direction has not been explicitly set by gtk_widget_set_direction().
36423 // <dir>: the new default direction. This cannot be %GTK_TEXT_DIR_NONE.
36424 static void set_default_direction()(TextDirection dir) {
36425 gtk_widget_set_default_direction(dir);
36428 // For widgets that can be "activated" (buttons, menu items, etc.)
36429 // this function activates them. Activation is what happens when you
36430 // press Enter on a widget during key navigation. If @widget isn't
36431 // activatable, the function returns %FALSE.
36432 // RETURNS: %TRUE if the widget was activatable
36433 int activate()() {
36434 return gtk_widget_activate(&this);
36437 // Installs an accelerator for this @widget in @accel_group that causes
36438 // The @accel_group needs to be added to the widget's toplevel via
36439 // gtk_window_add_accel_group(), and the signal must be of type %G_RUN_ACTION.
36440 // Accelerators added through this function are not user changeable during
36441 // runtime. If you want to support accelerators that can be changed by the
36442 // user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or
36443 // gtk_menu_item_set_accel_path() instead.
36444 // <accel_signal>: widget signal to emit on accelerator activation
36445 // <accel_group>: accel group for this widget, added to its toplevel
36446 // <accel_key>: GDK keyval of the accelerator
36447 // <accel_mods>: modifier key combination of the accelerator
36448 // <accel_flags>: flag accelerators, e.g. %GTK_ACCEL_VISIBLE
36449 void add_accelerator()(char* accel_signal, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags) {
36450 gtk_widget_add_accelerator(&this, accel_signal, accel_group, accel_key, accel_mods, accel_flags);
36453 // Adds the events in the bitfield @events to the event mask for
36454 // <events>: an event mask, see #GdkEventMask
36455 void add_events()(int events) {
36456 gtk_widget_add_events(&this, events);
36459 // VERSION: 2.4
36460 // Adds a widget to the list of mnemonic labels for
36461 // this widget. (See gtk_widget_list_mnemonic_labels()). Note the
36462 // list of mnemonic labels for the widget is cleared when the
36463 // widget is destroyed, so the caller must make sure to update
36464 // its internal state at this point as well, by using a connection
36465 // to the #GtkWidget::destroy signal or a weak notifier.
36466 // <label>: a #GtkWidget that acts as a mnemonic label for @widget
36467 void add_mnemonic_label()(Widget* label) {
36468 gtk_widget_add_mnemonic_label(&this, label);
36471 // VERSION: 2.4
36472 // Determines whether an accelerator that activates the signal
36473 // identified by @signal_id can currently be activated.
36474 // This is done by emitting the #GtkWidget::can-activate-accel
36475 // signal on @widget; if the signal isn't overridden by a
36476 // handler or in a derived widget, then the default check is
36477 // that the widget must be sensitive, and the widget and all
36478 // its ancestors mapped.
36479 // RETURNS: %TRUE if the accelerator can be activated.
36480 // <signal_id>: the ID of a signal installed on @widget
36481 int can_activate_accel()(uint signal_id) {
36482 return gtk_widget_can_activate_accel(&this, signal_id);
36485 // This function is used by custom widget implementations; if you're
36486 // writing an app, you'd use gtk_widget_grab_focus() to move the focus
36487 // to a particular widget, and gtk_container_set_focus_chain() to
36488 // change the focus tab order. So you may want to investigate those
36489 // functions instead.
36490 // gtk_widget_child_focus() is called by containers as the user moves
36491 // around the window using keyboard shortcuts. @direction indicates
36492 // what kind of motion is taking place (up, down, left, right, tab
36493 // forward, tab backward). gtk_widget_child_focus() emits the
36494 // #GtkWidget::focus signal; widgets override the default handler
36495 // for this signal in order to implement appropriate focus behavior.
36496 // The default ::focus handler for a widget should return %TRUE if
36497 // moving in @direction left the focus on a focusable location inside
36498 // that widget, and %FALSE if moving in @direction moved the focus
36499 // outside the widget. If returning %TRUE, widgets normally
36500 // call gtk_widget_grab_focus() to place the focus accordingly;
36501 // if returning %FALSE, they don't modify the current focus location.
36502 // This function replaces gtk_container_focus() from GTK+ 1.2.
36503 // It was necessary to check that the child was visible, sensitive,
36504 // and focusable before calling gtk_container_focus().
36505 // gtk_widget_child_focus() returns %FALSE if the widget is not
36506 // currently in a focusable state, so there's no need for those checks.
36507 // RETURNS: %TRUE if focus ended up inside @widget
36508 // <direction>: direction of focus movement
36509 int child_focus()(DirectionType direction) {
36510 return gtk_widget_child_focus(&this, direction);
36513 // Emits a #GtkWidget::child-notify signal for the
36514 // <link linkend="child-properties">child property</link> @child_property
36515 // on @widget.
36516 // This is the analogue of g_object_notify() for child properties.
36517 // <child_property>: the name of a child property installed on the class of @widget<!-- -->'s parent
36518 void child_notify()(char* child_property) {
36519 gtk_widget_child_notify(&this, child_property);
36522 // Same as gtk_widget_path(), but always uses the name of a widget's type,
36523 // never uses a custom name set with gtk_widget_set_name().
36524 // <path_length>: location to store the length of the class path, or %NULL
36525 // <path>: location to store the class path as an allocated string, or %NULL
36526 // <path_reversed>: location to store the reverse class path as an allocated string, or %NULL
36527 void class_path()(/*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null) {
36528 gtk_widget_class_path(&this, path_length, path, path_reversed);
36531 // Creates a new #PangoContext with the appropriate font map,
36532 // font description, and base direction for drawing text for
36533 // this widget. See also gtk_widget_get_pango_context().
36534 // RETURNS: the new #PangoContext
36535 Pango.Context* /*new*/ create_pango_context()() {
36536 return gtk_widget_create_pango_context(&this);
36539 // Creates a new #PangoLayout with the appropriate font map,
36540 // font description, and base direction for drawing text for
36541 // this widget.
36542 // If you keep a #PangoLayout created in this way around, in order to
36543 // notify the layout of changes to the base direction or font of this
36544 // widget, you must call pango_layout_context_changed() in response to
36545 // the #GtkWidget::style-set and #GtkWidget::direction-changed signals
36546 // for the widget.
36547 // RETURNS: the new #PangoLayout
36548 // <text>: text to set on the layout (can be %NULL)
36549 Pango.Layout* /*new*/ create_pango_layout()(char* text) {
36550 return gtk_widget_create_pango_layout(&this, text);
36553 // Destroys a widget. Equivalent to gtk_object_destroy(), except that
36554 // you don't have to cast the widget to #GtkObject. When a widget is
36555 // destroyed, it will break any references it holds to other objects.
36556 // If the widget is inside a container, the widget will be removed
36557 // from the container. If the widget is a toplevel (derived from
36558 // #GtkWindow), it will be removed from the list of toplevels, and the
36559 // reference GTK+ holds to it will be removed. Removing a
36560 // widget from its container or the list of toplevels results in the
36561 // widget being finalized, unless you've added additional references
36562 // to the widget with g_object_ref().
36563 // In most cases, only toplevel widgets (windows) require explicit
36564 // destruction, because when you destroy a toplevel its children will
36565 // be destroyed as well.
36566 void destroy()() {
36567 gtk_widget_destroy(&this);
36570 // This function sets *@widget_pointer to %NULL if @widget_pointer !=
36571 // %NULL. It's intended to be used as a callback connected to the
36572 // "destroy" signal of a widget. You connect gtk_widget_destroyed()
36573 // as a signal handler, and pass the address of your widget variable
36574 // as user data. Then when the widget is destroyed, the variable will
36575 // be set to %NULL. Useful for example to avoid multiple copies
36576 // of the same dialog.
36577 // <widget_pointer>: address of a variable that contains @widget
36578 void destroyed()(/*inout*/ Widget** widget_pointer) {
36579 gtk_widget_destroyed(&this, widget_pointer);
36582 // In GTK+ 1.2, this function would immediately render the
36583 // region @area of a widget, by invoking the virtual draw method of a
36584 // widget. In GTK+ 2.0, the draw method is gone, and instead
36585 // gtk_widget_draw() simply invalidates the specified region of the
36586 // widget, then updates the invalid region of the widget immediately.
36587 // Usually you don't want to update the region immediately for
36588 // performance reasons, so in general gtk_widget_queue_draw_area() is
36589 // a better choice if you want to draw a region of a widget.
36590 // <area>: area to draw
36591 void draw()(Gdk2.Rectangle* area) {
36592 gtk_widget_draw(&this, area);
36595 // Ensures that @widget has a style (@widget->style). Not a very useful
36596 // function; most of the time, if you want the style, the widget is
36597 // realized, and realized widgets are guaranteed to have a style
36598 // already.
36599 void ensure_style()() {
36600 gtk_widget_ensure_style(&this);
36603 // VERSION: 2.12
36604 // Notifies the user about an input-related error on this widget.
36605 // If the #GtkSettings:gtk-error-bell setting is %TRUE, it calls
36606 // gdk_window_beep(), otherwise it does nothing.
36607 // Note that the effect of gdk_window_beep() can be configured in many
36608 // ways, depending on the windowing backend and the desktop environment
36609 // or window manager that is used.
36610 void error_bell()() {
36611 gtk_widget_error_bell(&this);
36614 // Rarely-used function. This function is used to emit
36615 // the event signals on a widget (those signals should never
36616 // be emitted without using this function to do so).
36617 // If you want to synthesize an event though, don't use this function;
36618 // instead, use gtk_main_do_event() so the event will behave as if
36619 // it were in the event queue. Don't synthesize expose events; instead,
36620 // use gdk_window_invalidate_rect() to invalidate a region of the
36621 // window.
36622 // the event was handled)
36623 // RETURNS: return from the event signal emission (%TRUE if
36624 // <event>: a #GdkEvent
36625 int event()(Gdk2.Event* event) {
36626 return gtk_widget_event(&this, event);
36629 // Stops emission of #GtkWidget::child-notify signals on @widget. The
36630 // signals are queued until gtk_widget_thaw_child_notify() is called
36631 // on @widget.
36632 // This is the analogue of g_object_freeze_notify() for child properties.
36633 void freeze_child_notify()() {
36634 gtk_widget_freeze_child_notify(&this);
36637 // Returns the accessible object that describes the widget to an
36638 // assistive technology.
36639 // If no accessibility library is loaded (i.e. no ATK implementation library is
36640 // loaded via <envar>GTK_MODULES</envar> or via another application library,
36641 // such as libgnome), then this #AtkObject instance may be a no-op. Likewise,
36642 // if no class-specific #AtkObject implementation is available for the widget
36643 // instance in question, it will inherit an #AtkObject implementation from the
36644 // first ancestor class for which such an implementation is defined.
36645 // The documentation of the <ulink url="http://developer.gnome.org/doc/API/2.0/atk/index.html">ATK</ulink>
36646 // library contains more information about accessible objects and their uses.
36647 // RETURNS: the #AtkObject associated with @widget
36648 Atk.Object* get_accessible()() {
36649 return gtk_widget_get_accessible(&this);
36652 // Unintrospectable method: get_action() / gtk_widget_get_action()
36653 // VERSION: 2.10
36654 // DEPRECATED (v2.16) method: get_action - Use gtk_activatable_get_related_action() instead.
36655 // Returns the #GtkAction that @widget is a proxy for.
36656 // See also gtk_action_get_proxies().
36657 // %NULL, if it is not attached to an action.
36658 // RETURNS: the action that a widget is a proxy for, or
36659 Action* get_action()() {
36660 return gtk_widget_get_action(&this);
36663 // VERSION: 2.18
36664 // Retrieves the widget's allocation.
36665 // <allocation>: a pointer to a #GtkAllocation to copy to
36666 void get_allocation()(/*out*/ Allocation* allocation) {
36667 gtk_widget_get_allocation(&this, allocation);
36670 // Gets the first ancestor of @widget with type @widget_type. For example,
36671 // <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)</literal> gets
36672 // the first #GtkBox that's an ancestor of @widget. No reference will be
36673 // added to the returned widget; it should not be unreferenced. See note
36674 // about checking for a toplevel #GtkWindow in the docs for
36675 // gtk_widget_get_toplevel().
36676 // Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor()
36677 // considers @widget to be an ancestor of itself.
36678 // RETURNS: the ancestor widget, or %NULL if not found
36679 // <widget_type>: ancestor type
36680 Widget* get_ancestor()(Type widget_type) {
36681 return gtk_widget_get_ancestor(&this, widget_type);
36684 // VERSION: 2.18
36685 // Determines whether the application intends to draw on the widget in
36686 // an #GtkWidget::expose-event handler.
36687 // See gtk_widget_set_app_paintable()
36688 // RETURNS: %TRUE if the widget is app paintable
36689 int get_app_paintable()() {
36690 return gtk_widget_get_app_paintable(&this);
36693 // VERSION: 2.18
36694 // Determines whether @widget can be a default widget. See
36695 // gtk_widget_set_can_default().
36696 // RETURNS: %TRUE if @widget can be a default widget, %FALSE otherwise
36697 int get_can_default()() {
36698 return gtk_widget_get_can_default(&this);
36701 // VERSION: 2.18
36702 // Determines whether @widget can own the input focus. See
36703 // gtk_widget_set_can_focus().
36704 // RETURNS: %TRUE if @widget can own the input focus, %FALSE otherwise
36705 int get_can_focus()() {
36706 return gtk_widget_get_can_focus(&this);
36709 // This function is only for use in widget implementations. Obtains
36710 // geometry on the widget (e.g. with gtk_widget_set_size_request()),
36711 // in which case it returns that geometry instead of the widget's
36712 // requisition.
36713 // This function differs from gtk_widget_size_request() in that
36714 // it retrieves the last size request value from @widget->requisition,
36715 // while gtk_widget_size_request() actually calls the "size_request" method
36716 // on @widget to compute the size request and fill in @widget->requisition,
36717 // and only then returns @widget->requisition.
36718 // Because this function does not call the "size_request" method, it
36719 // can only be used when you know that @widget->requisition is
36720 // up-to-date, that is, gtk_widget_size_request() has been called
36721 // since the last time a resize was queued. In general, only container
36722 // implementations have this information; applications should use
36723 // gtk_widget_size_request().
36724 // <requisition>: a #GtkRequisition to be filled in
36725 void get_child_requisition()(Requisition* requisition) {
36726 gtk_widget_get_child_requisition(&this, requisition);
36729 // Gets the value set with gtk_widget_set_child_visible().
36730 // If you feel a need to use this function, your code probably
36731 // needs reorganization.
36732 // This function is only useful for container implementations and
36733 // never should be called by an application.
36734 // RETURNS: %TRUE if the widget is mapped with the parent.
36735 int get_child_visible()() {
36736 return gtk_widget_get_child_visible(&this);
36739 // VERSION: 2.2
36740 // Returns the clipboard object for the given selection to
36741 // be used with @widget. @widget must have a #GdkDisplay
36742 // associated with it, so must be attached to a toplevel
36743 // window.
36744 // clipboard already exists, a new one will
36745 // be created. Once a clipboard object has
36746 // been created, it is persistent for all time.
36747 // RETURNS: the appropriate clipboard object. If no
36748 // <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.
36749 Clipboard* get_clipboard()(Gdk2.Atom selection) {
36750 return gtk_widget_get_clipboard(&this, selection);
36753 // Gets the colormap that will be used to render @widget. No reference will
36754 // be added to the returned colormap; it should not be unreferenced.
36755 // RETURNS: the colormap used by @widget
36756 Gdk2.Colormap* get_colormap()() {
36757 return gtk_widget_get_colormap(&this);
36760 // Obtains the composite name of a widget.
36761 // a composite child. The string should be freed when it is no
36762 // longer needed.
36763 // RETURNS: the composite name of @widget, or %NULL if @widget is not
36764 char* /*new*/ get_composite_name()() {
36765 return gtk_widget_get_composite_name(&this);
36768 // Gets the reading direction for a particular widget. See
36769 // gtk_widget_set_direction().
36770 // RETURNS: the reading direction for the widget.
36771 TextDirection get_direction()() {
36772 return gtk_widget_get_direction(&this);
36775 // VERSION: 2.2
36776 // Get the #GdkDisplay for the toplevel window associated with
36777 // this widget. This function can only be called after the widget
36778 // has been added to a widget hierarchy with a #GtkWindow at the top.
36779 // In general, you should only create display specific
36780 // resources when a widget has been realized, and you should
36781 // free those resources when the widget is unrealized.
36782 // RETURNS: the #GdkDisplay for the toplevel for this widget.
36783 Gdk2.Display* get_display()() {
36784 return gtk_widget_get_display(&this);
36787 // VERSION: 2.18
36788 // Determines whether the widget is double buffered.
36789 // See gtk_widget_set_double_buffered()
36790 // RETURNS: %TRUE if the widget is double buffered
36791 int get_double_buffered()() {
36792 return gtk_widget_get_double_buffered(&this);
36795 // Returns the event mask for the widget (a bitfield containing flags
36796 // from the #GdkEventMask enumeration). These are the events that the widget
36797 // will receive.
36798 // RETURNS: event mask for @widget
36799 int get_events()() {
36800 return gtk_widget_get_events(&this);
36803 // Retrieves the extension events the widget will receive; see
36804 // gdk_input_set_extension_events().
36805 // RETURNS: extension events for @widget
36806 Gdk2.ExtensionMode get_extension_events()() {
36807 return gtk_widget_get_extension_events(&this);
36810 // VERSION: 2.12
36811 // Returns the current value of the has-tooltip property. See
36812 // GtkWidget:has-tooltip for more information.
36813 // RETURNS: current value of has-tooltip on @widget.
36814 int get_has_tooltip()() {
36815 return gtk_widget_get_has_tooltip(&this);
36818 // VERSION: 2.18
36819 // Determines whether @widget has a #GdkWindow of its own. See
36820 // gtk_widget_set_has_window().
36821 // RETURNS: %TRUE if @widget has a window, %FALSE otherwise
36822 int get_has_window()() {
36823 return gtk_widget_get_has_window(&this);
36826 // VERSION: 2.20
36827 // Whether the widget is mapped.
36828 // RETURNS: %TRUE if the widget is mapped, %FALSE otherwise.
36829 int get_mapped()() {
36830 return gtk_widget_get_mapped(&this);
36833 // Returns the current modifier style for the widget. (As set by
36834 // gtk_widget_modify_style().) If no style has previously set, a new
36835 // #GtkRcStyle will be created with all values unset, and set as the
36836 // modifier style for the widget. If you make changes to this rc
36837 // style, you must call gtk_widget_modify_style(), passing in the
36838 // returned rc style, to make sure that your changes take effect.
36839 // normally end up destroying it, because gtk_widget_modify_style() copies
36840 // the passed-in style and sets the copy as the new modifier style,
36841 // thus dropping any reference to the old modifier style. Add a reference
36842 // to the modifier style if you want to keep it alive.
36843 // owned by the widget. If you want to keep a pointer to value this
36844 // around, you must add a refcount using g_object_ref().
36845 // RETURNS: the modifier style for the widget. This rc style is
36846 RcStyle* get_modifier_style()() {
36847 return gtk_widget_get_modifier_style(&this);
36850 // Retrieves the name of a widget. See gtk_widget_set_name() for the
36851 // significance of widget names.
36852 // should not be modified or freed
36853 // RETURNS: name of the widget. This string is owned by GTK+ and
36854 char* get_name()() {
36855 return gtk_widget_get_name(&this);
36858 // VERSION: 2.4
36859 // Returns the current value of the GtkWidget:no-show-all property,
36860 // which determines whether calls to gtk_widget_show_all() and
36861 // gtk_widget_hide_all() will affect this widget.
36862 // RETURNS: the current value of the "no-show-all" property.
36863 int get_no_show_all()() {
36864 return gtk_widget_get_no_show_all(&this);
36867 // Gets a #PangoContext with the appropriate font map, font description,
36868 // and base direction for this widget. Unlike the context returned
36869 // by gtk_widget_create_pango_context(), this context is owned by
36870 // the widget (it can be used until the screen for the widget changes
36871 // or the widget is removed from its toplevel), and will be updated to
36872 // match any changes to the widget's attributes.
36873 // If you create and keep a #PangoLayout using this context, you must
36874 // deal with changes to the context by calling pango_layout_context_changed()
36875 // on the layout in response to the #GtkWidget::style-set and
36876 // #GtkWidget::direction-changed signals for the widget.
36877 // RETURNS: the #PangoContext for the widget.
36878 Pango.Context* get_pango_context()() {
36879 return gtk_widget_get_pango_context(&this);
36882 // Returns the parent container of @widget.
36883 // RETURNS: the parent container of @widget, or %NULL
36884 Widget* get_parent()() {
36885 return gtk_widget_get_parent(&this);
36888 // Gets @widget's parent window.
36889 // RETURNS: the parent window of @widget.
36890 Gdk2.Window* get_parent_window()() {
36891 return gtk_widget_get_parent_window(&this);
36894 // Obtains the location of the mouse pointer in widget coordinates.
36895 // Widget coordinates are a bit odd; for historical reasons, they are
36896 // defined as @widget->window coordinates for widgets that are not
36897 // #GTK_NO_WINDOW widgets, and are relative to @widget->allocation.x,
36898 // <x>: return location for the X coordinate, or %NULL
36899 // <y>: return location for the Y coordinate, or %NULL
36900 void get_pointer()(/*out*/ int* x=null, /*out*/ int* y=null) {
36901 gtk_widget_get_pointer(&this, x, y);
36904 // VERSION: 2.20
36905 // Determines whether @widget is realized.
36906 // RETURNS: %TRUE if @widget is realized, %FALSE otherwise
36907 int get_realized()() {
36908 return gtk_widget_get_realized(&this);
36911 // VERSION: 2.18
36912 // Determines whether @widget is alyways treated as default widget
36913 // withing its toplevel when it has the focus, even if another widget
36914 // is the default.
36915 // See gtk_widget_set_receives_default().
36916 // %FALSE otherwise
36917 // RETURNS: %TRUE if @widget acts as default widget when focussed,
36918 int get_receives_default()() {
36919 return gtk_widget_get_receives_default(&this);
36922 // VERSION: 2.20
36923 // Retrieves the widget's requisition.
36924 // This function should only be used by widget implementations in
36925 // order to figure whether the widget's requisition has actually
36926 // changed after some internal state change (so that they can call
36927 // gtk_widget_queue_resize() instead of gtk_widget_queue_draw()).
36928 // Normally, gtk_widget_size_request() should be used.
36929 // <requisition>: a pointer to a #GtkRequisition to copy to
36930 void get_requisition()(/*out*/ Requisition* requisition) {
36931 gtk_widget_get_requisition(&this, requisition);
36934 // VERSION: 2.2
36935 // Get the root window where this widget is located. This function can
36936 // only be called after the widget has been added to a widget
36937 // hierarchy with #GtkWindow at the top.
36938 // The root window is useful for such purposes as creating a popup
36939 // #GdkWindow associated with the window. In general, you should only
36940 // create display specific resources when a widget has been realized,
36941 // and you should free those resources when the widget is unrealized.
36942 // RETURNS: the #GdkWindow root window for the toplevel for this widget.
36943 Gdk2.Window* get_root_window()() {
36944 return gtk_widget_get_root_window(&this);
36947 // VERSION: 2.2
36948 // Get the #GdkScreen from the toplevel window associated with
36949 // this widget. This function can only be called after the widget
36950 // has been added to a widget hierarchy with a #GtkWindow
36951 // at the top.
36952 // In general, you should only create screen specific
36953 // resources when a widget has been realized, and you should
36954 // free those resources when the widget is unrealized.
36955 // RETURNS: the #GdkScreen for the toplevel for this widget.
36956 Gdk2.Screen* get_screen()() {
36957 return gtk_widget_get_screen(&this);
36960 // VERSION: 2.18
36961 // Returns the widget's sensitivity (in the sense of returning
36962 // the value that has been set using gtk_widget_set_sensitive()).
36963 // The effective sensitivity of a widget is however determined by both its
36964 // own and its parent widget's sensitivity. See gtk_widget_is_sensitive().
36965 // RETURNS: %TRUE if the widget is sensitive
36966 int get_sensitive()() {
36967 return gtk_widget_get_sensitive(&this);
36970 // Gets the settings object holding the settings (global property
36971 // settings, RC file information, etc) used for this widget.
36972 // Note that this function can only be called when the #GtkWidget
36973 // is attached to a toplevel, since the settings object is specific
36974 // to a particular #GdkScreen.
36975 // RETURNS: the relevant #GtkSettings object
36976 Settings* get_settings()() {
36977 return gtk_widget_get_settings(&this);
36980 // Gets the size request that was explicitly set for the widget using
36981 // gtk_widget_set_size_request(). A value of -1 stored in @width or
36982 // and the natural requisition of the widget will be used intead. See
36983 // gtk_widget_set_size_request(). To get the size a widget will
36984 // actually use, call gtk_widget_size_request() instead of
36985 // this function.
36986 // <width>: return location for width, or %NULL
36987 // <height>: return location for height, or %NULL
36988 void get_size_request()(/*out*/ int* width=null, /*out*/ int* height=null) {
36989 gtk_widget_get_size_request(&this, width, height);
36992 // Unintrospectable method: get_snapshot() / gtk_widget_get_snapshot()
36993 // VERSION: 2.14
36994 // Create a #GdkPixmap of the contents of the widget and its children.
36995 // Works even if the widget is obscured. The depth and visual of the
36996 // resulting pixmap is dependent on the widget being snapshot and likely
36997 // differs from those of a target widget displaying the pixmap.
36998 // The function gdk_pixbuf_get_from_drawable() can be used to convert
36999 // the pixmap to a visual independant representation.
37000 // The snapshot area used by this function is the @widget's allocation plus
37001 // any extra space occupied by additional windows belonging to this widget
37002 // (such as the arrows of a spin button).
37003 // Thus, the resulting snapshot pixmap is possibly larger than the allocation.
37004 // If @clip_rect is non-%NULL, the resulting pixmap is shrunken to
37005 // match the specified clip_rect. The (x,y) coordinates of @clip_rect are
37006 // interpreted widget relative. If width or height of @clip_rect are 0 or
37007 // negative, the width or height of the resulting pixmap will be shrunken
37008 // by the respective amount.
37009 // For instance a @clip_rect <literal>{ +5, +5, -10, -10 }</literal> will
37010 // chop off 5 pixels at each side of the snapshot pixmap.
37011 // If non-%NULL, @clip_rect will contain the exact widget-relative snapshot
37012 // coordinates upon return. A @clip_rect of <literal>{ -1, -1, 0, 0 }</literal>
37013 // can be used to preserve the auto-grown snapshot area and use @clip_rect
37014 // as a pure output parameter.
37015 // The returned pixmap can be %NULL, if the resulting @clip_area was empty.
37016 // RETURNS: #GdkPixmap snapshot of the widget
37017 // <clip_rect>: a #GdkRectangle or %NULL
37018 Gdk2.Pixmap* get_snapshot()(Gdk2.Rectangle* clip_rect=null) {
37019 return gtk_widget_get_snapshot(&this, clip_rect);
37022 // VERSION: 2.18
37023 // Returns the widget's state. See gtk_widget_set_state().
37024 // RETURNS: the state of @widget.
37025 StateType get_state()() {
37026 return gtk_widget_get_state(&this);
37029 // Simply an accessor function that returns @widget->style.
37030 // RETURNS: the widget's #GtkStyle
37031 Style* get_style()() {
37032 return gtk_widget_get_style(&this);
37035 // VERSION: 2.12
37036 // Gets the contents of the tooltip for @widget.
37037 // returned string with g_free() when done.
37038 // RETURNS: the tooltip text, or %NULL. You should free the
37039 char* /*new*/ get_tooltip_markup()() {
37040 return gtk_widget_get_tooltip_markup(&this);
37043 // VERSION: 2.12
37044 // Gets the contents of the tooltip for @widget.
37045 // returned string with g_free() when done.
37046 // RETURNS: the tooltip text, or %NULL. You should free the
37047 char* /*new*/ get_tooltip_text()() {
37048 return gtk_widget_get_tooltip_text(&this);
37051 // VERSION: 2.12
37052 // Returns the #GtkWindow of the current tooltip. This can be the
37053 // GtkWindow created by default, or the custom tooltip window set
37054 // using gtk_widget_set_tooltip_window().
37055 // RETURNS: The #GtkWindow of the current tooltip.
37056 Window* get_tooltip_window()() {
37057 return gtk_widget_get_tooltip_window(&this);
37060 // This function returns the topmost widget in the container hierarchy
37061 // returned as the topmost widget. No reference will be added to the
37062 // returned widget; it should not be unreferenced.
37063 // Note the difference in behavior vs. gtk_widget_get_ancestor();
37064 // <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)</literal>
37065 // would return
37066 // %NULL if @widget wasn't inside a toplevel window, and if the
37067 // window was inside a #GtkWindow-derived widget which was in turn
37068 // inside the toplevel #GtkWindow. While the second case may
37069 // seem unlikely, it actually happens when a #GtkPlug is embedded
37070 // inside a #GtkSocket within the same application.
37071 // To reliably find the toplevel #GtkWindow, use
37072 // gtk_widget_get_toplevel() and check if the %TOPLEVEL flags
37073 // is set on the result.
37074 // |[
37075 // GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
37076 // if (gtk_widget_is_toplevel (toplevel))
37077 // {
37078 // /&ast; Perform action on toplevel. &ast;/
37079 // }
37080 // ]|
37081 // if there's no ancestor.
37082 // RETURNS: the topmost ancestor of @widget, or @widget itself
37083 Widget* get_toplevel()() {
37084 return gtk_widget_get_toplevel(&this);
37087 // VERSION: 2.18
37088 // Determines whether the widget is visible. Note that this doesn't
37089 // take into account whether the widget's parent is also visible
37090 // or the widget is obscured in any way.
37091 // See gtk_widget_set_visible().
37092 // RETURNS: %TRUE if the widget is visible
37093 int get_visible()() {
37094 return gtk_widget_get_visible(&this);
37097 // Gets the visual that will be used to render @widget.
37098 // RETURNS: the visual for @widget
37099 Gdk2.Visual* get_visual()() {
37100 return gtk_widget_get_visual(&this);
37103 // VERSION: 2.14
37104 // Returns the widget's window if it is realized, %NULL otherwise
37105 // RETURNS: @widget's window.
37106 Gdk2.Window* get_window()() {
37107 return gtk_widget_get_window(&this);
37110 // Causes @widget to become the default widget. @widget must have the
37111 // %GTK_CAN_DEFAULT flag set; typically you have to set this flag
37112 // yourself by calling <literal>gtk_widget_set_can_default (@widget,
37113 // %TRUE)</literal>. The default widget is activated when
37114 // the user presses Enter in a window. Default widgets must be
37115 // activatable, that is, gtk_widget_activate() should affect them.
37116 void grab_default()() {
37117 gtk_widget_grab_default(&this);
37120 // Causes @widget to have the keyboard focus for the #GtkWindow it's
37121 // inside. @widget must be a focusable widget, such as a #GtkEntry;
37122 // something like #GtkFrame won't work.
37123 // More precisely, it must have the %GTK_CAN_FOCUS flag set. Use
37124 // gtk_widget_set_can_focus() to modify that flag.
37125 // The widget also needs to be realized and mapped. This is indicated by the
37126 // related signals. Grabbing the focus immediately after creating the widget
37127 // will likely fail and cause critical warnings.
37128 void grab_focus()() {
37129 gtk_widget_grab_focus(&this);
37132 // VERSION: 2.18
37133 // Determines whether @widget is the current default widget within its
37134 // toplevel. See gtk_widget_set_can_default().
37135 // its toplevel, %FALSE otherwise
37136 // RETURNS: %TRUE if @widget is the current default widget within
37137 int has_default()() {
37138 return gtk_widget_has_default(&this);
37141 // VERSION: 2.18
37142 // Determines if the widget has the global input focus. See
37143 // gtk_widget_is_focus() for the difference between having the global
37144 // input focus, and only having the focus within a toplevel.
37145 // RETURNS: %TRUE if the widget has the global input focus.
37146 int has_focus()() {
37147 return gtk_widget_has_focus(&this);
37150 // VERSION: 2.18
37151 // Determines whether the widget is currently grabbing events, so it
37152 // is the only widget receiving input events (keyboard and mouse).
37153 // See also gtk_grab_add().
37154 // RETURNS: %TRUE if the widget is in the grab_widgets stack
37155 int has_grab()() {
37156 return gtk_widget_has_grab(&this);
37159 // VERSION: 2.20
37160 // Determines if the widget style has been looked up through the rc mechanism.
37161 // mechanism, %FALSE otherwise.
37162 // RETURNS: %TRUE if the widget has been looked up through the rc
37163 int has_rc_style()() {
37164 return gtk_widget_has_rc_style(&this);
37167 // VERSION: 2.2
37168 // Checks whether there is a #GdkScreen is associated with
37169 // this widget. All toplevel widgets have an associated
37170 // screen, and all widgets added into a hierarchy with a toplevel
37171 // window at the top.
37172 // with the widget.
37173 // RETURNS: %TRUE if there is a #GdkScreen associcated
37174 int has_screen()() {
37175 return gtk_widget_has_screen(&this);
37178 // Reverses the effects of gtk_widget_show(), causing the widget to be
37179 // hidden (invisible to the user).
37180 void hide()() {
37181 gtk_widget_hide(&this);
37184 // DEPRECATED (v2.24) method: hide_all - Use gtk_widget_hide() instead.
37185 // Recursively hides a widget and any child widgets.
37186 void hide_all()() {
37187 gtk_widget_hide_all(&this);
37190 // Utility function; intended to be connected to the #GtkWidget::delete-event
37191 // signal on a #GtkWindow. The function calls gtk_widget_hide() on its
37192 // argument, then returns %TRUE. If connected to ::delete-event, the
37193 // result is that clicking the close button for a window (on the
37194 // window frame, top right corner usually) will hide but not destroy
37195 // the window. By default, GTK+ destroys windows when ::delete-event
37196 // is received.
37197 // RETURNS: %TRUE
37198 int hide_on_delete()() {
37199 return gtk_widget_hide_on_delete(&this);
37202 // VERSION: 2.10
37203 // Sets an input shape for this widget's GDK window. This allows for
37204 // windows which react to mouse click in a nonrectangular region, see
37205 // gdk_window_input_shape_combine_mask() for more information.
37206 // <shape_mask>: shape to be added, or %NULL to remove an existing shape
37207 // <offset_x>: X position of shape mask with respect to @window
37208 // <offset_y>: Y position of shape mask with respect to @window
37209 void input_shape_combine_mask()(Gdk2.Bitmap* shape_mask, int offset_x, int offset_y) {
37210 gtk_widget_input_shape_combine_mask(&this, shape_mask, offset_x, offset_y);
37213 // Computes the intersection of a @widget's area and @area, storing
37214 // the intersection in @intersection, and returns %TRUE if there was
37215 // an intersection. @intersection may be %NULL if you're only
37216 // interested in whether there was an intersection.
37217 // RETURNS: %TRUE if there was an intersection
37218 // <area>: a rectangle
37219 // <intersection>: rectangle to store intersection of @widget and @area
37220 int intersect()(Gdk2.Rectangle* area, Gdk2.Rectangle* intersection) {
37221 return gtk_widget_intersect(&this, area, intersection);
37224 // Determines whether @widget is somewhere inside @ancestor, possibly with
37225 // intermediate containers.
37226 // grandchild, great grandchild, etc.
37227 // RETURNS: %TRUE if @ancestor contains @widget as a child,
37228 // <ancestor>: another #GtkWidget
37229 int is_ancestor()(Widget* ancestor) {
37230 return gtk_widget_is_ancestor(&this, ancestor);
37233 // VERSION: 2.10
37234 // Whether @widget can rely on having its alpha channel
37235 // drawn correctly. On X11 this function returns whether a
37236 // compositing manager is running for @widget's screen.
37237 // Please note that the semantics of this call will change
37238 // in the future if used on a widget that has a composited
37239 // window in its hierarchy (as set by gdk_window_set_composited()).
37240 // channel being drawn correctly.
37241 // RETURNS: %TRUE if the widget can rely on its alpha
37242 int is_composited()() {
37243 return gtk_widget_is_composited(&this);
37246 // VERSION: 2.18
37247 // Determines whether @widget can be drawn to. A widget can be drawn
37248 // to if it is mapped and visible.
37249 // RETURNS: %TRUE if @widget is drawable, %FALSE otherwise
37250 int is_drawable()() {
37251 return gtk_widget_is_drawable(&this);
37254 // Determines if the widget is the focus widget within its
37255 // toplevel. (This does not mean that the %HAS_FOCUS flag is
37256 // necessarily set; %HAS_FOCUS will only be set if the
37257 // toplevel widget additionally has the global input focus.)
37258 // RETURNS: %TRUE if the widget is the focus widget.
37259 int is_focus()() {
37260 return gtk_widget_is_focus(&this);
37263 // VERSION: 2.18
37264 // Returns the widget's effective sensitivity, which means
37265 // it is sensitive itself and also its parent widget is sensntive
37266 // RETURNS: %TRUE if the widget is effectively sensitive
37267 int is_sensitive()() {
37268 return gtk_widget_is_sensitive(&this);
37271 // VERSION: 2.18
37272 // Determines whether @widget is a toplevel widget. Currently only
37273 // #GtkWindow and #GtkInvisible are toplevel widgets. Toplevel
37274 // widgets have no parent widget.
37275 // RETURNS: %TRUE if @widget is a toplevel, %FALSE otherwise
37276 int is_toplevel()() {
37277 return gtk_widget_is_toplevel(&this);
37280 // VERSION: 2.12
37281 // This function should be called whenever keyboard navigation within
37282 // a single widget hits a boundary. The function emits the
37283 // #GtkWidget::keynav-failed signal on the widget and its return
37284 // value should be interpreted in a way similar to the return value of
37285 // gtk_widget_child_focus():
37286 // When %TRUE is returned, stay in the widget, the failed keyboard
37287 // navigation is Ok and/or there is nowhere we can/should move the
37288 // focus to.
37289 // When %FALSE is returned, the caller should continue with keyboard
37290 // navigation outside the widget, e.g. by calling
37291 // gtk_widget_child_focus() on the widget's toplevel.
37292 // The default ::keynav-failed handler returns %TRUE for
37293 // %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD. For the other
37294 // values of #GtkDirectionType, it looks at the
37295 // #GtkSettings:gtk-keynav-cursor-only setting and returns %FALSE
37296 // if the setting is %TRUE. This way the entire user interface
37297 // becomes cursor-navigatable on input devices such as mobile phones
37298 // which only have cursor keys but no tab key.
37299 // Whenever the default handler returns %TRUE, it also calls
37300 // gtk_widget_error_bell() to notify the user of the failed keyboard
37301 // navigation.
37302 // A use case for providing an own implementation of ::keynav-failed
37303 // (either by connecting to it or by overriding it) would be a row of
37304 // #GtkEntry widgets where the user should be able to navigate the
37305 // entire row with the cursor keys, as e.g. known from user interfaces
37306 // that require entering license keys.
37307 // if the emitting widget should try to handle the keyboard
37308 // navigation attempt in its parent container(s).
37309 // RETURNS: %TRUE if stopping keyboard navigation is fine, %FALSE
37310 // <direction>: direction of focus movement
37311 int keynav_failed()(DirectionType direction) {
37312 return gtk_widget_keynav_failed(&this, direction);
37315 // Lists the closures used by @widget for accelerator group connections
37316 // with gtk_accel_group_connect_by_path() or gtk_accel_group_connect().
37317 // The closures can be used to monitor accelerator changes on @widget,
37318 // by connecting to the @GtkAccelGroup::accel-changed signal of the
37319 // #GtkAccelGroup of a closure which can be found out with
37320 // gtk_accel_group_from_accel_closure().
37321 // a newly allocated #GList of closures
37322 GLib2.List* /*new container*/ list_accel_closures()() {
37323 return gtk_widget_list_accel_closures(&this);
37326 // VERSION: 2.4
37327 // Returns a newly allocated list of the widgets, normally labels, for
37328 // which this widget is a the target of a mnemonic (see for example,
37329 // gtk_label_set_mnemonic_widget()).
37330 // The widgets in the list are not individually referenced. If you
37331 // want to iterate through the list and perform actions involving
37332 // callbacks that might destroy the widgets, you
37333 // <emphasis>must</emphasis> call <literal>g_list_foreach (result,
37334 // (GFunc)g_object_ref, NULL)</literal> first, and then unref all the
37335 // widgets afterwards.
37336 // mnemonic labels; free this list
37337 // with g_list_free() when you are done with it.
37338 // RETURNS: the list of
37339 GLib2.List* /*new container*/ list_mnemonic_labels()() {
37340 return gtk_widget_list_mnemonic_labels(&this);
37343 // This function is only for use in widget implementations. Causes
37344 // a widget to be mapped if it isn't already.
37345 void map()() {
37346 gtk_widget_map(&this);
37349 // Emits the #GtkWidget::mnemonic-activate signal.
37350 // The default handler for this signal activates the @widget if
37351 // is %TRUE.
37352 // RETURNS: %TRUE if the signal has been handled
37353 // <group_cycling>: %TRUE if there are other widgets with the same mnemonic
37354 int mnemonic_activate()(int group_cycling) {
37355 return gtk_widget_mnemonic_activate(&this, group_cycling);
37358 // Sets the base color for a widget in a particular state.
37359 // All other style values are left untouched. The base color
37360 // is the background color used along with the text color
37361 // (see gtk_widget_modify_text()) for widgets such as #GtkEntry
37362 // and #GtkTextView. See also gtk_widget_modify_style().
37363 // Note that "no window" widgets (which have the %GTK_NO_WINDOW flag set)
37364 // draw on their parent container's window and thus may not draw any
37365 // background themselves. This is the case for e.g. #GtkLabel. To modify
37366 // the background of such widgets, you have to set the base color on their
37367 // parent; if you want to set the background of a rectangular area around
37368 // a label, try placing the label in a #GtkEventBox widget and setting
37369 // the base color on that.
37370 // <state>: the state for which to set the base color
37371 // <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().
37372 void modify_base()(StateType state, Gdk2.Color* color=null) {
37373 gtk_widget_modify_base(&this, state, color);
37376 // Sets the background color for a widget in a particular state.
37377 // All other style values are left untouched. See also
37378 // gtk_widget_modify_style().
37379 // Note that "no window" widgets (which have the %GTK_NO_WINDOW flag set)
37380 // draw on their parent container's window and thus may not draw any
37381 // background themselves. This is the case for e.g. #GtkLabel. To modify
37382 // the background of such widgets, you have to set the background color
37383 // on their parent; if you want to set the background of a rectangular
37384 // area around a label, try placing the label in a #GtkEventBox widget
37385 // and setting the background color on that.
37386 // <state>: the state for which to set the background color
37387 // <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().
37388 void modify_bg()(StateType state, Gdk2.Color* color=null) {
37389 gtk_widget_modify_bg(&this, state, color);
37392 // VERSION: 2.12
37393 // Sets the cursor color to use in a widget, overriding the
37394 // #GtkWidget:cursor-color and #GtkWidget:secondary-cursor-color
37395 // style properties. All other style values are left untouched.
37396 // See also gtk_widget_modify_style().
37397 // <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().
37398 // <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().
37399 void modify_cursor()(Gdk2.Color* primary, Gdk2.Color* secondary) {
37400 gtk_widget_modify_cursor(&this, primary, secondary);
37403 // Sets the foreground color for a widget in a particular state.
37404 // All other style values are left untouched. See also
37405 // gtk_widget_modify_style().
37406 // <state>: the state for which to set the foreground color
37407 // <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().
37408 void modify_fg()(StateType state, Gdk2.Color* color=null) {
37409 gtk_widget_modify_fg(&this, state, color);
37412 // Sets the font to use for a widget. All other style values are left
37413 // untouched. See also gtk_widget_modify_style().
37414 // <font_desc>: the font description to use, or %NULL to undo the effect of previous calls to gtk_widget_modify_font().
37415 void modify_font()(Pango.FontDescription* font_desc=null) {
37416 gtk_widget_modify_font(&this, font_desc);
37419 // Modifies style values on the widget. Modifications made using this
37420 // technique take precedence over style values set via an RC file,
37421 // however, they will be overriden if a style is explicitely set on
37422 // the widget using gtk_widget_set_style(). The #GtkRcStyle structure
37423 // is designed so each field can either be set or unset, so it is
37424 // possible, using this function, to modify some style values and
37425 // leave the others unchanged.
37426 // Note that modifications made with this function are not cumulative
37427 // with previous calls to gtk_widget_modify_style() or with such
37428 // functions as gtk_widget_modify_fg(). If you wish to retain
37429 // previous values, you must first call gtk_widget_get_modifier_style(),
37430 // make your modifications to the returned style, then call
37431 // gtk_widget_modify_style() with that style. On the other hand,
37432 // if you first call gtk_widget_modify_style(), subsequent calls
37433 // to such functions gtk_widget_modify_fg() will have a cumulative
37434 // effect with the initial modifications.
37435 // <style>: the #GtkRcStyle holding the style modifications
37436 void modify_style()(RcStyle* style) {
37437 gtk_widget_modify_style(&this, style);
37440 // Sets the text color for a widget in a particular state. All other
37441 // style values are left untouched. The text color is the foreground
37442 // color used along with the base color (see gtk_widget_modify_base())
37443 // for widgets such as #GtkEntry and #GtkTextView. See also
37444 // gtk_widget_modify_style().
37445 // <state>: the state for which to set the text color
37446 // <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().
37447 void modify_text()(StateType state, Gdk2.Color* color=null) {
37448 gtk_widget_modify_text(&this, state, color);
37451 // Obtains the full path to @widget. The path is simply the name of a
37452 // widget and all its parents in the container hierarchy, separated by
37453 // periods. The name of a widget comes from
37454 // gtk_widget_get_name(). Paths are used to apply styles to a widget
37455 // in gtkrc configuration files. Widget names are the type of the
37456 // widget by default (e.g. "GtkButton") or can be set to an
37457 // application-specific value with gtk_widget_set_name(). By setting
37458 // the name of a widget, you allow users or theme authors to apply
37459 // styles to that specific widget in their gtkrc
37460 // file. @path_reversed_p fills in the path in reverse order,
37461 // i.e. starting with @widget's name instead of starting with the name
37462 // of @widget's outermost ancestor.
37463 // <path_length>: location to store length of the path, or %NULL
37464 // <path>: location to store allocated path string, or %NULL
37465 // <path_reversed>: location to store allocated reverse path string, or %NULL
37466 void path()(/*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null) {
37467 gtk_widget_path(&this, path_length, path, path_reversed);
37470 // DEPRECATED (v2.2) method: queue_clear - Use gtk_widget_queue_draw() instead.
37471 // This function does the same as gtk_widget_queue_draw().
37472 void queue_clear()() {
37473 gtk_widget_queue_clear(&this);
37476 // DEPRECATED (v2.2) method: queue_clear_area - Use gtk_widget_queue_draw_area() instead.
37477 // This function is no longer different from
37478 // gtk_widget_queue_draw_area(), though it once was. Now it just calls
37479 // gtk_widget_queue_draw_area(). Originally
37480 // gtk_widget_queue_clear_area() would force a redraw of the
37481 // background for %GTK_NO_WINDOW widgets, and
37482 // gtk_widget_queue_draw_area() would not. Now both functions ensure
37483 // the background will be redrawn.
37484 // <x>: x coordinate of upper-left corner of rectangle to redraw
37485 // <y>: y coordinate of upper-left corner of rectangle to redraw
37486 // <width>: width of region to draw
37487 // <height>: height of region to draw
37488 void queue_clear_area()(int x, int y, int width, int height) {
37489 gtk_widget_queue_clear_area(&this, x, y, width, height);
37492 // Equivalent to calling gtk_widget_queue_draw_area() for the
37493 // entire area of a widget.
37494 void queue_draw()() {
37495 gtk_widget_queue_draw(&this);
37498 // Invalidates the rectangular area of @widget defined by @x, @y,
37499 // widget's window and all its child windows. Once the main loop
37500 // becomes idle (after the current batch of events has been processed,
37501 // roughly), the window will receive expose events for the union of
37502 // all regions that have been invalidated.
37503 // Normally you would only use this function in widget
37504 // implementations. You might also use it, or
37505 // gdk_window_invalidate_rect() directly, to schedule a redraw of a
37506 // #GtkDrawingArea or some portion thereof.
37507 // Frequently you can just call gdk_window_invalidate_rect() or
37508 // gdk_window_invalidate_region() instead of this function. Those
37509 // functions will invalidate only a single window, instead of the
37510 // widget and all its children.
37511 // The advantage of adding to the invalidated region compared to
37512 // simply drawing immediately is efficiency; using an invalid region
37513 // ensures that you only have to redraw one time.
37514 // <x>: x coordinate of upper-left corner of rectangle to redraw
37515 // <y>: y coordinate of upper-left corner of rectangle to redraw
37516 // <width>: width of region to draw
37517 // <height>: height of region to draw
37518 void queue_draw_area()(int x, int y, int width, int height) {
37519 gtk_widget_queue_draw_area(&this, x, y, width, height);
37522 // This function is only for use in widget implementations.
37523 // Flags a widget to have its size renegotiated; should
37524 // be called when a widget for some reason has a new size request.
37525 // For example, when you change the text in a #GtkLabel, #GtkLabel
37526 // queues a resize to ensure there's enough space for the new text.
37527 void queue_resize()() {
37528 gtk_widget_queue_resize(&this);
37531 // VERSION: 2.4
37532 // This function works like gtk_widget_queue_resize(),
37533 // except that the widget is not invalidated.
37534 void queue_resize_no_redraw()() {
37535 gtk_widget_queue_resize_no_redraw(&this);
37538 // Creates the GDK (windowing system) resources associated with a
37539 // widget. For example, @widget->window will be created when a widget
37540 // is realized. Normally realization happens implicitly; if you show
37541 // a widget and all its parent containers, then the widget will be
37542 // realized and mapped automatically.
37543 // Realizing a widget requires all
37544 // the widget's parent widgets to be realized; calling
37545 // gtk_widget_realize() realizes the widget's parents in addition to
37546 // when you realize it, bad things will happen.
37547 // This function is primarily used in widget implementations, and
37548 // isn't very useful otherwise. Many times when you think you might
37549 // need it, a better approach is to connect to a signal that will be
37550 // called after the widget is realized automatically, such as
37551 // GtkWidget::expose-event. Or simply g_signal_connect () to the
37552 // GtkWidget::realize signal.
37553 void realize()() {
37554 gtk_widget_realize(&this);
37557 // Unintrospectable method: ref() / gtk_widget_ref()
37558 // DEPRECATED (v2.12) method: ref - Use g_object_ref() instead.
37559 // Adds a reference to a widget. This function is exactly the same
37560 // as calling g_object_ref(), and exists mostly for historical
37561 // reasons. It can still be convenient to avoid casting a widget
37562 // to a #GObject, it saves a small amount of typing.
37563 // RETURNS: the widget that was referenced
37564 Widget* ref_()() {
37565 return gtk_widget_ref(&this);
37568 // Unintrospectable method: region_intersect() / gtk_widget_region_intersect()
37569 // Computes the intersection of a @widget's area and @region, returning
37570 // the intersection. The result may be empty, use gdk_region_empty() to
37571 // check.
37572 // 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.
37573 // <region>: a #GdkRegion, in the same coordinate system as for %NO_WINDOW widgets; relative to the parent window of @widget->window for widgets with their own window.
37574 Gdk2.Region* region_intersect()(Gdk2.Region* region) {
37575 return gtk_widget_region_intersect(&this, region);
37578 // Removes an accelerator from @widget, previously installed with
37579 // gtk_widget_add_accelerator().
37580 // RETURNS: whether an accelerator was installed and could be removed
37581 // <accel_group>: accel group for this widget
37582 // <accel_key>: GDK keyval of the accelerator
37583 // <accel_mods>: modifier key combination of the accelerator
37584 int remove_accelerator()(AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods) {
37585 return gtk_widget_remove_accelerator(&this, accel_group, accel_key, accel_mods);
37588 // VERSION: 2.4
37589 // Removes a widget from the list of mnemonic labels for
37590 // this widget. (See gtk_widget_list_mnemonic_labels()). The widget
37591 // must have previously been added to the list with
37592 // gtk_widget_add_mnemonic_label().
37593 // <label>: a #GtkWidget that was previously set as a mnemnic label for
37594 void remove_mnemonic_label()(Widget* label) {
37595 gtk_widget_remove_mnemonic_label(&this, label);
37598 // A convenience function that uses the theme engine and RC file
37599 // settings for @widget to look up @stock_id and render it to
37600 // a pixbuf. @stock_id should be a stock icon ID such as
37601 // #GTK_STOCK_OPEN or #GTK_STOCK_OK. @size should be a size
37602 // such as #GTK_ICON_SIZE_MENU. @detail should be a string that
37603 // identifies the widget or code doing the rendering, so that
37604 // theme engines can special-case rendering for that widget or code.
37605 // The pixels in the returned #GdkPixbuf are shared with the rest of
37606 // the application and should not be modified. The pixbuf should be freed
37607 // after use with g_object_unref().
37608 // stock ID wasn't known
37609 // RETURNS: a new pixbuf, or %NULL if the
37610 // <stock_id>: a stock ID
37611 // <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).
37612 // <detail>: render detail to pass to theme engine
37613 GdkPixbuf2.Pixbuf* /*new*/ render_icon()(char* stock_id, IconSize size, char* detail=null) {
37614 return gtk_widget_render_icon(&this, stock_id, size, detail);
37617 // Moves a widget from one #GtkContainer to another, handling reference
37618 // count issues to avoid destroying the widget.
37619 // <new_parent>: a #GtkContainer to move the widget into
37620 void reparent()(Widget* new_parent) {
37621 gtk_widget_reparent(&this, new_parent);
37624 // Reset the styles of @widget and all descendents, so when
37625 // they are looked up again, they get the correct values
37626 // for the currently loaded RC file settings.
37627 // This function is not useful for applications.
37628 void reset_rc_styles()() {
37629 gtk_widget_reset_rc_styles(&this);
37632 // DEPRECATED method: reset_shapes - This function is being removed in GTK+ 3.0. Don't use it.
37633 // Recursively resets the shape on this widget and its descendants.
37634 void reset_shapes()() {
37635 gtk_widget_reset_shapes(&this);
37638 // Very rarely-used function. This function is used to emit
37639 // an expose event signals on a widget. This function is not
37640 // normally used directly. The only time it is used is when
37641 // propagating an expose event to a child %NO_WINDOW widget, and
37642 // that is normally done using gtk_container_propagate_expose().
37643 // If you want to force an area of a window to be redrawn,
37644 // use gdk_window_invalidate_rect() or gdk_window_invalidate_region().
37645 // To cause the redraw to be done immediately, follow that call
37646 // with a call to gdk_window_process_updates().
37647 // the event was handled)
37648 // RETURNS: return from the event signal emission (%TRUE if
37649 // <event>: a expose #GdkEvent
37650 int send_expose()(Gdk2.Event* event) {
37651 return gtk_widget_send_expose(&this, event);
37654 // VERSION: 2.22
37655 // Sends the focus change @event to @widget
37656 // This function is not meant to be used by applications. The only time it
37657 // should be used is when it is necessary for a #GtkWidget to assign focus
37658 // to a widget that is semantically owned by the first widget even though
37659 // it's not a direct child - for instance, a search entry in a floating
37660 // window similar to the quick search in #GtkTreeView.
37661 // An example of its usage is:
37662 // |[
37663 // GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
37664 // fevent->focus_change.type = GDK_FOCUS_CHANGE;
37665 // fevent->focus_change.in = TRUE;
37666 // fevent->focus_change.window = gtk_widget_get_window (widget);
37667 // if (fevent->focus_change.window != NULL)
37668 // g_object_ref (fevent->focus_change.window);
37669 // gtk_widget_send_focus_change (widget, fevent);
37670 // gdk_event_free (event);
37671 // ]|
37672 // if the event was handled, and %FALSE otherwise
37673 // RETURNS: the return value from the event signal emission: %TRUE
37674 // <event>: a #GdkEvent of type GDK_FOCUS_CHANGE
37675 int send_focus_change()(Gdk2.Event* event) {
37676 return gtk_widget_send_focus_change(&this, event);
37679 // Unintrospectable method: set() / gtk_widget_set()
37680 // DEPRECATED (v2.0) method: set - Use g_object_set() instead.
37681 // Precursor of g_object_set().
37682 // <first_property_name>: name of first property to set
37683 /+ Not available -- variadic methods unsupported - use the C function directly.
37684 alias gtk_widget_set set; // Variadic
37687 // Given an accelerator group, @accel_group, and an accelerator path,
37688 // key binding that is defined for @accel_path is pressed, @widget
37689 // will be activated. This removes any accelerators (for any
37690 // accelerator group) installed by previous calls to
37691 // gtk_widget_set_accel_path(). Associating accelerators with
37692 // paths allows them to be modified by the user and the modifications
37693 // to be saved for future use. (See gtk_accel_map_save().)
37694 // This function is a low level function that would most likely
37695 // be used by a menu creation system like #GtkUIManager. If you
37696 // use #GtkUIManager, setting up accelerator paths will be done
37697 // automatically.
37698 // Even when you you aren't using #GtkUIManager, if you only want to
37699 // set up accelerators on menu items gtk_menu_item_set_accel_path()
37700 // provides a somewhat more convenient interface.
37701 // Note that @accel_path string will be stored in a #GQuark. Therefore, if you
37702 // pass a static string, you can save some memory by interning it first with
37703 // g_intern_static_string().
37704 // <accel_path>: path used to look up the accelerator
37705 // <accel_group>: a #GtkAccelGroup.
37706 void set_accel_path()(char* accel_path=null, AccelGroup* accel_group=null) {
37707 gtk_widget_set_accel_path(&this, accel_path, accel_group);
37710 // VERSION: 2.18
37711 // Sets the widget's allocation. This should not be used
37712 // directly, but from within a widget's size_allocate method.
37713 // <allocation>: a pointer to a #GtkAllocation to copy from
37714 void set_allocation()(Allocation* allocation) {
37715 gtk_widget_set_allocation(&this, allocation);
37718 // Sets whether the application intends to draw on the widget in
37719 // an #GtkWidget::expose-event handler.
37720 // This is a hint to the widget and does not affect the behavior of
37721 // the GTK+ core; many widgets ignore this flag entirely. For widgets
37722 // that do pay attention to the flag, such as #GtkEventBox and #GtkWindow,
37723 // the effect is to suppress default themed drawing of the widget's
37724 // background. (Children of the widget will still be drawn.) The application
37725 // is then entirely responsible for drawing the widget background.
37726 // Note that the background is still drawn when the widget is mapped.
37727 // If this is not suitable (e.g. because you want to make a transparent
37728 // window using an RGBA visual), you can work around this by doing:
37729 // |[
37730 // gtk_widget_realize (window);
37731 // gdk_window_set_back_pixmap (window->window, NULL, FALSE);
37732 // gtk_widget_show (window);
37733 // ]|
37734 // <app_paintable>: %TRUE if the application will paint on the widget
37735 void set_app_paintable()(int app_paintable) {
37736 gtk_widget_set_app_paintable(&this, app_paintable);
37739 // VERSION: 2.18
37740 // Specifies whether @widget can be a default widget. See
37741 // gtk_widget_grab_default() for details about the meaning of
37742 // "default".
37743 // <can_default>: whether or not @widget can be a default widget.
37744 void set_can_default()(int can_default) {
37745 gtk_widget_set_can_default(&this, can_default);
37748 // VERSION: 2.18
37749 // Specifies whether @widget can own the input focus. See
37750 // gtk_widget_grab_focus() for actually setting the input focus on a
37751 // widget.
37752 // <can_focus>: whether or not @widget can own the input focus.
37753 void set_can_focus()(int can_focus) {
37754 gtk_widget_set_can_focus(&this, can_focus);
37757 // Sets whether @widget should be mapped along with its when its parent
37758 // is mapped and @widget has been shown with gtk_widget_show().
37759 // The child visibility can be set for widget before it is added to
37760 // a container with gtk_widget_set_parent(), to avoid mapping
37761 // children unnecessary before immediately unmapping them. However
37762 // it will be reset to its default state of %TRUE when the widget
37763 // is removed from a container.
37764 // Note that changing the child visibility of a widget does not
37765 // queue a resize on the widget. Most of the time, the size of
37766 // a widget is computed from all visible children, whether or
37767 // not they are mapped. If this is not the case, the container
37768 // can queue a resize itself.
37769 // This function is only useful for container implementations and
37770 // never should be called by an application.
37771 // <is_visible>: if %TRUE, @widget should be mapped along with its parent.
37772 void set_child_visible()(int is_visible) {
37773 gtk_widget_set_child_visible(&this, is_visible);
37776 // Sets the colormap for the widget to the given value. Widget must not
37777 // have been previously realized. This probably should only be used
37778 // from an <function>init()</function> function (i.e. from the constructor
37779 // for the widget).
37780 // <colormap>: a colormap
37781 void set_colormap()(Gdk2.Colormap* colormap) {
37782 gtk_widget_set_colormap(&this, colormap);
37785 // Sets a widgets composite name. The widget must be
37786 // a composite child of its parent; see gtk_widget_push_composite_child().
37787 // <name>: the name to set
37788 void set_composite_name()(char* name) {
37789 gtk_widget_set_composite_name(&this, name);
37792 // Sets the reading direction on a particular widget. This direction
37793 // controls the primary direction for widgets containing text,
37794 // and also the direction in which the children of a container are
37795 // packed. The ability to set the direction is present in order
37796 // so that correct localization into languages with right-to-left
37797 // reading directions can be done. Generally, applications will
37798 // let the default reading direction present, except for containers
37799 // where the containers are arranged in an order that is explicitely
37800 // visual rather than logical (such as buttons for text justification).
37801 // If the direction is set to %GTK_TEXT_DIR_NONE, then the value
37802 // set by gtk_widget_set_default_direction() will be used.
37803 // <dir>: the new direction
37804 void set_direction()(TextDirection dir) {
37805 gtk_widget_set_direction(&this, dir);
37808 // Widgets are double buffered by default; you can use this function
37809 // to turn off the buffering. "Double buffered" simply means that
37810 // gdk_window_begin_paint_region() and gdk_window_end_paint() are called
37811 // automatically around expose events sent to the
37812 // widget. gdk_window_begin_paint() diverts all drawing to a widget's
37813 // window to an offscreen buffer, and gdk_window_end_paint() draws the
37814 // buffer to the screen. The result is that users see the window
37815 // update in one smooth step, and don't see individual graphics
37816 // primitives being rendered.
37817 // In very simple terms, double buffered widgets don't flicker,
37818 // so you would only use this function to turn off double buffering
37819 // if you had special needs and really knew what you were doing.
37820 // expose events, since even the clearing to the background color or
37821 // pixmap will not happen automatically (as it is done in
37822 // gdk_window_begin_paint()).
37823 // <double_buffered>: %TRUE to double-buffer a widget
37824 void set_double_buffered()(int double_buffered) {
37825 gtk_widget_set_double_buffered(&this, double_buffered);
37828 // Sets the event mask (see #GdkEventMask) for a widget. The event
37829 // mask determines which events a widget will receive. Keep in mind
37830 // that different widgets have different default event masks, and by
37831 // changing the event mask you may disrupt a widget's functionality,
37832 // so be careful. This function must be called while a widget is
37833 // unrealized. Consider gtk_widget_add_events() for widgets that are
37834 // already realized, or if you want to preserve the existing event
37835 // mask. This function can't be used with #GTK_NO_WINDOW widgets;
37836 // to get events on those widgets, place them inside a #GtkEventBox
37837 // and receive events on the event box.
37838 // <events>: event mask
37839 void set_events()(int events) {
37840 gtk_widget_set_events(&this, events);
37843 // Sets the extension events mask to @mode. See #GdkExtensionMode
37844 // and gdk_input_set_extension_events().
37845 // <mode>: bitfield of extension events to receive
37846 void set_extension_events()(Gdk2.ExtensionMode mode) {
37847 gtk_widget_set_extension_events(&this, mode);
37850 // VERSION: 2.12
37851 // Sets the has-tooltip property on @widget to @has_tooltip. See
37852 // GtkWidget:has-tooltip for more information.
37853 // <has_tooltip>: whether or not @widget has a tooltip.
37854 void set_has_tooltip()(int has_tooltip) {
37855 gtk_widget_set_has_tooltip(&this, has_tooltip);
37858 // VERSION: 2.18
37859 // Specifies whether @widget has a #GdkWindow of its own. Note that
37860 // all realized widgets have a non-%NULL "window" pointer
37861 // (gtk_widget_get_window() never returns a %NULL window when a widget
37862 // is realized), but for many of them it's actually the #GdkWindow of
37863 // one of its parent widgets. Widgets that do not create a %window for
37864 // themselves in GtkWidget::realize() must announce this by
37865 // calling this function with @has_window = %FALSE.
37866 // This function should only be called by widget implementations,
37867 // and they should call it in their init() function.
37868 // <has_window>: whether or not @widget has a window.
37869 void set_has_window()(int has_window) {
37870 gtk_widget_set_has_window(&this, has_window);
37873 // VERSION: 2.20
37874 // Marks the widget as being realized.
37875 // This function should only ever be called in a derived widget's
37876 // "map" or "unmap" implementation.
37877 // <mapped>: %TRUE to mark the widget as mapped
37878 void set_mapped()(int mapped) {
37879 gtk_widget_set_mapped(&this, mapped);
37882 // Widgets can be named, which allows you to refer to them from a
37883 // gtkrc file. You can apply a style to widgets with a particular name
37884 // in the gtkrc file. See the documentation for gtkrc files (on the
37885 // same page as the docs for #GtkRcStyle).
37886 // Note that widget names are separated by periods in paths (see
37887 // gtk_widget_path()), so names with embedded periods may cause confusion.
37888 // <name>: name for the widget
37889 void set_name()(char* name) {
37890 gtk_widget_set_name(&this, name);
37893 // VERSION: 2.4
37894 // Sets the #GtkWidget:no-show-all property, which determines whether
37895 // calls to gtk_widget_show_all() and gtk_widget_hide_all() will affect
37896 // this widget.
37897 // This is mostly for use in constructing widget hierarchies with externally
37898 // controlled visibility, see #GtkUIManager.
37899 // <no_show_all>: the new value for the "no-show-all" property
37900 void set_no_show_all()(int no_show_all) {
37901 gtk_widget_set_no_show_all(&this, no_show_all);
37904 // This function is useful only when implementing subclasses of
37905 // #GtkContainer.
37906 // Sets the container as the parent of @widget, and takes care of
37907 // some details such as updating the state and style of the child
37908 // to reflect its new location. The opposite function is
37909 // gtk_widget_unparent().
37910 // <parent>: parent container
37911 void set_parent()(Widget* parent) {
37912 gtk_widget_set_parent(&this, parent);
37915 // Sets a non default parent window for @widget.
37916 // <parent_window>: the new parent window.
37917 void set_parent_window()(Gdk2.Window* parent_window) {
37918 gtk_widget_set_parent_window(&this, parent_window);
37921 // VERSION: 2.20
37922 // Marks the widget as being realized.
37923 // This function should only ever be called in a derived widget's
37924 // "realize" or "unrealize" implementation.
37925 // <realized>: %TRUE to mark the widget as realized
37926 void set_realized()(int realized) {
37927 gtk_widget_set_realized(&this, realized);
37930 // VERSION: 2.18
37931 // Specifies whether @widget will be treated as the default widget
37932 // within its toplevel when it has the focus, even if another widget
37933 // is the default.
37934 // See gtk_widget_grab_default() for details about the meaning of
37935 // "default".
37936 // <receives_default>: whether or not @widget can be a default widget.
37937 void set_receives_default()(int receives_default) {
37938 gtk_widget_set_receives_default(&this, receives_default);
37941 // Sets whether the entire widget is queued for drawing when its size
37942 // allocation changes. By default, this setting is %TRUE and
37943 // the entire widget is redrawn on every size change. If your widget
37944 // leaves the upper left unchanged when made bigger, turning this
37945 // setting off will improve performance.
37946 // Note that for %NO_WINDOW widgets setting this flag to %FALSE turns
37947 // its position changes; this is to allow containers that don't draw
37948 // anything to avoid excess invalidations. If you set this flag on a
37949 // %NO_WINDOW widget that <emphasis>does</emphasis> draw on @widget->window,
37950 // you are responsible for invalidating both the old and new allocation
37951 // of the widget when the widget is moved and responsible for invalidating
37952 // regions newly when the widget increases size.
37953 // <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.
37954 void set_redraw_on_allocate()(int redraw_on_allocate) {
37955 gtk_widget_set_redraw_on_allocate(&this, redraw_on_allocate);
37958 // For widgets that support scrolling, sets the scroll adjustments and
37959 // returns %TRUE. For widgets that don't support scrolling, does
37960 // nothing and returns %FALSE. Widgets that don't support scrolling
37961 // can be scrolled by placing them in a #GtkViewport, which does
37962 // support scrolling.
37963 // RETURNS: %TRUE if the widget supports scrolling
37964 // <hadjustment>: an adjustment for horizontal scrolling, or %NULL
37965 // <vadjustment>: an adjustment for vertical scrolling, or %NULL
37966 int set_scroll_adjustments()(Adjustment* hadjustment=null, Adjustment* vadjustment=null) {
37967 return gtk_widget_set_scroll_adjustments(&this, hadjustment, vadjustment);
37970 // Sets the sensitivity of a widget. A widget is sensitive if the user
37971 // can interact with it. Insensitive widgets are "grayed out" and the
37972 // user can't interact with them. Insensitive widgets are known as
37973 // "inactive", "disabled", or "ghosted" in some other toolkits.
37974 // <sensitive>: %TRUE to make the widget sensitive
37975 void set_sensitive()(int sensitive) {
37976 gtk_widget_set_sensitive(&this, sensitive);
37979 // Sets the minimum size of a widget; that is, the widget's size
37980 // request will be @width by @height. You can use this function to
37981 // force a widget to be either larger or smaller than it normally
37982 // would be.
37983 // In most cases, gtk_window_set_default_size() is a better choice for
37984 // toplevel windows than this function; setting the default size will
37985 // still allow users to shrink the window. Setting the size request
37986 // will force them to leave the window at least as large as the size
37987 // request. When dealing with window sizes,
37988 // gtk_window_set_geometry_hints() can be a useful function as well.
37989 // Note the inherent danger of setting any fixed size - themes,
37990 // translations into other languages, different fonts, and user action
37991 // can all change the appropriate size for a given widget. So, it's
37992 // basically impossible to hardcode a size that will always be
37993 // correct.
37994 // The size request of a widget is the smallest size a widget can
37995 // accept while still functioning well and drawing itself correctly.
37996 // However in some strange cases a widget may be allocated less than
37997 // its requested size, and in many cases a widget may be allocated more
37998 // space than it requested.
37999 // If the size request in a given direction is -1 (unset), then
38000 // the "natural" size request of the widget will be used instead.
38001 // Widgets can't actually be allocated a size less than 1 by 1, but
38002 // you can pass 0,0 to this function to mean "as small as possible."
38003 // <width>: width @widget should request, or -1 to unset
38004 // <height>: height @widget should request, or -1 to unset
38005 void set_size_request()(int width, int height) {
38006 gtk_widget_set_size_request(&this, width, height);
38009 // This function is for use in widget implementations. Sets the state
38010 // of a widget (insensitive, prelighted, etc.) Usually you should set
38011 // the state using wrapper functions such as gtk_widget_set_sensitive().
38012 // <state>: new state for @widget
38013 void set_state()(StateType state) {
38014 gtk_widget_set_state(&this, state);
38017 // Sets the #GtkStyle for a widget (@widget->style). You probably don't
38018 // want to use this function; it interacts badly with themes, because
38019 // themes work by replacing the #GtkStyle. Instead, use
38020 // gtk_widget_modify_style().
38021 // <style>: a #GtkStyle, or %NULL to remove the effect of a previous gtk_widget_set_style() and go back to the default style
38022 void set_style()(Style* style=null) {
38023 gtk_widget_set_style(&this, style);
38026 // VERSION: 2.12
38027 // Sets @markup as the contents of the tooltip, which is marked up with
38028 // the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
38029 // This function will take care of setting GtkWidget:has-tooltip to %TRUE
38030 // and of the default handler for the GtkWidget::query-tooltip signal.
38031 // See also the GtkWidget:tooltip-markup property and
38032 // gtk_tooltip_set_markup().
38033 // <markup>: the contents of the tooltip for @widget, or %NULL
38034 void set_tooltip_markup()(char* markup=null) {
38035 gtk_widget_set_tooltip_markup(&this, markup);
38038 // VERSION: 2.12
38039 // Sets @text as the contents of the tooltip. This function will take
38040 // care of setting GtkWidget:has-tooltip to %TRUE and of the default
38041 // handler for the GtkWidget::query-tooltip signal.
38042 // See also the GtkWidget:tooltip-text property and gtk_tooltip_set_text().
38043 // <text>: the contents of the tooltip for @widget
38044 void set_tooltip_text()(char* text) {
38045 gtk_widget_set_tooltip_text(&this, text);
38048 // VERSION: 2.12
38049 // Replaces the default, usually yellow, window used for displaying
38050 // tooltips with @custom_window. GTK+ will take care of showing and
38051 // hiding @custom_window at the right moment, to behave likewise as
38052 // the default tooltip window. If @custom_window is %NULL, the default
38053 // tooltip window will be used.
38054 // If the custom window should have the default theming it needs to
38055 // have the name "gtk-tooltip", see gtk_widget_set_name().
38056 // <custom_window>: a #GtkWindow, or %NULL
38057 void set_tooltip_window()(Window* custom_window=null) {
38058 gtk_widget_set_tooltip_window(&this, custom_window);
38061 // Sets the position of a widget. The funny "u" in the name comes from
38062 // the "user position" hint specified by the X Window System, and
38063 // exists for legacy reasons. This function doesn't work if a widget
38064 // is inside a container; it's only really useful on #GtkWindow.
38065 // Don't use this function to center dialogs over the main application
38066 // window; most window managers will do the centering on your behalf
38067 // if you call gtk_window_set_transient_for(), and it's really not
38068 // possible to get the centering to work correctly in all cases from
38069 // application code. But if you insist, use gtk_window_set_position()
38070 // to set #GTK_WIN_POS_CENTER_ON_PARENT, don't do the centering
38071 // manually.
38072 // Note that although @x and @y can be individually unset, the position
38073 // is not honoured unless both @x and @y are set.
38074 // <x>: x position; -1 to unset x; -2 to leave x unchanged
38075 // <y>: y position; -1 to unset y; -2 to leave y unchanged
38076 void set_uposition()(int x, int y) {
38077 gtk_widget_set_uposition(&this, x, y);
38080 // DEPRECATED (v2.2) method: set_usize - Use gtk_widget_set_size_request() instead.
38081 // Sets the minimum size of a widget; that is, the widget's size
38082 // request will be @width by @height. You can use this function to
38083 // force a widget to be either larger or smaller than it is. The
38084 // strange "usize" name dates from the early days of GTK+, and derives
38085 // from X Window System terminology. In many cases,
38086 // gtk_window_set_default_size() is a better choice for toplevel
38087 // windows than this function; setting the default size will still
38088 // allow users to shrink the window. Setting the usize will force them
38089 // to leave the window at least as large as the usize. When dealing
38090 // with window sizes, gtk_window_set_geometry_hints() can be a useful
38091 // function as well.
38092 // Note the inherent danger of setting any fixed size - themes,
38093 // translations into other languages, different fonts, and user action
38094 // can all change the appropriate size for a given widget. So, it's
38095 // basically impossible to hardcode a size that will always be
38096 // correct.
38097 // <width>: minimum width, or -1 to unset
38098 // <height>: minimum height, or -1 to unset
38099 void set_usize()(int width, int height) {
38100 gtk_widget_set_usize(&this, width, height);
38103 // VERSION: 2.18
38104 // Sets the visibility state of @widget. Note that setting this to
38105 // %TRUE doesn't mean the widget is actually viewable, see
38106 // gtk_widget_get_visible().
38107 // This function simply calls gtk_widget_show() or gtk_widget_hide()
38108 // but is nicer to use when the visibility of the widget depends on
38109 // some condition.
38110 // <visible>: whether the widget should be shown or not
38111 void set_visible()(int visible) {
38112 gtk_widget_set_visible(&this, visible);
38115 // VERSION: 2.18
38116 // Sets a widget's window. This function should only be used in a
38117 // widget's GtkWidget::realize() implementation. The %window passed is
38118 // usually either new window created with gdk_window_new(), or the
38119 // window of its parent widget as returned by
38120 // gtk_widget_get_parent_window().
38121 // Widgets must indicate whether they will create their own #GdkWindow
38122 // by calling gtk_widget_set_has_window(). This is usually done in the
38123 // widget's init() function.
38124 // <window>: a #GdkWindow
38125 void set_window()(Gdk2.Window* window) {
38126 gtk_widget_set_window(&this, window);
38129 // Sets a shape for this widget's GDK window. This allows for
38130 // transparent windows etc., see gdk_window_shape_combine_mask()
38131 // for more information.
38132 // <shape_mask>: shape to be added, or %NULL to remove an existing shape
38133 // <offset_x>: X position of shape mask with respect to @window
38134 // <offset_y>: Y position of shape mask with respect to @window
38135 void shape_combine_mask()(Gdk2.Bitmap* shape_mask, int offset_x, int offset_y) {
38136 gtk_widget_shape_combine_mask(&this, shape_mask, offset_x, offset_y);
38139 // Flags a widget to be displayed. Any widget that isn't shown will
38140 // not appear on the screen. If you want to show all the widgets in a
38141 // container, it's easier to call gtk_widget_show_all() on the
38142 // container, instead of individually showing the widgets.
38143 // Remember that you have to show the containers containing a widget,
38144 // in addition to the widget itself, before it will appear onscreen.
38145 // When a toplevel container is shown, it is immediately realized and
38146 // mapped; other shown widgets are realized and mapped when their
38147 // toplevel container is realized and mapped.
38148 void show()() {
38149 gtk_widget_show(&this);
38152 // Recursively shows a widget, and any child widgets (if the widget is
38153 // a container).
38154 void show_all()() {
38155 gtk_widget_show_all(&this);
38158 // Shows a widget. If the widget is an unmapped toplevel widget
38159 // (i.e. a #GtkWindow that has not yet been shown), enter the main
38160 // loop and wait for the window to actually be mapped. Be careful;
38161 // because the main loop is running, anything can happen during
38162 // this function.
38163 void show_now()() {
38164 gtk_widget_show_now(&this);
38167 // This function is only used by #GtkContainer subclasses, to assign a size
38168 // and position to their child widgets.
38169 // <allocation>: position and size to be allocated to @widget
38170 void size_allocate()(Allocation* allocation) {
38171 gtk_widget_size_allocate(&this, allocation);
38174 // This function is typically used when implementing a #GtkContainer
38175 // subclass. Obtains the preferred size of a widget. The container
38176 // uses this information to arrange its child widgets and decide what
38177 // size allocations to give them with gtk_widget_size_allocate().
38178 // You can also call this function from an application, with some
38179 // caveats. Most notably, getting a size request requires the widget
38180 // to be associated with a screen, because font information may be
38181 // needed. Multihead-aware applications should keep this in mind.
38182 // Also remember that the size request is not necessarily the size
38183 // a widget will actually be allocated.
38184 // See also gtk_widget_get_child_requisition().
38185 // <requisition>: a #GtkRequisition to be filled in
38186 void size_request()(Requisition* requisition) {
38187 gtk_widget_size_request(&this, requisition);
38190 // VERSION: 2.20
38191 // This function attaches the widget's #GtkStyle to the widget's
38192 // #GdkWindow. It is a replacement for
38193 // <programlisting>
38194 // widget->style = gtk_style_attach (widget->style, widget->window);
38195 // </programlisting>
38196 // and should only ever be called in a derived widget's "realize"
38197 // implementation which does not chain up to its parent class'
38198 // "realize" implementation, because one of the parent classes
38199 // (finally #GtkWidget) would attach the style itself.
38200 void style_attach()() {
38201 gtk_widget_style_attach(&this);
38204 // Unintrospectable method: style_get() / gtk_widget_style_get()
38205 // Gets the values of a multiple style properties of @widget.
38206 // <first_property_name>: the name of the first property to get
38207 /+ Not available -- variadic methods unsupported - use the C function directly.
38208 alias gtk_widget_style_get style_get; // Variadic
38211 // Gets the value of a style property of @widget.
38212 // <property_name>: the name of a style property
38213 // <value>: location to return the property value
38214 void style_get_property()(char* property_name, GObject2.Value* value) {
38215 gtk_widget_style_get_property(&this, property_name, value);
38218 // Unintrospectable method: style_get_valist() / gtk_widget_style_get_valist()
38219 // Non-vararg variant of gtk_widget_style_get(). Used primarily by language
38220 // bindings.
38221 // <first_property_name>: the name of the first property to get
38222 // <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.
38223 void style_get_valist()(char* first_property_name, va_list var_args) {
38224 gtk_widget_style_get_valist(&this, first_property_name, var_args);
38227 // Reverts the effect of a previous call to gtk_widget_freeze_child_notify().
38228 // This causes all queued #GtkWidget::child-notify signals on @widget to be
38229 // emitted.
38230 void thaw_child_notify()() {
38231 gtk_widget_thaw_child_notify(&this);
38234 // Translate coordinates relative to @src_widget's allocation to coordinates
38235 // relative to @dest_widget's allocations. In order to perform this
38236 // operation, both widgets must be realized, and must share a common
38237 // toplevel.
38238 // was no common ancestor. In this case, nothing is stored in
38239 // *@dest_x and *@dest_y. Otherwise %TRUE.
38240 // RETURNS: %FALSE if either widget was not realized, or there
38241 // <dest_widget>: a #GtkWidget
38242 // <src_x>: X position relative to @src_widget
38243 // <src_y>: Y position relative to @src_widget
38244 // <dest_x>: location to store X position relative to @dest_widget
38245 // <dest_y>: location to store Y position relative to @dest_widget
38246 int translate_coordinates()(Widget* dest_widget, int src_x, int src_y, /*out*/ int* dest_x, /*out*/ int* dest_y) {
38247 return gtk_widget_translate_coordinates(&this, dest_widget, src_x, src_y, dest_x, dest_y);
38250 // VERSION: 2.12
38251 // Triggers a tooltip query on the display where the toplevel of @widget
38252 // is located. See gtk_tooltip_trigger_tooltip_query() for more
38253 // information.
38254 void trigger_tooltip_query()() {
38255 gtk_widget_trigger_tooltip_query(&this);
38258 // This function is only for use in widget implementations. Causes
38259 // a widget to be unmapped if it's currently mapped.
38260 void unmap()() {
38261 gtk_widget_unmap(&this);
38264 // This function is only for use in widget implementations.
38265 // Should be called by implementations of the remove method
38266 // on #GtkContainer, to dissociate a child from the container.
38267 void unparent()() {
38268 gtk_widget_unparent(&this);
38271 // This function is only useful in widget implementations.
38272 // Causes a widget to be unrealized (frees all GDK resources
38273 // associated with the widget, such as @widget->window).
38274 void unrealize()() {
38275 gtk_widget_unrealize(&this);
38278 // DEPRECATED (v2.12) method: unref - Use g_object_unref() instead.
38279 // Inverse of gtk_widget_ref(). Equivalent to g_object_unref().
38280 void unref()() {
38281 gtk_widget_unref(&this);
38283 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_accel_closures_changed;
38285 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38286 return super_.signal_connect!name(cb, data, cf);
38289 ulong signal_connect(string name:"accel-closures-changed", CB:signal_accel_closures_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38290 return signal_connect_data!()(&this, cast(char*)"accel-closures-changed",
38291 cast(GObject2.Callback)cb, data, null, cf);
38294 // The ::button-press-event signal will be emitted when a button
38295 // (typically from a mouse) is pressed.
38296 // To receive this signal, the #GdkWindow associated to the
38297 // widget needs to enable the #GDK_BUTTON_PRESS_MASK mask.
38298 // This signal will be sent to the grab widget if there is one.
38299 // %FALSE to propagate the event further.
38300 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38301 // <event>: the #GdkEventButton which triggered this signal.
38302 extern (C) alias static c_int function (Widget* this_, Gdk2.EventButton* event, void* user_data=null) signal_button_press_event;
38303 ulong signal_connect(string name:"button-press-event", CB:signal_button_press_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38304 return signal_connect_data!()(&this, cast(char*)"button-press-event",
38305 cast(GObject2.Callback)cb, data, null, cf);
38308 // The ::button-release-event signal will be emitted when a button
38309 // (typically from a mouse) is released.
38310 // To receive this signal, the #GdkWindow associated to the
38311 // widget needs to enable the #GDK_BUTTON_RELEASE_MASK mask.
38312 // This signal will be sent to the grab widget if there is one.
38313 // %FALSE to propagate the event further.
38314 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38315 // <event>: the #GdkEventButton which triggered this signal.
38316 extern (C) alias static c_int function (Widget* this_, Gdk2.EventButton* event, void* user_data=null) signal_button_release_event;
38317 ulong signal_connect(string name:"button-release-event", CB:signal_button_release_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38318 return signal_connect_data!()(&this, cast(char*)"button-release-event",
38319 cast(GObject2.Callback)cb, data, null, cf);
38322 // Determines whether an accelerator that activates the signal
38323 // identified by @signal_id can currently be activated.
38324 // This signal is present to allow applications and derived
38325 // widgets to override the default #GtkWidget handling
38326 // for determining whether an accelerator can be activated.
38327 // RETURNS: %TRUE if the signal can be activated.
38328 // <signal_id>: the ID of a signal installed on @widget
38329 extern (C) alias static c_int function (Widget* this_, c_uint signal_id, void* user_data=null) signal_can_activate_accel;
38330 ulong signal_connect(string name:"can-activate-accel", CB:signal_can_activate_accel)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38331 return signal_connect_data!()(&this, cast(char*)"can-activate-accel",
38332 cast(GObject2.Callback)cb, data, null, cf);
38335 // Unintrospectable glib:signal: child-notify() / ()
38336 // The ::child-notify signal is emitted for each
38337 // <link linkend="child-properties">child property</link> that has
38338 // changed on an object. The signal's detail holds the property name.
38339 // <pspec>: the #GParamSpec of the changed child property
38340 extern (C) alias static void function (Widget* this_, void* pspec, void* user_data=null) signal_child_notify;
38341 ulong signal_connect(string name:"child-notify", CB:signal_child_notify)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38342 return signal_connect_data!()(&this, cast(char*)"child-notify",
38343 cast(GObject2.Callback)cb, data, null, cf);
38346 // The ::client-event will be emitted when the @widget's window
38347 // receives a message (via a ClientMessage event) from another
38348 // application.
38349 // the event. %FALSE to propagate the event further.
38350 // RETURNS: %TRUE to stop other handlers from being invoked for
38351 // <event>: the #GdkEventClient which triggered this signal.
38352 extern (C) alias static c_int function (Widget* this_, Gdk2.EventClient* event, void* user_data=null) signal_client_event;
38353 ulong signal_connect(string name:"client-event", CB:signal_client_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38354 return signal_connect_data!()(&this, cast(char*)"client-event",
38355 cast(GObject2.Callback)cb, data, null, cf);
38358 // The ::composited-changed signal is emitted when the composited
38359 // status of @widget<!-- -->s screen changes.
38360 // See gdk_screen_is_composited().
38361 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_composited_changed;
38362 ulong signal_connect(string name:"composited-changed", CB:signal_composited_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38363 return signal_connect_data!()(&this, cast(char*)"composited-changed",
38364 cast(GObject2.Callback)cb, data, null, cf);
38367 // The ::configure-event signal will be emitted when the size, position or
38368 // stacking of the @widget's window has changed.
38369 // To receive this signal, the #GdkWindow associated to the widget needs
38370 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
38371 // automatically for all new windows.
38372 // %FALSE to propagate the event further.
38373 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38374 // <event>: the #GdkEventConfigure which triggered this signal.
38375 extern (C) alias static c_int function (Widget* this_, Gdk2.EventConfigure* event, void* user_data=null) signal_configure_event;
38376 ulong signal_connect(string name:"configure-event", CB:signal_configure_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38377 return signal_connect_data!()(&this, cast(char*)"configure-event",
38378 cast(GObject2.Callback)cb, data, null, cf);
38381 // VERSION: 2.14
38382 // Emitted when a redirected window belonging to @widget gets drawn into.
38383 // The region/area members of the event shows what area of the redirected
38384 // drawable was drawn into.
38385 // %FALSE to propagate the event further.
38386 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38387 // <event>: the #GdkEventExpose event
38388 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_damage_event;
38389 ulong signal_connect(string name:"damage-event", CB:signal_damage_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38390 return signal_connect_data!()(&this, cast(char*)"damage-event",
38391 cast(GObject2.Callback)cb, data, null, cf);
38394 // The ::delete-event signal is emitted if a user requests that
38395 // a toplevel window is closed. The default handler for this signal
38396 // destroys the window. Connecting gtk_widget_hide_on_delete() to
38397 // this signal will cause the window to be hidden instead, so that
38398 // it can later be shown again without reconstructing it.
38399 // %FALSE to propagate the event further.
38400 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38401 // <event>: the event which triggered this signal
38402 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_delete_event;
38403 ulong signal_connect(string name:"delete-event", CB:signal_delete_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38404 return signal_connect_data!()(&this, cast(char*)"delete-event",
38405 cast(GObject2.Callback)cb, data, null, cf);
38408 // The ::destroy-event signal is emitted when a #GdkWindow is destroyed.
38409 // You rarely get this signal, because most widgets disconnect themselves
38410 // from their window before they destroy it, so no widget owns the
38411 // window at destroy time.
38412 // To receive this signal, the #GdkWindow associated to the widget needs
38413 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
38414 // automatically for all new windows.
38415 // %FALSE to propagate the event further.
38416 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38417 // <event>: the event which triggered this signal
38418 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_destroy_event;
38419 ulong signal_connect(string name:"destroy-event", CB:signal_destroy_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38420 return signal_connect_data!()(&this, cast(char*)"destroy-event",
38421 cast(GObject2.Callback)cb, data, null, cf);
38424 // The ::direction-changed signal is emitted when the text direction
38425 // of a widget changes.
38426 // <previous_direction>: the previous text direction of @widget
38427 extern (C) alias static void function (Widget* this_, TextDirection* previous_direction, void* user_data=null) signal_direction_changed;
38428 ulong signal_connect(string name:"direction-changed", CB:signal_direction_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38429 return signal_connect_data!()(&this, cast(char*)"direction-changed",
38430 cast(GObject2.Callback)cb, data, null, cf);
38433 // The ::drag-begin signal is emitted on the drag source when a drag is
38434 // started. A typical reason to connect to this signal is to set up a
38435 // custom drag icon with gtk_drag_source_set_icon().
38436 // Note that some widgets set up a drag icon in the default handler of
38437 // this signal, so you may have to use g_signal_connect_after() to
38438 // override what the default handler did.
38439 // <drag_context>: the drag context
38440 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) signal_drag_begin;
38441 ulong signal_connect(string name:"drag-begin", CB:signal_drag_begin)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38442 return signal_connect_data!()(&this, cast(char*)"drag-begin",
38443 cast(GObject2.Callback)cb, data, null, cf);
38446 // The ::drag-data-delete signal is emitted on the drag source when a drag
38447 // with the action %GDK_ACTION_MOVE is successfully completed. The signal
38448 // handler is responsible for deleting the data that has been dropped. What
38449 // "delete" means depends on the context of the drag operation.
38450 // <drag_context>: the drag context
38451 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) signal_drag_data_delete;
38452 ulong signal_connect(string name:"drag-data-delete", CB:signal_drag_data_delete)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38453 return signal_connect_data!()(&this, cast(char*)"drag-data-delete",
38454 cast(GObject2.Callback)cb, data, null, cf);
38457 // The ::drag-data-get signal is emitted on the drag source when the drop
38458 // site requests the data which is dragged. It is the responsibility of
38459 // the signal handler to fill @data with the data in the format which
38460 // is indicated by @info. See gtk_selection_data_set() and
38461 // gtk_selection_data_set_text().
38462 // <drag_context>: the drag context
38463 // <data>: the #GtkSelectionData to be filled with the dragged data
38464 // <info>: the info that has been registered with the target in the #GtkTargetList
38465 // <time>: the timestamp at which the data was requested
38466 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, SelectionData* data, c_uint info, c_uint time, void* user_data=null) signal_drag_data_get;
38467 ulong signal_connect(string name:"drag-data-get", CB:signal_drag_data_get)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38468 return signal_connect_data!()(&this, cast(char*)"drag-data-get",
38469 cast(GObject2.Callback)cb, data, null, cf);
38472 // The ::drag-data-received signal is emitted on the drop site when the
38473 // dragged data has been received. If the data was received in order to
38474 // determine whether the drop will be accepted, the handler is expected
38475 // to call gdk_drag_status() and <emphasis>not</emphasis> finish the drag.
38476 // If the data was received in response to a #GtkWidget::drag-drop signal
38477 // (and this is the last target to be received), the handler for this
38478 // signal is expected to process the received data and then call
38479 // gtk_drag_finish(), setting the @success parameter depending on whether
38480 // the data was processed successfully.
38481 // The handler may inspect and modify @drag_context->action before calling
38482 // gtk_drag_finish(), e.g. to implement %GDK_ACTION_ASK as shown in the
38483 // following example:
38484 // |[
38485 // void
38486 // drag_data_received (GtkWidget *widget,
38487 // GdkDragContext *drag_context,
38488 // gint x,
38489 // gint y,
38490 // GtkSelectionData *data,
38491 // guint info,
38492 // guint time)
38493 // {
38494 // if ((data->length >= 0) && (data->format == 8))
38495 // {
38496 // if (drag_context->action == GDK_ACTION_ASK)
38497 // {
38498 // GtkWidget *dialog;
38499 // gint response;
38500 // dialog = gtk_message_dialog_new (NULL,
38501 // GTK_DIALOG_MODAL |
38502 // GTK_DIALOG_DESTROY_WITH_PARENT,
38503 // GTK_MESSAGE_INFO,
38504 // GTK_BUTTONS_YES_NO,
38505 // "Move the data ?\n");
38506 // response = gtk_dialog_run (GTK_DIALOG (dialog));
38507 // gtk_widget_destroy (dialog);
38508 // if (response == GTK_RESPONSE_YES)
38509 // drag_context->action = GDK_ACTION_MOVE;
38510 // else
38511 // drag_context->action = GDK_ACTION_COPY;
38512 // }
38513 // gtk_drag_finish (drag_context, TRUE, FALSE, time);
38514 // return;
38515 // }
38516 // gtk_drag_finish (drag_context, FALSE, FALSE, time);
38517 // }
38518 // ]|
38519 // <drag_context>: the drag context
38520 // <x>: where the drop happened
38521 // <y>: where the drop happened
38522 // <data>: the received data
38523 // <info>: the info that has been registered with the target in the #GtkTargetList
38524 // <time>: the timestamp at which the data was received
38525 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, SelectionData* data, c_uint info, c_uint time, void* user_data=null) signal_drag_data_received;
38526 ulong signal_connect(string name:"drag-data-received", CB:signal_drag_data_received)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38527 return signal_connect_data!()(&this, cast(char*)"drag-data-received",
38528 cast(GObject2.Callback)cb, data, null, cf);
38531 // The ::drag-drop signal is emitted on the drop site when the user drops
38532 // the data onto the widget. The signal handler must determine whether
38533 // the cursor position is in a drop zone or not. If it is not in a drop
38534 // zone, it returns %FALSE and no further processing is necessary.
38535 // Otherwise, the handler returns %TRUE. In this case, the handler must
38536 // ensure that gtk_drag_finish() is called to let the source know that
38537 // the drop is done. The call to gtk_drag_finish() can be done either
38538 // directly or in a #GtkWidget::drag-data-received handler which gets
38539 // triggered by calling gtk_drag_get_data() to receive the data for one
38540 // or more of the supported targets.
38541 // RETURNS: whether the cursor position is in a drop zone
38542 // <drag_context>: the drag context
38543 // <x>: the x coordinate of the current cursor position
38544 // <y>: the y coordinate of the current cursor position
38545 // <time>: the timestamp of the motion event
38546 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, c_uint time, void* user_data=null) signal_drag_drop;
38547 ulong signal_connect(string name:"drag-drop", CB:signal_drag_drop)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38548 return signal_connect_data!()(&this, cast(char*)"drag-drop",
38549 cast(GObject2.Callback)cb, data, null, cf);
38552 // The ::drag-end signal is emitted on the drag source when a drag is
38553 // finished. A typical reason to connect to this signal is to undo
38554 // things done in #GtkWidget::drag-begin.
38555 // <drag_context>: the drag context
38556 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, void* user_data=null) signal_drag_end;
38557 ulong signal_connect(string name:"drag-end", CB:signal_drag_end)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38558 return signal_connect_data!()(&this, cast(char*)"drag-end",
38559 cast(GObject2.Callback)cb, data, null, cf);
38562 // VERSION: 2.12
38563 // The ::drag-failed signal is emitted on the drag source when a drag has
38564 // failed. The signal handler may hook custom code to handle a failed DND
38565 // operation based on the type of error, it returns %TRUE is the failure has
38566 // been already handled (not showing the default "drag operation failed"
38567 // animation), otherwise it returns %FALSE.
38568 // RETURNS: %TRUE if the failed drag operation has been already handled.
38569 // <drag_context>: the drag context
38570 // <result>: the result of the drag operation
38571 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, DragResult* result, void* user_data=null) signal_drag_failed;
38572 ulong signal_connect(string name:"drag-failed", CB:signal_drag_failed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38573 return signal_connect_data!()(&this, cast(char*)"drag-failed",
38574 cast(GObject2.Callback)cb, data, null, cf);
38577 // The ::drag-leave signal is emitted on the drop site when the cursor
38578 // leaves the widget. A typical reason to connect to this signal is to
38579 // undo things done in #GtkWidget::drag-motion, e.g. undo highlighting
38580 // with gtk_drag_unhighlight()
38581 // <drag_context>: the drag context
38582 // <time>: the timestamp of the motion event
38583 extern (C) alias static void function (Widget* this_, Gdk2.DragContext* drag_context, c_uint time, void* user_data=null) signal_drag_leave;
38584 ulong signal_connect(string name:"drag-leave", CB:signal_drag_leave)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38585 return signal_connect_data!()(&this, cast(char*)"drag-leave",
38586 cast(GObject2.Callback)cb, data, null, cf);
38589 // The drag-motion signal is emitted on the drop site when the user
38590 // moves the cursor over the widget during a drag. The signal handler
38591 // must determine whether the cursor position is in a drop zone or not.
38592 // If it is not in a drop zone, it returns %FALSE and no further processing
38593 // is necessary. Otherwise, the handler returns %TRUE. In this case, the
38594 // handler is responsible for providing the necessary information for
38595 // displaying feedback to the user, by calling gdk_drag_status().
38596 // If the decision whether the drop will be accepted or rejected can't be
38597 // made based solely on the cursor position and the type of the data, the
38598 // handler may inspect the dragged data by calling gtk_drag_get_data() and
38599 // defer the gdk_drag_status() call to the #GtkWidget::drag-data-received
38600 // handler. Note that you cannot not pass #GTK_DEST_DEFAULT_DROP,
38601 // #GTK_DEST_DEFAULT_MOTION or #GTK_DEST_DEFAULT_ALL to gtk_drag_dest_set()
38602 // when using the drag-motion signal that way.
38603 // Also note that there is no drag-enter signal. The drag receiver has to
38604 // keep track of whether he has received any drag-motion signals since the
38605 // last #GtkWidget::drag-leave and if not, treat the drag-motion signal as
38606 // an "enter" signal. Upon an "enter", the handler will typically highlight
38607 // the drop site with gtk_drag_highlight().
38608 // |[
38609 // static void
38610 // drag_motion (GtkWidget *widget,
38611 // GdkDragContext *context,
38612 // gint x,
38613 // gint y,
38614 // guint time)
38615 // {
38616 // GdkAtom target;
38617 // PrivateData *private_data = GET_PRIVATE_DATA (widget);
38618 // if (!private_data->drag_highlight)
38619 // {
38620 // private_data->drag_highlight = 1;
38621 // gtk_drag_highlight (widget);
38622 // }
38623 // target = gtk_drag_dest_find_target (widget, context, NULL);
38624 // if (target == GDK_NONE)
38625 // gdk_drag_status (context, 0, time);
38626 // else
38627 // {
38628 // private_data->pending_status = context->suggested_action;
38629 // gtk_drag_get_data (widget, context, target, time);
38630 // }
38631 // return TRUE;
38632 // }
38633 // static void
38634 // drag_data_received (GtkWidget *widget,
38635 // GdkDragContext *context,
38636 // gint x,
38637 // gint y,
38638 // GtkSelectionData *selection_data,
38639 // guint info,
38640 // guint time)
38641 // {
38642 // PrivateData *private_data = GET_PRIVATE_DATA (widget);
38643 // if (private_data->suggested_action)
38644 // {
38645 // private_data->suggested_action = 0;
38646 // /&ast; We are getting this data due to a request in drag_motion,
38647 // * rather than due to a request in drag_drop, so we are just
38648 // * supposed to call gdk_drag_status (), not actually paste in
38649 // * the data.
38650 // &ast;/
38651 // str = gtk_selection_data_get_text (selection_data);
38652 // if (!data_is_acceptable (str))
38653 // gdk_drag_status (context, 0, time);
38654 // else
38655 // gdk_drag_status (context, private_data->suggested_action, time);
38656 // }
38657 // else
38658 // {
38659 // /&ast; accept the drop &ast;/
38660 // }
38661 // }
38662 // ]|
38663 // RETURNS: whether the cursor position is in a drop zone
38664 // <drag_context>: the drag context
38665 // <x>: the x coordinate of the current cursor position
38666 // <y>: the y coordinate of the current cursor position
38667 // <time>: the timestamp of the motion event
38668 extern (C) alias static c_int function (Widget* this_, Gdk2.DragContext* drag_context, int x, int y, c_uint time, void* user_data=null) signal_drag_motion;
38669 ulong signal_connect(string name:"drag-motion", CB:signal_drag_motion)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38670 return signal_connect_data!()(&this, cast(char*)"drag-motion",
38671 cast(GObject2.Callback)cb, data, null, cf);
38674 // The ::enter-notify-event will be emitted when the pointer enters
38675 // the @widget's window.
38676 // To receive this signal, the #GdkWindow associated to the widget needs
38677 // to enable the #GDK_ENTER_NOTIFY_MASK mask.
38678 // This signal will be sent to the grab widget if there is one.
38679 // %FALSE to propagate the event further.
38680 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38681 // <event>: the #GdkEventCrossing which triggered this signal.
38682 extern (C) alias static c_int function (Widget* this_, Gdk2.EventCrossing* event, void* user_data=null) signal_enter_notify_event;
38683 ulong signal_connect(string name:"enter-notify-event", CB:signal_enter_notify_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38684 return signal_connect_data!()(&this, cast(char*)"enter-notify-event",
38685 cast(GObject2.Callback)cb, data, null, cf);
38688 // The GTK+ main loop will emit three signals for each GDK event delivered
38689 // signal that matches the type of event delivered (e.g.
38690 // #GtkWidget::key-press-event) and finally a generic
38691 // #GtkWidget::event-after signal.
38692 // and to cancel the emission of the second specific ::event signal.
38693 // %FALSE to propagate the event further and to allow the emission of
38694 // the second signal. The ::event-after signal is emitted regardless of
38695 // the return value.
38696 // RETURNS: %TRUE to stop other handlers from being invoked for the event
38697 // <event>: the #GdkEvent which triggered this signal
38698 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_event;
38699 ulong signal_connect(string name:"event", CB:signal_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38700 return signal_connect_data!()(&this, cast(char*)"event",
38701 cast(GObject2.Callback)cb, data, null, cf);
38704 // After the emission of the #GtkWidget::event signal and (optionally)
38705 // the second more specific signal, ::event-after will be emitted
38706 // regardless of the previous two signals handlers return values.
38707 // <event>: the #GdkEvent which triggered this signal
38708 extern (C) alias static void function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_event_after;
38709 ulong signal_connect(string name:"event-after", CB:signal_event_after)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38710 return signal_connect_data!()(&this, cast(char*)"event-after",
38711 cast(GObject2.Callback)cb, data, null, cf);
38714 // The ::expose-event signal is emitted when an area of a previously
38715 // obscured #GdkWindow is made visible and needs to be redrawn.
38716 // #GTK_NO_WINDOW widgets will get a synthesized event from their parent
38717 // widget.
38718 // To receive this signal, the #GdkWindow associated to the widget needs
38719 // to enable the #GDK_EXPOSURE_MASK mask.
38720 // Note that the ::expose-event signal has been replaced by a ::draw
38721 // 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>
38722 // for hints on how to port from ::expose-event to ::draw.
38723 // %FALSE to propagate the event further.
38724 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38725 // <event>: the #GdkEventExpose which triggered this signal.
38726 extern (C) alias static c_int function (Widget* this_, Gdk2.EventExpose* event, void* user_data=null) signal_expose_event;
38727 ulong signal_connect(string name:"expose-event", CB:signal_expose_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38728 return signal_connect_data!()(&this, cast(char*)"expose-event",
38729 cast(GObject2.Callback)cb, data, null, cf);
38732 // RETURNS: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
38733 // <returns>: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
38734 extern (C) alias static c_int function (Widget* this_, DirectionType* returns, void* user_data=null) signal_focus;
38735 ulong signal_connect(string name:"focus", CB:signal_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38736 return signal_connect_data!()(&this, cast(char*)"focus",
38737 cast(GObject2.Callback)cb, data, null, cf);
38740 // The ::focus-in-event signal will be emitted when the keyboard focus
38741 // enters the @widget's window.
38742 // To receive this signal, the #GdkWindow associated to the widget needs
38743 // to enable the #GDK_FOCUS_CHANGE_MASK mask.
38744 // %FALSE to propagate the event further.
38745 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38746 // <event>: the #GdkEventFocus which triggered this signal.
38747 extern (C) alias static c_int function (Widget* this_, Gdk2.EventFocus* event, void* user_data=null) signal_focus_in_event;
38748 ulong signal_connect(string name:"focus-in-event", CB:signal_focus_in_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38749 return signal_connect_data!()(&this, cast(char*)"focus-in-event",
38750 cast(GObject2.Callback)cb, data, null, cf);
38753 // The ::focus-out-event signal will be emitted when the keyboard focus
38754 // leaves the @widget's window.
38755 // To receive this signal, the #GdkWindow associated to the widget needs
38756 // to enable the #GDK_FOCUS_CHANGE_MASK mask.
38757 // %FALSE to propagate the event further.
38758 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38759 // <event>: the #GdkEventFocus which triggered this signal.
38760 extern (C) alias static c_int function (Widget* this_, Gdk2.EventFocus* event, void* user_data=null) signal_focus_out_event;
38761 ulong signal_connect(string name:"focus-out-event", CB:signal_focus_out_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38762 return signal_connect_data!()(&this, cast(char*)"focus-out-event",
38763 cast(GObject2.Callback)cb, data, null, cf);
38766 // VERSION: 2.8
38767 // Emitted when a pointer or keyboard grab on a window belonging
38768 // to @widget gets broken.
38769 // On X11, this happens when the grab window becomes unviewable
38770 // (i.e. it or one of its ancestors is unmapped), or if the same
38771 // application grabs the pointer or keyboard again.
38772 // the event. %FALSE to propagate the event further.
38773 // RETURNS: %TRUE to stop other handlers from being invoked for
38774 // <event>: the #GdkEventGrabBroken event
38775 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* event, void* user_data=null) signal_grab_broken_event;
38776 ulong signal_connect(string name:"grab-broken-event", CB:signal_grab_broken_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38777 return signal_connect_data!()(&this, cast(char*)"grab-broken-event",
38778 cast(GObject2.Callback)cb, data, null, cf);
38780 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_grab_focus;
38781 ulong signal_connect(string name:"grab-focus", CB:signal_grab_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38782 return signal_connect_data!()(&this, cast(char*)"grab-focus",
38783 cast(GObject2.Callback)cb, data, null, cf);
38786 // The ::grab-notify signal is emitted when a widget becomes
38787 // shadowed by a GTK+ grab (not a pointer or keyboard grab) on
38788 // another widget, or when it becomes unshadowed due to a grab
38789 // being removed.
38790 // A widget is shadowed by a gtk_grab_add() when the topmost
38791 // grab widget in the grab stack of its window group is not
38792 // its ancestor.
38793 // <was_grabbed>: %FALSE if the widget becomes shadowed, %TRUE if it becomes unshadowed
38794 extern (C) alias static void function (Widget* this_, c_int was_grabbed, void* user_data=null) signal_grab_notify;
38795 ulong signal_connect(string name:"grab-notify", CB:signal_grab_notify)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38796 return signal_connect_data!()(&this, cast(char*)"grab-notify",
38797 cast(GObject2.Callback)cb, data, null, cf);
38799 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_hide;
38800 ulong signal_connect(string name:"hide", CB:signal_hide)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38801 return signal_connect_data!()(&this, cast(char*)"hide",
38802 cast(GObject2.Callback)cb, data, null, cf);
38805 // The ::hierarchy-changed signal is emitted when the
38806 // anchored state of a widget changes. A widget is
38807 // <firstterm>anchored</firstterm> when its toplevel
38808 // ancestor is a #GtkWindow. This signal is emitted when
38809 // a widget changes from un-anchored to anchored or vice-versa.
38810 // <previous_toplevel>: the previous toplevel ancestor, or %NULL if the widget was previously unanchored
38811 extern (C) alias static void function (Widget* this_, Widget* previous_toplevel=null, void* user_data=null) signal_hierarchy_changed;
38812 ulong signal_connect(string name:"hierarchy-changed", CB:signal_hierarchy_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38813 return signal_connect_data!()(&this, cast(char*)"hierarchy-changed",
38814 cast(GObject2.Callback)cb, data, null, cf);
38817 // The ::key-press-event signal is emitted when a key is pressed.
38818 // To receive this signal, the #GdkWindow associated to the widget needs
38819 // to enable the #GDK_KEY_PRESS_MASK mask.
38820 // This signal will be sent to the grab widget if there is one.
38821 // %FALSE to propagate the event further.
38822 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38823 // <event>: the #GdkEventKey which triggered this signal.
38824 extern (C) alias static c_int function (Widget* this_, Gdk2.EventKey* event, void* user_data=null) signal_key_press_event;
38825 ulong signal_connect(string name:"key-press-event", CB:signal_key_press_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38826 return signal_connect_data!()(&this, cast(char*)"key-press-event",
38827 cast(GObject2.Callback)cb, data, null, cf);
38830 // The ::key-release-event signal is emitted when a key is pressed.
38831 // To receive this signal, the #GdkWindow associated to the widget needs
38832 // to enable the #GDK_KEY_RELEASE_MASK mask.
38833 // This signal will be sent to the grab widget if there is one.
38834 // %FALSE to propagate the event further.
38835 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38836 // <event>: the #GdkEventKey which triggered this signal.
38837 extern (C) alias static c_int function (Widget* this_, Gdk2.EventKey* event, void* user_data=null) signal_key_release_event;
38838 ulong signal_connect(string name:"key-release-event", CB:signal_key_release_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38839 return signal_connect_data!()(&this, cast(char*)"key-release-event",
38840 cast(GObject2.Callback)cb, data, null, cf);
38843 // VERSION: 2.12
38844 // Gets emitted if keyboard navigation fails.
38845 // See gtk_widget_keynav_failed() for details.
38846 // if the emitting widget should try to handle the keyboard
38847 // navigation attempt in its parent container(s).
38848 // RETURNS: %TRUE if stopping keyboard navigation is fine, %FALSE
38849 // <direction>: the direction of movement
38850 extern (C) alias static c_int function (Widget* this_, DirectionType* direction, void* user_data=null) signal_keynav_failed;
38851 ulong signal_connect(string name:"keynav-failed", CB:signal_keynav_failed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38852 return signal_connect_data!()(&this, cast(char*)"keynav-failed",
38853 cast(GObject2.Callback)cb, data, null, cf);
38856 // The ::leave-notify-event will be emitted when the pointer leaves
38857 // the @widget's window.
38858 // To receive this signal, the #GdkWindow associated to the widget needs
38859 // to enable the #GDK_LEAVE_NOTIFY_MASK mask.
38860 // This signal will be sent to the grab widget if there is one.
38861 // %FALSE to propagate the event further.
38862 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38863 // <event>: the #GdkEventCrossing which triggered this signal.
38864 extern (C) alias static c_int function (Widget* this_, Gdk2.EventCrossing* event, void* user_data=null) signal_leave_notify_event;
38865 ulong signal_connect(string name:"leave-notify-event", CB:signal_leave_notify_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38866 return signal_connect_data!()(&this, cast(char*)"leave-notify-event",
38867 cast(GObject2.Callback)cb, data, null, cf);
38869 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_map;
38870 ulong signal_connect(string name:"map", CB:signal_map)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38871 return signal_connect_data!()(&this, cast(char*)"map",
38872 cast(GObject2.Callback)cb, data, null, cf);
38875 // The ::map-event signal will be emitted when the @widget's window is
38876 // mapped. A window is mapped when it becomes visible on the screen.
38877 // To receive this signal, the #GdkWindow associated to the widget needs
38878 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
38879 // automatically for all new windows.
38880 // %FALSE to propagate the event further.
38881 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38882 // <event>: the #GdkEventAny which triggered this signal.
38883 extern (C) alias static c_int function (Widget* this_, Gdk2.EventAny* event, void* user_data=null) signal_map_event;
38884 ulong signal_connect(string name:"map-event", CB:signal_map_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38885 return signal_connect_data!()(&this, cast(char*)"map-event",
38886 cast(GObject2.Callback)cb, data, null, cf);
38888 extern (C) alias static c_int function (Widget* this_, c_int object, void* user_data=null) signal_mnemonic_activate;
38889 ulong signal_connect(string name:"mnemonic-activate", CB:signal_mnemonic_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38890 return signal_connect_data!()(&this, cast(char*)"mnemonic-activate",
38891 cast(GObject2.Callback)cb, data, null, cf);
38894 // The ::motion-notify-event signal is emitted when the pointer moves
38895 // over the widget's #GdkWindow.
38896 // To receive this signal, the #GdkWindow associated to the widget
38897 // needs to enable the #GDK_POINTER_MOTION_MASK mask.
38898 // This signal will be sent to the grab widget if there is one.
38899 // %FALSE to propagate the event further.
38900 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38901 // <event>: the #GdkEventMotion which triggered this signal.
38902 extern (C) alias static c_int function (Widget* this_, Gdk2.EventMotion* event, void* user_data=null) signal_motion_notify_event;
38903 ulong signal_connect(string name:"motion-notify-event", CB:signal_motion_notify_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38904 return signal_connect_data!()(&this, cast(char*)"motion-notify-event",
38905 cast(GObject2.Callback)cb, data, null, cf);
38907 extern (C) alias static void function (Widget* this_, DirectionType* object, void* user_data=null) signal_move_focus;
38908 ulong signal_connect(string name:"move-focus", CB:signal_move_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38909 return signal_connect_data!()(&this, cast(char*)"move-focus",
38910 cast(GObject2.Callback)cb, data, null, cf);
38913 // The ::no-expose-event will be emitted when the @widget's window is
38914 // drawn as a copy of another #GdkDrawable (with gdk_draw_drawable() or
38915 // gdk_window_copy_area()) which was completely unobscured. If the source
38916 // window was partially obscured #GdkEventExpose events will be generated
38917 // for those areas.
38918 // %FALSE to propagate the event further.
38919 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38920 // <event>: the #GdkEventNoExpose which triggered this signal.
38921 extern (C) alias static c_int function (Widget* this_, Gdk2.EventNoExpose* event, void* user_data=null) signal_no_expose_event;
38922 ulong signal_connect(string name:"no-expose-event", CB:signal_no_expose_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38923 return signal_connect_data!()(&this, cast(char*)"no-expose-event",
38924 cast(GObject2.Callback)cb, data, null, cf);
38927 // The ::parent-set signal is emitted when a new parent
38928 // has been set on a widget.
38929 // <old_parent>: the previous parent, or %NULL if the widget just got its initial parent.
38930 extern (C) alias static void function (Widget* this_, Widget* old_parent=null, void* user_data=null) signal_parent_set;
38931 ulong signal_connect(string name:"parent-set", CB:signal_parent_set)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38932 return signal_connect_data!()(&this, cast(char*)"parent-set",
38933 cast(GObject2.Callback)cb, data, null, cf);
38936 // This signal gets emitted whenever a widget should pop up a context
38937 // menu. This usually happens through the standard key binding mechanism;
38938 // by pressing a certain key while a widget is focused, the user can cause
38939 // the widget to pop up a menu. For example, the #GtkEntry widget creates
38940 // a menu with clipboard commands. See <xref linkend="checklist-popup-menu"/>
38941 // for an example of how to use this signal.
38942 // RETURNS: %TRUE if a menu was activated
38943 extern (C) alias static c_int function (Widget* this_, void* user_data=null) signal_popup_menu;
38944 ulong signal_connect(string name:"popup-menu", CB:signal_popup_menu)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38945 return signal_connect_data!()(&this, cast(char*)"popup-menu",
38946 cast(GObject2.Callback)cb, data, null, cf);
38949 // The ::property-notify-event signal will be emitted when a property on
38950 // the @widget's window has been changed or deleted.
38951 // To receive this signal, the #GdkWindow associated to the widget needs
38952 // to enable the #GDK_PROPERTY_CHANGE_MASK mask.
38953 // %FALSE to propagate the event further.
38954 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38955 // <event>: the #GdkEventProperty which triggered this signal.
38956 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProperty* event, void* user_data=null) signal_property_notify_event;
38957 ulong signal_connect(string name:"property-notify-event", CB:signal_property_notify_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38958 return signal_connect_data!()(&this, cast(char*)"property-notify-event",
38959 cast(GObject2.Callback)cb, data, null, cf);
38962 // To receive this signal the #GdkWindow associated to the widget needs
38963 // to enable the #GDK_PROXIMITY_IN_MASK mask.
38964 // This signal will be sent to the grab widget if there is one.
38965 // %FALSE to propagate the event further.
38966 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38967 // <event>: the #GdkEventProximity which triggered this signal.
38968 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProximity* event, void* user_data=null) signal_proximity_in_event;
38969 ulong signal_connect(string name:"proximity-in-event", CB:signal_proximity_in_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38970 return signal_connect_data!()(&this, cast(char*)"proximity-in-event",
38971 cast(GObject2.Callback)cb, data, null, cf);
38974 // To receive this signal the #GdkWindow associated to the widget needs
38975 // to enable the #GDK_PROXIMITY_OUT_MASK mask.
38976 // This signal will be sent to the grab widget if there is one.
38977 // %FALSE to propagate the event further.
38978 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
38979 // <event>: the #GdkEventProximity which triggered this signal.
38980 extern (C) alias static c_int function (Widget* this_, Gdk2.EventProximity* event, void* user_data=null) signal_proximity_out_event;
38981 ulong signal_connect(string name:"proximity-out-event", CB:signal_proximity_out_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
38982 return signal_connect_data!()(&this, cast(char*)"proximity-out-event",
38983 cast(GObject2.Callback)cb, data, null, cf);
38986 // VERSION: 2.12
38987 // Emitted when #GtkWidget:has-tooltip is %TRUE and the #GtkSettings:gtk-tooltip-timeout
38988 // has expired with the cursor hovering "above" @widget; or emitted when @widget got
38989 // focus in keyboard mode.
38990 // Using the given coordinates, the signal handler should determine
38991 // whether a tooltip should be shown for @widget. If this is the case
38992 // %TRUE should be returned, %FALSE otherwise. Note that if
38993 // should not be used.
38994 // The signal handler is free to manipulate @tooltip with the therefore
38995 // destined function calls.
38996 // RETURNS: %TRUE if @tooltip should be shown right now, %FALSE otherwise.
38997 // <x>: the x coordinate of the cursor position where the request has been emitted, relative to @widget->window
38998 // <y>: the y coordinate of the cursor position where the request has been emitted, relative to @widget->window
38999 // <keyboard_mode>: %TRUE if the tooltip was trigged using the keyboard
39000 // <tooltip>: a #GtkTooltip
39001 extern (C) alias static c_int function (Widget* this_, int x, int y, c_int keyboard_mode, Tooltip* tooltip, void* user_data=null) signal_query_tooltip;
39002 ulong signal_connect(string name:"query-tooltip", CB:signal_query_tooltip)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39003 return signal_connect_data!()(&this, cast(char*)"query-tooltip",
39004 cast(GObject2.Callback)cb, data, null, cf);
39006 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_realize;
39007 ulong signal_connect(string name:"realize", CB:signal_realize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39008 return signal_connect_data!()(&this, cast(char*)"realize",
39009 cast(GObject2.Callback)cb, data, null, cf);
39012 // The ::screen-changed signal gets emitted when the
39013 // screen of a widget has changed.
39014 // <previous_screen>: the previous screen, or %NULL if the widget was not associated with a screen before
39015 extern (C) alias static void function (Widget* this_, Gdk2.Screen* previous_screen=null, void* user_data=null) signal_screen_changed;
39016 ulong signal_connect(string name:"screen-changed", CB:signal_screen_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39017 return signal_connect_data!()(&this, cast(char*)"screen-changed",
39018 cast(GObject2.Callback)cb, data, null, cf);
39021 // The ::scroll-event signal is emitted when a button in the 4 to 7
39022 // range is pressed. Wheel mice are usually configured to generate
39023 // button press events for buttons 4 and 5 when the wheel is turned.
39024 // To receive this signal, the #GdkWindow associated to the widget needs
39025 // to enable the #GDK_BUTTON_PRESS_MASK mask.
39026 // This signal will be sent to the grab widget if there is one.
39027 // %FALSE to propagate the event further.
39028 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
39029 // <event>: the #GdkEventScroll which triggered this signal.
39030 extern (C) alias static c_int function (Widget* this_, Gdk2.EventScroll* event, void* user_data=null) signal_scroll_event;
39031 ulong signal_connect(string name:"scroll-event", CB:signal_scroll_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39032 return signal_connect_data!()(&this, cast(char*)"scroll-event",
39033 cast(GObject2.Callback)cb, data, null, cf);
39036 // The ::selection-clear-event signal will be emitted when the
39037 // the @widget's window has lost ownership of a selection.
39038 // %FALSE to propagate the event further.
39039 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
39040 // <event>: the #GdkEventSelection which triggered this signal.
39041 extern (C) alias static c_int function (Widget* this_, Gdk2.EventSelection* event, void* user_data=null) signal_selection_clear_event;
39042 ulong signal_connect(string name:"selection-clear-event", CB:signal_selection_clear_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39043 return signal_connect_data!()(&this, cast(char*)"selection-clear-event",
39044 cast(GObject2.Callback)cb, data, null, cf);
39046 extern (C) alias static void function (Widget* this_, SelectionData* object, c_uint p0, c_uint p1, void* user_data=null) signal_selection_get;
39047 ulong signal_connect(string name:"selection-get", CB:signal_selection_get)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39048 return signal_connect_data!()(&this, cast(char*)"selection-get",
39049 cast(GObject2.Callback)cb, data, null, cf);
39052 // RETURNS: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
39053 // <returns>: %TRUE to stop other handlers from being invoked for the event. %FALSE to propagate the event further.
39054 extern (C) alias static c_int function (Widget* this_, Gdk2.Event* returns, void* user_data=null) signal_selection_notify_event;
39055 ulong signal_connect(string name:"selection-notify-event", CB:signal_selection_notify_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39056 return signal_connect_data!()(&this, cast(char*)"selection-notify-event",
39057 cast(GObject2.Callback)cb, data, null, cf);
39059 extern (C) alias static void function (Widget* this_, SelectionData* object, c_uint p0, void* user_data=null) signal_selection_received;
39060 ulong signal_connect(string name:"selection-received", CB:signal_selection_received)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39061 return signal_connect_data!()(&this, cast(char*)"selection-received",
39062 cast(GObject2.Callback)cb, data, null, cf);
39065 // The ::selection-request-event signal will be emitted when
39066 // another client requests ownership of the selection owned by
39067 // the @widget's window.
39068 // %FALSE to propagate the event further.
39069 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
39070 // <event>: the #GdkEventSelection which triggered this signal.
39071 extern (C) alias static c_int function (Widget* this_, Gdk2.EventSelection* event, void* user_data=null) signal_selection_request_event;
39072 ulong signal_connect(string name:"selection-request-event", CB:signal_selection_request_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39073 return signal_connect_data!()(&this, cast(char*)"selection-request-event",
39074 cast(GObject2.Callback)cb, data, null, cf);
39076 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_show;
39077 ulong signal_connect(string name:"show", CB:signal_show)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39078 return signal_connect_data!()(&this, cast(char*)"show",
39079 cast(GObject2.Callback)cb, data, null, cf);
39081 extern (C) alias static c_int function (Widget* this_, WidgetHelpType* object, void* user_data=null) signal_show_help;
39082 ulong signal_connect(string name:"show-help", CB:signal_show_help)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39083 return signal_connect_data!()(&this, cast(char*)"show-help",
39084 cast(GObject2.Callback)cb, data, null, cf);
39086 extern (C) alias static void function (Widget* this_, Gdk2.Rectangle* object, void* user_data=null) signal_size_allocate;
39087 ulong signal_connect(string name:"size-allocate", CB:signal_size_allocate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39088 return signal_connect_data!()(&this, cast(char*)"size-allocate",
39089 cast(GObject2.Callback)cb, data, null, cf);
39091 extern (C) alias static void function (Widget* this_, Requisition* object, void* user_data=null) signal_size_request;
39092 ulong signal_connect(string name:"size-request", CB:signal_size_request)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39093 return signal_connect_data!()(&this, cast(char*)"size-request",
39094 cast(GObject2.Callback)cb, data, null, cf);
39097 // The ::state-changed signal is emitted when the widget state changes.
39098 // See gtk_widget_get_state().
39099 // <state>: the previous state
39100 extern (C) alias static void function (Widget* this_, StateType* state, void* user_data=null) signal_state_changed;
39101 ulong signal_connect(string name:"state-changed", CB:signal_state_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39102 return signal_connect_data!()(&this, cast(char*)"state-changed",
39103 cast(GObject2.Callback)cb, data, null, cf);
39106 // The ::style-set signal is emitted when a new style has been set
39107 // on a widget. Note that style-modifying functions like
39108 // gtk_widget_modify_base() also cause this signal to be emitted.
39109 // <previous_style>: the previous style, or %NULL if the widget just got its initial style
39110 extern (C) alias static void function (Widget* this_, Style* previous_style=null, void* user_data=null) signal_style_set;
39111 ulong signal_connect(string name:"style-set", CB:signal_style_set)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39112 return signal_connect_data!()(&this, cast(char*)"style-set",
39113 cast(GObject2.Callback)cb, data, null, cf);
39115 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_unmap;
39116 ulong signal_connect(string name:"unmap", CB:signal_unmap)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39117 return signal_connect_data!()(&this, cast(char*)"unmap",
39118 cast(GObject2.Callback)cb, data, null, cf);
39121 // The ::unmap-event signal will be emitted when the @widget's window is
39122 // unmapped. A window is unmapped when it becomes invisible on the screen.
39123 // To receive this signal, the #GdkWindow associated to the widget needs
39124 // to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
39125 // automatically for all new windows.
39126 // %FALSE to propagate the event further.
39127 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
39128 // <event>: the #GdkEventAny which triggered this signal
39129 extern (C) alias static c_int function (Widget* this_, Gdk2.EventAny* event, void* user_data=null) signal_unmap_event;
39130 ulong signal_connect(string name:"unmap-event", CB:signal_unmap_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39131 return signal_connect_data!()(&this, cast(char*)"unmap-event",
39132 cast(GObject2.Callback)cb, data, null, cf);
39134 extern (C) alias static void function (Widget* this_, void* user_data=null) signal_unrealize;
39135 ulong signal_connect(string name:"unrealize", CB:signal_unrealize)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39136 return signal_connect_data!()(&this, cast(char*)"unrealize",
39137 cast(GObject2.Callback)cb, data, null, cf);
39140 // The ::visibility-notify-event will be emitted when the @widget's window
39141 // is obscured or unobscured.
39142 // To receive this signal the #GdkWindow associated to the widget needs
39143 // to enable the #GDK_VISIBILITY_NOTIFY_MASK mask.
39144 // %FALSE to propagate the event further.
39145 // RETURNS: %TRUE to stop other handlers from being invoked for the event.
39146 // <event>: the #GdkEventVisibility which triggered this signal.
39147 extern (C) alias static c_int function (Widget* this_, Gdk2.EventVisibility* event, void* user_data=null) signal_visibility_notify_event;
39148 ulong signal_connect(string name:"visibility-notify-event", CB:signal_visibility_notify_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39149 return signal_connect_data!()(&this, cast(char*)"visibility-notify-event",
39150 cast(GObject2.Callback)cb, data, null, cf);
39153 // The ::window-state-event will be emitted when the state of the
39154 // toplevel window associated to the @widget changes.
39155 // To receive this signal the #GdkWindow associated to the widget
39156 // needs to enable the #GDK_STRUCTURE_MASK mask. GDK will enable
39157 // this mask automatically for all new windows.
39158 // event. %FALSE to propagate the event further.
39159 // RETURNS: %TRUE to stop other handlers from being invoked for the
39160 // <event>: the #GdkEventWindowState which triggered this signal.
39161 extern (C) alias static c_int function (Widget* this_, Gdk2.EventWindowState* event, void* user_data=null) signal_window_state_event;
39162 ulong signal_connect(string name:"window-state-event", CB:signal_window_state_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
39163 return signal_connect_data!()(&this, cast(char*)"window-state-event",
39164 cast(GObject2.Callback)cb, data, null, cf);
39168 struct WidgetAuxInfo {
39169 int x, y, width, height;
39170 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
39171 uint, "x_set", 1,
39172 uint, "y_set", 1,
39173 uint, "__dummy32A", 30));
39177 // <structfield>activate_signal</structfield>
39178 // The signal to emit when a widget of this class is activated,
39179 // gtk_widget_activate() handles the emission. Implementation of this
39180 // signal is optional.
39181 // <structfield>set_scroll_adjustment_signal</structfield>
39182 // This signal is emitted when a widget of this class is added
39183 // to a scrolling aware parent, gtk_widget_set_scroll_adjustments()
39184 // handles the emission.
39185 // Implementation of this signal is optional.
39186 struct WidgetClass {
39187 ObjectClass parent_class;
39188 uint activate_signal, set_scroll_adjustments_signal;
39189 extern (C) void function (Widget* widget, uint n_pspecs, GObject2.ParamSpec** pspecs) dispatch_child_properties_changed;
39190 extern (C) void function (Widget* widget) show;
39191 extern (C) void function (Widget* widget) show_all;
39192 extern (C) void function (Widget* widget) hide;
39193 extern (C) void function (Widget* widget) hide_all;
39194 extern (C) void function (Widget* widget) map;
39195 extern (C) void function (Widget* widget) unmap;
39196 extern (C) void function (Widget* widget) realize;
39197 extern (C) void function (Widget* widget) unrealize;
39198 // <requisition>: a #GtkRequisition to be filled in
39199 extern (C) void function (Widget* widget, Requisition* requisition) size_request;
39200 // <allocation>: position and size to be allocated to @widget
39201 extern (C) void function (Widget* widget, Allocation* allocation) size_allocate;
39202 extern (C) void function (Widget* widget, StateType previous_state) state_changed;
39203 extern (C) void function (Widget* widget, Widget* previous_parent) parent_set;
39204 extern (C) void function (Widget* widget, Widget* previous_toplevel) hierarchy_changed;
39205 extern (C) void function (Widget* widget, Style* previous_style) style_set;
39206 extern (C) void function (Widget* widget, TextDirection previous_direction) direction_changed;
39207 extern (C) void function (Widget* widget, int was_grabbed) grab_notify;
39208 extern (C) void function (Widget* widget, GObject2.ParamSpec* pspec) child_notify;
39210 // RETURNS: %TRUE if the signal has been handled
39211 // <group_cycling>: %TRUE if there are other widgets with the same mnemonic
39212 extern (C) int function (Widget* widget, int group_cycling) mnemonic_activate;
39213 extern (C) void function (Widget* widget) grab_focus;
39214 extern (C) int function (Widget* widget, DirectionType direction) focus;
39216 // RETURNS: return from the event signal emission (%TRUE if
39217 // <event>: a #GdkEvent
39218 extern (C) int function (Widget* widget, Gdk2.Event* event) event;
39219 extern (C) int function (Widget* widget, Gdk2.EventButton* event) button_press_event;
39220 extern (C) int function (Widget* widget, Gdk2.EventButton* event) button_release_event;
39221 extern (C) int function (Widget* widget, Gdk2.EventScroll* event) scroll_event;
39222 extern (C) int function (Widget* widget, Gdk2.EventMotion* event) motion_notify_event;
39223 extern (C) int function (Widget* widget, Gdk2.EventAny* event) delete_event;
39224 extern (C) int function (Widget* widget, Gdk2.EventAny* event) destroy_event;
39225 extern (C) int function (Widget* widget, Gdk2.EventExpose* event) expose_event;
39226 extern (C) int function (Widget* widget, Gdk2.EventKey* event) key_press_event;
39227 extern (C) int function (Widget* widget, Gdk2.EventKey* event) key_release_event;
39228 extern (C) int function (Widget* widget, Gdk2.EventCrossing* event) enter_notify_event;
39229 extern (C) int function (Widget* widget, Gdk2.EventCrossing* event) leave_notify_event;
39230 extern (C) int function (Widget* widget, Gdk2.EventConfigure* event) configure_event;
39231 extern (C) int function (Widget* widget, Gdk2.EventFocus* event) focus_in_event;
39232 extern (C) int function (Widget* widget, Gdk2.EventFocus* event) focus_out_event;
39233 extern (C) int function (Widget* widget, Gdk2.EventAny* event) map_event;
39234 extern (C) int function (Widget* widget, Gdk2.EventAny* event) unmap_event;
39235 extern (C) int function (Widget* widget, Gdk2.EventProperty* event) property_notify_event;
39236 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) selection_clear_event;
39237 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) selection_request_event;
39238 extern (C) int function (Widget* widget, Gdk2.EventSelection* event) selection_notify_event;
39239 extern (C) int function (Widget* widget, Gdk2.EventProximity* event) proximity_in_event;
39240 extern (C) int function (Widget* widget, Gdk2.EventProximity* event) proximity_out_event;
39241 extern (C) int function (Widget* widget, Gdk2.EventVisibility* event) visibility_notify_event;
39242 extern (C) int function (Widget* widget, Gdk2.EventClient* event) client_event;
39243 extern (C) int function (Widget* widget, Gdk2.EventAny* event) no_expose_event;
39244 extern (C) int function (Widget* widget, Gdk2.EventWindowState* event) window_state_event;
39245 extern (C) void function (Widget* widget, SelectionData* selection_data, uint info, uint time_) selection_get;
39246 extern (C) void function (Widget* widget, SelectionData* selection_data, uint time_) selection_received;
39247 extern (C) void function (Widget* widget, Gdk2.DragContext* context) drag_begin;
39248 extern (C) void function (Widget* widget, Gdk2.DragContext* context) drag_end;
39249 extern (C) void function (Widget* widget, Gdk2.DragContext* context, SelectionData* selection_data, uint info, uint time_) drag_data_get;
39250 extern (C) void function (Widget* widget, Gdk2.DragContext* context) drag_data_delete;
39251 extern (C) void function (Widget* widget, Gdk2.DragContext* context, uint time_) drag_leave;
39252 extern (C) int function (Widget* widget, Gdk2.DragContext* context, int x, int y, uint time_) drag_motion;
39253 extern (C) int function (Widget* widget, Gdk2.DragContext* context, int x, int y, uint time_) drag_drop;
39254 extern (C) void function (Widget* widget, Gdk2.DragContext* context, int x, int y, SelectionData* selection_data, uint info, uint time_) drag_data_received;
39255 extern (C) int function (Widget* widget) popup_menu;
39256 extern (C) int function (Widget* widget, WidgetHelpType help_type) show_help;
39257 // RETURNS: the #AtkObject associated with @widget
39258 extern (C) Atk.Object* function (Widget* widget) get_accessible;
39259 extern (C) void function (Widget* widget, Gdk2.Screen* previous_screen) screen_changed;
39261 // RETURNS: %TRUE if the accelerator can be activated.
39262 // <signal_id>: the ID of a signal installed on @widget
39263 extern (C) int function (Widget* widget, uint signal_id) can_activate_accel;
39264 extern (C) int function (Widget* widget, Gdk2.EventGrabBroken* event) grab_broken_event;
39265 extern (C) void function (Widget* widget) composited_changed;
39266 extern (C) int function (Widget* widget, int x, int y, int keyboard_tooltip, Tooltip* tooltip) query_tooltip;
39267 extern (C) void function () _gtk_reserved5;
39268 extern (C) void function () _gtk_reserved6;
39269 extern (C) void function () _gtk_reserved7;
39272 // VERSION: 2.2
39273 // Finds a style property of a widget class by name.
39274 // RETURNS: the #GParamSpec of the style property or %NULL if @class has no style property with that name.
39275 // <property_name>: the name of the style property to find
39276 GObject2.ParamSpec* find_style_property()(char* property_name) {
39277 return gtk_widget_class_find_style_property(&this, property_name);
39280 // Installs a style property on a widget class. The parser for the
39281 // style property is determined by the value type of @pspec.
39282 // <pspec>: the #GParamSpec for the property
39283 void install_style_property()(GObject2.ParamSpec* pspec) {
39284 gtk_widget_class_install_style_property(&this, pspec);
39287 // Unintrospectable method: install_style_property_parser() / gtk_widget_class_install_style_property_parser()
39288 // Installs a style property on a widget class.
39289 // <pspec>: the #GParamSpec for the style property
39290 // <parser>: the parser for the style property
39291 void install_style_property_parser()(GObject2.ParamSpec* pspec, RcPropertyParser parser) {
39292 gtk_widget_class_install_style_property_parser(&this, pspec, parser);
39295 // VERSION: 2.2
39296 // Returns all style properties of a widget class.
39297 // RETURNS: an newly allocated array of #GParamSpec*. The array must be freed with g_free().
39298 // <n_properties>: location to return the number of style properties found
39299 GObject2.ParamSpec** /*new container*/ list_style_properties()(/*out*/ uint* n_properties) {
39300 return gtk_widget_class_list_style_properties(&this, n_properties);
39304 // Tells about certain properties of the widget.
39305 enum WidgetFlags {
39306 TOPLEVEL = 16,
39307 NO_WINDOW = 32,
39308 REALIZED = 64,
39309 MAPPED = 128,
39310 VISIBLE = 256,
39311 SENSITIVE = 512,
39312 PARENT_SENSITIVE = 1024,
39313 CAN_FOCUS = 2048,
39314 HAS_FOCUS = 4096,
39315 CAN_DEFAULT = 8192,
39316 HAS_DEFAULT = 16384,
39317 HAS_GRAB = 32768,
39318 RC_STYLE = 65536,
39319 COMPOSITE_CHILD = 131072,
39320 NO_REPARENT = 262144,
39321 APP_PAINTABLE = 524288,
39322 RECEIVES_DEFAULT = 1048576,
39323 DOUBLE_BUFFERED = 2097152,
39324 NO_SHOW_ALL = 4194304
39326 enum WidgetHelpType {
39327 TOOLTIP = 0,
39328 WHATS_THIS = 1
39330 struct WidgetShapeInfo {
39331 short offset_x, offset_y;
39332 Gdk2.Bitmap* shape_mask;
39335 struct Window /* : Bin */ {
39336 mixin Atk.ImplementorIface.__interface__;
39337 mixin Buildable.__interface__;
39338 alias bin this;
39339 alias bin super_;
39340 Bin bin;
39341 char* title, wmclass_name, wmclass_class, wm_role;
39342 Widget* focus_widget, default_widget;
39343 Window* transient_parent;
39344 WindowGeometryInfo* geometry_info;
39345 Gdk2.Window* frame;
39346 WindowGroup* group;
39347 ushort configure_request_count;
39348 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
39349 uint, "allow_shrink", 1,
39350 uint, "allow_grow", 1,
39351 uint, "configure_notify_received", 1,
39352 uint, "need_default_position", 1,
39353 uint, "need_default_size", 1,
39354 uint, "position", 3,
39355 uint, "type", 4,
39356 uint, "has_user_ref_count", 1,
39357 uint, "has_focus", 1,
39358 uint, "modal", 1,
39359 uint, "destroy_with_parent", 1,
39360 uint, "has_frame", 1,
39361 uint, "iconify_initially", 1,
39362 uint, "stick_initially", 1,
39363 uint, "maximize_initially", 1,
39364 uint, "decorated", 1,
39365 uint, "type_hint", 3,
39366 uint, "gravity", 5,
39367 uint, "is_active_", 1,
39368 uint, "has_toplevel_focus_", 1,
39369 uint, "__dummy32A", 1));
39370 uint frame_left, frame_top, frame_right, frame_bottom, keys_changed_handler;
39371 Gdk2.ModifierType mnemonic_modifier;
39372 Gdk2.Screen* screen;
39375 // Creates a new #GtkWindow, which is a toplevel window that can
39376 // contain other widgets. Nearly always, the type of the window should
39377 // be #GTK_WINDOW_TOPLEVEL. If you're implementing something like a
39378 // popup menu from scratch (which is a bad idea, just use #GtkMenu),
39379 // you might use #GTK_WINDOW_POPUP. #GTK_WINDOW_POPUP is not for
39380 // dialogs, though in some other toolkits dialogs are called "popups".
39381 // In GTK+, #GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip.
39382 // On X11, popup windows are not controlled by the <link
39383 // linkend="gtk-X11-arch">window manager</link>.
39384 // If you simply want an undecorated window (no window borders), use
39385 // gtk_window_set_decorated(), don't use #GTK_WINDOW_POPUP.
39386 // RETURNS: a new #GtkWindow.
39387 // <type>: type of window
39388 static Window* new_()(WindowType type) {
39389 return gtk_window_new(type);
39392 // Gets the value set by gtk_window_set_default_icon_list().
39393 // The list is a copy and should be freed with g_list_free(),
39394 // but the pixbufs in the list have not had their reference count
39395 // incremented.
39396 // RETURNS: copy of default icon list
39397 static GLib2.List* /*new container*/ get_default_icon_list()() {
39398 return gtk_window_get_default_icon_list();
39401 // VERSION: 2.16
39402 // Returns the fallback icon name for windows that has been set
39403 // with gtk_window_set_default_icon_name(). The returned
39404 // string is owned by GTK+ and should not be modified. It
39405 // is only valid until the next call to
39406 // gtk_window_set_default_icon_name().
39407 // RETURNS: the fallback icon name for windows
39408 static char* get_default_icon_name()() {
39409 return gtk_window_get_default_icon_name();
39412 // Returns a list of all existing toplevel windows. The widgets
39413 // in the list are not individually referenced. If you want
39414 // to iterate through the list and perform actions involving
39415 // callbacks that might destroy the widgets, you <emphasis>must</emphasis> call
39416 // <literal>g_list_foreach (result, (GFunc)g_object_ref, NULL)</literal> first, and
39417 // then unref all the widgets afterwards.
39418 // RETURNS: list of toplevel widgets
39419 static GLib2.List* /*new container*/ list_toplevels()() {
39420 return gtk_window_list_toplevels();
39423 // VERSION: 2.2
39424 // By default, after showing the first #GtkWindow, GTK+ calls
39425 // gdk_notify_startup_complete(). Call this function to disable
39426 // the automatic startup notification. You might do this if your
39427 // first window is a splash screen, and you want to delay notification
39428 // until after your real main window has been shown, for example.
39429 // In that example, you would disable startup notification
39430 // temporarily, show your splash screen, then re-enable it so that
39431 // showing the main window would automatically result in notification.
39432 // <setting>: %TRUE to automatically do startup notification
39433 static void set_auto_startup_notification()(int setting) {
39434 gtk_window_set_auto_startup_notification(setting);
39437 // VERSION: 2.4
39438 // Sets an icon to be used as fallback for windows that haven't
39439 // had gtk_window_set_icon() called on them from a pixbuf.
39440 // <icon>: the icon
39441 static void set_default_icon()(GdkPixbuf2.Pixbuf* icon) {
39442 gtk_window_set_default_icon(icon);
39445 // VERSION: 2.2
39446 // Sets an icon to be used as fallback for windows that haven't
39447 // had gtk_window_set_icon_list() called on them from a file
39448 // on disk. Warns on failure if @err is %NULL.
39449 // RETURNS: %TRUE if setting the icon succeeded.
39450 // <filename>: location of icon file
39451 static int set_default_icon_from_file()(char* filename, GLib2.Error** error=null) {
39452 return gtk_window_set_default_icon_from_file(filename, error);
39455 // Sets an icon list to be used as fallback for windows that haven't
39456 // had gtk_window_set_icon_list() called on them to set up a
39457 // window-specific icon list. This function allows you to set up the
39458 // icon for all windows in your app at once.
39459 // See gtk_window_set_icon_list() for more details.
39460 // <list>: a list of #GdkPixbuf
39461 static void set_default_icon_list()(GLib2.List* list) {
39462 gtk_window_set_default_icon_list(list);
39465 // VERSION: 2.6
39466 // Sets an icon to be used as fallback for windows that haven't
39467 // had gtk_window_set_icon_list() called on them from a named
39468 // themed icon, see gtk_window_set_icon_name().
39469 // <name>: the name of the themed icon
39470 static void set_default_icon_name()(char* name) {
39471 gtk_window_set_default_icon_name(name);
39474 // Activates the default widget for the window, unless the current
39475 // focused widget has been configured to receive the default action
39476 // (see gtk_widget_set_receives_default()), in which case the
39477 // focused widget is activated.
39478 // RETURNS: %TRUE if a widget got activated.
39479 int activate_default()() {
39480 return gtk_window_activate_default(&this);
39483 // Activates the current focused widget within the window.
39484 // RETURNS: %TRUE if a widget got activated.
39485 int activate_focus()() {
39486 return gtk_window_activate_focus(&this);
39489 // VERSION: 2.4
39490 // Activates mnemonics and accelerators for this #GtkWindow. This is normally
39491 // called by the default ::key_press_event handler for toplevel windows,
39492 // however in some cases it may be useful to call this directly when
39493 // overriding the standard key handling for a toplevel window.
39494 // RETURNS: %TRUE if a mnemonic or accelerator was found and activated.
39495 // <event>: a #GdkEventKey
39496 int activate_key()(Gdk2.EventKey* event) {
39497 return gtk_window_activate_key(&this, event);
39500 // Associate @accel_group with @window, such that calling
39501 // gtk_accel_groups_activate() on @window will activate accelerators
39502 // in @accel_group.
39503 // <accel_group>: a #GtkAccelGroup
39504 void add_accel_group()(AccelGroup* accel_group) {
39505 gtk_window_add_accel_group(&this, accel_group);
39507 void add_embedded_xid()(Gdk2.NativeWindow xid) {
39508 gtk_window_add_embedded_xid(&this, xid);
39511 // Adds a mnemonic to this window.
39512 // <keyval>: the mnemonic
39513 // <target>: the widget that gets activated by the mnemonic
39514 void add_mnemonic()(uint keyval, Widget* target) {
39515 gtk_window_add_mnemonic(&this, keyval, target);
39518 // Starts moving a window. This function is used if an application has
39519 // window movement grips. When GDK can support it, the window movement
39520 // will be done using the standard mechanism for the <link
39521 // linkend="gtk-X11-arch">window manager</link> or windowing
39522 // system. Otherwise, GDK will try to emulate window movement,
39523 // potentially not all that well, depending on the windowing system.
39524 // <button>: mouse button that initiated the drag
39525 // <root_x>: X position where the user clicked to initiate the drag, in root window coordinates
39526 // <root_y>: Y position where the user clicked to initiate the drag
39527 // <timestamp>: timestamp from the click event that initiated the drag
39528 void begin_move_drag()(int button, int root_x, int root_y, uint timestamp) {
39529 gtk_window_begin_move_drag(&this, button, root_x, root_y, timestamp);
39532 // Starts resizing a window. This function is used if an application
39533 // has window resizing controls. When GDK can support it, the resize
39534 // will be done using the standard mechanism for the <link
39535 // linkend="gtk-X11-arch">window manager</link> or windowing
39536 // system. Otherwise, GDK will try to emulate window resizing,
39537 // potentially not all that well, depending on the windowing system.
39538 // <edge>: position of the resize control
39539 // <button>: mouse button that initiated the drag
39540 // <root_x>: X position where the user clicked to initiate the drag, in root window coordinates
39541 // <root_y>: Y position where the user clicked to initiate the drag
39542 // <timestamp>: timestamp from the click event that initiated the drag
39543 void begin_resize_drag()(Gdk2.WindowEdge edge, int button, int root_x, int root_y, uint timestamp) {
39544 gtk_window_begin_resize_drag(&this, edge, button, root_x, root_y, timestamp);
39547 // Asks to deiconify (i.e. unminimize) the specified @window. Note
39548 // that you shouldn't assume the window is definitely deiconified
39549 // afterward, because other entities (e.g. the user or <link
39550 // linkend="gtk-X11-arch">window manager</link>) could iconify it
39551 // again before your code which assumes deiconification gets to run.
39552 // You can track iconification via the "window-state-event" signal
39553 // on #GtkWidget.
39554 void deiconify()() {
39555 gtk_window_deiconify(&this);
39558 // VERSION: 2.2
39559 // Asks to place @window in the fullscreen state. Note that you
39560 // shouldn't assume the window is definitely full screen afterward,
39561 // because other entities (e.g. the user or <link
39562 // linkend="gtk-X11-arch">window manager</link>) could unfullscreen it
39563 // again, and not all window managers honor requests to fullscreen
39564 // windows. But normally the window will end up fullscreen. Just
39565 // don't write code that crashes if not.
39566 // You can track the fullscreen state via the "window-state-event" signal
39567 // on #GtkWidget.
39568 void fullscreen()() {
39569 gtk_window_fullscreen(&this);
39572 // VERSION: 2.4
39573 // Gets the value set by gtk_window_set_accept_focus().
39574 // RETURNS: %TRUE if window should receive the input focus
39575 int get_accept_focus()() {
39576 return gtk_window_get_accept_focus(&this);
39579 // Returns whether the window has been set to have decorations
39580 // such as a title bar via gtk_window_set_decorated().
39581 // RETURNS: %TRUE if the window has been set to have decorations
39582 int get_decorated()() {
39583 return gtk_window_get_decorated(&this);
39586 // Gets the default size of the window. A value of -1 for the width or
39587 // height indicates that a default size has not been explicitly set
39588 // for that dimension, so the "natural" size of the window will be
39589 // used.
39590 // <width>: location to store the default width, or %NULL
39591 // <height>: location to store the default height, or %NULL
39592 void get_default_size()(int* width=null, int* height=null) {
39593 gtk_window_get_default_size(&this, width, height);
39596 // VERSION: 2.14
39597 // Returns the default widget for @window. See gtk_window_set_default()
39598 // for more details.
39599 // RETURNS: the default widget, or %NULL if there is none.
39600 Widget* get_default_widget()() {
39601 return gtk_window_get_default_widget(&this);
39604 // VERSION: 2.10
39605 // Returns whether the window has been set to have a close button
39606 // via gtk_window_set_deletable().
39607 // RETURNS: %TRUE if the window has been set to have a close button
39608 int get_deletable()() {
39609 return gtk_window_get_deletable(&this);
39612 // Returns whether the window will be destroyed with its transient parent. See
39613 // gtk_window_set_destroy_with_parent ().
39614 // RETURNS: %TRUE if the window will be destroyed with its transient parent.
39615 int get_destroy_with_parent()() {
39616 return gtk_window_get_destroy_with_parent(&this);
39619 // Retrieves the current focused widget within the window.
39620 // Note that this is the widget that would have the focus
39621 // if the toplevel window focused; if the toplevel window
39622 // is not focused then <literal>gtk_widget_has_focus (widget)</literal> will
39623 // not be %TRUE for the widget.
39624 // RETURNS: the currently focused widget, or %NULL if there is none.
39625 Widget* get_focus()() {
39626 return gtk_window_get_focus(&this);
39629 // VERSION: 2.6
39630 // Gets the value set by gtk_window_set_focus_on_map().
39631 // mapped.
39632 // RETURNS: %TRUE if window should receive the input focus when
39633 int get_focus_on_map()() {
39634 return gtk_window_get_focus_on_map(&this);
39637 // DEPRECATED (v2.24) method: get_frame_dimensions - This function will be removed in GTK+ 3
39638 // (Note: this is a special-purpose function intended for the
39639 // framebuffer port; see gtk_window_set_has_frame(). It will not
39640 // return the size of the window border drawn by the <link
39641 // linkend="gtk-X11-arch">window manager</link>, which is the normal
39642 // case when using a windowing system. See
39643 // gdk_window_get_frame_extents() to get the standard window border
39644 // extents.)
39645 // Retrieves the dimensions of the frame window for this toplevel.
39646 // See gtk_window_set_has_frame(), gtk_window_set_frame_dimensions().
39647 // <left>: location to store the width of the frame at the left, or %NULL
39648 // <top>: location to store the height of the frame at the top, or %NULL
39649 // <right>: location to store the width of the frame at the returns, or %NULL
39650 // <bottom>: location to store the height of the frame at the bottom, or %NULL
39651 void get_frame_dimensions()(/*out*/ int* left=null, /*out*/ int* top=null, /*out*/ int* right=null, /*out*/ int* bottom=null) {
39652 gtk_window_get_frame_dimensions(&this, left, top, right, bottom);
39655 // Gets the value set by gtk_window_set_gravity().
39656 // RETURNS: window gravity
39657 Gdk2.Gravity get_gravity()() {
39658 return gtk_window_get_gravity(&this);
39661 // VERSION: 2.10
39662 // Returns the group for @window or the default group, if
39663 // window group.
39664 // RETURNS: the #GtkWindowGroup for a window or the default group
39665 WindowGroup* get_group()() {
39666 return gtk_window_get_group(&this);
39669 // DEPRECATED (v2.24) method: get_has_frame - This function will be removed in GTK+ 3
39670 // Accessor for whether the window has a frame window exterior to
39671 // via gtk_window_set_has_frame().
39672 // RETURNS: %TRUE if a frame has been added to the window
39673 int get_has_frame()() {
39674 return gtk_window_get_has_frame(&this);
39677 // Gets the value set by gtk_window_set_icon() (or if you've
39678 // called gtk_window_set_icon_list(), gets the first icon in
39679 // the icon list).
39680 // RETURNS: icon for window
39681 GdkPixbuf2.Pixbuf* get_icon()() {
39682 return gtk_window_get_icon(&this);
39685 // Retrieves the list of icons set by gtk_window_set_icon_list().
39686 // The list is copied, but the reference count on each
39687 // member won't be incremented.
39688 // RETURNS: copy of window's icon list
39689 GLib2.List* /*new container*/ get_icon_list()() {
39690 return gtk_window_get_icon_list(&this);
39693 // VERSION: 2.6
39694 // Returns the name of the themed icon for the window,
39695 // see gtk_window_set_icon_name().
39696 // no themed icon
39697 // RETURNS: the icon name or %NULL if the window has
39698 char* get_icon_name()() {
39699 return gtk_window_get_icon_name(&this);
39702 // Returns the mnemonic modifier for this window. See
39703 // gtk_window_set_mnemonic_modifier().
39704 // mnemonics on this window.
39705 // RETURNS: the modifier mask used to activate
39706 Gdk2.ModifierType get_mnemonic_modifier()() {
39707 return gtk_window_get_mnemonic_modifier(&this);
39709 int get_mnemonics_visible()() {
39710 return gtk_window_get_mnemonics_visible(&this);
39713 // Returns whether the window is modal. See gtk_window_set_modal().
39714 // establishes a grab when shown
39715 // RETURNS: %TRUE if the window is set to be modal and
39716 int get_modal()() {
39717 return gtk_window_get_modal(&this);
39720 // VERSION: 2.12
39721 // Fetches the requested opacity for this window. See
39722 // gtk_window_set_opacity().
39723 // RETURNS: the requested opacity for this window.
39724 double get_opacity()() {
39725 return gtk_window_get_opacity(&this);
39728 // This function returns the position you need to pass to
39729 // gtk_window_move() to keep @window in its current position. This
39730 // means that the meaning of the returned value varies with window
39731 // gravity. See gtk_window_move() for more details.
39732 // If you haven't changed the window gravity, its gravity will be
39733 // #GDK_GRAVITY_NORTH_WEST. This means that gtk_window_get_position()
39734 // gets the position of the top-left corner of the window manager
39735 // frame for the window. gtk_window_move() sets the position of this
39736 // same top-left corner.
39737 // gtk_window_get_position() is not 100% reliable because the X Window System
39738 // does not specify a way to obtain the geometry of the
39739 // decorations placed on a window by the window manager.
39740 // Thus GTK+ is using a "best guess" that works with most
39741 // window managers.
39742 // Moreover, nearly all window managers are historically broken with
39743 // respect to their handling of window gravity. So moving a window to
39744 // its current position as returned by gtk_window_get_position() tends
39745 // to result in moving the window slightly. Window managers are
39746 // slowly getting better over time.
39747 // If a window has gravity #GDK_GRAVITY_STATIC the window manager
39748 // frame is not relevant, and thus gtk_window_get_position() will
39749 // always produce accurate results. However you can't use static
39750 // gravity to do things like place a window in a corner of the screen,
39751 // because static gravity ignores the window manager decorations.
39752 // If you are saving and restoring your application's window
39753 // positions, you should know that it's impossible for applications to
39754 // do this without getting it somewhat wrong because applications do
39755 // not have sufficient knowledge of window manager state. The Correct
39756 // Mechanism is to support the session management protocol (see the
39757 // "GnomeClient" object in the GNOME libraries for example) and allow
39758 // the window manager to save your window sizes and positions.
39759 // <root_x>: return location for X coordinate of gravity-determined reference point
39760 // <root_y>: return location for Y coordinate of gravity-determined reference point
39761 void get_position()(/*out*/ int* root_x=null, /*out*/ int* root_y=null) {
39762 gtk_window_get_position(&this, root_x, root_y);
39765 // Gets the value set by gtk_window_set_resizable().
39766 // RETURNS: %TRUE if the user can resize the window
39767 int get_resizable()() {
39768 return gtk_window_get_resizable(&this);
39771 // Returns the role of the window. See gtk_window_set_role() for
39772 // further explanation.
39773 // returned is owned by the widget and must not be modified
39774 // or freed.
39775 // RETURNS: the role of the window if set, or %NULL. The
39776 char* get_role()() {
39777 return gtk_window_get_role(&this);
39780 // VERSION: 2.2
39781 // Returns the #GdkScreen associated with @window.
39782 // RETURNS: a #GdkScreen.
39783 Gdk2.Screen* get_screen()() {
39784 return gtk_window_get_screen(&this);
39787 // Obtains the current size of @window. If @window is not onscreen,
39788 // it returns the size GTK+ will suggest to the <link
39789 // linkend="gtk-X11-arch">window manager</link> for the initial window
39790 // size (but this is not reliably the same as the size the window
39791 // manager will actually select). The size obtained by
39792 // gtk_window_get_size() is the last size received in a
39793 // #GdkEventConfigure, that is, GTK+ uses its locally-stored size,
39794 // rather than querying the X server for the size. As a result, if you
39795 // call gtk_window_resize() then immediately call
39796 // gtk_window_get_size(), the size won't have taken effect yet. After
39797 // the window manager processes the resize request, GTK+ receives
39798 // notification that the size has changed via a configure event, and
39799 // the size of the window gets updated.
39800 // because the size of the window may change between the time that you
39801 // get the size and the time that you perform some action assuming
39802 // that size is the current size. To avoid race conditions, connect to
39803 // "configure-event" on the window and adjust your size-dependent
39804 // state to match the size delivered in the #GdkEventConfigure.
39805 // size of the window manager decorations (aka the window frame or
39806 // border). Those are not drawn by GTK+ and GTK+ has no reliable
39807 // method of determining their size.
39808 // the window onscreen, there may be a better way. The preferred
39809 // way is to simply set the window's semantic type with
39810 // gtk_window_set_type_hint(), which allows the window manager to
39811 // e.g. center dialogs. Also, if you set the transient parent of
39812 // dialogs with gtk_window_set_transient_for() window managers
39813 // will often center the dialog over its parent window. It's
39814 // much preferred to let the window manager handle these
39815 // things rather than doing it yourself, because all apps will
39816 // behave consistently and according to user prefs if the window
39817 // manager handles it. Also, the window manager can take the size
39818 // of the window decorations/border into account, while your
39819 // application cannot.
39820 // In any case, if you insist on application-specified window
39821 // positioning, there's <emphasis>still</emphasis> a better way than
39822 // doing it yourself - gtk_window_set_position() will frequently
39823 // handle the details for you.
39824 // <width>: return location for width, or %NULL
39825 // <height>: return location for height, or %NULL
39826 void get_size()(/*out*/ int* width=null, /*out*/ int* height=null) {
39827 gtk_window_get_size(&this, width, height);
39830 // VERSION: 2.2
39831 // Gets the value set by gtk_window_set_skip_pager_hint().
39832 // RETURNS: %TRUE if window shouldn't be in pager
39833 int get_skip_pager_hint()() {
39834 return gtk_window_get_skip_pager_hint(&this);
39837 // VERSION: 2.2
39838 // Gets the value set by gtk_window_set_skip_taskbar_hint()
39839 // RETURNS: %TRUE if window shouldn't be in taskbar
39840 int get_skip_taskbar_hint()() {
39841 return gtk_window_get_skip_taskbar_hint(&this);
39844 // Retrieves the title of the window. See gtk_window_set_title().
39845 // been set explicitely. The returned string is owned by the widget
39846 // and must not be modified or freed.
39847 // RETURNS: the title of the window, or %NULL if none has
39848 char* get_title()() {
39849 return gtk_window_get_title(&this);
39852 // Fetches the transient parent for this window. See
39853 // gtk_window_set_transient_for().
39854 // if no transient parent has been set.
39855 // RETURNS: the transient parent for this window, or %NULL
39856 Window* get_transient_for()() {
39857 return gtk_window_get_transient_for(&this);
39860 // Gets the type hint for this window. See gtk_window_set_type_hint().
39861 // RETURNS: the type hint for @window.
39862 Gdk2.WindowTypeHint get_type_hint()() {
39863 return gtk_window_get_type_hint(&this);
39866 // VERSION: 2.8
39867 // Gets the value set by gtk_window_set_urgency_hint()
39868 // RETURNS: %TRUE if window is urgent
39869 int get_urgency_hint()() {
39870 return gtk_window_get_urgency_hint(&this);
39873 // VERSION: 2.20
39874 // Gets the type of the window. See #GtkWindowType.
39875 // RETURNS: the type of the window
39876 WindowType get_window_type()() {
39877 return gtk_window_get_window_type(&this);
39880 // Returns whether @window has an explicit window group.
39881 // Since 2.22
39882 // RETURNS: %TRUE if @window has an explicit window group.
39883 int has_group()() {
39884 return gtk_window_has_group(&this);
39887 // VERSION: 2.4
39888 // Returns whether the input focus is within this GtkWindow.
39889 // For real toplevel windows, this is identical to gtk_window_is_active(),
39890 // but for embedded windows, like #GtkPlug, the results will differ.
39891 // RETURNS: %TRUE if the input focus is within this GtkWindow
39892 int has_toplevel_focus()() {
39893 return gtk_window_has_toplevel_focus(&this);
39896 // Asks to iconify (i.e. minimize) the specified @window. Note that
39897 // you shouldn't assume the window is definitely iconified afterward,
39898 // because other entities (e.g. the user or <link
39899 // linkend="gtk-X11-arch">window manager</link>) could deiconify it
39900 // again, or there may not be a window manager in which case
39901 // iconification isn't possible, etc. But normally the window will end
39902 // up iconified. Just don't write code that crashes if not.
39903 // It's permitted to call this function before showing a window,
39904 // in which case the window will be iconified before it ever appears
39905 // onscreen.
39906 // You can track iconification via the "window-state-event" signal
39907 // on #GtkWidget.
39908 void iconify()() {
39909 gtk_window_iconify(&this);
39912 // VERSION: 2.4
39913 // Returns whether the window is part of the current active toplevel.
39914 // (That is, the toplevel window receiving keystrokes.)
39915 // The return value is %TRUE if the window is active toplevel
39916 // itself, but also if it is, say, a #GtkPlug embedded in the active toplevel.
39917 // You might use this function if you wanted to draw a widget
39918 // differently in an active window from a widget in an inactive window.
39919 // See gtk_window_has_toplevel_focus()
39920 // RETURNS: %TRUE if the window part of the current active window.
39921 int is_active()() {
39922 return gtk_window_is_active(&this);
39925 // Asks to maximize @window, so that it becomes full-screen. Note that
39926 // you shouldn't assume the window is definitely maximized afterward,
39927 // because other entities (e.g. the user or <link
39928 // linkend="gtk-X11-arch">window manager</link>) could unmaximize it
39929 // again, and not all window managers support maximization. But
39930 // normally the window will end up maximized. Just don't write code
39931 // that crashes if not.
39932 // It's permitted to call this function before showing a window,
39933 // in which case the window will be maximized when it appears onscreen
39934 // initially.
39935 // You can track maximization via the "window-state-event" signal
39936 // on #GtkWidget.
39937 void maximize()() {
39938 gtk_window_maximize(&this);
39941 // Activates the targets associated with the mnemonic.
39942 // RETURNS: %TRUE if the activation is done.
39943 // <keyval>: the mnemonic
39944 // <modifier>: the modifiers
39945 int mnemonic_activate()(uint keyval, Gdk2.ModifierType modifier) {
39946 return gtk_window_mnemonic_activate(&this, keyval, modifier);
39949 // Asks the <link linkend="gtk-X11-arch">window manager</link> to move
39950 // this; most window managers ignore requests for initial window
39951 // positions (instead using a user-defined placement algorithm) and
39952 // honor requests after the window has already been shown.
39953 // reference point for the window. The gravity determines two things:
39954 // first, the location of the reference point in root window
39955 // coordinates; and second, which point on the window is positioned at
39956 // the reference point.
39957 // By default the gravity is #GDK_GRAVITY_NORTH_WEST, so the reference
39958 // point is simply the @x, @y supplied to gtk_window_move(). The
39959 // top-left corner of the window decorations (aka window frame or
39960 // border) will be placed at @x, @y. Therefore, to position a window
39961 // at the top left of the screen, you want to use the default gravity
39962 // (which is #GDK_GRAVITY_NORTH_WEST) and move the window to 0,0.
39963 // To position a window at the bottom right corner of the screen, you
39964 // would set #GDK_GRAVITY_SOUTH_EAST, which means that the reference
39965 // point is at @x + the window width and @y + the window height, and
39966 // the bottom-right corner of the window border will be placed at that
39967 // reference point. So, to place a window in the bottom right corner
39968 // you would first set gravity to south east, then write:
39969 // <literal>gtk_window_move (window, gdk_screen_width () - window_width,
39970 // gdk_screen_height () - window_height)</literal> (note that this
39971 // example does not take multi-head scenarios into account).
39972 // The Extended Window Manager Hints specification at <ulink
39973 // url="http://www.freedesktop.org/Standards/wm-spec">
39974 // http://www.freedesktop.org/Standards/wm-spec</ulink> has a
39975 // nice table of gravities in the "implementation notes" section.
39976 // The gtk_window_get_position() documentation may also be relevant.
39977 // <x>: X coordinate to move window to
39978 // <y>: Y coordinate to move window to
39979 void move()(int x, int y) {
39980 gtk_window_move(&this, x, y);
39983 // Parses a standard X Window System geometry string - see the
39984 // manual page for X (type 'man X') for details on this.
39985 // gtk_window_parse_geometry() does work on all GTK+ ports
39986 // including Win32 but is primarily intended for an X environment.
39987 // If either a size or a position can be extracted from the
39988 // geometry string, gtk_window_parse_geometry() returns %TRUE
39989 // and calls gtk_window_set_default_size() and/or gtk_window_move()
39990 // to resize/move the window.
39991 // If gtk_window_parse_geometry() returns %TRUE, it will also
39992 // set the #GDK_HINT_USER_POS and/or #GDK_HINT_USER_SIZE hints
39993 // indicating to the window manager that the size/position of
39994 // the window was user-specified. This causes most window
39995 // managers to honor the geometry.
39996 // Note that for gtk_window_parse_geometry() to work as expected, it has
39997 // to be called when the window has its "final" size, i.e. after calling
39998 // gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints()
39999 // on the window.
40000 // |[
40001 // #include <gtk/gtk.h>
40002 // static void
40003 // fill_with_content (GtkWidget *vbox)
40004 // {
40005 // /&ast; fill with content... &ast;/
40006 // }
40007 // int
40008 // main (int argc, char *argv[])
40009 // {
40010 // GtkWidget *window, *vbox;
40011 // GdkGeometry size_hints = {
40012 // 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST
40013 // };
40014 // gtk_init (&argc, &argv);
40015 // window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
40016 // vbox = gtk_vbox_new (FALSE, 0);
40017 // gtk_container_add (GTK_CONTAINER (window), vbox);
40018 // fill_with_content (vbox);
40019 // gtk_widget_show_all (vbox);
40020 // gtk_window_set_geometry_hints (GTK_WINDOW (window),
40021 // window,
40022 // &size_hints,
40023 // GDK_HINT_MIN_SIZE |
40024 // GDK_HINT_BASE_SIZE |
40025 // GDK_HINT_RESIZE_INC);
40026 // if (argc &gt; 1)
40027 // {
40028 // if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
40029 // fprintf (stderr, "Failed to parse '%s'\n", argv[1]);
40030 // }
40031 // gtk_widget_show_all (window);
40032 // gtk_main ();
40033 // return 0;
40034 // }
40035 // ]|
40036 // RETURNS: %TRUE if string was parsed successfully
40037 // <geometry>: geometry string
40038 int parse_geometry()(char* geometry) {
40039 return gtk_window_parse_geometry(&this, geometry);
40042 // Presents a window to the user. This may mean raising the window
40043 // in the stacking order, deiconifying it, moving it to the current
40044 // desktop, and/or giving it the keyboard focus, possibly dependent
40045 // on the user's platform, window manager, and preferences.
40046 // If @window is hidden, this function calls gtk_widget_show()
40047 // as well.
40048 // This function should be used when the user tries to open a window
40049 // that's already open. Say for example the preferences dialog is
40050 // currently open, and the user chooses Preferences from the menu
40051 // a second time; use gtk_window_present() to move the already-open dialog
40052 // where the user can see it.
40053 // If you are calling this function in response to a user interaction,
40054 // it is preferable to use gtk_window_present_with_time().
40055 void present()() {
40056 gtk_window_present(&this);
40059 // VERSION: 2.8
40060 // Presents a window to the user in response to a user interaction.
40061 // If you need to present a window without a timestamp, use
40062 // gtk_window_present(). See gtk_window_present() for details.
40063 // <timestamp>: the timestamp of the user interaction (typically a button or key press event) which triggered this call
40064 void present_with_time()(uint timestamp) {
40065 gtk_window_present_with_time(&this, timestamp);
40068 // VERSION: 2.4
40069 // Propagate a key press or release event to the focus widget and
40070 // up the focus container chain until a widget handles @event.
40071 // This is normally called by the default ::key_press_event and
40072 // ::key_release_event handlers for toplevel windows,
40073 // however in some cases it may be useful to call this directly when
40074 // overriding the standard key handling for a toplevel window.
40075 // RETURNS: %TRUE if a widget in the focus chain handled the event.
40076 // <event>: a #GdkEventKey
40077 int propagate_key_event()(Gdk2.EventKey* event) {
40078 return gtk_window_propagate_key_event(&this, event);
40081 // Reverses the effects of gtk_window_add_accel_group().
40082 // <accel_group>: a #GtkAccelGroup
40083 void remove_accel_group()(AccelGroup* accel_group) {
40084 gtk_window_remove_accel_group(&this, accel_group);
40086 void remove_embedded_xid()(Gdk2.NativeWindow xid) {
40087 gtk_window_remove_embedded_xid(&this, xid);
40090 // Removes a mnemonic from this window.
40091 // <keyval>: the mnemonic
40092 // <target>: the widget that gets activated by the mnemonic
40093 void remove_mnemonic()(uint keyval, Widget* target) {
40094 gtk_window_remove_mnemonic(&this, keyval, target);
40097 // Hides @window, then reshows it, resetting the
40098 // default size and position of the window. Used
40099 // by GUI builders only.
40100 void reshow_with_initial_size()() {
40101 gtk_window_reshow_with_initial_size(&this);
40104 // Resizes the window as if the user had done so, obeying geometry
40105 // constraints. The default geometry constraint is that windows may
40106 // not be smaller than their size request; to override this
40107 // constraint, call gtk_widget_set_size_request() to set the window's
40108 // request to a smaller value.
40109 // If gtk_window_resize() is called before showing a window for the
40110 // first time, it overrides any default size set with
40111 // gtk_window_set_default_size().
40112 // Windows may not be resized smaller than 1 by 1 pixels.
40113 // <width>: width in pixels to resize the window to
40114 // <height>: height in pixels to resize the window to
40115 void resize()(int width, int height) {
40116 gtk_window_resize(&this, width, height);
40119 // VERSION: 2.4
40120 // Windows may set a hint asking the desktop environment not to receive
40121 // the input focus. This function sets this hint.
40122 // <setting>: %TRUE to let this window receive input focus
40123 void set_accept_focus()(int setting) {
40124 gtk_window_set_accept_focus(&this, setting);
40127 // By default, windows are decorated with a title bar, resize
40128 // controls, etc. Some <link linkend="gtk-X11-arch">window
40129 // managers</link> allow GTK+ to disable these decorations, creating a
40130 // borderless window. If you set the decorated property to %FALSE
40131 // using this function, GTK+ will do its best to convince the window
40132 // manager not to decorate the window. Depending on the system, this
40133 // function may not have any effect when called on a window that is
40134 // already visible, so you should call it before calling gtk_window_show().
40135 // On Windows, this function always works, since there's no window manager
40136 // policy involved.
40137 // <setting>: %TRUE to decorate the window
40138 void set_decorated()(int setting) {
40139 gtk_window_set_decorated(&this, setting);
40142 // The default widget is the widget that's activated when the user
40143 // presses Enter in a dialog (for example). This function sets or
40144 // unsets the default widget for a #GtkWindow about. When setting
40145 // (rather than unsetting) the default widget it's generally easier to
40146 // call gtk_widget_grab_focus() on the widget. Before making a widget
40147 // the default widget, you must set the #GTK_CAN_DEFAULT flag on the
40148 // widget you'd like to make the default using GTK_WIDGET_SET_FLAGS().
40149 // <default_widget>: widget to be the default, or %NULL to unset the default widget for the toplevel.
40150 void set_default()(Widget* default_widget=null) {
40151 gtk_window_set_default(&this, default_widget);
40154 // Sets the default size of a window. If the window's "natural" size
40155 // (its size request) is larger than the default, the default will be
40156 // ignored. More generally, if the default size does not obey the
40157 // geometry hints for the window (gtk_window_set_geometry_hints() can
40158 // be used to set these explicitly), the default size will be clamped
40159 // to the nearest permitted size.
40160 // Unlike gtk_widget_set_size_request(), which sets a size request for
40161 // a widget and thus would keep users from shrinking the window, this
40162 // function only sets the initial size, just as if the user had
40163 // resized the window themselves. Users can still shrink the window
40164 // again as they normally would. Setting a default size of -1 means to
40165 // use the "natural" default size (the size request of the window).
40166 // For more control over a window's initial size and how resizing works,
40167 // investigate gtk_window_set_geometry_hints().
40168 // For some uses, gtk_window_resize() is a more appropriate function.
40169 // gtk_window_resize() changes the current size of the window, rather
40170 // than the size to be used on initial display. gtk_window_resize() always
40171 // affects the window itself, not the geometry widget.
40172 // The default size of a window only affects the first time a window is
40173 // shown; if a window is hidden and re-shown, it will remember the size
40174 // it had prior to hiding, rather than using the default size.
40175 // Windows can't actually be 0x0 in size, they must be at least 1x1, but
40176 // passing 0 for @width and @height is OK, resulting in a 1x1 default size.
40177 // <width>: width in pixels, or -1 to unset the default width
40178 // <height>: height in pixels, or -1 to unset the default height
40179 void set_default_size()(int width, int height) {
40180 gtk_window_set_default_size(&this, width, height);
40183 // VERSION: 2.10
40184 // By default, windows have a close button in the window frame. Some
40185 // <link linkend="gtk-X11-arch">window managers</link> allow GTK+ to
40186 // disable this button. If you set the deletable property to %FALSE
40187 // using this function, GTK+ will do its best to convince the window
40188 // manager not to show a close button. Depending on the system, this
40189 // function may not have any effect when called on a window that is
40190 // already visible, so you should call it before calling gtk_window_show().
40191 // On Windows, this function always works, since there's no window manager
40192 // policy involved.
40193 // <setting>: %TRUE to decorate the window as deletable
40194 void set_deletable()(int setting) {
40195 gtk_window_set_deletable(&this, setting);
40198 // If @setting is %TRUE, then destroying the transient parent of @window
40199 // will also destroy @window itself. This is useful for dialogs that
40200 // shouldn't persist beyond the lifetime of the main window they're
40201 // associated with, for example.
40202 // <setting>: whether to destroy @window with its transient parent
40203 void set_destroy_with_parent()(int setting) {
40204 gtk_window_set_destroy_with_parent(&this, setting);
40207 // If @focus is not the current focus widget, and is focusable, sets
40208 // it as the focus widget for the window. If @focus is %NULL, unsets
40209 // the focus widget for this window. To set the focus to a particular
40210 // widget in the toplevel, it is usually more convenient to use
40211 // gtk_widget_grab_focus() instead of this function.
40212 // <focus>: widget to be the new focus widget, or %NULL to unset any focus widget for the toplevel window.
40213 void set_focus()(Widget* focus=null) {
40214 gtk_window_set_focus(&this, focus);
40217 // VERSION: 2.6
40218 // Windows may set a hint asking the desktop environment not to receive
40219 // the input focus when the window is mapped. This function sets this
40220 // hint.
40221 // <setting>: %TRUE to let this window receive input focus on map
40222 void set_focus_on_map()(int setting) {
40223 gtk_window_set_focus_on_map(&this, setting);
40226 // DEPRECATED (v2.24) method: set_frame_dimensions - This function will be removed in GTK+ 3
40227 // (Note: this is a special-purpose function intended for the framebuffer
40228 // port; see gtk_window_set_has_frame(). It will have no effect on the
40229 // window border drawn by the window manager, which is the normal
40230 // case when using the X Window system.)
40231 // For windows with frames (see gtk_window_set_has_frame()) this function
40232 // can be used to change the size of the frame border.
40233 // <left>: The width of the left border
40234 // <top>: The height of the top border
40235 // <right>: The width of the right border
40236 // <bottom>: The height of the bottom border
40237 void set_frame_dimensions()(int left, int top, int right, int bottom) {
40238 gtk_window_set_frame_dimensions(&this, left, top, right, bottom);
40241 // This function sets up hints about how a window can be resized by
40242 // the user. You can set a minimum and maximum size; allowed resize
40243 // increments (e.g. for xterm, you can only resize by the size of a
40244 // character); aspect ratios; and more. See the #GdkGeometry struct.
40245 // <geometry_widget>: widget the geometry hints will be applied to
40246 // <geometry>: struct containing geometry information
40247 // <geom_mask>: mask indicating which struct fields should be paid attention to
40248 void set_geometry_hints()(Widget* geometry_widget, Gdk2.Geometry* geometry, Gdk2.WindowHints geom_mask) {
40249 gtk_window_set_geometry_hints(&this, geometry_widget, geometry, geom_mask);
40252 // Window gravity defines the meaning of coordinates passed to
40253 // gtk_window_move(). See gtk_window_move() and #GdkGravity for
40254 // more details.
40255 // The default window gravity is #GDK_GRAVITY_NORTH_WEST which will
40256 // typically "do what you mean."
40257 // <gravity>: window gravity
40258 void set_gravity()(Gdk2.Gravity gravity) {
40259 gtk_window_set_gravity(&this, gravity);
40262 // DEPRECATED (v2.24) method: set_has_frame - This function will be removed in GTK+ 3
40263 // (Note: this is a special-purpose function for the framebuffer port,
40264 // that causes GTK+ to draw its own window border. For most applications,
40265 // you want gtk_window_set_decorated() instead, which tells the window
40266 // manager whether to draw the window border.)
40267 // If this function is called on a window with setting of %TRUE, before
40268 // it is realized or showed, it will have a "frame" window around
40269 // frame_event you can receive all events targeted at the frame.
40270 // This function is used by the linux-fb port to implement managed
40271 // windows, but it could conceivably be used by X-programs that
40272 // want to do their own window decorations.
40273 // <setting>: a boolean
40274 void set_has_frame()(int setting) {
40275 gtk_window_set_has_frame(&this, setting);
40278 // Sets up the icon representing a #GtkWindow. This icon is used when
40279 // the window is minimized (also known as iconified). Some window
40280 // managers or desktop environments may also place it in the window
40281 // frame, or display it in other contexts.
40282 // The icon should be provided in whatever size it was naturally
40283 // drawn; that is, don't scale the image before passing it to
40284 // GTK+. Scaling is postponed until the last minute, when the desired
40285 // final size is known, to allow best quality.
40286 // If you have your icon hand-drawn in multiple sizes, use
40287 // gtk_window_set_icon_list(). Then the best size will be used.
40288 // This function is equivalent to calling gtk_window_set_icon_list()
40289 // with a 1-element list.
40290 // See also gtk_window_set_default_icon_list() to set the icon
40291 // for all windows in your application in one go.
40292 // <icon>: icon image, or %NULL
40293 void set_icon()(GdkPixbuf2.Pixbuf* icon=null) {
40294 gtk_window_set_icon(&this, icon);
40297 // VERSION: 2.2
40298 // Sets the icon for @window.
40299 // Warns on failure if @err is %NULL.
40300 // This function is equivalent to calling gtk_window_set_icon()
40301 // with a pixbuf created by loading the image from @filename.
40302 // RETURNS: %TRUE if setting the icon succeeded.
40303 // <filename>: location of icon file
40304 int set_icon_from_file()(char* filename, GLib2.Error** error=null) {
40305 return gtk_window_set_icon_from_file(&this, filename, error);
40308 // Sets up the icon representing a #GtkWindow. The icon is used when
40309 // the window is minimized (also known as iconified). Some window
40310 // managers or desktop environments may also place it in the window
40311 // frame, or display it in other contexts.
40312 // gtk_window_set_icon_list() allows you to pass in the same icon in
40313 // several hand-drawn sizes. The list should contain the natural sizes
40314 // your icon is available in; that is, don't scale the image before
40315 // passing it to GTK+. Scaling is postponed until the last minute,
40316 // when the desired final size is known, to allow best quality.
40317 // By passing several sizes, you may improve the final image quality
40318 // of the icon, by reducing or eliminating automatic image scaling.
40319 // larger images (64x64, 128x128) if you have them.
40320 // See also gtk_window_set_default_icon_list() to set the icon
40321 // for all windows in your application in one go.
40322 // Note that transient windows (those who have been set transient for another
40323 // window using gtk_window_set_transient_for()) will inherit their
40324 // icon from their transient parent. So there's no need to explicitly
40325 // set the icon on transient windows.
40326 // <list>: list of #GdkPixbuf
40327 void set_icon_list()(GLib2.List* list) {
40328 gtk_window_set_icon_list(&this, list);
40331 // VERSION: 2.6
40332 // Sets the icon for the window from a named themed icon. See
40333 // the docs for #GtkIconTheme for more details.
40334 // Note that this has nothing to do with the WM_ICON_NAME
40335 // property which is mentioned in the ICCCM.
40336 // <name>: the name of the themed icon
40337 void set_icon_name()(char* name=null) {
40338 gtk_window_set_icon_name(&this, name);
40341 // VERSION: 2.4
40342 // Asks to keep @window above, so that it stays on top. Note that
40343 // you shouldn't assume the window is definitely above afterward,
40344 // because other entities (e.g. the user or <link
40345 // linkend="gtk-X11-arch">window manager</link>) could not keep it above,
40346 // and not all window managers support keeping windows above. But
40347 // normally the window will end kept above. Just don't write code
40348 // that crashes if not.
40349 // It's permitted to call this function before showing a window,
40350 // in which case the window will be kept above when it appears onscreen
40351 // initially.
40352 // You can track the above state via the "window-state-event" signal
40353 // on #GtkWidget.
40354 // Note that, according to the <ulink
40355 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
40356 // Manager Hints</ulink> specification, the above state is mainly meant
40357 // for user preferences and should not be used by applications e.g. for
40358 // drawing attention to their dialogs.
40359 // <setting>: whether to keep @window above other windows
40360 void set_keep_above()(int setting) {
40361 gtk_window_set_keep_above(&this, setting);
40364 // VERSION: 2.4
40365 // Asks to keep @window below, so that it stays in bottom. Note that
40366 // you shouldn't assume the window is definitely below afterward,
40367 // because other entities (e.g. the user or <link
40368 // linkend="gtk-X11-arch">window manager</link>) could not keep it below,
40369 // and not all window managers support putting windows below. But
40370 // normally the window will be kept below. Just don't write code
40371 // that crashes if not.
40372 // It's permitted to call this function before showing a window,
40373 // in which case the window will be kept below when it appears onscreen
40374 // initially.
40375 // You can track the below state via the "window-state-event" signal
40376 // on #GtkWidget.
40377 // Note that, according to the <ulink
40378 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
40379 // Manager Hints</ulink> specification, the above state is mainly meant
40380 // for user preferences and should not be used by applications e.g. for
40381 // drawing attention to their dialogs.
40382 // <setting>: whether to keep @window below other windows
40383 void set_keep_below()(int setting) {
40384 gtk_window_set_keep_below(&this, setting);
40387 // Sets the mnemonic modifier for this window.
40388 // <modifier>: the modifier mask used to activate mnemonics on this window.
40389 void set_mnemonic_modifier()(Gdk2.ModifierType modifier) {
40390 gtk_window_set_mnemonic_modifier(&this, modifier);
40393 // VERSION: 2.20
40394 // Sets the #GtkWindow:mnemonics-visible property.
40395 // <setting>: the new value
40396 void set_mnemonics_visible()(int setting) {
40397 gtk_window_set_mnemonics_visible(&this, setting);
40400 // Sets a window modal or non-modal. Modal windows prevent interaction
40401 // with other windows in the same application. To keep modal dialogs
40402 // on top of main application windows, use
40403 // gtk_window_set_transient_for() to make the dialog transient for the
40404 // parent; most <link linkend="gtk-X11-arch">window managers</link>
40405 // will then disallow lowering the dialog below the parent.
40406 // <modal>: whether the window is modal
40407 void set_modal()(int modal) {
40408 gtk_window_set_modal(&this, modal);
40411 // VERSION: 2.12
40412 // Request the windowing system to make @window partially transparent,
40413 // with opacity 0 being fully transparent and 1 fully opaque. (Values
40414 // of the opacity parameter are clamped to the [0,1] range.) On X11
40415 // this has any effect only on X screens with a compositing manager
40416 // running. See gtk_widget_is_composited(). On Windows it should work
40417 // always.
40418 // Note that setting a window's opacity after the window has been
40419 // shown causes it to flicker once on Windows.
40420 // <opacity>: desired opacity, between 0 and 1
40421 void set_opacity()(double opacity) {
40422 gtk_window_set_opacity(&this, opacity);
40424 void set_policy()(int allow_shrink, int allow_grow, int auto_shrink) {
40425 gtk_window_set_policy(&this, allow_shrink, allow_grow, auto_shrink);
40428 // Sets a position constraint for this window. If the old or new
40429 // constraint is %GTK_WIN_POS_CENTER_ALWAYS, this will also cause
40430 // the window to be repositioned to satisfy the new constraint.
40431 // <position>: a position constraint.
40432 void set_position()(WindowPosition position) {
40433 gtk_window_set_position(&this, position);
40436 // Sets whether the user can resize a window. Windows are user resizable
40437 // by default.
40438 // <resizable>: %TRUE if the user can resize this window
40439 void set_resizable()(int resizable) {
40440 gtk_window_set_resizable(&this, resizable);
40443 // This function is only useful on X11, not with other GTK+ targets.
40444 // In combination with the window title, the window role allows a
40445 // <link linkend="gtk-X11-arch">window manager</link> to identify "the
40446 // same" window when an application is restarted. So for example you
40447 // might set the "toolbox" role on your app's toolbox window, so that
40448 // when the user restarts their session, the window manager can put
40449 // the toolbox back in the same place.
40450 // If a window already has a unique title, you don't need to set the
40451 // role, since the WM can use the title to identify the window when
40452 // restoring the session.
40453 // <role>: unique identifier for the window to be used when restoring a session
40454 void set_role()(char* role) {
40455 gtk_window_set_role(&this, role);
40458 // VERSION: 2.2
40459 // Sets the #GdkScreen where the @window is displayed; if
40460 // the window is already mapped, it will be unmapped, and
40461 // then remapped on the new screen.
40462 // <screen>: a #GdkScreen.
40463 void set_screen()(Gdk2.Screen* screen) {
40464 gtk_window_set_screen(&this, screen);
40467 // VERSION: 2.2
40468 // Windows may set a hint asking the desktop environment not to display
40469 // the window in the pager. This function sets this hint.
40470 // (A "pager" is any desktop navigation tool such as a workspace
40471 // switcher that displays a thumbnail representation of the windows
40472 // on the screen.)
40473 // <setting>: %TRUE to keep this window from appearing in the pager
40474 void set_skip_pager_hint()(int setting) {
40475 gtk_window_set_skip_pager_hint(&this, setting);
40478 // VERSION: 2.2
40479 // Windows may set a hint asking the desktop environment not to display
40480 // the window in the task bar. This function sets this hint.
40481 // <setting>: %TRUE to keep this window from appearing in the task bar
40482 void set_skip_taskbar_hint()(int setting) {
40483 gtk_window_set_skip_taskbar_hint(&this, setting);
40486 // VERSION: 2.12
40487 // Startup notification identifiers are used by desktop environment to
40488 // track application startup, to provide user feedback and other
40489 // features. This function changes the corresponding property on the
40490 // underlying GdkWindow. Normally, startup identifier is managed
40491 // automatically and you should only use this function in special cases
40492 // like transferring focus from other processes. You should use this
40493 // function before calling gtk_window_present() or any equivalent
40494 // function generating a window map event.
40495 // This function is only useful on X11, not with other GTK+ targets.
40496 // <startup_id>: a string with startup-notification identifier
40497 void set_startup_id()(char* startup_id) {
40498 gtk_window_set_startup_id(&this, startup_id);
40501 // Sets the title of the #GtkWindow. The title of a window will be
40502 // displayed in its title bar; on the X Window System, the title bar
40503 // is rendered by the <link linkend="gtk-X11-arch">window
40504 // manager</link>, so exactly how the title appears to users may vary
40505 // according to a user's exact configuration. The title should help a
40506 // user distinguish this window from other windows they may have
40507 // open. A good title might include the application name and current
40508 // document filename, for example.
40509 // <title>: title of the window
40510 void set_title()(char* title) {
40511 gtk_window_set_title(&this, title);
40514 // Dialog windows should be set transient for the main application
40515 // window they were spawned from. This allows <link
40516 // linkend="gtk-X11-arch">window managers</link> to e.g. keep the
40517 // dialog on top of the main window, or center the dialog over the
40518 // main window. gtk_dialog_new_with_buttons() and other convenience
40519 // functions in GTK+ will sometimes call
40520 // gtk_window_set_transient_for() on your behalf.
40521 // Passing %NULL for @parent unsets the current transient window.
40522 // On Windows, this function puts the child window on top of the parent,
40523 // much as the window manager would have done on X.
40524 // <parent>: parent window, or %NULL
40525 void set_transient_for()(Window* parent=null) {
40526 gtk_window_set_transient_for(&this, parent);
40529 // By setting the type hint for the window, you allow the window
40530 // manager to decorate and handle the window in a way which is
40531 // suitable to the function of the window in your application.
40532 // This function should be called before the window becomes visible.
40533 // gtk_dialog_new_with_buttons() and other convenience functions in GTK+
40534 // will sometimes call gtk_window_set_type_hint() on your behalf.
40535 // <hint>: the window type
40536 void set_type_hint()(Gdk2.WindowTypeHint hint) {
40537 gtk_window_set_type_hint(&this, hint);
40540 // VERSION: 2.8
40541 // Windows may set a hint asking the desktop environment to draw
40542 // the users attention to the window. This function sets this hint.
40543 // <setting>: %TRUE to mark this window as urgent
40544 void set_urgency_hint()(int setting) {
40545 gtk_window_set_urgency_hint(&this, setting);
40548 // Don't use this function. It sets the X Window System "class" and
40549 // "name" hints for a window. According to the ICCCM, you should
40550 // always set these to the same value for all windows in an
40551 // application, and GTK+ sets them to that value by default, so calling
40552 // this function is sort of pointless. However, you may want to call
40553 // gtk_window_set_role() on each window in your application, for the
40554 // benefit of the session manager. Setting the role allows the window
40555 // manager to restore window positions when loading a saved session.
40556 // <wmclass_name>: window name hint
40557 // <wmclass_class>: window class hint
40558 void set_wmclass()(char* wmclass_name, char* wmclass_class) {
40559 gtk_window_set_wmclass(&this, wmclass_name, wmclass_class);
40562 // Asks to stick @window, which means that it will appear on all user
40563 // desktops. Note that you shouldn't assume the window is definitely
40564 // stuck afterward, because other entities (e.g. the user or <link
40565 // linkend="gtk-X11-arch">window manager</link>) could unstick it
40566 // again, and some window managers do not support sticking
40567 // windows. But normally the window will end up stuck. Just don't
40568 // write code that crashes if not.
40569 // It's permitted to call this function before showing a window.
40570 // You can track stickiness via the "window-state-event" signal
40571 // on #GtkWidget.
40572 void stick()() {
40573 gtk_window_stick(&this);
40576 // VERSION: 2.2
40577 // Asks to toggle off the fullscreen state for @window. Note that you
40578 // shouldn't assume the window is definitely not full screen
40579 // afterward, because other entities (e.g. the user or <link
40580 // linkend="gtk-X11-arch">window manager</link>) could fullscreen it
40581 // again, and not all window managers honor requests to unfullscreen
40582 // windows. But normally the window will end up restored to its normal
40583 // state. Just don't write code that crashes if not.
40584 // You can track the fullscreen state via the "window-state-event" signal
40585 // on #GtkWidget.
40586 void unfullscreen()() {
40587 gtk_window_unfullscreen(&this);
40590 // Asks to unmaximize @window. Note that you shouldn't assume the
40591 // window is definitely unmaximized afterward, because other entities
40592 // (e.g. the user or <link linkend="gtk-X11-arch">window
40593 // manager</link>) could maximize it again, and not all window
40594 // managers honor requests to unmaximize. But normally the window will
40595 // end up unmaximized. Just don't write code that crashes if not.
40596 // You can track maximization via the "window-state-event" signal
40597 // on #GtkWidget.
40598 void unmaximize()() {
40599 gtk_window_unmaximize(&this);
40602 // Asks to unstick @window, which means that it will appear on only
40603 // one of the user's desktops. Note that you shouldn't assume the
40604 // window is definitely unstuck afterward, because other entities
40605 // (e.g. the user or <link linkend="gtk-X11-arch">window
40606 // manager</link>) could stick it again. But normally the window will
40607 // end up stuck. Just don't write code that crashes if not.
40608 // You can track stickiness via the "window-state-event" signal
40609 // on #GtkWidget.
40610 void unstick()() {
40611 gtk_window_unstick(&this);
40614 // The ::activate-default signal is a
40615 // <link linkend="keybinding-signals">keybinding signal</link>
40616 // which gets emitted when the user activates the default widget
40617 // of @window.
40618 extern (C) alias static void function (Window* this_, void* user_data=null) signal_activate_default;
40620 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
40621 return super_.signal_connect!name(cb, data, cf);
40624 ulong signal_connect(string name:"activate-default", CB:signal_activate_default)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
40625 return signal_connect_data!()(&this, cast(char*)"activate-default",
40626 cast(GObject2.Callback)cb, data, null, cf);
40629 // The ::activate-focus signal is a
40630 // <link linkend="keybinding-signals">keybinding signal</link>
40631 // which gets emitted when the user activates the currently
40632 // focused widget of @window.
40633 extern (C) alias static void function (Window* this_, void* user_data=null) signal_activate_focus;
40634 ulong signal_connect(string name:"activate-focus", CB:signal_activate_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
40635 return signal_connect_data!()(&this, cast(char*)"activate-focus",
40636 cast(GObject2.Callback)cb, data, null, cf);
40638 extern (C) alias static c_int function (Window* this_, Gdk2.Event* object, void* user_data=null) signal_frame_event;
40639 ulong signal_connect(string name:"frame-event", CB:signal_frame_event)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
40640 return signal_connect_data!()(&this, cast(char*)"frame-event",
40641 cast(GObject2.Callback)cb, data, null, cf);
40644 // The ::keys-changed signal gets emitted when the set of accelerators
40645 // or mnemonics that are associated with @window changes.
40646 extern (C) alias static void function (Window* this_, void* user_data=null) signal_keys_changed;
40647 ulong signal_connect(string name:"keys-changed", CB:signal_keys_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
40648 return signal_connect_data!()(&this, cast(char*)"keys-changed",
40649 cast(GObject2.Callback)cb, data, null, cf);
40651 extern (C) alias static void function (Window* this_, Widget* object, void* user_data=null) signal_set_focus;
40652 ulong signal_connect(string name:"set-focus", CB:signal_set_focus)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
40653 return signal_connect_data!()(&this, cast(char*)"set-focus",
40654 cast(GObject2.Callback)cb, data, null, cf);
40658 struct WindowClass {
40659 BinClass parent_class;
40660 // <focus>: widget to be the new focus widget, or %NULL to unset any focus widget for the toplevel window.
40661 extern (C) void function (Window* window, Widget* focus=null) set_focus;
40662 extern (C) int function (Window* window, Gdk2.Event* event) frame_event;
40663 extern (C) void function (Window* window) activate_focus;
40664 extern (C) void function (Window* window) activate_default;
40665 extern (C) void function (Window* window, DirectionType direction) move_focus;
40666 extern (C) void function (Window* window) keys_changed;
40667 extern (C) void function () _gtk_reserved1;
40668 extern (C) void function () _gtk_reserved2;
40669 extern (C) void function () _gtk_reserved3;
40670 extern (C) void function () _gtk_reserved4;
40673 struct WindowGeometryInfo {
40676 struct WindowGroup /* : GObject.Object */ {
40677 alias parent_instance this;
40678 alias parent_instance super_;
40679 alias parent_instance object;
40680 GObject2.Object parent_instance;
40681 GLib2.SList* grabs;
40684 // Creates a new #GtkWindowGroup object. Grabs added with
40685 // gtk_grab_add() only affect windows within the same #GtkWindowGroup.
40686 // RETURNS: a new #GtkWindowGroup.
40687 static WindowGroup* /*new*/ new_()() {
40688 return gtk_window_group_new();
40691 // Adds a window to a #GtkWindowGroup.
40692 // <window>: the #GtkWindow to add
40693 void add_window()(Window* window) {
40694 gtk_window_group_add_window(&this, window);
40696 // Unintrospectable method: get_current_grab() / gtk_window_group_get_current_grab()
40697 Widget* get_current_grab()() {
40698 return gtk_window_group_get_current_grab(&this);
40701 // VERSION: 2.14
40702 // Returns a list of the #GtkWindows that belong to @window_group.
40703 // windows inside the group.
40704 // RETURNS: A newly-allocated list of
40705 GLib2.List* /*new container*/ list_windows()() {
40706 return gtk_window_group_list_windows(&this);
40709 // Removes a window from a #GtkWindowGroup.
40710 // <window>: the #GtkWindow to remove
40711 void remove_window()(Window* window) {
40712 gtk_window_group_remove_window(&this, window);
40716 struct WindowGroupClass {
40717 GObject2.ObjectClass parent_class;
40718 extern (C) void function () _gtk_reserved1;
40719 extern (C) void function () _gtk_reserved2;
40720 extern (C) void function () _gtk_reserved3;
40721 extern (C) void function () _gtk_reserved4;
40724 extern (C) alias void function (Window* window, uint keyval, Gdk2.ModifierType modifiers, int is_mnemonic, void* data) WindowKeysForeachFunc;
40726 enum WindowPosition {
40727 NONE = 0,
40728 CENTER = 1,
40729 MOUSE = 2,
40730 CENTER_ALWAYS = 3,
40731 CENTER_ON_PARENT = 4
40733 enum WindowType {
40734 TOPLEVEL = 0,
40735 POPUP = 1
40737 enum WrapMode {
40738 NONE = 0,
40739 CHAR = 1,
40740 WORD = 2,
40741 WORD_CHAR = 3
40744 // Finds the first accelerator in any #GtkAccelGroup attached
40745 // to @object that matches @accel_key and @accel_mods, and
40746 // activates that accelerator.
40747 // RETURNS: %TRUE if an accelerator was activated and handled this keypress
40748 // <object>: the #GObject, usually a #GtkWindow, on which to activate the accelerator.
40749 // <accel_key>: accelerator keyval from a key event
40750 // <accel_mods>: keyboard state mask from a key event
40751 static int accel_groups_activate()(GObject2.Object* object, uint accel_key, Gdk2.ModifierType accel_mods) {
40752 return gtk_accel_groups_activate(object, accel_key, accel_mods);
40756 // Gets a list of all accel groups which are attached to @object.
40757 // RETURNS: a list of all accel groups which are attached to @object
40758 // <object>: a #GObject, usually a #GtkWindow
40759 static GLib2.SList* accel_groups_from_object()(GObject2.Object* object) {
40760 return gtk_accel_groups_from_object(object);
40764 // Gets the value set by gtk_accelerator_set_default_mod_mask().
40765 // RETURNS: the default accelerator modifier mask
40766 static uint accelerator_get_default_mod_mask()() {
40767 return gtk_accelerator_get_default_mod_mask();
40771 // VERSION: 2.6
40772 // Converts an accelerator keyval and modifier mask into a string
40773 // which can be used to represent the accelerator to the user.
40774 // RETURNS: a newly-allocated string representing the accelerator.
40775 // <accelerator_key>: accelerator keyval
40776 // <accelerator_mods>: accelerator modifier mask
40777 static char* /*new*/ accelerator_get_label()(uint accelerator_key, Gdk2.ModifierType accelerator_mods) {
40778 return gtk_accelerator_get_label(accelerator_key, accelerator_mods);
40782 // Converts an accelerator keyval and modifier mask
40783 // into a string parseable by gtk_accelerator_parse().
40784 // For example, if you pass in #GDK_q and #GDK_CONTROL_MASK,
40785 // this function returns "&lt;Control&gt;q".
40786 // If you need to display accelerators in the user interface,
40787 // see gtk_accelerator_get_label().
40788 // RETURNS: a newly-allocated accelerator name
40789 // <accelerator_key>: accelerator keyval
40790 // <accelerator_mods>: accelerator modifier mask
40791 static char* /*new*/ accelerator_name()(uint accelerator_key, Gdk2.ModifierType accelerator_mods) {
40792 return gtk_accelerator_name(accelerator_key, accelerator_mods);
40796 // Parses a string representing an accelerator. The
40797 // format looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
40798 // "&lt;Release&gt;z" (the last one is for key release).
40799 // The parser is fairly liberal and allows lower or upper case,
40800 // and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
40801 // Key names are parsed using gdk_keyval_from_name(). For character keys the
40802 // name is not the symbol, but the lowercase name, e.g. one would use
40803 // "&lt;Ctrl&gt;minus" instead of "&lt;Ctrl&gt;-".
40804 // If the parse fails, @accelerator_key and @accelerator_mods will
40805 // be set to 0 (zero).
40806 // <accelerator>: string representing an accelerator
40807 // <accelerator_key>: return location for accelerator keyval
40808 // <accelerator_mods>: return location for accelerator modifier mask
40809 static void accelerator_parse()(char* accelerator, /*out*/ uint* accelerator_key=null, /*out*/ Gdk2.ModifierType* accelerator_mods=null) {
40810 gtk_accelerator_parse(accelerator, accelerator_key, accelerator_mods);
40814 // Sets the modifiers that will be considered significant for keyboard
40815 // accelerators. The default mod mask is #GDK_CONTROL_MASK |
40816 // #GDK_SHIFT_MASK | #GDK_MOD1_MASK | #GDK_SUPER_MASK |
40817 // #GDK_HYPER_MASK | #GDK_META_MASK, that is, Control, Shift, Alt,
40818 // Super, Hyper and Meta. Other modifiers will by default be ignored
40819 // by #GtkAccelGroup.
40820 // You must include at least the three modifiers Control, Shift
40821 // and Alt in any value you pass to this function.
40822 // The default mod mask should be changed on application startup,
40823 // before using any accelerator groups.
40824 // <default_mod_mask>: accelerator modifier mask
40825 static void accelerator_set_default_mod_mask()(Gdk2.ModifierType default_mod_mask) {
40826 gtk_accelerator_set_default_mod_mask(default_mod_mask);
40830 // Determines whether a given keyval and modifier mask constitute
40831 // a valid keyboard accelerator. For example, the #GDK_a keyval
40832 // plus #GDK_CONTROL_MASK is valid - this is a "Ctrl+a" accelerator.
40833 // But, you can't, for instance, use the #GDK_Control_L keyval
40834 // as an accelerator.
40835 // RETURNS: %TRUE if the accelerator is valid
40836 // <keyval>: a GDK keyval
40837 // <modifiers>: modifier mask
40838 static int accelerator_valid()(uint keyval, Gdk2.ModifierType modifiers) {
40839 return gtk_accelerator_valid(keyval, modifiers);
40843 // VERSION: 2.6
40844 // Returns %TRUE if dialogs are expected to use an alternative
40845 // button order on the screen @screen. See
40846 // gtk_dialog_set_alternative_button_order() for more details
40847 // about alternative button order.
40848 // If you need to use this function, you should probably connect
40849 // to the ::notify:gtk-alternative-button-order signal on the
40850 // #GtkSettings object associated to @screen, in order to be
40851 // notified if the button order setting changes.
40852 // RETURNS: Whether the alternative button order should be used
40853 // <screen>: a #GdkScreen, or %NULL to use the default screen
40854 static int alternative_dialog_button_order()(Gdk2.Screen* screen=null) {
40855 return gtk_alternative_dialog_button_order(screen);
40859 // Unintrospectable function: binding_entry_add_signal() / gtk_binding_entry_add_signal()
40860 // Override or install a new key binding for @keyval with @modifiers on
40861 // emitted on the target widget, with @n_args @Varargs used as
40862 // arguments.
40863 // <binding_set>: a #GtkBindingSet to install an entry for
40864 // <keyval>: key value of binding to install
40865 // <modifiers>: key modifier of binding to install
40866 // <signal_name>: signal to execute upon activation
40867 // <n_args>: number of arguments to @signal_name
40868 alias gtk_binding_entry_add_signal binding_entry_add_signal; // Variadic
40871 // Override or install a new key binding for @keyval with @modifiers on
40872 // <binding_set>: a #GtkBindingSet to add a signal to
40873 // <keyval>: key value
40874 // <modifiers>: key modifier
40875 // <signal_name>: signal name to be bound
40876 // <binding_args>: list of #GtkBindingArg signal arguments
40877 static void binding_entry_add_signall()(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, GLib2.SList* binding_args) {
40878 gtk_binding_entry_add_signall(binding_set, keyval, modifiers, signal_name, binding_args);
40882 // DEPRECATED (v2.12) function: binding_entry_clear - Use gtk_binding_entry_remove() instead.
40883 // Clears a binding entry.
40884 // <binding_set>: binding set to clear an entry of
40885 // <keyval>: key value of binding to clear
40886 // <modifiers>: key modifier of binding to clear
40887 static void binding_entry_clear()(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) {
40888 gtk_binding_entry_clear(binding_set, keyval, modifiers);
40892 // Remove a binding previously installed via
40893 // gtk_binding_entry_add_signal() on @binding_set.
40894 // <binding_set>: a #GtkBindingSet to remove an entry of
40895 // <keyval>: key value of binding to remove
40896 // <modifiers>: key modifier of binding to remove
40897 static void binding_entry_remove()(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) {
40898 gtk_binding_entry_remove(binding_set, keyval, modifiers);
40902 // VERSION: 2.12
40903 // Install a binding on @binding_set which causes key lookups
40904 // to be aborted, to prevent bindings from lower priority sets
40905 // to be activated.
40906 // <binding_set>: a #GtkBindingSet to skip an entry of
40907 // <keyval>: key value of binding to skip
40908 // <modifiers>: key modifier of binding to skip
40909 static void binding_entry_skip()(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers) {
40910 gtk_binding_entry_skip(binding_set, keyval, modifiers);
40914 // DEPRECATED (v2.12) function: binding_parse_binding - There should be no need to call this function outside GTK+.
40915 // Parse a binding entry from a gtkrc file.
40916 // RETURNS: expected token upon errors, %G_TOKEN_NONE on success.
40917 // <scanner>: GtkRC scanner
40918 static uint binding_parse_binding()(GLib2.Scanner* scanner) {
40919 return gtk_binding_parse_binding(scanner);
40923 // Unintrospectable function: binding_set_by_class() / gtk_binding_set_by_class()
40924 // This function returns the binding set named after the type name of
40925 // the passed in class structure. New binding sets are created on
40926 // demand by this function.
40927 // RETURNS: the binding set corresponding to @object_class
40928 // <object_class>: a valid #GtkObject class
40929 static BindingSet* binding_set_by_class()(void* object_class) {
40930 return gtk_binding_set_by_class(object_class);
40934 // Find a binding set by its globally unique name. The @set_name can
40935 // either be a name used for gtk_binding_set_new() or the type name of
40936 // a class used in gtk_binding_set_by_class().
40937 // RETURNS: %NULL or the specified binding set
40938 // <set_name>: unique binding set name
40939 static BindingSet* binding_set_find()(char* set_name) {
40940 return gtk_binding_set_find(set_name);
40944 // Unintrospectable function: binding_set_new() / gtk_binding_set_new()
40945 // GTK+ maintains a global list of binding sets. Each binding set has
40946 // a unique name which needs to be specified upon creation.
40947 // RETURNS: new binding set
40948 // <set_name>: unique name of this binding set
40949 static BindingSet* binding_set_new()(char* set_name) {
40950 return gtk_binding_set_new(set_name);
40954 // Find a key binding matching @keyval and @modifiers and activate the
40955 // binding on @object.
40956 // RETURNS: %TRUE if a binding was found and activated
40957 // <object>: object to activate when binding found
40958 // <keyval>: key value of the binding
40959 // <modifiers>: key modifier of the binding
40960 static int bindings_activate()(Object* object, uint keyval, Gdk2.ModifierType modifiers) {
40961 return gtk_bindings_activate(object, keyval, modifiers);
40965 // VERSION: 2.4
40966 // Looks up key bindings for @object to find one matching
40967 // RETURNS: %TRUE if a matching key binding was found
40968 // <object>: a #GtkObject (generally must be a widget)
40969 // <event>: a #GdkEventKey
40970 static int bindings_activate_event()(Object* object, Gdk2.EventKey* event) {
40971 return gtk_bindings_activate_event(object, event);
40974 static GLib2.Quark builder_error_quark()() {
40975 return gtk_builder_error_quark();
40979 // Checks that the GTK+ library in use is compatible with the
40980 // given version. Generally you would pass in the constants
40981 // #GTK_MAJOR_VERSION, #GTK_MINOR_VERSION, #GTK_MICRO_VERSION
40982 // as the three arguments to this function; that produces
40983 // a check that the library in use is compatible with
40984 // the version of GTK+ the application or module was compiled
40985 // against.
40986 // of the running library is newer than the version
40987 // the running library must be binary compatible with the
40988 // version @required_major.required_minor.@required_micro
40989 // (same major version.)
40990 // This function is primarily for GTK+ modules; the module
40991 // can call this function to check that it wasn't loaded
40992 // into an incompatible version of GTK+. However, such a
40993 // a check isn't completely reliable, since the module may be
40994 // linked against an old version of GTK+ and calling the
40995 // old version of gtk_check_version(), but still get loaded
40996 // into an application using a newer version of GTK+.
40997 // given version, or a string describing the version mismatch.
40998 // The returned string is owned by GTK+ and should not be modified
40999 // or freed.
41000 // RETURNS: %NULL if the GTK+ library is compatible with the
41001 // <required_major>: the required major version.
41002 // <required_minor>: the required minor version.
41003 // <required_micro>: the required micro version.
41004 static char* check_version()(uint required_major, uint required_minor, uint required_micro) {
41005 return gtk_check_version(required_major, required_minor, required_micro);
41008 static Type ctree_node_get_type()() {
41009 return gtk_ctree_node_get_type();
41013 // Prevents gtk_init(), gtk_init_check(), gtk_init_with_args() and
41014 // gtk_parse_args() from automatically
41015 // calling <literal>setlocale (LC_ALL, "")</literal>. You would
41016 // want to use this function if you wanted to set the locale for
41017 // your program to something other than the user's locale, or if
41018 // you wanted to set different values for different locale categories.
41019 // Most programs should not need to call this function.
41020 static void disable_setlocale()() {
41021 gtk_disable_setlocale();
41025 // Initiates a drag on the source side. The function
41026 // only needs to be used when the application is
41027 // starting drags itself, and is not needed when
41028 // gtk_drag_source_set() is used.
41029 // The @event is used to retrieve the timestamp that will be used internally to
41030 // grab the pointer. If @event is #NULL, then GDK_CURRENT_TIME will be used.
41031 // However, you should try to pass a real event in all cases, since that can be
41032 // used by GTK+ to get information about the start position of the drag, for
41033 // example if the @event is a GDK_MOTION_NOTIFY.
41034 // Generally there are three cases when you want to start a drag by hand by calling
41035 // this function:
41036 // 1. During a button-press-event handler, if you want to start a drag immediately
41037 // when the user presses the mouse button. Pass the @event that you have in your
41038 // button-press-event handler.
41039 // 2. During a motion-notify-event handler, if you want to start a drag when the mouse
41040 // moves past a certain threshold distance after a button-press. Pass the @event that you
41041 // have in your motion-notify-event handler.
41042 // 3. During a timeout handler, if you want to start a drag after the mouse
41043 // button is held down for some time. Try to save the last event that you got
41044 // from the mouse, using gdk_event_copy(), and pass it to this function
41045 // (remember to free the event with gdk_event_free() when you are done). If you
41046 // can really not pass a real event, pass #NULL instead.
41047 // RETURNS: the context for this drag.
41048 // <widget>: the source widget.
41049 // <targets>: The targets (data formats) in which the source can provide the data.
41050 // <actions>: A bitmask of the allowed drag actions for this drag.
41051 // <button>: The button the user clicked to start the drag.
41052 // <event>: The event that triggered the start of the drag.
41053 static Gdk2.DragContext* drag_begin()(Widget* widget, TargetList* targets, Gdk2.DragAction actions, int button, Gdk2.Event* event) {
41054 return gtk_drag_begin(widget, targets, actions, button, event);
41058 // Checks to see if a mouse drag starting at (@start_x, @start_y) and ending
41059 // at (@current_x, @current_y) has passed the GTK+ drag threshold, and thus
41060 // should trigger the beginning of a drag-and-drop operation.
41061 // RETURNS: %TRUE if the drag threshold has been passed.
41062 // <widget>: a #GtkWidget
41063 // <start_x>: X coordinate of start of drag
41064 // <start_y>: Y coordinate of start of drag
41065 // <current_x>: current X coordinate
41066 // <current_y>: current Y coordinate
41067 static int drag_check_threshold()(Widget* widget, int start_x, int start_y, int current_x, int current_y) {
41068 return gtk_drag_check_threshold(widget, start_x, start_y, current_x, current_y);
41072 // VERSION: 2.6
41073 // Add the image targets supported by #GtkSelection to
41074 // the target list of the drag destination. The targets
41075 // are added with @info = 0. If you need another value,
41076 // use gtk_target_list_add_image_targets() and
41077 // gtk_drag_dest_set_target_list().
41078 // <widget>: a #GtkWidget that's a drag destination
41079 static void drag_dest_add_image_targets()(Widget* widget) {
41080 gtk_drag_dest_add_image_targets(widget);
41084 // VERSION: 2.6
41085 // Add the text targets supported by #GtkSelection to
41086 // the target list of the drag destination. The targets
41087 // are added with @info = 0. If you need another value,
41088 // use gtk_target_list_add_text_targets() and
41089 // gtk_drag_dest_set_target_list().
41090 // <widget>: a #GtkWidget that's a drag destination
41091 static void drag_dest_add_text_targets()(Widget* widget) {
41092 gtk_drag_dest_add_text_targets(widget);
41096 // VERSION: 2.6
41097 // Add the URI targets supported by #GtkSelection to
41098 // the target list of the drag destination. The targets
41099 // are added with @info = 0. If you need another value,
41100 // use gtk_target_list_add_uri_targets() and
41101 // gtk_drag_dest_set_target_list().
41102 // <widget>: a #GtkWidget that's a drag destination
41103 static void drag_dest_add_uri_targets()(Widget* widget) {
41104 gtk_drag_dest_add_uri_targets(widget);
41108 // and the dest can accept, or %GDK_NONE
41109 // RETURNS: first target that the source offers
41110 // <widget>: drag destination widget
41111 // <context>: drag context
41112 // <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.
41113 static Gdk2.Atom drag_dest_find_target()(Widget* widget, Gdk2.DragContext* context, TargetList* target_list=null) {
41114 return gtk_drag_dest_find_target(widget, context, target_list);
41118 // Returns the list of targets this widget can accept from
41119 // drag-and-drop.
41120 // RETURNS: the #GtkTargetList, or %NULL if none
41121 // <widget>: a #GtkWidget
41122 static TargetList* drag_dest_get_target_list()(Widget* widget) {
41123 return gtk_drag_dest_get_target_list(widget);
41127 // VERSION: 2.10
41128 // Returns whether the widget has been configured to always
41129 // emit ::drag-motion signals.
41130 // RETURNS: %TRUE if the widget always emits ::drag-motion events
41131 // <widget>: a #GtkWidget that's a drag destination
41132 static int drag_dest_get_track_motion()(Widget* widget) {
41133 return gtk_drag_dest_get_track_motion(widget);
41137 // Sets a widget as a potential drop destination, and adds default behaviors.
41138 // The default behaviors listed in @flags have an effect similar
41139 // to installing default handlers for the widget's drag-and-drop signals
41140 // (#GtkWidget:drag-motion, #GtkWidget:drag-drop, ...). They all exist
41141 // for convenience. When passing #GTK_DEST_DEFAULT_ALL for instance it is
41142 // sufficient to connect to the widget's #GtkWidget::drag-data-received
41143 // signal to get primitive, but consistent drag-and-drop support.
41144 // Things become more complicated when you try to preview the dragged data,
41145 // as described in the documentation for #GtkWidget:drag-motion. The default
41146 // behaviors described by @flags make some assumptions, that can conflict
41147 // with your own signal handlers. For instance #GTK_DEST_DEFAULT_DROP causes
41148 // invokations of gdk_drag_status() in the context of #GtkWidget:drag-motion,
41149 // and invokations of gtk_drag_finish() in #GtkWidget:drag-data-received.
41150 // Especially the later is dramatic, when your own #GtkWidget:drag-motion
41151 // handler calls gtk_drag_get_data() to inspect the dragged data.
41152 // There's no way to set a default action here, you can use the
41153 // #GtkWidget:drag-motion callback for that. Here's an example which selects
41154 // the action to use depending on whether the control key is pressed or not:
41155 // |[
41156 // static void
41157 // drag_motion (GtkWidget *widget,
41158 // GdkDragContext *context,
41159 // gint x,
41160 // gint y,
41161 // guint time)
41162 // {
41163 // GdkModifierType mask;
41164 // gdk_window_get_pointer (gtk_widget_get_window (widget),
41165 // NULL, NULL, &mask);
41166 // if (mask & GDK_CONTROL_MASK)
41167 // gdk_drag_status (context, GDK_ACTION_COPY, time);
41168 // else
41169 // gdk_drag_status (context, GDK_ACTION_MOVE, time);
41170 // }
41171 // ]|
41172 // <widget>: a #GtkWidget
41173 // <flags>: which types of default drag behavior to use
41174 // <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().
41175 // <n_targets>: the number of entries in @targets
41176 // <actions>: a bitmask of possible actions for a drop onto this @widget.
41177 static void drag_dest_set()(Widget* widget, DestDefaults flags, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
41178 gtk_drag_dest_set(widget, flags, targets, n_targets, actions);
41181 static void drag_dest_set_proxy()(Widget* widget, Gdk2.Window* proxy_window, Gdk2.DragProtocol protocol, int use_coordinates) {
41182 gtk_drag_dest_set_proxy(widget, proxy_window, protocol, use_coordinates);
41186 // Sets the target types that this widget can accept from drag-and-drop.
41187 // The widget must first be made into a drag destination with
41188 // gtk_drag_dest_set().
41189 // <widget>: a #GtkWidget that's a drag destination
41190 // <target_list>: list of droppable targets, or %NULL for none
41191 static void drag_dest_set_target_list()(Widget* widget, TargetList* target_list=null) {
41192 gtk_drag_dest_set_target_list(widget, target_list);
41196 // VERSION: 2.10
41197 // Tells the widget to emit ::drag-motion and ::drag-leave
41198 // events regardless of the targets and the %GTK_DEST_DEFAULT_MOTION
41199 // flag.
41200 // This may be used when a widget wants to do generic
41201 // actions regardless of the targets that the source offers.
41202 // <widget>: a #GtkWidget that's a drag destination
41203 // <track_motion>: whether to accept all targets
41204 static void drag_dest_set_track_motion()(Widget* widget, int track_motion) {
41205 gtk_drag_dest_set_track_motion(widget, track_motion);
41208 static void drag_dest_unset()(Widget* widget) {
41209 gtk_drag_dest_unset(widget);
41212 static void drag_finish()(Gdk2.DragContext* context, int success, int del, uint time_) {
41213 gtk_drag_finish(context, success, del, time_);
41216 static void drag_get_data()(Widget* widget, Gdk2.DragContext* context, Gdk2.Atom target, uint time_) {
41217 gtk_drag_get_data(widget, context, target, time_);
41221 // Determines the source widget for a drag.
41222 // within a single application, a pointer to the source widget.
41223 // Otherwise, %NULL.
41224 // RETURNS: if the drag is occurring
41225 // <context>: a (destination side) drag context
41226 static Widget* drag_get_source_widget()(Gdk2.DragContext* context) {
41227 return gtk_drag_get_source_widget(context);
41230 static void drag_highlight()(Widget* widget) {
41231 gtk_drag_highlight(widget);
41235 // DEPRECATED function: drag_set_default_icon - Change the default drag icon via the stock system by
41236 // Changes the default drag icon. GTK+ retains references for the
41237 // arguments, and will release them when they are no longer needed.
41238 // changing the stock pixbuf for #GTK_STOCK_DND instead.
41239 // <colormap>: the colormap of the icon
41240 // <pixmap>: the image data for the icon
41241 // <mask>: the transparency mask for an image, or %NULL
41242 // <hot_x>: The X offset within @widget of the hotspot.
41243 // <hot_y>: The Y offset within @widget of the hotspot.
41244 static void drag_set_default_icon()(Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y) {
41245 gtk_drag_set_default_icon(colormap, pixmap, mask, hot_x, hot_y);
41249 // Sets the icon for a particular drag to the default
41250 // icon.
41251 // <context>: the context for a drag. (This must be called
41252 static void drag_set_icon_default()(Gdk2.DragContext* context) {
41253 gtk_drag_set_icon_default(context);
41257 // VERSION: 2.8
41258 // Sets the icon for a given drag from a named themed icon. See
41259 // the docs for #GtkIconTheme for more details. Note that the
41260 // size of the icon depends on the icon theme (the icon is
41261 // loaded at the symbolic size #GTK_ICON_SIZE_DND), thus
41262 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
41263 // <icon_name>: name of icon to use
41264 // <hot_x>: the X offset of the hotspot within the icon
41265 // <hot_y>: the Y offset of the hotspot within the icon
41266 static void drag_set_icon_name()(Gdk2.DragContext* context, char* icon_name, int hot_x, int hot_y) {
41267 gtk_drag_set_icon_name(context, icon_name, hot_x, hot_y);
41271 // Sets @pixbuf as the icon for a given drag.
41272 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
41273 // <pixbuf>: the #GdkPixbuf to use as the drag icon.
41274 // <hot_x>: the X offset within @widget of the hotspot.
41275 // <hot_y>: the Y offset within @widget of the hotspot.
41276 static void drag_set_icon_pixbuf()(Gdk2.DragContext* context, GdkPixbuf2.Pixbuf* pixbuf, int hot_x, int hot_y) {
41277 gtk_drag_set_icon_pixbuf(context, pixbuf, hot_x, hot_y);
41281 // Sets @pixmap as the icon for a given drag. GTK+ retains
41282 // references for the arguments, and will release them when
41283 // they are no longer needed. In general, gtk_drag_set_icon_pixbuf()
41284 // will be more convenient to use.
41285 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
41286 // <colormap>: the colormap of the icon
41287 // <pixmap>: the image data for the icon
41288 // <mask>: the transparency mask for the icon or %NULL for none.
41289 // <hot_x>: the X offset within @pixmap of the hotspot.
41290 // <hot_y>: the Y offset within @pixmap of the hotspot.
41291 static void drag_set_icon_pixmap()(Gdk2.DragContext* context, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y) {
41292 gtk_drag_set_icon_pixmap(context, colormap, pixmap, mask, hot_x, hot_y);
41296 // Sets the icon for a given drag from a stock ID.
41297 // <context>: the context for a drag. (This must be called with a context for the source side of a drag)
41298 // <stock_id>: the ID of the stock icon to use for the drag.
41299 // <hot_x>: the X offset within the icon of the hotspot.
41300 // <hot_y>: the Y offset within the icon of the hotspot.
41301 static void drag_set_icon_stock()(Gdk2.DragContext* context, char* stock_id, int hot_x, int hot_y) {
41302 gtk_drag_set_icon_stock(context, stock_id, hot_x, hot_y);
41306 // Changes the icon for a widget to a given widget. GTK+
41307 // will not destroy the icon, so if you don't want
41308 // it to persist, you should connect to the "drag-end"
41309 // signal and destroy it yourself.
41310 // <context>: the context for a drag. (This must be called
41311 // <widget>: a toplevel window to use as an icon.
41312 // <hot_x>: the X offset within @widget of the hotspot.
41313 // <hot_y>: the Y offset within @widget of the hotspot.
41314 static void drag_set_icon_widget()(Gdk2.DragContext* context, Widget* widget, int hot_x, int hot_y) {
41315 gtk_drag_set_icon_widget(context, widget, hot_x, hot_y);
41319 // VERSION: 2.6
41320 // Add the writable image targets supported by #GtkSelection to
41321 // the target list of the drag source. The targets
41322 // are added with @info = 0. If you need another value,
41323 // use gtk_target_list_add_image_targets() and
41324 // gtk_drag_source_set_target_list().
41325 // <widget>: a #GtkWidget that's is a drag source
41326 static void drag_source_add_image_targets()(Widget* widget) {
41327 gtk_drag_source_add_image_targets(widget);
41331 // VERSION: 2.6
41332 // Add the text targets supported by #GtkSelection to
41333 // the target list of the drag source. The targets
41334 // are added with @info = 0. If you need another value,
41335 // use gtk_target_list_add_text_targets() and
41336 // gtk_drag_source_set_target_list().
41337 // <widget>: a #GtkWidget that's is a drag source
41338 static void drag_source_add_text_targets()(Widget* widget) {
41339 gtk_drag_source_add_text_targets(widget);
41343 // VERSION: 2.6
41344 // Add the URI targets supported by #GtkSelection to
41345 // the target list of the drag source. The targets
41346 // are added with @info = 0. If you need another value,
41347 // use gtk_target_list_add_uri_targets() and
41348 // gtk_drag_source_set_target_list().
41349 // <widget>: a #GtkWidget that's is a drag source
41350 static void drag_source_add_uri_targets()(Widget* widget) {
41351 gtk_drag_source_add_uri_targets(widget);
41355 // VERSION: 2.4
41356 // Gets the list of targets this widget can provide for
41357 // drag-and-drop.
41358 // RETURNS: the #GtkTargetList, or %NULL if none
41359 // <widget>: a #GtkWidget
41360 static TargetList* drag_source_get_target_list()(Widget* widget) {
41361 return gtk_drag_source_get_target_list(widget);
41365 // Sets up a widget so that GTK+ will start a drag operation when the user
41366 // clicks and drags on the widget. The widget must have a window.
41367 // <widget>: a #GtkWidget
41368 // <start_button_mask>: the bitmask of buttons that can start the drag
41369 // <targets>: the table of targets that the drag will support, may be %NULL
41370 // <n_targets>: the number of items in @targets
41371 // <actions>: the bitmask of possible actions for a drag from this widget
41372 static void drag_source_set()(Widget* widget, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions) {
41373 gtk_drag_source_set(widget, start_button_mask, targets, n_targets, actions);
41377 // Sets the icon that will be used for drags from a particular widget
41378 // from a pixmap/mask. GTK+ retains references for the arguments, and
41379 // will release them when they are no longer needed.
41380 // Use gtk_drag_source_set_icon_pixbuf() instead.
41381 // <widget>: a #GtkWidget
41382 // <colormap>: the colormap of the icon
41383 // <pixmap>: the image data for the icon
41384 // <mask>: the transparency mask for an image.
41385 static void drag_source_set_icon()(Widget* widget, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null) {
41386 gtk_drag_source_set_icon(widget, colormap, pixmap, mask);
41390 // VERSION: 2.8
41391 // Sets the icon that will be used for drags from a particular source
41392 // to a themed icon. See the docs for #GtkIconTheme for more details.
41393 // <widget>: a #GtkWidget
41394 // <icon_name>: name of icon to use
41395 static void drag_source_set_icon_name()(Widget* widget, char* icon_name) {
41396 gtk_drag_source_set_icon_name(widget, icon_name);
41400 // Sets the icon that will be used for drags from a particular widget
41401 // from a #GdkPixbuf. GTK+ retains a reference for @pixbuf and will
41402 // release it when it is no longer needed.
41403 // <widget>: a #GtkWidget
41404 // <pixbuf>: the #GdkPixbuf for the drag icon
41405 static void drag_source_set_icon_pixbuf()(Widget* widget, GdkPixbuf2.Pixbuf* pixbuf) {
41406 gtk_drag_source_set_icon_pixbuf(widget, pixbuf);
41410 // Sets the icon that will be used for drags from a particular source
41411 // to a stock icon.
41412 // <widget>: a #GtkWidget
41413 // <stock_id>: the ID of the stock icon to use
41414 static void drag_source_set_icon_stock()(Widget* widget, char* stock_id) {
41415 gtk_drag_source_set_icon_stock(widget, stock_id);
41419 // VERSION: 2.4
41420 // Changes the target types that this widget offers for drag-and-drop.
41421 // The widget must first be made into a drag source with
41422 // gtk_drag_source_set().
41423 // <widget>: a #GtkWidget that's a drag source
41424 // <target_list>: list of draggable targets, or %NULL for none
41425 static void drag_source_set_target_list()(Widget* widget, TargetList* target_list=null) {
41426 gtk_drag_source_set_target_list(widget, target_list);
41429 static void drag_source_unset()(Widget* widget) {
41430 gtk_drag_source_unset(widget);
41433 static void drag_unhighlight()(Widget* widget) {
41434 gtk_drag_unhighlight(widget);
41438 // DEPRECATED (v2.0) function: draw_arrow - Use gtk_paint_arrow() instead.
41439 // Draws an arrow in the given rectangle on @window using the given
41440 // parameters. @arrow_type determines the direction of the arrow.
41441 // <style>: a #GtkStyle
41442 // <window>: a #GdkWindow
41443 // <state_type>: a state
41444 // <shadow_type>: the type of shadow to draw
41445 // <arrow_type>: the type of arrow to draw
41446 // <fill>: %TRUE if the arrow tip should be filled
41447 // <x>: x origin of the rectangle to draw the arrow in
41448 // <y>: y origin of the rectangle to draw the arrow in
41449 // <width>: width of the rectangle to draw the arrow in
41450 // <height>: height of the rectangle to draw the arrow in
41451 static void draw_arrow()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, ArrowType arrow_type, int fill, int x, int y, int width, int height) {
41452 gtk_draw_arrow(style, window, state_type, shadow_type, arrow_type, fill, x, y, width, height);
41456 // DEPRECATED (v2.0) function: draw_box - Use gtk_paint_box() instead.
41457 // Draws a box on @window with the given parameters.
41458 // <style>: a #GtkStyle
41459 // <window>: a #GdkWindow
41460 // <state_type>: a state
41461 // <shadow_type>: the type of shadow to draw
41462 // <x>: x origin of the box
41463 // <y>: y origin of the box
41464 // <width>: the width of the box
41465 // <height>: the height of the box
41466 static void draw_box()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
41467 gtk_draw_box(style, window, state_type, shadow_type, x, y, width, height);
41471 // DEPRECATED (v2.0) function: draw_box_gap - Use gtk_paint_box_gap() instead.
41472 // Draws a box in @window using the given style and state and shadow type,
41473 // leaving a gap in one side.
41474 // <style>: a #GtkStyle
41475 // <window>: a #GdkWindow
41476 // <state_type>: a state
41477 // <shadow_type>: type of shadow to draw
41478 // <x>: x origin of the rectangle
41479 // <y>: y origin of the rectangle
41480 // <width>: width of the rectangle
41481 // <height>: width of the rectangle
41482 // <gap_side>: side in which to leave the gap
41483 // <gap_x>: starting position of the gap
41484 // <gap_width>: width of the gap
41485 static void draw_box_gap()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
41486 gtk_draw_box_gap(style, window, state_type, shadow_type, x, y, width, height, gap_side, gap_x, gap_width);
41490 // DEPRECATED (v2.0) function: draw_check - Use gtk_paint_check() instead.
41491 // Draws a check button indicator in the given rectangle on @window with
41492 // the given parameters.
41493 // <style>: a #GtkStyle
41494 // <window>: a #GdkWindow
41495 // <state_type>: a state
41496 // <shadow_type>: the type of shadow to draw
41497 // <x>: x origin of the rectangle to draw the check in
41498 // <y>: y origin of the rectangle to draw the check in
41499 // <width>: the width of the rectangle to draw the check in
41500 // <height>: the height of the rectangle to draw the check in
41501 static void draw_check()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
41502 gtk_draw_check(style, window, state_type, shadow_type, x, y, width, height);
41506 // DEPRECATED (v2.0) function: draw_diamond - Use gtk_paint_diamond() instead.
41507 // Draws a diamond in the given rectangle on @window using the given
41508 // parameters.
41509 // <style>: a #GtkStyle
41510 // <window>: a #GdkWindow
41511 // <state_type>: a state
41512 // <shadow_type>: the type of shadow to draw
41513 // <x>: x origin of the rectangle to draw the diamond in
41514 // <y>: y origin of the rectangle to draw the diamond in
41515 // <width>: width of the rectangle to draw the diamond in
41516 // <height>: height of the rectangle to draw the diamond in
41517 static void draw_diamond()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
41518 gtk_draw_diamond(style, window, state_type, shadow_type, x, y, width, height);
41522 // DEPRECATED (v2.0) function: draw_expander - Use gtk_paint_expander() instead.
41523 // Draws an expander as used in #GtkTreeView.
41524 // <style>: a #GtkStyle
41525 // <window>: a #GdkWindow
41526 // <state_type>: a state
41527 // <x>: the x position to draw the expander at
41528 // <y>: the y position to draw the expander at
41529 // <expander_style>: the style to draw the expander in
41530 static void draw_expander()(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, ExpanderStyle expander_style) {
41531 gtk_draw_expander(style, window, state_type, x, y, expander_style);
41535 // DEPRECATED (v2.0) function: draw_extension - Use gtk_paint_extension() instead.
41536 // Draws an extension, i.e. a notebook tab.
41537 // <style>: a #GtkStyle
41538 // <window>: a #GdkWindow
41539 // <state_type>: a state
41540 // <shadow_type>: type of shadow to draw
41541 // <x>: x origin of the extension
41542 // <y>: y origin of the extension
41543 // <width>: width of the extension
41544 // <height>: width of the extension
41545 // <gap_side>: the side on to which the extension is attached
41546 static void draw_extension()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side) {
41547 gtk_draw_extension(style, window, state_type, shadow_type, x, y, width, height, gap_side);
41551 // DEPRECATED (v2.0) function: draw_flat_box - Use gtk_paint_flat_box() instead.
41552 // Draws a flat box on @window with the given parameters.
41553 // <style>: a #GtkStyle
41554 // <window>: a #GdkWindow
41555 // <state_type>: a state
41556 // <shadow_type>: the type of shadow to draw
41557 // <x>: x origin of the box
41558 // <y>: y origin of the box
41559 // <width>: the width of the box
41560 // <height>: the height of the box
41561 static void draw_flat_box()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
41562 gtk_draw_flat_box(style, window, state_type, shadow_type, x, y, width, height);
41566 // DEPRECATED (v2.0) function: draw_focus - Use gtk_paint_focus() instead.
41567 // Draws a focus indicator around the given rectangle on @window using the
41568 // given style.
41569 // <style>: a #GtkStyle
41570 // <window>: a #GdkWindow
41571 // <x>: the x origin of the rectangle around which to draw a focus indicator
41572 // <y>: the y origin of the rectangle around which to draw a focus indicator
41573 // <width>: the width of the rectangle around which to draw a focus indicator
41574 // <height>: the height of the rectangle around which to draw a focus indicator
41575 static void draw_focus()(Style* style, Gdk2.Window* window, int x, int y, int width, int height) {
41576 gtk_draw_focus(style, window, x, y, width, height);
41580 // DEPRECATED (v2.0) function: draw_handle - Use gtk_paint_handle() instead.
41581 // Draws a handle as used in #GtkHandleBox and #GtkPaned.
41582 // <style>: a #GtkStyle
41583 // <window>: a #GdkWindow
41584 // <state_type>: a state
41585 // <shadow_type>: type of shadow to draw
41586 // <x>: x origin of the handle
41587 // <y>: y origin of the handle
41588 // <width>: with of the handle
41589 // <height>: height of the handle
41590 // <orientation>: the orientation of the handle
41591 static void draw_handle()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation) {
41592 gtk_draw_handle(style, window, state_type, shadow_type, x, y, width, height, orientation);
41596 // DEPRECATED (v2.0) function: draw_hline - Use gtk_paint_hline() instead.
41597 // Draws a horizontal line from (@x1, @y) to (@x2, @y) in @window
41598 // using the given style and state.
41599 // <style>: a #GtkStyle
41600 // <window>: a #GdkWindow
41601 // <state_type>: a state
41602 // <x1>: the starting x coordinate
41603 // <x2>: the ending x coordinate
41604 // <y>: the y coordinate
41605 static void draw_hline()(Style* style, Gdk2.Window* window, StateType state_type, int x1, int x2, int y) {
41606 gtk_draw_hline(style, window, state_type, x1, x2, y);
41610 // VERSION: 2.4
41611 // Draws a text caret on @drawable at @location. This is not a style function
41612 // but merely a convenience function for drawing the standard cursor shape.
41613 // <widget>: a #GtkWidget
41614 // <drawable>: a #GdkDrawable
41615 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
41616 // <location>: location where to draw the cursor (@location->width is ignored)
41617 // <is_primary>: if the cursor should be the primary cursor color.
41618 // <direction>: whether the cursor is left-to-right or right-to-left. Should never be #GTK_TEXT_DIR_NONE
41619 // <draw_arrow>: %TRUE to draw a directional arrow on the cursor. Should be %FALSE unless the cursor is split.
41620 static void draw_insertion_cursor()(Widget* widget, Gdk2.Drawable* drawable, Gdk2.Rectangle* area, Gdk2.Rectangle* location, int is_primary, TextDirection direction, int draw_arrow) {
41621 gtk_draw_insertion_cursor(widget, drawable, area, location, is_primary, direction, draw_arrow);
41625 // Draws a layout on @window using the given parameters.
41626 // <style>: a #GtkStyle
41627 // <window>: a #GdkWindow
41628 // <state_type>: a state
41629 // <use_text>: whether to use the text or foreground graphics context of @style
41630 // <x>: x origin
41631 // <y>: y origin
41632 // <layout>: the layout to draw
41633 static void draw_layout()(Style* style, Gdk2.Window* window, StateType state_type, int use_text, int x, int y, Pango.Layout* layout) {
41634 gtk_draw_layout(style, window, state_type, use_text, x, y, layout);
41638 // DEPRECATED (v2.0) function: draw_option - Use gtk_paint_option() instead.
41639 // Draws a radio button indicator in the given rectangle on @window with
41640 // the given parameters.
41641 // <style>: a #GtkStyle
41642 // <window>: a #GdkWindow
41643 // <state_type>: a state
41644 // <shadow_type>: the type of shadow to draw
41645 // <x>: x origin of the rectangle to draw the option in
41646 // <y>: y origin of the rectangle to draw the option in
41647 // <width>: the width of the rectangle to draw the option in
41648 // <height>: the height of the rectangle to draw the option in
41649 static void draw_option()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
41650 gtk_draw_option(style, window, state_type, shadow_type, x, y, width, height);
41654 // DEPRECATED (v2.0) function: draw_polygon - Use gtk_paint_polygon() instead.
41655 // Draws a polygon on @window with the given parameters.
41656 // <style>: a #GtkStyle
41657 // <window>: a #GdkWindow
41658 // <state_type>: a state
41659 // <shadow_type>: type of shadow to draw
41660 // <points>: an array of #GdkPoint<!-- -->s
41661 // <npoints>: length of @points
41662 // <fill>: %TRUE if the polygon should be filled
41663 static void draw_polygon()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Point* points, int npoints, int fill) {
41664 gtk_draw_polygon(style, window, state_type, shadow_type, points, npoints, fill);
41668 // DEPRECATED (v2.0) function: draw_resize_grip - Use gtk_paint_resize_grip() instead.
41669 // Draws a resize grip in the given rectangle on @window using the given
41670 // parameters.
41671 // <style>: a #GtkStyle
41672 // <window>: a #GdkWindow
41673 // <state_type>: a state
41674 // <edge>: the edge in which to draw the resize grip
41675 // <x>: the x origin of the rectangle in which to draw the resize grip
41676 // <y>: the y origin of the rectangle in which to draw the resize grip
41677 // <width>: the width of the rectangle in which to draw the resize grip
41678 // <height>: the height of the rectangle in which to draw the resize grip
41679 static void draw_resize_grip()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.WindowEdge edge, int x, int y, int width, int height) {
41680 gtk_draw_resize_grip(style, window, state_type, edge, x, y, width, height);
41684 // DEPRECATED (v2.0) function: draw_shadow - Use gtk_paint_shadow() instead.
41685 // Draws a shadow around the given rectangle in @window
41686 // using the given style and state and shadow type.
41687 // <style>: a #GtkStyle
41688 // <window>: a #GdkWindow
41689 // <state_type>: a state
41690 // <shadow_type>: type of shadow to draw
41691 // <x>: x origin of the rectangle
41692 // <y>: y origin of the rectangle
41693 // <width>: width of the rectangle
41694 // <height>: width of the rectangle
41695 static void draw_shadow()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
41696 gtk_draw_shadow(style, window, state_type, shadow_type, x, y, width, height);
41700 // DEPRECATED (v2.0) function: draw_shadow_gap - Use gtk_paint_shadow_gap() instead.
41701 // Draws a shadow around the given rectangle in @window
41702 // using the given style and state and shadow type, leaving a
41703 // gap in one side.
41704 // <style>: a #GtkStyle
41705 // <window>: a #GdkWindow
41706 // <state_type>: a state
41707 // <shadow_type>: type of shadow to draw
41708 // <x>: x origin of the rectangle
41709 // <y>: y origin of the rectangle
41710 // <width>: width of the rectangle
41711 // <height>: width of the rectangle
41712 // <gap_side>: side in which to leave the gap
41713 // <gap_x>: starting position of the gap
41714 // <gap_width>: width of the gap
41715 static void draw_shadow_gap()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
41716 gtk_draw_shadow_gap(style, window, state_type, shadow_type, x, y, width, height, gap_side, gap_x, gap_width);
41720 // Draws a slider in the given rectangle on @window using the
41721 // given style and orientation.
41722 // <style>: a #GtkStyle
41723 // <state_type>: a state
41724 // <shadow_type>: a shadow
41725 // <x>: the x origin of the rectangle in which to draw a slider
41726 // <y>: the y origin of the rectangle in which to draw a slider
41727 // <width>: the width of the rectangle in which to draw a slider
41728 // <height>: the height of the rectangle in which to draw a slider
41729 // <orientation>: the orientation to be used
41730 static void draw_slider()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height, Orientation orientation) {
41731 gtk_draw_slider(style, window, state_type, shadow_type, x, y, width, height, orientation);
41735 // DEPRECATED (v2.0) function: draw_string - Use gtk_paint_layout() instead.
41736 // Draws a text string on @window with the given parameters.
41737 // <style>: a #GtkStyle
41738 // <window>: a #GdkWindow
41739 // <state_type>: a state
41740 // <x>: x origin
41741 // <y>: y origin
41742 // <string>: the string to draw
41743 static void draw_string()(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, char* string_) {
41744 gtk_draw_string(style, window, state_type, x, y, string_);
41748 // DEPRECATED (v2.0) function: draw_tab - Use gtk_paint_tab() instead.
41749 // Draws an option menu tab (i.e. the up and down pointing arrows)
41750 // in the given rectangle on @window using the given parameters.
41751 // <style>: a #GtkStyle
41752 // <window>: a #GdkWindow
41753 // <state_type>: a state
41754 // <shadow_type>: the type of shadow to draw
41755 // <x>: x origin of the rectangle to draw the tab in
41756 // <y>: y origin of the rectangle to draw the tab in
41757 // <width>: the width of the rectangle to draw the tab in
41758 // <height>: the height of the rectangle to draw the tab in
41759 static void draw_tab()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height) {
41760 gtk_draw_tab(style, window, state_type, shadow_type, x, y, width, height);
41764 // DEPRECATED (v2.0) function: draw_vline - Use gtk_paint_vline() instead.
41765 // Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @window
41766 // using the given style and state.
41767 // <style>: a #GtkStyle
41768 // <window>: a #GdkWindow
41769 // <state_type>: a state
41770 // <y1_>: the starting y coordinate
41771 // <y2_>: the ending y coordinate
41772 // <x>: the x coordinate
41773 static void draw_vline()(Style* style, Gdk2.Window* window, StateType state_type, int y1_, int y2_, int x) {
41774 gtk_draw_vline(style, window, state_type, y1_, y2_, x);
41777 static int events_pending()() {
41778 return gtk_events_pending();
41781 static void exit()(int error_code) {
41782 gtk_exit(error_code);
41785 static int false_()() {
41786 return gtk_false();
41790 // VERSION: 2.4
41791 // Registers an error quark for #GtkFileChooser if necessary.
41792 // RETURNS: The error quark used for #GtkFileChooser errors.
41793 static GLib2.Quark file_chooser_error_quark()() {
41794 return gtk_file_chooser_error_quark();
41797 // Unintrospectable function: gc_get() / gtk_gc_get()
41798 static Gdk2.GC* gc_get()(int depth, Gdk2.Colormap* colormap, Gdk2.GCValues* values, Gdk2.GCValuesMask values_mask) {
41799 return gtk_gc_get(depth, colormap, values, values_mask);
41802 static void gc_release()(Gdk2.GC* gc) {
41803 gtk_gc_release(gc);
41807 // Obtains a copy of the event currently being processed by GTK+. For
41808 // example, if you get a "clicked" signal from #GtkButton, the current
41809 // event will be the #GdkEventButton that triggered the "clicked"
41810 // signal. The returned event must be freed with gdk_event_free().
41811 // If there is no current event, the function returns %NULL.
41812 // current event.
41813 // RETURNS: a copy of the current event, or %NULL if no
41814 static Gdk2.Event* /*new*/ get_current_event()() {
41815 return gtk_get_current_event();
41819 // If there is a current event and it has a state field, place
41820 // that state field in @state and return %TRUE, otherwise return
41821 // %FALSE.
41822 // RETURNS: %TRUE if there was a current event and it had a state field
41823 // <state>: a location to store the state of the current event
41824 static int get_current_event_state()(/*out*/ Gdk2.ModifierType* state) {
41825 return gtk_get_current_event_state(state);
41829 // If there is a current event and it has a timestamp, return that
41830 // timestamp, otherwise return %GDK_CURRENT_TIME.
41831 // RETURNS: the timestamp from the current event, or %GDK_CURRENT_TIME.
41832 static uint get_current_event_time()() {
41833 return gtk_get_current_event_time();
41837 // Returns the #PangoLanguage for the default language currently in
41838 // effect. (Note that this can change over the life of an
41839 // application.) The default language is derived from the current
41840 // locale. It determines, for example, whether GTK+ uses the
41841 // right-to-left or left-to-right text direction.
41842 // This function is equivalent to pango_language_get_default(). See
41843 // that function for details.
41844 // freed
41845 // RETURNS: the default language as a #PangoLanguage, must not be
41846 static Pango.Language* /*new*/ get_default_language()() {
41847 return gtk_get_default_language();
41851 // If @event is %NULL or the event was not associated with any widget,
41852 // returns %NULL, otherwise returns the widget that received the event
41853 // originally.
41854 // received @event, or %NULL
41855 // RETURNS: the widget that originally
41856 // <event>: a #GdkEvent
41857 static Widget* get_event_widget()(Gdk2.Event* event) {
41858 return gtk_get_event_widget(event);
41862 // Unintrospectable function: get_option_group() / gtk_get_option_group()
41863 // VERSION: 2.6
41864 // Returns a #GOptionGroup for the commandline arguments recognized
41865 // by GTK+ and GDK. You should add this group to your #GOptionContext
41866 // with g_option_context_add_group(), if you are using
41867 // g_option_context_parse() to parse your commandline arguments.
41868 // by GTK+
41869 // RETURNS: a #GOptionGroup for the commandline arguments recognized
41870 // <open_default_display>: whether to open the default display when parsing the commandline arguments
41871 static GLib2.OptionGroup* get_option_group()(int open_default_display) {
41872 return gtk_get_option_group(open_default_display);
41875 static void grab_add()(Widget* widget) {
41876 gtk_grab_add(widget);
41880 // Queries the current grab of the default window group.
41881 // has the grab or %NULL if no grab is active
41882 // RETURNS: The widget which currently
41883 static Widget* grab_get_current()() {
41884 return gtk_grab_get_current();
41887 static void grab_remove()(Widget* widget) {
41888 gtk_grab_remove(widget);
41892 // Looks up the icon size associated with @name.
41893 // RETURNS: the icon size
41894 // <name>: the name to look up.
41895 static int icon_size_from_name()(char* name) {
41896 return gtk_icon_size_from_name(name);
41900 // Gets the canonical name of the given icon size. The returned string
41901 // is statically allocated and should not be freed.
41902 // RETURNS: the name of the given icon size.
41903 // <size>: a #GtkIconSize.
41904 static char* icon_size_get_name()(int size) {
41905 return gtk_icon_size_get_name(size);
41909 // Obtains the pixel size of a semantic icon size, possibly
41910 // modified by user preferences for the default #GtkSettings.
41911 // (See gtk_icon_size_lookup_for_settings().)
41912 // Normally @size would be
41913 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function
41914 // isn't normally needed, gtk_widget_render_icon() is the usual
41915 // way to get an icon for rendering, then just look at the size of
41916 // the rendered pixbuf. The rendered pixbuf may not even correspond to
41917 // the width/height returned by gtk_icon_size_lookup(), because themes
41918 // are free to render the pixbuf however they like, including changing
41919 // the usual size.
41920 // RETURNS: %TRUE if @size was a valid size
41921 // <size>: an icon size
41922 // <width>: location to store icon width
41923 // <height>: location to store icon height
41924 static int icon_size_lookup()(int size, /*out*/ int* width, /*out*/ int* height) {
41925 return gtk_icon_size_lookup(size, width, height);
41929 // VERSION: 2.2
41930 // Obtains the pixel size of a semantic icon size, possibly
41931 // modified by user preferences for a particular
41932 // #GtkSettings. Normally @size would be
41933 // #GTK_ICON_SIZE_MENU, #GTK_ICON_SIZE_BUTTON, etc. This function
41934 // isn't normally needed, gtk_widget_render_icon() is the usual
41935 // way to get an icon for rendering, then just look at the size of
41936 // the rendered pixbuf. The rendered pixbuf may not even correspond to
41937 // the width/height returned by gtk_icon_size_lookup(), because themes
41938 // are free to render the pixbuf however they like, including changing
41939 // the usual size.
41940 // RETURNS: %TRUE if @size was a valid size
41941 // <settings>: a #GtkSettings object, used to determine which set of user preferences to used.
41942 // <size>: an icon size
41943 // <width>: location to store icon width
41944 // <height>: location to store icon height
41945 static int icon_size_lookup_for_settings()(Settings* settings, int size, /*out*/ int* width, /*out*/ int* height) {
41946 return gtk_icon_size_lookup_for_settings(settings, size, width, height);
41950 // Registers a new icon size, along the same lines as #GTK_ICON_SIZE_MENU,
41951 // etc. Returns the integer value for the size.
41952 // RETURNS: integer value representing the size
41953 // <name>: name of the icon size
41954 // <width>: the icon width
41955 // <height>: the icon height
41956 static int icon_size_register()(char* name, int width, int height) {
41957 return gtk_icon_size_register(name, width, height);
41961 // Registers @alias as another name for @target.
41962 // So calling gtk_icon_size_from_name() with @alias as argument
41963 // will return @target.
41964 // <alias>: an alias for @target
41965 // <target>: an existing icon size
41966 static void icon_size_register_alias()(char* alias_, int target) {
41967 gtk_icon_size_register_alias(alias_, target);
41970 static GLib2.Quark icon_theme_error_quark()() {
41971 return gtk_icon_theme_error_quark();
41974 static Type identifier_get_type()() {
41975 return gtk_identifier_get_type();
41978 // Unintrospectable function: idle_add() / gtk_idle_add()
41979 static uint idle_add()(Function function_, void* data) {
41980 return gtk_idle_add(function_, data);
41983 // Unintrospectable function: idle_add_full() / gtk_idle_add_full()
41984 static uint idle_add_full()(int priority, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
41985 return gtk_idle_add_full(priority, function_, marshal, data, destroy);
41988 // Unintrospectable function: idle_add_priority() / gtk_idle_add_priority()
41989 static uint idle_add_priority()(int priority, Function function_, void* data) {
41990 return gtk_idle_add_priority(priority, function_, data);
41993 static void idle_remove()(uint idle_handler_id) {
41994 gtk_idle_remove(idle_handler_id);
41997 static void idle_remove_by_data()(void* data) {
41998 gtk_idle_remove_by_data(data);
42002 // Call this function before using any other GTK+ functions in your GUI
42003 // applications. It will initialize everything needed to operate the
42004 // toolkit and parses some standard command line options.
42005 // never see those standard arguments.
42006 // Note that there are some alternative ways to initialize GTK+:
42007 // if you are calling gtk_parse_args(), gtk_init_check(),
42008 // gtk_init_with_args() or g_option_context_parse() with
42009 // the option group returned by gtk_get_option_group(),
42010 // you <emphasis>don't</emphasis> have to call gtk_init().
42011 // <note><para>
42012 // This function will terminate your program if it was unable to
42013 // initialize the windowing system for some reason. If you want
42014 // your program to fall back to a textual interface you want to
42015 // call gtk_init_check() instead.
42016 // </para></note>
42017 // <note><para>
42018 // Since 2.18, GTK+ calls <literal>signal (SIGPIPE, SIG_IGN)</literal>
42019 // during initialization, to ignore SIGPIPE signals, since these are
42020 // almost never wanted in graphical applications. If you do need to
42021 // handle SIGPIPE for some reason, reset the handler after gtk_init(),
42022 // but notice that other libraries (e.g. libdbus or gvfs) might do
42023 // similar things.
42024 // </para></note>
42025 // <argc>: Address of the <parameter>argc</parameter> parameter of your main() function. Changed if any arguments were handled
42026 // <argv>: Address of the <parameter>argv</parameter> parameter of main(). Any options understood by GTK+ are stripped before return.
42027 static void init()(/*inout*/ int* argc, /*inout*/ char*** argv=null) {
42028 gtk_init(argc, argv);
42031 // Unintrospectable function: init_add() / gtk_init_add()
42032 static void init_add()(Function function_, void* data) {
42033 gtk_init_add(function_, data);
42037 // This function does the same work as gtk_init() with only
42038 // initialized. Instead it returns %FALSE on failure.
42039 // This way the application can fall back to some other means of communication
42040 // with the user - for example a curses or command line interface.
42041 // %FALSE otherwise.
42042 // RETURNS: %TRUE if the GUI has been successfully initialized,
42043 // <argc>: Address of the <parameter>argc</parameter> parameter of your main() function. Changed if any arguments were handled.
42044 // <argv>: Address of the <parameter>argv</parameter> parameter of main(). Any parameters understood by gtk_init() are stripped before return.
42045 static int init_check()(/*inout*/ int* argc, /*inout*/ char*** argv=null) {
42046 return gtk_init_check(argc, argv);
42050 // VERSION: 2.6
42051 // This function does the same work as gtk_init_check().
42052 // Additionally, it allows you to add your own commandline options,
42053 // and it automatically generates nicely formatted
42054 // <option>--help</option> output. Note that your program will
42055 // be terminated after writing out the help output.
42056 // %FALSE otherwise.
42057 // RETURNS: %TRUE if the GUI has been successfully initialized,
42058 // <argc>: a pointer to the number of command line arguments.
42059 // <argv>: a pointer to the array of command line arguments.
42060 // <parameter_string>: a string which is displayed in the first line of <option>--help</option> output, after <literal><replaceable>programname</replaceable> [OPTION...]</literal>
42061 // <entries>: a %NULL-terminated array of #GOptionEntry<!-- -->s describing the options of your program
42062 // <translation_domain>: a translation domain to use for translating the <option>--help</option> output for the options in @entries with gettext(), or %NULL
42063 static int init_with_args()(/*inout*/ int* argc, /*inout*/ char*** argv, char* parameter_string, GLib2.OptionEntry* entries, char* translation_domain, GLib2.Error** error=null) {
42064 return gtk_init_with_args(argc, argv, parameter_string, entries, translation_domain, error);
42067 // Unintrospectable function: input_add_full() / gtk_input_add_full()
42068 static uint input_add_full()(int source, Gdk2.InputCondition condition, Gdk2.InputFunction function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
42069 return gtk_input_add_full(source, condition, function_, marshal, data, destroy);
42072 static void input_remove()(uint input_handler_id) {
42073 gtk_input_remove(input_handler_id);
42076 // Unintrospectable function: key_snooper_install() / gtk_key_snooper_install()
42077 static uint key_snooper_install()(KeySnoopFunc snooper, void* func_data) {
42078 return gtk_key_snooper_install(snooper, func_data);
42081 static void key_snooper_remove()(uint snooper_handler_id) {
42082 gtk_key_snooper_remove(snooper_handler_id);
42085 static void main_()() {
42086 gtk_main();
42089 static void main_do_event()(Gdk2.Event* event) {
42090 gtk_main_do_event(event);
42093 static int main_iteration()() {
42094 return gtk_main_iteration();
42097 static int main_iteration_do()(int blocking) {
42098 return gtk_main_iteration_do(blocking);
42101 static uint main_level()() {
42102 return gtk_main_level();
42105 static void main_quit()() {
42106 gtk_main_quit();
42109 static void marshal_BOOLEAN__POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42110 gtk_marshal_BOOLEAN__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42113 static void marshal_BOOLEAN__POINTER_INT_INT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42114 gtk_marshal_BOOLEAN__POINTER_INT_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42117 static void marshal_BOOLEAN__POINTER_INT_INT_UINT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42118 gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42121 static void marshal_BOOLEAN__POINTER_POINTER_INT_INT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42122 gtk_marshal_BOOLEAN__POINTER_POINTER_INT_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42125 static void marshal_BOOLEAN__POINTER_STRING_STRING_POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42126 gtk_marshal_BOOLEAN__POINTER_STRING_STRING_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42129 static void marshal_BOOLEAN__VOID()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42130 gtk_marshal_BOOLEAN__VOID(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42133 static void marshal_ENUM__ENUM()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42134 gtk_marshal_ENUM__ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42137 static void marshal_INT__POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42138 gtk_marshal_INT__POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42141 static void marshal_INT__POINTER_CHAR_CHAR()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42142 gtk_marshal_INT__POINTER_CHAR_CHAR(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42145 static void marshal_VOID__ENUM_FLOAT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42146 gtk_marshal_VOID__ENUM_FLOAT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42149 static void marshal_VOID__ENUM_FLOAT_BOOLEAN()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42150 gtk_marshal_VOID__ENUM_FLOAT_BOOLEAN(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42153 static void marshal_VOID__INT_INT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42154 gtk_marshal_VOID__INT_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42157 static void marshal_VOID__INT_INT_POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42158 gtk_marshal_VOID__INT_INT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42161 static void marshal_VOID__POINTER_INT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42162 gtk_marshal_VOID__POINTER_INT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42165 static void marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42166 gtk_marshal_VOID__POINTER_INT_INT_POINTER_UINT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42169 static void marshal_VOID__POINTER_POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42170 gtk_marshal_VOID__POINTER_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42173 static void marshal_VOID__POINTER_POINTER_POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42174 gtk_marshal_VOID__POINTER_POINTER_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42177 static void marshal_VOID__POINTER_POINTER_UINT_UINT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42178 gtk_marshal_VOID__POINTER_POINTER_UINT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42181 static void marshal_VOID__POINTER_STRING_STRING()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42182 gtk_marshal_VOID__POINTER_STRING_STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42185 static void marshal_VOID__POINTER_UINT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42186 gtk_marshal_VOID__POINTER_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42189 static void marshal_VOID__POINTER_UINT_ENUM()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42190 gtk_marshal_VOID__POINTER_UINT_ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42193 static void marshal_VOID__POINTER_UINT_UINT()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42194 gtk_marshal_VOID__POINTER_UINT_UINT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42197 static void marshal_VOID__STRING_INT_POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42198 gtk_marshal_VOID__STRING_INT_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42201 static void marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42202 gtk_marshal_VOID__UINT_POINTER_UINT_ENUM_ENUM_POINTER(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42205 static void marshal_VOID__UINT_POINTER_UINT_UINT_ENUM()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42206 gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42209 static void marshal_VOID__UINT_STRING()(GObject2.Closure* closure, GObject2.Value* return_value, uint n_param_values, GObject2.Value* param_values, void* invocation_hint, void* marshal_data) {
42210 gtk_marshal_VOID__UINT_STRING(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data);
42214 // Draws an arrow in the given rectangle on @window using the given
42215 // parameters. @arrow_type determines the direction of the arrow.
42216 // <style>: a #GtkStyle
42217 // <window>: a #GdkWindow
42218 // <state_type>: a state
42219 // <shadow_type>: the type of shadow to draw
42220 // <area>: clip rectangle, or %NULL if the output should not be clipped
42221 // <widget>: the widget
42222 // <detail>: a style detail
42223 // <arrow_type>: the type of arrow to draw
42224 // <fill>: %TRUE if the arrow tip should be filled
42225 // <x>: x origin of the rectangle to draw the arrow in
42226 // <y>: y origin of the rectangle to draw the arrow in
42227 // <width>: width of the rectangle to draw the arrow in
42228 // <height>: height of the rectangle to draw the arrow in
42229 static void paint_arrow()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, ArrowType arrow_type, int fill, int x, int y, int width, int height) {
42230 gtk_paint_arrow(style, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height);
42234 // Draws a box on @window with the given parameters.
42235 // <style>: a #GtkStyle
42236 // <window>: a #GdkWindow
42237 // <state_type>: a state
42238 // <shadow_type>: the type of shadow to draw
42239 // <area>: clip rectangle, or %NULL if the output should not be clipped
42240 // <widget>: the widget
42241 // <detail>: a style detail
42242 // <x>: x origin of the box
42243 // <y>: y origin of the box
42244 // <width>: the width of the box
42245 // <height>: the height of the box
42246 static void paint_box()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42247 gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
42251 // Draws a box in @window using the given style and state and shadow type,
42252 // leaving a gap in one side.
42253 // <style>: a #GtkStyle
42254 // <window>: a #GdkWindow
42255 // <state_type>: a state
42256 // <shadow_type>: type of shadow to draw
42257 // <area>: clip rectangle, or %NULL if the output should not be clipped
42258 // <widget>: the widget
42259 // <detail>: a style detail
42260 // <x>: x origin of the rectangle
42261 // <y>: y origin of the rectangle
42262 // <width>: width of the rectangle
42263 // <height>: width of the rectangle
42264 // <gap_side>: side in which to leave the gap
42265 // <gap_x>: starting position of the gap
42266 // <gap_width>: width of the gap
42267 static void paint_box_gap()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
42268 gtk_paint_box_gap(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
42272 // Draws a check button indicator in the given rectangle on @window with
42273 // the given parameters.
42274 // <style>: a #GtkStyle
42275 // <window>: a #GdkWindow
42276 // <state_type>: a state
42277 // <shadow_type>: the type of shadow to draw
42278 // <area>: clip rectangle, or %NULL if the output should not be clipped
42279 // <widget>: the widget
42280 // <detail>: a style detail
42281 // <x>: x origin of the rectangle to draw the check in
42282 // <y>: y origin of the rectangle to draw the check in
42283 // <width>: the width of the rectangle to draw the check in
42284 // <height>: the height of the rectangle to draw the check in
42285 static void paint_check()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42286 gtk_paint_check(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
42290 // Draws a diamond in the given rectangle on @window using the given
42291 // parameters.
42292 // <style>: a #GtkStyle
42293 // <window>: a #GdkWindow
42294 // <state_type>: a state
42295 // <shadow_type>: the type of shadow to draw
42296 // <area>: clip rectangle, or %NULL if the output should not be clipped
42297 // <widget>: the widget
42298 // <detail>: a style detail
42299 // <x>: x origin of the rectangle to draw the diamond in
42300 // <y>: y origin of the rectangle to draw the diamond in
42301 // <width>: width of the rectangle to draw the diamond in
42302 // <height>: height of the rectangle to draw the diamond in
42303 static void paint_diamond()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42304 gtk_paint_diamond(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
42308 // Draws an expander as used in #GtkTreeView. @x and @y specify the
42309 // center the expander. The size of the expander is determined by the
42310 // "expander-size" style property of @widget. (If widget is not
42311 // specified or doesn't have an "expander-size" property, an
42312 // unspecified default size will be used, since the caller doesn't
42313 // have sufficient information to position the expander, this is
42314 // likely not useful.) The expander is expander_size pixels tall
42315 // in the collapsed position and expander_size pixels wide in the
42316 // expanded position.
42317 // <style>: a #GtkStyle
42318 // <window>: a #GdkWindow
42319 // <state_type>: a state
42320 // <area>: clip rectangle, or %NULL if the output should not be clipped
42321 // <widget>: the widget
42322 // <detail>: a style detail
42323 // <x>: the x position to draw the expander at
42324 // <y>: the y position to draw the expander at
42325 // <expander_style>: the style to draw the expander in; determines whether the expander is collapsed, expanded, or in an intermediate state.
42326 static void paint_expander()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, ExpanderStyle expander_style) {
42327 gtk_paint_expander(style, window, state_type, area, widget, detail, x, y, expander_style);
42331 // Draws an extension, i.e. a notebook tab.
42332 // <style>: a #GtkStyle
42333 // <window>: a #GdkWindow
42334 // <state_type>: a state
42335 // <shadow_type>: type of shadow to draw
42336 // <area>: clip rectangle, or %NULL if the output should not be clipped
42337 // <widget>: the widget
42338 // <detail>: a style detail
42339 // <x>: x origin of the extension
42340 // <y>: y origin of the extension
42341 // <width>: width of the extension
42342 // <height>: width of the extension
42343 // <gap_side>: the side on to which the extension is attached
42344 static void paint_extension()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side) {
42345 gtk_paint_extension(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side);
42349 // Draws a flat box on @window with the given parameters.
42350 // <style>: a #GtkStyle
42351 // <window>: a #GdkWindow
42352 // <state_type>: a state
42353 // <shadow_type>: the type of shadow to draw
42354 // <area>: clip rectangle, or %NULL if the output should not be clipped
42355 // <widget>: the widget
42356 // <detail>: a style detail
42357 // <x>: x origin of the box
42358 // <y>: y origin of the box
42359 // <width>: the width of the box
42360 // <height>: the height of the box
42361 static void paint_flat_box()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42362 gtk_paint_flat_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
42366 // Draws a focus indicator around the given rectangle on @window using the
42367 // given style.
42368 // <style>: a #GtkStyle
42369 // <window>: a #GdkWindow
42370 // <state_type>: a state
42371 // <area>: clip rectangle, or %NULL if the output should not be clipped
42372 // <widget>: the widget
42373 // <detail>: a style detail
42374 // <x>: the x origin of the rectangle around which to draw a focus indicator
42375 // <y>: the y origin of the rectangle around which to draw a focus indicator
42376 // <width>: the width of the rectangle around which to draw a focus indicator
42377 // <height>: the height of the rectangle around which to draw a focus indicator
42378 static void paint_focus()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42379 gtk_paint_focus(style, window, state_type, area, widget, detail, x, y, width, height);
42383 // Draws a handle as used in #GtkHandleBox and #GtkPaned.
42384 // <style>: a #GtkStyle
42385 // <window>: a #GdkWindow
42386 // <state_type>: a state
42387 // <shadow_type>: type of shadow to draw
42388 // <area>: clip rectangle, or %NULL if the output should not be clipped
42389 // <widget>: the widget
42390 // <detail>: a style detail
42391 // <x>: x origin of the handle
42392 // <y>: y origin of the handle
42393 // <width>: with of the handle
42394 // <height>: height of the handle
42395 // <orientation>: the orientation of the handle
42396 static void paint_handle()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) {
42397 gtk_paint_handle(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
42401 // Draws a horizontal line from (@x1, @y) to (@x2, @y) in @window
42402 // using the given style and state.
42403 // <style>: a #GtkStyle
42404 // <window>: a #GdkWindow
42405 // <state_type>: a state
42406 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
42407 // <widget>: the widget
42408 // <detail>: a style detail
42409 // <x1>: the starting x coordinate
42410 // <x2>: the ending x coordinate
42411 // <y>: the y coordinate
42412 static void paint_hline()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x1, int x2, int y) {
42413 gtk_paint_hline(style, window, state_type, area, widget, detail, x1, x2, y);
42417 // Draws a layout on @window using the given parameters.
42418 // <style>: a #GtkStyle
42419 // <window>: a #GdkWindow
42420 // <state_type>: a state
42421 // <use_text>: whether to use the text or foreground graphics context of @style
42422 // <area>: clip rectangle, or %NULL if the output should not be clipped
42423 // <widget>: the widget
42424 // <detail>: a style detail
42425 // <x>: x origin
42426 // <y>: y origin
42427 // <layout>: the layout to draw
42428 static void paint_layout()(Style* style, Gdk2.Window* window, StateType state_type, int use_text, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, Pango.Layout* layout) {
42429 gtk_paint_layout(style, window, state_type, use_text, area, widget, detail, x, y, layout);
42433 // Draws a radio button indicator in the given rectangle on @window with
42434 // the given parameters.
42435 // <style>: a #GtkStyle
42436 // <window>: a #GdkWindow
42437 // <state_type>: a state
42438 // <shadow_type>: the type of shadow to draw
42439 // <area>: clip rectangle, or %NULL if the output should not be clipped
42440 // <widget>: the widget
42441 // <detail>: a style detail
42442 // <x>: x origin of the rectangle to draw the option in
42443 // <y>: y origin of the rectangle to draw the option in
42444 // <width>: the width of the rectangle to draw the option in
42445 // <height>: the height of the rectangle to draw the option in
42446 static void paint_option()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42447 gtk_paint_option(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
42451 // Draws a polygon on @window with the given parameters.
42452 // <style>: a #GtkStyle
42453 // <window>: a #GdkWindow
42454 // <state_type>: a state
42455 // <shadow_type>: type of shadow to draw
42456 // <area>: clip rectangle, or %NULL if the output should not be clipped
42457 // <widget>: the widget
42458 // <detail>: a style detail
42459 // <points>: an array of #GdkPoint<!-- -->s
42460 // <n_points>: length of @points
42461 // <fill>: %TRUE if the polygon should be filled
42462 static void paint_polygon()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.Point* points, int n_points, int fill) {
42463 gtk_paint_polygon(style, window, state_type, shadow_type, area, widget, detail, points, n_points, fill);
42467 // Draws a resize grip in the given rectangle on @window using the given
42468 // parameters.
42469 // <style>: a #GtkStyle
42470 // <window>: a #GdkWindow
42471 // <state_type>: a state
42472 // <area>: clip rectangle, or %NULL if the output should not be clipped
42473 // <widget>: the widget
42474 // <detail>: a style detail
42475 // <edge>: the edge in which to draw the resize grip
42476 // <x>: the x origin of the rectangle in which to draw the resize grip
42477 // <y>: the y origin of the rectangle in which to draw the resize grip
42478 // <width>: the width of the rectangle in which to draw the resize grip
42479 // <height>: the height of the rectangle in which to draw the resize grip
42480 static void paint_resize_grip()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, Gdk2.WindowEdge edge, int x, int y, int width, int height) {
42481 gtk_paint_resize_grip(style, window, state_type, area, widget, detail, edge, x, y, width, height);
42485 // Draws a shadow around the given rectangle in @window
42486 // using the given style and state and shadow type.
42487 // <style>: a #GtkStyle
42488 // <window>: a #GdkWindow
42489 // <state_type>: a state
42490 // <shadow_type>: type of shadow to draw
42491 // <area>: clip rectangle or %NULL if the output should not be clipped
42492 // <widget>: the widget
42493 // <detail>: a style detail
42494 // <x>: x origin of the rectangle
42495 // <y>: y origin of the rectangle
42496 // <width>: width of the rectangle
42497 // <height>: width of the rectangle
42498 static void paint_shadow()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42499 gtk_paint_shadow(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
42503 // Draws a shadow around the given rectangle in @window
42504 // using the given style and state and shadow type, leaving a
42505 // gap in one side.
42506 // <style>: a #GtkStyle
42507 // <window>: a #GdkWindow
42508 // <state_type>: a state
42509 // <shadow_type>: type of shadow to draw
42510 // <area>: clip rectangle, or %NULL if the output should not be clipped
42511 // <widget>: the widget
42512 // <detail>: a style detail
42513 // <x>: x origin of the rectangle
42514 // <y>: y origin of the rectangle
42515 // <width>: width of the rectangle
42516 // <height>: width of the rectangle
42517 // <gap_side>: side in which to leave the gap
42518 // <gap_x>: starting position of the gap
42519 // <gap_width>: width of the gap
42520 static void paint_shadow_gap()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) {
42521 gtk_paint_shadow_gap(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
42525 // Draws a slider in the given rectangle on @window using the
42526 // given style and orientation.
42527 // <style>: a #GtkStyle
42528 // <window>: a #GdkWindow
42529 // <state_type>: a state
42530 // <shadow_type>: a shadow
42531 // <area>: clip rectangle, or %NULL if the output should not be clipped
42532 // <widget>: the widget
42533 // <detail>: a style detail
42534 // <x>: the x origin of the rectangle in which to draw a slider
42535 // <y>: the y origin of the rectangle in which to draw a slider
42536 // <width>: the width of the rectangle in which to draw a slider
42537 // <height>: the height of the rectangle in which to draw a slider
42538 // <orientation>: the orientation to be used
42539 static void paint_slider()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height, Orientation orientation) {
42540 gtk_paint_slider(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
42544 // VERSION: 2.20
42545 // Draws a spinner on @window using the given parameters.
42546 // <style>: a #GtkStyle
42547 // <window>: a #GdkWindow
42548 // <state_type>: a state
42549 // <area>: clip rectangle, or %NULL if the output should not be clipped
42550 // <widget>: the widget (may be %NULL)
42551 // <detail>: a style detail (may be %NULL)
42552 // <step>: the nth step, a value between 0 and #GtkSpinner:num-steps
42553 // <x>: the x origin of the rectangle in which to draw the spinner
42554 // <y>: the y origin of the rectangle in which to draw the spinner
42555 // <width>: the width of the rectangle in which to draw the spinner
42556 // <height>: the height of the rectangle in which to draw the spinner
42557 static void paint_spinner()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, uint step, int x, int y, int width, int height) {
42558 gtk_paint_spinner(style, window, state_type, area, widget, detail, step, x, y, width, height);
42562 // DEPRECATED (v2.0) function: paint_string - Use gtk_paint_layout() instead.
42563 // Draws a text string on @window with the given parameters.
42564 // <style>: a #GtkStyle
42565 // <window>: a #GdkWindow
42566 // <state_type>: a state
42567 // <area>: clip rectangle, or %NULL if the output should not be clipped
42568 // <widget>: the widget
42569 // <detail>: a style detail
42570 // <x>: x origin
42571 // <y>: y origin
42572 // <string>: the string to draw
42573 static void paint_string()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, char* string_) {
42574 gtk_paint_string(style, window, state_type, area, widget, detail, x, y, string_);
42578 // Draws an option menu tab (i.e. the up and down pointing arrows)
42579 // in the given rectangle on @window using the given parameters.
42580 // <style>: a #GtkStyle
42581 // <window>: a #GdkWindow
42582 // <state_type>: a state
42583 // <shadow_type>: the type of shadow to draw
42584 // <area>: clip rectangle, or %NULL if the output should not be clipped
42585 // <widget>: the widget
42586 // <detail>: a style detail
42587 // <x>: x origin of the rectangle to draw the tab in
42588 // <y>: y origin of the rectangle to draw the tab in
42589 // <width>: the width of the rectangle to draw the tab in
42590 // <height>: the height of the rectangle to draw the tab in
42591 static void paint_tab()(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int x, int y, int width, int height) {
42592 gtk_paint_tab(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
42596 // Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @window
42597 // using the given style and state.
42598 // <style>: a #GtkStyle
42599 // <window>: a #GdkWindow
42600 // <state_type>: a state
42601 // <area>: rectangle to which the output is clipped, or %NULL if the output should not be clipped
42602 // <widget>: the widget
42603 // <detail>: a style detail
42604 // <y1_>: the starting y coordinate
42605 // <y2_>: the ending y coordinate
42606 // <x>: the x coordinate
42607 static void paint_vline()(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.Rectangle* area, Widget* widget, char* detail, int y1_, int y2_, int x) {
42608 gtk_paint_vline(style, window, state_type, area, widget, detail, y1_, y2_, x);
42612 // VERSION: 2.10
42613 // Returns the name of the default paper size, which
42614 // depends on the current locale.
42615 // is owned by GTK+ and should not be modified.
42616 // RETURNS: the name of the default paper size. The string
42617 static char* paper_size_get_default()() {
42618 return gtk_paper_size_get_default();
42622 // VERSION: 2.12
42623 // Creates a list of known paper sizes.
42624 // allocated #GtkPaperSize objects
42625 // RETURNS: a newly allocated list of newly
42626 // <include_custom>: whether to include custom paper sizes as defined in the page setup dialog
42627 static GLib2.List* /*new*/ paper_size_get_paper_sizes()(int include_custom) {
42628 return gtk_paper_size_get_paper_sizes(include_custom);
42632 // Parses command line arguments, and initializes global
42633 // attributes of GTK+, but does not actually open a connection
42634 // to a display. (See gdk_display_open(), gdk_get_display_arg_name())
42635 // Any arguments used by GTK+ or GDK are removed from the array and
42636 // There is no need to call this function explicitely if you are using
42637 // gtk_init(), or gtk_init_check().
42638 // RETURNS: %TRUE if initialization succeeded, otherwise %FALSE.
42639 // <argc>: a pointer to the number of command line arguments
42640 // <argv>: a pointer to the array of command line arguments
42641 static int parse_args()(/*inout*/ int* argc, /*inout*/ char*** argv) {
42642 return gtk_parse_args(argc, argv);
42646 // VERSION: 2.10
42647 // Registers an error quark for #GtkPrintOperation if necessary.
42648 // RETURNS: The error quark used for #GtkPrintOperation errors.
42649 static GLib2.Quark print_error_quark()() {
42650 return gtk_print_error_quark();
42654 // VERSION: 2.10
42655 // Runs a page setup dialog, letting the user modify the values from
42656 // is identical to the passed in @page_setup, otherwise it contains the
42657 // modifications done in the dialog.
42658 // Note that this function may use a recursive mainloop to show the page
42659 // setup dialog. See gtk_print_run_page_setup_dialog_async() if this is
42660 // a problem.
42661 // RETURNS: a new #GtkPageSetup
42662 // <parent>: transient parent
42663 // <page_setup>: an existing #GtkPageSetup
42664 // <settings>: a #GtkPrintSettings
42665 static PageSetup* /*new*/ print_run_page_setup_dialog()(Window* parent, PageSetup* page_setup, PrintSettings* settings) {
42666 return gtk_print_run_page_setup_dialog(parent, page_setup, settings);
42670 // Unintrospectable function: print_run_page_setup_dialog_async() / gtk_print_run_page_setup_dialog_async()
42671 // VERSION: 2.10
42672 // Runs a page setup dialog, letting the user modify the values from @page_setup.
42673 // In contrast to gtk_print_run_page_setup_dialog(), this function returns after
42674 // showing the page setup dialog on platforms that support this, and calls @done_cb
42675 // from a signal handler for the ::response signal of the dialog.
42676 // <parent>: transient parent, or %NULL
42677 // <page_setup>: an existing #GtkPageSetup, or %NULL
42678 // <settings>: a #GtkPrintSettings
42679 // <done_cb>: a function to call when the user saves the modified page setup
42680 // <data>: user data to pass to @done_cb
42681 static void print_run_page_setup_dialog_async()(Window* parent, PageSetup* page_setup, PrintSettings* settings, PageSetupDoneFunc done_cb, void* data) {
42682 gtk_print_run_page_setup_dialog_async(parent, page_setup, settings, done_cb, data);
42686 // Sends an event to a widget, propagating the event to parent widgets
42687 // if the event remains unhandled. Events received by GTK+ from GDK
42688 // normally begin in gtk_main_do_event(). Depending on the type of
42689 // event, existence of modal dialogs, grabs, etc., the event may be
42690 // propagated; if so, this function is used. gtk_propagate_event()
42691 // calls gtk_widget_event() on each widget it decides to send the
42692 // event to. So gtk_widget_event() is the lowest-level function; it
42693 // simply emits the "event" and possibly an event-specific signal on a
42694 // widget. gtk_propagate_event() is a bit higher-level, and
42695 // gtk_main_do_event() is the highest level.
42696 // All that said, you most likely don't want to use any of these
42697 // functions; synthesizing events is rarely needed. Consider asking on
42698 // the mailing list for better ways to achieve your goals. For
42699 // example, use gdk_window_invalidate_rect() or
42700 // gtk_widget_queue_draw() instead of making up expose events.
42701 // <widget>: a #GtkWidget
42702 // <event>: an event
42703 static void propagate_event()(Widget* widget, Gdk2.Event* event) {
42704 gtk_propagate_event(widget, event);
42707 // Unintrospectable function: quit_add() / gtk_quit_add()
42708 static uint quit_add()(uint main_level, Function function_, void* data) {
42709 return gtk_quit_add(main_level, function_, data);
42712 static void quit_add_destroy()(uint main_level, Object* object) {
42713 gtk_quit_add_destroy(main_level, object);
42716 // Unintrospectable function: quit_add_full() / gtk_quit_add_full()
42717 static uint quit_add_full()(uint main_level, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
42718 return gtk_quit_add_full(main_level, function_, marshal, data, destroy);
42721 static void quit_remove()(uint quit_handler_id) {
42722 gtk_quit_remove(quit_handler_id);
42725 static void quit_remove_by_data()(void* data) {
42726 gtk_quit_remove_by_data(data);
42729 static void rc_add_class_style()(RcStyle* rc_style, char* pattern) {
42730 gtk_rc_add_class_style(rc_style, pattern);
42734 // Adds a file to the list of files to be parsed at the
42735 // end of gtk_init().
42736 // <filename>: the pathname to the file. If @filename is not absolute, it is searched in the current directory.
42737 static void rc_add_default_file()(char* filename) {
42738 gtk_rc_add_default_file(filename);
42741 static void rc_add_widget_class_style()(RcStyle* rc_style, char* pattern) {
42742 gtk_rc_add_widget_class_style(rc_style, pattern);
42745 static void rc_add_widget_name_style()(RcStyle* rc_style, char* pattern) {
42746 gtk_rc_add_widget_name_style(rc_style, pattern);
42750 // Searches for a theme engine in the GTK+ search path. This function
42751 // is not useful for applications and should not be used.
42752 // otherwise %NULL.
42753 // RETURNS: The filename, if found (must be freed with g_free()),
42754 // <module_file>: name of a theme engine
42755 static char* /*new*/ rc_find_module_in_path()(char* module_file) {
42756 return gtk_rc_find_module_in_path(module_file);
42760 // Looks up a file in pixmap path for the specified #GtkSettings.
42761 // If the file is not found, it outputs a warning message using
42762 // g_warning() and returns %NULL.
42763 // RETURNS: the filename.
42764 // <settings>: a #GtkSettings
42765 // <scanner>: Scanner used to get line number information for the warning message, or %NULL
42766 // <pixmap_file>: name of the pixmap file to locate.
42767 static char* /*new*/ rc_find_pixmap_in_path()(Settings* settings, GLib2.Scanner* scanner, char* pixmap_file) {
42768 return gtk_rc_find_pixmap_in_path(settings, scanner, pixmap_file);
42772 // Retrieves the current list of RC files that will be parsed
42773 // at the end of gtk_init().
42774 // A %NULL-terminated array of filenames.
42775 // This memory is owned by GTK+ and must not be freed by the application.
42776 // If you want to store this information, you should make a copy.
42777 static char** rc_get_default_files()() {
42778 return gtk_rc_get_default_files();
42782 // Obtains the path to the IM modules file. See the documentation
42783 // of the <link linkend="im-module-file"><envar>GTK_IM_MODULE_FILE</envar></link>
42784 // environment variable for more details.
42785 // RETURNS: a newly-allocated string containing the name of the file listing the IM modules available for loading
42786 static char* /*new*/ rc_get_im_module_file()() {
42787 return gtk_rc_get_im_module_file();
42791 // Obtains the path in which to look for IM modules. See the documentation
42792 // of the <link linkend="im-module-path"><envar>GTK_PATH</envar></link>
42793 // environment variable for more details about looking up modules. This
42794 // function is useful solely for utilities supplied with GTK+ and should
42795 // not be used by applications under normal circumstances.
42796 // RETURNS: a newly-allocated string containing the path in which to look for IM modules.
42797 static char* /*new*/ rc_get_im_module_path()() {
42798 return gtk_rc_get_im_module_path();
42802 // Returns a directory in which GTK+ looks for theme engines.
42803 // For full information about the search for theme engines,
42804 // see the docs for <envar>GTK_PATH</envar> in
42805 // <xref linkend="gtk-running"/>.
42806 // RETURNS: the directory. (Must be freed with g_free())
42807 static char* /*new*/ rc_get_module_dir()() {
42808 return gtk_rc_get_module_dir();
42812 // Finds all matching RC styles for a given widget,
42813 // composites them together, and then creates a
42814 // #GtkStyle representing the composite appearance.
42815 // (GTK+ actually keeps a cache of previously
42816 // created styles, so a new style may not be
42817 // created.)
42818 // to the returned style, so if you want to save this
42819 // style around, you should add a reference yourself.
42820 // RETURNS: the resulting style. No refcount is added
42821 // <widget>: a #GtkWidget
42822 static Style* rc_get_style()(Widget* widget) {
42823 return gtk_rc_get_style(widget);
42827 // Creates up a #GtkStyle from styles defined in a RC file by providing
42828 // the raw components used in matching. This function may be useful
42829 // when creating pseudo-widgets that should be themed like widgets but
42830 // don't actually have corresponding GTK+ widgets. An example of this
42831 // would be items inside a GNOME canvas widget.
42832 // The action of gtk_rc_get_style() is similar to:
42833 // |[
42834 // gtk_widget_path (widget, NULL, &path, NULL);
42835 // gtk_widget_class_path (widget, NULL, &class_path, NULL);
42836 // gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget),
42837 // path, class_path,
42838 // G_OBJECT_TYPE (widget));
42839 // ]|
42840 // supplied paths, or %NULL if nothing matching was specified and the
42841 // default style should be used. The returned value is owned by GTK+
42842 // as part of an internal cache, so you must call g_object_ref() on
42843 // the returned value if you want to keep a reference to it.
42844 // RETURNS: A style created by matching with the
42845 // <settings>: a #GtkSettings object
42846 // <widget_path>: the widget path to use when looking up the style, or %NULL if no matching against the widget path should be done
42847 // <class_path>: the class path to use when looking up the style, or %NULL if no matching against the class path should be done.
42848 // <type>: a type that will be used along with parent types of this type when matching against class styles, or #G_TYPE_NONE
42849 static Style* rc_get_style_by_paths()(Settings* settings, char* widget_path, char* class_path, Type type) {
42850 return gtk_rc_get_style_by_paths(settings, widget_path, class_path, type);
42853 static char* /*new*/ rc_get_theme_dir()() {
42854 return gtk_rc_get_theme_dir();
42857 static void rc_parse()(char* filename) {
42858 gtk_rc_parse(filename);
42862 // Parses a color in the <link linkend="color=format">format</link> expected
42863 // in a RC file.
42864 // Note that theme engines should use gtk_rc_parse_color_full() in
42865 // order to support symbolic colors.
42866 // that was expected but not found
42867 // RETURNS: %G_TOKEN_NONE if parsing succeeded, otherwise the token
42868 // <scanner>: a #GScanner
42869 // <color>: a pointer to a #GdkColor structure in which to store the result
42870 static uint rc_parse_color()(GLib2.Scanner* scanner, /*out*/ Gdk2.Color* color) {
42871 return gtk_rc_parse_color(scanner, color);
42875 // VERSION: 2.12
42876 // Parses a color in the <link linkend="color=format">format</link> expected
42877 // in a RC file. If @style is not %NULL, it will be consulted to resolve
42878 // references to symbolic colors.
42879 // that was expected but not found
42880 // RETURNS: %G_TOKEN_NONE if parsing succeeded, otherwise the token
42881 // <scanner>: a #GScanner
42882 // <style>: a #GtkRcStyle, or %NULL
42883 // <color>: a pointer to a #GdkColor structure in which to store the result
42884 static uint rc_parse_color_full()(GLib2.Scanner* scanner, RcStyle* style, /*out*/ Gdk2.Color* color) {
42885 return gtk_rc_parse_color_full(scanner, style, color);
42888 static uint rc_parse_priority()(GLib2.Scanner* scanner, PathPriorityType* priority) {
42889 return gtk_rc_parse_priority(scanner, priority);
42892 static uint rc_parse_state()(GLib2.Scanner* scanner, StateType* state) {
42893 return gtk_rc_parse_state(scanner, state);
42896 static void rc_parse_string()(char* rc_string) {
42897 gtk_rc_parse_string(rc_string);
42901 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
42902 // or gtk_widget_class_install_style_property_parser() which parses
42903 // borders in the form
42904 // <literal>"{ left, right, top, bottom }"</literal> for integers
42905 // %left, %right, %top and %bottom.
42906 // has been set to the resulting #GtkBorder.
42907 // RETURNS: %TRUE if @gstring could be parsed and @property_value
42908 // <pspec>: a #GParamSpec
42909 // <gstring>: the #GString to be parsed
42910 // <property_value>: a #GValue which must hold boxed values.
42911 static int rc_property_parse_border()(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
42912 return gtk_rc_property_parse_border(pspec, gstring, property_value);
42916 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
42917 // or gtk_widget_class_install_style_property_parser() which parses a
42918 // color given either by its name or in the form
42919 // <literal>{ red, green, blue }</literal> where %red, %green and
42920 // %blue are integers between 0 and 65535 or floating-point numbers
42921 // between 0 and 1.
42922 // has been set to the resulting #GdkColor.
42923 // RETURNS: %TRUE if @gstring could be parsed and @property_value
42924 // <pspec>: a #GParamSpec
42925 // <gstring>: the #GString to be parsed
42926 // <property_value>: a #GValue which must hold #GdkColor values.
42927 static int rc_property_parse_color()(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
42928 return gtk_rc_property_parse_color(pspec, gstring, property_value);
42932 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
42933 // or gtk_widget_class_install_style_property_parser() which parses a single
42934 // enumeration value.
42935 // The enumeration value can be specified by its name, its nickname or
42936 // its numeric value. For consistency with flags parsing, the value
42937 // may be surrounded by parentheses.
42938 // has been set to the resulting #GEnumValue.
42939 // RETURNS: %TRUE if @gstring could be parsed and @property_value
42940 // <pspec>: a #GParamSpec
42941 // <gstring>: the #GString to be parsed
42942 // <property_value>: a #GValue which must hold enum values.
42943 static int rc_property_parse_enum()(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
42944 return gtk_rc_property_parse_enum(pspec, gstring, property_value);
42948 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
42949 // or gtk_widget_class_install_style_property_parser() which parses flags.
42950 // Flags can be specified by their name, their nickname or
42951 // numerically. Multiple flags can be specified in the form
42952 // <literal>"( flag1 | flag2 | ... )"</literal>.
42953 // has been set to the resulting flags value.
42954 // RETURNS: %TRUE if @gstring could be parsed and @property_value
42955 // <pspec>: a #GParamSpec
42956 // <gstring>: the #GString to be parsed
42957 // <property_value>: a #GValue which must hold flags values.
42958 static int rc_property_parse_flags()(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
42959 return gtk_rc_property_parse_flags(pspec, gstring, property_value);
42963 // A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
42964 // or gtk_widget_class_install_style_property_parser() which parses a
42965 // requisition in the form
42966 // <literal>"{ width, height }"</literal> for integers %width and %height.
42967 // has been set to the resulting #GtkRequisition.
42968 // RETURNS: %TRUE if @gstring could be parsed and @property_value
42969 // <pspec>: a #GParamSpec
42970 // <gstring>: the #GString to be parsed
42971 // <property_value>: a #GValue which must hold boxed values.
42972 static int rc_property_parse_requisition()(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value) {
42973 return gtk_rc_property_parse_requisition(pspec, gstring, property_value);
42977 // If the modification time on any previously read file for the
42978 // default #GtkSettings has changed, discard all style information
42979 // and then reread all previously read RC files.
42980 // RETURNS: %TRUE if the files were reread.
42981 static int rc_reparse_all()() {
42982 return gtk_rc_reparse_all();
42986 // If the modification time on any previously read file
42987 // for the given #GtkSettings has changed, discard all style information
42988 // and then reread all previously read RC files.
42989 // RETURNS: %TRUE if the files were reread.
42990 // <settings>: a #GtkSettings
42991 // <force_load>: load whether or not anything changed
42992 static int rc_reparse_all_for_settings()(Settings* settings, int force_load) {
42993 return gtk_rc_reparse_all_for_settings(settings, force_load);
42997 // VERSION: 2.4
42998 // This function recomputes the styles for all widgets that use a
42999 // particular #GtkSettings object. (There is one #GtkSettings object
43000 // per #GdkScreen, see gtk_settings_get_for_screen()); It is useful
43001 // when some global parameter has changed that affects the appearance
43002 // of all widgets, because when a widget gets a new style, it will
43003 // both redraw and recompute any cached information about its
43004 // appearance. As an example, it is used when the default font size
43005 // set by the operating system changes. Note that this function
43006 // doesn't affect widgets that have a style set explicitely on them
43007 // with gtk_widget_set_style().
43008 // <settings>: a #GtkSettings
43009 static void rc_reset_styles()(Settings* settings) {
43010 gtk_rc_reset_styles(settings);
43013 // Unintrospectable function: rc_scanner_new() / gtk_rc_scanner_new()
43014 static GLib2.Scanner* rc_scanner_new()() {
43015 return gtk_rc_scanner_new();
43019 // Sets the list of files that GTK+ will read at the
43020 // end of gtk_init().
43021 // <filenames>: A %NULL-terminated list of filenames.
43022 static void rc_set_default_files()(char** filenames) {
43023 gtk_rc_set_default_files(filenames);
43026 static GLib2.Quark recent_chooser_error_quark()() {
43027 return gtk_recent_chooser_error_quark();
43030 static GLib2.Quark recent_manager_error_quark()() {
43031 return gtk_recent_manager_error_quark();
43035 // VERSION: 2.14
43036 // Converts a color from RGB space to HSV.
43037 // Input values must be in the [0.0, 1.0] range;
43038 // output values will be in the same range.
43039 // <r>: Red
43040 // <g>: Green
43041 // <b>: Blue
43042 // <h>: Return value for the hue component
43043 // <s>: Return value for the saturation component
43044 // <v>: Return value for the value component
43045 static void rgb_to_hsv()(double r, double g, double b, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v) {
43046 gtk_rgb_to_hsv(r, g, b, h, s, v);
43050 // Appends a specified target to the list of supported targets for a
43051 // given widget and selection.
43052 // <widget>: a #GtkTarget
43053 // <selection>: the selection
43054 // <target>: target to add.
43055 // <info>: A unsigned integer which will be passed back to the application.
43056 static void selection_add_target()(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint info) {
43057 gtk_selection_add_target(widget, selection, target, info);
43061 // Prepends a table of targets to the list of supported targets
43062 // for a given widget and selection.
43063 // <widget>: a #GtkWidget
43064 // <selection>: the selection
43065 // <targets>: a table of targets to add
43066 // <ntargets>: number of entries in @targets
43067 static void selection_add_targets()(Widget* widget, Gdk2.Atom selection, TargetEntry* targets, uint ntargets) {
43068 gtk_selection_add_targets(widget, selection, targets, ntargets);
43072 // VERSION: 2.2
43073 // DEPRECATED (v2.4) function: selection_clear - Instead of calling this function, chain up from
43074 // The default handler for the #GtkWidget::selection-clear-event
43075 // signal.
43076 // your selection-clear-event handler. Calling this function
43077 // from any other context is illegal.
43078 // RETURNS: %TRUE if the event was handled, otherwise false
43079 // <widget>: a #GtkWidget
43080 // <event>: the event
43081 static int selection_clear()(Widget* widget, Gdk2.EventSelection* event) {
43082 return gtk_selection_clear(widget, event);
43086 // Remove all targets registered for the given selection for the
43087 // widget.
43088 // <widget>: a #GtkWidget
43089 // <selection>: an atom representing a selection
43090 static void selection_clear_targets()(Widget* widget, Gdk2.Atom selection) {
43091 gtk_selection_clear_targets(widget, selection);
43095 // Requests the contents of a selection. When received,
43096 // a "selection-received" signal will be generated.
43097 // request. (e.g., there was already a request in process for
43098 // this widget).
43099 // RETURNS: %TRUE if requested succeeded. %FALSE if we could not process
43100 // <widget>: The widget which acts as requestor
43101 // <selection>: Which selection to get
43102 // <target>: Form of information desired (e.g., STRING)
43103 // <time_>: Time of request (usually of triggering event)
43104 static int selection_convert()(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint time_) {
43105 return gtk_selection_convert(widget, selection, target, time_);
43109 // Claims ownership of a given selection for a particular widget,
43110 // or, if @widget is %NULL, release ownership of the selection.
43111 // RETURNS: %TRUE if the operation succeeded
43112 // <widget>: a #GtkWidget, or %NULL.
43113 // <selection>: an interned atom representing the selection to claim
43114 // <time_>: timestamp with which to claim the selection
43115 static int selection_owner_set()(Widget* widget, Gdk2.Atom selection, uint time_) {
43116 return gtk_selection_owner_set(widget, selection, time_);
43120 // VERSION: 2.2
43121 // Claim ownership of a given selection for a particular widget, or,
43122 // if @widget is %NULL, release ownership of the selection.
43123 // RETURNS: TRUE if the operation succeeded
43124 // <display>: the #Gdkdisplay where the selection is set
43125 // <widget>: new selection owner (a #GdkWidget), or %NULL.
43126 // <selection>: an interned atom representing the selection to claim.
43127 // <time_>: timestamp with which to claim the selection
43128 static int selection_owner_set_for_display()(Gdk2.Display* display, Widget* widget, Gdk2.Atom selection, uint time_) {
43129 return gtk_selection_owner_set_for_display(display, widget, selection, time_);
43133 // Removes all handlers and unsets ownership of all
43134 // selections for a widget. Called when widget is being
43135 // destroyed. This function will not generally be
43136 // called by applications.
43137 // <widget>: a #GtkWidget
43138 static void selection_remove_all()(Widget* widget) {
43139 gtk_selection_remove_all(widget);
43143 // DEPRECATED (v2.24) function: set_locale - Use setlocale() directly
43144 // Initializes internationalization support for GTK+. gtk_init()
43145 // automatically does this, so there is typically no point
43146 // in calling this function.
43147 // If you are calling this function because you changed the locale
43148 // after GTK+ is was initialized, then calling this function
43149 // may help a bit. (Note, however, that changing the locale
43150 // after GTK+ is initialized may produce inconsistent results and
43151 // is not really supported.)
43152 // In detail - sets the current locale according to the
43153 // program environment. This is the same as calling the C library function
43154 // <literal>setlocale (LC_ALL, "")</literal> but also takes care of the
43155 // locale specific setup of the windowing system used by GDK.
43156 // form lang_COUNTRY, where lang is an ISO-639 language code, and
43157 // COUNTRY is an ISO-3166 country code. On Unix, this form matches the
43158 // result of the setlocale(); it is also used on other machines, such as
43159 // Windows, where the C library returns a different result. The string is
43160 // owned by GTK+ and should not be modified or freed.
43161 // RETURNS: a string corresponding to the locale set, typically in the
43162 static char* /*new*/ set_locale()() {
43163 return gtk_set_locale();
43167 // Unintrospectable function: show_about_dialog() / gtk_show_about_dialog()
43168 // VERSION: 2.6
43169 // This is a convenience function for showing an application's about box.
43170 // The constructed dialog is associated with the parent window and
43171 // reused for future invocations of this function.
43172 // <parent>: transient parent, or %NULL for none
43173 // <first_property_name>: the name of the first property
43174 alias gtk_show_about_dialog show_about_dialog; // Variadic
43177 // VERSION: 2.14
43178 // This is a convenience function for launching the default application
43179 // to show the uri. The uri must be of a form understood by GIO (i.e. you
43180 // need to install gvfs to get support for uri schemes such as http://
43181 // or ftp://, as only local files are handled by GIO itself).
43182 // Typical examples are
43183 // <simplelist>
43184 // <member><filename>file:///home/gnome/pict.jpg</filename></member>
43185 // <member><filename>http://www.gnome.org</filename></member>
43186 // <member><filename>mailto:me&commat;gnome.org</filename></member>
43187 // </simplelist>
43188 // Ideally the timestamp is taken from the event triggering
43189 // the gtk_show_uri() call. If timestamp is not known you can take
43190 // %GDK_CURRENT_TIME.
43191 // This function can be used as a replacement for gnome_vfs_url_show()
43192 // and gnome_url_show().
43193 // RETURNS: %TRUE on success, %FALSE on error.
43194 // <screen>: screen to show the uri on or %NULL for the default screen
43195 // <uri>: the uri to show
43196 // <timestamp>: a timestamp to prevent focus stealing.
43197 static int show_uri()(Gdk2.Screen* screen, char* uri, uint timestamp, GLib2.Error** error=null) {
43198 return gtk_show_uri(screen, uri, timestamp, error);
43201 // Unintrospectable function: signal_compat_matched() / gtk_signal_compat_matched()
43202 static void signal_compat_matched()(Object* object, GObject2.Callback func, void* data, GObject2.SignalMatchType match, uint action) {
43203 gtk_signal_compat_matched(object, func, data, match, action);
43206 // Unintrospectable function: signal_connect_full() / gtk_signal_connect_full()
43207 static c_ulong signal_connect_full()(Object* object, char* name, GObject2.Callback func, CallbackMarshal unsupported, void* data, GLib2.DestroyNotify destroy_func, int object_signal, int after) {
43208 return gtk_signal_connect_full(object, name, func, unsupported, data, destroy_func, object_signal, after);
43211 // Unintrospectable function: signal_connect_object_while_alive() / gtk_signal_connect_object_while_alive()
43212 static void signal_connect_object_while_alive()(Object* object, char* name, GObject2.Callback func, Object* alive_object) {
43213 gtk_signal_connect_object_while_alive(object, name, func, alive_object);
43216 // Unintrospectable function: signal_connect_while_alive() / gtk_signal_connect_while_alive()
43217 static void signal_connect_while_alive()(Object* object, char* name, GObject2.Callback func, void* func_data, Object* alive_object) {
43218 gtk_signal_connect_while_alive(object, name, func, func_data, alive_object);
43221 // Unintrospectable function: signal_emit() / gtk_signal_emit()
43222 alias gtk_signal_emit signal_emit; // Variadic
43224 // Unintrospectable function: signal_emit_by_name() / gtk_signal_emit_by_name()
43225 alias gtk_signal_emit_by_name signal_emit_by_name; // Variadic
43227 static void signal_emit_stop_by_name()(Object* object, char* name) {
43228 gtk_signal_emit_stop_by_name(object, name);
43231 static void signal_emitv()(Object* object, uint signal_id, Arg* args) {
43232 gtk_signal_emitv(object, signal_id, args);
43235 static void signal_emitv_by_name()(Object* object, char* name, Arg* args) {
43236 gtk_signal_emitv_by_name(object, name, args);
43239 // Unintrospectable function: signal_new() / gtk_signal_new()
43240 alias gtk_signal_new signal_new; // Variadic
43242 static uint signal_newv()(char* name, SignalRunType signal_flags, Type object_type, uint function_offset, GObject2.SignalCMarshaller marshaller, Type return_val, uint n_args, Type* args) {
43243 return gtk_signal_newv(name, signal_flags, object_type, function_offset, marshaller, return_val, n_args, args);
43247 // Registers each of the stock items in @items. If an item already
43248 // exists with the same stock ID as one of the @items, the old item
43249 // gets replaced. The stock items are copied, so GTK+ does not hold
43250 // any pointer into @items and @items can be freed. Use
43251 // gtk_stock_add_static() if @items is persistent and GTK+ need not
43252 // copy the array.
43253 // <items>: a #GtkStockItem or array of items
43254 // <n_items>: number of #GtkStockItem in @items
43255 static void stock_add()(StockItem* items, uint n_items) {
43256 gtk_stock_add(items, n_items);
43260 // Same as gtk_stock_add(), but doesn't copy @items, so
43261 // <items>: a #GtkStockItem or array of #GtkStockItem
43262 // <n_items>: number of items
43263 static void stock_add_static()(StockItem* items, uint n_items) {
43264 gtk_stock_add_static(items, n_items);
43268 // Retrieves a list of all known stock IDs added to a #GtkIconFactory
43269 // or registered with gtk_stock_add(). The list must be freed with g_slist_free(),
43270 // and each string in the list must be freed with g_free().
43271 // RETURNS: a list of known stock IDs
43272 static GLib2.SList* /*new*/ stock_list_ids()() {
43273 return gtk_stock_list_ids();
43277 // Fills @item with the registered values for @stock_id, returning %TRUE
43278 // if @stock_id was known.
43279 // RETURNS: %TRUE if @item was initialized
43280 // <stock_id>: a stock item name
43281 // <item>: stock item to initialize with values
43282 static int stock_lookup()(char* stock_id, /*out*/ StockItem* item) {
43283 return gtk_stock_lookup(stock_id, item);
43287 // VERSION: 2.8
43288 // Sets a function to be used for translating the @label of
43289 // a stock item.
43290 // If no function is registered for a translation domain,
43291 // g_dgettext() is used.
43292 // The function is used for all stock items whose
43293 // to use strings different from the actual gettext translation domain
43294 // of your application for this, as long as your #GtkTranslateFunc uses
43295 // the correct domain when calling dgettext(). This can be useful, e.g.
43296 // when dealing with message contexts:
43297 // |[
43298 // GtkStockItem items[] = {
43299 // { MY_ITEM1, NC_("odd items", "Item 1"), 0, 0, "odd-item-domain" },
43300 // { MY_ITEM2, NC_("even items", "Item 2"), 0, 0, "even-item-domain" },
43301 // };
43302 // gchar *
43303 // my_translate_func (const gchar *msgid,
43304 // gpointer data)
43305 // {
43306 // gchar *msgctxt = data;
43307 // return (gchar*)g_dpgettext2 (GETTEXT_PACKAGE, msgctxt, msgid);
43308 // }
43309 // /&ast; ... &ast;/
43310 // gtk_stock_add (items, G_N_ELEMENTS (items));
43311 // gtk_stock_set_translate_func ("odd-item-domain", my_translate_func, "odd items");
43312 // gtk_stock_set_translate_func ("even-item-domain", my_translate_func, "even items");
43313 // ]|
43314 // <domain>: the translation domain for which @func shall be used
43315 // <func>: a #GtkTranslateFunc
43316 // <data>: data to pass to @func
43317 // <notify>: a #GDestroyNotify that is called when @data is no longer needed
43318 static void stock_set_translate_func()(char* domain, TranslateFunc func, void* data, GLib2.DestroyNotify notify) {
43319 gtk_stock_set_translate_func(domain, func, data, notify);
43323 // VERSION: 2.10
43324 // This function frees a target table as returned by
43325 // gtk_target_table_new_from_list()
43326 // <targets>: a #GtkTargetEntry array
43327 // <n_targets>: the number of entries in the array
43328 static void target_table_free()(TargetEntry* targets, int n_targets) {
43329 gtk_target_table_free(targets, n_targets);
43333 // VERSION: 2.10
43334 // This function creates an #GtkTargetEntry array that contains the
43335 // same targets as the passed %list. The returned table is newly
43336 // allocated and should be freed using gtk_target_table_free() when no
43337 // longer needed.
43338 // RETURNS: the new table.
43339 // <list>: a #GtkTargetList
43340 // <n_targets>: return location for the number ot targets in the table
43341 static TargetEntry* /*new*/ target_table_new_from_list()(TargetList* list, /*out*/ int* n_targets) {
43342 return gtk_target_table_new_from_list(list, n_targets);
43346 // VERSION: 2.10
43347 // Determines if any of the targets in @targets can be used to
43348 // provide a #GdkPixbuf.
43349 // otherwise %FALSE.
43350 // RETURNS: %TRUE if @targets include a suitable target for images,
43351 // <targets>: an array of #GdkAtom<!-- -->s
43352 // <n_targets>: the length of @targets
43353 // <writable>: whether to accept only targets for which GTK+ knows how to convert a pixbuf into the format
43354 static int targets_include_image()(Gdk2.Atom* targets, int n_targets, int writable) {
43355 return gtk_targets_include_image(targets, n_targets, writable);
43359 // VERSION: 2.10
43360 // Determines if any of the targets in @targets can be used to
43361 // provide rich text.
43362 // otherwise %FALSE.
43363 // RETURNS: %TRUE if @targets include a suitable target for rich text,
43364 // <targets>: an array of #GdkAtom<!-- -->s
43365 // <n_targets>: the length of @targets
43366 // <buffer>: a #GtkTextBuffer
43367 static int targets_include_rich_text()(Gdk2.Atom* targets, int n_targets, TextBuffer* buffer) {
43368 return gtk_targets_include_rich_text(targets, n_targets, buffer);
43372 // VERSION: 2.10
43373 // Determines if any of the targets in @targets can be used to
43374 // provide text.
43375 // otherwise %FALSE.
43376 // RETURNS: %TRUE if @targets include a suitable target for text,
43377 // <targets>: an array of #GdkAtom<!-- -->s
43378 // <n_targets>: the length of @targets
43379 static int targets_include_text()(Gdk2.Atom* targets, int n_targets) {
43380 return gtk_targets_include_text(targets, n_targets);
43384 // VERSION: 2.10
43385 // Determines if any of the targets in @targets can be used to
43386 // provide an uri list.
43387 // otherwise %FALSE.
43388 // RETURNS: %TRUE if @targets include a suitable target for uri lists,
43389 // <targets>: an array of #GdkAtom<!-- -->s
43390 // <n_targets>: the length of @targets
43391 static int targets_include_uri()(Gdk2.Atom* targets, int n_targets) {
43392 return gtk_targets_include_uri(targets, n_targets);
43396 // VERSION: 2.14
43397 // Create a simple window with window title @window_title and
43398 // text contents @dialog_text.
43399 // The window will quit any running gtk_main()-loop when destroyed, and it
43400 // will automatically be destroyed upon test function teardown.
43401 // RETURNS: a widget pointer to the newly created GtkWindow.
43402 // <window_title>: Title of the window to be displayed.
43403 // <dialog_text>: Text inside the window to be displayed.
43404 static Widget* test_create_simple_window()(char* window_title, char* dialog_text) {
43405 return gtk_test_create_simple_window(window_title, dialog_text);
43409 // Unintrospectable function: test_create_widget() / gtk_test_create_widget()
43410 // VERSION: 2.14
43411 // This function wraps g_object_new() for widget types.
43412 // It'll automatically show all created non window widgets, also
43413 // g_object_ref_sink() them (to keep them alive across a running test)
43414 // and set them up for destruction during the next test teardown phase.
43415 // RETURNS: a newly created widget.
43416 // <widget_type>: a valid widget type.
43417 // <first_property_name>: Name of first property to set or %NULL
43418 alias gtk_test_create_widget test_create_widget; // Variadic
43421 // Unintrospectable function: test_display_button_window() / gtk_test_display_button_window()
43422 // VERSION: 2.14
43423 // Create a window with window title @window_title, text contents @dialog_text,
43424 // and a number of buttons, according to the paired argument list given
43425 // as @... parameters.
43426 // Each button is created with a @label and a ::clicked signal handler that
43427 // incremrents the integer stored in @nump.
43428 // The window will be automatically shown with gtk_widget_show_now() after
43429 // creation, so when this function returns it has already been mapped,
43430 // resized and positioned on screen.
43431 // The window will quit any running gtk_main()-loop when destroyed, and it
43432 // will automatically be destroyed upon test function teardown.
43433 // RETURNS: a widget pointer to the newly created GtkWindow.
43434 // <window_title>: Title of the window to be displayed.
43435 // <dialog_text>: Text inside the window to be displayed.
43436 alias gtk_test_display_button_window test_display_button_window; // Variadic
43439 // VERSION: 2.14
43440 // This function will search @widget and all its descendants for a GtkLabel
43441 // widget with a text string matching @label_pattern.
43442 // The @label_pattern may contain asterisks '*' and question marks '?' as
43443 // placeholders, g_pattern_match() is used for the matching.
43444 // Note that locales other than "C" tend to alter (translate" label strings,
43445 // so this function is genrally only useful in test programs with
43446 // predetermined locales, see gtk_test_init() for more details.
43447 // RETURNS: a GtkLabel widget if any is found.
43448 // <widget>: Valid label or container widget.
43449 // <label_pattern>: Shell-glob pattern to match a label string.
43450 static Widget* test_find_label()(Widget* widget, char* label_pattern) {
43451 return gtk_test_find_label(widget, label_pattern);
43455 // VERSION: 2.14
43456 // This function will search siblings of @base_widget and siblings of its
43457 // ancestors for all widgets matching @widget_type.
43458 // Of the matching widgets, the one that is geometrically closest to
43459 // The general purpose of this function is to find the most likely "action"
43460 // widget, relative to another labeling widget. Such as finding a
43461 // button or text entry widget, given it's corresponding label widget.
43462 // RETURNS: a widget of type @widget_type if any is found.
43463 // <base_widget>: Valid widget, part of a widget hierarchy
43464 // <widget_type>: Type of a aearched for sibling widget
43465 static Widget* test_find_sibling()(Widget* base_widget, Type widget_type) {
43466 return gtk_test_find_sibling(base_widget, widget_type);
43470 // VERSION: 2.14
43471 // This function will search the descendants of @widget for a widget
43472 // of type @widget_type that has a label matching @label_pattern next
43473 // to it. This is most useful for automated GUI testing, e.g. to find
43474 // the "OK" button in a dialog and synthesize clicks on it.
43475 // However see gtk_test_find_label(), gtk_test_find_sibling() and
43476 // gtk_test_widget_click() for possible caveats involving the search of
43477 // such widgets and synthesizing widget events.
43478 // RETURNS: a valid widget if any is found or %NULL.
43479 // <widget>: Container widget, usually a GtkWindow.
43480 // <label_pattern>: Shell-glob pattern to match a label string.
43481 // <widget_type>: Type of a aearched for label sibling widget.
43482 static Widget* test_find_widget()(Widget* widget, char* label_pattern, Type widget_type) {
43483 return gtk_test_find_widget(widget, label_pattern, widget_type);
43487 // Unintrospectable function: test_init() / gtk_test_init()
43488 // VERSION: 2.14
43489 // This function is used to initialize a GTK+ test program.
43490 // It will in turn call g_test_init() and gtk_init() to properly
43491 // initialize the testing framework and graphical toolkit. It'll
43492 // also set the program's locale to "C" and prevent loading of rc
43493 // files and Gtk+ modules. This is done to make tets program
43494 // environments as deterministic as possible.
43495 // Like gtk_init() and g_test_init(), any known arguments will be
43496 // processed and stripped from @argc and @argv.
43497 // <argcp>: Address of the <parameter>argc</parameter> parameter of the main() function. Changed if any arguments were handled.
43498 // <argvp>: Address of the <parameter>argv</parameter> parameter of main(). Any parameters understood by g_test_init() or gtk_init() are stripped before return.
43499 alias gtk_test_init test_init; // Variadic
43502 // VERSION: 2.14
43503 // Return the type ids that have been registered after
43504 // calling gtk_test_register_all_types().
43505 // RETURNS: 0-terminated array of type ids
43506 // <n_types>: location to store number of types
43507 static Type* test_list_all_types()(/*out*/ uint* n_types) {
43508 return gtk_test_list_all_types(n_types);
43512 // VERSION: 2.14
43513 // Force registration of all core Gtk+ and Gdk object types.
43514 // This allowes to refer to any of those object types via
43515 // g_type_from_name() after calling this function.
43516 static void test_register_all_types()() {
43517 gtk_test_register_all_types();
43521 // VERSION: 2.14
43522 // Retrive the literal adjustment value for GtkRange based
43523 // widgets and spin buttons. Note that the value returned by
43524 // this function is anything between the lower and upper bounds
43525 // of the adjustment belonging to @widget, and is not a percentage
43526 // as passed in to gtk_test_slider_set_perc().
43527 // RETURNS: adjustment->value for an adjustment belonging to @widget.
43528 // <widget>: valid widget pointer.
43529 static double test_slider_get_value()(Widget* widget) {
43530 return gtk_test_slider_get_value(widget);
43534 // VERSION: 2.14
43535 // This function will adjust the slider position of all GtkRange
43536 // based widgets, such as scrollbars or scales, it'll also adjust
43537 // spin buttons. The adjustment value of these widgets is set to
43538 // a value between the lower and upper limits, according to the
43539 // <widget>: valid widget pointer.
43540 // <percentage>: value between 0 and 100.
43541 static void test_slider_set_perc()(Widget* widget, double percentage) {
43542 gtk_test_slider_set_perc(widget, percentage);
43546 // VERSION: 2.14
43547 // This function will generate a @button click in the upwards or downwards
43548 // spin button arrow areas, usually leading to an increase or decrease of
43549 // spin button's value.
43550 // RETURNS: wether all actions neccessary for the button click simulation were carried out successfully.
43551 // <spinner>: valid GtkSpinButton widget.
43552 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
43553 // <upwards>: %TRUE for upwards arrow click, %FALSE for downwards arrow click.
43554 static int test_spin_button_click()(SpinButton* spinner, uint button, int upwards) {
43555 return gtk_test_spin_button_click(spinner, button, upwards);
43559 // VERSION: 2.14
43560 // Retrive the text string of @widget if it is a GtkLabel,
43561 // GtkEditable (entry and text widgets) or GtkTextView.
43562 // RETURNS: new 0-terminated C string, needs to be released with g_free().
43563 // <widget>: valid widget pointer.
43564 static char* /*new*/ test_text_get()(Widget* widget) {
43565 return gtk_test_text_get(widget);
43569 // VERSION: 2.14
43570 // Set the text string of @widget to @string if it is a GtkLabel,
43571 // GtkEditable (entry and text widgets) or GtkTextView.
43572 // <widget>: valid widget pointer.
43573 // <string>: a 0-terminated C string
43574 static void test_text_set()(Widget* widget, char* string_) {
43575 gtk_test_text_set(widget, string_);
43579 // VERSION: 2.14
43580 // This function will generate a @button click (button press and button
43581 // release event) in the middle of the first GdkWindow found that belongs
43582 // to @widget.
43583 // For %GTK_NO_WINDOW widgets like GtkButton, this will often be an
43584 // input-only event window. For other widgets, this is usually widget->window.
43585 // Certain caveats should be considered when using this function, in
43586 // particular because the mouse pointer is warped to the button click
43587 // location, see gdk_test_simulate_button() for details.
43588 // RETURNS: wether all actions neccessary for the button click simulation were carried out successfully.
43589 // <widget>: Widget to generate a button click on.
43590 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
43591 // <modifiers>: Keyboard modifiers the event is setup with.
43592 static int test_widget_click()(Widget* widget, uint button, Gdk2.ModifierType modifiers) {
43593 return gtk_test_widget_click(widget, button, modifiers);
43597 // VERSION: 2.14
43598 // This function will generate keyboard press and release events in
43599 // the middle of the first GdkWindow found that belongs to @widget.
43600 // For %GTK_NO_WINDOW widgets like GtkButton, this will often be an
43601 // input-only event window. For other widgets, this is usually widget->window.
43602 // Certain caveats should be considered when using this function, in
43603 // particular because the mouse pointer is warped to the key press
43604 // location, see gdk_test_simulate_key() for details.
43605 // RETURNS: wether all actions neccessary for the key event simulation were carried out successfully.
43606 // <widget>: Widget to generate a key press and release on.
43607 // <keyval>: A Gdk keyboard value.
43608 // <modifiers>: Keyboard modifiers the event is setup with.
43609 static int test_widget_send_key()(Widget* widget, uint keyval, Gdk2.ModifierType modifiers) {
43610 return gtk_test_widget_send_key(widget, keyval, modifiers);
43613 static void text_anchored_child_set_layout()(Widget* child, TextLayout* layout) {
43614 gtk_text_anchored_child_set_layout(child, layout);
43617 // Unintrospectable function: timeout_add() / gtk_timeout_add()
43618 static uint timeout_add()(uint interval, Function function_, void* data) {
43619 return gtk_timeout_add(interval, function_, data);
43622 // Unintrospectable function: timeout_add_full() / gtk_timeout_add_full()
43623 static uint timeout_add_full()(uint interval, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy) {
43624 return gtk_timeout_add_full(interval, function_, marshal, data, destroy);
43627 static void timeout_remove()(uint timeout_handler_id) {
43628 gtk_timeout_remove(timeout_handler_id);
43631 // Unintrospectable function: tooltips_data_get() / gtk_tooltips_data_get()
43632 static TooltipsData* tooltips_data_get()(Widget* widget) {
43633 return gtk_tooltips_data_get(widget);
43637 // Obtains a @tree_model and @path from selection data of target type
43638 // %GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler.
43639 // This function can only be used if @selection_data originates from the same
43640 // process that's calling this function, because a pointer to the tree model
43641 // is being passed around. If you aren't in the same process, then you'll
43642 // get memory corruption. In the #GtkTreeDragDest drag_data_received handler,
43643 // you can assume that selection data of type %GTK_TREE_MODEL_ROW is
43644 // in from the current process. The returned path must be freed with
43645 // gtk_tree_path_free().
43646 // is otherwise valid
43647 // RETURNS: %TRUE if @selection_data had target type %GTK_TREE_MODEL_ROW and
43648 // <selection_data>: a #GtkSelectionData
43649 // <tree_model>: a #GtkTreeModel
43650 // <path>: row in @tree_model
43651 static int tree_get_row_drag_data()(SelectionData* selection_data, /*out*/ TreeModel** tree_model, /*out*/ TreePath** path) {
43652 return gtk_tree_get_row_drag_data(selection_data, tree_model, path);
43656 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
43657 // know that the model emitted the "row_deleted" signal.
43658 // <proxy>: A #GObject
43659 // <path>: The path position that was deleted
43660 static void tree_row_reference_deleted()(GObject2.Object* proxy, TreePath* path) {
43661 gtk_tree_row_reference_deleted(proxy, path);
43665 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
43666 // know that the model emitted the "row_inserted" signal.
43667 // <proxy>: A #GObject
43668 // <path>: The row position that was inserted
43669 static void tree_row_reference_inserted()(GObject2.Object* proxy, TreePath* path) {
43670 gtk_tree_row_reference_inserted(proxy, path);
43674 // Lets a set of row reference created by gtk_tree_row_reference_new_proxy()
43675 // know that the model emitted the "rows_reordered" signal.
43676 // <proxy>: A #GObject
43677 // <path>: The parent path of the reordered signal
43678 // <iter>: The iter pointing to the parent of the reordered
43679 // <new_order>: The new order of rows
43680 static void tree_row_reference_reordered()(GObject2.Object* proxy, TreePath* path, TreeIter* iter, int* new_order) {
43681 gtk_tree_row_reference_reordered(proxy, path, iter, new_order);
43685 // Sets selection data of target type %GTK_TREE_MODEL_ROW. Normally used
43686 // in a drag_data_get handler.
43687 // RETURNS: %TRUE if the #GtkSelectionData had the proper target type to allow us to set a tree row
43688 // <selection_data>: some #GtkSelectionData
43689 // <tree_model>: a #GtkTreeModel
43690 // <path>: a row in @tree_model
43691 static int tree_set_row_drag_data()(SelectionData* selection_data, TreeModel* tree_model, TreePath* path) {
43692 return gtk_tree_set_row_drag_data(selection_data, tree_model, path);
43695 static int true_()() {
43696 return gtk_true();
43700 // Unintrospectable function: type_class() / gtk_type_class()
43701 // DEPRECATED (v2.14) function: type_class - Use g_type_class_peek() or g_type_class_ref() instead.
43702 // Returns a pointer pointing to the class of @type or %NULL if there
43703 // was any trouble identifying @type. Initializes the class if
43704 // necessary.
43705 // RETURNS: pointer to the class.
43706 // <type>: a #GtkType.
43707 static void* type_class()(Type type) {
43708 return gtk_type_class(type);
43711 // Unintrospectable function: type_enum_find_value() / gtk_type_enum_find_value()
43712 static EnumValue* type_enum_find_value()(Type enum_type, char* value_name) {
43713 return gtk_type_enum_find_value(enum_type, value_name);
43716 // Unintrospectable function: type_enum_get_values() / gtk_type_enum_get_values()
43717 static EnumValue* type_enum_get_values()(Type enum_type) {
43718 return gtk_type_enum_get_values(enum_type);
43721 // Unintrospectable function: type_flags_find_value() / gtk_type_flags_find_value()
43722 static FlagValue* type_flags_find_value()(Type flags_type, char* value_name) {
43723 return gtk_type_flags_find_value(flags_type, value_name);
43726 // Unintrospectable function: type_flags_get_values() / gtk_type_flags_get_values()
43727 static FlagValue* type_flags_get_values()(Type flags_type) {
43728 return gtk_type_flags_get_values(flags_type);
43731 static void type_init()(GObject2.TypeDebugFlags debug_flags) {
43732 gtk_type_init(debug_flags);
43735 // Unintrospectable function: type_new() / gtk_type_new()
43736 static void* type_new()(Type type) {
43737 return gtk_type_new(type);
43740 static Type type_unique()(Type parent_type, GTypeInfo* gtkinfo) {
43741 return gtk_type_unique(parent_type, gtkinfo);
43745 // --- mixin/Gtk2__MODULE.d --->
43748 // An overload of gtk.init() that works with D strings.
43749 // Unlike the original, it does not need to modify the inputs.
43750 // Returns a new string array (that can be assigned to the argv
43751 // array in the caller).
43753 string[] init()(string argv[]) {
43754 int argc = argv.length;
43755 auto c_argv = argvToC(argv);
43756 init(&argc, &c_argv);
43757 return argvFromC(argc, c_argv);
43761 // <--- mixin/Gtk2__MODULE.d ---
43763 // C prototypes:
43765 extern (C) {
43766 AboutDialog* gtk_about_dialog_new();
43767 AboutDialogActivateLinkFunc gtk_about_dialog_set_email_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy);
43768 AboutDialogActivateLinkFunc gtk_about_dialog_set_url_hook(AboutDialogActivateLinkFunc func, void* data, GLib2.DestroyNotify destroy);
43769 char** gtk_about_dialog_get_artists(AboutDialog* this_);
43770 char** gtk_about_dialog_get_authors(AboutDialog* this_);
43771 char* gtk_about_dialog_get_comments(AboutDialog* this_);
43772 char* gtk_about_dialog_get_copyright(AboutDialog* this_);
43773 char** gtk_about_dialog_get_documenters(AboutDialog* this_);
43774 char* gtk_about_dialog_get_license(AboutDialog* this_);
43775 GdkPixbuf2.Pixbuf* gtk_about_dialog_get_logo(AboutDialog* this_);
43776 char* gtk_about_dialog_get_logo_icon_name(AboutDialog* this_);
43777 char* gtk_about_dialog_get_name(AboutDialog* this_);
43778 char* gtk_about_dialog_get_program_name(AboutDialog* this_);
43779 char* gtk_about_dialog_get_translator_credits(AboutDialog* this_);
43780 char* gtk_about_dialog_get_version(AboutDialog* this_);
43781 char* gtk_about_dialog_get_website(AboutDialog* this_);
43782 char* gtk_about_dialog_get_website_label(AboutDialog* this_);
43783 int gtk_about_dialog_get_wrap_license(AboutDialog* this_);
43784 void gtk_about_dialog_set_artists(AboutDialog* this_, char** artists);
43785 void gtk_about_dialog_set_authors(AboutDialog* this_, char** authors);
43786 void gtk_about_dialog_set_comments(AboutDialog* this_, char* comments=null);
43787 void gtk_about_dialog_set_copyright(AboutDialog* this_, char* copyright);
43788 void gtk_about_dialog_set_documenters(AboutDialog* this_, char** documenters);
43789 void gtk_about_dialog_set_license(AboutDialog* this_, char* license=null);
43790 void gtk_about_dialog_set_logo(AboutDialog* this_, GdkPixbuf2.Pixbuf* logo=null);
43791 void gtk_about_dialog_set_logo_icon_name(AboutDialog* this_, char* icon_name=null);
43792 void gtk_about_dialog_set_name(AboutDialog* this_, char* name=null);
43793 void gtk_about_dialog_set_program_name(AboutDialog* this_, char* name);
43794 void gtk_about_dialog_set_translator_credits(AboutDialog* this_, char* translator_credits=null);
43795 void gtk_about_dialog_set_version(AboutDialog* this_, char* version_=null);
43796 void gtk_about_dialog_set_website(AboutDialog* this_, char* website=null);
43797 void gtk_about_dialog_set_website_label(AboutDialog* this_, char* website_label);
43798 void gtk_about_dialog_set_wrap_license(AboutDialog* this_, int wrap_license);
43799 AccelGroup* /*new*/ gtk_accel_group_new();
43800 AccelGroup* gtk_accel_group_from_accel_closure(GObject2.Closure* closure);
43801 int gtk_accel_group_activate(AccelGroup* this_, GLib2.Quark accel_quark, GObject2.Object* acceleratable, uint accel_key, Gdk2.ModifierType accel_mods);
43802 void gtk_accel_group_connect(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags, GObject2.Closure* closure);
43803 void gtk_accel_group_connect_by_path(AccelGroup* this_, char* accel_path, GObject2.Closure* closure);
43804 int gtk_accel_group_disconnect(AccelGroup* this_, GObject2.Closure* closure=null);
43805 int gtk_accel_group_disconnect_key(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods);
43806 AccelKey* gtk_accel_group_find(AccelGroup* this_, AccelGroupFindFunc find_func, void* data);
43807 int gtk_accel_group_get_is_locked(AccelGroup* this_);
43808 Gdk2.ModifierType gtk_accel_group_get_modifier_mask(AccelGroup* this_);
43809 void gtk_accel_group_lock(AccelGroup* this_);
43810 AccelGroupEntry* gtk_accel_group_query(AccelGroup* this_, uint accel_key, Gdk2.ModifierType accel_mods, uint* n_entries=null);
43811 void gtk_accel_group_unlock(AccelGroup* this_);
43812 AccelLabel* gtk_accel_label_new(char* string_);
43813 Widget* gtk_accel_label_get_accel_widget(AccelLabel* this_);
43814 uint gtk_accel_label_get_accel_width(AccelLabel* this_);
43815 int gtk_accel_label_refetch(AccelLabel* this_);
43816 void gtk_accel_label_set_accel_closure(AccelLabel* this_, GObject2.Closure* accel_closure);
43817 void gtk_accel_label_set_accel_widget(AccelLabel* this_, Widget* accel_widget);
43818 void gtk_accel_map_add_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods);
43819 void gtk_accel_map_add_filter(char* filter_pattern);
43820 int gtk_accel_map_change_entry(char* accel_path, uint accel_key, Gdk2.ModifierType accel_mods, int replace);
43821 void gtk_accel_map_foreach(void* data, AccelMapForeach foreach_func);
43822 void gtk_accel_map_foreach_unfiltered(void* data, AccelMapForeach foreach_func);
43823 AccelMap* gtk_accel_map_get();
43824 void gtk_accel_map_load(char* file_name);
43825 void gtk_accel_map_load_fd(int fd);
43826 void gtk_accel_map_load_scanner(GLib2.Scanner* scanner);
43827 void gtk_accel_map_lock_path(char* accel_path);
43828 int gtk_accel_map_lookup_entry(char* accel_path, AccelKey* key);
43829 void gtk_accel_map_save(char* file_name);
43830 void gtk_accel_map_save_fd(int fd);
43831 void gtk_accel_map_unlock_path(char* accel_path);
43832 void gtk_accessible_connect_widget_destroyed(Accessible* this_);
43833 Widget* gtk_accessible_get_widget(Accessible* this_);
43834 void gtk_accessible_set_widget(Accessible* this_, Widget* widget);
43835 Action* /*new*/ gtk_action_new(char* name, char* label, char* tooltip, char* stock_id);
43836 void gtk_action_activate(Action* this_);
43837 void gtk_action_block_activate(Action* this_);
43838 void gtk_action_block_activate_from(Action* this_, Widget* proxy);
43839 void gtk_action_connect_accelerator(Action* this_);
43840 void gtk_action_connect_proxy(Action* this_, Widget* proxy);
43841 Widget* gtk_action_create_icon(Action* this_, int icon_size);
43842 Widget* gtk_action_create_menu(Action* this_);
43843 Widget* gtk_action_create_menu_item(Action* this_);
43844 Widget* gtk_action_create_tool_item(Action* this_);
43845 void gtk_action_disconnect_accelerator(Action* this_);
43846 void gtk_action_disconnect_proxy(Action* this_, Widget* proxy);
43847 GObject2.Closure* gtk_action_get_accel_closure(Action* this_);
43848 char* gtk_action_get_accel_path(Action* this_);
43849 int gtk_action_get_always_show_image(Action* this_);
43850 Gio2.Icon* gtk_action_get_gicon(Action* this_);
43851 char* gtk_action_get_icon_name(Action* this_);
43852 int gtk_action_get_is_important(Action* this_);
43853 char* gtk_action_get_label(Action* this_);
43854 char* gtk_action_get_name(Action* this_);
43855 GLib2.SList* gtk_action_get_proxies(Action* this_);
43856 int gtk_action_get_sensitive(Action* this_);
43857 char* gtk_action_get_short_label(Action* this_);
43858 char* gtk_action_get_stock_id(Action* this_);
43859 char* gtk_action_get_tooltip(Action* this_);
43860 int gtk_action_get_visible(Action* this_);
43861 int gtk_action_get_visible_horizontal(Action* this_);
43862 int gtk_action_get_visible_vertical(Action* this_);
43863 int gtk_action_is_sensitive(Action* this_);
43864 int gtk_action_is_visible(Action* this_);
43865 void gtk_action_set_accel_group(Action* this_, AccelGroup* accel_group=null);
43866 void gtk_action_set_accel_path(Action* this_, char* accel_path);
43867 void gtk_action_set_always_show_image(Action* this_, int always_show);
43868 void gtk_action_set_gicon(Action* this_, Gio2.Icon* icon);
43869 void gtk_action_set_icon_name(Action* this_, char* icon_name);
43870 void gtk_action_set_is_important(Action* this_, int is_important);
43871 void gtk_action_set_label(Action* this_, char* label);
43872 void gtk_action_set_sensitive(Action* this_, int sensitive);
43873 void gtk_action_set_short_label(Action* this_, char* short_label);
43874 void gtk_action_set_stock_id(Action* this_, char* stock_id);
43875 void gtk_action_set_tooltip(Action* this_, char* tooltip);
43876 void gtk_action_set_visible(Action* this_, int visible);
43877 void gtk_action_set_visible_horizontal(Action* this_, int visible_horizontal);
43878 void gtk_action_set_visible_vertical(Action* this_, int visible_vertical);
43879 void gtk_action_unblock_activate(Action* this_);
43880 void gtk_action_unblock_activate_from(Action* this_, Widget* proxy);
43881 ActionGroup* /*new*/ gtk_action_group_new(char* name);
43882 void gtk_action_group_add_action(ActionGroup* this_, Action* action);
43883 void gtk_action_group_add_action_with_accel(ActionGroup* this_, Action* action, char* accelerator=null);
43884 void gtk_action_group_add_actions(ActionGroup* this_, ActionEntry* entries, uint n_entries, void* user_data);
43885 void gtk_action_group_add_actions_full(ActionGroup* this_, ActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy);
43886 void gtk_action_group_add_radio_actions(ActionGroup* this_, RadioActionEntry* entries, uint n_entries, int value, GObject2.Callback on_change, void* user_data);
43887 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);
43888 void gtk_action_group_add_toggle_actions(ActionGroup* this_, ToggleActionEntry* entries, uint n_entries, void* user_data);
43889 void gtk_action_group_add_toggle_actions_full(ActionGroup* this_, ToggleActionEntry* entries, uint n_entries, void* user_data, GLib2.DestroyNotify destroy);
43890 Action* gtk_action_group_get_action(ActionGroup* this_, char* action_name);
43891 char* gtk_action_group_get_name(ActionGroup* this_);
43892 int gtk_action_group_get_sensitive(ActionGroup* this_);
43893 int gtk_action_group_get_visible(ActionGroup* this_);
43894 GLib2.List* /*new container*/ gtk_action_group_list_actions(ActionGroup* this_);
43895 void gtk_action_group_remove_action(ActionGroup* this_, Action* action);
43896 void gtk_action_group_set_sensitive(ActionGroup* this_, int sensitive);
43897 void gtk_action_group_set_translate_func(ActionGroup* this_, TranslateFunc func, void* data, GLib2.DestroyNotify notify);
43898 void gtk_action_group_set_translation_domain(ActionGroup* this_, char* domain);
43899 void gtk_action_group_set_visible(ActionGroup* this_, int visible);
43900 char* gtk_action_group_translate_string(ActionGroup* this_, char* string_);
43901 void gtk_activatable_do_set_related_action(Activatable* this_, Action* action);
43902 Action* gtk_activatable_get_related_action(Activatable* this_);
43903 int gtk_activatable_get_use_action_appearance(Activatable* this_);
43904 void gtk_activatable_set_related_action(Activatable* this_, Action* action);
43905 void gtk_activatable_set_use_action_appearance(Activatable* this_, int use_appearance);
43906 void gtk_activatable_sync_action_properties(Activatable* this_, Action* action=null);
43907 Adjustment* gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size);
43908 void gtk_adjustment_changed(Adjustment* this_);
43909 void gtk_adjustment_clamp_page(Adjustment* this_, double lower, double upper);
43910 void gtk_adjustment_configure(Adjustment* this_, double value, double lower, double upper, double step_increment, double page_increment, double page_size);
43911 double gtk_adjustment_get_lower(Adjustment* this_);
43912 double gtk_adjustment_get_page_increment(Adjustment* this_);
43913 double gtk_adjustment_get_page_size(Adjustment* this_);
43914 double gtk_adjustment_get_step_increment(Adjustment* this_);
43915 double gtk_adjustment_get_upper(Adjustment* this_);
43916 double gtk_adjustment_get_value(Adjustment* this_);
43917 void gtk_adjustment_set_lower(Adjustment* this_, double lower);
43918 void gtk_adjustment_set_page_increment(Adjustment* this_, double page_increment);
43919 void gtk_adjustment_set_page_size(Adjustment* this_, double page_size);
43920 void gtk_adjustment_set_step_increment(Adjustment* this_, double step_increment);
43921 void gtk_adjustment_set_upper(Adjustment* this_, double upper);
43922 void gtk_adjustment_set_value(Adjustment* this_, double value);
43923 void gtk_adjustment_value_changed(Adjustment* this_);
43924 Alignment* gtk_alignment_new(float xalign, float yalign, float xscale, float yscale);
43925 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);
43926 void gtk_alignment_set(Alignment* this_, float xalign, float yalign, float xscale, float yscale);
43927 void gtk_alignment_set_padding(Alignment* this_, uint padding_top, uint padding_bottom, uint padding_left, uint padding_right);
43928 Arrow* gtk_arrow_new(ArrowType arrow_type, ShadowType shadow_type);
43929 void gtk_arrow_set(Arrow* this_, ArrowType arrow_type, ShadowType shadow_type);
43930 AspectFrame* gtk_aspect_frame_new(char* label, float xalign, float yalign, float ratio, int obey_child);
43931 void gtk_aspect_frame_set(AspectFrame* this_, float xalign, float yalign, float ratio, int obey_child);
43932 Assistant* gtk_assistant_new();
43933 void gtk_assistant_add_action_widget(Assistant* this_, Widget* child);
43934 int gtk_assistant_append_page(Assistant* this_, Widget* page);
43935 void gtk_assistant_commit(Assistant* this_);
43936 int gtk_assistant_get_current_page(Assistant* this_);
43937 int gtk_assistant_get_n_pages(Assistant* this_);
43938 Widget* gtk_assistant_get_nth_page(Assistant* this_, int page_num);
43939 int gtk_assistant_get_page_complete(Assistant* this_, Widget* page);
43940 GdkPixbuf2.Pixbuf* gtk_assistant_get_page_header_image(Assistant* this_, Widget* page);
43941 GdkPixbuf2.Pixbuf* gtk_assistant_get_page_side_image(Assistant* this_, Widget* page);
43942 char* gtk_assistant_get_page_title(Assistant* this_, Widget* page);
43943 AssistantPageType gtk_assistant_get_page_type(Assistant* this_, Widget* page);
43944 int gtk_assistant_insert_page(Assistant* this_, Widget* page, int position);
43945 int gtk_assistant_prepend_page(Assistant* this_, Widget* page);
43946 void gtk_assistant_remove_action_widget(Assistant* this_, Widget* child);
43947 void gtk_assistant_set_current_page(Assistant* this_, int page_num);
43948 void gtk_assistant_set_forward_page_func(Assistant* this_, AssistantPageFunc page_func, void* data, GLib2.DestroyNotify destroy);
43949 void gtk_assistant_set_page_complete(Assistant* this_, Widget* page, int complete);
43950 void gtk_assistant_set_page_header_image(Assistant* this_, Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null);
43951 void gtk_assistant_set_page_side_image(Assistant* this_, Widget* page, GdkPixbuf2.Pixbuf* pixbuf=null);
43952 void gtk_assistant_set_page_title(Assistant* this_, Widget* page, char* title);
43953 void gtk_assistant_set_page_type(Assistant* this_, Widget* page, AssistantPageType type);
43954 void gtk_assistant_update_buttons_state(Assistant* this_);
43955 Widget* gtk_bin_get_child(Bin* this_);
43956 int gtk_binding_set_activate(BindingSet* this_, uint keyval, Gdk2.ModifierType modifiers, Object* object);
43957 void gtk_binding_set_add_path(BindingSet* this_, PathType path_type, char* path_pattern, PathPriorityType priority);
43958 Border* /*new*/ gtk_border_new();
43959 Border* /*new*/ gtk_border_copy(Border* this_);
43960 void gtk_border_free(Border* this_);
43961 int gtk_box_get_homogeneous(Box* this_);
43962 int gtk_box_get_spacing(Box* this_);
43963 void gtk_box_pack_end(Box* this_, Widget* child, int expand, int fill, uint padding);
43964 void gtk_box_pack_end_defaults(Box* this_, Widget* widget);
43965 void gtk_box_pack_start(Box* this_, Widget* child, int expand, int fill, uint padding);
43966 void gtk_box_pack_start_defaults(Box* this_, Widget* widget);
43967 void gtk_box_query_child_packing(Box* this_, Widget* child, int* expand, int* fill, uint* padding, PackType* pack_type);
43968 void gtk_box_reorder_child(Box* this_, Widget* child, int position);
43969 void gtk_box_set_child_packing(Box* this_, Widget* child, int expand, int fill, uint padding, PackType pack_type);
43970 void gtk_box_set_homogeneous(Box* this_, int homogeneous);
43971 void gtk_box_set_spacing(Box* this_, int spacing);
43972 void gtk_buildable_add_child(Buildable* this_, Builder* builder, GObject2.Object* child, char* type=null);
43973 GObject2.Object* /*new*/ gtk_buildable_construct_child(Buildable* this_, Builder* builder, char* name);
43974 void gtk_buildable_custom_finished(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, void* data);
43975 void gtk_buildable_custom_tag_end(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, void* data);
43976 int gtk_buildable_custom_tag_start(Buildable* this_, Builder* builder, GObject2.Object* child, char* tagname, /*out*/ GLib2.MarkupParser* parser, /*out*/ void** data);
43977 GObject2.Object* gtk_buildable_get_internal_child(Buildable* this_, Builder* builder, char* childname);
43978 char* gtk_buildable_get_name(Buildable* this_);
43979 void gtk_buildable_parser_finished(Buildable* this_, Builder* builder);
43980 void gtk_buildable_set_buildable_property(Buildable* this_, Builder* builder, char* name, GObject2.Value* value);
43981 void gtk_buildable_set_name(Buildable* this_, char* name);
43982 Builder* /*new*/ gtk_builder_new();
43983 uint gtk_builder_add_from_file(Builder* this_, char* filename, GLib2.Error** error);
43984 uint gtk_builder_add_from_string(Builder* this_, char* buffer, size_t length, GLib2.Error** error);
43985 uint gtk_builder_add_objects_from_file(Builder* this_, char* filename, char** object_ids, GLib2.Error** error);
43986 uint gtk_builder_add_objects_from_string(Builder* this_, char* buffer, size_t length, char** object_ids, GLib2.Error** error);
43987 void gtk_builder_connect_signals(Builder* this_, void* user_data);
43988 void gtk_builder_connect_signals_full(Builder* this_, BuilderConnectFunc func, void* user_data);
43989 GObject2.Object* gtk_builder_get_object(Builder* this_, char* name);
43990 GLib2.SList* /*new container*/ gtk_builder_get_objects(Builder* this_);
43991 char* gtk_builder_get_translation_domain(Builder* this_);
43992 Type gtk_builder_get_type_from_name(Builder* this_, char* type_name);
43993 void gtk_builder_set_translation_domain(Builder* this_, char* domain=null);
43994 int gtk_builder_value_from_string(Builder* this_, GObject2.ParamSpec* pspec, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error);
43995 int gtk_builder_value_from_string_type(Builder* this_, Type type, char* string_, /*out*/ GObject2.Value* value, GLib2.Error** error);
43996 Button* gtk_button_new();
43997 Button* gtk_button_new_from_stock(char* stock_id);
43998 Button* gtk_button_new_with_label(char* label);
43999 Button* gtk_button_new_with_mnemonic(char* label);
44000 void gtk_button_clicked(Button* this_);
44001 void gtk_button_enter(Button* this_);
44002 void gtk_button_get_alignment(Button* this_, /*out*/ float* xalign, /*out*/ float* yalign);
44003 Gdk2.Window* gtk_button_get_event_window(Button* this_);
44004 int gtk_button_get_focus_on_click(Button* this_);
44005 Widget* gtk_button_get_image(Button* this_);
44006 PositionType gtk_button_get_image_position(Button* this_);
44007 char* gtk_button_get_label(Button* this_);
44008 ReliefStyle gtk_button_get_relief(Button* this_);
44009 int gtk_button_get_use_stock(Button* this_);
44010 int gtk_button_get_use_underline(Button* this_);
44011 void gtk_button_leave(Button* this_);
44012 void gtk_button_pressed(Button* this_);
44013 void gtk_button_released(Button* this_);
44014 void gtk_button_set_alignment(Button* this_, float xalign, float yalign);
44015 void gtk_button_set_focus_on_click(Button* this_, int focus_on_click);
44016 void gtk_button_set_image(Button* this_, Widget* image);
44017 void gtk_button_set_image_position(Button* this_, PositionType position);
44018 void gtk_button_set_label(Button* this_, char* label);
44019 void gtk_button_set_relief(Button* this_, ReliefStyle newstyle);
44020 void gtk_button_set_use_stock(Button* this_, int use_stock);
44021 void gtk_button_set_use_underline(Button* this_, int use_underline);
44022 void gtk_button_box_get_child_ipadding(ButtonBox* this_, int* ipad_x, int* ipad_y);
44023 int gtk_button_box_get_child_secondary(ButtonBox* this_, Widget* child);
44024 void gtk_button_box_get_child_size(ButtonBox* this_, int* min_width, int* min_height);
44025 ButtonBoxStyle gtk_button_box_get_layout(ButtonBox* this_);
44026 void gtk_button_box_set_child_ipadding(ButtonBox* this_, int ipad_x, int ipad_y);
44027 void gtk_button_box_set_child_secondary(ButtonBox* this_, Widget* child, int is_secondary);
44028 void gtk_button_box_set_child_size(ButtonBox* this_, int min_width, int min_height);
44029 void gtk_button_box_set_layout(ButtonBox* this_, ButtonBoxStyle layout_style);
44030 CList* gtk_clist_new(int columns);
44031 CList* gtk_clist_new_with_titles(int columns, char* titles);
44032 int gtk_clist_append(CList* this_, char* text);
44033 void gtk_clist_clear(CList* this_);
44034 void gtk_clist_column_title_active(CList* this_, int column);
44035 void gtk_clist_column_title_passive(CList* this_, int column);
44036 void gtk_clist_column_titles_active(CList* this_);
44037 void gtk_clist_column_titles_hide(CList* this_);
44038 void gtk_clist_column_titles_passive(CList* this_);
44039 void gtk_clist_column_titles_show(CList* this_);
44040 int gtk_clist_columns_autosize(CList* this_);
44041 int gtk_clist_find_row_from_data(CList* this_, void* data);
44042 void gtk_clist_freeze(CList* this_);
44043 Style* gtk_clist_get_cell_style(CList* this_, int row, int column);
44044 CellType gtk_clist_get_cell_type(CList* this_, int row, int column);
44045 char* /*new*/ gtk_clist_get_column_title(CList* this_, int column);
44046 Widget* gtk_clist_get_column_widget(CList* this_, int column);
44047 Adjustment* gtk_clist_get_hadjustment(CList* this_);
44048 int gtk_clist_get_pixmap(CList* this_, int row, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
44049 int gtk_clist_get_pixtext(CList* this_, int row, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
44050 void* gtk_clist_get_row_data(CList* this_, int row);
44051 Style* gtk_clist_get_row_style(CList* this_, int row);
44052 int gtk_clist_get_selectable(CList* this_, int row);
44053 int gtk_clist_get_selection_info(CList* this_, int x, int y, int* row, int* column);
44054 int gtk_clist_get_text(CList* this_, int row, int column, char** text);
44055 Adjustment* gtk_clist_get_vadjustment(CList* this_);
44056 int gtk_clist_insert(CList* this_, int row, char* text);
44057 void gtk_clist_moveto(CList* this_, int row, int column, float row_align, float col_align);
44058 int gtk_clist_optimal_column_width(CList* this_, int column);
44059 int gtk_clist_prepend(CList* this_, char* text);
44060 void gtk_clist_remove(CList* this_, int row);
44061 Visibility gtk_clist_row_is_visible(CList* this_, int row);
44062 void gtk_clist_row_move(CList* this_, int source_row, int dest_row);
44063 void gtk_clist_select_all(CList* this_);
44064 void gtk_clist_select_row(CList* this_, int row, int column);
44065 void gtk_clist_set_auto_sort(CList* this_, int auto_sort);
44066 void gtk_clist_set_background(CList* this_, int row, Gdk2.Color* color);
44067 void gtk_clist_set_button_actions(CList* this_, uint button, ubyte button_actions);
44068 void gtk_clist_set_cell_style(CList* this_, int row, int column, Style* style);
44069 void gtk_clist_set_column_auto_resize(CList* this_, int column, int auto_resize);
44070 void gtk_clist_set_column_justification(CList* this_, int column, Justification justification);
44071 void gtk_clist_set_column_max_width(CList* this_, int column, int max_width);
44072 void gtk_clist_set_column_min_width(CList* this_, int column, int min_width);
44073 void gtk_clist_set_column_resizeable(CList* this_, int column, int resizeable);
44074 void gtk_clist_set_column_title(CList* this_, int column, char* title);
44075 void gtk_clist_set_column_visibility(CList* this_, int column, int visible);
44076 void gtk_clist_set_column_widget(CList* this_, int column, Widget* widget);
44077 void gtk_clist_set_column_width(CList* this_, int column, int width);
44078 void gtk_clist_set_compare_func(CList* this_, CListCompareFunc cmp_func);
44079 void gtk_clist_set_foreground(CList* this_, int row, Gdk2.Color* color);
44080 void gtk_clist_set_hadjustment(CList* this_, Adjustment* adjustment);
44081 void gtk_clist_set_pixmap(CList* this_, int row, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
44082 void gtk_clist_set_pixtext(CList* this_, int row, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask);
44083 void gtk_clist_set_reorderable(CList* this_, int reorderable);
44084 void gtk_clist_set_row_data(CList* this_, int row, void* data);
44085 void gtk_clist_set_row_data_full(CList* this_, int row, void* data, GLib2.DestroyNotify destroy);
44086 void gtk_clist_set_row_height(CList* this_, uint height);
44087 void gtk_clist_set_row_style(CList* this_, int row, Style* style);
44088 void gtk_clist_set_selectable(CList* this_, int row, int selectable);
44089 void gtk_clist_set_selection_mode(CList* this_, SelectionMode mode);
44090 void gtk_clist_set_shadow_type(CList* this_, ShadowType type);
44091 void gtk_clist_set_shift(CList* this_, int row, int column, int vertical, int horizontal);
44092 void gtk_clist_set_sort_column(CList* this_, int column);
44093 void gtk_clist_set_sort_type(CList* this_, SortType sort_type);
44094 void gtk_clist_set_text(CList* this_, int row, int column, char* text);
44095 void gtk_clist_set_use_drag_icons(CList* this_, int use_icons);
44096 void gtk_clist_set_vadjustment(CList* this_, Adjustment* adjustment);
44097 void gtk_clist_sort(CList* this_);
44098 void gtk_clist_swap_rows(CList* this_, int row1, int row2);
44099 void gtk_clist_thaw(CList* this_);
44100 void gtk_clist_undo_selection(CList* this_);
44101 void gtk_clist_unselect_all(CList* this_);
44102 void gtk_clist_unselect_row(CList* this_, int row, int column);
44103 CTree* gtk_ctree_new(int columns, int tree_column);
44104 CTree* gtk_ctree_new_with_titles(int columns, int tree_column, char* titles);
44105 void gtk_ctree_collapse(CTree* this_, CTreeNode* node);
44106 void gtk_ctree_collapse_recursive(CTree* this_, CTreeNode* node);
44107 void gtk_ctree_collapse_to_depth(CTree* this_, CTreeNode* node, int depth);
44108 void gtk_ctree_expand(CTree* this_, CTreeNode* node);
44109 void gtk_ctree_expand_recursive(CTree* this_, CTreeNode* node);
44110 void gtk_ctree_expand_to_depth(CTree* this_, CTreeNode* node, int depth);
44111 GLib2.Node* gtk_ctree_export_to_gnode(CTree* this_, GLib2.Node* parent, GLib2.Node* sibling, CTreeNode* node, CTreeGNodeFunc func, void* data);
44112 int gtk_ctree_find(CTree* this_, CTreeNode* node, CTreeNode* child);
44113 GLib2.List* gtk_ctree_find_all_by_row_data(CTree* this_, CTreeNode* node, void* data);
44114 GLib2.List* gtk_ctree_find_all_by_row_data_custom(CTree* this_, CTreeNode* node, void* data, GLib2.CompareFunc func);
44115 CTreeNode* gtk_ctree_find_by_row_data(CTree* this_, CTreeNode* node, void* data);
44116 CTreeNode* gtk_ctree_find_by_row_data_custom(CTree* this_, CTreeNode* node, void* data, GLib2.CompareFunc func);
44117 CTreeNode* gtk_ctree_find_node_ptr(CTree* this_, CTreeRow* ctree_row);
44118 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);
44119 CTreeNode* gtk_ctree_insert_gnode(CTree* this_, CTreeNode* parent, CTreeNode* sibling, GLib2.Node* gnode, CTreeGNodeFunc func, void* data);
44120 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);
44121 int gtk_ctree_is_ancestor(CTree* this_, CTreeNode* node, CTreeNode* child);
44122 int gtk_ctree_is_hot_spot(CTree* this_, int x, int y);
44123 int gtk_ctree_is_viewable(CTree* this_, CTreeNode* node);
44124 CTreeNode* gtk_ctree_last(CTree* this_, CTreeNode* node);
44125 void gtk_ctree_move(CTree* this_, CTreeNode* node, CTreeNode* new_parent=null, CTreeNode* new_sibling=null);
44126 Style* gtk_ctree_node_get_cell_style(CTree* this_, CTreeNode* node, int column);
44127 CellType gtk_ctree_node_get_cell_type(CTree* this_, CTreeNode* node, int column);
44128 int gtk_ctree_node_get_pixmap(CTree* this_, CTreeNode* node, int column, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
44129 int gtk_ctree_node_get_pixtext(CTree* this_, CTreeNode* node, int column, char** text, ubyte* spacing, Gdk2.Pixmap** pixmap, Gdk2.Bitmap** mask);
44130 void* gtk_ctree_node_get_row_data(CTree* this_, CTreeNode* node);
44131 Style* gtk_ctree_node_get_row_style(CTree* this_, CTreeNode* node);
44132 int gtk_ctree_node_get_selectable(CTree* this_, CTreeNode* node);
44133 int gtk_ctree_node_get_text(CTree* this_, CTreeNode* node, int column, char** text);
44134 Visibility gtk_ctree_node_is_visible(CTree* this_, CTreeNode* node);
44135 void gtk_ctree_node_moveto(CTree* this_, CTreeNode* node, int column, float row_align, float col_align);
44136 CTreeNode* gtk_ctree_node_nth(CTree* this_, uint row);
44137 void gtk_ctree_node_set_background(CTree* this_, CTreeNode* node, Gdk2.Color* color);
44138 void gtk_ctree_node_set_cell_style(CTree* this_, CTreeNode* node, int column, Style* style);
44139 void gtk_ctree_node_set_foreground(CTree* this_, CTreeNode* node, Gdk2.Color* color);
44140 void gtk_ctree_node_set_pixmap(CTree* this_, CTreeNode* node, int column, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
44141 void gtk_ctree_node_set_pixtext(CTree* this_, CTreeNode* node, int column, char* text, ubyte spacing, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
44142 void gtk_ctree_node_set_row_data(CTree* this_, CTreeNode* node, void* data);
44143 void gtk_ctree_node_set_row_data_full(CTree* this_, CTreeNode* node, void* data, GLib2.DestroyNotify destroy);
44144 void gtk_ctree_node_set_row_style(CTree* this_, CTreeNode* node, Style* style);
44145 void gtk_ctree_node_set_selectable(CTree* this_, CTreeNode* node, int selectable);
44146 void gtk_ctree_node_set_shift(CTree* this_, CTreeNode* node, int column, int vertical, int horizontal);
44147 void gtk_ctree_node_set_text(CTree* this_, CTreeNode* node, int column, char* text);
44148 void gtk_ctree_post_recursive(CTree* this_, CTreeNode* node, CTreeFunc func, void* data);
44149 void gtk_ctree_post_recursive_to_depth(CTree* this_, CTreeNode* node, int depth, CTreeFunc func, void* data);
44150 void gtk_ctree_pre_recursive(CTree* this_, CTreeNode* node, CTreeFunc func, void* data);
44151 void gtk_ctree_pre_recursive_to_depth(CTree* this_, CTreeNode* node, int depth, CTreeFunc func, void* data);
44152 void gtk_ctree_real_select_recursive(CTree* this_, CTreeNode* node, int state);
44153 void gtk_ctree_remove_node(CTree* this_, CTreeNode* node);
44154 void gtk_ctree_select(CTree* this_, CTreeNode* node);
44155 void gtk_ctree_select_recursive(CTree* this_, CTreeNode* node);
44156 void gtk_ctree_set_drag_compare_func(CTree* this_, CTreeCompareDragFunc cmp_func);
44157 void gtk_ctree_set_expander_style(CTree* this_, CTreeExpanderStyle expander_style);
44158 void gtk_ctree_set_indent(CTree* this_, int indent);
44159 void gtk_ctree_set_line_style(CTree* this_, CTreeLineStyle line_style);
44160 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);
44161 void gtk_ctree_set_show_stub(CTree* this_, int show_stub);
44162 void gtk_ctree_set_spacing(CTree* this_, int spacing);
44163 void gtk_ctree_sort_node(CTree* this_, CTreeNode* node);
44164 void gtk_ctree_sort_recursive(CTree* this_, CTreeNode* node);
44165 void gtk_ctree_toggle_expansion(CTree* this_, CTreeNode* node);
44166 void gtk_ctree_toggle_expansion_recursive(CTree* this_, CTreeNode* node);
44167 void gtk_ctree_unselect(CTree* this_, CTreeNode* node);
44168 void gtk_ctree_unselect_recursive(CTree* this_, CTreeNode* node);
44169 Calendar* gtk_calendar_new();
44170 void gtk_calendar_clear_marks(Calendar* this_);
44171 void gtk_calendar_display_options(Calendar* this_, CalendarDisplayOptions flags);
44172 void gtk_calendar_freeze(Calendar* this_);
44173 void gtk_calendar_get_date(Calendar* this_, /*out*/ uint* year=null, /*out*/ uint* month=null, /*out*/ uint* day=null);
44174 int gtk_calendar_get_detail_height_rows(Calendar* this_);
44175 int gtk_calendar_get_detail_width_chars(Calendar* this_);
44176 CalendarDisplayOptions gtk_calendar_get_display_options(Calendar* this_);
44177 int gtk_calendar_mark_day(Calendar* this_, uint day);
44178 void gtk_calendar_select_day(Calendar* this_, uint day);
44179 int gtk_calendar_select_month(Calendar* this_, uint month, uint year);
44180 void gtk_calendar_set_detail_func(Calendar* this_, CalendarDetailFunc func, void* data, GLib2.DestroyNotify destroy);
44181 void gtk_calendar_set_detail_height_rows(Calendar* this_, int rows);
44182 void gtk_calendar_set_detail_width_chars(Calendar* this_, int chars);
44183 void gtk_calendar_set_display_options(Calendar* this_, CalendarDisplayOptions flags);
44184 void gtk_calendar_thaw(Calendar* this_);
44185 int gtk_calendar_unmark_day(Calendar* this_, uint day);
44186 void gtk_cell_editable_editing_done(CellEditable* this_);
44187 void gtk_cell_editable_remove_widget(CellEditable* this_);
44188 void gtk_cell_editable_start_editing(CellEditable* this_, Gdk2.Event* event=null);
44189 void gtk_cell_layout_add_attribute(CellLayout* this_, CellRenderer* cell, char* attribute, int column);
44190 void gtk_cell_layout_clear(CellLayout* this_);
44191 void gtk_cell_layout_clear_attributes(CellLayout* this_, CellRenderer* cell);
44192 GLib2.List* /*new container*/ gtk_cell_layout_get_cells(CellLayout* this_);
44193 void gtk_cell_layout_pack_end(CellLayout* this_, CellRenderer* cell, int expand);
44194 void gtk_cell_layout_pack_start(CellLayout* this_, CellRenderer* cell, int expand);
44195 void gtk_cell_layout_reorder(CellLayout* this_, CellRenderer* cell, int position);
44196 void gtk_cell_layout_set_attributes(CellLayout* this_, CellRenderer* cell, ...);
44197 void gtk_cell_layout_set_cell_data_func(CellLayout* this_, CellRenderer* cell, CellLayoutDataFunc func, void* func_data, GLib2.DestroyNotify destroy);
44198 int gtk_cell_renderer_activate(CellRenderer* this_, Gdk2.Event* event, Widget* widget, char* path, Gdk2.Rectangle* background_area, Gdk2.Rectangle* cell_area, CellRendererState flags);
44199 void gtk_cell_renderer_editing_canceled(CellRenderer* this_);
44200 void gtk_cell_renderer_get_alignment(CellRenderer* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null);
44201 void gtk_cell_renderer_get_fixed_size(CellRenderer* this_, /*out*/ int* width=null, /*out*/ int* height=null);
44202 void gtk_cell_renderer_get_padding(CellRenderer* this_, /*out*/ int* xpad=null, /*out*/ int* ypad=null);
44203 int gtk_cell_renderer_get_sensitive(CellRenderer* this_);
44204 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);
44205 int gtk_cell_renderer_get_visible(CellRenderer* this_);
44206 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);
44207 void gtk_cell_renderer_set_alignment(CellRenderer* this_, float xalign, float yalign);
44208 void gtk_cell_renderer_set_fixed_size(CellRenderer* this_, int width, int height);
44209 void gtk_cell_renderer_set_padding(CellRenderer* this_, int xpad, int ypad);
44210 void gtk_cell_renderer_set_sensitive(CellRenderer* this_, int sensitive);
44211 void gtk_cell_renderer_set_visible(CellRenderer* this_, int visible);
44212 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);
44213 void gtk_cell_renderer_stop_editing(CellRenderer* this_, int canceled);
44214 CellRendererAccel* gtk_cell_renderer_accel_new();
44215 CellRendererCombo* gtk_cell_renderer_combo_new();
44216 CellRendererPixbuf* gtk_cell_renderer_pixbuf_new();
44217 CellRendererProgress* gtk_cell_renderer_progress_new();
44218 CellRendererSpin* gtk_cell_renderer_spin_new();
44219 CellRendererSpinner* gtk_cell_renderer_spinner_new();
44220 CellRendererText* gtk_cell_renderer_text_new();
44221 void gtk_cell_renderer_text_set_fixed_height_from_font(CellRendererText* this_, int number_of_rows);
44222 CellRendererToggle* gtk_cell_renderer_toggle_new();
44223 int gtk_cell_renderer_toggle_get_activatable(CellRendererToggle* this_);
44224 int gtk_cell_renderer_toggle_get_active(CellRendererToggle* this_);
44225 int gtk_cell_renderer_toggle_get_radio(CellRendererToggle* this_);
44226 void gtk_cell_renderer_toggle_set_activatable(CellRendererToggle* this_, int setting);
44227 void gtk_cell_renderer_toggle_set_active(CellRendererToggle* this_, int setting);
44228 void gtk_cell_renderer_toggle_set_radio(CellRendererToggle* this_, int radio);
44229 CellView* gtk_cell_view_new();
44230 CellView* gtk_cell_view_new_with_markup(char* markup);
44231 CellView* gtk_cell_view_new_with_pixbuf(GdkPixbuf2.Pixbuf* pixbuf);
44232 CellView* gtk_cell_view_new_with_text(char* text);
44233 GLib2.List* gtk_cell_view_get_cell_renderers(CellView* this_);
44234 TreePath* /*new*/ gtk_cell_view_get_displayed_row(CellView* this_);
44235 TreeModel* gtk_cell_view_get_model(CellView* this_);
44236 int gtk_cell_view_get_size_of_row(CellView* this_, TreePath* path, /*out*/ Requisition* requisition);
44237 void gtk_cell_view_set_background_color(CellView* this_, Gdk2.Color* color);
44238 void gtk_cell_view_set_displayed_row(CellView* this_, TreePath* path=null);
44239 void gtk_cell_view_set_model(CellView* this_, TreeModel* model=null);
44240 CheckButton* gtk_check_button_new();
44241 CheckButton* gtk_check_button_new_with_label(char* label);
44242 CheckButton* gtk_check_button_new_with_mnemonic(char* label);
44243 CheckMenuItem* gtk_check_menu_item_new();
44244 CheckMenuItem* gtk_check_menu_item_new_with_label(char* label);
44245 CheckMenuItem* gtk_check_menu_item_new_with_mnemonic(char* label);
44246 int gtk_check_menu_item_get_active(CheckMenuItem* this_);
44247 int gtk_check_menu_item_get_draw_as_radio(CheckMenuItem* this_);
44248 int gtk_check_menu_item_get_inconsistent(CheckMenuItem* this_);
44249 void gtk_check_menu_item_set_active(CheckMenuItem* this_, int is_active);
44250 void gtk_check_menu_item_set_draw_as_radio(CheckMenuItem* this_, int draw_as_radio);
44251 void gtk_check_menu_item_set_inconsistent(CheckMenuItem* this_, int setting);
44252 void gtk_check_menu_item_set_show_toggle(CheckMenuItem* this_, int always);
44253 void gtk_check_menu_item_toggled(CheckMenuItem* this_);
44254 Clipboard* gtk_clipboard_get(Gdk2.Atom selection);
44255 Clipboard* gtk_clipboard_get_for_display(Gdk2.Display* display, Gdk2.Atom selection);
44256 void gtk_clipboard_clear(Clipboard* this_);
44257 Gdk2.Display* gtk_clipboard_get_display(Clipboard* this_);
44258 GObject2.Object* gtk_clipboard_get_owner(Clipboard* this_);
44259 void gtk_clipboard_request_contents(Clipboard* this_, Gdk2.Atom target, ClipboardReceivedFunc callback, void* user_data);
44260 void gtk_clipboard_request_image(Clipboard* this_, ClipboardImageReceivedFunc callback, void* user_data);
44261 void gtk_clipboard_request_rich_text(Clipboard* this_, TextBuffer* buffer, ClipboardRichTextReceivedFunc callback, void* user_data);
44262 void gtk_clipboard_request_targets(Clipboard* this_, ClipboardTargetsReceivedFunc callback, void* user_data);
44263 void gtk_clipboard_request_text(Clipboard* this_, ClipboardTextReceivedFunc callback, void* user_data);
44264 void gtk_clipboard_request_uris(Clipboard* this_, ClipboardURIReceivedFunc callback, void* user_data);
44265 void gtk_clipboard_set_can_store(Clipboard* this_, TargetEntry* targets, int n_targets);
44266 void gtk_clipboard_set_image(Clipboard* this_, GdkPixbuf2.Pixbuf* pixbuf);
44267 void gtk_clipboard_set_text(Clipboard* this_, char* text, int len);
44268 int gtk_clipboard_set_with_data(Clipboard* this_, TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, void* user_data);
44269 int gtk_clipboard_set_with_owner(Clipboard* this_, TargetEntry* targets, uint n_targets, ClipboardGetFunc get_func, ClipboardClearFunc clear_func, GObject2.Object* owner);
44270 void gtk_clipboard_store(Clipboard* this_);
44271 SelectionData* /*new*/ gtk_clipboard_wait_for_contents(Clipboard* this_, Gdk2.Atom target);
44272 GdkPixbuf2.Pixbuf* /*new*/ gtk_clipboard_wait_for_image(Clipboard* this_);
44273 ubyte* /*new*/ gtk_clipboard_wait_for_rich_text(Clipboard* this_, TextBuffer* buffer, Gdk2.Atom* format, /*out*/ size_t* length);
44274 int gtk_clipboard_wait_for_targets(Clipboard* this_, /*out*/ Gdk2.Atom** targets, /*out*/ int* n_targets);
44275 char* /*new*/ gtk_clipboard_wait_for_text(Clipboard* this_);
44276 char** /*new*/ gtk_clipboard_wait_for_uris(Clipboard* this_);
44277 int gtk_clipboard_wait_is_image_available(Clipboard* this_);
44278 int gtk_clipboard_wait_is_rich_text_available(Clipboard* this_, TextBuffer* buffer);
44279 int gtk_clipboard_wait_is_target_available(Clipboard* this_, Gdk2.Atom target);
44280 int gtk_clipboard_wait_is_text_available(Clipboard* this_);
44281 int gtk_clipboard_wait_is_uris_available(Clipboard* this_);
44282 ColorButton* gtk_color_button_new();
44283 ColorButton* gtk_color_button_new_with_color(Gdk2.Color* color);
44284 ushort gtk_color_button_get_alpha(ColorButton* this_);
44285 void gtk_color_button_get_color(ColorButton* this_, Gdk2.Color* color);
44286 char* gtk_color_button_get_title(ColorButton* this_);
44287 int gtk_color_button_get_use_alpha(ColorButton* this_);
44288 void gtk_color_button_set_alpha(ColorButton* this_, ushort alpha);
44289 void gtk_color_button_set_color(ColorButton* this_, Gdk2.Color* color);
44290 void gtk_color_button_set_title(ColorButton* this_, char* title);
44291 void gtk_color_button_set_use_alpha(ColorButton* this_, int use_alpha);
44292 ColorSelection* gtk_color_selection_new();
44293 int gtk_color_selection_palette_from_string(char* str, /*out*/ Gdk2.Color** colors, /*out*/ int* n_colors);
44294 char* /*new*/ gtk_color_selection_palette_to_string(Gdk2.Color* colors, int n_colors);
44295 ColorSelectionChangePaletteFunc gtk_color_selection_set_change_palette_hook(ColorSelectionChangePaletteFunc func);
44296 ColorSelectionChangePaletteWithScreenFunc gtk_color_selection_set_change_palette_with_screen_hook(ColorSelectionChangePaletteWithScreenFunc func);
44297 void gtk_color_selection_get_color(ColorSelection* this_, double* color);
44298 ushort gtk_color_selection_get_current_alpha(ColorSelection* this_);
44299 void gtk_color_selection_get_current_color(ColorSelection* this_, /*out*/ Gdk2.Color* color);
44300 int gtk_color_selection_get_has_opacity_control(ColorSelection* this_);
44301 int gtk_color_selection_get_has_palette(ColorSelection* this_);
44302 ushort gtk_color_selection_get_previous_alpha(ColorSelection* this_);
44303 void gtk_color_selection_get_previous_color(ColorSelection* this_, /*out*/ Gdk2.Color* color);
44304 int gtk_color_selection_is_adjusting(ColorSelection* this_);
44305 void gtk_color_selection_set_color(ColorSelection* this_, double* color);
44306 void gtk_color_selection_set_current_alpha(ColorSelection* this_, ushort alpha);
44307 void gtk_color_selection_set_current_color(ColorSelection* this_, Gdk2.Color* color);
44308 void gtk_color_selection_set_has_opacity_control(ColorSelection* this_, int has_opacity);
44309 void gtk_color_selection_set_has_palette(ColorSelection* this_, int has_palette);
44310 void gtk_color_selection_set_previous_alpha(ColorSelection* this_, ushort alpha);
44311 void gtk_color_selection_set_previous_color(ColorSelection* this_, Gdk2.Color* color);
44312 void gtk_color_selection_set_update_policy(ColorSelection* this_, UpdateType policy);
44313 ColorSelectionDialog* gtk_color_selection_dialog_new(char* title);
44314 Widget* gtk_color_selection_dialog_get_color_selection(ColorSelectionDialog* this_);
44315 Combo* gtk_combo_new();
44316 void gtk_combo_disable_activate(Combo* this_);
44317 void gtk_combo_set_case_sensitive(Combo* this_, int val);
44318 void gtk_combo_set_item_string(Combo* this_, Item* item, char* item_value);
44319 void gtk_combo_set_popdown_strings(Combo* this_, GLib2.List* strings);
44320 void gtk_combo_set_use_arrows(Combo* this_, int val);
44321 void gtk_combo_set_use_arrows_always(Combo* this_, int val);
44322 void gtk_combo_set_value_in_list(Combo* this_, int val, int ok_if_empty);
44323 ComboBox* gtk_combo_box_new();
44324 ComboBox* gtk_combo_box_new_text();
44325 ComboBox* gtk_combo_box_new_with_entry();
44326 ComboBox* gtk_combo_box_new_with_model(TreeModel* model);
44327 ComboBox* gtk_combo_box_new_with_model_and_entry(TreeModel* model);
44328 void gtk_combo_box_append_text(ComboBox* this_, char* text);
44329 int gtk_combo_box_get_active(ComboBox* this_);
44330 int gtk_combo_box_get_active_iter(ComboBox* this_, /*out*/ TreeIter* iter);
44331 char* /*new*/ gtk_combo_box_get_active_text(ComboBox* this_);
44332 int gtk_combo_box_get_add_tearoffs(ComboBox* this_);
44333 SensitivityType gtk_combo_box_get_button_sensitivity(ComboBox* this_);
44334 int gtk_combo_box_get_column_span_column(ComboBox* this_);
44335 int gtk_combo_box_get_entry_text_column(ComboBox* this_);
44336 int gtk_combo_box_get_focus_on_click(ComboBox* this_);
44337 int gtk_combo_box_get_has_entry(ComboBox* this_);
44338 TreeModel* gtk_combo_box_get_model(ComboBox* this_);
44339 Atk.Object* gtk_combo_box_get_popup_accessible(ComboBox* this_);
44340 TreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func(ComboBox* this_);
44341 int gtk_combo_box_get_row_span_column(ComboBox* this_);
44342 char* gtk_combo_box_get_title(ComboBox* this_);
44343 int gtk_combo_box_get_wrap_width(ComboBox* this_);
44344 void gtk_combo_box_insert_text(ComboBox* this_, int position, char* text);
44345 void gtk_combo_box_popdown(ComboBox* this_);
44346 void gtk_combo_box_popup(ComboBox* this_);
44347 void gtk_combo_box_prepend_text(ComboBox* this_, char* text);
44348 void gtk_combo_box_remove_text(ComboBox* this_, int position);
44349 void gtk_combo_box_set_active(ComboBox* this_, int index_);
44350 void gtk_combo_box_set_active_iter(ComboBox* this_, TreeIter* iter=null);
44351 void gtk_combo_box_set_add_tearoffs(ComboBox* this_, int add_tearoffs);
44352 void gtk_combo_box_set_button_sensitivity(ComboBox* this_, SensitivityType sensitivity);
44353 void gtk_combo_box_set_column_span_column(ComboBox* this_, int column_span);
44354 void gtk_combo_box_set_entry_text_column(ComboBox* this_, int text_column);
44355 void gtk_combo_box_set_focus_on_click(ComboBox* this_, int focus_on_click);
44356 void gtk_combo_box_set_model(ComboBox* this_, TreeModel* model=null);
44357 void gtk_combo_box_set_row_separator_func(ComboBox* this_, TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
44358 void gtk_combo_box_set_row_span_column(ComboBox* this_, int row_span);
44359 void gtk_combo_box_set_title(ComboBox* this_, char* title);
44360 void gtk_combo_box_set_wrap_width(ComboBox* this_, int width);
44361 ComboBoxEntry* gtk_combo_box_entry_new();
44362 ComboBoxEntry* gtk_combo_box_entry_new_text();
44363 ComboBoxEntry* gtk_combo_box_entry_new_with_model(TreeModel* model, int text_column);
44364 int gtk_combo_box_entry_get_text_column(ComboBoxEntry* this_);
44365 void gtk_combo_box_entry_set_text_column(ComboBoxEntry* this_, int text_column);
44366 ComboBoxText* gtk_combo_box_text_new();
44367 ComboBoxText* gtk_combo_box_text_new_with_entry();
44368 void gtk_combo_box_text_append_text(ComboBoxText* this_, char* text);
44369 char* /*new*/ gtk_combo_box_text_get_active_text(ComboBoxText* this_);
44370 void gtk_combo_box_text_insert_text(ComboBoxText* this_, int position, char* text);
44371 void gtk_combo_box_text_prepend_text(ComboBoxText* this_, char* text);
44372 void gtk_combo_box_text_remove(ComboBoxText* this_, int position);
44373 void gtk_container_add(Container* this_, Widget* widget);
44374 void gtk_container_add_with_properties(Container* this_, Widget* widget, char* first_prop_name, ...);
44375 void gtk_container_check_resize(Container* this_);
44376 void gtk_container_child_get(Container* this_, Widget* child, char* first_prop_name, ...);
44377 void gtk_container_child_get_property(Container* this_, Widget* child, char* property_name, GObject2.Value* value);
44378 void gtk_container_child_get_valist(Container* this_, Widget* child, char* first_property_name, va_list var_args);
44379 void gtk_container_child_set(Container* this_, Widget* child, char* first_prop_name, ...);
44380 void gtk_container_child_set_property(Container* this_, Widget* child, char* property_name, GObject2.Value* value);
44381 void gtk_container_child_set_valist(Container* this_, Widget* child, char* first_property_name, va_list var_args);
44382 Type gtk_container_child_type(Container* this_);
44383 void gtk_container_forall(Container* this_, Callback callback, void* callback_data);
44384 void gtk_container_foreach(Container* this_, Callback callback, void* callback_data);
44385 void gtk_container_foreach_full(Container* this_, Callback callback, CallbackMarshal marshal, void* callback_data, GLib2.DestroyNotify notify);
44386 uint gtk_container_get_border_width(Container* this_);
44387 GLib2.List* /*new container*/ gtk_container_get_children(Container* this_);
44388 int gtk_container_get_focus_chain(Container* this_, /*out*/ GLib2.List** focusable_widgets);
44389 Widget* gtk_container_get_focus_child(Container* this_);
44390 Adjustment* gtk_container_get_focus_hadjustment(Container* this_);
44391 Adjustment* gtk_container_get_focus_vadjustment(Container* this_);
44392 ResizeMode gtk_container_get_resize_mode(Container* this_);
44393 void gtk_container_propagate_expose(Container* this_, Widget* child, Gdk2.EventExpose* event);
44394 void gtk_container_remove(Container* this_, Widget* widget);
44395 void gtk_container_resize_children(Container* this_);
44396 void gtk_container_set_border_width(Container* this_, uint border_width);
44397 void gtk_container_set_focus_chain(Container* this_, GLib2.List* focusable_widgets);
44398 void gtk_container_set_focus_child(Container* this_, Widget* child=null);
44399 void gtk_container_set_focus_hadjustment(Container* this_, Adjustment* adjustment);
44400 void gtk_container_set_focus_vadjustment(Container* this_, Adjustment* adjustment);
44401 void gtk_container_set_reallocate_redraws(Container* this_, int needs_redraws);
44402 void gtk_container_set_resize_mode(Container* this_, ResizeMode resize_mode);
44403 void gtk_container_unset_focus_chain(Container* this_);
44404 GObject2.ParamSpec* gtk_container_class_find_child_property(ContainerClass* this_, char* property_name);
44405 void gtk_container_class_install_child_property(ContainerClass* this_, uint property_id, GObject2.ParamSpec* pspec);
44406 GObject2.ParamSpec** /*new container*/ gtk_container_class_list_child_properties(ContainerClass* this_, /*out*/ uint* n_properties);
44407 Curve* gtk_curve_new();
44408 void gtk_curve_get_vector(Curve* this_, int veclen, float vector);
44409 void gtk_curve_reset(Curve* this_);
44410 void gtk_curve_set_curve_type(Curve* this_, CurveType type);
44411 void gtk_curve_set_gamma(Curve* this_, float gamma_);
44412 void gtk_curve_set_range(Curve* this_, float min_x, float max_x, float min_y, float max_y);
44413 void gtk_curve_set_vector(Curve* this_, int veclen, float vector);
44414 Dialog* gtk_dialog_new();
44415 Dialog* gtk_dialog_new_with_buttons(char* title, Window* parent, DialogFlags flags, char* first_button_text=null, ...);
44416 void gtk_dialog_add_action_widget(Dialog* this_, Widget* child, int response_id);
44417 Widget* gtk_dialog_add_button(Dialog* this_, char* button_text, int response_id);
44418 void gtk_dialog_add_buttons(Dialog* this_, char* first_button_text, ...);
44419 Widget* gtk_dialog_get_action_area(Dialog* this_);
44420 Widget* gtk_dialog_get_content_area(Dialog* this_);
44421 int gtk_dialog_get_has_separator(Dialog* this_);
44422 int gtk_dialog_get_response_for_widget(Dialog* this_, Widget* widget);
44423 Widget* gtk_dialog_get_widget_for_response(Dialog* this_, int response_id);
44424 void gtk_dialog_response(Dialog* this_, int response_id);
44425 int gtk_dialog_run(Dialog* this_);
44426 void gtk_dialog_set_alternative_button_order(Dialog* this_, int first_response_id, ...);
44427 void gtk_dialog_set_alternative_button_order_from_array(Dialog* this_, int n_params, int* new_order);
44428 void gtk_dialog_set_default_response(Dialog* this_, int response_id);
44429 void gtk_dialog_set_has_separator(Dialog* this_, int setting);
44430 void gtk_dialog_set_response_sensitive(Dialog* this_, int response_id, int setting);
44431 DrawingArea* gtk_drawing_area_new();
44432 void gtk_drawing_area_size(DrawingArea* this_, int width, int height);
44433 void gtk_editable_copy_clipboard(Editable* this_);
44434 void gtk_editable_cut_clipboard(Editable* this_);
44435 void gtk_editable_delete_selection(Editable* this_);
44436 void gtk_editable_delete_text(Editable* this_, int start_pos, int end_pos);
44437 char* /*new*/ gtk_editable_get_chars(Editable* this_, int start_pos, int end_pos);
44438 int gtk_editable_get_editable(Editable* this_);
44439 int gtk_editable_get_position(Editable* this_);
44440 int gtk_editable_get_selection_bounds(Editable* this_, /*out*/ int* start_pos=null, /*out*/ int* end_pos=null);
44441 void gtk_editable_insert_text(Editable* this_, char* new_text, int new_text_length, /*inout*/ int* position);
44442 void gtk_editable_paste_clipboard(Editable* this_);
44443 void gtk_editable_select_region(Editable* this_, int start_pos, int end_pos);
44444 void gtk_editable_set_editable(Editable* this_, int is_editable);
44445 void gtk_editable_set_position(Editable* this_, int position);
44446 Entry* gtk_entry_new();
44447 Entry* gtk_entry_new_with_buffer(EntryBuffer* buffer);
44448 Entry* gtk_entry_new_with_max_length(int max);
44449 void gtk_entry_append_text(Entry* this_, char* text);
44450 int gtk_entry_get_activates_default(Entry* this_);
44451 float gtk_entry_get_alignment(Entry* this_);
44452 EntryBuffer* gtk_entry_get_buffer(Entry* this_);
44453 EntryCompletion* gtk_entry_get_completion(Entry* this_);
44454 int gtk_entry_get_current_icon_drag_source(Entry* this_);
44455 Adjustment* gtk_entry_get_cursor_hadjustment(Entry* this_);
44456 int gtk_entry_get_has_frame(Entry* this_);
44457 int gtk_entry_get_icon_activatable(Entry* this_, EntryIconPosition icon_pos);
44458 int gtk_entry_get_icon_at_pos(Entry* this_, int x, int y);
44459 Gio2.Icon* gtk_entry_get_icon_gicon(Entry* this_, EntryIconPosition icon_pos);
44460 char* gtk_entry_get_icon_name(Entry* this_, EntryIconPosition icon_pos);
44461 GdkPixbuf2.Pixbuf* gtk_entry_get_icon_pixbuf(Entry* this_, EntryIconPosition icon_pos);
44462 int gtk_entry_get_icon_sensitive(Entry* this_, EntryIconPosition icon_pos);
44463 char* gtk_entry_get_icon_stock(Entry* this_, EntryIconPosition icon_pos);
44464 ImageType gtk_entry_get_icon_storage_type(Entry* this_, EntryIconPosition icon_pos);
44465 char* /*new*/ gtk_entry_get_icon_tooltip_markup(Entry* this_, EntryIconPosition icon_pos);
44466 char* /*new*/ gtk_entry_get_icon_tooltip_text(Entry* this_, EntryIconPosition icon_pos);
44467 Gdk2.Window* gtk_entry_get_icon_window(Entry* this_, EntryIconPosition icon_pos);
44468 Border* gtk_entry_get_inner_border(Entry* this_);
44469 dchar gtk_entry_get_invisible_char(Entry* this_);
44470 Pango.Layout* gtk_entry_get_layout(Entry* this_);
44471 void gtk_entry_get_layout_offsets(Entry* this_, /*out*/ int* x=null, /*out*/ int* y=null);
44472 int gtk_entry_get_max_length(Entry* this_);
44473 int gtk_entry_get_overwrite_mode(Entry* this_);
44474 double gtk_entry_get_progress_fraction(Entry* this_);
44475 double gtk_entry_get_progress_pulse_step(Entry* this_);
44476 char* gtk_entry_get_text(Entry* this_);
44477 ushort gtk_entry_get_text_length(Entry* this_);
44478 Gdk2.Window* gtk_entry_get_text_window(Entry* this_);
44479 int gtk_entry_get_visibility(Entry* this_);
44480 int gtk_entry_get_width_chars(Entry* this_);
44481 int gtk_entry_im_context_filter_keypress(Entry* this_, Gdk2.EventKey* event);
44482 int gtk_entry_layout_index_to_text_index(Entry* this_, int layout_index);
44483 void gtk_entry_prepend_text(Entry* this_, char* text);
44484 void gtk_entry_progress_pulse(Entry* this_);
44485 void gtk_entry_reset_im_context(Entry* this_);
44486 void gtk_entry_select_region(Entry* this_, int start, int end);
44487 void gtk_entry_set_activates_default(Entry* this_, int setting);
44488 void gtk_entry_set_alignment(Entry* this_, float xalign);
44489 void gtk_entry_set_buffer(Entry* this_, EntryBuffer* buffer);
44490 void gtk_entry_set_completion(Entry* this_, EntryCompletion* completion=null);
44491 void gtk_entry_set_cursor_hadjustment(Entry* this_, Adjustment* adjustment);
44492 void gtk_entry_set_editable(Entry* this_, int editable);
44493 void gtk_entry_set_has_frame(Entry* this_, int setting);
44494 void gtk_entry_set_icon_activatable(Entry* this_, EntryIconPosition icon_pos, int activatable);
44495 void gtk_entry_set_icon_drag_source(Entry* this_, EntryIconPosition icon_pos, TargetList* target_list, Gdk2.DragAction actions);
44496 void gtk_entry_set_icon_from_gicon(Entry* this_, EntryIconPosition icon_pos, Gio2.Icon* icon=null);
44497 void gtk_entry_set_icon_from_icon_name(Entry* this_, EntryIconPosition icon_pos, char* icon_name=null);
44498 void gtk_entry_set_icon_from_pixbuf(Entry* this_, EntryIconPosition icon_pos, GdkPixbuf2.Pixbuf* pixbuf=null);
44499 void gtk_entry_set_icon_from_stock(Entry* this_, EntryIconPosition icon_pos, char* stock_id=null);
44500 void gtk_entry_set_icon_sensitive(Entry* this_, EntryIconPosition icon_pos, int sensitive);
44501 void gtk_entry_set_icon_tooltip_markup(Entry* this_, EntryIconPosition icon_pos, char* tooltip=null);
44502 void gtk_entry_set_icon_tooltip_text(Entry* this_, EntryIconPosition icon_pos, char* tooltip=null);
44503 void gtk_entry_set_inner_border(Entry* this_, Border* border=null);
44504 void gtk_entry_set_invisible_char(Entry* this_, dchar ch);
44505 void gtk_entry_set_max_length(Entry* this_, int max);
44506 void gtk_entry_set_overwrite_mode(Entry* this_, int overwrite);
44507 void gtk_entry_set_position(Entry* this_, int position);
44508 void gtk_entry_set_progress_fraction(Entry* this_, double fraction);
44509 void gtk_entry_set_progress_pulse_step(Entry* this_, double fraction);
44510 void gtk_entry_set_text(Entry* this_, char* text);
44511 void gtk_entry_set_visibility(Entry* this_, int visible);
44512 void gtk_entry_set_width_chars(Entry* this_, int n_chars);
44513 int gtk_entry_text_index_to_layout_index(Entry* this_, int text_index);
44514 void gtk_entry_unset_invisible_char(Entry* this_);
44515 EntryBuffer* /*new*/ gtk_entry_buffer_new(char* initial_chars, int n_initial_chars);
44516 uint gtk_entry_buffer_delete_text(EntryBuffer* this_, uint position, int n_chars);
44517 void gtk_entry_buffer_emit_deleted_text(EntryBuffer* this_, uint position, uint n_chars);
44518 void gtk_entry_buffer_emit_inserted_text(EntryBuffer* this_, uint position, char* chars, uint n_chars);
44519 size_t gtk_entry_buffer_get_bytes(EntryBuffer* this_);
44520 uint gtk_entry_buffer_get_length(EntryBuffer* this_);
44521 int gtk_entry_buffer_get_max_length(EntryBuffer* this_);
44522 char* gtk_entry_buffer_get_text(EntryBuffer* this_);
44523 uint gtk_entry_buffer_insert_text(EntryBuffer* this_, uint position, char* chars, int n_chars);
44524 void gtk_entry_buffer_set_max_length(EntryBuffer* this_, int max_length);
44525 void gtk_entry_buffer_set_text(EntryBuffer* this_, char* chars, int n_chars);
44526 EntryCompletion* /*new*/ gtk_entry_completion_new();
44527 void gtk_entry_completion_complete(EntryCompletion* this_);
44528 void gtk_entry_completion_delete_action(EntryCompletion* this_, int index_);
44529 char* gtk_entry_completion_get_completion_prefix(EntryCompletion* this_);
44530 Widget* gtk_entry_completion_get_entry(EntryCompletion* this_);
44531 int gtk_entry_completion_get_inline_completion(EntryCompletion* this_);
44532 int gtk_entry_completion_get_inline_selection(EntryCompletion* this_);
44533 int gtk_entry_completion_get_minimum_key_length(EntryCompletion* this_);
44534 TreeModel* gtk_entry_completion_get_model(EntryCompletion* this_);
44535 int gtk_entry_completion_get_popup_completion(EntryCompletion* this_);
44536 int gtk_entry_completion_get_popup_set_width(EntryCompletion* this_);
44537 int gtk_entry_completion_get_popup_single_match(EntryCompletion* this_);
44538 int gtk_entry_completion_get_text_column(EntryCompletion* this_);
44539 void gtk_entry_completion_insert_action_markup(EntryCompletion* this_, int index_, char* markup);
44540 void gtk_entry_completion_insert_action_text(EntryCompletion* this_, int index_, char* text);
44541 void gtk_entry_completion_insert_prefix(EntryCompletion* this_);
44542 void gtk_entry_completion_set_inline_completion(EntryCompletion* this_, int inline_completion);
44543 void gtk_entry_completion_set_inline_selection(EntryCompletion* this_, int inline_selection);
44544 void gtk_entry_completion_set_match_func(EntryCompletion* this_, EntryCompletionMatchFunc func, void* func_data, GLib2.DestroyNotify func_notify);
44545 void gtk_entry_completion_set_minimum_key_length(EntryCompletion* this_, int length);
44546 void gtk_entry_completion_set_model(EntryCompletion* this_, TreeModel* model=null);
44547 void gtk_entry_completion_set_popup_completion(EntryCompletion* this_, int popup_completion);
44548 void gtk_entry_completion_set_popup_set_width(EntryCompletion* this_, int popup_set_width);
44549 void gtk_entry_completion_set_popup_single_match(EntryCompletion* this_, int popup_single_match);
44550 void gtk_entry_completion_set_text_column(EntryCompletion* this_, int column);
44551 EventBox* gtk_event_box_new();
44552 int gtk_event_box_get_above_child(EventBox* this_);
44553 int gtk_event_box_get_visible_window(EventBox* this_);
44554 void gtk_event_box_set_above_child(EventBox* this_, int above_child);
44555 void gtk_event_box_set_visible_window(EventBox* this_, int visible_window);
44556 Expander* gtk_expander_new(char* label);
44557 Expander* gtk_expander_new_with_mnemonic(char* label=null);
44558 int gtk_expander_get_expanded(Expander* this_);
44559 char* gtk_expander_get_label(Expander* this_);
44560 int gtk_expander_get_label_fill(Expander* this_);
44561 Widget* gtk_expander_get_label_widget(Expander* this_);
44562 int gtk_expander_get_spacing(Expander* this_);
44563 int gtk_expander_get_use_markup(Expander* this_);
44564 int gtk_expander_get_use_underline(Expander* this_);
44565 void gtk_expander_set_expanded(Expander* this_, int expanded);
44566 void gtk_expander_set_label(Expander* this_, char* label=null);
44567 void gtk_expander_set_label_fill(Expander* this_, int label_fill);
44568 void gtk_expander_set_label_widget(Expander* this_, Widget* label_widget=null);
44569 void gtk_expander_set_spacing(Expander* this_, int spacing);
44570 void gtk_expander_set_use_markup(Expander* this_, int use_markup);
44571 void gtk_expander_set_use_underline(Expander* this_, int use_underline);
44572 void gtk_file_chooser_add_filter(FileChooser* this_, FileFilter* filter);
44573 int gtk_file_chooser_add_shortcut_folder(FileChooser* this_, char* folder, GLib2.Error** error);
44574 int gtk_file_chooser_add_shortcut_folder_uri(FileChooser* this_, char* uri, GLib2.Error** error);
44575 FileChooserAction gtk_file_chooser_get_action(FileChooser* this_);
44576 int gtk_file_chooser_get_create_folders(FileChooser* this_);
44577 char* /*new*/ gtk_file_chooser_get_current_folder(FileChooser* this_);
44578 Gio2.File* /*new*/ gtk_file_chooser_get_current_folder_file(FileChooser* this_);
44579 char* /*new*/ gtk_file_chooser_get_current_folder_uri(FileChooser* this_);
44580 int gtk_file_chooser_get_do_overwrite_confirmation(FileChooser* this_);
44581 Widget* gtk_file_chooser_get_extra_widget(FileChooser* this_);
44582 Gio2.File* /*new*/ gtk_file_chooser_get_file(FileChooser* this_);
44583 char* /*new*/ gtk_file_chooser_get_filename(FileChooser* this_);
44584 GLib2.SList* /*new*/ gtk_file_chooser_get_filenames(FileChooser* this_);
44585 GLib2.SList* /*new*/ gtk_file_chooser_get_files(FileChooser* this_);
44586 FileFilter* gtk_file_chooser_get_filter(FileChooser* this_);
44587 int gtk_file_chooser_get_local_only(FileChooser* this_);
44588 Gio2.File* /*new*/ gtk_file_chooser_get_preview_file(FileChooser* this_);
44589 char* /*new*/ gtk_file_chooser_get_preview_filename(FileChooser* this_);
44590 char* /*new*/ gtk_file_chooser_get_preview_uri(FileChooser* this_);
44591 Widget* gtk_file_chooser_get_preview_widget(FileChooser* this_);
44592 int gtk_file_chooser_get_preview_widget_active(FileChooser* this_);
44593 int gtk_file_chooser_get_select_multiple(FileChooser* this_);
44594 int gtk_file_chooser_get_show_hidden(FileChooser* this_);
44595 char* /*new*/ gtk_file_chooser_get_uri(FileChooser* this_);
44596 GLib2.SList* /*new*/ gtk_file_chooser_get_uris(FileChooser* this_);
44597 int gtk_file_chooser_get_use_preview_label(FileChooser* this_);
44598 GLib2.SList* /*new container*/ gtk_file_chooser_list_filters(FileChooser* this_);
44599 GLib2.SList* /*new*/ gtk_file_chooser_list_shortcut_folder_uris(FileChooser* this_);
44600 GLib2.SList* /*new*/ gtk_file_chooser_list_shortcut_folders(FileChooser* this_);
44601 void gtk_file_chooser_remove_filter(FileChooser* this_, FileFilter* filter);
44602 int gtk_file_chooser_remove_shortcut_folder(FileChooser* this_, char* folder, GLib2.Error** error);
44603 int gtk_file_chooser_remove_shortcut_folder_uri(FileChooser* this_, char* uri, GLib2.Error** error);
44604 void gtk_file_chooser_select_all(FileChooser* this_);
44605 int gtk_file_chooser_select_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error);
44606 int gtk_file_chooser_select_filename(FileChooser* this_, char* filename);
44607 int gtk_file_chooser_select_uri(FileChooser* this_, char* uri);
44608 void gtk_file_chooser_set_action(FileChooser* this_, FileChooserAction action);
44609 void gtk_file_chooser_set_create_folders(FileChooser* this_, int create_folders);
44610 int gtk_file_chooser_set_current_folder(FileChooser* this_, char* filename);
44611 int gtk_file_chooser_set_current_folder_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error);
44612 int gtk_file_chooser_set_current_folder_uri(FileChooser* this_, char* uri);
44613 void gtk_file_chooser_set_current_name(FileChooser* this_, char* name);
44614 void gtk_file_chooser_set_do_overwrite_confirmation(FileChooser* this_, int do_overwrite_confirmation);
44615 void gtk_file_chooser_set_extra_widget(FileChooser* this_, Widget* extra_widget);
44616 int gtk_file_chooser_set_file(FileChooser* this_, Gio2.File* file, GLib2.Error** error);
44617 int gtk_file_chooser_set_filename(FileChooser* this_, char* filename);
44618 void gtk_file_chooser_set_filter(FileChooser* this_, FileFilter* filter);
44619 void gtk_file_chooser_set_local_only(FileChooser* this_, int local_only);
44620 void gtk_file_chooser_set_preview_widget(FileChooser* this_, Widget* preview_widget);
44621 void gtk_file_chooser_set_preview_widget_active(FileChooser* this_, int active);
44622 void gtk_file_chooser_set_select_multiple(FileChooser* this_, int select_multiple);
44623 void gtk_file_chooser_set_show_hidden(FileChooser* this_, int show_hidden);
44624 int gtk_file_chooser_set_uri(FileChooser* this_, char* uri);
44625 void gtk_file_chooser_set_use_preview_label(FileChooser* this_, int use_label);
44626 void gtk_file_chooser_unselect_all(FileChooser* this_);
44627 void gtk_file_chooser_unselect_file(FileChooser* this_, Gio2.File* file);
44628 void gtk_file_chooser_unselect_filename(FileChooser* this_, char* filename);
44629 void gtk_file_chooser_unselect_uri(FileChooser* this_, char* uri);
44630 FileChooserButton* gtk_file_chooser_button_new(char* title, FileChooserAction action);
44631 FileChooserButton* gtk_file_chooser_button_new_with_backend(char* title, FileChooserAction action, char* backend);
44632 FileChooserButton* gtk_file_chooser_button_new_with_dialog(Widget* dialog);
44633 int gtk_file_chooser_button_get_focus_on_click(FileChooserButton* this_);
44634 char* gtk_file_chooser_button_get_title(FileChooserButton* this_);
44635 int gtk_file_chooser_button_get_width_chars(FileChooserButton* this_);
44636 void gtk_file_chooser_button_set_focus_on_click(FileChooserButton* this_, int focus_on_click);
44637 void gtk_file_chooser_button_set_title(FileChooserButton* this_, char* title);
44638 void gtk_file_chooser_button_set_width_chars(FileChooserButton* this_, int n_chars);
44639 FileChooserDialog* gtk_file_chooser_dialog_new(char* title, Window* parent, FileChooserAction action, char* first_button_text=null, ...);
44640 FileChooserDialog* gtk_file_chooser_dialog_new_with_backend(char* title, Window* parent, FileChooserAction action, char* backend, char* first_button_text=null, ...);
44641 FileChooserWidget* gtk_file_chooser_widget_new(FileChooserAction action);
44642 FileChooserWidget* gtk_file_chooser_widget_new_with_backend(FileChooserAction action, char* backend);
44643 FileFilter* gtk_file_filter_new();
44644 void gtk_file_filter_add_custom(FileFilter* this_, FileFilterFlags needed, FileFilterFunc func, void* data, GLib2.DestroyNotify notify);
44645 void gtk_file_filter_add_mime_type(FileFilter* this_, char* mime_type);
44646 void gtk_file_filter_add_pattern(FileFilter* this_, char* pattern);
44647 void gtk_file_filter_add_pixbuf_formats(FileFilter* this_);
44648 int gtk_file_filter_filter(FileFilter* this_, FileFilterInfo* filter_info);
44649 char* gtk_file_filter_get_name(FileFilter* this_);
44650 FileFilterFlags gtk_file_filter_get_needed(FileFilter* this_);
44651 void gtk_file_filter_set_name(FileFilter* this_, char* name=null);
44652 FileSelection* gtk_file_selection_new(char* title);
44653 void gtk_file_selection_complete(FileSelection* this_, char* pattern);
44654 char* gtk_file_selection_get_filename(FileSelection* this_);
44655 int gtk_file_selection_get_select_multiple(FileSelection* this_);
44656 char** gtk_file_selection_get_selections(FileSelection* this_);
44657 void gtk_file_selection_hide_fileop_buttons(FileSelection* this_);
44658 void gtk_file_selection_set_filename(FileSelection* this_, char* filename);
44659 void gtk_file_selection_set_select_multiple(FileSelection* this_, int select_multiple);
44660 void gtk_file_selection_show_fileop_buttons(FileSelection* this_);
44661 Fixed* gtk_fixed_new();
44662 int gtk_fixed_get_has_window(Fixed* this_);
44663 void gtk_fixed_move(Fixed* this_, Widget* widget, int x, int y);
44664 void gtk_fixed_put(Fixed* this_, Widget* widget, int x, int y);
44665 void gtk_fixed_set_has_window(Fixed* this_, int has_window);
44666 FontButton* gtk_font_button_new();
44667 FontButton* gtk_font_button_new_with_font(char* fontname);
44668 char* gtk_font_button_get_font_name(FontButton* this_);
44669 int gtk_font_button_get_show_size(FontButton* this_);
44670 int gtk_font_button_get_show_style(FontButton* this_);
44671 char* gtk_font_button_get_title(FontButton* this_);
44672 int gtk_font_button_get_use_font(FontButton* this_);
44673 int gtk_font_button_get_use_size(FontButton* this_);
44674 int gtk_font_button_set_font_name(FontButton* this_, char* fontname);
44675 void gtk_font_button_set_show_size(FontButton* this_, int show_size);
44676 void gtk_font_button_set_show_style(FontButton* this_, int show_style);
44677 void gtk_font_button_set_title(FontButton* this_, char* title);
44678 void gtk_font_button_set_use_font(FontButton* this_, int use_font);
44679 void gtk_font_button_set_use_size(FontButton* this_, int use_size);
44680 FontSelection* gtk_font_selection_new();
44681 Pango.FontFace* gtk_font_selection_get_face(FontSelection* this_);
44682 Widget* gtk_font_selection_get_face_list(FontSelection* this_);
44683 Pango.FontFamily* gtk_font_selection_get_family(FontSelection* this_);
44684 Widget* gtk_font_selection_get_family_list(FontSelection* this_);
44685 Gdk2.Font* /*new*/ gtk_font_selection_get_font(FontSelection* this_);
44686 char* /*new*/ gtk_font_selection_get_font_name(FontSelection* this_);
44687 Widget* gtk_font_selection_get_preview_entry(FontSelection* this_);
44688 char* gtk_font_selection_get_preview_text(FontSelection* this_);
44689 int gtk_font_selection_get_size(FontSelection* this_);
44690 Widget* gtk_font_selection_get_size_entry(FontSelection* this_);
44691 Widget* gtk_font_selection_get_size_list(FontSelection* this_);
44692 int gtk_font_selection_set_font_name(FontSelection* this_, char* fontname);
44693 void gtk_font_selection_set_preview_text(FontSelection* this_, char* text);
44694 FontSelectionDialog* gtk_font_selection_dialog_new(char* title);
44695 Widget* gtk_font_selection_dialog_get_apply_button(FontSelectionDialog* this_);
44696 Widget* gtk_font_selection_dialog_get_cancel_button(FontSelectionDialog* this_);
44697 Gdk2.Font* /*new*/ gtk_font_selection_dialog_get_font(FontSelectionDialog* this_);
44698 char* /*new*/ gtk_font_selection_dialog_get_font_name(FontSelectionDialog* this_);
44699 Widget* gtk_font_selection_dialog_get_font_selection(FontSelectionDialog* this_);
44700 Widget* gtk_font_selection_dialog_get_ok_button(FontSelectionDialog* this_);
44701 char* gtk_font_selection_dialog_get_preview_text(FontSelectionDialog* this_);
44702 int gtk_font_selection_dialog_set_font_name(FontSelectionDialog* this_, char* fontname);
44703 void gtk_font_selection_dialog_set_preview_text(FontSelectionDialog* this_, char* text);
44704 Frame* gtk_frame_new(char* label);
44705 char* gtk_frame_get_label(Frame* this_);
44706 void gtk_frame_get_label_align(Frame* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null);
44707 Widget* gtk_frame_get_label_widget(Frame* this_);
44708 ShadowType gtk_frame_get_shadow_type(Frame* this_);
44709 void gtk_frame_set_label(Frame* this_, char* label=null);
44710 void gtk_frame_set_label_align(Frame* this_, float xalign, float yalign);
44711 void gtk_frame_set_label_widget(Frame* this_, Widget* label_widget);
44712 void gtk_frame_set_shadow_type(Frame* this_, ShadowType type);
44713 GammaCurve* gtk_gamma_curve_new();
44714 HBox* gtk_hbox_new(int homogeneous, int spacing);
44715 HButtonBox* gtk_hbutton_box_new();
44716 ButtonBoxStyle gtk_hbutton_box_get_layout_default();
44717 int gtk_hbutton_box_get_spacing_default();
44718 void gtk_hbutton_box_set_layout_default(ButtonBoxStyle layout);
44719 void gtk_hbutton_box_set_spacing_default(int spacing);
44720 HPaned* gtk_hpaned_new();
44721 HRuler* gtk_hruler_new();
44722 HSV* gtk_hsv_new();
44723 void gtk_hsv_to_rgb(double h, double s, double v, /*out*/ double* r, /*out*/ double* g, /*out*/ double* b);
44724 void gtk_hsv_get_color(HSV* this_, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v);
44725 void gtk_hsv_get_metrics(HSV* this_, /*out*/ int* size, /*out*/ int* ring_width);
44726 int gtk_hsv_is_adjusting(HSV* this_);
44727 void gtk_hsv_set_color(HSV* this_, double h, double s, double v);
44728 void gtk_hsv_set_metrics(HSV* this_, int size, int ring_width);
44729 HScale* gtk_hscale_new(Adjustment* adjustment);
44730 HScale* gtk_hscale_new_with_range(double min, double max, double step);
44731 HScrollbar* gtk_hscrollbar_new(Adjustment* adjustment=null);
44732 HSeparator* gtk_hseparator_new();
44733 HandleBox* gtk_handle_box_new();
44734 int gtk_handle_box_get_child_detached(HandleBox* this_);
44735 PositionType gtk_handle_box_get_handle_position(HandleBox* this_);
44736 ShadowType gtk_handle_box_get_shadow_type(HandleBox* this_);
44737 PositionType gtk_handle_box_get_snap_edge(HandleBox* this_);
44738 void gtk_handle_box_set_handle_position(HandleBox* this_, PositionType position);
44739 void gtk_handle_box_set_shadow_type(HandleBox* this_, ShadowType type);
44740 void gtk_handle_box_set_snap_edge(HandleBox* this_, PositionType edge);
44741 int gtk_im_context_delete_surrounding(IMContext* this_, int offset, int n_chars);
44742 int gtk_im_context_filter_keypress(IMContext* this_, Gdk2.EventKey* event);
44743 void gtk_im_context_focus_in(IMContext* this_);
44744 void gtk_im_context_focus_out(IMContext* this_);
44745 void gtk_im_context_get_preedit_string(IMContext* this_, /*out*/ char** str, /*out*/ Pango.AttrList** attrs, /*out*/ int* cursor_pos);
44746 int gtk_im_context_get_surrounding(IMContext* this_, /*out*/ char** text, int* cursor_index);
44747 void gtk_im_context_reset(IMContext* this_);
44748 void gtk_im_context_set_client_window(IMContext* this_, Gdk2.Window* window=null);
44749 void gtk_im_context_set_cursor_location(IMContext* this_, Gdk2.Rectangle* area);
44750 void gtk_im_context_set_surrounding(IMContext* this_, char* text, int len, int cursor_index);
44751 void gtk_im_context_set_use_preedit(IMContext* this_, int use_preedit);
44752 IMContextSimple* /*new*/ gtk_im_context_simple_new();
44753 void gtk_im_context_simple_add_table(IMContextSimple* this_, ushort* data, int max_seq_len, int n_seqs);
44754 IMMulticontext* /*new*/ gtk_im_multicontext_new();
44755 void gtk_im_multicontext_append_menuitems(IMMulticontext* this_, MenuShell* menushell);
44756 char* gtk_im_multicontext_get_context_id(IMMulticontext* this_);
44757 void gtk_im_multicontext_set_context_id(IMMulticontext* this_, char* context_id);
44758 IconFactory* /*new*/ gtk_icon_factory_new();
44759 IconSet* gtk_icon_factory_lookup_default(char* stock_id);
44760 void gtk_icon_factory_add(IconFactory* this_, char* stock_id, IconSet* icon_set);
44761 void gtk_icon_factory_add_default(IconFactory* this_);
44762 IconSet* gtk_icon_factory_lookup(IconFactory* this_, char* stock_id);
44763 void gtk_icon_factory_remove_default(IconFactory* this_);
44764 IconInfo* /*new*/ gtk_icon_info_new_for_pixbuf(IconTheme* icon_theme, GdkPixbuf2.Pixbuf* pixbuf);
44765 IconInfo* /*new*/ gtk_icon_info_copy(IconInfo* this_);
44766 void gtk_icon_info_free(IconInfo* this_);
44767 int gtk_icon_info_get_attach_points(IconInfo* this_, Gdk2.Point** points=null, int* n_points=null);
44768 int gtk_icon_info_get_base_size(IconInfo* this_);
44769 GdkPixbuf2.Pixbuf* gtk_icon_info_get_builtin_pixbuf(IconInfo* this_);
44770 char* gtk_icon_info_get_display_name(IconInfo* this_);
44771 int gtk_icon_info_get_embedded_rect(IconInfo* this_, /*out*/ Gdk2.Rectangle* rectangle);
44772 char* gtk_icon_info_get_filename(IconInfo* this_);
44773 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_info_load_icon(IconInfo* this_, GLib2.Error** error);
44774 void gtk_icon_info_set_raw_coordinates(IconInfo* this_, int raw_coordinates);
44775 IconSet* /*new*/ gtk_icon_set_new();
44776 IconSet* /*new*/ gtk_icon_set_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf);
44777 void gtk_icon_set_add_source(IconSet* this_, IconSource* source);
44778 IconSet* /*new*/ gtk_icon_set_copy(IconSet* this_);
44779 void gtk_icon_set_get_sizes(IconSet* this_, /*out*/ /*POINTER*/ int* sizes, /*out*/ int* n_sizes);
44780 IconSet* /*new*/ gtk_icon_set_ref(IconSet* this_);
44781 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_set_render_icon(IconSet* this_, Style* style, TextDirection direction, StateType state, int size, Widget* widget=null, char* detail=null);
44782 void gtk_icon_set_unref(IconSet* this_);
44783 IconSource* /*new*/ gtk_icon_source_new();
44784 IconSource* /*new*/ gtk_icon_source_copy(IconSource* this_);
44785 void gtk_icon_source_free(IconSource* this_);
44786 TextDirection gtk_icon_source_get_direction(IconSource* this_);
44787 int gtk_icon_source_get_direction_wildcarded(IconSource* this_);
44788 char* gtk_icon_source_get_filename(IconSource* this_);
44789 char* gtk_icon_source_get_icon_name(IconSource* this_);
44790 GdkPixbuf2.Pixbuf* gtk_icon_source_get_pixbuf(IconSource* this_);
44791 int gtk_icon_source_get_size(IconSource* this_);
44792 int gtk_icon_source_get_size_wildcarded(IconSource* this_);
44793 StateType gtk_icon_source_get_state(IconSource* this_);
44794 int gtk_icon_source_get_state_wildcarded(IconSource* this_);
44795 void gtk_icon_source_set_direction(IconSource* this_, TextDirection direction);
44796 void gtk_icon_source_set_direction_wildcarded(IconSource* this_, int setting);
44797 void gtk_icon_source_set_filename(IconSource* this_, char* filename);
44798 void gtk_icon_source_set_icon_name(IconSource* this_, char* icon_name=null);
44799 void gtk_icon_source_set_pixbuf(IconSource* this_, GdkPixbuf2.Pixbuf* pixbuf);
44800 void gtk_icon_source_set_size(IconSource* this_, int size);
44801 void gtk_icon_source_set_size_wildcarded(IconSource* this_, int setting);
44802 void gtk_icon_source_set_state(IconSource* this_, StateType state);
44803 void gtk_icon_source_set_state_wildcarded(IconSource* this_, int setting);
44804 IconTheme* /*new*/ gtk_icon_theme_new();
44805 void gtk_icon_theme_add_builtin_icon(char* icon_name, int size, GdkPixbuf2.Pixbuf* pixbuf);
44806 IconTheme* gtk_icon_theme_get_default();
44807 IconTheme* gtk_icon_theme_get_for_screen(Gdk2.Screen* screen);
44808 void gtk_icon_theme_append_search_path(IconTheme* this_, char* path);
44809 IconInfo* /*new*/ gtk_icon_theme_choose_icon(IconTheme* this_, char* icon_names, int size, IconLookupFlags flags);
44810 char* /*new*/ gtk_icon_theme_get_example_icon_name(IconTheme* this_);
44811 int* gtk_icon_theme_get_icon_sizes(IconTheme* this_, char* icon_name);
44812 void gtk_icon_theme_get_search_path(IconTheme* this_, char** path, int* n_elements);
44813 int gtk_icon_theme_has_icon(IconTheme* this_, char* icon_name);
44814 GLib2.List* /*new*/ gtk_icon_theme_list_contexts(IconTheme* this_);
44815 GLib2.List* /*new*/ gtk_icon_theme_list_icons(IconTheme* this_, char* context);
44816 GdkPixbuf2.Pixbuf* /*new*/ gtk_icon_theme_load_icon(IconTheme* this_, char* icon_name, int size, IconLookupFlags flags, GLib2.Error** error);
44817 IconInfo* /*new*/ gtk_icon_theme_lookup_by_gicon(IconTheme* this_, Gio2.Icon* icon, int size, IconLookupFlags flags);
44818 IconInfo* /*new*/ gtk_icon_theme_lookup_icon(IconTheme* this_, char* icon_name, int size, IconLookupFlags flags);
44819 void gtk_icon_theme_prepend_search_path(IconTheme* this_, char* path);
44820 int gtk_icon_theme_rescan_if_needed(IconTheme* this_);
44821 void gtk_icon_theme_set_custom_theme(IconTheme* this_, char* theme_name);
44822 void gtk_icon_theme_set_screen(IconTheme* this_, Gdk2.Screen* screen);
44823 void gtk_icon_theme_set_search_path(IconTheme* this_, char* path, int n_elements);
44824 IconView* gtk_icon_view_new();
44825 IconView* gtk_icon_view_new_with_model(TreeModel* model);
44826 void gtk_icon_view_convert_widget_to_bin_window_coords(IconView* this_, int wx, int wy, /*out*/ int* bx, /*out*/ int* by);
44827 Gdk2.Pixmap* /*new*/ gtk_icon_view_create_drag_icon(IconView* this_, TreePath* path);
44828 void gtk_icon_view_enable_model_drag_dest(IconView* this_, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
44829 void gtk_icon_view_enable_model_drag_source(IconView* this_, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
44830 int gtk_icon_view_get_column_spacing(IconView* this_);
44831 int gtk_icon_view_get_columns(IconView* this_);
44832 int gtk_icon_view_get_cursor(IconView* this_, TreePath** path=null, CellRenderer** cell=null);
44833 int gtk_icon_view_get_dest_item_at_pos(IconView* this_, int drag_x, int drag_y, TreePath** path=null, IconViewDropPosition* pos=null);
44834 void gtk_icon_view_get_drag_dest_item(IconView* this_, TreePath** path=null, IconViewDropPosition* pos=null);
44835 int gtk_icon_view_get_item_at_pos(IconView* this_, int x, int y, TreePath** path, CellRenderer** cell);
44836 int gtk_icon_view_get_item_column(IconView* this_, TreePath* path);
44837 Orientation gtk_icon_view_get_item_orientation(IconView* this_);
44838 int gtk_icon_view_get_item_padding(IconView* this_);
44839 int gtk_icon_view_get_item_row(IconView* this_, TreePath* path);
44840 int gtk_icon_view_get_item_width(IconView* this_);
44841 int gtk_icon_view_get_margin(IconView* this_);
44842 int gtk_icon_view_get_markup_column(IconView* this_);
44843 TreeModel* gtk_icon_view_get_model(IconView* this_);
44844 Orientation gtk_icon_view_get_orientation(IconView* this_);
44845 TreePath* /*new*/ gtk_icon_view_get_path_at_pos(IconView* this_, int x, int y);
44846 int gtk_icon_view_get_pixbuf_column(IconView* this_);
44847 int gtk_icon_view_get_reorderable(IconView* this_);
44848 int gtk_icon_view_get_row_spacing(IconView* this_);
44849 GLib2.List* /*new*/ gtk_icon_view_get_selected_items(IconView* this_);
44850 SelectionMode gtk_icon_view_get_selection_mode(IconView* this_);
44851 int gtk_icon_view_get_spacing(IconView* this_);
44852 int gtk_icon_view_get_text_column(IconView* this_);
44853 int gtk_icon_view_get_tooltip_column(IconView* this_);
44854 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);
44855 int gtk_icon_view_get_visible_range(IconView* this_, TreePath** start_path=null, TreePath** end_path=null);
44856 void gtk_icon_view_item_activated(IconView* this_, TreePath* path);
44857 int gtk_icon_view_path_is_selected(IconView* this_, TreePath* path);
44858 void gtk_icon_view_scroll_to_path(IconView* this_, TreePath* path, int use_align, float row_align, float col_align);
44859 void gtk_icon_view_select_all(IconView* this_);
44860 void gtk_icon_view_select_path(IconView* this_, TreePath* path);
44861 void gtk_icon_view_selected_foreach(IconView* this_, IconViewForeachFunc func, void* data);
44862 void gtk_icon_view_set_column_spacing(IconView* this_, int column_spacing);
44863 void gtk_icon_view_set_columns(IconView* this_, int columns);
44864 void gtk_icon_view_set_cursor(IconView* this_, TreePath* path, CellRenderer* cell, int start_editing);
44865 void gtk_icon_view_set_drag_dest_item(IconView* this_, TreePath* path, IconViewDropPosition pos);
44866 void gtk_icon_view_set_item_orientation(IconView* this_, Orientation orientation);
44867 void gtk_icon_view_set_item_padding(IconView* this_, int item_padding);
44868 void gtk_icon_view_set_item_width(IconView* this_, int item_width);
44869 void gtk_icon_view_set_margin(IconView* this_, int margin);
44870 void gtk_icon_view_set_markup_column(IconView* this_, int column);
44871 void gtk_icon_view_set_model(IconView* this_, TreeModel* model=null);
44872 void gtk_icon_view_set_orientation(IconView* this_, Orientation orientation);
44873 void gtk_icon_view_set_pixbuf_column(IconView* this_, int column);
44874 void gtk_icon_view_set_reorderable(IconView* this_, int reorderable);
44875 void gtk_icon_view_set_row_spacing(IconView* this_, int row_spacing);
44876 void gtk_icon_view_set_selection_mode(IconView* this_, SelectionMode mode);
44877 void gtk_icon_view_set_spacing(IconView* this_, int spacing);
44878 void gtk_icon_view_set_text_column(IconView* this_, int column);
44879 void gtk_icon_view_set_tooltip_cell(IconView* this_, Tooltip* tooltip, TreePath* path, CellRenderer* cell=null);
44880 void gtk_icon_view_set_tooltip_column(IconView* this_, int column);
44881 void gtk_icon_view_set_tooltip_item(IconView* this_, Tooltip* tooltip, TreePath* path);
44882 void gtk_icon_view_unselect_all(IconView* this_);
44883 void gtk_icon_view_unselect_path(IconView* this_, TreePath* path);
44884 void gtk_icon_view_unset_model_drag_dest(IconView* this_);
44885 void gtk_icon_view_unset_model_drag_source(IconView* this_);
44886 Image* gtk_image_new();
44887 Image* gtk_image_new_from_animation(GdkPixbuf2.PixbufAnimation* animation);
44888 Image* gtk_image_new_from_file(char* filename);
44889 Image* gtk_image_new_from_gicon(Gio2.Icon* icon, int size);
44890 Image* gtk_image_new_from_icon_name(char* icon_name, int size);
44891 Image* gtk_image_new_from_icon_set(IconSet* icon_set, int size);
44892 Image* gtk_image_new_from_image(Gdk2.Image* image=null, Gdk2.Bitmap* mask=null);
44893 Image* gtk_image_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf=null);
44894 Image* gtk_image_new_from_pixmap(Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null);
44895 Image* gtk_image_new_from_stock(char* stock_id, int size);
44896 void gtk_image_clear(Image* this_);
44897 void gtk_image_get(Image* this_, Gdk2.Image** val, Gdk2.Bitmap** mask);
44898 GdkPixbuf2.PixbufAnimation* gtk_image_get_animation(Image* this_);
44899 void gtk_image_get_gicon(Image* this_, /*out*/ Gio2.Icon** gicon=null, /*out*/ /*POINTER*/ int* size=null);
44900 void gtk_image_get_icon_name(Image* this_, /*out*/ char** icon_name=null, /*out*/ /*POINTER*/ int* size=null);
44901 void gtk_image_get_icon_set(Image* this_, /*out*/ IconSet** icon_set=null, /*out*/ /*POINTER*/ int* size=null);
44902 void gtk_image_get_image(Image* this_, /*out*/ Gdk2.Image** gdk_image=null, /*out*/ Gdk2.Bitmap** mask=null);
44903 GdkPixbuf2.Pixbuf* gtk_image_get_pixbuf(Image* this_);
44904 int gtk_image_get_pixel_size(Image* this_);
44905 void gtk_image_get_pixmap(Image* this_, /*out*/ Gdk2.Pixmap** pixmap=null, /*out*/ Gdk2.Bitmap** mask=null);
44906 void gtk_image_get_stock(Image* this_, /*out*/ char** stock_id=null, /*out*/ /*POINTER*/ int* size=null);
44907 ImageType gtk_image_get_storage_type(Image* this_);
44908 void gtk_image_set(Image* this_, Gdk2.Image* val, Gdk2.Bitmap* mask);
44909 void gtk_image_set_from_animation(Image* this_, GdkPixbuf2.PixbufAnimation* animation);
44910 void gtk_image_set_from_file(Image* this_, char* filename=null);
44911 void gtk_image_set_from_gicon(Image* this_, Gio2.Icon* icon, int size);
44912 void gtk_image_set_from_icon_name(Image* this_, char* icon_name, int size);
44913 void gtk_image_set_from_icon_set(Image* this_, IconSet* icon_set, int size);
44914 void gtk_image_set_from_image(Image* this_, Gdk2.Image* gdk_image=null, Gdk2.Bitmap* mask=null);
44915 void gtk_image_set_from_pixbuf(Image* this_, GdkPixbuf2.Pixbuf* pixbuf=null);
44916 void gtk_image_set_from_pixmap(Image* this_, Gdk2.Pixmap* pixmap=null, Gdk2.Bitmap* mask=null);
44917 void gtk_image_set_from_stock(Image* this_, char* stock_id, int size);
44918 void gtk_image_set_pixel_size(Image* this_, int pixel_size);
44919 ImageMenuItem* gtk_image_menu_item_new();
44920 ImageMenuItem* gtk_image_menu_item_new_from_stock(char* stock_id, AccelGroup* accel_group=null);
44921 ImageMenuItem* gtk_image_menu_item_new_with_label(char* label);
44922 ImageMenuItem* gtk_image_menu_item_new_with_mnemonic(char* label);
44923 int gtk_image_menu_item_get_always_show_image(ImageMenuItem* this_);
44924 Widget* gtk_image_menu_item_get_image(ImageMenuItem* this_);
44925 int gtk_image_menu_item_get_use_stock(ImageMenuItem* this_);
44926 void gtk_image_menu_item_set_accel_group(ImageMenuItem* this_, AccelGroup* accel_group);
44927 void gtk_image_menu_item_set_always_show_image(ImageMenuItem* this_, int always_show);
44928 void gtk_image_menu_item_set_image(ImageMenuItem* this_, Widget* image=null);
44929 void gtk_image_menu_item_set_use_stock(ImageMenuItem* this_, int use_stock);
44930 InfoBar* gtk_info_bar_new();
44931 InfoBar* gtk_info_bar_new_with_buttons(char* first_button_text=null, ...);
44932 void gtk_info_bar_add_action_widget(InfoBar* this_, Widget* child, int response_id);
44933 Widget* gtk_info_bar_add_button(InfoBar* this_, char* button_text, int response_id);
44934 void gtk_info_bar_add_buttons(InfoBar* this_, char* first_button_text, ...);
44935 Widget* gtk_info_bar_get_action_area(InfoBar* this_);
44936 Widget* gtk_info_bar_get_content_area(InfoBar* this_);
44937 MessageType gtk_info_bar_get_message_type(InfoBar* this_);
44938 void gtk_info_bar_response(InfoBar* this_, int response_id);
44939 void gtk_info_bar_set_default_response(InfoBar* this_, int response_id);
44940 void gtk_info_bar_set_message_type(InfoBar* this_, MessageType message_type);
44941 void gtk_info_bar_set_response_sensitive(InfoBar* this_, int response_id, int setting);
44942 InputDialog* gtk_input_dialog_new();
44943 Invisible* gtk_invisible_new();
44944 Invisible* gtk_invisible_new_for_screen(Gdk2.Screen* screen);
44945 Gdk2.Screen* gtk_invisible_get_screen(Invisible* this_);
44946 void gtk_invisible_set_screen(Invisible* this_, Gdk2.Screen* screen);
44947 void gtk_item_factories_path_delete(char* ifactory_path, char* path);
44948 void gtk_item_deselect(Item* this_);
44949 void gtk_item_select(Item* this_);
44950 void gtk_item_toggle(Item* this_);
44951 ItemFactory* gtk_item_factory_new(Type container_type, char* path, AccelGroup* accel_group=null);
44952 void gtk_item_factory_add_foreign(Widget* accel_widget, char* full_path, AccelGroup* accel_group, uint keyval, Gdk2.ModifierType modifiers);
44953 void gtk_item_factory_create_menu_entries(uint n_entries, MenuEntry* entries);
44954 ItemFactory* gtk_item_factory_from_path(char* path);
44955 ItemFactory* gtk_item_factory_from_widget(Widget* widget);
44956 char* gtk_item_factory_path_from_widget(Widget* widget);
44957 void* gtk_item_factory_popup_data_from_widget(Widget* widget);
44958 void gtk_item_factory_construct(ItemFactory* this_, Type container_type, char* path, AccelGroup* accel_group);
44959 void gtk_item_factory_create_item(ItemFactory* this_, ItemFactoryEntry* entry, void* callback_data, uint callback_type);
44960 void gtk_item_factory_create_items(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries, void* callback_data);
44961 void gtk_item_factory_create_items_ac(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries, void* callback_data, uint callback_type);
44962 void gtk_item_factory_delete_entries(ItemFactory* this_, uint n_entries, ItemFactoryEntry* entries);
44963 void gtk_item_factory_delete_entry(ItemFactory* this_, ItemFactoryEntry* entry);
44964 void gtk_item_factory_delete_item(ItemFactory* this_, char* path);
44965 Widget* gtk_item_factory_get_item(ItemFactory* this_, char* path);
44966 Widget* gtk_item_factory_get_item_by_action(ItemFactory* this_, uint action);
44967 Widget* gtk_item_factory_get_widget(ItemFactory* this_, char* path);
44968 Widget* gtk_item_factory_get_widget_by_action(ItemFactory* this_, uint action);
44969 void gtk_item_factory_popup(ItemFactory* this_, uint x, uint y, uint mouse_button, uint time_);
44970 void* gtk_item_factory_popup_data(ItemFactory* this_);
44971 void gtk_item_factory_popup_with_data(ItemFactory* this_, void* popup_data, GLib2.DestroyNotify destroy, uint x, uint y, uint mouse_button, uint time_);
44972 void gtk_item_factory_set_translate_func(ItemFactory* this_, TranslateFunc func, void* data, GLib2.DestroyNotify notify);
44973 Label* gtk_label_new(char* str);
44974 Label* gtk_label_new_with_mnemonic(char* str);
44975 void gtk_label_get(Label* this_, char** str);
44976 double gtk_label_get_angle(Label* this_);
44977 Pango.AttrList* gtk_label_get_attributes(Label* this_);
44978 char* gtk_label_get_current_uri(Label* this_);
44979 Pango.EllipsizeMode gtk_label_get_ellipsize(Label* this_);
44980 Justification gtk_label_get_justify(Label* this_);
44981 char* gtk_label_get_label(Label* this_);
44982 Pango.Layout* gtk_label_get_layout(Label* this_);
44983 void gtk_label_get_layout_offsets(Label* this_, /*out*/ int* x=null, /*out*/ int* y=null);
44984 int gtk_label_get_line_wrap(Label* this_);
44985 Pango.WrapMode gtk_label_get_line_wrap_mode(Label* this_);
44986 int gtk_label_get_max_width_chars(Label* this_);
44987 uint gtk_label_get_mnemonic_keyval(Label* this_);
44988 Widget* gtk_label_get_mnemonic_widget(Label* this_);
44989 int gtk_label_get_selectable(Label* this_);
44990 int gtk_label_get_selection_bounds(Label* this_, /*out*/ int* start, /*out*/ int* end);
44991 int gtk_label_get_single_line_mode(Label* this_);
44992 char* gtk_label_get_text(Label* this_);
44993 int gtk_label_get_track_visited_links(Label* this_);
44994 int gtk_label_get_use_markup(Label* this_);
44995 int gtk_label_get_use_underline(Label* this_);
44996 int gtk_label_get_width_chars(Label* this_);
44997 uint gtk_label_parse_uline(Label* this_, char* string_);
44998 void gtk_label_select_region(Label* this_, int start_offset, int end_offset);
44999 void gtk_label_set_angle(Label* this_, double angle);
45000 void gtk_label_set_attributes(Label* this_, Pango.AttrList* attrs);
45001 void gtk_label_set_ellipsize(Label* this_, Pango.EllipsizeMode mode);
45002 void gtk_label_set_justify(Label* this_, Justification jtype);
45003 void gtk_label_set_label(Label* this_, char* str);
45004 void gtk_label_set_line_wrap(Label* this_, int wrap);
45005 void gtk_label_set_line_wrap_mode(Label* this_, Pango.WrapMode wrap_mode);
45006 void gtk_label_set_markup(Label* this_, char* str);
45007 void gtk_label_set_markup_with_mnemonic(Label* this_, char* str);
45008 void gtk_label_set_max_width_chars(Label* this_, int n_chars);
45009 void gtk_label_set_mnemonic_widget(Label* this_, Widget* widget=null);
45010 void gtk_label_set_pattern(Label* this_, char* pattern);
45011 void gtk_label_set_selectable(Label* this_, int setting);
45012 void gtk_label_set_single_line_mode(Label* this_, int single_line_mode);
45013 void gtk_label_set_text(Label* this_, char* str);
45014 void gtk_label_set_text_with_mnemonic(Label* this_, char* str);
45015 void gtk_label_set_track_visited_links(Label* this_, int track_links);
45016 void gtk_label_set_use_markup(Label* this_, int setting);
45017 void gtk_label_set_use_underline(Label* this_, int setting);
45018 void gtk_label_set_width_chars(Label* this_, int n_chars);
45019 Layout* gtk_layout_new(Adjustment* hadjustment=null, Adjustment* vadjustment=null);
45020 void gtk_layout_freeze(Layout* this_);
45021 Gdk2.Window* gtk_layout_get_bin_window(Layout* this_);
45022 Adjustment* gtk_layout_get_hadjustment(Layout* this_);
45023 void gtk_layout_get_size(Layout* this_, /*out*/ uint* width=null, /*out*/ uint* height=null);
45024 Adjustment* gtk_layout_get_vadjustment(Layout* this_);
45025 void gtk_layout_move(Layout* this_, Widget* child_widget, int x, int y);
45026 void gtk_layout_put(Layout* this_, Widget* child_widget, int x, int y);
45027 void gtk_layout_set_hadjustment(Layout* this_, Adjustment* adjustment=null);
45028 void gtk_layout_set_size(Layout* this_, uint width, uint height);
45029 void gtk_layout_set_vadjustment(Layout* this_, Adjustment* adjustment=null);
45030 void gtk_layout_thaw(Layout* this_);
45031 LinkButton* gtk_link_button_new(char* uri);
45032 LinkButton* gtk_link_button_new_with_label(char* uri, char* label=null);
45033 LinkButtonUriFunc gtk_link_button_set_uri_hook(LinkButtonUriFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null);
45034 char* gtk_link_button_get_uri(LinkButton* this_);
45035 int gtk_link_button_get_visited(LinkButton* this_);
45036 void gtk_link_button_set_uri(LinkButton* this_, char* uri);
45037 void gtk_link_button_set_visited(LinkButton* this_, int visited);
45038 List* gtk_list_new();
45039 void gtk_list_append_items(List* this_, GLib2.List* items);
45040 int gtk_list_child_position(List* this_, Widget* child);
45041 void gtk_list_clear_items(List* this_, int start, int end);
45042 void gtk_list_end_drag_selection(List* this_);
45043 void gtk_list_end_selection(List* this_);
45044 void gtk_list_extend_selection(List* this_, ScrollType scroll_type, float position, int auto_start_selection);
45045 void gtk_list_insert_items(List* this_, GLib2.List* items, int position);
45046 void gtk_list_prepend_items(List* this_, GLib2.List* items);
45047 void gtk_list_remove_items(List* this_, GLib2.List* items);
45048 void gtk_list_remove_items_no_unref(List* this_, GLib2.List* items);
45049 void gtk_list_scroll_horizontal(List* this_, ScrollType scroll_type, float position);
45050 void gtk_list_scroll_vertical(List* this_, ScrollType scroll_type, float position);
45051 void gtk_list_select_all(List* this_);
45052 void gtk_list_select_child(List* this_, Widget* child);
45053 void gtk_list_select_item(List* this_, int item);
45054 void gtk_list_set_selection_mode(List* this_, SelectionMode mode);
45055 void gtk_list_start_selection(List* this_);
45056 void gtk_list_toggle_add_mode(List* this_);
45057 void gtk_list_toggle_focus_row(List* this_);
45058 void gtk_list_toggle_row(List* this_, Widget* item);
45059 void gtk_list_undo_selection(List* this_);
45060 void gtk_list_unselect_all(List* this_);
45061 void gtk_list_unselect_child(List* this_, Widget* child);
45062 void gtk_list_unselect_item(List* this_, int item);
45063 ListItem* gtk_list_item_new();
45064 ListItem* gtk_list_item_new_with_label(char* label);
45065 void gtk_list_item_deselect(ListItem* this_);
45066 void gtk_list_item_select(ListItem* this_);
45067 ListStore* /*new*/ gtk_list_store_new(int n_columns, ...);
45068 ListStore* gtk_list_store_newv(int n_columns, Type* types);
45069 void gtk_list_store_append(ListStore* this_, /*out*/ TreeIter* iter);
45070 void gtk_list_store_clear(ListStore* this_);
45071 void gtk_list_store_insert(ListStore* this_, /*out*/ TreeIter* iter, int position);
45072 void gtk_list_store_insert_after(ListStore* this_, /*out*/ TreeIter* iter, TreeIter* sibling=null);
45073 void gtk_list_store_insert_before(ListStore* this_, /*out*/ TreeIter* iter, TreeIter* sibling=null);
45074 void gtk_list_store_insert_with_values(ListStore* this_, /*out*/ TreeIter* iter, int position, ...);
45075 void gtk_list_store_insert_with_valuesv(ListStore* this_, /*out*/ TreeIter* iter, int position, int* columns, GObject2.Value* values, int n_values);
45076 int gtk_list_store_iter_is_valid(ListStore* this_, TreeIter* iter);
45077 void gtk_list_store_move_after(ListStore* this_, TreeIter* iter, TreeIter* position=null);
45078 void gtk_list_store_move_before(ListStore* this_, TreeIter* iter, TreeIter* position=null);
45079 void gtk_list_store_prepend(ListStore* this_, /*out*/ TreeIter* iter);
45080 int gtk_list_store_remove(ListStore* this_, TreeIter* iter);
45081 void gtk_list_store_reorder(ListStore* this_, int* new_order);
45082 void gtk_list_store_set(ListStore* this_, TreeIter* iter, ...);
45083 void gtk_list_store_set_column_types(ListStore* this_, int n_columns, Type* types);
45084 void gtk_list_store_set_valist(ListStore* this_, TreeIter* iter, va_list var_args);
45085 void gtk_list_store_set_value(ListStore* this_, TreeIter* iter, int column, GObject2.Value* value);
45086 void gtk_list_store_set_valuesv(ListStore* this_, TreeIter* iter, int* columns, GObject2.Value* values, int n_values);
45087 void gtk_list_store_swap(ListStore* this_, TreeIter* a, TreeIter* b);
45088 Menu* gtk_menu_new();
45089 GLib2.List* gtk_menu_get_for_attach_widget(Widget* widget);
45090 void gtk_menu_attach(Menu* this_, Widget* child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach);
45091 void gtk_menu_attach_to_widget(Menu* this_, Widget* attach_widget, MenuDetachFunc detacher);
45092 void gtk_menu_detach(Menu* this_);
45093 AccelGroup* gtk_menu_get_accel_group(Menu* this_);
45094 char* gtk_menu_get_accel_path(Menu* this_);
45095 Widget* gtk_menu_get_active(Menu* this_);
45096 Widget* gtk_menu_get_attach_widget(Menu* this_);
45097 int gtk_menu_get_monitor(Menu* this_);
45098 int gtk_menu_get_reserve_toggle_size(Menu* this_);
45099 int gtk_menu_get_tearoff_state(Menu* this_);
45100 char* gtk_menu_get_title(Menu* this_);
45101 void gtk_menu_popdown(Menu* this_);
45102 void gtk_menu_popup(Menu* this_, Widget* parent_menu_shell, Widget* parent_menu_item, MenuPositionFunc func, void* data, uint button, uint activate_time);
45103 void gtk_menu_reorder_child(Menu* this_, Widget* child, int position);
45104 void gtk_menu_reposition(Menu* this_);
45105 void gtk_menu_set_accel_group(Menu* this_, AccelGroup* accel_group=null);
45106 void gtk_menu_set_accel_path(Menu* this_, char* accel_path=null);
45107 void gtk_menu_set_active(Menu* this_, uint index_);
45108 void gtk_menu_set_monitor(Menu* this_, int monitor_num);
45109 void gtk_menu_set_reserve_toggle_size(Menu* this_, int reserve_toggle_size);
45110 void gtk_menu_set_screen(Menu* this_, Gdk2.Screen* screen=null);
45111 void gtk_menu_set_tearoff_state(Menu* this_, int torn_off);
45112 void gtk_menu_set_title(Menu* this_, char* title);
45113 MenuBar* gtk_menu_bar_new();
45114 PackDirection gtk_menu_bar_get_child_pack_direction(MenuBar* this_);
45115 PackDirection gtk_menu_bar_get_pack_direction(MenuBar* this_);
45116 void gtk_menu_bar_set_child_pack_direction(MenuBar* this_, PackDirection child_pack_dir);
45117 void gtk_menu_bar_set_pack_direction(MenuBar* this_, PackDirection pack_dir);
45118 MenuItem* gtk_menu_item_new();
45119 MenuItem* gtk_menu_item_new_with_label(char* label);
45120 MenuItem* gtk_menu_item_new_with_mnemonic(char* label);
45121 void gtk_menu_item_activate(MenuItem* this_);
45122 void gtk_menu_item_deselect(MenuItem* this_);
45123 char* gtk_menu_item_get_accel_path(MenuItem* this_);
45124 char* gtk_menu_item_get_label(MenuItem* this_);
45125 int gtk_menu_item_get_right_justified(MenuItem* this_);
45126 Widget* gtk_menu_item_get_submenu(MenuItem* this_);
45127 int gtk_menu_item_get_use_underline(MenuItem* this_);
45128 void gtk_menu_item_remove_submenu(MenuItem* this_);
45129 void gtk_menu_item_select(MenuItem* this_);
45130 void gtk_menu_item_set_accel_path(MenuItem* this_, char* accel_path=null);
45131 void gtk_menu_item_set_label(MenuItem* this_, char* label);
45132 void gtk_menu_item_set_right_justified(MenuItem* this_, int right_justified);
45133 void gtk_menu_item_set_submenu(MenuItem* this_, Widget* submenu=null);
45134 void gtk_menu_item_set_use_underline(MenuItem* this_, int setting);
45135 void gtk_menu_item_toggle_size_allocate(MenuItem* this_, int allocation);
45136 void gtk_menu_item_toggle_size_request(MenuItem* this_, int* requisition);
45137 void gtk_menu_shell_activate_item(MenuShell* this_, Widget* menu_item, int force_deactivate);
45138 void gtk_menu_shell_append(MenuShell* this_, Widget* child);
45139 void gtk_menu_shell_cancel(MenuShell* this_);
45140 void gtk_menu_shell_deactivate(MenuShell* this_);
45141 void gtk_menu_shell_deselect(MenuShell* this_);
45142 int gtk_menu_shell_get_take_focus(MenuShell* this_);
45143 void gtk_menu_shell_insert(MenuShell* this_, Widget* child, int position);
45144 void gtk_menu_shell_prepend(MenuShell* this_, Widget* child);
45145 void gtk_menu_shell_select_first(MenuShell* this_, int search_sensitive);
45146 void gtk_menu_shell_select_item(MenuShell* this_, Widget* menu_item);
45147 void gtk_menu_shell_set_take_focus(MenuShell* this_, int take_focus);
45148 MenuToolButton* gtk_menu_tool_button_new(Widget* icon_widget=null, char* label=null);
45149 MenuToolButton* gtk_menu_tool_button_new_from_stock(char* stock_id);
45150 Widget* gtk_menu_tool_button_get_menu(MenuToolButton* this_);
45151 void gtk_menu_tool_button_set_arrow_tooltip(MenuToolButton* this_, Tooltips* tooltips, char* tip_text=null, char* tip_private=null);
45152 void gtk_menu_tool_button_set_arrow_tooltip_markup(MenuToolButton* this_, char* markup);
45153 void gtk_menu_tool_button_set_arrow_tooltip_text(MenuToolButton* this_, char* text);
45154 void gtk_menu_tool_button_set_menu(MenuToolButton* this_, Widget* menu);
45155 MessageDialog* gtk_message_dialog_new(Window* parent, DialogFlags flags, MessageType type, ButtonsType buttons, char* message_format=null, ...);
45156 MessageDialog* gtk_message_dialog_new_with_markup(Window* parent, DialogFlags flags, MessageType type, ButtonsType buttons, char* message_format=null, ...);
45157 void gtk_message_dialog_format_secondary_markup(MessageDialog* this_, char* message_format, ...);
45158 void gtk_message_dialog_format_secondary_text(MessageDialog* this_, char* message_format=null, ...);
45159 Widget* gtk_message_dialog_get_image(MessageDialog* this_);
45160 Widget* gtk_message_dialog_get_message_area(MessageDialog* this_);
45161 void gtk_message_dialog_set_image(MessageDialog* this_, Widget* image);
45162 void gtk_message_dialog_set_markup(MessageDialog* this_, char* str);
45163 void gtk_misc_get_alignment(Misc* this_, /*out*/ float* xalign=null, /*out*/ float* yalign=null);
45164 void gtk_misc_get_padding(Misc* this_, /*out*/ int* xpad=null, /*out*/ int* ypad=null);
45165 void gtk_misc_set_alignment(Misc* this_, float xalign, float yalign);
45166 void gtk_misc_set_padding(Misc* this_, int xpad, int ypad);
45167 MountOperation* /*new*/ gtk_mount_operation_new(Window* parent=null);
45168 Window* gtk_mount_operation_get_parent(MountOperation* this_);
45169 Gdk2.Screen* gtk_mount_operation_get_screen(MountOperation* this_);
45170 int gtk_mount_operation_is_showing(MountOperation* this_);
45171 void gtk_mount_operation_set_parent(MountOperation* this_, Window* parent=null);
45172 void gtk_mount_operation_set_screen(MountOperation* this_, Gdk2.Screen* screen);
45173 Notebook* gtk_notebook_new();
45174 void gtk_notebook_set_window_creation_hook(NotebookWindowCreationFunc func, void* data, GLib2.DestroyNotify destroy=null);
45175 int gtk_notebook_append_page(Notebook* this_, Widget* child, Widget* tab_label=null);
45176 int gtk_notebook_append_page_menu(Notebook* this_, Widget* child, Widget* tab_label=null, Widget* menu_label=null);
45177 Widget* gtk_notebook_get_action_widget(Notebook* this_, PackType pack_type);
45178 int gtk_notebook_get_current_page(Notebook* this_);
45179 void* gtk_notebook_get_group(Notebook* this_);
45180 int gtk_notebook_get_group_id(Notebook* this_);
45181 char* gtk_notebook_get_group_name(Notebook* this_);
45182 Widget* gtk_notebook_get_menu_label(Notebook* this_, Widget* child);
45183 char* gtk_notebook_get_menu_label_text(Notebook* this_, Widget* child);
45184 int gtk_notebook_get_n_pages(Notebook* this_);
45185 Widget* gtk_notebook_get_nth_page(Notebook* this_, int page_num);
45186 int gtk_notebook_get_scrollable(Notebook* this_);
45187 int gtk_notebook_get_show_border(Notebook* this_);
45188 int gtk_notebook_get_show_tabs(Notebook* this_);
45189 int gtk_notebook_get_tab_detachable(Notebook* this_, Widget* child);
45190 ushort gtk_notebook_get_tab_hborder(Notebook* this_);
45191 Widget* gtk_notebook_get_tab_label(Notebook* this_, Widget* child);
45192 char* gtk_notebook_get_tab_label_text(Notebook* this_, Widget* child);
45193 PositionType gtk_notebook_get_tab_pos(Notebook* this_);
45194 int gtk_notebook_get_tab_reorderable(Notebook* this_, Widget* child);
45195 ushort gtk_notebook_get_tab_vborder(Notebook* this_);
45196 int gtk_notebook_insert_page(Notebook* this_, Widget* child, Widget* tab_label, int position);
45197 int gtk_notebook_insert_page_menu(Notebook* this_, Widget* child, Widget* tab_label, Widget* menu_label, int position);
45198 void gtk_notebook_next_page(Notebook* this_);
45199 int gtk_notebook_page_num(Notebook* this_, Widget* child);
45200 void gtk_notebook_popup_disable(Notebook* this_);
45201 void gtk_notebook_popup_enable(Notebook* this_);
45202 int gtk_notebook_prepend_page(Notebook* this_, Widget* child, Widget* tab_label=null);
45203 int gtk_notebook_prepend_page_menu(Notebook* this_, Widget* child, Widget* tab_label=null, Widget* menu_label=null);
45204 void gtk_notebook_prev_page(Notebook* this_);
45205 void gtk_notebook_query_tab_label_packing(Notebook* this_, Widget* child, int* expand, int* fill, PackType* pack_type);
45206 void gtk_notebook_remove_page(Notebook* this_, int page_num);
45207 void gtk_notebook_reorder_child(Notebook* this_, Widget* child, int position);
45208 void gtk_notebook_set_action_widget(Notebook* this_, Widget* widget, PackType pack_type);
45209 void gtk_notebook_set_current_page(Notebook* this_, int page_num);
45210 void gtk_notebook_set_group(Notebook* this_, void* group=null);
45211 void gtk_notebook_set_group_id(Notebook* this_, int group_id);
45212 void gtk_notebook_set_group_name(Notebook* this_, char* group_name);
45213 void gtk_notebook_set_homogeneous_tabs(Notebook* this_, int homogeneous);
45214 void gtk_notebook_set_menu_label(Notebook* this_, Widget* child, Widget* menu_label=null);
45215 void gtk_notebook_set_menu_label_text(Notebook* this_, Widget* child, char* menu_text);
45216 void gtk_notebook_set_scrollable(Notebook* this_, int scrollable);
45217 void gtk_notebook_set_show_border(Notebook* this_, int show_border);
45218 void gtk_notebook_set_show_tabs(Notebook* this_, int show_tabs);
45219 void gtk_notebook_set_tab_border(Notebook* this_, uint border_width);
45220 void gtk_notebook_set_tab_detachable(Notebook* this_, Widget* child, int detachable);
45221 void gtk_notebook_set_tab_hborder(Notebook* this_, uint tab_hborder);
45222 void gtk_notebook_set_tab_label(Notebook* this_, Widget* child, Widget* tab_label=null);
45223 void gtk_notebook_set_tab_label_packing(Notebook* this_, Widget* child, int expand, int fill, PackType pack_type);
45224 void gtk_notebook_set_tab_label_text(Notebook* this_, Widget* child, char* tab_text);
45225 void gtk_notebook_set_tab_pos(Notebook* this_, PositionType pos);
45226 void gtk_notebook_set_tab_reorderable(Notebook* this_, Widget* child, int reorderable);
45227 void gtk_notebook_set_tab_vborder(Notebook* this_, uint tab_vborder);
45228 Object* gtk_object_new(Type type, char* first_property_name, ...);
45229 void gtk_object_add_arg_type(char* arg_name, Type arg_type, uint arg_flags, uint arg_id);
45230 void gtk_object_destroy(Object* this_);
45231 void gtk_object_get(Object* this_, char* first_property_name, ...);
45232 void* gtk_object_get_data(Object* this_, char* key);
45233 void* gtk_object_get_data_by_id(Object* this_, GLib2.Quark data_id);
45234 void* gtk_object_get_user_data(Object* this_);
45235 Object* gtk_object_ref(Object* this_);
45236 void gtk_object_remove_data(Object* this_, char* key);
45237 void gtk_object_remove_data_by_id(Object* this_, GLib2.Quark data_id);
45238 void gtk_object_remove_no_notify(Object* this_, char* key);
45239 void gtk_object_remove_no_notify_by_id(Object* this_, GLib2.Quark key_id);
45240 void gtk_object_set(Object* this_, char* first_property_name, ...);
45241 void gtk_object_set_data(Object* this_, char* key, void* data);
45242 void gtk_object_set_data_by_id(Object* this_, GLib2.Quark data_id, void* data);
45243 void gtk_object_set_data_by_id_full(Object* this_, GLib2.Quark data_id, void* data, GLib2.DestroyNotify destroy);
45244 void gtk_object_set_data_full(Object* this_, char* key, void* data, GLib2.DestroyNotify destroy);
45245 void gtk_object_set_user_data(Object* this_, void* data);
45246 void gtk_object_sink(Object* this_);
45247 void gtk_object_unref(Object* this_);
45248 void gtk_object_weakref(Object* this_, GLib2.DestroyNotify notify, void* data);
45249 void gtk_object_weakunref(Object* this_, GLib2.DestroyNotify notify, void* data);
45250 OffscreenWindow* gtk_offscreen_window_new();
45251 GdkPixbuf2.Pixbuf* /*new*/ gtk_offscreen_window_get_pixbuf(OffscreenWindow* this_);
45252 Gdk2.Pixmap* gtk_offscreen_window_get_pixmap(OffscreenWindow* this_);
45253 void gtk_old_editable_changed(OldEditable* this_);
45254 void gtk_old_editable_claim_selection(OldEditable* this_, int claim, uint time_);
45255 OptionMenu* gtk_option_menu_new();
45256 int gtk_option_menu_get_history(OptionMenu* this_);
45257 Widget* gtk_option_menu_get_menu(OptionMenu* this_);
45258 void gtk_option_menu_remove_menu(OptionMenu* this_);
45259 void gtk_option_menu_set_history(OptionMenu* this_, uint index_);
45260 void gtk_option_menu_set_menu(OptionMenu* this_, Widget* menu);
45261 Orientation gtk_orientable_get_orientation(Orientable* this_);
45262 void gtk_orientable_set_orientation(Orientable* this_, Orientation orientation);
45263 PageSetup* /*new*/ gtk_page_setup_new();
45264 PageSetup* /*new*/ gtk_page_setup_new_from_file(char* file_name, GLib2.Error** error);
45265 PageSetup* /*new*/ gtk_page_setup_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
45266 PageSetup* /*new*/ gtk_page_setup_copy(PageSetup* this_);
45267 double gtk_page_setup_get_bottom_margin(PageSetup* this_, Unit unit);
45268 double gtk_page_setup_get_left_margin(PageSetup* this_, Unit unit);
45269 PageOrientation gtk_page_setup_get_orientation(PageSetup* this_);
45270 double gtk_page_setup_get_page_height(PageSetup* this_, Unit unit);
45271 double gtk_page_setup_get_page_width(PageSetup* this_, Unit unit);
45272 double gtk_page_setup_get_paper_height(PageSetup* this_, Unit unit);
45273 PaperSize* /*new*/ gtk_page_setup_get_paper_size(PageSetup* this_);
45274 double gtk_page_setup_get_paper_width(PageSetup* this_, Unit unit);
45275 double gtk_page_setup_get_right_margin(PageSetup* this_, Unit unit);
45276 double gtk_page_setup_get_top_margin(PageSetup* this_, Unit unit);
45277 int gtk_page_setup_load_file(PageSetup* this_, char* file_name, GLib2.Error** error);
45278 int gtk_page_setup_load_key_file(PageSetup* this_, GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
45279 void gtk_page_setup_set_bottom_margin(PageSetup* this_, double margin, Unit unit);
45280 void gtk_page_setup_set_left_margin(PageSetup* this_, double margin, Unit unit);
45281 void gtk_page_setup_set_orientation(PageSetup* this_, PageOrientation orientation);
45282 void gtk_page_setup_set_paper_size(PageSetup* this_, PaperSize* size);
45283 void gtk_page_setup_set_paper_size_and_default_margins(PageSetup* this_, PaperSize* size);
45284 void gtk_page_setup_set_right_margin(PageSetup* this_, double margin, Unit unit);
45285 void gtk_page_setup_set_top_margin(PageSetup* this_, double margin, Unit unit);
45286 int gtk_page_setup_to_file(PageSetup* this_, char* file_name, GLib2.Error** error);
45287 void gtk_page_setup_to_key_file(PageSetup* this_, GLib2.KeyFile* key_file, char* group_name);
45288 void gtk_paned_add1(Paned* this_, Widget* child);
45289 void gtk_paned_add2(Paned* this_, Widget* child);
45290 void gtk_paned_compute_position(Paned* this_, int allocation, int child1_req, int child2_req);
45291 Widget* gtk_paned_get_child1(Paned* this_);
45292 Widget* gtk_paned_get_child2(Paned* this_);
45293 Gdk2.Window* gtk_paned_get_handle_window(Paned* this_);
45294 int gtk_paned_get_position(Paned* this_);
45295 void gtk_paned_pack1(Paned* this_, Widget* child, int resize, int shrink);
45296 void gtk_paned_pack2(Paned* this_, Widget* child, int resize, int shrink);
45297 void gtk_paned_set_position(Paned* this_, int position);
45298 PaperSize* /*new*/ gtk_paper_size_new(char* name=null);
45299 PaperSize* /*new*/ gtk_paper_size_new_custom(char* name, char* display_name, double width, double height, Unit unit);
45300 PaperSize* /*new*/ gtk_paper_size_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
45301 PaperSize* /*new*/ gtk_paper_size_new_from_ppd(char* ppd_name, char* ppd_display_name, double width, double height);
45302 PaperSize* /*new*/ gtk_paper_size_copy(PaperSize* this_);
45303 void gtk_paper_size_free(PaperSize* this_);
45304 double gtk_paper_size_get_default_bottom_margin(PaperSize* this_, Unit unit);
45305 double gtk_paper_size_get_default_left_margin(PaperSize* this_, Unit unit);
45306 double gtk_paper_size_get_default_right_margin(PaperSize* this_, Unit unit);
45307 double gtk_paper_size_get_default_top_margin(PaperSize* this_, Unit unit);
45308 char* gtk_paper_size_get_display_name(PaperSize* this_);
45309 double gtk_paper_size_get_height(PaperSize* this_, Unit unit);
45310 char* gtk_paper_size_get_name(PaperSize* this_);
45311 char* gtk_paper_size_get_ppd_name(PaperSize* this_);
45312 double gtk_paper_size_get_width(PaperSize* this_, Unit unit);
45313 int gtk_paper_size_is_custom(PaperSize* this_);
45314 int gtk_paper_size_is_equal(PaperSize* this_, PaperSize* size2);
45315 void gtk_paper_size_set_size(PaperSize* this_, double width, double height, Unit unit);
45316 void gtk_paper_size_to_key_file(PaperSize* this_, GLib2.KeyFile* key_file, char* group_name);
45317 Pixmap* gtk_pixmap_new(Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
45318 void gtk_pixmap_get(Pixmap* this_, Gdk2.Pixmap** val, Gdk2.Bitmap** mask);
45319 void gtk_pixmap_set(Pixmap* this_, Gdk2.Pixmap* val, Gdk2.Bitmap* mask);
45320 void gtk_pixmap_set_build_insensitive(Pixmap* this_, int build);
45321 Plug* gtk_plug_new(Gdk2.NativeWindow socket_id);
45322 Plug* gtk_plug_new_for_display(Gdk2.Display* display, Gdk2.NativeWindow socket_id);
45323 void gtk_plug_construct(Plug* this_, Gdk2.NativeWindow socket_id);
45324 void gtk_plug_construct_for_display(Plug* this_, Gdk2.Display* display, Gdk2.NativeWindow socket_id);
45325 int gtk_plug_get_embedded(Plug* this_);
45326 Gdk2.NativeWindow gtk_plug_get_id(Plug* this_);
45327 Gdk2.Window* gtk_plug_get_socket_window(Plug* this_);
45328 Preview* gtk_preview_new(PreviewType type);
45329 Gdk2.Colormap* gtk_preview_get_cmap();
45330 PreviewInfo* gtk_preview_get_info();
45331 Gdk2.Visual* gtk_preview_get_visual();
45332 void gtk_preview_reset();
45333 void gtk_preview_set_color_cube(uint nred_shades, uint ngreen_shades, uint nblue_shades, uint ngray_shades);
45334 void gtk_preview_set_gamma(double gamma_);
45335 void gtk_preview_set_install_cmap(int install_cmap);
45336 void gtk_preview_set_reserved(int nreserved);
45337 void gtk_preview_uninit();
45338 void gtk_preview_draw_row(Preview* this_, ubyte* data, int x, int y, int w);
45339 void gtk_preview_put(Preview* this_, Gdk2.Window* window, Gdk2.GC* gc, int srcx, int srcy, int destx, int desty, int width, int height);
45340 void gtk_preview_set_dither(Preview* this_, Gdk2.RgbDither dither);
45341 void gtk_preview_set_expand(Preview* this_, int expand);
45342 void gtk_preview_size(Preview* this_, int width, int height);
45343 Pango.Context* /*new*/ gtk_print_context_create_pango_context(PrintContext* this_);
45344 Pango.Layout* /*new*/ gtk_print_context_create_pango_layout(PrintContext* this_);
45345 cairo.Context* gtk_print_context_get_cairo_context(PrintContext* this_);
45346 double gtk_print_context_get_dpi_x(PrintContext* this_);
45347 double gtk_print_context_get_dpi_y(PrintContext* this_);
45348 int gtk_print_context_get_hard_margins(PrintContext* this_, /*out*/ double* top, /*out*/ double* bottom, /*out*/ double* left, /*out*/ double* right);
45349 double gtk_print_context_get_height(PrintContext* this_);
45350 PageSetup* gtk_print_context_get_page_setup(PrintContext* this_);
45351 Pango.FontMap* gtk_print_context_get_pango_fontmap(PrintContext* this_);
45352 double gtk_print_context_get_width(PrintContext* this_);
45353 void gtk_print_context_set_cairo_context(PrintContext* this_, cairo.Context* cr, double dpi_x, double dpi_y);
45354 PrintOperation* /*new*/ gtk_print_operation_new();
45355 void gtk_print_operation_cancel(PrintOperation* this_);
45356 void gtk_print_operation_draw_page_finish(PrintOperation* this_);
45357 PageSetup* gtk_print_operation_get_default_page_setup(PrintOperation* this_);
45358 int gtk_print_operation_get_embed_page_setup(PrintOperation* this_);
45359 void gtk_print_operation_get_error(PrintOperation* this_, GLib2.Error** error);
45360 int gtk_print_operation_get_has_selection(PrintOperation* this_);
45361 int gtk_print_operation_get_n_pages_to_print(PrintOperation* this_);
45362 PrintSettings* gtk_print_operation_get_print_settings(PrintOperation* this_);
45363 PrintStatus gtk_print_operation_get_status(PrintOperation* this_);
45364 char* gtk_print_operation_get_status_string(PrintOperation* this_);
45365 int gtk_print_operation_get_support_selection(PrintOperation* this_);
45366 int gtk_print_operation_is_finished(PrintOperation* this_);
45367 PrintOperationResult gtk_print_operation_run(PrintOperation* this_, PrintOperationAction action, Window* parent, GLib2.Error** error);
45368 void gtk_print_operation_set_allow_async(PrintOperation* this_, int allow_async);
45369 void gtk_print_operation_set_current_page(PrintOperation* this_, int current_page);
45370 void gtk_print_operation_set_custom_tab_label(PrintOperation* this_, char* label=null);
45371 void gtk_print_operation_set_default_page_setup(PrintOperation* this_, PageSetup* default_page_setup=null);
45372 void gtk_print_operation_set_defer_drawing(PrintOperation* this_);
45373 void gtk_print_operation_set_embed_page_setup(PrintOperation* this_, int embed);
45374 void gtk_print_operation_set_export_filename(PrintOperation* this_, char* filename);
45375 void gtk_print_operation_set_has_selection(PrintOperation* this_, int has_selection);
45376 void gtk_print_operation_set_job_name(PrintOperation* this_, char* job_name);
45377 void gtk_print_operation_set_n_pages(PrintOperation* this_, int n_pages);
45378 void gtk_print_operation_set_print_settings(PrintOperation* this_, PrintSettings* print_settings=null);
45379 void gtk_print_operation_set_show_progress(PrintOperation* this_, int show_progress);
45380 void gtk_print_operation_set_support_selection(PrintOperation* this_, int support_selection);
45381 void gtk_print_operation_set_track_print_status(PrintOperation* this_, int track_status);
45382 void gtk_print_operation_set_unit(PrintOperation* this_, Unit unit);
45383 void gtk_print_operation_set_use_full_page(PrintOperation* this_, int full_page);
45384 void gtk_print_operation_preview_end_preview(PrintOperationPreview* this_);
45385 int gtk_print_operation_preview_is_selected(PrintOperationPreview* this_, int page_nr);
45386 void gtk_print_operation_preview_render_page(PrintOperationPreview* this_, int page_nr);
45387 PrintSettings* /*new*/ gtk_print_settings_new();
45388 PrintSettings* /*new*/ gtk_print_settings_new_from_file(char* file_name, GLib2.Error** error);
45389 PrintSettings* /*new*/ gtk_print_settings_new_from_key_file(GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
45390 PrintSettings* /*new*/ gtk_print_settings_copy(PrintSettings* this_);
45391 void gtk_print_settings_foreach(PrintSettings* this_, PrintSettingsFunc func, void* user_data);
45392 char* gtk_print_settings_get(PrintSettings* this_, char* key);
45393 int gtk_print_settings_get_bool(PrintSettings* this_, char* key);
45394 int gtk_print_settings_get_collate(PrintSettings* this_);
45395 char* gtk_print_settings_get_default_source(PrintSettings* this_);
45396 char* gtk_print_settings_get_dither(PrintSettings* this_);
45397 double gtk_print_settings_get_double(PrintSettings* this_, char* key);
45398 double gtk_print_settings_get_double_with_default(PrintSettings* this_, char* key, double def);
45399 PrintDuplex gtk_print_settings_get_duplex(PrintSettings* this_);
45400 char* gtk_print_settings_get_finishings(PrintSettings* this_);
45401 int gtk_print_settings_get_int(PrintSettings* this_, char* key);
45402 int gtk_print_settings_get_int_with_default(PrintSettings* this_, char* key, int def);
45403 double gtk_print_settings_get_length(PrintSettings* this_, char* key, Unit unit);
45404 char* gtk_print_settings_get_media_type(PrintSettings* this_);
45405 int gtk_print_settings_get_n_copies(PrintSettings* this_);
45406 int gtk_print_settings_get_number_up(PrintSettings* this_);
45407 NumberUpLayout gtk_print_settings_get_number_up_layout(PrintSettings* this_);
45408 PageOrientation gtk_print_settings_get_orientation(PrintSettings* this_);
45409 char* gtk_print_settings_get_output_bin(PrintSettings* this_);
45410 PageRange* /*new*/ gtk_print_settings_get_page_ranges(PrintSettings* this_, /*out*/ int* num_ranges);
45411 PageSet gtk_print_settings_get_page_set(PrintSettings* this_);
45412 double gtk_print_settings_get_paper_height(PrintSettings* this_, Unit unit);
45413 PaperSize* /*new*/ gtk_print_settings_get_paper_size(PrintSettings* this_);
45414 double gtk_print_settings_get_paper_width(PrintSettings* this_, Unit unit);
45415 PrintPages gtk_print_settings_get_print_pages(PrintSettings* this_);
45416 char* gtk_print_settings_get_printer(PrintSettings* this_);
45417 double gtk_print_settings_get_printer_lpi(PrintSettings* this_);
45418 PrintQuality gtk_print_settings_get_quality(PrintSettings* this_);
45419 int gtk_print_settings_get_resolution(PrintSettings* this_);
45420 int gtk_print_settings_get_resolution_x(PrintSettings* this_);
45421 int gtk_print_settings_get_resolution_y(PrintSettings* this_);
45422 int gtk_print_settings_get_reverse(PrintSettings* this_);
45423 double gtk_print_settings_get_scale(PrintSettings* this_);
45424 int gtk_print_settings_get_use_color(PrintSettings* this_);
45425 int gtk_print_settings_has_key(PrintSettings* this_, char* key);
45426 int gtk_print_settings_load_file(PrintSettings* this_, char* file_name, GLib2.Error** error);
45427 int gtk_print_settings_load_key_file(PrintSettings* this_, GLib2.KeyFile* key_file, char* group_name, GLib2.Error** error);
45428 void gtk_print_settings_set(PrintSettings* this_, char* key, char* value=null);
45429 void gtk_print_settings_set_bool(PrintSettings* this_, char* key, int value);
45430 void gtk_print_settings_set_collate(PrintSettings* this_, int collate);
45431 void gtk_print_settings_set_default_source(PrintSettings* this_, char* default_source);
45432 void gtk_print_settings_set_dither(PrintSettings* this_, char* dither);
45433 void gtk_print_settings_set_double(PrintSettings* this_, char* key, double value);
45434 void gtk_print_settings_set_duplex(PrintSettings* this_, PrintDuplex duplex);
45435 void gtk_print_settings_set_finishings(PrintSettings* this_, char* finishings);
45436 void gtk_print_settings_set_int(PrintSettings* this_, char* key, int value);
45437 void gtk_print_settings_set_length(PrintSettings* this_, char* key, double value, Unit unit);
45438 void gtk_print_settings_set_media_type(PrintSettings* this_, char* media_type);
45439 void gtk_print_settings_set_n_copies(PrintSettings* this_, int num_copies);
45440 void gtk_print_settings_set_number_up(PrintSettings* this_, int number_up);
45441 void gtk_print_settings_set_number_up_layout(PrintSettings* this_, NumberUpLayout number_up_layout);
45442 void gtk_print_settings_set_orientation(PrintSettings* this_, PageOrientation orientation);
45443 void gtk_print_settings_set_output_bin(PrintSettings* this_, char* output_bin);
45444 void gtk_print_settings_set_page_ranges(PrintSettings* this_, PageRange* page_ranges, int num_ranges);
45445 void gtk_print_settings_set_page_set(PrintSettings* this_, PageSet page_set);
45446 void gtk_print_settings_set_paper_height(PrintSettings* this_, double height, Unit unit);
45447 void gtk_print_settings_set_paper_size(PrintSettings* this_, PaperSize* paper_size);
45448 void gtk_print_settings_set_paper_width(PrintSettings* this_, double width, Unit unit);
45449 void gtk_print_settings_set_print_pages(PrintSettings* this_, PrintPages pages);
45450 void gtk_print_settings_set_printer(PrintSettings* this_, char* printer);
45451 void gtk_print_settings_set_printer_lpi(PrintSettings* this_, double lpi);
45452 void gtk_print_settings_set_quality(PrintSettings* this_, PrintQuality quality);
45453 void gtk_print_settings_set_resolution(PrintSettings* this_, int resolution);
45454 void gtk_print_settings_set_resolution_xy(PrintSettings* this_, int resolution_x, int resolution_y);
45455 void gtk_print_settings_set_reverse(PrintSettings* this_, int reverse);
45456 void gtk_print_settings_set_scale(PrintSettings* this_, double scale);
45457 void gtk_print_settings_set_use_color(PrintSettings* this_, int use_color);
45458 int gtk_print_settings_to_file(PrintSettings* this_, char* file_name, GLib2.Error** error);
45459 void gtk_print_settings_to_key_file(PrintSettings* this_, GLib2.KeyFile* key_file, char* group_name);
45460 void gtk_print_settings_unset(PrintSettings* this_, char* key);
45461 void gtk_progress_configure(Progress* this_, double value, double min, double max);
45462 double gtk_progress_get_current_percentage(Progress* this_);
45463 char* /*new*/ gtk_progress_get_current_text(Progress* this_);
45464 double gtk_progress_get_percentage_from_value(Progress* this_, double value);
45465 char* /*new*/ gtk_progress_get_text_from_value(Progress* this_, double value);
45466 double gtk_progress_get_value(Progress* this_);
45467 void gtk_progress_set_activity_mode(Progress* this_, int activity_mode);
45468 void gtk_progress_set_adjustment(Progress* this_, Adjustment* adjustment);
45469 void gtk_progress_set_format_string(Progress* this_, char* format);
45470 void gtk_progress_set_percentage(Progress* this_, double percentage);
45471 void gtk_progress_set_show_text(Progress* this_, int show_text);
45472 void gtk_progress_set_text_alignment(Progress* this_, float x_align, float y_align);
45473 void gtk_progress_set_value(Progress* this_, double value);
45474 ProgressBar* gtk_progress_bar_new();
45475 ProgressBar* gtk_progress_bar_new_with_adjustment(Adjustment* adjustment=null);
45476 Pango.EllipsizeMode gtk_progress_bar_get_ellipsize(ProgressBar* this_);
45477 double gtk_progress_bar_get_fraction(ProgressBar* this_);
45478 ProgressBarOrientation gtk_progress_bar_get_orientation(ProgressBar* this_);
45479 double gtk_progress_bar_get_pulse_step(ProgressBar* this_);
45480 char* gtk_progress_bar_get_text(ProgressBar* this_);
45481 void gtk_progress_bar_pulse(ProgressBar* this_);
45482 void gtk_progress_bar_set_activity_blocks(ProgressBar* this_, uint blocks);
45483 void gtk_progress_bar_set_activity_step(ProgressBar* this_, uint step);
45484 void gtk_progress_bar_set_bar_style(ProgressBar* this_, ProgressBarStyle style);
45485 void gtk_progress_bar_set_discrete_blocks(ProgressBar* this_, uint blocks);
45486 void gtk_progress_bar_set_ellipsize(ProgressBar* this_, Pango.EllipsizeMode mode);
45487 void gtk_progress_bar_set_fraction(ProgressBar* this_, double fraction);
45488 void gtk_progress_bar_set_orientation(ProgressBar* this_, ProgressBarOrientation orientation);
45489 void gtk_progress_bar_set_pulse_step(ProgressBar* this_, double fraction);
45490 void gtk_progress_bar_set_text(ProgressBar* this_, char* text=null);
45491 void gtk_progress_bar_update(ProgressBar* this_, double percentage);
45492 RadioAction* /*new*/ gtk_radio_action_new(char* name, char* label, char* tooltip, char* stock_id, int value);
45493 int gtk_radio_action_get_current_value(RadioAction* this_);
45494 GLib2.SList* gtk_radio_action_get_group(RadioAction* this_);
45495 void gtk_radio_action_set_current_value(RadioAction* this_, int current_value);
45496 void gtk_radio_action_set_group(RadioAction* this_, GLib2.SList* group);
45497 RadioButton* gtk_radio_button_new(GLib2.SList* group=null);
45498 RadioButton* gtk_radio_button_new_with_label(GLib2.SList* group, char* label);
45499 RadioButton* gtk_radio_button_new_with_label_from_widget(RadioButton* radio_group_member, char* label);
45500 RadioButton* gtk_radio_button_new_with_mnemonic(GLib2.SList* group, char* label);
45501 RadioButton* gtk_radio_button_new_with_mnemonic_from_widget(RadioButton* radio_group_member, char* label);
45502 GLib2.SList* gtk_radio_button_get_group(RadioButton* this_);
45503 Widget* gtk_radio_button_new_from_widget(RadioButton* this_);
45504 void gtk_radio_button_set_group(RadioButton* this_, GLib2.SList* group);
45505 RadioMenuItem* gtk_radio_menu_item_new(GLib2.SList* group);
45506 RadioMenuItem* gtk_radio_menu_item_new_with_label(GLib2.SList* group, char* label);
45507 RadioMenuItem* gtk_radio_menu_item_new_with_mnemonic(GLib2.SList* group, char* label);
45508 GLib2.SList* gtk_radio_menu_item_get_group(RadioMenuItem* this_);
45509 Widget* gtk_radio_menu_item_new_from_widget(RadioMenuItem* this_);
45510 Widget* gtk_radio_menu_item_new_with_label_from_widget(RadioMenuItem* this_, char* label);
45511 Widget* gtk_radio_menu_item_new_with_mnemonic_from_widget(RadioMenuItem* this_, char* label);
45512 void gtk_radio_menu_item_set_group(RadioMenuItem* this_, GLib2.SList* group);
45513 RadioToolButton* gtk_radio_tool_button_new(GLib2.SList* group=null);
45514 RadioToolButton* gtk_radio_tool_button_new_from_stock(GLib2.SList* group, char* stock_id);
45515 GLib2.SList* gtk_radio_tool_button_get_group(RadioToolButton* this_);
45516 ToolItem* gtk_radio_tool_button_new_from_widget(RadioToolButton* this_);
45517 ToolItem* gtk_radio_tool_button_new_with_stock_from_widget(RadioToolButton* this_, char* stock_id);
45518 void gtk_radio_tool_button_set_group(RadioToolButton* this_, GLib2.SList* group);
45519 Adjustment* gtk_range_get_adjustment(Range* this_);
45520 double gtk_range_get_fill_level(Range* this_);
45521 int gtk_range_get_flippable(Range* this_);
45522 int gtk_range_get_inverted(Range* this_);
45523 SensitivityType gtk_range_get_lower_stepper_sensitivity(Range* this_);
45524 int gtk_range_get_min_slider_size(Range* this_);
45525 void gtk_range_get_range_rect(Range* this_, /*out*/ Gdk2.Rectangle* range_rect);
45526 int gtk_range_get_restrict_to_fill_level(Range* this_);
45527 int gtk_range_get_round_digits(Range* this_);
45528 int gtk_range_get_show_fill_level(Range* this_);
45529 void gtk_range_get_slider_range(Range* this_, /*out*/ int* slider_start=null, /*out*/ int* slider_end=null);
45530 int gtk_range_get_slider_size_fixed(Range* this_);
45531 UpdateType gtk_range_get_update_policy(Range* this_);
45532 SensitivityType gtk_range_get_upper_stepper_sensitivity(Range* this_);
45533 double gtk_range_get_value(Range* this_);
45534 void gtk_range_set_adjustment(Range* this_, Adjustment* adjustment);
45535 void gtk_range_set_fill_level(Range* this_, double fill_level);
45536 void gtk_range_set_flippable(Range* this_, int flippable);
45537 void gtk_range_set_increments(Range* this_, double step, double page);
45538 void gtk_range_set_inverted(Range* this_, int setting);
45539 void gtk_range_set_lower_stepper_sensitivity(Range* this_, SensitivityType sensitivity);
45540 void gtk_range_set_min_slider_size(Range* this_, int min_size);
45541 void gtk_range_set_range(Range* this_, double min, double max);
45542 void gtk_range_set_restrict_to_fill_level(Range* this_, int restrict_to_fill_level);
45543 void gtk_range_set_round_digits(Range* this_, int round_digits);
45544 void gtk_range_set_show_fill_level(Range* this_, int show_fill_level);
45545 void gtk_range_set_slider_size_fixed(Range* this_, int size_fixed);
45546 void gtk_range_set_update_policy(Range* this_, UpdateType policy);
45547 void gtk_range_set_upper_stepper_sensitivity(Range* this_, SensitivityType sensitivity);
45548 void gtk_range_set_value(Range* this_, double value);
45549 RcStyle* /*new*/ gtk_rc_style_new();
45550 RcStyle* /*new*/ gtk_rc_style_copy(RcStyle* this_);
45551 void gtk_rc_style_ref(RcStyle* this_);
45552 void gtk_rc_style_unref(RcStyle* this_);
45553 RecentAction* /*new*/ gtk_recent_action_new(char* name, char* label, char* tooltip, char* stock_id);
45554 RecentAction* /*new*/ gtk_recent_action_new_for_manager(char* name, char* label, char* tooltip, char* stock_id, RecentManager* manager=null);
45555 int gtk_recent_action_get_show_numbers(RecentAction* this_);
45556 void gtk_recent_action_set_show_numbers(RecentAction* this_, int show_numbers);
45557 void gtk_recent_chooser_add_filter(RecentChooser* this_, RecentFilter* filter);
45558 RecentInfo* /*new*/ gtk_recent_chooser_get_current_item(RecentChooser* this_);
45559 char* /*new*/ gtk_recent_chooser_get_current_uri(RecentChooser* this_);
45560 RecentFilter* gtk_recent_chooser_get_filter(RecentChooser* this_);
45561 GLib2.List* /*new*/ gtk_recent_chooser_get_items(RecentChooser* this_);
45562 int gtk_recent_chooser_get_limit(RecentChooser* this_);
45563 int gtk_recent_chooser_get_local_only(RecentChooser* this_);
45564 int gtk_recent_chooser_get_select_multiple(RecentChooser* this_);
45565 int gtk_recent_chooser_get_show_icons(RecentChooser* this_);
45566 int gtk_recent_chooser_get_show_not_found(RecentChooser* this_);
45567 int gtk_recent_chooser_get_show_numbers(RecentChooser* this_);
45568 int gtk_recent_chooser_get_show_private(RecentChooser* this_);
45569 int gtk_recent_chooser_get_show_tips(RecentChooser* this_);
45570 RecentSortType gtk_recent_chooser_get_sort_type(RecentChooser* this_);
45571 char** /*new*/ gtk_recent_chooser_get_uris(RecentChooser* this_, /*out*/ size_t* length=null);
45572 GLib2.SList* /*new container*/ gtk_recent_chooser_list_filters(RecentChooser* this_);
45573 void gtk_recent_chooser_remove_filter(RecentChooser* this_, RecentFilter* filter);
45574 void gtk_recent_chooser_select_all(RecentChooser* this_);
45575 int gtk_recent_chooser_select_uri(RecentChooser* this_, char* uri, GLib2.Error** error);
45576 int gtk_recent_chooser_set_current_uri(RecentChooser* this_, char* uri, GLib2.Error** error);
45577 void gtk_recent_chooser_set_filter(RecentChooser* this_, RecentFilter* filter);
45578 void gtk_recent_chooser_set_limit(RecentChooser* this_, int limit);
45579 void gtk_recent_chooser_set_local_only(RecentChooser* this_, int local_only);
45580 void gtk_recent_chooser_set_select_multiple(RecentChooser* this_, int select_multiple);
45581 void gtk_recent_chooser_set_show_icons(RecentChooser* this_, int show_icons);
45582 void gtk_recent_chooser_set_show_not_found(RecentChooser* this_, int show_not_found);
45583 void gtk_recent_chooser_set_show_numbers(RecentChooser* this_, int show_numbers);
45584 void gtk_recent_chooser_set_show_private(RecentChooser* this_, int show_private);
45585 void gtk_recent_chooser_set_show_tips(RecentChooser* this_, int show_tips);
45586 void gtk_recent_chooser_set_sort_func(RecentChooser* this_, RecentSortFunc sort_func, void* sort_data=null, GLib2.DestroyNotify data_destroy=null);
45587 void gtk_recent_chooser_set_sort_type(RecentChooser* this_, RecentSortType sort_type);
45588 void gtk_recent_chooser_unselect_all(RecentChooser* this_);
45589 void gtk_recent_chooser_unselect_uri(RecentChooser* this_, char* uri);
45590 RecentChooserDialog* gtk_recent_chooser_dialog_new(char* title=null, Window* parent=null, char* first_button_text=null, ...);
45591 RecentChooserDialog* gtk_recent_chooser_dialog_new_for_manager(char* title, Window* parent, RecentManager* manager, char* first_button_text=null, ...);
45592 RecentChooserMenu* gtk_recent_chooser_menu_new();
45593 RecentChooserMenu* gtk_recent_chooser_menu_new_for_manager(RecentManager* manager);
45594 int gtk_recent_chooser_menu_get_show_numbers(RecentChooserMenu* this_);
45595 void gtk_recent_chooser_menu_set_show_numbers(RecentChooserMenu* this_, int show_numbers);
45596 RecentChooserWidget* gtk_recent_chooser_widget_new();
45597 RecentChooserWidget* gtk_recent_chooser_widget_new_for_manager(RecentManager* manager);
45598 RecentFilter* gtk_recent_filter_new();
45599 void gtk_recent_filter_add_age(RecentFilter* this_, int days);
45600 void gtk_recent_filter_add_application(RecentFilter* this_, char* application);
45601 void gtk_recent_filter_add_custom(RecentFilter* this_, RecentFilterFlags needed, RecentFilterFunc func, void* data, GLib2.DestroyNotify data_destroy);
45602 void gtk_recent_filter_add_group(RecentFilter* this_, char* group);
45603 void gtk_recent_filter_add_mime_type(RecentFilter* this_, char* mime_type);
45604 void gtk_recent_filter_add_pattern(RecentFilter* this_, char* pattern);
45605 void gtk_recent_filter_add_pixbuf_formats(RecentFilter* this_);
45606 int gtk_recent_filter_filter(RecentFilter* this_, RecentFilterInfo* filter_info);
45607 char* gtk_recent_filter_get_name(RecentFilter* this_);
45608 RecentFilterFlags gtk_recent_filter_get_needed(RecentFilter* this_);
45609 void gtk_recent_filter_set_name(RecentFilter* this_, char* name);
45610 int gtk_recent_info_exists(RecentInfo* this_);
45611 time_t gtk_recent_info_get_added(RecentInfo* this_);
45612 int gtk_recent_info_get_age(RecentInfo* this_);
45613 int gtk_recent_info_get_application_info(RecentInfo* this_, char* app_name, /*out*/ char** app_exec, /*out*/ uint* count, /*out*/ time_t* time_);
45614 char** /*new*/ gtk_recent_info_get_applications(RecentInfo* this_, /*out*/ size_t* length=null);
45615 char* gtk_recent_info_get_description(RecentInfo* this_);
45616 char* gtk_recent_info_get_display_name(RecentInfo* this_);
45617 char** /*new*/ gtk_recent_info_get_groups(RecentInfo* this_, /*out*/ size_t* length=null);
45618 GdkPixbuf2.Pixbuf* /*new*/ gtk_recent_info_get_icon(RecentInfo* this_, int size);
45619 char* gtk_recent_info_get_mime_type(RecentInfo* this_);
45620 time_t gtk_recent_info_get_modified(RecentInfo* this_);
45621 int gtk_recent_info_get_private_hint(RecentInfo* this_);
45622 char* /*new*/ gtk_recent_info_get_short_name(RecentInfo* this_);
45623 char* gtk_recent_info_get_uri(RecentInfo* this_);
45624 char* /*new*/ gtk_recent_info_get_uri_display(RecentInfo* this_);
45625 time_t gtk_recent_info_get_visited(RecentInfo* this_);
45626 int gtk_recent_info_has_application(RecentInfo* this_, char* app_name);
45627 int gtk_recent_info_has_group(RecentInfo* this_, char* group_name);
45628 int gtk_recent_info_is_local(RecentInfo* this_);
45629 char* /*new*/ gtk_recent_info_last_application(RecentInfo* this_);
45630 int gtk_recent_info_match(RecentInfo* this_, RecentInfo* info_b);
45631 RecentInfo* /*new*/ gtk_recent_info_ref(RecentInfo* this_);
45632 void gtk_recent_info_unref(RecentInfo* this_);
45633 RecentManager* /*new*/ gtk_recent_manager_new();
45634 RecentManager* gtk_recent_manager_get_default();
45635 RecentManager* gtk_recent_manager_get_for_screen(Gdk2.Screen* screen);
45636 int gtk_recent_manager_add_full(RecentManager* this_, char* uri, RecentData* recent_data);
45637 int gtk_recent_manager_add_item(RecentManager* this_, char* uri);
45638 GLib2.List* /*new*/ gtk_recent_manager_get_items(RecentManager* this_);
45639 int gtk_recent_manager_get_limit(RecentManager* this_);
45640 int gtk_recent_manager_has_item(RecentManager* this_, char* uri);
45641 RecentInfo* /*new*/ gtk_recent_manager_lookup_item(RecentManager* this_, char* uri, GLib2.Error** error);
45642 int gtk_recent_manager_move_item(RecentManager* this_, char* uri, char* new_uri, GLib2.Error** error);
45643 int gtk_recent_manager_purge_items(RecentManager* this_, GLib2.Error** error);
45644 int gtk_recent_manager_remove_item(RecentManager* this_, char* uri, GLib2.Error** error);
45645 void gtk_recent_manager_set_limit(RecentManager* this_, int limit);
45646 void gtk_recent_manager_set_screen(RecentManager* this_, Gdk2.Screen* screen);
45647 Requisition* /*new*/ gtk_requisition_copy(Requisition* this_);
45648 void gtk_requisition_free(Requisition* this_);
45649 void gtk_ruler_draw_pos(Ruler* this_);
45650 void gtk_ruler_draw_ticks(Ruler* this_);
45651 MetricType gtk_ruler_get_metric(Ruler* this_);
45652 void gtk_ruler_get_range(Ruler* this_, double* lower, double* upper, double* position, double* max_size);
45653 void gtk_ruler_set_metric(Ruler* this_, MetricType metric);
45654 void gtk_ruler_set_range(Ruler* this_, double lower, double upper, double position, double max_size);
45655 void gtk_scale_add_mark(Scale* this_, double value, PositionType position, char* markup=null);
45656 void gtk_scale_clear_marks(Scale* this_);
45657 int gtk_scale_get_digits(Scale* this_);
45658 int gtk_scale_get_draw_value(Scale* this_);
45659 Pango.Layout* gtk_scale_get_layout(Scale* this_);
45660 void gtk_scale_get_layout_offsets(Scale* this_, /*out*/ int* x=null, /*out*/ int* y=null);
45661 PositionType gtk_scale_get_value_pos(Scale* this_);
45662 void gtk_scale_set_digits(Scale* this_, int digits);
45663 void gtk_scale_set_draw_value(Scale* this_, int draw_value);
45664 void gtk_scale_set_value_pos(Scale* this_, PositionType pos);
45665 ScaleButton* gtk_scale_button_new(IconSize size, double min, double max, double step, char** icons=null);
45666 Adjustment* gtk_scale_button_get_adjustment(ScaleButton* this_);
45667 Widget* gtk_scale_button_get_minus_button(ScaleButton* this_);
45668 Orientation gtk_scale_button_get_orientation(ScaleButton* this_);
45669 Widget* gtk_scale_button_get_plus_button(ScaleButton* this_);
45670 Widget* gtk_scale_button_get_popup(ScaleButton* this_);
45671 double gtk_scale_button_get_value(ScaleButton* this_);
45672 void gtk_scale_button_set_adjustment(ScaleButton* this_, Adjustment* adjustment);
45673 void gtk_scale_button_set_icons(ScaleButton* this_, char** icons);
45674 void gtk_scale_button_set_orientation(ScaleButton* this_, Orientation orientation);
45675 void gtk_scale_button_set_value(ScaleButton* this_, double value);
45676 ScrolledWindow* gtk_scrolled_window_new(Adjustment* hadjustment=null, Adjustment* vadjustment=null);
45677 void gtk_scrolled_window_add_with_viewport(ScrolledWindow* this_, Widget* child);
45678 Adjustment* gtk_scrolled_window_get_hadjustment(ScrolledWindow* this_);
45679 Widget* gtk_scrolled_window_get_hscrollbar(ScrolledWindow* this_);
45680 CornerType gtk_scrolled_window_get_placement(ScrolledWindow* this_);
45681 void gtk_scrolled_window_get_policy(ScrolledWindow* this_, /*out*/ PolicyType* hscrollbar_policy=null, /*out*/ PolicyType* vscrollbar_policy=null);
45682 ShadowType gtk_scrolled_window_get_shadow_type(ScrolledWindow* this_);
45683 Adjustment* gtk_scrolled_window_get_vadjustment(ScrolledWindow* this_);
45684 Widget* gtk_scrolled_window_get_vscrollbar(ScrolledWindow* this_);
45685 void gtk_scrolled_window_set_hadjustment(ScrolledWindow* this_, Adjustment* hadjustment);
45686 void gtk_scrolled_window_set_placement(ScrolledWindow* this_, CornerType window_placement);
45687 void gtk_scrolled_window_set_policy(ScrolledWindow* this_, PolicyType hscrollbar_policy, PolicyType vscrollbar_policy);
45688 void gtk_scrolled_window_set_shadow_type(ScrolledWindow* this_, ShadowType type);
45689 void gtk_scrolled_window_set_vadjustment(ScrolledWindow* this_, Adjustment* vadjustment);
45690 void gtk_scrolled_window_unset_placement(ScrolledWindow* this_);
45691 SelectionData* /*new*/ gtk_selection_data_copy(SelectionData* this_);
45692 void gtk_selection_data_free(SelectionData* this_);
45693 ubyte* gtk_selection_data_get_data(SelectionData* this_);
45694 Gdk2.Atom gtk_selection_data_get_data_type(SelectionData* this_);
45695 Gdk2.Display* gtk_selection_data_get_display(SelectionData* this_);
45696 int gtk_selection_data_get_format(SelectionData* this_);
45697 int gtk_selection_data_get_length(SelectionData* this_);
45698 GdkPixbuf2.Pixbuf* /*new*/ gtk_selection_data_get_pixbuf(SelectionData* this_);
45699 Gdk2.Atom gtk_selection_data_get_selection(SelectionData* this_);
45700 Gdk2.Atom gtk_selection_data_get_target(SelectionData* this_);
45701 int gtk_selection_data_get_targets(SelectionData* this_, /*out*/ Gdk2.Atom** targets, /*out*/ int* n_atoms);
45702 ubyte* gtk_selection_data_get_text(SelectionData* this_);
45703 char** /*new*/ gtk_selection_data_get_uris(SelectionData* this_);
45704 void gtk_selection_data_set(SelectionData* this_, Gdk2.Atom type, int format, ubyte* data, int length);
45705 int gtk_selection_data_set_pixbuf(SelectionData* this_, GdkPixbuf2.Pixbuf* pixbuf);
45706 int gtk_selection_data_set_text(SelectionData* this_, char* str, int len);
45707 int gtk_selection_data_set_uris(SelectionData* this_, char** uris);
45708 int gtk_selection_data_targets_include_image(SelectionData* this_, int writable);
45709 int gtk_selection_data_targets_include_rich_text(SelectionData* this_, TextBuffer* buffer);
45710 int gtk_selection_data_targets_include_text(SelectionData* this_);
45711 int gtk_selection_data_targets_include_uri(SelectionData* this_);
45712 SeparatorMenuItem* gtk_separator_menu_item_new();
45713 SeparatorToolItem* gtk_separator_tool_item_new();
45714 int gtk_separator_tool_item_get_draw(SeparatorToolItem* this_);
45715 void gtk_separator_tool_item_set_draw(SeparatorToolItem* this_, int draw);
45716 Settings* gtk_settings_get_default();
45717 Settings* gtk_settings_get_for_screen(Gdk2.Screen* screen);
45718 void gtk_settings_install_property(GObject2.ParamSpec* pspec);
45719 void gtk_settings_install_property_parser(GObject2.ParamSpec* pspec, RcPropertyParser parser);
45720 void gtk_settings_set_double_property(Settings* this_, char* name, double v_double, char* origin);
45721 void gtk_settings_set_long_property(Settings* this_, char* name, c_long v_long, char* origin);
45722 void gtk_settings_set_property_value(Settings* this_, char* name, SettingsValue* svalue);
45723 void gtk_settings_set_string_property(Settings* this_, char* name, char* v_string, char* origin);
45724 SizeGroup* /*new*/ gtk_size_group_new(SizeGroupMode mode);
45725 void gtk_size_group_add_widget(SizeGroup* this_, Widget* widget);
45726 int gtk_size_group_get_ignore_hidden(SizeGroup* this_);
45727 SizeGroupMode gtk_size_group_get_mode(SizeGroup* this_);
45728 GLib2.SList* gtk_size_group_get_widgets(SizeGroup* this_);
45729 void gtk_size_group_remove_widget(SizeGroup* this_, Widget* widget);
45730 void gtk_size_group_set_ignore_hidden(SizeGroup* this_, int ignore_hidden);
45731 void gtk_size_group_set_mode(SizeGroup* this_, SizeGroupMode mode);
45732 Socket* gtk_socket_new();
45733 void gtk_socket_add_id(Socket* this_, Gdk2.NativeWindow window_id);
45734 Gdk2.NativeWindow gtk_socket_get_id(Socket* this_);
45735 Gdk2.Window* gtk_socket_get_plug_window(Socket* this_);
45736 void gtk_socket_steal(Socket* this_, Gdk2.NativeWindow wid);
45737 SpinButton* gtk_spin_button_new(Adjustment* adjustment, double climb_rate, uint digits);
45738 SpinButton* gtk_spin_button_new_with_range(double min, double max, double step);
45739 void gtk_spin_button_configure(SpinButton* this_, Adjustment* adjustment, double climb_rate, uint digits);
45740 Adjustment* gtk_spin_button_get_adjustment(SpinButton* this_);
45741 uint gtk_spin_button_get_digits(SpinButton* this_);
45742 void gtk_spin_button_get_increments(SpinButton* this_, /*out*/ double* step=null, /*out*/ double* page=null);
45743 int gtk_spin_button_get_numeric(SpinButton* this_);
45744 void gtk_spin_button_get_range(SpinButton* this_, /*out*/ double* min=null, /*out*/ double* max=null);
45745 int gtk_spin_button_get_snap_to_ticks(SpinButton* this_);
45746 SpinButtonUpdatePolicy gtk_spin_button_get_update_policy(SpinButton* this_);
45747 double gtk_spin_button_get_value(SpinButton* this_);
45748 int gtk_spin_button_get_value_as_int(SpinButton* this_);
45749 int gtk_spin_button_get_wrap(SpinButton* this_);
45750 void gtk_spin_button_set_adjustment(SpinButton* this_, Adjustment* adjustment);
45751 void gtk_spin_button_set_digits(SpinButton* this_, uint digits);
45752 void gtk_spin_button_set_increments(SpinButton* this_, double step, double page);
45753 void gtk_spin_button_set_numeric(SpinButton* this_, int numeric);
45754 void gtk_spin_button_set_range(SpinButton* this_, double min, double max);
45755 void gtk_spin_button_set_snap_to_ticks(SpinButton* this_, int snap_to_ticks);
45756 void gtk_spin_button_set_update_policy(SpinButton* this_, SpinButtonUpdatePolicy policy);
45757 void gtk_spin_button_set_value(SpinButton* this_, double value);
45758 void gtk_spin_button_set_wrap(SpinButton* this_, int wrap);
45759 void gtk_spin_button_spin(SpinButton* this_, SpinType direction, double increment);
45760 void gtk_spin_button_update(SpinButton* this_);
45761 Spinner* gtk_spinner_new();
45762 void gtk_spinner_start(Spinner* this_);
45763 void gtk_spinner_stop(Spinner* this_);
45764 StatusIcon* /*new*/ gtk_status_icon_new();
45765 StatusIcon* /*new*/ gtk_status_icon_new_from_file(char* filename);
45766 StatusIcon* /*new*/ gtk_status_icon_new_from_gicon(Gio2.Icon* icon);
45767 StatusIcon* /*new*/ gtk_status_icon_new_from_icon_name(char* icon_name);
45768 StatusIcon* /*new*/ gtk_status_icon_new_from_pixbuf(GdkPixbuf2.Pixbuf* pixbuf);
45769 StatusIcon* /*new*/ gtk_status_icon_new_from_stock(char* stock_id);
45770 void gtk_status_icon_position_menu(Menu* menu, int* x, int* y, int* push_in, void* user_data);
45771 int gtk_status_icon_get_blinking(StatusIcon* this_);
45772 int gtk_status_icon_get_geometry(StatusIcon* this_, /*out*/ Gdk2.Screen** screen=null, /*out*/ Gdk2.Rectangle* area=null, /*out*/ Orientation* orientation=null);
45773 Gio2.Icon* gtk_status_icon_get_gicon(StatusIcon* this_);
45774 int gtk_status_icon_get_has_tooltip(StatusIcon* this_);
45775 char* gtk_status_icon_get_icon_name(StatusIcon* this_);
45776 GdkPixbuf2.Pixbuf* gtk_status_icon_get_pixbuf(StatusIcon* this_);
45777 Gdk2.Screen* gtk_status_icon_get_screen(StatusIcon* this_);
45778 int gtk_status_icon_get_size(StatusIcon* this_);
45779 char* gtk_status_icon_get_stock(StatusIcon* this_);
45780 ImageType gtk_status_icon_get_storage_type(StatusIcon* this_);
45781 char* gtk_status_icon_get_title(StatusIcon* this_);
45782 char* /*new*/ gtk_status_icon_get_tooltip_markup(StatusIcon* this_);
45783 char* /*new*/ gtk_status_icon_get_tooltip_text(StatusIcon* this_);
45784 int gtk_status_icon_get_visible(StatusIcon* this_);
45785 uint gtk_status_icon_get_x11_window_id(StatusIcon* this_);
45786 int gtk_status_icon_is_embedded(StatusIcon* this_);
45787 void gtk_status_icon_set_blinking(StatusIcon* this_, int blinking);
45788 void gtk_status_icon_set_from_file(StatusIcon* this_, char* filename);
45789 void gtk_status_icon_set_from_gicon(StatusIcon* this_, Gio2.Icon* icon);
45790 void gtk_status_icon_set_from_icon_name(StatusIcon* this_, char* icon_name);
45791 void gtk_status_icon_set_from_pixbuf(StatusIcon* this_, GdkPixbuf2.Pixbuf* pixbuf=null);
45792 void gtk_status_icon_set_from_stock(StatusIcon* this_, char* stock_id);
45793 void gtk_status_icon_set_has_tooltip(StatusIcon* this_, int has_tooltip);
45794 void gtk_status_icon_set_name(StatusIcon* this_, char* name);
45795 void gtk_status_icon_set_screen(StatusIcon* this_, Gdk2.Screen* screen);
45796 void gtk_status_icon_set_title(StatusIcon* this_, char* title);
45797 void gtk_status_icon_set_tooltip(StatusIcon* this_, char* tooltip_text=null);
45798 void gtk_status_icon_set_tooltip_markup(StatusIcon* this_, char* markup=null);
45799 void gtk_status_icon_set_tooltip_text(StatusIcon* this_, char* text);
45800 void gtk_status_icon_set_visible(StatusIcon* this_, int visible);
45801 Statusbar* gtk_statusbar_new();
45802 uint gtk_statusbar_get_context_id(Statusbar* this_, char* context_description);
45803 int gtk_statusbar_get_has_resize_grip(Statusbar* this_);
45804 Widget* gtk_statusbar_get_message_area(Statusbar* this_);
45805 void gtk_statusbar_pop(Statusbar* this_, uint context_id);
45806 uint gtk_statusbar_push(Statusbar* this_, uint context_id, char* text);
45807 void gtk_statusbar_remove(Statusbar* this_, uint context_id, uint message_id);
45808 void gtk_statusbar_remove_all(Statusbar* this_, uint context_id);
45809 void gtk_statusbar_set_has_resize_grip(Statusbar* this_, int setting);
45810 StockItem* gtk_stock_item_copy(StockItem* this_);
45811 void gtk_stock_item_free(StockItem* this_);
45812 Style* /*new*/ gtk_style_new();
45813 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);
45814 Style* gtk_style_attach(Style* this_, Gdk2.Window* window);
45815 Style* /*new*/ gtk_style_copy(Style* this_);
45816 void gtk_style_detach(Style* this_);
45817 void gtk_style_get(Style* this_, Type widget_type, char* first_property_name, ...);
45818 Gdk2.Font* /*new*/ gtk_style_get_font(Style* this_);
45819 void gtk_style_get_style_property(Style* this_, Type widget_type, char* property_name, GObject2.Value* value);
45820 void gtk_style_get_valist(Style* this_, Type widget_type, char* first_property_name, va_list var_args);
45821 int gtk_style_lookup_color(Style* this_, char* color_name, /*out*/ Gdk2.Color* color);
45822 IconSet* gtk_style_lookup_icon_set(Style* this_, char* stock_id);
45823 Style* gtk_style_ref(Style* this_);
45824 GdkPixbuf2.Pixbuf* /*new*/ gtk_style_render_icon(Style* this_, IconSource* source, TextDirection direction, StateType state, IconSize size, Widget* widget=null, char* detail=null);
45825 void gtk_style_set_background(Style* this_, Gdk2.Window* window, StateType state_type);
45826 void gtk_style_set_font(Style* this_, Gdk2.Font* font=null);
45827 void gtk_style_unref(Style* this_);
45828 Table* gtk_table_new(uint rows, uint columns, int homogeneous);
45829 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);
45830 void gtk_table_attach_defaults(Table* this_, Widget* widget, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach);
45831 uint gtk_table_get_col_spacing(Table* this_, uint column);
45832 uint gtk_table_get_default_col_spacing(Table* this_);
45833 uint gtk_table_get_default_row_spacing(Table* this_);
45834 int gtk_table_get_homogeneous(Table* this_);
45835 uint gtk_table_get_row_spacing(Table* this_, uint row);
45836 void gtk_table_get_size(Table* this_, /*out*/ uint* rows=null, /*out*/ uint* columns=null);
45837 void gtk_table_resize(Table* this_, uint rows, uint columns);
45838 void gtk_table_set_col_spacing(Table* this_, uint column, uint spacing);
45839 void gtk_table_set_col_spacings(Table* this_, uint spacing);
45840 void gtk_table_set_homogeneous(Table* this_, int homogeneous);
45841 void gtk_table_set_row_spacing(Table* this_, uint row, uint spacing);
45842 void gtk_table_set_row_spacings(Table* this_, uint spacing);
45843 TargetList* /*new*/ gtk_target_list_new(TargetEntry* targets, uint ntargets);
45844 void gtk_target_list_add(TargetList* this_, Gdk2.Atom target, uint flags, uint info);
45845 void gtk_target_list_add_image_targets(TargetList* this_, uint info, int writable);
45846 void gtk_target_list_add_rich_text_targets(TargetList* this_, uint info, int deserializable, TextBuffer* buffer);
45847 void gtk_target_list_add_table(TargetList* this_, TargetEntry* targets, uint ntargets);
45848 void gtk_target_list_add_text_targets(TargetList* this_, uint info);
45849 void gtk_target_list_add_uri_targets(TargetList* this_, uint info);
45850 int gtk_target_list_find(TargetList* this_, Gdk2.Atom target, uint* info);
45851 TargetList* /*new*/ gtk_target_list_ref(TargetList* this_);
45852 void gtk_target_list_remove(TargetList* this_, Gdk2.Atom target);
45853 void gtk_target_list_unref(TargetList* this_);
45854 TearoffMenuItem* gtk_tearoff_menu_item_new();
45855 TextAttributes* /*new*/ gtk_text_attributes_new();
45856 TextAttributes* /*new*/ gtk_text_attributes_copy(TextAttributes* this_);
45857 void gtk_text_attributes_copy_values(TextAttributes* this_, TextAttributes* dest);
45858 TextAttributes* /*new*/ gtk_text_attributes_ref(TextAttributes* this_);
45859 void gtk_text_attributes_unref(TextAttributes* this_);
45860 TextBuffer* /*new*/ gtk_text_buffer_new(TextTagTable* table=null);
45861 void gtk_text_buffer_add_mark(TextBuffer* this_, TextMark* mark, TextIter* where);
45862 void gtk_text_buffer_add_selection_clipboard(TextBuffer* this_, Clipboard* clipboard);
45863 void gtk_text_buffer_apply_tag(TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end);
45864 void gtk_text_buffer_apply_tag_by_name(TextBuffer* this_, char* name, TextIter* start, TextIter* end);
45865 int gtk_text_buffer_backspace(TextBuffer* this_, TextIter* iter, int interactive, int default_editable);
45866 void gtk_text_buffer_begin_user_action(TextBuffer* this_);
45867 void gtk_text_buffer_copy_clipboard(TextBuffer* this_, Clipboard* clipboard);
45868 TextChildAnchor* gtk_text_buffer_create_child_anchor(TextBuffer* this_, TextIter* iter);
45869 TextMark* gtk_text_buffer_create_mark(TextBuffer* this_, char* mark_name, TextIter* where, int left_gravity);
45870 TextTag* gtk_text_buffer_create_tag(TextBuffer* this_, char* tag_name=null, char* first_property_name=null, ...);
45871 void gtk_text_buffer_cut_clipboard(TextBuffer* this_, Clipboard* clipboard, int default_editable);
45872 void gtk_text_buffer_delete(TextBuffer* this_, TextIter* start, TextIter* end);
45873 int gtk_text_buffer_delete_interactive(TextBuffer* this_, TextIter* start_iter, TextIter* end_iter, int default_editable);
45874 void gtk_text_buffer_delete_mark(TextBuffer* this_, TextMark* mark);
45875 void gtk_text_buffer_delete_mark_by_name(TextBuffer* this_, char* name);
45876 int gtk_text_buffer_delete_selection(TextBuffer* this_, int interactive, int default_editable);
45877 int gtk_text_buffer_deserialize(TextBuffer* this_, TextBuffer* content_buffer, Gdk2.Atom format, TextIter* iter, ubyte* data, size_t length, GLib2.Error** error);
45878 int gtk_text_buffer_deserialize_get_can_create_tags(TextBuffer* this_, Gdk2.Atom format);
45879 void gtk_text_buffer_deserialize_set_can_create_tags(TextBuffer* this_, Gdk2.Atom format, int can_create_tags);
45880 void gtk_text_buffer_end_user_action(TextBuffer* this_);
45881 void gtk_text_buffer_get_bounds(TextBuffer* this_, /*out*/ TextIter* start, /*out*/ TextIter* end);
45882 int gtk_text_buffer_get_char_count(TextBuffer* this_);
45883 TargetList* gtk_text_buffer_get_copy_target_list(TextBuffer* this_);
45884 Gdk2.Atom* /*new container*/ gtk_text_buffer_get_deserialize_formats(TextBuffer* this_, /*out*/ int* n_formats);
45885 void gtk_text_buffer_get_end_iter(TextBuffer* this_, /*out*/ TextIter* iter);
45886 int gtk_text_buffer_get_has_selection(TextBuffer* this_);
45887 TextMark* gtk_text_buffer_get_insert(TextBuffer* this_);
45888 void gtk_text_buffer_get_iter_at_child_anchor(TextBuffer* this_, /*out*/ TextIter* iter, TextChildAnchor* anchor);
45889 void gtk_text_buffer_get_iter_at_line(TextBuffer* this_, /*out*/ TextIter* iter, int line_number);
45890 void gtk_text_buffer_get_iter_at_line_index(TextBuffer* this_, /*out*/ TextIter* iter, int line_number, int byte_index);
45891 void gtk_text_buffer_get_iter_at_line_offset(TextBuffer* this_, /*out*/ TextIter* iter, int line_number, int char_offset);
45892 void gtk_text_buffer_get_iter_at_mark(TextBuffer* this_, /*out*/ TextIter* iter, TextMark* mark);
45893 void gtk_text_buffer_get_iter_at_offset(TextBuffer* this_, /*out*/ TextIter* iter, int char_offset);
45894 int gtk_text_buffer_get_line_count(TextBuffer* this_);
45895 TextMark* gtk_text_buffer_get_mark(TextBuffer* this_, char* name);
45896 int gtk_text_buffer_get_modified(TextBuffer* this_);
45897 TargetList* gtk_text_buffer_get_paste_target_list(TextBuffer* this_);
45898 TextMark* gtk_text_buffer_get_selection_bound(TextBuffer* this_);
45899 int gtk_text_buffer_get_selection_bounds(TextBuffer* this_, /*out*/ TextIter* start, /*out*/ TextIter* end);
45900 Gdk2.Atom* /*new container*/ gtk_text_buffer_get_serialize_formats(TextBuffer* this_, /*out*/ int* n_formats);
45901 char* /*new*/ gtk_text_buffer_get_slice(TextBuffer* this_, TextIter* start, TextIter* end, int include_hidden_chars);
45902 void gtk_text_buffer_get_start_iter(TextBuffer* this_, /*out*/ TextIter* iter);
45903 TextTagTable* gtk_text_buffer_get_tag_table(TextBuffer* this_);
45904 char* /*new*/ gtk_text_buffer_get_text(TextBuffer* this_, TextIter* start, TextIter* end, int include_hidden_chars);
45905 void gtk_text_buffer_insert(TextBuffer* this_, TextIter* iter, char* text, int len);
45906 void gtk_text_buffer_insert_at_cursor(TextBuffer* this_, char* text, int len);
45907 void gtk_text_buffer_insert_child_anchor(TextBuffer* this_, TextIter* iter, TextChildAnchor* anchor);
45908 int gtk_text_buffer_insert_interactive(TextBuffer* this_, TextIter* iter, char* text, int len, int default_editable);
45909 int gtk_text_buffer_insert_interactive_at_cursor(TextBuffer* this_, char* text, int len, int default_editable);
45910 void gtk_text_buffer_insert_pixbuf(TextBuffer* this_, TextIter* iter, GdkPixbuf2.Pixbuf* pixbuf);
45911 void gtk_text_buffer_insert_range(TextBuffer* this_, TextIter* iter, TextIter* start, TextIter* end);
45912 int gtk_text_buffer_insert_range_interactive(TextBuffer* this_, TextIter* iter, TextIter* start, TextIter* end, int default_editable);
45913 void gtk_text_buffer_insert_with_tags(TextBuffer* this_, TextIter* iter, char* text, int len, TextTag* first_tag, ...);
45914 void gtk_text_buffer_insert_with_tags_by_name(TextBuffer* this_, TextIter* iter, char* text, int len, char* first_tag_name, ...);
45915 void gtk_text_buffer_move_mark(TextBuffer* this_, TextMark* mark, TextIter* where);
45916 void gtk_text_buffer_move_mark_by_name(TextBuffer* this_, char* name, TextIter* where);
45917 void gtk_text_buffer_paste_clipboard(TextBuffer* this_, Clipboard* clipboard, TextIter* override_location, int default_editable);
45918 void gtk_text_buffer_place_cursor(TextBuffer* this_, TextIter* where);
45919 Gdk2.Atom gtk_text_buffer_register_deserialize_format(TextBuffer* this_, char* mime_type, TextBufferDeserializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy);
45920 Gdk2.Atom gtk_text_buffer_register_deserialize_tagset(TextBuffer* this_, char* tagset_name=null);
45921 Gdk2.Atom gtk_text_buffer_register_serialize_format(TextBuffer* this_, char* mime_type, TextBufferSerializeFunc function_, void* user_data, GLib2.DestroyNotify user_data_destroy);
45922 Gdk2.Atom gtk_text_buffer_register_serialize_tagset(TextBuffer* this_, char* tagset_name=null);
45923 void gtk_text_buffer_remove_all_tags(TextBuffer* this_, TextIter* start, TextIter* end);
45924 void gtk_text_buffer_remove_selection_clipboard(TextBuffer* this_, Clipboard* clipboard);
45925 void gtk_text_buffer_remove_tag(TextBuffer* this_, TextTag* tag, TextIter* start, TextIter* end);
45926 void gtk_text_buffer_remove_tag_by_name(TextBuffer* this_, char* name, TextIter* start, TextIter* end);
45927 void gtk_text_buffer_select_range(TextBuffer* this_, TextIter* ins, TextIter* bound);
45928 ubyte* /*new*/ gtk_text_buffer_serialize(TextBuffer* this_, TextBuffer* content_buffer, Gdk2.Atom format, TextIter* start, TextIter* end, /*out*/ size_t* length);
45929 void gtk_text_buffer_set_modified(TextBuffer* this_, int setting);
45930 void gtk_text_buffer_set_text(TextBuffer* this_, char* text, int len);
45931 void gtk_text_buffer_unregister_deserialize_format(TextBuffer* this_, Gdk2.Atom format);
45932 void gtk_text_buffer_unregister_serialize_format(TextBuffer* this_, Gdk2.Atom format);
45933 TextChildAnchor* /*new*/ gtk_text_child_anchor_new();
45934 int gtk_text_child_anchor_get_deleted(TextChildAnchor* this_);
45935 GLib2.List* /*new container*/ gtk_text_child_anchor_get_widgets(TextChildAnchor* this_);
45936 void gtk_text_child_anchor_queue_resize(TextChildAnchor* this_, TextLayout* layout);
45937 void gtk_text_child_anchor_register_child(TextChildAnchor* this_, Widget* child, TextLayout* layout);
45938 void gtk_text_child_anchor_unregister_child(TextChildAnchor* this_, Widget* child);
45939 int gtk_text_iter_backward_char(TextIter* this_);
45940 int gtk_text_iter_backward_chars(TextIter* this_, int count);
45941 int gtk_text_iter_backward_cursor_position(TextIter* this_);
45942 int gtk_text_iter_backward_cursor_positions(TextIter* this_, int count);
45943 int gtk_text_iter_backward_find_char(TextIter* this_, TextCharPredicate pred, void* user_data, TextIter* limit=null);
45944 int gtk_text_iter_backward_line(TextIter* this_);
45945 int gtk_text_iter_backward_lines(TextIter* this_, int count);
45946 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);
45947 int gtk_text_iter_backward_sentence_start(TextIter* this_);
45948 int gtk_text_iter_backward_sentence_starts(TextIter* this_, int count);
45949 int gtk_text_iter_backward_to_tag_toggle(TextIter* this_, TextTag* tag=null);
45950 int gtk_text_iter_backward_visible_cursor_position(TextIter* this_);
45951 int gtk_text_iter_backward_visible_cursor_positions(TextIter* this_, int count);
45952 int gtk_text_iter_backward_visible_line(TextIter* this_);
45953 int gtk_text_iter_backward_visible_lines(TextIter* this_, int count);
45954 int gtk_text_iter_backward_visible_word_start(TextIter* this_);
45955 int gtk_text_iter_backward_visible_word_starts(TextIter* this_, int count);
45956 int gtk_text_iter_backward_word_start(TextIter* this_);
45957 int gtk_text_iter_backward_word_starts(TextIter* this_, int count);
45958 int gtk_text_iter_begins_tag(TextIter* this_, TextTag* tag=null);
45959 int gtk_text_iter_can_insert(TextIter* this_, int default_editability);
45960 int gtk_text_iter_compare(TextIter* this_, TextIter* rhs);
45961 TextIter* /*new*/ gtk_text_iter_copy(TextIter* this_);
45962 int gtk_text_iter_editable(TextIter* this_, int default_setting);
45963 int gtk_text_iter_ends_line(TextIter* this_);
45964 int gtk_text_iter_ends_sentence(TextIter* this_);
45965 int gtk_text_iter_ends_tag(TextIter* this_, TextTag* tag=null);
45966 int gtk_text_iter_ends_word(TextIter* this_);
45967 int gtk_text_iter_equal(TextIter* this_, TextIter* rhs);
45968 int gtk_text_iter_forward_char(TextIter* this_);
45969 int gtk_text_iter_forward_chars(TextIter* this_, int count);
45970 int gtk_text_iter_forward_cursor_position(TextIter* this_);
45971 int gtk_text_iter_forward_cursor_positions(TextIter* this_, int count);
45972 int gtk_text_iter_forward_find_char(TextIter* this_, TextCharPredicate pred, void* user_data, TextIter* limit=null);
45973 int gtk_text_iter_forward_line(TextIter* this_);
45974 int gtk_text_iter_forward_lines(TextIter* this_, int count);
45975 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);
45976 int gtk_text_iter_forward_sentence_end(TextIter* this_);
45977 int gtk_text_iter_forward_sentence_ends(TextIter* this_, int count);
45978 void gtk_text_iter_forward_to_end(TextIter* this_);
45979 int gtk_text_iter_forward_to_line_end(TextIter* this_);
45980 int gtk_text_iter_forward_to_tag_toggle(TextIter* this_, TextTag* tag=null);
45981 int gtk_text_iter_forward_visible_cursor_position(TextIter* this_);
45982 int gtk_text_iter_forward_visible_cursor_positions(TextIter* this_, int count);
45983 int gtk_text_iter_forward_visible_line(TextIter* this_);
45984 int gtk_text_iter_forward_visible_lines(TextIter* this_, int count);
45985 int gtk_text_iter_forward_visible_word_end(TextIter* this_);
45986 int gtk_text_iter_forward_visible_word_ends(TextIter* this_, int count);
45987 int gtk_text_iter_forward_word_end(TextIter* this_);
45988 int gtk_text_iter_forward_word_ends(TextIter* this_, int count);
45989 void gtk_text_iter_free(TextIter* this_);
45990 int gtk_text_iter_get_attributes(TextIter* this_, /*out*/ TextAttributes* values);
45991 TextBuffer* gtk_text_iter_get_buffer(TextIter* this_);
45992 int gtk_text_iter_get_bytes_in_line(TextIter* this_);
45993 dchar gtk_text_iter_get_char(TextIter* this_);
45994 int gtk_text_iter_get_chars_in_line(TextIter* this_);
45995 TextChildAnchor* gtk_text_iter_get_child_anchor(TextIter* this_);
45996 Pango.Language* /*new*/ gtk_text_iter_get_language(TextIter* this_);
45997 int gtk_text_iter_get_line(TextIter* this_);
45998 int gtk_text_iter_get_line_index(TextIter* this_);
45999 int gtk_text_iter_get_line_offset(TextIter* this_);
46000 GLib2.SList* /*new container*/ gtk_text_iter_get_marks(TextIter* this_);
46001 int gtk_text_iter_get_offset(TextIter* this_);
46002 GdkPixbuf2.Pixbuf* gtk_text_iter_get_pixbuf(TextIter* this_);
46003 char* /*new*/ gtk_text_iter_get_slice(TextIter* this_, TextIter* end);
46004 GLib2.SList* /*new container*/ gtk_text_iter_get_tags(TextIter* this_);
46005 char* /*new*/ gtk_text_iter_get_text(TextIter* this_, TextIter* end);
46006 GLib2.SList* /*new container*/ gtk_text_iter_get_toggled_tags(TextIter* this_, int toggled_on);
46007 int gtk_text_iter_get_visible_line_index(TextIter* this_);
46008 int gtk_text_iter_get_visible_line_offset(TextIter* this_);
46009 char* /*new*/ gtk_text_iter_get_visible_slice(TextIter* this_, TextIter* end);
46010 char* /*new*/ gtk_text_iter_get_visible_text(TextIter* this_, TextIter* end);
46011 int gtk_text_iter_has_tag(TextIter* this_, TextTag* tag);
46012 int gtk_text_iter_in_range(TextIter* this_, TextIter* start, TextIter* end);
46013 int gtk_text_iter_inside_sentence(TextIter* this_);
46014 int gtk_text_iter_inside_word(TextIter* this_);
46015 int gtk_text_iter_is_cursor_position(TextIter* this_);
46016 int gtk_text_iter_is_end(TextIter* this_);
46017 int gtk_text_iter_is_start(TextIter* this_);
46018 void gtk_text_iter_order(TextIter* this_, TextIter* second);
46019 void gtk_text_iter_set_line(TextIter* this_, int line_number);
46020 void gtk_text_iter_set_line_index(TextIter* this_, int byte_on_line);
46021 void gtk_text_iter_set_line_offset(TextIter* this_, int char_on_line);
46022 void gtk_text_iter_set_offset(TextIter* this_, int char_offset);
46023 void gtk_text_iter_set_visible_line_index(TextIter* this_, int byte_on_line);
46024 void gtk_text_iter_set_visible_line_offset(TextIter* this_, int char_on_line);
46025 int gtk_text_iter_starts_line(TextIter* this_);
46026 int gtk_text_iter_starts_sentence(TextIter* this_);
46027 int gtk_text_iter_starts_word(TextIter* this_);
46028 int gtk_text_iter_toggles_tag(TextIter* this_, TextTag* tag=null);
46029 TextLayout* /*new*/ gtk_text_layout_new();
46030 void gtk_text_layout_changed(TextLayout* this_, int y, int old_height, int new_height);
46031 int gtk_text_layout_clamp_iter_to_vrange(TextLayout* this_, TextIter* iter, int top, int bottom);
46032 void gtk_text_layout_cursors_changed(TextLayout* this_, int y, int old_height, int new_height);
46033 void gtk_text_layout_default_style_changed(TextLayout* this_);
46034 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);
46035 void gtk_text_layout_free_line_data(TextLayout* this_, TextLine* line, TextLineData* line_data);
46036 void gtk_text_layout_free_line_display(TextLayout* this_, TextLineDisplay* display);
46037 TextBuffer* gtk_text_layout_get_buffer(TextLayout* this_);
46038 void gtk_text_layout_get_cursor_locations(TextLayout* this_, TextIter* iter, Gdk2.Rectangle* strong_pos=null, Gdk2.Rectangle* weak_pos=null);
46039 int gtk_text_layout_get_cursor_visible(TextLayout* this_);
46040 void gtk_text_layout_get_iter_at_line(TextLayout* this_, TextIter* iter, TextLine* line, int byte_offset);
46041 void gtk_text_layout_get_iter_at_pixel(TextLayout* this_, TextIter* iter, int x, int y);
46042 void gtk_text_layout_get_iter_at_position(TextLayout* this_, TextIter* iter, int* trailing, int x, int y);
46043 void gtk_text_layout_get_iter_location(TextLayout* this_, TextIter* iter, Gdk2.Rectangle* rect);
46044 void gtk_text_layout_get_line_at_y(TextLayout* this_, TextIter* target_iter, int y, int* line_top);
46045 TextLineDisplay* gtk_text_layout_get_line_display(TextLayout* this_, TextLine* line, int size_only);
46046 void gtk_text_layout_get_line_yrange(TextLayout* this_, TextIter* iter, int* y, int* height);
46047 GLib2.SList* /*new container*/ gtk_text_layout_get_lines(TextLayout* this_, int top_y, int bottom_y, int* first_line_y);
46048 void gtk_text_layout_get_size(TextLayout* this_, int* width, int* height);
46049 void gtk_text_layout_invalidate(TextLayout* this_, TextIter* start, TextIter* end);
46050 void gtk_text_layout_invalidate_cursors(TextLayout* this_, TextIter* start, TextIter* end);
46051 int gtk_text_layout_is_valid(TextLayout* this_);
46052 int gtk_text_layout_iter_starts_line(TextLayout* this_, TextIter* iter);
46053 int gtk_text_layout_move_iter_to_line_end(TextLayout* this_, TextIter* iter, int direction);
46054 int gtk_text_layout_move_iter_to_next_line(TextLayout* this_, TextIter* iter);
46055 int gtk_text_layout_move_iter_to_previous_line(TextLayout* this_, TextIter* iter);
46056 void gtk_text_layout_move_iter_to_x(TextLayout* this_, TextIter* iter, int x);
46057 int gtk_text_layout_move_iter_visually(TextLayout* this_, TextIter* iter, int count);
46058 void gtk_text_layout_set_buffer(TextLayout* this_, TextBuffer* buffer=null);
46059 void gtk_text_layout_set_contexts(TextLayout* this_, Pango.Context* ltr_context, Pango.Context* rtl_context);
46060 void gtk_text_layout_set_cursor_direction(TextLayout* this_, TextDirection direction);
46061 void gtk_text_layout_set_cursor_visible(TextLayout* this_, int cursor_visible);
46062 void gtk_text_layout_set_default_style(TextLayout* this_, TextAttributes* values);
46063 void gtk_text_layout_set_keyboard_direction(TextLayout* this_, TextDirection keyboard_dir);
46064 void gtk_text_layout_set_overwrite_mode(TextLayout* this_, int overwrite);
46065 void gtk_text_layout_set_preedit_string(TextLayout* this_, char* preedit_string, Pango.AttrList* preedit_attrs, int cursor_pos);
46066 void gtk_text_layout_set_screen_width(TextLayout* this_, int width);
46067 void gtk_text_layout_spew(TextLayout* this_);
46068 void gtk_text_layout_validate(TextLayout* this_, int max_pixels);
46069 void gtk_text_layout_validate_yrange(TextLayout* this_, TextIter* anchor_line, int y0_, int y1_);
46070 TextLineData* gtk_text_layout_wrap(TextLayout* this_, TextLine* line, TextLineData* line_data);
46071 void gtk_text_layout_wrap_loop_end(TextLayout* this_);
46072 void gtk_text_layout_wrap_loop_start(TextLayout* this_);
46073 TextMark* /*new*/ gtk_text_mark_new(char* name, int left_gravity);
46074 TextBuffer* gtk_text_mark_get_buffer(TextMark* this_);
46075 int gtk_text_mark_get_deleted(TextMark* this_);
46076 int gtk_text_mark_get_left_gravity(TextMark* this_);
46077 char* gtk_text_mark_get_name(TextMark* this_);
46078 int gtk_text_mark_get_visible(TextMark* this_);
46079 void gtk_text_mark_set_visible(TextMark* this_, int setting);
46080 TextTag* /*new*/ gtk_text_tag_new(char* name=null);
46081 int gtk_text_tag_event(TextTag* this_, GObject2.Object* event_object, Gdk2.Event* event, TextIter* iter);
46082 int gtk_text_tag_get_priority(TextTag* this_);
46083 void gtk_text_tag_set_priority(TextTag* this_, int priority);
46084 TextTagTable* /*new*/ gtk_text_tag_table_new();
46085 void gtk_text_tag_table_add(TextTagTable* this_, TextTag* tag);
46086 void gtk_text_tag_table_foreach(TextTagTable* this_, TextTagTableForeach func, void* data);
46087 int gtk_text_tag_table_get_size(TextTagTable* this_);
46088 TextTag* gtk_text_tag_table_lookup(TextTagTable* this_, char* name);
46089 void gtk_text_tag_table_remove(TextTagTable* this_, TextTag* tag);
46090 TextView* gtk_text_view_new();
46091 TextView* gtk_text_view_new_with_buffer(TextBuffer* buffer);
46092 void gtk_text_view_add_child_at_anchor(TextView* this_, Widget* child, TextChildAnchor* anchor);
46093 void gtk_text_view_add_child_in_window(TextView* this_, Widget* child, TextWindowType which_window, int xpos, int ypos);
46094 int gtk_text_view_backward_display_line(TextView* this_, TextIter* iter);
46095 int gtk_text_view_backward_display_line_start(TextView* this_, TextIter* iter);
46096 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);
46097 int gtk_text_view_forward_display_line(TextView* this_, TextIter* iter);
46098 int gtk_text_view_forward_display_line_end(TextView* this_, TextIter* iter);
46099 int gtk_text_view_get_accepts_tab(TextView* this_);
46100 int gtk_text_view_get_border_window_size(TextView* this_, TextWindowType type);
46101 TextBuffer* gtk_text_view_get_buffer(TextView* this_);
46102 int gtk_text_view_get_cursor_visible(TextView* this_);
46103 TextAttributes* /*new*/ gtk_text_view_get_default_attributes(TextView* this_);
46104 int gtk_text_view_get_editable(TextView* this_);
46105 Adjustment* gtk_text_view_get_hadjustment(TextView* this_);
46106 int gtk_text_view_get_indent(TextView* this_);
46107 void gtk_text_view_get_iter_at_location(TextView* this_, /*out*/ TextIter* iter, int x, int y);
46108 void gtk_text_view_get_iter_at_position(TextView* this_, /*out*/ TextIter* iter, /*out*/ int* trailing, int x, int y);
46109 void gtk_text_view_get_iter_location(TextView* this_, TextIter* iter, /*out*/ Gdk2.Rectangle* location);
46110 Justification gtk_text_view_get_justification(TextView* this_);
46111 int gtk_text_view_get_left_margin(TextView* this_);
46112 void gtk_text_view_get_line_at_y(TextView* this_, /*out*/ TextIter* target_iter, int y, /*out*/ int* line_top);
46113 void gtk_text_view_get_line_yrange(TextView* this_, TextIter* iter, /*out*/ int* y, /*out*/ int* height);
46114 int gtk_text_view_get_overwrite(TextView* this_);
46115 int gtk_text_view_get_pixels_above_lines(TextView* this_);
46116 int gtk_text_view_get_pixels_below_lines(TextView* this_);
46117 int gtk_text_view_get_pixels_inside_wrap(TextView* this_);
46118 int gtk_text_view_get_right_margin(TextView* this_);
46119 Pango.TabArray* /*new*/ gtk_text_view_get_tabs(TextView* this_);
46120 Adjustment* gtk_text_view_get_vadjustment(TextView* this_);
46121 void gtk_text_view_get_visible_rect(TextView* this_, /*out*/ Gdk2.Rectangle* visible_rect);
46122 Gdk2.Window* gtk_text_view_get_window(TextView* this_, TextWindowType win);
46123 TextWindowType gtk_text_view_get_window_type(TextView* this_, Gdk2.Window* window);
46124 WrapMode gtk_text_view_get_wrap_mode(TextView* this_);
46125 int gtk_text_view_im_context_filter_keypress(TextView* this_, Gdk2.EventKey* event);
46126 void gtk_text_view_move_child(TextView* this_, Widget* child, int xpos, int ypos);
46127 int gtk_text_view_move_mark_onscreen(TextView* this_, TextMark* mark);
46128 int gtk_text_view_move_visually(TextView* this_, TextIter* iter, int count);
46129 int gtk_text_view_place_cursor_onscreen(TextView* this_);
46130 void gtk_text_view_reset_im_context(TextView* this_);
46131 void gtk_text_view_scroll_mark_onscreen(TextView* this_, TextMark* mark);
46132 int gtk_text_view_scroll_to_iter(TextView* this_, TextIter* iter, double within_margin, int use_align, double xalign, double yalign);
46133 void gtk_text_view_scroll_to_mark(TextView* this_, TextMark* mark, double within_margin, int use_align, double xalign, double yalign);
46134 void gtk_text_view_set_accepts_tab(TextView* this_, int accepts_tab);
46135 void gtk_text_view_set_border_window_size(TextView* this_, TextWindowType type, int size);
46136 void gtk_text_view_set_buffer(TextView* this_, TextBuffer* buffer=null);
46137 void gtk_text_view_set_cursor_visible(TextView* this_, int setting);
46138 void gtk_text_view_set_editable(TextView* this_, int setting);
46139 void gtk_text_view_set_indent(TextView* this_, int indent);
46140 void gtk_text_view_set_justification(TextView* this_, Justification justification);
46141 void gtk_text_view_set_left_margin(TextView* this_, int left_margin);
46142 void gtk_text_view_set_overwrite(TextView* this_, int overwrite);
46143 void gtk_text_view_set_pixels_above_lines(TextView* this_, int pixels_above_lines);
46144 void gtk_text_view_set_pixels_below_lines(TextView* this_, int pixels_below_lines);
46145 void gtk_text_view_set_pixels_inside_wrap(TextView* this_, int pixels_inside_wrap);
46146 void gtk_text_view_set_right_margin(TextView* this_, int right_margin);
46147 void gtk_text_view_set_tabs(TextView* this_, Pango.TabArray* tabs);
46148 void gtk_text_view_set_wrap_mode(TextView* this_, WrapMode wrap_mode);
46149 int gtk_text_view_starts_display_line(TextView* this_, TextIter* iter);
46150 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);
46151 TipsQuery* gtk_tips_query_new();
46152 void gtk_tips_query_set_caller(TipsQuery* this_, Widget* caller);
46153 void gtk_tips_query_set_labels(TipsQuery* this_, char* label_inactive, char* label_no_tip);
46154 void gtk_tips_query_start_query(TipsQuery* this_);
46155 void gtk_tips_query_stop_query(TipsQuery* this_);
46156 ToggleAction* /*new*/ gtk_toggle_action_new(char* name, char* label, char* tooltip, char* stock_id);
46157 int gtk_toggle_action_get_active(ToggleAction* this_);
46158 int gtk_toggle_action_get_draw_as_radio(ToggleAction* this_);
46159 void gtk_toggle_action_set_active(ToggleAction* this_, int is_active);
46160 void gtk_toggle_action_set_draw_as_radio(ToggleAction* this_, int draw_as_radio);
46161 void gtk_toggle_action_toggled(ToggleAction* this_);
46162 ToggleButton* gtk_toggle_button_new();
46163 ToggleButton* gtk_toggle_button_new_with_label(char* label);
46164 ToggleButton* gtk_toggle_button_new_with_mnemonic(char* label);
46165 int gtk_toggle_button_get_active(ToggleButton* this_);
46166 int gtk_toggle_button_get_inconsistent(ToggleButton* this_);
46167 int gtk_toggle_button_get_mode(ToggleButton* this_);
46168 void gtk_toggle_button_set_active(ToggleButton* this_, int is_active);
46169 void gtk_toggle_button_set_inconsistent(ToggleButton* this_, int setting);
46170 void gtk_toggle_button_set_mode(ToggleButton* this_, int draw_indicator);
46171 void gtk_toggle_button_toggled(ToggleButton* this_);
46172 ToggleToolButton* gtk_toggle_tool_button_new();
46173 ToggleToolButton* gtk_toggle_tool_button_new_from_stock(char* stock_id);
46174 int gtk_toggle_tool_button_get_active(ToggleToolButton* this_);
46175 void gtk_toggle_tool_button_set_active(ToggleToolButton* this_, int is_active);
46176 ToolButton* gtk_tool_button_new(Widget* icon_widget=null, char* label=null);
46177 ToolButton* gtk_tool_button_new_from_stock(char* stock_id);
46178 char* gtk_tool_button_get_icon_name(ToolButton* this_);
46179 Widget* gtk_tool_button_get_icon_widget(ToolButton* this_);
46180 char* gtk_tool_button_get_label(ToolButton* this_);
46181 Widget* gtk_tool_button_get_label_widget(ToolButton* this_);
46182 char* gtk_tool_button_get_stock_id(ToolButton* this_);
46183 int gtk_tool_button_get_use_underline(ToolButton* this_);
46184 void gtk_tool_button_set_icon_name(ToolButton* this_, char* icon_name=null);
46185 void gtk_tool_button_set_icon_widget(ToolButton* this_, Widget* icon_widget=null);
46186 void gtk_tool_button_set_label(ToolButton* this_, char* label=null);
46187 void gtk_tool_button_set_label_widget(ToolButton* this_, Widget* label_widget=null);
46188 void gtk_tool_button_set_stock_id(ToolButton* this_, char* stock_id=null);
46189 void gtk_tool_button_set_use_underline(ToolButton* this_, int use_underline);
46190 ToolItem* gtk_tool_item_new();
46191 Pango.EllipsizeMode gtk_tool_item_get_ellipsize_mode(ToolItem* this_);
46192 int gtk_tool_item_get_expand(ToolItem* this_);
46193 int gtk_tool_item_get_homogeneous(ToolItem* this_);
46194 int gtk_tool_item_get_icon_size(ToolItem* this_);
46195 int gtk_tool_item_get_is_important(ToolItem* this_);
46196 Orientation gtk_tool_item_get_orientation(ToolItem* this_);
46197 Widget* gtk_tool_item_get_proxy_menu_item(ToolItem* this_, char* menu_item_id);
46198 ReliefStyle gtk_tool_item_get_relief_style(ToolItem* this_);
46199 float gtk_tool_item_get_text_alignment(ToolItem* this_);
46200 Orientation gtk_tool_item_get_text_orientation(ToolItem* this_);
46201 SizeGroup* gtk_tool_item_get_text_size_group(ToolItem* this_);
46202 ToolbarStyle gtk_tool_item_get_toolbar_style(ToolItem* this_);
46203 int gtk_tool_item_get_use_drag_window(ToolItem* this_);
46204 int gtk_tool_item_get_visible_horizontal(ToolItem* this_);
46205 int gtk_tool_item_get_visible_vertical(ToolItem* this_);
46206 void gtk_tool_item_rebuild_menu(ToolItem* this_);
46207 Widget* gtk_tool_item_retrieve_proxy_menu_item(ToolItem* this_);
46208 void gtk_tool_item_set_expand(ToolItem* this_, int expand);
46209 void gtk_tool_item_set_homogeneous(ToolItem* this_, int homogeneous);
46210 void gtk_tool_item_set_is_important(ToolItem* this_, int is_important);
46211 void gtk_tool_item_set_proxy_menu_item(ToolItem* this_, char* menu_item_id, Widget* menu_item);
46212 void gtk_tool_item_set_tooltip(ToolItem* this_, Tooltips* tooltips, char* tip_text=null, char* tip_private=null);
46213 void gtk_tool_item_set_tooltip_markup(ToolItem* this_, char* markup);
46214 void gtk_tool_item_set_tooltip_text(ToolItem* this_, char* text);
46215 void gtk_tool_item_set_use_drag_window(ToolItem* this_, int use_drag_window);
46216 void gtk_tool_item_set_visible_horizontal(ToolItem* this_, int visible_horizontal);
46217 void gtk_tool_item_set_visible_vertical(ToolItem* this_, int visible_vertical);
46218 void gtk_tool_item_toolbar_reconfigured(ToolItem* this_);
46219 ToolItemGroup* gtk_tool_item_group_new(char* label);
46220 int gtk_tool_item_group_get_collapsed(ToolItemGroup* this_);
46221 ToolItem* gtk_tool_item_group_get_drop_item(ToolItemGroup* this_, int x, int y);
46222 Pango.EllipsizeMode gtk_tool_item_group_get_ellipsize(ToolItemGroup* this_);
46223 ReliefStyle gtk_tool_item_group_get_header_relief(ToolItemGroup* this_);
46224 int gtk_tool_item_group_get_item_position(ToolItemGroup* this_, ToolItem* item);
46225 char* gtk_tool_item_group_get_label(ToolItemGroup* this_);
46226 Widget* gtk_tool_item_group_get_label_widget(ToolItemGroup* this_);
46227 uint gtk_tool_item_group_get_n_items(ToolItemGroup* this_);
46228 ToolItem* gtk_tool_item_group_get_nth_item(ToolItemGroup* this_, uint index);
46229 void gtk_tool_item_group_insert(ToolItemGroup* this_, ToolItem* item, int position);
46230 void gtk_tool_item_group_set_collapsed(ToolItemGroup* this_, int collapsed);
46231 void gtk_tool_item_group_set_ellipsize(ToolItemGroup* this_, Pango.EllipsizeMode ellipsize);
46232 void gtk_tool_item_group_set_header_relief(ToolItemGroup* this_, ReliefStyle style);
46233 void gtk_tool_item_group_set_item_position(ToolItemGroup* this_, ToolItem* item, int position);
46234 void gtk_tool_item_group_set_label(ToolItemGroup* this_, char* label);
46235 void gtk_tool_item_group_set_label_widget(ToolItemGroup* this_, Widget* label_widget);
46236 ToolPalette* gtk_tool_palette_new();
46237 TargetEntry* gtk_tool_palette_get_drag_target_group();
46238 TargetEntry* gtk_tool_palette_get_drag_target_item();
46239 void gtk_tool_palette_add_drag_dest(ToolPalette* this_, Widget* widget, DestDefaults flags, ToolPaletteDragTargets targets, Gdk2.DragAction actions);
46240 Widget* gtk_tool_palette_get_drag_item(ToolPalette* this_, SelectionData* selection);
46241 ToolItemGroup* gtk_tool_palette_get_drop_group(ToolPalette* this_, int x, int y);
46242 ToolItem* gtk_tool_palette_get_drop_item(ToolPalette* this_, int x, int y);
46243 int gtk_tool_palette_get_exclusive(ToolPalette* this_, ToolItemGroup* group);
46244 int gtk_tool_palette_get_expand(ToolPalette* this_, ToolItemGroup* group);
46245 int gtk_tool_palette_get_group_position(ToolPalette* this_, ToolItemGroup* group);
46246 Adjustment* gtk_tool_palette_get_hadjustment(ToolPalette* this_);
46247 int gtk_tool_palette_get_icon_size(ToolPalette* this_);
46248 ToolbarStyle gtk_tool_palette_get_style(ToolPalette* this_);
46249 Adjustment* gtk_tool_palette_get_vadjustment(ToolPalette* this_);
46250 void gtk_tool_palette_set_drag_source(ToolPalette* this_, ToolPaletteDragTargets targets);
46251 void gtk_tool_palette_set_exclusive(ToolPalette* this_, ToolItemGroup* group, int exclusive);
46252 void gtk_tool_palette_set_expand(ToolPalette* this_, ToolItemGroup* group, int expand);
46253 void gtk_tool_palette_set_group_position(ToolPalette* this_, ToolItemGroup* group, int position);
46254 void gtk_tool_palette_set_icon_size(ToolPalette* this_, int icon_size);
46255 void gtk_tool_palette_set_style(ToolPalette* this_, ToolbarStyle style);
46256 void gtk_tool_palette_unset_icon_size(ToolPalette* this_);
46257 void gtk_tool_palette_unset_style(ToolPalette* this_);
46258 Pango.EllipsizeMode gtk_tool_shell_get_ellipsize_mode(ToolShell* this_);
46259 int gtk_tool_shell_get_icon_size(ToolShell* this_);
46260 Orientation gtk_tool_shell_get_orientation(ToolShell* this_);
46261 ReliefStyle gtk_tool_shell_get_relief_style(ToolShell* this_);
46262 ToolbarStyle gtk_tool_shell_get_style(ToolShell* this_);
46263 float gtk_tool_shell_get_text_alignment(ToolShell* this_);
46264 Orientation gtk_tool_shell_get_text_orientation(ToolShell* this_);
46265 SizeGroup* gtk_tool_shell_get_text_size_group(ToolShell* this_);
46266 void gtk_tool_shell_rebuild_menu(ToolShell* this_);
46267 Toolbar* gtk_toolbar_new();
46268 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);
46269 Widget* gtk_toolbar_append_item(Toolbar* this_, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data);
46270 void gtk_toolbar_append_space(Toolbar* this_);
46271 void gtk_toolbar_append_widget(Toolbar* this_, Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null);
46272 int gtk_toolbar_get_drop_index(Toolbar* this_, int x, int y);
46273 int gtk_toolbar_get_icon_size(Toolbar* this_);
46274 int gtk_toolbar_get_item_index(Toolbar* this_, ToolItem* item);
46275 int gtk_toolbar_get_n_items(Toolbar* this_);
46276 ToolItem* gtk_toolbar_get_nth_item(Toolbar* this_, int n);
46277 Orientation gtk_toolbar_get_orientation(Toolbar* this_);
46278 ReliefStyle gtk_toolbar_get_relief_style(Toolbar* this_);
46279 int gtk_toolbar_get_show_arrow(Toolbar* this_);
46280 ToolbarStyle gtk_toolbar_get_style(Toolbar* this_);
46281 int gtk_toolbar_get_tooltips(Toolbar* this_);
46282 void gtk_toolbar_insert(Toolbar* this_, ToolItem* item, int pos);
46283 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);
46284 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);
46285 void gtk_toolbar_insert_space(Toolbar* this_, int position);
46286 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);
46287 void gtk_toolbar_insert_widget(Toolbar* this_, Widget* widget, char* tooltip_text, char* tooltip_private_text, int position);
46288 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);
46289 Widget* gtk_toolbar_prepend_item(Toolbar* this_, char* text, char* tooltip_text, char* tooltip_private_text, Widget* icon, GObject2.Callback callback, void* user_data);
46290 void gtk_toolbar_prepend_space(Toolbar* this_);
46291 void gtk_toolbar_prepend_widget(Toolbar* this_, Widget* widget, char* tooltip_text=null, char* tooltip_private_text=null);
46292 void gtk_toolbar_remove_space(Toolbar* this_, int position);
46293 void gtk_toolbar_set_drop_highlight_item(Toolbar* this_, ToolItem* tool_item, int index_);
46294 void gtk_toolbar_set_icon_size(Toolbar* this_, int icon_size);
46295 void gtk_toolbar_set_orientation(Toolbar* this_, Orientation orientation);
46296 void gtk_toolbar_set_show_arrow(Toolbar* this_, int show_arrow);
46297 void gtk_toolbar_set_style(Toolbar* this_, ToolbarStyle style);
46298 void gtk_toolbar_set_tooltips(Toolbar* this_, int enable);
46299 void gtk_toolbar_unset_icon_size(Toolbar* this_);
46300 void gtk_toolbar_unset_style(Toolbar* this_);
46301 void gtk_tooltip_trigger_tooltip_query(Gdk2.Display* display);
46302 void gtk_tooltip_set_custom(Tooltip* this_, Widget* custom_widget=null);
46303 void gtk_tooltip_set_icon(Tooltip* this_, GdkPixbuf2.Pixbuf* pixbuf=null);
46304 void gtk_tooltip_set_icon_from_gicon(Tooltip* this_, Gio2.Icon* gicon, int size);
46305 void gtk_tooltip_set_icon_from_icon_name(Tooltip* this_, char* icon_name, int size);
46306 void gtk_tooltip_set_icon_from_stock(Tooltip* this_, char* stock_id, int size);
46307 void gtk_tooltip_set_markup(Tooltip* this_, char* markup=null);
46308 void gtk_tooltip_set_text(Tooltip* this_, char* text=null);
46309 void gtk_tooltip_set_tip_area(Tooltip* this_, Gdk2.Rectangle* rect);
46310 Tooltips* gtk_tooltips_new();
46311 int gtk_tooltips_get_info_from_tip_window(Window* tip_window, Tooltips** tooltips, Widget** current_widget);
46312 void gtk_tooltips_disable(Tooltips* this_);
46313 void gtk_tooltips_enable(Tooltips* this_);
46314 void gtk_tooltips_force_window(Tooltips* this_);
46315 void gtk_tooltips_set_delay(Tooltips* this_, uint delay);
46316 void gtk_tooltips_set_tip(Tooltips* this_, Widget* widget, char* tip_text=null, char* tip_private=null);
46317 int gtk_tree_drag_dest_drag_data_received(TreeDragDest* this_, TreePath* dest, SelectionData* selection_data);
46318 int gtk_tree_drag_dest_row_drop_possible(TreeDragDest* this_, TreePath* dest_path, SelectionData* selection_data);
46319 int gtk_tree_drag_source_drag_data_delete(TreeDragSource* this_, TreePath* path);
46320 int gtk_tree_drag_source_drag_data_get(TreeDragSource* this_, TreePath* path, /*out*/ SelectionData* selection_data);
46321 int gtk_tree_drag_source_row_draggable(TreeDragSource* this_, TreePath* path);
46322 TreeIter* /*new*/ gtk_tree_iter_copy(TreeIter* this_);
46323 void gtk_tree_iter_free(TreeIter* this_);
46324 TreeModel* /*new*/ gtk_tree_model_filter_new(TreeModel* this_, TreePath* root=null);
46325 void gtk_tree_model_foreach(TreeModel* this_, TreeModelForeachFunc func, void* user_data);
46326 void gtk_tree_model_get(TreeModel* this_, TreeIter* iter, ...);
46327 Type gtk_tree_model_get_column_type(TreeModel* this_, int index_);
46328 TreeModelFlags gtk_tree_model_get_flags(TreeModel* this_);
46329 int gtk_tree_model_get_iter(TreeModel* this_, /*out*/ TreeIter* iter, TreePath* path);
46330 int gtk_tree_model_get_iter_first(TreeModel* this_, /*out*/ TreeIter* iter);
46331 int gtk_tree_model_get_iter_from_string(TreeModel* this_, /*out*/ TreeIter* iter, char* path_string);
46332 int gtk_tree_model_get_n_columns(TreeModel* this_);
46333 TreePath* /*new*/ gtk_tree_model_get_path(TreeModel* this_, TreeIter* iter);
46334 char* /*new*/ gtk_tree_model_get_string_from_iter(TreeModel* this_, TreeIter* iter);
46335 void gtk_tree_model_get_valist(TreeModel* this_, TreeIter* iter, va_list var_args);
46336 void gtk_tree_model_get_value(TreeModel* this_, TreeIter* iter, int column, /*out*/ GObject2.Value* value);
46337 int gtk_tree_model_iter_children(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* parent=null);
46338 int gtk_tree_model_iter_has_child(TreeModel* this_, TreeIter* iter);
46339 int gtk_tree_model_iter_n_children(TreeModel* this_, TreeIter* iter=null);
46340 int gtk_tree_model_iter_next(TreeModel* this_, TreeIter* iter);
46341 int gtk_tree_model_iter_nth_child(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* parent, int n);
46342 int gtk_tree_model_iter_parent(TreeModel* this_, /*out*/ TreeIter* iter, TreeIter* child);
46343 void gtk_tree_model_ref_node(TreeModel* this_, TreeIter* iter);
46344 void gtk_tree_model_row_changed(TreeModel* this_, TreePath* path, TreeIter* iter);
46345 void gtk_tree_model_row_deleted(TreeModel* this_, TreePath* path);
46346 void gtk_tree_model_row_has_child_toggled(TreeModel* this_, TreePath* path, TreeIter* iter);
46347 void gtk_tree_model_row_inserted(TreeModel* this_, TreePath* path, TreeIter* iter);
46348 void gtk_tree_model_rows_reordered(TreeModel* this_, TreePath* path, TreeIter* iter, int* new_order);
46349 TreeModel* /*new*/ gtk_tree_model_sort_new_with_model(TreeModel* this_);
46350 void gtk_tree_model_unref_node(TreeModel* this_, TreeIter* iter);
46351 void gtk_tree_model_filter_clear_cache(TreeModelFilter* this_);
46352 int gtk_tree_model_filter_convert_child_iter_to_iter(TreeModelFilter* this_, /*out*/ TreeIter* filter_iter, TreeIter* child_iter);
46353 TreePath* /*new*/ gtk_tree_model_filter_convert_child_path_to_path(TreeModelFilter* this_, TreePath* child_path);
46354 void gtk_tree_model_filter_convert_iter_to_child_iter(TreeModelFilter* this_, /*out*/ TreeIter* child_iter, TreeIter* filter_iter);
46355 TreePath* /*new*/ gtk_tree_model_filter_convert_path_to_child_path(TreeModelFilter* this_, TreePath* filter_path);
46356 TreeModel* gtk_tree_model_filter_get_model(TreeModelFilter* this_);
46357 void gtk_tree_model_filter_refilter(TreeModelFilter* this_);
46358 void gtk_tree_model_filter_set_modify_func(TreeModelFilter* this_, int n_columns, Type* types, TreeModelFilterModifyFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
46359 void gtk_tree_model_filter_set_visible_column(TreeModelFilter* this_, int column);
46360 void gtk_tree_model_filter_set_visible_func(TreeModelFilter* this_, TreeModelFilterVisibleFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
46361 void gtk_tree_model_sort_clear_cache(TreeModelSort* this_);
46362 int gtk_tree_model_sort_convert_child_iter_to_iter(TreeModelSort* this_, /*out*/ TreeIter* sort_iter, TreeIter* child_iter);
46363 TreePath* /*new*/ gtk_tree_model_sort_convert_child_path_to_path(TreeModelSort* this_, TreePath* child_path);
46364 void gtk_tree_model_sort_convert_iter_to_child_iter(TreeModelSort* this_, /*out*/ TreeIter* child_iter, TreeIter* sorted_iter);
46365 TreePath* /*new*/ gtk_tree_model_sort_convert_path_to_child_path(TreeModelSort* this_, TreePath* sorted_path);
46366 TreeModel* gtk_tree_model_sort_get_model(TreeModelSort* this_);
46367 int gtk_tree_model_sort_iter_is_valid(TreeModelSort* this_, TreeIter* iter);
46368 void gtk_tree_model_sort_reset_default_sort_func(TreeModelSort* this_);
46369 TreePath* /*new*/ gtk_tree_path_new();
46370 TreePath* /*new*/ gtk_tree_path_new_first();
46371 TreePath* /*new*/ gtk_tree_path_new_from_indices(int first_index, ...);
46372 TreePath* /*new*/ gtk_tree_path_new_from_string(char* path);
46373 void gtk_tree_path_append_index(TreePath* this_, int index_);
46374 int gtk_tree_path_compare(TreePath* this_, TreePath* b);
46375 TreePath* /*new*/ gtk_tree_path_copy(TreePath* this_);
46376 void gtk_tree_path_down(TreePath* this_);
46377 void gtk_tree_path_free(TreePath* this_);
46378 int gtk_tree_path_get_depth(TreePath* this_);
46379 int* gtk_tree_path_get_indices(TreePath* this_);
46380 int* gtk_tree_path_get_indices_with_depth(TreePath* this_, /*out*/ int* depth);
46381 int gtk_tree_path_is_ancestor(TreePath* this_, TreePath* descendant);
46382 int gtk_tree_path_is_descendant(TreePath* this_, TreePath* ancestor);
46383 void gtk_tree_path_next(TreePath* this_);
46384 void gtk_tree_path_prepend_index(TreePath* this_, int index_);
46385 int gtk_tree_path_prev(TreePath* this_);
46386 char* /*new*/ gtk_tree_path_to_string(TreePath* this_);
46387 int gtk_tree_path_up(TreePath* this_);
46388 TreeRowReference* /*new*/ gtk_tree_row_reference_new(TreeModel* model, TreePath* path);
46389 TreeRowReference* /*new*/ gtk_tree_row_reference_new_proxy(GObject2.Object* proxy, TreeModel* model, TreePath* path);
46390 TreeRowReference* /*new*/ gtk_tree_row_reference_copy(TreeRowReference* this_);
46391 void gtk_tree_row_reference_free(TreeRowReference* this_);
46392 TreeModel* gtk_tree_row_reference_get_model(TreeRowReference* this_);
46393 TreePath* /*new*/ gtk_tree_row_reference_get_path(TreeRowReference* this_);
46394 int gtk_tree_row_reference_valid(TreeRowReference* this_);
46395 int gtk_tree_selection_count_selected_rows(TreeSelection* this_);
46396 SelectionMode gtk_tree_selection_get_mode(TreeSelection* this_);
46397 TreeSelectionFunc gtk_tree_selection_get_select_function(TreeSelection* this_);
46398 int gtk_tree_selection_get_selected(TreeSelection* this_, /*out*/ TreeModel** model=null, /*out*/ TreeIter* iter=null);
46399 GLib2.List* /*new*/ gtk_tree_selection_get_selected_rows(TreeSelection* this_, /*out*/ TreeModel** model=null);
46400 TreeView* gtk_tree_selection_get_tree_view(TreeSelection* this_);
46401 void* gtk_tree_selection_get_user_data(TreeSelection* this_);
46402 int gtk_tree_selection_iter_is_selected(TreeSelection* this_, TreeIter* iter);
46403 int gtk_tree_selection_path_is_selected(TreeSelection* this_, TreePath* path);
46404 void gtk_tree_selection_select_all(TreeSelection* this_);
46405 void gtk_tree_selection_select_iter(TreeSelection* this_, TreeIter* iter);
46406 void gtk_tree_selection_select_path(TreeSelection* this_, TreePath* path);
46407 void gtk_tree_selection_select_range(TreeSelection* this_, TreePath* start_path, TreePath* end_path);
46408 void gtk_tree_selection_selected_foreach(TreeSelection* this_, TreeSelectionForeachFunc func, void* data);
46409 void gtk_tree_selection_set_mode(TreeSelection* this_, SelectionMode type);
46410 void gtk_tree_selection_set_select_function(TreeSelection* this_, TreeSelectionFunc func, void* data, GLib2.DestroyNotify destroy);
46411 void gtk_tree_selection_unselect_all(TreeSelection* this_);
46412 void gtk_tree_selection_unselect_iter(TreeSelection* this_, TreeIter* iter);
46413 void gtk_tree_selection_unselect_path(TreeSelection* this_, TreePath* path);
46414 void gtk_tree_selection_unselect_range(TreeSelection* this_, TreePath* start_path, TreePath* end_path);
46415 int gtk_tree_sortable_get_sort_column_id(TreeSortable* this_, int* sort_column_id, SortType* order);
46416 int gtk_tree_sortable_has_default_sort_func(TreeSortable* this_);
46417 void gtk_tree_sortable_set_default_sort_func(TreeSortable* this_, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null);
46418 void gtk_tree_sortable_set_sort_column_id(TreeSortable* this_, int sort_column_id, SortType order);
46419 void gtk_tree_sortable_set_sort_func(TreeSortable* this_, int sort_column_id, TreeIterCompareFunc sort_func, void* user_data=null, GLib2.DestroyNotify destroy=null);
46420 void gtk_tree_sortable_sort_column_changed(TreeSortable* this_);
46421 TreeStore* /*new*/ gtk_tree_store_new(int n_columns, ...);
46422 TreeStore* /*new*/ gtk_tree_store_newv(int n_columns, Type* types);
46423 void gtk_tree_store_append(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null);
46424 void gtk_tree_store_clear(TreeStore* this_);
46425 void gtk_tree_store_insert(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position);
46426 void gtk_tree_store_insert_after(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null);
46427 void gtk_tree_store_insert_before(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null, TreeIter* sibling=null);
46428 void gtk_tree_store_insert_with_values(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position, ...);
46429 void gtk_tree_store_insert_with_valuesv(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent, int position, int* columns, GObject2.Value* values, int n_values);
46430 int gtk_tree_store_is_ancestor(TreeStore* this_, TreeIter* iter, TreeIter* descendant);
46431 int gtk_tree_store_iter_depth(TreeStore* this_, TreeIter* iter);
46432 int gtk_tree_store_iter_is_valid(TreeStore* this_, TreeIter* iter);
46433 void gtk_tree_store_move_after(TreeStore* this_, TreeIter* iter, TreeIter* position=null);
46434 void gtk_tree_store_move_before(TreeStore* this_, TreeIter* iter, TreeIter* position=null);
46435 void gtk_tree_store_prepend(TreeStore* this_, /*out*/ TreeIter* iter, TreeIter* parent=null);
46436 int gtk_tree_store_remove(TreeStore* this_, TreeIter* iter);
46437 void gtk_tree_store_reorder(TreeStore* this_, TreeIter* parent, int* new_order);
46438 void gtk_tree_store_set(TreeStore* this_, TreeIter* iter, ...);
46439 void gtk_tree_store_set_column_types(TreeStore* this_, int n_columns, Type* types);
46440 void gtk_tree_store_set_valist(TreeStore* this_, TreeIter* iter, va_list var_args);
46441 void gtk_tree_store_set_value(TreeStore* this_, TreeIter* iter, int column, GObject2.Value* value);
46442 void gtk_tree_store_set_valuesv(TreeStore* this_, TreeIter* iter, int* columns, GObject2.Value* values, int n_values);
46443 void gtk_tree_store_swap(TreeStore* this_, TreeIter* a, TreeIter* b);
46444 TreeView* gtk_tree_view_new();
46445 TreeView* gtk_tree_view_new_with_model(TreeModel* model);
46446 int gtk_tree_view_append_column(TreeView* this_, TreeViewColumn* column);
46447 void gtk_tree_view_collapse_all(TreeView* this_);
46448 int gtk_tree_view_collapse_row(TreeView* this_, TreePath* path);
46449 void gtk_tree_view_columns_autosize(TreeView* this_);
46450 void gtk_tree_view_convert_bin_window_to_tree_coords(TreeView* this_, int bx, int by, /*out*/ int* tx, /*out*/ int* ty);
46451 void gtk_tree_view_convert_bin_window_to_widget_coords(TreeView* this_, int bx, int by, /*out*/ int* wx, /*out*/ int* wy);
46452 void gtk_tree_view_convert_tree_to_bin_window_coords(TreeView* this_, int tx, int ty, /*out*/ int* bx, /*out*/ int* by);
46453 void gtk_tree_view_convert_tree_to_widget_coords(TreeView* this_, int tx, int ty, /*out*/ int* wx, /*out*/ int* wy);
46454 void gtk_tree_view_convert_widget_to_bin_window_coords(TreeView* this_, int wx, int wy, /*out*/ int* bx, /*out*/ int* by);
46455 void gtk_tree_view_convert_widget_to_tree_coords(TreeView* this_, int wx, int wy, /*out*/ int* tx, /*out*/ int* ty);
46456 Gdk2.Pixmap* gtk_tree_view_create_row_drag_icon(TreeView* this_, TreePath* path);
46457 void gtk_tree_view_enable_model_drag_dest(TreeView* this_, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
46458 void gtk_tree_view_enable_model_drag_source(TreeView* this_, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
46459 void gtk_tree_view_expand_all(TreeView* this_);
46460 int gtk_tree_view_expand_row(TreeView* this_, TreePath* path, int open_all);
46461 void gtk_tree_view_expand_to_path(TreeView* this_, TreePath* path);
46462 void gtk_tree_view_get_background_area(TreeView* this_, TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect);
46463 Gdk2.Window* gtk_tree_view_get_bin_window(TreeView* this_);
46464 void gtk_tree_view_get_cell_area(TreeView* this_, TreePath* path, TreeViewColumn* column, /*out*/ Gdk2.Rectangle* rect);
46465 TreeViewColumn* gtk_tree_view_get_column(TreeView* this_, int n);
46466 GLib2.List* /*new container*/ gtk_tree_view_get_columns(TreeView* this_);
46467 void gtk_tree_view_get_cursor(TreeView* this_, /*out*/ TreePath** path=null, /*out*/ TreeViewColumn** focus_column=null);
46468 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);
46469 void gtk_tree_view_get_drag_dest_row(TreeView* this_, /*out*/ TreePath** path=null, /*out*/ TreeViewDropPosition* pos=null);
46470 int gtk_tree_view_get_enable_search(TreeView* this_);
46471 int gtk_tree_view_get_enable_tree_lines(TreeView* this_);
46472 TreeViewColumn* gtk_tree_view_get_expander_column(TreeView* this_);
46473 int gtk_tree_view_get_fixed_height_mode(TreeView* this_);
46474 TreeViewGridLines gtk_tree_view_get_grid_lines(TreeView* this_);
46475 Adjustment* gtk_tree_view_get_hadjustment(TreeView* this_);
46476 int gtk_tree_view_get_headers_clickable(TreeView* this_);
46477 int gtk_tree_view_get_headers_visible(TreeView* this_);
46478 int gtk_tree_view_get_hover_expand(TreeView* this_);
46479 int gtk_tree_view_get_hover_selection(TreeView* this_);
46480 int gtk_tree_view_get_level_indentation(TreeView* this_);
46481 TreeModel* gtk_tree_view_get_model(TreeView* this_);
46482 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);
46483 int gtk_tree_view_get_reorderable(TreeView* this_);
46484 TreeViewRowSeparatorFunc gtk_tree_view_get_row_separator_func(TreeView* this_);
46485 int gtk_tree_view_get_rubber_banding(TreeView* this_);
46486 int gtk_tree_view_get_rules_hint(TreeView* this_);
46487 int gtk_tree_view_get_search_column(TreeView* this_);
46488 Entry* gtk_tree_view_get_search_entry(TreeView* this_);
46489 TreeViewSearchEqualFunc gtk_tree_view_get_search_equal_func(TreeView* this_);
46490 TreeViewSearchPositionFunc gtk_tree_view_get_search_position_func(TreeView* this_);
46491 TreeSelection* gtk_tree_view_get_selection(TreeView* this_);
46492 int gtk_tree_view_get_show_expanders(TreeView* this_);
46493 int gtk_tree_view_get_tooltip_column(TreeView* this_);
46494 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);
46495 Adjustment* gtk_tree_view_get_vadjustment(TreeView* this_);
46496 int gtk_tree_view_get_visible_range(TreeView* this_, /*out*/ TreePath** start_path=null, /*out*/ TreePath** end_path=null);
46497 void gtk_tree_view_get_visible_rect(TreeView* this_, /*out*/ Gdk2.Rectangle* visible_rect);
46498 int gtk_tree_view_insert_column(TreeView* this_, TreeViewColumn* column, int position);
46499 int gtk_tree_view_insert_column_with_attributes(TreeView* this_, int position, char* title, CellRenderer* cell, ...);
46500 int gtk_tree_view_insert_column_with_data_func(TreeView* this_, int position, char* title, CellRenderer* cell, TreeCellDataFunc func, void* data, GLib2.DestroyNotify dnotify);
46501 int gtk_tree_view_is_rubber_banding_active(TreeView* this_);
46502 void gtk_tree_view_map_expanded_rows(TreeView* this_, TreeViewMappingFunc func, void* data);
46503 void gtk_tree_view_move_column_after(TreeView* this_, TreeViewColumn* column, TreeViewColumn* base_column=null);
46504 int gtk_tree_view_remove_column(TreeView* this_, TreeViewColumn* column);
46505 void gtk_tree_view_row_activated(TreeView* this_, TreePath* path, TreeViewColumn* column);
46506 int gtk_tree_view_row_expanded(TreeView* this_, TreePath* path);
46507 void gtk_tree_view_scroll_to_cell(TreeView* this_, TreePath* path, TreeViewColumn* column, int use_align, float row_align, float col_align);
46508 void gtk_tree_view_scroll_to_point(TreeView* this_, int tree_x, int tree_y);
46509 void gtk_tree_view_set_column_drag_function(TreeView* this_, TreeViewColumnDropFunc func=null, void* user_data=null, GLib2.DestroyNotify destroy=null);
46510 void gtk_tree_view_set_cursor(TreeView* this_, TreePath* path, TreeViewColumn* focus_column, int start_editing);
46511 void gtk_tree_view_set_cursor_on_cell(TreeView* this_, TreePath* path, TreeViewColumn* focus_column, CellRenderer* focus_cell, int start_editing);
46512 void gtk_tree_view_set_destroy_count_func(TreeView* this_, TreeDestroyCountFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null);
46513 void gtk_tree_view_set_drag_dest_row(TreeView* this_, TreePath* path, TreeViewDropPosition pos);
46514 void gtk_tree_view_set_enable_search(TreeView* this_, int enable_search);
46515 void gtk_tree_view_set_enable_tree_lines(TreeView* this_, int enabled);
46516 void gtk_tree_view_set_expander_column(TreeView* this_, TreeViewColumn* column);
46517 void gtk_tree_view_set_fixed_height_mode(TreeView* this_, int enable);
46518 void gtk_tree_view_set_grid_lines(TreeView* this_, TreeViewGridLines grid_lines);
46519 void gtk_tree_view_set_hadjustment(TreeView* this_, Adjustment* adjustment=null);
46520 void gtk_tree_view_set_headers_clickable(TreeView* this_, int setting);
46521 void gtk_tree_view_set_headers_visible(TreeView* this_, int headers_visible);
46522 void gtk_tree_view_set_hover_expand(TreeView* this_, int expand);
46523 void gtk_tree_view_set_hover_selection(TreeView* this_, int hover);
46524 void gtk_tree_view_set_level_indentation(TreeView* this_, int indentation);
46525 void gtk_tree_view_set_model(TreeView* this_, TreeModel* model=null);
46526 void gtk_tree_view_set_reorderable(TreeView* this_, int reorderable);
46527 void gtk_tree_view_set_row_separator_func(TreeView* this_, TreeViewRowSeparatorFunc func, void* data=null, GLib2.DestroyNotify destroy=null);
46528 void gtk_tree_view_set_rubber_banding(TreeView* this_, int enable);
46529 void gtk_tree_view_set_rules_hint(TreeView* this_, int setting);
46530 void gtk_tree_view_set_search_column(TreeView* this_, int column);
46531 void gtk_tree_view_set_search_entry(TreeView* this_, Entry* entry=null);
46532 void gtk_tree_view_set_search_equal_func(TreeView* this_, TreeViewSearchEqualFunc search_equal_func, void* search_user_data=null, GLib2.DestroyNotify search_destroy=null);
46533 void gtk_tree_view_set_search_position_func(TreeView* this_, TreeViewSearchPositionFunc func=null, void* data=null, GLib2.DestroyNotify destroy=null);
46534 void gtk_tree_view_set_show_expanders(TreeView* this_, int enabled);
46535 void gtk_tree_view_set_tooltip_cell(TreeView* this_, Tooltip* tooltip, TreePath* path=null, TreeViewColumn* column=null, CellRenderer* cell=null);
46536 void gtk_tree_view_set_tooltip_column(TreeView* this_, int column);
46537 void gtk_tree_view_set_tooltip_row(TreeView* this_, Tooltip* tooltip, TreePath* path);
46538 void gtk_tree_view_set_vadjustment(TreeView* this_, Adjustment* adjustment=null);
46539 void gtk_tree_view_tree_to_widget_coords(TreeView* this_, int tx, int ty, int* wx, int* wy);
46540 void gtk_tree_view_unset_rows_drag_dest(TreeView* this_);
46541 void gtk_tree_view_unset_rows_drag_source(TreeView* this_);
46542 void gtk_tree_view_widget_to_tree_coords(TreeView* this_, int wx, int wy, int* tx, int* ty);
46543 TreeViewColumn* gtk_tree_view_column_new();
46544 TreeViewColumn* gtk_tree_view_column_new_with_attributes(char* title, CellRenderer* cell, ...);
46545 void gtk_tree_view_column_add_attribute(TreeViewColumn* this_, CellRenderer* cell_renderer, char* attribute, int column);
46546 int gtk_tree_view_column_cell_get_position(TreeViewColumn* this_, CellRenderer* cell_renderer, int* start_pos, int* width);
46547 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);
46548 int gtk_tree_view_column_cell_is_visible(TreeViewColumn* this_);
46549 void gtk_tree_view_column_cell_set_cell_data(TreeViewColumn* this_, TreeModel* tree_model, TreeIter* iter, int is_expander, int is_expanded);
46550 void gtk_tree_view_column_clear(TreeViewColumn* this_);
46551 void gtk_tree_view_column_clear_attributes(TreeViewColumn* this_, CellRenderer* cell_renderer);
46552 void gtk_tree_view_column_clicked(TreeViewColumn* this_);
46553 void gtk_tree_view_column_focus_cell(TreeViewColumn* this_, CellRenderer* cell);
46554 float gtk_tree_view_column_get_alignment(TreeViewColumn* this_);
46555 GLib2.List* gtk_tree_view_column_get_cell_renderers(TreeViewColumn* this_);
46556 int gtk_tree_view_column_get_clickable(TreeViewColumn* this_);
46557 int gtk_tree_view_column_get_expand(TreeViewColumn* this_);
46558 int gtk_tree_view_column_get_fixed_width(TreeViewColumn* this_);
46559 int gtk_tree_view_column_get_max_width(TreeViewColumn* this_);
46560 int gtk_tree_view_column_get_min_width(TreeViewColumn* this_);
46561 int gtk_tree_view_column_get_reorderable(TreeViewColumn* this_);
46562 int gtk_tree_view_column_get_resizable(TreeViewColumn* this_);
46563 TreeViewColumnSizing gtk_tree_view_column_get_sizing(TreeViewColumn* this_);
46564 int gtk_tree_view_column_get_sort_column_id(TreeViewColumn* this_);
46565 int gtk_tree_view_column_get_sort_indicator(TreeViewColumn* this_);
46566 SortType gtk_tree_view_column_get_sort_order(TreeViewColumn* this_);
46567 int gtk_tree_view_column_get_spacing(TreeViewColumn* this_);
46568 char* gtk_tree_view_column_get_title(TreeViewColumn* this_);
46569 Widget* gtk_tree_view_column_get_tree_view(TreeViewColumn* this_);
46570 int gtk_tree_view_column_get_visible(TreeViewColumn* this_);
46571 Widget* gtk_tree_view_column_get_widget(TreeViewColumn* this_);
46572 int gtk_tree_view_column_get_width(TreeViewColumn* this_);
46573 void gtk_tree_view_column_pack_end(TreeViewColumn* this_, CellRenderer* cell, int expand);
46574 void gtk_tree_view_column_pack_start(TreeViewColumn* this_, CellRenderer* cell, int expand);
46575 void gtk_tree_view_column_queue_resize(TreeViewColumn* this_);
46576 void gtk_tree_view_column_set_alignment(TreeViewColumn* this_, float xalign);
46577 void gtk_tree_view_column_set_attributes(TreeViewColumn* this_, CellRenderer* cell_renderer, ...);
46578 void gtk_tree_view_column_set_cell_data_func(TreeViewColumn* this_, CellRenderer* cell_renderer, TreeCellDataFunc func, void* func_data, GLib2.DestroyNotify destroy);
46579 void gtk_tree_view_column_set_clickable(TreeViewColumn* this_, int clickable);
46580 void gtk_tree_view_column_set_expand(TreeViewColumn* this_, int expand);
46581 void gtk_tree_view_column_set_fixed_width(TreeViewColumn* this_, int fixed_width);
46582 void gtk_tree_view_column_set_max_width(TreeViewColumn* this_, int max_width);
46583 void gtk_tree_view_column_set_min_width(TreeViewColumn* this_, int min_width);
46584 void gtk_tree_view_column_set_reorderable(TreeViewColumn* this_, int reorderable);
46585 void gtk_tree_view_column_set_resizable(TreeViewColumn* this_, int resizable);
46586 void gtk_tree_view_column_set_sizing(TreeViewColumn* this_, TreeViewColumnSizing type);
46587 void gtk_tree_view_column_set_sort_column_id(TreeViewColumn* this_, int sort_column_id);
46588 void gtk_tree_view_column_set_sort_indicator(TreeViewColumn* this_, int setting);
46589 void gtk_tree_view_column_set_sort_order(TreeViewColumn* this_, SortType order);
46590 void gtk_tree_view_column_set_spacing(TreeViewColumn* this_, int spacing);
46591 void gtk_tree_view_column_set_title(TreeViewColumn* this_, char* title);
46592 void gtk_tree_view_column_set_visible(TreeViewColumn* this_, int visible);
46593 void gtk_tree_view_column_set_widget(TreeViewColumn* this_, Widget* widget=null);
46594 UIManager* /*new*/ gtk_ui_manager_new();
46595 void gtk_ui_manager_add_ui(UIManager* this_, uint merge_id, char* path, char* name, char* action, UIManagerItemType type, int top);
46596 uint gtk_ui_manager_add_ui_from_file(UIManager* this_, char* filename, GLib2.Error** error);
46597 uint gtk_ui_manager_add_ui_from_string(UIManager* this_, char* buffer, ssize_t length, GLib2.Error** error);
46598 void gtk_ui_manager_ensure_update(UIManager* this_);
46599 AccelGroup* gtk_ui_manager_get_accel_group(UIManager* this_);
46600 Action* gtk_ui_manager_get_action(UIManager* this_, char* path);
46601 GLib2.List* gtk_ui_manager_get_action_groups(UIManager* this_);
46602 int gtk_ui_manager_get_add_tearoffs(UIManager* this_);
46603 GLib2.SList* /*new container*/ gtk_ui_manager_get_toplevels(UIManager* this_, UIManagerItemType types);
46604 char* /*new*/ gtk_ui_manager_get_ui(UIManager* this_);
46605 Widget* gtk_ui_manager_get_widget(UIManager* this_, char* path);
46606 void gtk_ui_manager_insert_action_group(UIManager* this_, ActionGroup* action_group, int pos);
46607 uint gtk_ui_manager_new_merge_id(UIManager* this_);
46608 void gtk_ui_manager_remove_action_group(UIManager* this_, ActionGroup* action_group);
46609 void gtk_ui_manager_remove_ui(UIManager* this_, uint merge_id);
46610 void gtk_ui_manager_set_add_tearoffs(UIManager* this_, int add_tearoffs);
46611 VBox* gtk_vbox_new(int homogeneous, int spacing);
46612 VButtonBox* gtk_vbutton_box_new();
46613 ButtonBoxStyle gtk_vbutton_box_get_layout_default();
46614 int gtk_vbutton_box_get_spacing_default();
46615 void gtk_vbutton_box_set_layout_default(ButtonBoxStyle layout);
46616 void gtk_vbutton_box_set_spacing_default(int spacing);
46617 VPaned* gtk_vpaned_new();
46618 VRuler* gtk_vruler_new();
46619 VScale* gtk_vscale_new(Adjustment* adjustment);
46620 VScale* gtk_vscale_new_with_range(double min, double max, double step);
46621 VScrollbar* gtk_vscrollbar_new(Adjustment* adjustment=null);
46622 VSeparator* gtk_vseparator_new();
46623 Viewport* gtk_viewport_new(Adjustment* hadjustment, Adjustment* vadjustment);
46624 Gdk2.Window* gtk_viewport_get_bin_window(Viewport* this_);
46625 Adjustment* gtk_viewport_get_hadjustment(Viewport* this_);
46626 ShadowType gtk_viewport_get_shadow_type(Viewport* this_);
46627 Adjustment* gtk_viewport_get_vadjustment(Viewport* this_);
46628 Gdk2.Window* gtk_viewport_get_view_window(Viewport* this_);
46629 void gtk_viewport_set_hadjustment(Viewport* this_, Adjustment* adjustment=null);
46630 void gtk_viewport_set_shadow_type(Viewport* this_, ShadowType type);
46631 void gtk_viewport_set_vadjustment(Viewport* this_, Adjustment* adjustment=null);
46632 VolumeButton* gtk_volume_button_new();
46633 Widget* gtk_widget_new(Type type, char* first_property_name, ...);
46634 Gdk2.Colormap* gtk_widget_get_default_colormap();
46635 TextDirection gtk_widget_get_default_direction();
46636 Style* gtk_widget_get_default_style();
46637 Gdk2.Visual* gtk_widget_get_default_visual();
46638 void gtk_widget_pop_colormap();
46639 void gtk_widget_pop_composite_child();
46640 void gtk_widget_push_colormap(Gdk2.Colormap* cmap);
46641 void gtk_widget_push_composite_child();
46642 void gtk_widget_set_default_colormap(Gdk2.Colormap* colormap);
46643 void gtk_widget_set_default_direction(TextDirection dir);
46644 int gtk_widget_activate(Widget* this_);
46645 void gtk_widget_add_accelerator(Widget* this_, char* accel_signal, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods, AccelFlags accel_flags);
46646 void gtk_widget_add_events(Widget* this_, int events);
46647 void gtk_widget_add_mnemonic_label(Widget* this_, Widget* label);
46648 int gtk_widget_can_activate_accel(Widget* this_, uint signal_id);
46649 int gtk_widget_child_focus(Widget* this_, DirectionType direction);
46650 void gtk_widget_child_notify(Widget* this_, char* child_property);
46651 void gtk_widget_class_path(Widget* this_, /*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null);
46652 Pango.Context* /*new*/ gtk_widget_create_pango_context(Widget* this_);
46653 Pango.Layout* /*new*/ gtk_widget_create_pango_layout(Widget* this_, char* text);
46654 void gtk_widget_destroy(Widget* this_);
46655 void gtk_widget_destroyed(Widget* this_, /*inout*/ Widget** widget_pointer);
46656 void gtk_widget_draw(Widget* this_, Gdk2.Rectangle* area);
46657 void gtk_widget_ensure_style(Widget* this_);
46658 void gtk_widget_error_bell(Widget* this_);
46659 int gtk_widget_event(Widget* this_, Gdk2.Event* event);
46660 void gtk_widget_freeze_child_notify(Widget* this_);
46661 Atk.Object* gtk_widget_get_accessible(Widget* this_);
46662 Action* gtk_widget_get_action(Widget* this_);
46663 void gtk_widget_get_allocation(Widget* this_, /*out*/ Allocation* allocation);
46664 Widget* gtk_widget_get_ancestor(Widget* this_, Type widget_type);
46665 int gtk_widget_get_app_paintable(Widget* this_);
46666 int gtk_widget_get_can_default(Widget* this_);
46667 int gtk_widget_get_can_focus(Widget* this_);
46668 void gtk_widget_get_child_requisition(Widget* this_, Requisition* requisition);
46669 int gtk_widget_get_child_visible(Widget* this_);
46670 Clipboard* gtk_widget_get_clipboard(Widget* this_, Gdk2.Atom selection);
46671 Gdk2.Colormap* gtk_widget_get_colormap(Widget* this_);
46672 char* /*new*/ gtk_widget_get_composite_name(Widget* this_);
46673 TextDirection gtk_widget_get_direction(Widget* this_);
46674 Gdk2.Display* gtk_widget_get_display(Widget* this_);
46675 int gtk_widget_get_double_buffered(Widget* this_);
46676 int gtk_widget_get_events(Widget* this_);
46677 Gdk2.ExtensionMode gtk_widget_get_extension_events(Widget* this_);
46678 int gtk_widget_get_has_tooltip(Widget* this_);
46679 int gtk_widget_get_has_window(Widget* this_);
46680 int gtk_widget_get_mapped(Widget* this_);
46681 RcStyle* gtk_widget_get_modifier_style(Widget* this_);
46682 char* gtk_widget_get_name(Widget* this_);
46683 int gtk_widget_get_no_show_all(Widget* this_);
46684 Pango.Context* gtk_widget_get_pango_context(Widget* this_);
46685 Widget* gtk_widget_get_parent(Widget* this_);
46686 Gdk2.Window* gtk_widget_get_parent_window(Widget* this_);
46687 void gtk_widget_get_pointer(Widget* this_, /*out*/ int* x=null, /*out*/ int* y=null);
46688 int gtk_widget_get_realized(Widget* this_);
46689 int gtk_widget_get_receives_default(Widget* this_);
46690 void gtk_widget_get_requisition(Widget* this_, /*out*/ Requisition* requisition);
46691 Gdk2.Window* gtk_widget_get_root_window(Widget* this_);
46692 Gdk2.Screen* gtk_widget_get_screen(Widget* this_);
46693 int gtk_widget_get_sensitive(Widget* this_);
46694 Settings* gtk_widget_get_settings(Widget* this_);
46695 void gtk_widget_get_size_request(Widget* this_, /*out*/ int* width=null, /*out*/ int* height=null);
46696 Gdk2.Pixmap* gtk_widget_get_snapshot(Widget* this_, Gdk2.Rectangle* clip_rect=null);
46697 StateType gtk_widget_get_state(Widget* this_);
46698 Style* gtk_widget_get_style(Widget* this_);
46699 char* /*new*/ gtk_widget_get_tooltip_markup(Widget* this_);
46700 char* /*new*/ gtk_widget_get_tooltip_text(Widget* this_);
46701 Window* gtk_widget_get_tooltip_window(Widget* this_);
46702 Widget* gtk_widget_get_toplevel(Widget* this_);
46703 int gtk_widget_get_visible(Widget* this_);
46704 Gdk2.Visual* gtk_widget_get_visual(Widget* this_);
46705 Gdk2.Window* gtk_widget_get_window(Widget* this_);
46706 void gtk_widget_grab_default(Widget* this_);
46707 void gtk_widget_grab_focus(Widget* this_);
46708 int gtk_widget_has_default(Widget* this_);
46709 int gtk_widget_has_focus(Widget* this_);
46710 int gtk_widget_has_grab(Widget* this_);
46711 int gtk_widget_has_rc_style(Widget* this_);
46712 int gtk_widget_has_screen(Widget* this_);
46713 void gtk_widget_hide(Widget* this_);
46714 void gtk_widget_hide_all(Widget* this_);
46715 int gtk_widget_hide_on_delete(Widget* this_);
46716 void gtk_widget_input_shape_combine_mask(Widget* this_, Gdk2.Bitmap* shape_mask, int offset_x, int offset_y);
46717 int gtk_widget_intersect(Widget* this_, Gdk2.Rectangle* area, Gdk2.Rectangle* intersection);
46718 int gtk_widget_is_ancestor(Widget* this_, Widget* ancestor);
46719 int gtk_widget_is_composited(Widget* this_);
46720 int gtk_widget_is_drawable(Widget* this_);
46721 int gtk_widget_is_focus(Widget* this_);
46722 int gtk_widget_is_sensitive(Widget* this_);
46723 int gtk_widget_is_toplevel(Widget* this_);
46724 int gtk_widget_keynav_failed(Widget* this_, DirectionType direction);
46725 GLib2.List* /*new container*/ gtk_widget_list_accel_closures(Widget* this_);
46726 GLib2.List* /*new container*/ gtk_widget_list_mnemonic_labels(Widget* this_);
46727 void gtk_widget_map(Widget* this_);
46728 int gtk_widget_mnemonic_activate(Widget* this_, int group_cycling);
46729 void gtk_widget_modify_base(Widget* this_, StateType state, Gdk2.Color* color=null);
46730 void gtk_widget_modify_bg(Widget* this_, StateType state, Gdk2.Color* color=null);
46731 void gtk_widget_modify_cursor(Widget* this_, Gdk2.Color* primary, Gdk2.Color* secondary);
46732 void gtk_widget_modify_fg(Widget* this_, StateType state, Gdk2.Color* color=null);
46733 void gtk_widget_modify_font(Widget* this_, Pango.FontDescription* font_desc=null);
46734 void gtk_widget_modify_style(Widget* this_, RcStyle* style);
46735 void gtk_widget_modify_text(Widget* this_, StateType state, Gdk2.Color* color=null);
46736 void gtk_widget_path(Widget* this_, /*out*/ uint* path_length=null, /*out*/ char** path=null, /*out*/ char** path_reversed=null);
46737 void gtk_widget_queue_clear(Widget* this_);
46738 void gtk_widget_queue_clear_area(Widget* this_, int x, int y, int width, int height);
46739 void gtk_widget_queue_draw(Widget* this_);
46740 void gtk_widget_queue_draw_area(Widget* this_, int x, int y, int width, int height);
46741 void gtk_widget_queue_resize(Widget* this_);
46742 void gtk_widget_queue_resize_no_redraw(Widget* this_);
46743 void gtk_widget_realize(Widget* this_);
46744 Widget* gtk_widget_ref(Widget* this_);
46745 Gdk2.Region* gtk_widget_region_intersect(Widget* this_, Gdk2.Region* region);
46746 int gtk_widget_remove_accelerator(Widget* this_, AccelGroup* accel_group, uint accel_key, Gdk2.ModifierType accel_mods);
46747 void gtk_widget_remove_mnemonic_label(Widget* this_, Widget* label);
46748 GdkPixbuf2.Pixbuf* /*new*/ gtk_widget_render_icon(Widget* this_, char* stock_id, IconSize size, char* detail=null);
46749 void gtk_widget_reparent(Widget* this_, Widget* new_parent);
46750 void gtk_widget_reset_rc_styles(Widget* this_);
46751 void gtk_widget_reset_shapes(Widget* this_);
46752 int gtk_widget_send_expose(Widget* this_, Gdk2.Event* event);
46753 int gtk_widget_send_focus_change(Widget* this_, Gdk2.Event* event);
46754 void gtk_widget_set(Widget* this_, char* first_property_name, ...);
46755 void gtk_widget_set_accel_path(Widget* this_, char* accel_path=null, AccelGroup* accel_group=null);
46756 void gtk_widget_set_allocation(Widget* this_, Allocation* allocation);
46757 void gtk_widget_set_app_paintable(Widget* this_, int app_paintable);
46758 void gtk_widget_set_can_default(Widget* this_, int can_default);
46759 void gtk_widget_set_can_focus(Widget* this_, int can_focus);
46760 void gtk_widget_set_child_visible(Widget* this_, int is_visible);
46761 void gtk_widget_set_colormap(Widget* this_, Gdk2.Colormap* colormap);
46762 void gtk_widget_set_composite_name(Widget* this_, char* name);
46763 void gtk_widget_set_direction(Widget* this_, TextDirection dir);
46764 void gtk_widget_set_double_buffered(Widget* this_, int double_buffered);
46765 void gtk_widget_set_events(Widget* this_, int events);
46766 void gtk_widget_set_extension_events(Widget* this_, Gdk2.ExtensionMode mode);
46767 void gtk_widget_set_has_tooltip(Widget* this_, int has_tooltip);
46768 void gtk_widget_set_has_window(Widget* this_, int has_window);
46769 void gtk_widget_set_mapped(Widget* this_, int mapped);
46770 void gtk_widget_set_name(Widget* this_, char* name);
46771 void gtk_widget_set_no_show_all(Widget* this_, int no_show_all);
46772 void gtk_widget_set_parent(Widget* this_, Widget* parent);
46773 void gtk_widget_set_parent_window(Widget* this_, Gdk2.Window* parent_window);
46774 void gtk_widget_set_realized(Widget* this_, int realized);
46775 void gtk_widget_set_receives_default(Widget* this_, int receives_default);
46776 void gtk_widget_set_redraw_on_allocate(Widget* this_, int redraw_on_allocate);
46777 int gtk_widget_set_scroll_adjustments(Widget* this_, Adjustment* hadjustment=null, Adjustment* vadjustment=null);
46778 void gtk_widget_set_sensitive(Widget* this_, int sensitive);
46779 void gtk_widget_set_size_request(Widget* this_, int width, int height);
46780 void gtk_widget_set_state(Widget* this_, StateType state);
46781 void gtk_widget_set_style(Widget* this_, Style* style=null);
46782 void gtk_widget_set_tooltip_markup(Widget* this_, char* markup=null);
46783 void gtk_widget_set_tooltip_text(Widget* this_, char* text);
46784 void gtk_widget_set_tooltip_window(Widget* this_, Window* custom_window=null);
46785 void gtk_widget_set_uposition(Widget* this_, int x, int y);
46786 void gtk_widget_set_usize(Widget* this_, int width, int height);
46787 void gtk_widget_set_visible(Widget* this_, int visible);
46788 void gtk_widget_set_window(Widget* this_, Gdk2.Window* window);
46789 void gtk_widget_shape_combine_mask(Widget* this_, Gdk2.Bitmap* shape_mask, int offset_x, int offset_y);
46790 void gtk_widget_show(Widget* this_);
46791 void gtk_widget_show_all(Widget* this_);
46792 void gtk_widget_show_now(Widget* this_);
46793 void gtk_widget_size_allocate(Widget* this_, Allocation* allocation);
46794 void gtk_widget_size_request(Widget* this_, Requisition* requisition);
46795 void gtk_widget_style_attach(Widget* this_);
46796 void gtk_widget_style_get(Widget* this_, char* first_property_name, ...);
46797 void gtk_widget_style_get_property(Widget* this_, char* property_name, GObject2.Value* value);
46798 void gtk_widget_style_get_valist(Widget* this_, char* first_property_name, va_list var_args);
46799 void gtk_widget_thaw_child_notify(Widget* this_);
46800 int gtk_widget_translate_coordinates(Widget* this_, Widget* dest_widget, int src_x, int src_y, /*out*/ int* dest_x, /*out*/ int* dest_y);
46801 void gtk_widget_trigger_tooltip_query(Widget* this_);
46802 void gtk_widget_unmap(Widget* this_);
46803 void gtk_widget_unparent(Widget* this_);
46804 void gtk_widget_unrealize(Widget* this_);
46805 void gtk_widget_unref(Widget* this_);
46806 GObject2.ParamSpec* gtk_widget_class_find_style_property(WidgetClass* this_, char* property_name);
46807 void gtk_widget_class_install_style_property(WidgetClass* this_, GObject2.ParamSpec* pspec);
46808 void gtk_widget_class_install_style_property_parser(WidgetClass* this_, GObject2.ParamSpec* pspec, RcPropertyParser parser);
46809 GObject2.ParamSpec** /*new container*/ gtk_widget_class_list_style_properties(WidgetClass* this_, /*out*/ uint* n_properties);
46810 Window* gtk_window_new(WindowType type);
46811 GLib2.List* /*new container*/ gtk_window_get_default_icon_list();
46812 char* gtk_window_get_default_icon_name();
46813 GLib2.List* /*new container*/ gtk_window_list_toplevels();
46814 void gtk_window_set_auto_startup_notification(int setting);
46815 void gtk_window_set_default_icon(GdkPixbuf2.Pixbuf* icon);
46816 int gtk_window_set_default_icon_from_file(char* filename, GLib2.Error** error);
46817 void gtk_window_set_default_icon_list(GLib2.List* list);
46818 void gtk_window_set_default_icon_name(char* name);
46819 int gtk_window_activate_default(Window* this_);
46820 int gtk_window_activate_focus(Window* this_);
46821 int gtk_window_activate_key(Window* this_, Gdk2.EventKey* event);
46822 void gtk_window_add_accel_group(Window* this_, AccelGroup* accel_group);
46823 void gtk_window_add_embedded_xid(Window* this_, Gdk2.NativeWindow xid);
46824 void gtk_window_add_mnemonic(Window* this_, uint keyval, Widget* target);
46825 void gtk_window_begin_move_drag(Window* this_, int button, int root_x, int root_y, uint timestamp);
46826 void gtk_window_begin_resize_drag(Window* this_, Gdk2.WindowEdge edge, int button, int root_x, int root_y, uint timestamp);
46827 void gtk_window_deiconify(Window* this_);
46828 void gtk_window_fullscreen(Window* this_);
46829 int gtk_window_get_accept_focus(Window* this_);
46830 int gtk_window_get_decorated(Window* this_);
46831 void gtk_window_get_default_size(Window* this_, int* width=null, int* height=null);
46832 Widget* gtk_window_get_default_widget(Window* this_);
46833 int gtk_window_get_deletable(Window* this_);
46834 int gtk_window_get_destroy_with_parent(Window* this_);
46835 Widget* gtk_window_get_focus(Window* this_);
46836 int gtk_window_get_focus_on_map(Window* this_);
46837 void gtk_window_get_frame_dimensions(Window* this_, /*out*/ int* left=null, /*out*/ int* top=null, /*out*/ int* right=null, /*out*/ int* bottom=null);
46838 Gdk2.Gravity gtk_window_get_gravity(Window* this_);
46839 WindowGroup* gtk_window_get_group(Window* this_);
46840 int gtk_window_get_has_frame(Window* this_);
46841 GdkPixbuf2.Pixbuf* gtk_window_get_icon(Window* this_);
46842 GLib2.List* /*new container*/ gtk_window_get_icon_list(Window* this_);
46843 char* gtk_window_get_icon_name(Window* this_);
46844 Gdk2.ModifierType gtk_window_get_mnemonic_modifier(Window* this_);
46845 int gtk_window_get_mnemonics_visible(Window* this_);
46846 int gtk_window_get_modal(Window* this_);
46847 double gtk_window_get_opacity(Window* this_);
46848 void gtk_window_get_position(Window* this_, /*out*/ int* root_x=null, /*out*/ int* root_y=null);
46849 int gtk_window_get_resizable(Window* this_);
46850 char* gtk_window_get_role(Window* this_);
46851 Gdk2.Screen* gtk_window_get_screen(Window* this_);
46852 void gtk_window_get_size(Window* this_, /*out*/ int* width=null, /*out*/ int* height=null);
46853 int gtk_window_get_skip_pager_hint(Window* this_);
46854 int gtk_window_get_skip_taskbar_hint(Window* this_);
46855 char* gtk_window_get_title(Window* this_);
46856 Window* gtk_window_get_transient_for(Window* this_);
46857 Gdk2.WindowTypeHint gtk_window_get_type_hint(Window* this_);
46858 int gtk_window_get_urgency_hint(Window* this_);
46859 WindowType gtk_window_get_window_type(Window* this_);
46860 int gtk_window_has_group(Window* this_);
46861 int gtk_window_has_toplevel_focus(Window* this_);
46862 void gtk_window_iconify(Window* this_);
46863 int gtk_window_is_active(Window* this_);
46864 void gtk_window_maximize(Window* this_);
46865 int gtk_window_mnemonic_activate(Window* this_, uint keyval, Gdk2.ModifierType modifier);
46866 void gtk_window_move(Window* this_, int x, int y);
46867 int gtk_window_parse_geometry(Window* this_, char* geometry);
46868 void gtk_window_present(Window* this_);
46869 void gtk_window_present_with_time(Window* this_, uint timestamp);
46870 int gtk_window_propagate_key_event(Window* this_, Gdk2.EventKey* event);
46871 void gtk_window_remove_accel_group(Window* this_, AccelGroup* accel_group);
46872 void gtk_window_remove_embedded_xid(Window* this_, Gdk2.NativeWindow xid);
46873 void gtk_window_remove_mnemonic(Window* this_, uint keyval, Widget* target);
46874 void gtk_window_reshow_with_initial_size(Window* this_);
46875 void gtk_window_resize(Window* this_, int width, int height);
46876 void gtk_window_set_accept_focus(Window* this_, int setting);
46877 void gtk_window_set_decorated(Window* this_, int setting);
46878 void gtk_window_set_default(Window* this_, Widget* default_widget=null);
46879 void gtk_window_set_default_size(Window* this_, int width, int height);
46880 void gtk_window_set_deletable(Window* this_, int setting);
46881 void gtk_window_set_destroy_with_parent(Window* this_, int setting);
46882 void gtk_window_set_focus(Window* this_, Widget* focus=null);
46883 void gtk_window_set_focus_on_map(Window* this_, int setting);
46884 void gtk_window_set_frame_dimensions(Window* this_, int left, int top, int right, int bottom);
46885 void gtk_window_set_geometry_hints(Window* this_, Widget* geometry_widget, Gdk2.Geometry* geometry, Gdk2.WindowHints geom_mask);
46886 void gtk_window_set_gravity(Window* this_, Gdk2.Gravity gravity);
46887 void gtk_window_set_has_frame(Window* this_, int setting);
46888 void gtk_window_set_icon(Window* this_, GdkPixbuf2.Pixbuf* icon=null);
46889 int gtk_window_set_icon_from_file(Window* this_, char* filename, GLib2.Error** error);
46890 void gtk_window_set_icon_list(Window* this_, GLib2.List* list);
46891 void gtk_window_set_icon_name(Window* this_, char* name=null);
46892 void gtk_window_set_keep_above(Window* this_, int setting);
46893 void gtk_window_set_keep_below(Window* this_, int setting);
46894 void gtk_window_set_mnemonic_modifier(Window* this_, Gdk2.ModifierType modifier);
46895 void gtk_window_set_mnemonics_visible(Window* this_, int setting);
46896 void gtk_window_set_modal(Window* this_, int modal);
46897 void gtk_window_set_opacity(Window* this_, double opacity);
46898 void gtk_window_set_policy(Window* this_, int allow_shrink, int allow_grow, int auto_shrink);
46899 void gtk_window_set_position(Window* this_, WindowPosition position);
46900 void gtk_window_set_resizable(Window* this_, int resizable);
46901 void gtk_window_set_role(Window* this_, char* role);
46902 void gtk_window_set_screen(Window* this_, Gdk2.Screen* screen);
46903 void gtk_window_set_skip_pager_hint(Window* this_, int setting);
46904 void gtk_window_set_skip_taskbar_hint(Window* this_, int setting);
46905 void gtk_window_set_startup_id(Window* this_, char* startup_id);
46906 void gtk_window_set_title(Window* this_, char* title);
46907 void gtk_window_set_transient_for(Window* this_, Window* parent=null);
46908 void gtk_window_set_type_hint(Window* this_, Gdk2.WindowTypeHint hint);
46909 void gtk_window_set_urgency_hint(Window* this_, int setting);
46910 void gtk_window_set_wmclass(Window* this_, char* wmclass_name, char* wmclass_class);
46911 void gtk_window_stick(Window* this_);
46912 void gtk_window_unfullscreen(Window* this_);
46913 void gtk_window_unmaximize(Window* this_);
46914 void gtk_window_unstick(Window* this_);
46915 WindowGroup* /*new*/ gtk_window_group_new();
46916 void gtk_window_group_add_window(WindowGroup* this_, Window* window);
46917 Widget* gtk_window_group_get_current_grab(WindowGroup* this_);
46918 GLib2.List* /*new container*/ gtk_window_group_list_windows(WindowGroup* this_);
46919 void gtk_window_group_remove_window(WindowGroup* this_, Window* window);
46920 int gtk_accel_groups_activate(GObject2.Object* object, uint accel_key, Gdk2.ModifierType accel_mods);
46921 GLib2.SList* gtk_accel_groups_from_object(GObject2.Object* object);
46922 uint gtk_accelerator_get_default_mod_mask();
46923 char* /*new*/ gtk_accelerator_get_label(uint accelerator_key, Gdk2.ModifierType accelerator_mods);
46924 char* /*new*/ gtk_accelerator_name(uint accelerator_key, Gdk2.ModifierType accelerator_mods);
46925 void gtk_accelerator_parse(char* accelerator, /*out*/ uint* accelerator_key=null, /*out*/ Gdk2.ModifierType* accelerator_mods=null);
46926 void gtk_accelerator_set_default_mod_mask(Gdk2.ModifierType default_mod_mask);
46927 int gtk_accelerator_valid(uint keyval, Gdk2.ModifierType modifiers);
46928 int gtk_alternative_dialog_button_order(Gdk2.Screen* screen=null);
46929 void gtk_binding_entry_add_signal(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, uint n_args, ...);
46930 void gtk_binding_entry_add_signall(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers, char* signal_name, GLib2.SList* binding_args);
46931 void gtk_binding_entry_clear(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers);
46932 void gtk_binding_entry_remove(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers);
46933 void gtk_binding_entry_skip(BindingSet* binding_set, uint keyval, Gdk2.ModifierType modifiers);
46934 uint gtk_binding_parse_binding(GLib2.Scanner* scanner);
46935 BindingSet* gtk_binding_set_by_class(void* object_class);
46936 BindingSet* gtk_binding_set_find(char* set_name);
46937 BindingSet* gtk_binding_set_new(char* set_name);
46938 int gtk_bindings_activate(Object* object, uint keyval, Gdk2.ModifierType modifiers);
46939 int gtk_bindings_activate_event(Object* object, Gdk2.EventKey* event);
46940 GLib2.Quark gtk_builder_error_quark();
46941 char* gtk_check_version(uint required_major, uint required_minor, uint required_micro);
46942 Type gtk_ctree_node_get_type();
46943 void gtk_disable_setlocale();
46944 Gdk2.DragContext* gtk_drag_begin(Widget* widget, TargetList* targets, Gdk2.DragAction actions, int button, Gdk2.Event* event);
46945 int gtk_drag_check_threshold(Widget* widget, int start_x, int start_y, int current_x, int current_y);
46946 void gtk_drag_dest_add_image_targets(Widget* widget);
46947 void gtk_drag_dest_add_text_targets(Widget* widget);
46948 void gtk_drag_dest_add_uri_targets(Widget* widget);
46949 Gdk2.Atom gtk_drag_dest_find_target(Widget* widget, Gdk2.DragContext* context, TargetList* target_list=null);
46950 TargetList* gtk_drag_dest_get_target_list(Widget* widget);
46951 int gtk_drag_dest_get_track_motion(Widget* widget);
46952 void gtk_drag_dest_set(Widget* widget, DestDefaults flags, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
46953 void gtk_drag_dest_set_proxy(Widget* widget, Gdk2.Window* proxy_window, Gdk2.DragProtocol protocol, int use_coordinates);
46954 void gtk_drag_dest_set_target_list(Widget* widget, TargetList* target_list=null);
46955 void gtk_drag_dest_set_track_motion(Widget* widget, int track_motion);
46956 void gtk_drag_dest_unset(Widget* widget);
46957 void gtk_drag_finish(Gdk2.DragContext* context, int success, int del, uint time_);
46958 void gtk_drag_get_data(Widget* widget, Gdk2.DragContext* context, Gdk2.Atom target, uint time_);
46959 Widget* gtk_drag_get_source_widget(Gdk2.DragContext* context);
46960 void gtk_drag_highlight(Widget* widget);
46961 void gtk_drag_set_default_icon(Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y);
46962 void gtk_drag_set_icon_default(Gdk2.DragContext* context);
46963 void gtk_drag_set_icon_name(Gdk2.DragContext* context, char* icon_name, int hot_x, int hot_y);
46964 void gtk_drag_set_icon_pixbuf(Gdk2.DragContext* context, GdkPixbuf2.Pixbuf* pixbuf, int hot_x, int hot_y);
46965 void gtk_drag_set_icon_pixmap(Gdk2.DragContext* context, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask, int hot_x, int hot_y);
46966 void gtk_drag_set_icon_stock(Gdk2.DragContext* context, char* stock_id, int hot_x, int hot_y);
46967 void gtk_drag_set_icon_widget(Gdk2.DragContext* context, Widget* widget, int hot_x, int hot_y);
46968 void gtk_drag_source_add_image_targets(Widget* widget);
46969 void gtk_drag_source_add_text_targets(Widget* widget);
46970 void gtk_drag_source_add_uri_targets(Widget* widget);
46971 TargetList* gtk_drag_source_get_target_list(Widget* widget);
46972 void gtk_drag_source_set(Widget* widget, Gdk2.ModifierType start_button_mask, TargetEntry* targets, int n_targets, Gdk2.DragAction actions);
46973 void gtk_drag_source_set_icon(Widget* widget, Gdk2.Colormap* colormap, Gdk2.Pixmap* pixmap, Gdk2.Bitmap* mask=null);
46974 void gtk_drag_source_set_icon_name(Widget* widget, char* icon_name);
46975 void gtk_drag_source_set_icon_pixbuf(Widget* widget, GdkPixbuf2.Pixbuf* pixbuf);
46976 void gtk_drag_source_set_icon_stock(Widget* widget, char* stock_id);
46977 void gtk_drag_source_set_target_list(Widget* widget, TargetList* target_list=null);
46978 void gtk_drag_source_unset(Widget* widget);
46979 void gtk_drag_unhighlight(Widget* widget);
46980 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);
46981 void gtk_draw_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
46982 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);
46983 void gtk_draw_check(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
46984 void gtk_draw_diamond(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
46985 void gtk_draw_expander(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, ExpanderStyle expander_style);
46986 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);
46987 void gtk_draw_flat_box(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
46988 void gtk_draw_focus(Style* style, Gdk2.Window* window, int x, int y, int width, int height);
46989 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);
46990 void gtk_draw_hline(Style* style, Gdk2.Window* window, StateType state_type, int x1, int x2, int y);
46991 void gtk_draw_insertion_cursor(Widget* widget, Gdk2.Drawable* drawable, Gdk2.Rectangle* area, Gdk2.Rectangle* location, int is_primary, TextDirection direction, int draw_arrow);
46992 void gtk_draw_layout(Style* style, Gdk2.Window* window, StateType state_type, int use_text, int x, int y, Pango.Layout* layout);
46993 void gtk_draw_option(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
46994 void gtk_draw_polygon(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, Gdk2.Point* points, int npoints, int fill);
46995 void gtk_draw_resize_grip(Style* style, Gdk2.Window* window, StateType state_type, Gdk2.WindowEdge edge, int x, int y, int width, int height);
46996 void gtk_draw_shadow(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
46997 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);
46998 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);
46999 void gtk_draw_string(Style* style, Gdk2.Window* window, StateType state_type, int x, int y, char* string_);
47000 void gtk_draw_tab(Style* style, Gdk2.Window* window, StateType state_type, ShadowType shadow_type, int x, int y, int width, int height);
47001 void gtk_draw_vline(Style* style, Gdk2.Window* window, StateType state_type, int y1_, int y2_, int x);
47002 int gtk_events_pending();
47003 void gtk_exit(int error_code);
47004 int gtk_false();
47005 GLib2.Quark gtk_file_chooser_error_quark();
47006 Gdk2.GC* gtk_gc_get(int depth, Gdk2.Colormap* colormap, Gdk2.GCValues* values, Gdk2.GCValuesMask values_mask);
47007 void gtk_gc_release(Gdk2.GC* gc);
47008 Gdk2.Event* /*new*/ gtk_get_current_event();
47009 int gtk_get_current_event_state(/*out*/ Gdk2.ModifierType* state);
47010 uint gtk_get_current_event_time();
47011 Pango.Language* /*new*/ gtk_get_default_language();
47012 Widget* gtk_get_event_widget(Gdk2.Event* event);
47013 GLib2.OptionGroup* gtk_get_option_group(int open_default_display);
47014 void gtk_grab_add(Widget* widget);
47015 Widget* gtk_grab_get_current();
47016 void gtk_grab_remove(Widget* widget);
47017 int gtk_icon_size_from_name(char* name);
47018 char* gtk_icon_size_get_name(int size);
47019 int gtk_icon_size_lookup(int size, /*out*/ int* width, /*out*/ int* height);
47020 int gtk_icon_size_lookup_for_settings(Settings* settings, int size, /*out*/ int* width, /*out*/ int* height);
47021 int gtk_icon_size_register(char* name, int width, int height);
47022 void gtk_icon_size_register_alias(char* alias_, int target);
47023 GLib2.Quark gtk_icon_theme_error_quark();
47024 Type gtk_identifier_get_type();
47025 uint gtk_idle_add(Function function_, void* data);
47026 uint gtk_idle_add_full(int priority, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
47027 uint gtk_idle_add_priority(int priority, Function function_, void* data);
47028 void gtk_idle_remove(uint idle_handler_id);
47029 void gtk_idle_remove_by_data(void* data);
47030 void gtk_init(/*inout*/ int* argc, /*inout*/ char*** argv=null);
47031 void gtk_init_add(Function function_, void* data);
47032 int gtk_init_check(/*inout*/ int* argc, /*inout*/ char*** argv=null);
47033 int gtk_init_with_args(/*inout*/ int* argc, /*inout*/ char*** argv, char* parameter_string, GLib2.OptionEntry* entries, char* translation_domain, GLib2.Error** error);
47034 uint gtk_input_add_full(int source, Gdk2.InputCondition condition, Gdk2.InputFunction function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
47035 void gtk_input_remove(uint input_handler_id);
47036 uint gtk_key_snooper_install(KeySnoopFunc snooper, void* func_data);
47037 void gtk_key_snooper_remove(uint snooper_handler_id);
47038 void gtk_main();
47039 void gtk_main_do_event(Gdk2.Event* event);
47040 int gtk_main_iteration();
47041 int gtk_main_iteration_do(int blocking);
47042 uint gtk_main_level();
47043 void gtk_main_quit();
47044 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);
47045 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);
47046 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);
47047 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);
47048 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);
47049 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);
47050 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);
47051 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);
47052 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);
47053 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);
47054 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);
47055 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);
47056 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);
47057 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);
47058 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);
47059 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);
47060 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);
47061 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);
47062 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);
47063 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);
47064 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);
47065 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);
47066 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);
47067 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);
47068 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);
47069 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);
47070 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);
47071 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);
47072 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);
47073 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);
47074 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);
47075 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);
47076 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);
47077 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);
47078 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);
47079 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);
47080 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);
47081 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);
47082 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);
47083 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);
47084 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);
47085 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);
47086 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);
47087 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);
47088 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);
47089 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_);
47090 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);
47091 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);
47092 char* gtk_paper_size_get_default();
47093 GLib2.List* /*new*/ gtk_paper_size_get_paper_sizes(int include_custom);
47094 int gtk_parse_args(/*inout*/ int* argc, /*inout*/ char*** argv);
47095 GLib2.Quark gtk_print_error_quark();
47096 PageSetup* /*new*/ gtk_print_run_page_setup_dialog(Window* parent, PageSetup* page_setup, PrintSettings* settings);
47097 void gtk_print_run_page_setup_dialog_async(Window* parent, PageSetup* page_setup, PrintSettings* settings, PageSetupDoneFunc done_cb, void* data);
47098 void gtk_propagate_event(Widget* widget, Gdk2.Event* event);
47099 uint gtk_quit_add(uint main_level, Function function_, void* data);
47100 void gtk_quit_add_destroy(uint main_level, Object* object);
47101 uint gtk_quit_add_full(uint main_level, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
47102 void gtk_quit_remove(uint quit_handler_id);
47103 void gtk_quit_remove_by_data(void* data);
47104 void gtk_rc_add_class_style(RcStyle* rc_style, char* pattern);
47105 void gtk_rc_add_default_file(char* filename);
47106 void gtk_rc_add_widget_class_style(RcStyle* rc_style, char* pattern);
47107 void gtk_rc_add_widget_name_style(RcStyle* rc_style, char* pattern);
47108 char* /*new*/ gtk_rc_find_module_in_path(char* module_file);
47109 char* /*new*/ gtk_rc_find_pixmap_in_path(Settings* settings, GLib2.Scanner* scanner, char* pixmap_file);
47110 char** gtk_rc_get_default_files();
47111 char* /*new*/ gtk_rc_get_im_module_file();
47112 char* /*new*/ gtk_rc_get_im_module_path();
47113 char* /*new*/ gtk_rc_get_module_dir();
47114 Style* gtk_rc_get_style(Widget* widget);
47115 Style* gtk_rc_get_style_by_paths(Settings* settings, char* widget_path, char* class_path, Type type);
47116 char* /*new*/ gtk_rc_get_theme_dir();
47117 void gtk_rc_parse(char* filename);
47118 uint gtk_rc_parse_color(GLib2.Scanner* scanner, /*out*/ Gdk2.Color* color);
47119 uint gtk_rc_parse_color_full(GLib2.Scanner* scanner, RcStyle* style, /*out*/ Gdk2.Color* color);
47120 uint gtk_rc_parse_priority(GLib2.Scanner* scanner, PathPriorityType* priority);
47121 uint gtk_rc_parse_state(GLib2.Scanner* scanner, StateType* state);
47122 void gtk_rc_parse_string(char* rc_string);
47123 int gtk_rc_property_parse_border(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
47124 int gtk_rc_property_parse_color(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
47125 int gtk_rc_property_parse_enum(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
47126 int gtk_rc_property_parse_flags(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
47127 int gtk_rc_property_parse_requisition(GObject2.ParamSpec* pspec, GLib2.String* gstring, GObject2.Value* property_value);
47128 int gtk_rc_reparse_all();
47129 int gtk_rc_reparse_all_for_settings(Settings* settings, int force_load);
47130 void gtk_rc_reset_styles(Settings* settings);
47131 GLib2.Scanner* gtk_rc_scanner_new();
47132 void gtk_rc_set_default_files(char** filenames);
47133 GLib2.Quark gtk_recent_chooser_error_quark();
47134 GLib2.Quark gtk_recent_manager_error_quark();
47135 void gtk_rgb_to_hsv(double r, double g, double b, /*out*/ double* h, /*out*/ double* s, /*out*/ double* v);
47136 void gtk_selection_add_target(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint info);
47137 void gtk_selection_add_targets(Widget* widget, Gdk2.Atom selection, TargetEntry* targets, uint ntargets);
47138 int gtk_selection_clear(Widget* widget, Gdk2.EventSelection* event);
47139 void gtk_selection_clear_targets(Widget* widget, Gdk2.Atom selection);
47140 int gtk_selection_convert(Widget* widget, Gdk2.Atom selection, Gdk2.Atom target, uint time_);
47141 int gtk_selection_owner_set(Widget* widget, Gdk2.Atom selection, uint time_);
47142 int gtk_selection_owner_set_for_display(Gdk2.Display* display, Widget* widget, Gdk2.Atom selection, uint time_);
47143 void gtk_selection_remove_all(Widget* widget);
47144 char* /*new*/ gtk_set_locale();
47145 void gtk_show_about_dialog(Window* parent, char* first_property_name, ...);
47146 int gtk_show_uri(Gdk2.Screen* screen, char* uri, uint timestamp, GLib2.Error** error);
47147 void gtk_signal_compat_matched(Object* object, GObject2.Callback func, void* data, GObject2.SignalMatchType match, uint action);
47148 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);
47149 void gtk_signal_connect_object_while_alive(Object* object, char* name, GObject2.Callback func, Object* alive_object);
47150 void gtk_signal_connect_while_alive(Object* object, char* name, GObject2.Callback func, void* func_data, Object* alive_object);
47151 void gtk_signal_emit(Object* object, uint signal_id, ...);
47152 void gtk_signal_emit_by_name(Object* object, char* name, ...);
47153 void gtk_signal_emit_stop_by_name(Object* object, char* name);
47154 void gtk_signal_emitv(Object* object, uint signal_id, Arg* args);
47155 void gtk_signal_emitv_by_name(Object* object, char* name, Arg* args);
47156 uint gtk_signal_new(char* name, SignalRunType signal_flags, Type object_type, uint function_offset, GObject2.SignalCMarshaller marshaller, Type return_val, uint n_args, ...);
47157 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);
47158 void gtk_stock_add(StockItem* items, uint n_items);
47159 void gtk_stock_add_static(StockItem* items, uint n_items);
47160 GLib2.SList* /*new*/ gtk_stock_list_ids();
47161 int gtk_stock_lookup(char* stock_id, /*out*/ StockItem* item);
47162 void gtk_stock_set_translate_func(char* domain, TranslateFunc func, void* data, GLib2.DestroyNotify notify);
47163 void gtk_target_table_free(TargetEntry* targets, int n_targets);
47164 TargetEntry* /*new*/ gtk_target_table_new_from_list(TargetList* list, /*out*/ int* n_targets);
47165 int gtk_targets_include_image(Gdk2.Atom* targets, int n_targets, int writable);
47166 int gtk_targets_include_rich_text(Gdk2.Atom* targets, int n_targets, TextBuffer* buffer);
47167 int gtk_targets_include_text(Gdk2.Atom* targets, int n_targets);
47168 int gtk_targets_include_uri(Gdk2.Atom* targets, int n_targets);
47169 Widget* gtk_test_create_simple_window(char* window_title, char* dialog_text);
47170 Widget* gtk_test_create_widget(Type widget_type, char* first_property_name=null, ...);
47171 Widget* gtk_test_display_button_window(char* window_title, char* dialog_text, ...);
47172 Widget* gtk_test_find_label(Widget* widget, char* label_pattern);
47173 Widget* gtk_test_find_sibling(Widget* base_widget, Type widget_type);
47174 Widget* gtk_test_find_widget(Widget* widget, char* label_pattern, Type widget_type);
47175 void gtk_test_init(/*inout*/ int* argcp, /*inout*/ char*** argvp, ...);
47176 Type* gtk_test_list_all_types(/*out*/ uint* n_types);
47177 void gtk_test_register_all_types();
47178 double gtk_test_slider_get_value(Widget* widget);
47179 void gtk_test_slider_set_perc(Widget* widget, double percentage);
47180 int gtk_test_spin_button_click(SpinButton* spinner, uint button, int upwards);
47181 char* /*new*/ gtk_test_text_get(Widget* widget);
47182 void gtk_test_text_set(Widget* widget, char* string_);
47183 int gtk_test_widget_click(Widget* widget, uint button, Gdk2.ModifierType modifiers);
47184 int gtk_test_widget_send_key(Widget* widget, uint keyval, Gdk2.ModifierType modifiers);
47185 void gtk_text_anchored_child_set_layout(Widget* child, TextLayout* layout);
47186 uint gtk_timeout_add(uint interval, Function function_, void* data);
47187 uint gtk_timeout_add_full(uint interval, Function function_, CallbackMarshal marshal, void* data, GLib2.DestroyNotify destroy);
47188 void gtk_timeout_remove(uint timeout_handler_id);
47189 TooltipsData* gtk_tooltips_data_get(Widget* widget);
47190 int gtk_tree_get_row_drag_data(SelectionData* selection_data, /*out*/ TreeModel** tree_model, /*out*/ TreePath** path);
47191 void gtk_tree_row_reference_deleted(GObject2.Object* proxy, TreePath* path);
47192 void gtk_tree_row_reference_inserted(GObject2.Object* proxy, TreePath* path);
47193 void gtk_tree_row_reference_reordered(GObject2.Object* proxy, TreePath* path, TreeIter* iter, int* new_order);
47194 int gtk_tree_set_row_drag_data(SelectionData* selection_data, TreeModel* tree_model, TreePath* path);
47195 int gtk_true();
47196 void* gtk_type_class(Type type);
47197 EnumValue* gtk_type_enum_find_value(Type enum_type, char* value_name);
47198 EnumValue* gtk_type_enum_get_values(Type enum_type);
47199 FlagValue* gtk_type_flags_find_value(Type flags_type, char* value_name);
47200 FlagValue* gtk_type_flags_get_values(Type flags_type);
47201 void gtk_type_init(GObject2.TypeDebugFlags debug_flags);
47202 void* gtk_type_new(Type type);
47203 Type gtk_type_unique(Type parent_type, GTypeInfo* gtkinfo);