1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GtkWindow.html
27  * outPack = gtk
28  * outFile = Window
29  * strct   = GtkWindow
30  * realStrct=
31  * ctorStrct=
32  * clss    = Window
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_window_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- glib.ErrorG
48  * 	- glib.GException
49  * 	- glib.ListG
50  * 	- gdk.Pixbuf
51  * 	- gdk.Screen
52  * 	- gtk.AccelGroup
53  * 	- gtk.Application
54  * 	- gtk.Widget
55  * 	- gtk.WindowGroup
56  * structWrap:
57  * 	- GList* -> ListG
58  * 	- GdkPixbuf* -> Pixbuf
59  * 	- GdkScreen* -> Screen
60  * 	- GtkAccelGroup* -> AccelGroup
61  * 	- GtkApplication* -> Application
62  * 	- GtkWidget* -> Widget
63  * 	- GtkWindow* -> Window
64  * 	- GtkWindowGroup* -> WindowGroup
65  * module aliases:
66  * local aliases:
67  * overrides:
68  * 	- getScreen
69  * 	- setOpacity
70  * 	- getOpacity
71  */
72 
73 module gtk.Window;
74 
75 public  import gtkc.gtktypes;
76 
77 private import gtkc.gtk;
78 private import glib.ConstructionException;
79 private import gobject.ObjectG;
80 
81 private import gobject.Signals;
82 public  import gtkc.gdktypes;
83 private import glib.Str;
84 private import glib.ErrorG;
85 private import glib.GException;
86 private import glib.ListG;
87 private import gdk.Pixbuf;
88 private import gdk.Screen;
89 private import gtk.AccelGroup;
90 private import gtk.Application;
91 private import gtk.Widget;
92 private import gtk.WindowGroup;
93 
94 
95 private import gtk.Bin;
96 
97 /**
98  * A GtkWindow is a toplevel window which can contain other widgets.
99  * Windows normally have decorations that are under the control
100  * of the windowing system and allow the user to manipulate the window
101  * (resize it, move it, close it,...).
102  *
103  * GTK+ also allows windows to have a resize grip (a small area in the lower
104  * right or left corner) which can be clicked to resize the window. To
105  * control whether a window has a resize grip, use
106  * gtk_window_set_has_resize_grip().
107  *
108  * GtkWindow as GtkBuildable
109  *
110  * The GtkWindow implementation of the GtkBuildable interface supports a
111  * custom <accel-groups> element, which supports
112  * any number of <group> elements representing the
113  * GtkAccelGroup objects you want to add to your window (synonymous with
114  * gtk_window_add_accel_group().
115  *
116  * $(DDOC_COMMENT example)
117  *
118  * The GtkWindow implementation of the GtkBuildable interface
119  * supports setting a child as the titlebar by specifying "titlebar" as
120  * the "type" attribute of a <child> element.
121  */
122 public class Window : Bin
123 {
124 	
125 	/** the main Gtk struct */
126 	protected GtkWindow* gtkWindow;
127 	
128 	
129 	/** Get the main Gtk struct */
130 	public GtkWindow* getWindowStruct()
131 	{
132 		return gtkWindow;
133 	}
134 	
135 	
136 	/** the main Gtk struct as a void* */
137 	protected override void* getStruct()
138 	{
139 		return cast(void*)gtkWindow;
140 	}
141 	
142 	/**
143 	 * Sets our main struct and passes it to the parent class
144 	 */
145 	public this (GtkWindow* gtkWindow)
146 	{
147 		super(cast(GtkBin*)gtkWindow);
148 		this.gtkWindow = gtkWindow;
149 	}
150 	
151 	protected override void setStruct(GObject* obj)
152 	{
153 		super.setStruct(obj);
154 		gtkWindow = cast(GtkWindow*)obj;
155 	}
156 	
157 	/**
158 	 * Creates a top level window with a title
159 	 * Params:
160 	 * 		title = The Window title
161 	 */
162 	public this(string title)
163 	{
164 		this(GtkWindowType.TOPLEVEL);
165 		setTitle(title);
166 	}
167 	
168 	/**
169 	 * Move the window to an absolute position.
170 	 * just calls move(int, int).
171 	 * convinience because GdkEvent structs return the position coords as doubles
172 	 */
173 	public void move(double x, double y)
174 	{
175 		move(cast(int)x, cast(int)y);
176 	}
177 	
178 	/**
179 	 */
180 	int[string] connectedSignals;
181 	
182 	void delegate(Window)[] onActivateDefaultListeners;
183 	/**
184 	 * The ::activate-default signal is a
185 	 * keybinding signal
186 	 * which gets emitted when the user activates the default widget
187 	 * of window.
188 	 */
189 	void addOnActivateDefault(void delegate(Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
190 	{
191 		if ( !("activate-default" in connectedSignals) )
192 		{
193 			Signals.connectData(
194 			getStruct(),
195 			"activate-default",
196 			cast(GCallback)&callBackActivateDefault,
197 			cast(void*)this,
198 			null,
199 			connectFlags);
200 			connectedSignals["activate-default"] = 1;
201 		}
202 		onActivateDefaultListeners ~= dlg;
203 	}
204 	extern(C) static void callBackActivateDefault(GtkWindow* windowStruct, Window _window)
205 	{
206 		foreach ( void delegate(Window) dlg ; _window.onActivateDefaultListeners )
207 		{
208 			dlg(_window);
209 		}
210 	}
211 	
212 	void delegate(Window)[] onActivateFocusListeners;
213 	/**
214 	 * The ::activate-focus signal is a
215 	 * keybinding signal
216 	 * which gets emitted when the user activates the currently
217 	 * focused widget of window.
218 	 */
219 	void addOnActivateFocus(void delegate(Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
220 	{
221 		if ( !("activate-focus" in connectedSignals) )
222 		{
223 			Signals.connectData(
224 			getStruct(),
225 			"activate-focus",
226 			cast(GCallback)&callBackActivateFocus,
227 			cast(void*)this,
228 			null,
229 			connectFlags);
230 			connectedSignals["activate-focus"] = 1;
231 		}
232 		onActivateFocusListeners ~= dlg;
233 	}
234 	extern(C) static void callBackActivateFocus(GtkWindow* windowStruct, Window _window)
235 	{
236 		foreach ( void delegate(Window) dlg ; _window.onActivateFocusListeners )
237 		{
238 			dlg(_window);
239 		}
240 	}
241 	
242 	void delegate(Window)[] onKeysChangedListeners;
243 	/**
244 	 * The ::keys-changed signal gets emitted when the set of accelerators
245 	 * or mnemonics that are associated with window changes.
246 	 */
247 	void addOnKeysChanged(void delegate(Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
248 	{
249 		if ( !("keys-changed" in connectedSignals) )
250 		{
251 			Signals.connectData(
252 			getStruct(),
253 			"keys-changed",
254 			cast(GCallback)&callBackKeysChanged,
255 			cast(void*)this,
256 			null,
257 			connectFlags);
258 			connectedSignals["keys-changed"] = 1;
259 		}
260 		onKeysChangedListeners ~= dlg;
261 	}
262 	extern(C) static void callBackKeysChanged(GtkWindow* windowStruct, Window _window)
263 	{
264 		foreach ( void delegate(Window) dlg ; _window.onKeysChangedListeners )
265 		{
266 			dlg(_window);
267 		}
268 	}
269 	
270 	void delegate(Widget, Window)[] onSetFocusListeners;
271 	/**
272 	 */
273 	void addOnSetFocus(void delegate(Widget, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
274 	{
275 		if ( !("set-focus" in connectedSignals) )
276 		{
277 			Signals.connectData(
278 			getStruct(),
279 			"set-focus",
280 			cast(GCallback)&callBackSetFocus,
281 			cast(void*)this,
282 			null,
283 			connectFlags);
284 			connectedSignals["set-focus"] = 1;
285 		}
286 		onSetFocusListeners ~= dlg;
287 	}
288 	extern(C) static void callBackSetFocus(GtkWindow* windowStruct, GtkWidget* widget, Window _window)
289 	{
290 		foreach ( void delegate(Widget, Window) dlg ; _window.onSetFocusListeners )
291 		{
292 			dlg(ObjectG.getDObject!(Widget)(widget), _window);
293 		}
294 	}
295 	
296 	
297 	/**
298 	 * Creates a new GtkWindow, which is a toplevel window that can
299 	 * contain other widgets. Nearly always, the type of the window should
300 	 * be GTK_WINDOW_TOPLEVEL. If you're implementing something like a
301 	 * popup menu from scratch (which is a bad idea, just use GtkMenu),
302 	 * you might use GTK_WINDOW_POPUP. GTK_WINDOW_POPUP is not for
303 	 * dialogs, though in some other toolkits dialogs are called "popups".
304 	 * In GTK+, GTK_WINDOW_POPUP means a pop-up menu or pop-up tooltip.
305 	 * On X11, popup windows are not controlled by the window manager.
306 	 * If you simply want an undecorated window (no window borders), use
307 	 * gtk_window_set_decorated(), don't use GTK_WINDOW_POPUP.
308 	 * Params:
309 	 * type = type of window
310 	 * Throws: ConstructionException GTK+ fails to create the object.
311 	 */
312 	public this (GtkWindowType type)
313 	{
314 		// GtkWidget * gtk_window_new (GtkWindowType type);
315 		auto p = gtk_window_new(type);
316 		if(p is null)
317 		{
318 			throw new ConstructionException("null returned by gtk_window_new(type)");
319 		}
320 		this(cast(GtkWindow*) p);
321 	}
322 	
323 	/**
324 	 * Sets the title of the GtkWindow. The title of a window will be
325 	 * displayed in its title bar; on the X Window System, the title bar
326 	 * is rendered by the window
327 	 * manager, so exactly how the title appears to users may vary
328 	 * according to a user's exact configuration. The title should help a
329 	 * user distinguish this window from other windows they may have
330 	 * open. A good title might include the application name and current
331 	 * document filename, for example.
332 	 * Params:
333 	 * title = title of the window
334 	 */
335 	public void setTitle(string title)
336 	{
337 		// void gtk_window_set_title (GtkWindow *window,  const gchar *title);
338 		gtk_window_set_title(gtkWindow, Str.toStringz(title));
339 	}
340 	
341 	/**
342 	 * Don't use this function. It sets the X Window System "class" and
343 	 * "name" hints for a window. According to the ICCCM, you should
344 	 * always set these to the same value for all windows in an
345 	 * application, and GTK+ sets them to that value by default, so calling
346 	 * this function is sort of pointless. However, you may want to call
347 	 * gtk_window_set_role() on each window in your application, for the
348 	 * benefit of the session manager. Setting the role allows the window
349 	 * manager to restore window positions when loading a saved session.
350 	 * Params:
351 	 * wmclassName = window name hint
352 	 * wmclassClass = window class hint
353 	 */
354 	public void setWmclass(string wmclassName, string wmclassClass)
355 	{
356 		// void gtk_window_set_wmclass (GtkWindow *window,  const gchar *wmclass_name,  const gchar *wmclass_class);
357 		gtk_window_set_wmclass(gtkWindow, Str.toStringz(wmclassName), Str.toStringz(wmclassClass));
358 	}
359 	
360 	/**
361 	 * Sets whether the user can resize a window. Windows are user resizable
362 	 * by default.
363 	 * Params:
364 	 * resizable = TRUE if the user can resize this window
365 	 */
366 	public void setResizable(int resizable)
367 	{
368 		// void gtk_window_set_resizable (GtkWindow *window,  gboolean resizable);
369 		gtk_window_set_resizable(gtkWindow, resizable);
370 	}
371 	
372 	/**
373 	 * Gets the value set by gtk_window_set_resizable().
374 	 * Returns: TRUE if the user can resize the window
375 	 */
376 	public int getResizable()
377 	{
378 		// gboolean gtk_window_get_resizable (GtkWindow *window);
379 		return gtk_window_get_resizable(gtkWindow);
380 	}
381 	
382 	/**
383 	 * Associate accel_group with window, such that calling
384 	 * gtk_accel_groups_activate() on window will activate accelerators
385 	 * in accel_group.
386 	 * Params:
387 	 * accelGroup = a GtkAccelGroup
388 	 */
389 	public void addAccelGroup(AccelGroup accelGroup)
390 	{
391 		// void gtk_window_add_accel_group (GtkWindow *window,  GtkAccelGroup *accel_group);
392 		gtk_window_add_accel_group(gtkWindow, (accelGroup is null) ? null : accelGroup.getAccelGroupStruct());
393 	}
394 	
395 	/**
396 	 * Reverses the effects of gtk_window_add_accel_group().
397 	 * Params:
398 	 * accelGroup = a GtkAccelGroup
399 	 */
400 	public void removeAccelGroup(AccelGroup accelGroup)
401 	{
402 		// void gtk_window_remove_accel_group (GtkWindow *window,  GtkAccelGroup *accel_group);
403 		gtk_window_remove_accel_group(gtkWindow, (accelGroup is null) ? null : accelGroup.getAccelGroupStruct());
404 	}
405 	
406 	/**
407 	 * Activates the current focused widget within the window.
408 	 * Returns: TRUE if a widget got activated.
409 	 */
410 	public int activateFocus()
411 	{
412 		// gboolean gtk_window_activate_focus (GtkWindow *window);
413 		return gtk_window_activate_focus(gtkWindow);
414 	}
415 	
416 	/**
417 	 * Activates the default widget for the window, unless the current
418 	 * focused widget has been configured to receive the default action
419 	 * (see gtk_widget_set_receives_default()), in which case the
420 	 * focused widget is activated.
421 	 * Returns: TRUE if a widget got activated.
422 	 */
423 	public int activateDefault()
424 	{
425 		// gboolean gtk_window_activate_default (GtkWindow *window);
426 		return gtk_window_activate_default(gtkWindow);
427 	}
428 	
429 	/**
430 	 * Sets a window modal or non-modal. Modal windows prevent interaction
431 	 * with other windows in the same application. To keep modal dialogs
432 	 * on top of main application windows, use
433 	 * gtk_window_set_transient_for() to make the dialog transient for the
434 	 * parent; most window managers
435 	 * will then disallow lowering the dialog below the parent.
436 	 * Params:
437 	 * modal = whether the window is modal
438 	 */
439 	public void setModal(int modal)
440 	{
441 		// void gtk_window_set_modal (GtkWindow *window,  gboolean modal);
442 		gtk_window_set_modal(gtkWindow, modal);
443 	}
444 	
445 	/**
446 	 * Sets the default size of a window. If the window's "natural" size
447 	 * (its size request) is larger than the default, the default will be
448 	 * ignored. More generally, if the default size does not obey the
449 	 * geometry hints for the window (gtk_window_set_geometry_hints() can
450 	 * be used to set these explicitly), the default size will be clamped
451 	 * to the nearest permitted size.
452 	 * Unlike gtk_widget_set_size_request(), which sets a size request for
453 	 * a widget and thus would keep users from shrinking the window, this
454 	 * function only sets the initial size, just as if the user had
455 	 * resized the window themselves. Users can still shrink the window
456 	 * again as they normally would. Setting a default size of -1 means to
457 	 * use the "natural" default size (the size request of the window).
458 	 * For more control over a window's initial size and how resizing works,
459 	 * investigate gtk_window_set_geometry_hints().
460 	 * For some uses, gtk_window_resize() is a more appropriate function.
461 	 * gtk_window_resize() changes the current size of the window, rather
462 	 * than the size to be used on initial display. gtk_window_resize() always
463 	 * affects the window itself, not the geometry widget.
464 	 * The default size of a window only affects the first time a window is
465 	 * shown; if a window is hidden and re-shown, it will remember the size
466 	 * it had prior to hiding, rather than using the default size.
467 	 * Windows can't actually be 0x0 in size, they must be at least 1x1, but
468 	 * passing 0 for width and height is OK, resulting in a 1x1 default size.
469 	 * Params:
470 	 * width = width in pixels, or -1 to unset the default width
471 	 * height = height in pixels, or -1 to unset the default height
472 	 */
473 	public void setDefaultSize(int width, int height)
474 	{
475 		// void gtk_window_set_default_size (GtkWindow *window,  gint width,  gint height);
476 		gtk_window_set_default_size(gtkWindow, width, height);
477 	}
478 	
479 	/**
480 	 * Like gtk_window_set_default_size(), but width and height are interpreted
481 	 * in terms of the base size and increment set with
482 	 * gtk_window_set_geometry_hints.
483 	 * Params:
484 	 * width = width in resize increments, or -1 to unset the default width
485 	 * height = height in resize increments, or -1 to unset the default height
486 	 * Since 3.0
487 	 */
488 	public void setDefaultGeometry(int width, int height)
489 	{
490 		// void gtk_window_set_default_geometry (GtkWindow *window,  gint width,  gint height);
491 		gtk_window_set_default_geometry(gtkWindow, width, height);
492 	}
493 	
494 	/**
495 	 * This function sets up hints about how a window can be resized by
496 	 * the user. You can set a minimum and maximum size; allowed resize
497 	 * increments (e.g. for xterm, you can only resize by the size of a
498 	 * character); aspect ratios; and more. See the GdkGeometry struct.
499 	 * Params:
500 	 * geometryWidget = widget the geometry hints will be applied to or NULL. [allow-none]
501 	 * geometry = struct containing geometry information or NULL. [allow-none]
502 	 * geomMask = mask indicating which struct fields should be paid attention to
503 	 */
504 	public void setGeometryHints(Widget geometryWidget, ref GdkGeometry geometry, GdkWindowHints geomMask)
505 	{
506 		// void gtk_window_set_geometry_hints (GtkWindow *window,  GtkWidget *geometry_widget,  GdkGeometry *geometry,  GdkWindowHints geom_mask);
507 		gtk_window_set_geometry_hints(gtkWindow, (geometryWidget is null) ? null : geometryWidget.getWidgetStruct(), &geometry, geomMask);
508 	}
509 	
510 	/**
511 	 * Window gravity defines the meaning of coordinates passed to
512 	 * gtk_window_move(). See gtk_window_move() and GdkGravity for
513 	 * more details.
514 	 * The default window gravity is GDK_GRAVITY_NORTH_WEST which will
515 	 * typically "do what you mean."
516 	 * Params:
517 	 * gravity = window gravity
518 	 */
519 	public void setGravity(GdkGravity gravity)
520 	{
521 		// void gtk_window_set_gravity (GtkWindow *window,  GdkGravity gravity);
522 		gtk_window_set_gravity(gtkWindow, gravity);
523 	}
524 	
525 	/**
526 	 * Gets the value set by gtk_window_set_gravity().
527 	 * Returns: window gravity. [transfer none]
528 	 */
529 	public GdkGravity getGravity()
530 	{
531 		// GdkGravity gtk_window_get_gravity (GtkWindow *window);
532 		return gtk_window_get_gravity(gtkWindow);
533 	}
534 	
535 	/**
536 	 * Sets a position constraint for this window. If the old or new
537 	 * constraint is GTK_WIN_POS_CENTER_ALWAYS, this will also cause
538 	 * the window to be repositioned to satisfy the new constraint.
539 	 * Params:
540 	 * position = a position constraint.
541 	 */
542 	public void setPosition(GtkWindowPosition position)
543 	{
544 		// void gtk_window_set_position (GtkWindow *window,  GtkWindowPosition position);
545 		gtk_window_set_position(gtkWindow, position);
546 	}
547 	
548 	/**
549 	 * Dialog windows should be set transient for the main application
550 	 * window they were spawned from. This allows window managers to e.g. keep the
551 	 * dialog on top of the main window, or center the dialog over the
552 	 * main window. gtk_dialog_new_with_buttons() and other convenience
553 	 * functions in GTK+ will sometimes call
554 	 * gtk_window_set_transient_for() on your behalf.
555 	 * Passing NULL for parent unsets the current transient window.
556 	 * On Windows, this function puts the child window on top of the parent,
557 	 * much as the window manager would have done on X.
558 	 * Params:
559 	 * parent = parent window, or NULL. [allow-none]
560 	 */
561 	public void setTransientFor(Window parent)
562 	{
563 		// void gtk_window_set_transient_for (GtkWindow *window,  GtkWindow *parent);
564 		gtk_window_set_transient_for(gtkWindow, (parent is null) ? null : parent.getWindowStruct());
565 	}
566 	
567 	/**
568 	 * Marks window as attached to attach_widget. This creates a logical binding
569 	 * between the window and the widget it belongs to, which is used by GTK+ to
570 	 * propagate information such as styling or accessibility to window as if it
571 	 * was a children of attach_widget.
572 	 * Examples of places where specifying this relation is useful are for instance
573 	 * a GtkMenu created by a GtkComboBox, a completion popup window
574 	 * created by GtkEntry or a typeahead search entry created by GtkTreeView.
575 	 * Note that this function should not be confused with
576 	 * gtk_window_set_transient_for(), which specifies a window manager relation
577 	 * between two toplevels instead.
578 	 * Passing NULL for attach_widget detaches the window.
579 	 * Params:
580 	 * attachWidget = a GtkWidget, or NULL. [allow-none]
581 	 * Since 3.4
582 	 */
583 	public void setAttachedTo(Widget attachWidget)
584 	{
585 		// void gtk_window_set_attached_to (GtkWindow *window,  GtkWidget *attach_widget);
586 		gtk_window_set_attached_to(gtkWindow, (attachWidget is null) ? null : attachWidget.getWidgetStruct());
587 	}
588 	
589 	/**
590 	 * If setting is TRUE, then destroying the transient parent of window
591 	 * will also destroy window itself. This is useful for dialogs that
592 	 * shouldn't persist beyond the lifetime of the main window they're
593 	 * associated with, for example.
594 	 * Params:
595 	 * setting = whether to destroy window with its transient parent
596 	 */
597 	public void setDestroyWithParent(int setting)
598 	{
599 		// void gtk_window_set_destroy_with_parent (GtkWindow *window,  gboolean setting);
600 		gtk_window_set_destroy_with_parent(gtkWindow, setting);
601 	}
602 	
603 	/**
604 	 * If setting is TRUE, then window will request that it's titlebar
605 	 * should be hidden when maximized.
606 	 * This is useful for windows that don't convey any information other
607 	 * than the application name in the titlebar, to put the available
608 	 * screen space to better use. If the underlying window system does not
609 	 * support the request, the setting will not have any effect.
610 	 * Params:
611 	 * setting = whether to hide the titlebar when window is maximized
612 	 * Since 3.4
613 	 */
614 	public void setHideTitlebarWhenMaximized(int setting)
615 	{
616 		// void gtk_window_set_hide_titlebar_when_maximized  (GtkWindow *window,  gboolean setting);
617 		gtk_window_set_hide_titlebar_when_maximized(gtkWindow, setting);
618 	}
619 	
620 	/**
621 	 * Sets the GdkScreen where the window is displayed; if
622 	 * the window is already mapped, it will be unmapped, and
623 	 * then remapped on the new screen.
624 	 * Since 2.2
625 	 * Params:
626 	 * screen = a GdkScreen.
627 	 */
628 	public void setScreen(Screen screen)
629 	{
630 		// void gtk_window_set_screen (GtkWindow *window,  GdkScreen *screen);
631 		gtk_window_set_screen(gtkWindow, (screen is null) ? null : screen.getScreenStruct());
632 	}
633 	
634 	/**
635 	 * Returns the GdkScreen associated with window.
636 	 * Since 2.2
637 	 * Returns: a GdkScreen. [transfer none]
638 	 */
639 	public override Screen getScreen()
640 	{
641 		// GdkScreen * gtk_window_get_screen (GtkWindow *window);
642 		auto p = gtk_window_get_screen(gtkWindow);
643 		
644 		if(p is null)
645 		{
646 			return null;
647 		}
648 		
649 		return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p);
650 	}
651 	
652 	/**
653 	 * Returns whether the window is part of the current active toplevel.
654 	 * (That is, the toplevel window receiving keystrokes.)
655 	 * The return value is TRUE if the window is active toplevel
656 	 * itself, but also if it is, say, a GtkPlug embedded in the active toplevel.
657 	 * You might use this function if you wanted to draw a widget
658 	 * differently in an active window from a widget in an inactive window.
659 	 * See gtk_window_has_toplevel_focus()
660 	 * Since 2.4
661 	 * Returns: TRUE if the window part of the current active window.
662 	 */
663 	public int isActive()
664 	{
665 		// gboolean gtk_window_is_active (GtkWindow *window);
666 		return gtk_window_is_active(gtkWindow);
667 	}
668 	
669 	/**
670 	 * Returns whether the input focus is within this GtkWindow.
671 	 * For real toplevel windows, this is identical to gtk_window_is_active(),
672 	 * but for embedded windows, like GtkPlug, the results will differ.
673 	 * Since 2.4
674 	 * Returns: TRUE if the input focus is within this GtkWindow
675 	 */
676 	public int hasToplevelFocus()
677 	{
678 		// gboolean gtk_window_has_toplevel_focus (GtkWindow *window);
679 		return gtk_window_has_toplevel_focus(gtkWindow);
680 	}
681 	
682 	/**
683 	 * Returns a list of all existing toplevel windows. The widgets
684 	 * in the list are not individually referenced. If you want
685 	 * to iterate through the list and perform actions involving
686 	 * callbacks that might destroy the widgets, you must call
687 	 * g_list_foreach (result, (GFunc)g_object_ref, NULL) first, and
688 	 * then unref all the widgets afterwards.
689 	 * Returns: list of toplevel widgets. [element-type GtkWidget][transfer container]
690 	 */
691 	public static ListG listToplevels()
692 	{
693 		// GList * gtk_window_list_toplevels (void);
694 		auto p = gtk_window_list_toplevels();
695 		
696 		if(p is null)
697 		{
698 			return null;
699 		}
700 		
701 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
702 	}
703 	
704 	/**
705 	 * Adds a mnemonic to this window.
706 	 * Params:
707 	 * keyval = the mnemonic
708 	 * target = the widget that gets activated by the mnemonic
709 	 */
710 	public void addMnemonic(uint keyval, Widget target)
711 	{
712 		// void gtk_window_add_mnemonic (GtkWindow *window,  guint keyval,  GtkWidget *target);
713 		gtk_window_add_mnemonic(gtkWindow, keyval, (target is null) ? null : target.getWidgetStruct());
714 	}
715 	
716 	/**
717 	 * Removes a mnemonic from this window.
718 	 * Params:
719 	 * keyval = the mnemonic
720 	 * target = the widget that gets activated by the mnemonic
721 	 */
722 	public void removeMnemonic(uint keyval, Widget target)
723 	{
724 		// void gtk_window_remove_mnemonic (GtkWindow *window,  guint keyval,  GtkWidget *target);
725 		gtk_window_remove_mnemonic(gtkWindow, keyval, (target is null) ? null : target.getWidgetStruct());
726 	}
727 	
728 	/**
729 	 * Activates the targets associated with the mnemonic.
730 	 * Params:
731 	 * keyval = the mnemonic
732 	 * modifier = the modifiers
733 	 * Returns: TRUE if the activation is done.
734 	 */
735 	public int mnemonicActivate(uint keyval, GdkModifierType modifier)
736 	{
737 		// gboolean gtk_window_mnemonic_activate (GtkWindow *window,  guint keyval,  GdkModifierType modifier);
738 		return gtk_window_mnemonic_activate(gtkWindow, keyval, modifier);
739 	}
740 	
741 	/**
742 	 * Activates mnemonics and accelerators for this GtkWindow. This is normally
743 	 * called by the default ::key_press_event handler for toplevel windows,
744 	 * however in some cases it may be useful to call this directly when
745 	 * overriding the standard key handling for a toplevel window.
746 	 * Since 2.4
747 	 * Params:
748 	 * event = a GdkEventKey
749 	 * Returns: TRUE if a mnemonic or accelerator was found and activated.
750 	 */
751 	public int activateKey(GdkEventKey* event)
752 	{
753 		// gboolean gtk_window_activate_key (GtkWindow *window,  GdkEventKey *event);
754 		return gtk_window_activate_key(gtkWindow, event);
755 	}
756 	
757 	/**
758 	 * Propagate a key press or release event to the focus widget and
759 	 * up the focus container chain until a widget handles event.
760 	 * This is normally called by the default ::key_press_event and
761 	 * ::key_release_event handlers for toplevel windows,
762 	 * however in some cases it may be useful to call this directly when
763 	 * overriding the standard key handling for a toplevel window.
764 	 * Since 2.4
765 	 * Params:
766 	 * event = a GdkEventKey
767 	 * Returns: TRUE if a widget in the focus chain handled the event.
768 	 */
769 	public int propagateKeyEvent(GdkEventKey* event)
770 	{
771 		// gboolean gtk_window_propagate_key_event (GtkWindow *window,  GdkEventKey *event);
772 		return gtk_window_propagate_key_event(gtkWindow, event);
773 	}
774 	
775 	/**
776 	 * Retrieves the current focused widget within the window.
777 	 * Note that this is the widget that would have the focus
778 	 * if the toplevel window focused; if the toplevel window
779 	 * is not focused then gtk_widget_has_focus (widget) will
780 	 * not be TRUE for the widget.
781 	 * Returns: the currently focused widget, or NULL if there is none. [transfer none]
782 	 */
783 	public Widget getFocus()
784 	{
785 		// GtkWidget * gtk_window_get_focus (GtkWindow *window);
786 		auto p = gtk_window_get_focus(gtkWindow);
787 		
788 		if(p is null)
789 		{
790 			return null;
791 		}
792 		
793 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
794 	}
795 	
796 	/**
797 	 * If focus is not the current focus widget, and is focusable, sets
798 	 * it as the focus widget for the window. If focus is NULL, unsets
799 	 * the focus widget for this window. To set the focus to a particular
800 	 * widget in the toplevel, it is usually more convenient to use
801 	 * gtk_widget_grab_focus() instead of this function.
802 	 * Params:
803 	 * focus = widget to be the new focus widget, or NULL to unset
804 	 * any focus widget for the toplevel window. [allow-none]
805 	 */
806 	public void setFocus(Widget focus)
807 	{
808 		// void gtk_window_set_focus (GtkWindow *window,  GtkWidget *focus);
809 		gtk_window_set_focus(gtkWindow, (focus is null) ? null : focus.getWidgetStruct());
810 	}
811 	
812 	/**
813 	 * Returns the default widget for window. See gtk_window_set_default()
814 	 * for more details.
815 	 * Since 2.14
816 	 * Returns: the default widget, or NULL if there is none. [transfer none]
817 	 */
818 	public Widget getDefaultWidget()
819 	{
820 		// GtkWidget * gtk_window_get_default_widget (GtkWindow *window);
821 		auto p = gtk_window_get_default_widget(gtkWindow);
822 		
823 		if(p is null)
824 		{
825 			return null;
826 		}
827 		
828 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
829 	}
830 	
831 	/**
832 	 * The default widget is the widget that's activated when the user
833 	 * presses Enter in a dialog (for example). This function sets or
834 	 * unsets the default widget for a GtkWindow about. When setting
835 	 * (rather than unsetting) the default widget it's generally easier to
836 	 * call gtk_widget_grab_focus() on the widget. Before making a widget
837 	 * the default widget, you must call gtk_widget_set_can_default() on the
838 	 * widget you'd like to make the default.
839 	 * Params:
840 	 * defaultWidget = widget to be the default, or NULL to unset the
841 	 * default widget for the toplevel. [allow-none]
842 	 */
843 	public void setDefault(Widget defaultWidget)
844 	{
845 		// void gtk_window_set_default (GtkWindow *window,  GtkWidget *default_widget);
846 		gtk_window_set_default(gtkWindow, (defaultWidget is null) ? null : defaultWidget.getWidgetStruct());
847 	}
848 	
849 	/**
850 	 * Presents a window to the user. This may mean raising the window
851 	 * in the stacking order, deiconifying it, moving it to the current
852 	 * desktop, and/or giving it the keyboard focus, possibly dependent
853 	 * on the user's platform, window manager, and preferences.
854 	 * If window is hidden, this function calls gtk_widget_show()
855 	 * as well.
856 	 * This function should be used when the user tries to open a window
857 	 * that's already open. Say for example the preferences dialog is
858 	 * currently open, and the user chooses Preferences from the menu
859 	 * a second time; use gtk_window_present() to move the already-open dialog
860 	 * where the user can see it.
861 	 * If you are calling this function in response to a user interaction,
862 	 * it is preferable to use gtk_window_present_with_time().
863 	 */
864 	public void present()
865 	{
866 		// void gtk_window_present (GtkWindow *window);
867 		gtk_window_present(gtkWindow);
868 	}
869 	
870 	/**
871 	 * Presents a window to the user in response to a user interaction.
872 	 * If you need to present a window without a timestamp, use
873 	 * gtk_window_present(). See gtk_window_present() for details.
874 	 * Since 2.8
875 	 * Params:
876 	 * timestamp = the timestamp of the user interaction (typically a
877 	 * button or key press event) which triggered this call
878 	 */
879 	public void presentWithTime(uint timestamp)
880 	{
881 		// void gtk_window_present_with_time (GtkWindow *window,  guint32 timestamp);
882 		gtk_window_present_with_time(gtkWindow, timestamp);
883 	}
884 	
885 	/**
886 	 * Requests that the window is closed, similar to what happens
887 	 * when a window manager close button is clicked.
888 	 * This function can be used with close buttons in custom
889 	 * titlebars.
890 	 */
891 	public void close()
892 	{
893 		// void gtk_window_close (GtkWindow *window);
894 		gtk_window_close(gtkWindow);
895 	}
896 	
897 	/**
898 	 * Asks to iconify (i.e. minimize) the specified window. Note that
899 	 * you shouldn't assume the window is definitely iconified afterward,
900 	 * because other entities (e.g. the user or window manager) could deiconify it
901 	 * again, or there may not be a window manager in which case
902 	 * iconification isn't possible, etc. But normally the window will end
903 	 * up iconified. Just don't write code that crashes if not.
904 	 * It's permitted to call this function before showing a window,
905 	 * in which case the window will be iconified before it ever appears
906 	 * onscreen.
907 	 * You can track iconification via the "window-state-event" signal
908 	 * on GtkWidget.
909 	 */
910 	public void iconify()
911 	{
912 		// void gtk_window_iconify (GtkWindow *window);
913 		gtk_window_iconify(gtkWindow);
914 	}
915 	
916 	/**
917 	 * Asks to deiconify (i.e. unminimize) the specified window. Note
918 	 * that you shouldn't assume the window is definitely deiconified
919 	 * afterward, because other entities (e.g. the user or window manager) could iconify it
920 	 * again before your code which assumes deiconification gets to run.
921 	 * You can track iconification via the "window-state-event" signal
922 	 * on GtkWidget.
923 	 */
924 	public void deiconify()
925 	{
926 		// void gtk_window_deiconify (GtkWindow *window);
927 		gtk_window_deiconify(gtkWindow);
928 	}
929 	
930 	/**
931 	 * Asks to stick window, which means that it will appear on all user
932 	 * desktops. Note that you shouldn't assume the window is definitely
933 	 * stuck afterward, because other entities (e.g. the user or window manager) could unstick it
934 	 * again, and some window managers do not support sticking
935 	 * windows. But normally the window will end up stuck. Just don't
936 	 * write code that crashes if not.
937 	 * It's permitted to call this function before showing a window.
938 	 * You can track stickiness via the "window-state-event" signal
939 	 * on GtkWidget.
940 	 */
941 	public void stick()
942 	{
943 		// void gtk_window_stick (GtkWindow *window);
944 		gtk_window_stick(gtkWindow);
945 	}
946 	
947 	/**
948 	 * Asks to unstick window, which means that it will appear on only
949 	 * one of the user's desktops. Note that you shouldn't assume the
950 	 * window is definitely unstuck afterward, because other entities
951 	 * (e.g. the user or window
952 	 * manager) could stick it again. But normally the window will
953 	 * end up stuck. Just don't write code that crashes if not.
954 	 * You can track stickiness via the "window-state-event" signal
955 	 * on GtkWidget.
956 	 */
957 	public void unstick()
958 	{
959 		// void gtk_window_unstick (GtkWindow *window);
960 		gtk_window_unstick(gtkWindow);
961 	}
962 	
963 	/**
964 	 * Asks to maximize window, so that it becomes full-screen. Note that
965 	 * you shouldn't assume the window is definitely maximized afterward,
966 	 * because other entities (e.g. the user or window manager) could unmaximize it
967 	 * again, and not all window managers support maximization. But
968 	 * normally the window will end up maximized. Just don't write code
969 	 * that crashes if not.
970 	 * It's permitted to call this function before showing a window,
971 	 * in which case the window will be maximized when it appears onscreen
972 	 * initially.
973 	 * You can track maximization via the "window-state-event" signal
974 	 * on GtkWidget.
975 	 */
976 	public void maximize()
977 	{
978 		// void gtk_window_maximize (GtkWindow *window);
979 		gtk_window_maximize(gtkWindow);
980 	}
981 	
982 	/**
983 	 * Asks to unmaximize window. Note that you shouldn't assume the
984 	 * window is definitely unmaximized afterward, because other entities
985 	 * (e.g. the user or window
986 	 * manager) could maximize it again, and not all window
987 	 * managers honor requests to unmaximize. But normally the window will
988 	 * end up unmaximized. Just don't write code that crashes if not.
989 	 * You can track maximization via the "window-state-event" signal
990 	 * on GtkWidget.
991 	 */
992 	public void unmaximize()
993 	{
994 		// void gtk_window_unmaximize (GtkWindow *window);
995 		gtk_window_unmaximize(gtkWindow);
996 	}
997 	
998 	/**
999 	 * Asks to place window in the fullscreen state. Note that you
1000 	 * shouldn't assume the window is definitely full screen afterward,
1001 	 * because other entities (e.g. the user or window manager) could unfullscreen it
1002 	 * again, and not all window managers honor requests to fullscreen
1003 	 * windows. But normally the window will end up fullscreen. Just
1004 	 * don't write code that crashes if not.
1005 	 * You can track the fullscreen state via the "window-state-event" signal
1006 	 * on GtkWidget.
1007 	 * Since 2.2
1008 	 */
1009 	public void fullscreen()
1010 	{
1011 		// void gtk_window_fullscreen (GtkWindow *window);
1012 		gtk_window_fullscreen(gtkWindow);
1013 	}
1014 	
1015 	/**
1016 	 * Asks to toggle off the fullscreen state for window. Note that you
1017 	 * shouldn't assume the window is definitely not full screen
1018 	 * afterward, because other entities (e.g. the user or window manager) could fullscreen it
1019 	 * again, and not all window managers honor requests to unfullscreen
1020 	 * windows. But normally the window will end up restored to its normal
1021 	 * state. Just don't write code that crashes if not.
1022 	 * You can track the fullscreen state via the "window-state-event" signal
1023 	 * on GtkWidget.
1024 	 * Since 2.2
1025 	 */
1026 	public void unfullscreen()
1027 	{
1028 		// void gtk_window_unfullscreen (GtkWindow *window);
1029 		gtk_window_unfullscreen(gtkWindow);
1030 	}
1031 	
1032 	/**
1033 	 * Asks to keep window above, so that it stays on top. Note that
1034 	 * you shouldn't assume the window is definitely above afterward,
1035 	 * because other entities (e.g. the user or window manager) could not keep it above,
1036 	 * and not all window managers support keeping windows above. But
1037 	 * normally the window will end kept above. Just don't write code
1038 	 * that crashes if not.
1039 	 * It's permitted to call this function before showing a window,
1040 	 * in which case the window will be kept above when it appears onscreen
1041 	 * initially.
1042 	 * You can track the above state via the "window-state-event" signal
1043 	 * on GtkWidget.
1044 	 * Note that, according to the Extended Window
1045 	 * Manager Hints specification, the above state is mainly meant
1046 	 * for user preferences and should not be used by applications e.g. for
1047 	 * drawing attention to their dialogs.
1048 	 * Since 2.4
1049 	 * Params:
1050 	 * setting = whether to keep window above other windows
1051 	 */
1052 	public void setKeepAbove(int setting)
1053 	{
1054 		// void gtk_window_set_keep_above (GtkWindow *window,  gboolean setting);
1055 		gtk_window_set_keep_above(gtkWindow, setting);
1056 	}
1057 	
1058 	/**
1059 	 * Asks to keep window below, so that it stays in bottom. Note that
1060 	 * you shouldn't assume the window is definitely below afterward,
1061 	 * because other entities (e.g. the user or window manager) could not keep it below,
1062 	 * and not all window managers support putting windows below. But
1063 	 * normally the window will be kept below. Just don't write code
1064 	 * that crashes if not.
1065 	 * It's permitted to call this function before showing a window,
1066 	 * in which case the window will be kept below when it appears onscreen
1067 	 * initially.
1068 	 * You can track the below state via the "window-state-event" signal
1069 	 * on GtkWidget.
1070 	 * Note that, according to the Extended Window
1071 	 * Manager Hints specification, the above state is mainly meant
1072 	 * for user preferences and should not be used by applications e.g. for
1073 	 * drawing attention to their dialogs.
1074 	 * Since 2.4
1075 	 * Params:
1076 	 * setting = whether to keep window below other windows
1077 	 */
1078 	public void setKeepBelow(int setting)
1079 	{
1080 		// void gtk_window_set_keep_below (GtkWindow *window,  gboolean setting);
1081 		gtk_window_set_keep_below(gtkWindow, setting);
1082 	}
1083 	
1084 	/**
1085 	 * Starts resizing a window. This function is used if an application
1086 	 * has window resizing controls. When GDK can support it, the resize
1087 	 * will be done using the standard mechanism for the window manager or windowing
1088 	 * system. Otherwise, GDK will try to emulate window resizing,
1089 	 * potentially not all that well, depending on the windowing system.
1090 	 * Params:
1091 	 * button = mouse button that initiated the drag
1092 	 * edge = position of the resize control
1093 	 * rootX = X position where the user clicked to initiate the drag, in root window coordinates
1094 	 * rootY = Y position where the user clicked to initiate the drag
1095 	 * timestamp = timestamp from the click event that initiated the drag
1096 	 */
1097 	public void beginResizeDrag(GdkWindowEdge edge, int button, int rootX, int rootY, uint timestamp)
1098 	{
1099 		// void gtk_window_begin_resize_drag (GtkWindow *window,  GdkWindowEdge edge,  gint button,  gint root_x,  gint root_y,  guint32 timestamp);
1100 		gtk_window_begin_resize_drag(gtkWindow, edge, button, rootX, rootY, timestamp);
1101 	}
1102 	
1103 	/**
1104 	 * Starts moving a window. This function is used if an application has
1105 	 * window movement grips. When GDK can support it, the window movement
1106 	 * will be done using the standard mechanism for the window manager or windowing
1107 	 * system. Otherwise, GDK will try to emulate window movement,
1108 	 * potentially not all that well, depending on the windowing system.
1109 	 * Params:
1110 	 * button = mouse button that initiated the drag
1111 	 * rootX = X position where the user clicked to initiate the drag, in root window coordinates
1112 	 * rootY = Y position where the user clicked to initiate the drag
1113 	 * timestamp = timestamp from the click event that initiated the drag
1114 	 */
1115 	public void beginMoveDrag(int button, int rootX, int rootY, uint timestamp)
1116 	{
1117 		// void gtk_window_begin_move_drag (GtkWindow *window,  gint button,  gint root_x,  gint root_y,  guint32 timestamp);
1118 		gtk_window_begin_move_drag(gtkWindow, button, rootX, rootY, timestamp);
1119 	}
1120 	
1121 	/**
1122 	 * By default, windows are decorated with a title bar, resize
1123 	 * controls, etc. Some window
1124 	 * managers allow GTK+ to disable these decorations, creating a
1125 	 * borderless window. If you set the decorated property to FALSE
1126 	 * using this function, GTK+ will do its best to convince the window
1127 	 * manager not to decorate the window. Depending on the system, this
1128 	 * function may not have any effect when called on a window that is
1129 	 * already visible, so you should call it before calling gtk_widget_show().
1130 	 * On Windows, this function always works, since there's no window manager
1131 	 * policy involved.
1132 	 * Params:
1133 	 * setting = TRUE to decorate the window
1134 	 */
1135 	public void setDecorated(int setting)
1136 	{
1137 		// void gtk_window_set_decorated (GtkWindow *window,  gboolean setting);
1138 		gtk_window_set_decorated(gtkWindow, setting);
1139 	}
1140 	
1141 	/**
1142 	 * By default, windows have a close button in the window frame. Some
1143 	 * window managers allow GTK+ to
1144 	 * disable this button. If you set the deletable property to FALSE
1145 	 * using this function, GTK+ will do its best to convince the window
1146 	 * manager not to show a close button. Depending on the system, this
1147 	 * function may not have any effect when called on a window that is
1148 	 * already visible, so you should call it before calling gtk_widget_show().
1149 	 * On Windows, this function always works, since there's no window manager
1150 	 * policy involved.
1151 	 * Since 2.10
1152 	 * Params:
1153 	 * setting = TRUE to decorate the window as deletable
1154 	 */
1155 	public void setDeletable(int setting)
1156 	{
1157 		// void gtk_window_set_deletable (GtkWindow *window,  gboolean setting);
1158 		gtk_window_set_deletable(gtkWindow, setting);
1159 	}
1160 	
1161 	/**
1162 	 * Sets the mnemonic modifier for this window.
1163 	 * Params:
1164 	 * modifier = the modifier mask used to activate
1165 	 * mnemonics on this window.
1166 	 */
1167 	public void setMnemonicModifier(GdkModifierType modifier)
1168 	{
1169 		// void gtk_window_set_mnemonic_modifier (GtkWindow *window,  GdkModifierType modifier);
1170 		gtk_window_set_mnemonic_modifier(gtkWindow, modifier);
1171 	}
1172 	
1173 	/**
1174 	 * By setting the type hint for the window, you allow the window
1175 	 * manager to decorate and handle the window in a way which is
1176 	 * suitable to the function of the window in your application.
1177 	 * This function should be called before the window becomes visible.
1178 	 * gtk_dialog_new_with_buttons() and other convenience functions in GTK+
1179 	 * will sometimes call gtk_window_set_type_hint() on your behalf.
1180 	 * Params:
1181 	 * hint = the window type
1182 	 */
1183 	public void setTypeHint(GdkWindowTypeHint hint)
1184 	{
1185 		// void gtk_window_set_type_hint (GtkWindow *window,  GdkWindowTypeHint hint);
1186 		gtk_window_set_type_hint(gtkWindow, hint);
1187 	}
1188 	
1189 	/**
1190 	 * Windows may set a hint asking the desktop environment not to display
1191 	 * the window in the task bar. This function sets this hint.
1192 	 * Since 2.2
1193 	 * Params:
1194 	 * setting = TRUE to keep this window from appearing in the task bar
1195 	 */
1196 	public void setSkipTaskbarHint(int setting)
1197 	{
1198 		// void gtk_window_set_skip_taskbar_hint (GtkWindow *window,  gboolean setting);
1199 		gtk_window_set_skip_taskbar_hint(gtkWindow, setting);
1200 	}
1201 	
1202 	/**
1203 	 * Windows may set a hint asking the desktop environment not to display
1204 	 * the window in the pager. This function sets this hint.
1205 	 * (A "pager" is any desktop navigation tool such as a workspace
1206 	 * switcher that displays a thumbnail representation of the windows
1207 	 * on the screen.)
1208 	 * Since 2.2
1209 	 * Params:
1210 	 * setting = TRUE to keep this window from appearing in the pager
1211 	 */
1212 	public void setSkipPagerHint(int setting)
1213 	{
1214 		// void gtk_window_set_skip_pager_hint (GtkWindow *window,  gboolean setting);
1215 		gtk_window_set_skip_pager_hint(gtkWindow, setting);
1216 	}
1217 	
1218 	/**
1219 	 * Windows may set a hint asking the desktop environment to draw
1220 	 * the users attention to the window. This function sets this hint.
1221 	 * Since 2.8
1222 	 * Params:
1223 	 * setting = TRUE to mark this window as urgent
1224 	 */
1225 	public void setUrgencyHint(int setting)
1226 	{
1227 		// void gtk_window_set_urgency_hint (GtkWindow *window,  gboolean setting);
1228 		gtk_window_set_urgency_hint(gtkWindow, setting);
1229 	}
1230 	
1231 	/**
1232 	 * Windows may set a hint asking the desktop environment not to receive
1233 	 * the input focus. This function sets this hint.
1234 	 * Since 2.4
1235 	 * Params:
1236 	 * setting = TRUE to let this window receive input focus
1237 	 */
1238 	public void setAcceptFocus(int setting)
1239 	{
1240 		// void gtk_window_set_accept_focus (GtkWindow *window,  gboolean setting);
1241 		gtk_window_set_accept_focus(gtkWindow, setting);
1242 	}
1243 	
1244 	/**
1245 	 * Windows may set a hint asking the desktop environment not to receive
1246 	 * the input focus when the window is mapped. This function sets this
1247 	 * hint.
1248 	 * Since 2.6
1249 	 * Params:
1250 	 * setting = TRUE to let this window receive input focus on map
1251 	 */
1252 	public void setFocusOnMap(int setting)
1253 	{
1254 		// void gtk_window_set_focus_on_map (GtkWindow *window,  gboolean setting);
1255 		gtk_window_set_focus_on_map(gtkWindow, setting);
1256 	}
1257 	
1258 	/**
1259 	 * Startup notification identifiers are used by desktop environment to
1260 	 * track application startup, to provide user feedback and other
1261 	 * features. This function changes the corresponding property on the
1262 	 * underlying GdkWindow. Normally, startup identifier is managed
1263 	 * automatically and you should only use this function in special cases
1264 	 * like transferring focus from other processes. You should use this
1265 	 * function before calling gtk_window_present() or any equivalent
1266 	 * function generating a window map event.
1267 	 * This function is only useful on X11, not with other GTK+ targets.
1268 	 * Since 2.12
1269 	 * Params:
1270 	 * startupId = a string with startup-notification identifier
1271 	 */
1272 	public void setStartupId(string startupId)
1273 	{
1274 		// void gtk_window_set_startup_id (GtkWindow *window,  const gchar *startup_id);
1275 		gtk_window_set_startup_id(gtkWindow, Str.toStringz(startupId));
1276 	}
1277 	
1278 	/**
1279 	 * This function is only useful on X11, not with other GTK+ targets.
1280 	 * In combination with the window title, the window role allows a
1281 	 * window manager to identify "the
1282 	 * same" window when an application is restarted. So for example you
1283 	 * might set the "toolbox" role on your app's toolbox window, so that
1284 	 * when the user restarts their session, the window manager can put
1285 	 * the toolbox back in the same place.
1286 	 * If a window already has a unique title, you don't need to set the
1287 	 * role, since the WM can use the title to identify the window when
1288 	 * restoring the session.
1289 	 * Params:
1290 	 * role = unique identifier for the window to be used when restoring a session
1291 	 */
1292 	public void setRole(string role)
1293 	{
1294 		// void gtk_window_set_role (GtkWindow *window,  const gchar *role);
1295 		gtk_window_set_role(gtkWindow, Str.toStringz(role));
1296 	}
1297 	
1298 	/**
1299 	 * Returns whether the window has been set to have decorations
1300 	 * such as a title bar via gtk_window_set_decorated().
1301 	 * Returns: TRUE if the window has been set to have decorations
1302 	 */
1303 	public int getDecorated()
1304 	{
1305 		// gboolean gtk_window_get_decorated (GtkWindow *window);
1306 		return gtk_window_get_decorated(gtkWindow);
1307 	}
1308 	
1309 	/**
1310 	 * Returns whether the window has been set to have a close button
1311 	 * via gtk_window_set_deletable().
1312 	 * Since 2.10
1313 	 * Returns: TRUE if the window has been set to have a close button
1314 	 */
1315 	public int getDeletable()
1316 	{
1317 		// gboolean gtk_window_get_deletable (GtkWindow *window);
1318 		return gtk_window_get_deletable(gtkWindow);
1319 	}
1320 	
1321 	/**
1322 	 * Gets the value set by gtk_window_set_default_icon_list().
1323 	 * The list is a copy and should be freed with g_list_free(),
1324 	 * but the pixbufs in the list have not had their reference count
1325 	 * incremented.
1326 	 * Returns: copy of default icon list. [element-type GdkPixbuf][transfer container]
1327 	 */
1328 	public static ListG getDefaultIconList()
1329 	{
1330 		// GList * gtk_window_get_default_icon_list (void);
1331 		auto p = gtk_window_get_default_icon_list();
1332 		
1333 		if(p is null)
1334 		{
1335 			return null;
1336 		}
1337 		
1338 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
1339 	}
1340 	
1341 	/**
1342 	 * Returns the fallback icon name for windows that has been set
1343 	 * with gtk_window_set_default_icon_name(). The returned
1344 	 * string is owned by GTK+ and should not be modified. It
1345 	 * is only valid until the next call to
1346 	 * gtk_window_set_default_icon_name().
1347 	 * Since 2.16
1348 	 * Returns: the fallback icon name for windows
1349 	 */
1350 	public static string getDefaultIconName()
1351 	{
1352 		// const gchar * gtk_window_get_default_icon_name (void);
1353 		return Str.toString(gtk_window_get_default_icon_name());
1354 	}
1355 	
1356 	/**
1357 	 * Gets the default size of the window. A value of -1 for the width or
1358 	 * height indicates that a default size has not been explicitly set
1359 	 * for that dimension, so the "natural" size of the window will be
1360 	 * used.
1361 	 * Params:
1362 	 * width = location to store the default width, or NULL. [out][allow-none]
1363 	 * height = location to store the default height, or NULL. [out][allow-none]
1364 	 */
1365 	public void getDefaultSize(out int width, out int height)
1366 	{
1367 		// void gtk_window_get_default_size (GtkWindow *window,  gint *width,  gint *height);
1368 		gtk_window_get_default_size(gtkWindow, &width, &height);
1369 	}
1370 	
1371 	/**
1372 	 * Returns whether the window will be destroyed with its transient parent. See
1373 	 * gtk_window_set_destroy_with_parent().
1374 	 * Returns: TRUE if the window will be destroyed with its transient parent.
1375 	 */
1376 	public int getDestroyWithParent()
1377 	{
1378 		// gboolean gtk_window_get_destroy_with_parent (GtkWindow *window);
1379 		return gtk_window_get_destroy_with_parent(gtkWindow);
1380 	}
1381 	
1382 	/**
1383 	 * Returns whether the window has requested to have its titlebar hidden
1384 	 * when maximized. See gtk_window_set_hide_titlebar_when_maximized().
1385 	 * Returns: TRUE if the window has requested to have its titlebar hidden when maximized Since 3.4
1386 	 */
1387 	public int getHideTitlebarWhenMaximized()
1388 	{
1389 		// gboolean gtk_window_get_hide_titlebar_when_maximized  (GtkWindow *window);
1390 		return gtk_window_get_hide_titlebar_when_maximized(gtkWindow);
1391 	}
1392 	
1393 	/**
1394 	 * Gets the value set by gtk_window_set_icon() (or if you've
1395 	 * called gtk_window_set_icon_list(), gets the first icon in
1396 	 * the icon list).
1397 	 * Returns: icon for window. [transfer none]
1398 	 */
1399 	public Pixbuf getIcon()
1400 	{
1401 		// GdkPixbuf * gtk_window_get_icon (GtkWindow *window);
1402 		auto p = gtk_window_get_icon(gtkWindow);
1403 		
1404 		if(p is null)
1405 		{
1406 			return null;
1407 		}
1408 		
1409 		return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p);
1410 	}
1411 	
1412 	/**
1413 	 * Retrieves the list of icons set by gtk_window_set_icon_list().
1414 	 * The list is copied, but the reference count on each
1415 	 * member won't be incremented.
1416 	 * Returns: copy of window's icon list. [element-type GdkPixbuf][transfer container]
1417 	 */
1418 	public ListG getIconList()
1419 	{
1420 		// GList * gtk_window_get_icon_list (GtkWindow *window);
1421 		auto p = gtk_window_get_icon_list(gtkWindow);
1422 		
1423 		if(p is null)
1424 		{
1425 			return null;
1426 		}
1427 		
1428 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
1429 	}
1430 	
1431 	/**
1432 	 * Returns the name of the themed icon for the window,
1433 	 * see gtk_window_set_icon_name().
1434 	 * Since 2.6
1435 	 * Returns: the icon name or NULL if the window has no themed icon
1436 	 */
1437 	public string getIconName()
1438 	{
1439 		// const gchar * gtk_window_get_icon_name (GtkWindow *window);
1440 		return Str.toString(gtk_window_get_icon_name(gtkWindow));
1441 	}
1442 	
1443 	/**
1444 	 * Returns the mnemonic modifier for this window. See
1445 	 * gtk_window_set_mnemonic_modifier().
1446 	 * Returns: the modifier mask used to activate mnemonics on this window.
1447 	 */
1448 	public GdkModifierType getMnemonicModifier()
1449 	{
1450 		// GdkModifierType gtk_window_get_mnemonic_modifier (GtkWindow *window);
1451 		return gtk_window_get_mnemonic_modifier(gtkWindow);
1452 	}
1453 	
1454 	/**
1455 	 * Returns whether the window is modal. See gtk_window_set_modal().
1456 	 * Returns: TRUE if the window is set to be modal and establishes a grab when shown
1457 	 */
1458 	public int getModal()
1459 	{
1460 		// gboolean gtk_window_get_modal (GtkWindow *window);
1461 		return gtk_window_get_modal(gtkWindow);
1462 	}
1463 	
1464 	/**
1465 	 * This function returns the position you need to pass to
1466 	 * gtk_window_move() to keep window in its current position.
1467 	 * This means that the meaning of the returned value varies with
1468 	 * window gravity. See gtk_window_move() for more details.
1469 	 * If you haven't changed the window gravity, its gravity will be
1470 	 * GDK_GRAVITY_NORTH_WEST. This means that gtk_window_get_position()
1471 	 * gets the position of the top-left corner of the window manager
1472 	 * frame for the window. gtk_window_move() sets the position of this
1473 	 * same top-left corner.
1474 	 * gtk_window_get_position() is not 100% reliable because the X Window System
1475 	 * does not specify a way to obtain the geometry of the
1476 	 * decorations placed on a window by the window manager.
1477 	 * Thus GTK+ is using a "best guess" that works with most
1478 	 * window managers.
1479 	 * Moreover, nearly all window managers are historically broken with
1480 	 * respect to their handling of window gravity. So moving a window to
1481 	 * its current position as returned by gtk_window_get_position() tends
1482 	 * to result in moving the window slightly. Window managers are
1483 	 * slowly getting better over time.
1484 	 * If a window has gravity GDK_GRAVITY_STATIC the window manager
1485 	 * frame is not relevant, and thus gtk_window_get_position() will
1486 	 * always produce accurate results. However you can't use static
1487 	 * gravity to do things like place a window in a corner of the screen,
1488 	 * because static gravity ignores the window manager decorations.
1489 	 * If you are saving and restoring your application's window
1490 	 * positions, you should know that it's impossible for applications to
1491 	 * do this without getting it somewhat wrong because applications do
1492 	 * not have sufficient knowledge of window manager state. The Correct
1493 	 * Mechanism is to support the session management protocol (see the
1494 	 * "GnomeClient" object in the GNOME libraries for example) and allow
1495 	 * the window manager to save your window sizes and positions.
1496 	 * Params:
1497 	 * rootX = return location for X coordinate of
1498 	 * gravity-determined reference point, or NULL. [out][allow-none]
1499 	 * rootY = return location for Y coordinate of
1500 	 * gravity-determined reference point, or NULL. [out][allow-none]
1501 	 */
1502 	public void getPosition(out int rootX, out int rootY)
1503 	{
1504 		// void gtk_window_get_position (GtkWindow *window,  gint *root_x,  gint *root_y);
1505 		gtk_window_get_position(gtkWindow, &rootX, &rootY);
1506 	}
1507 	
1508 	/**
1509 	 * Returns the role of the window. See gtk_window_set_role() for
1510 	 * further explanation.
1511 	 * Returns: the role of the window if set, or NULL. The returned is owned by the widget and must not be modified or freed.
1512 	 */
1513 	public string getRole()
1514 	{
1515 		// const gchar * gtk_window_get_role (GtkWindow *window);
1516 		return Str.toString(gtk_window_get_role(gtkWindow));
1517 	}
1518 	
1519 	/**
1520 	 * Obtains the current size of window. If window is not onscreen,
1521 	 * it returns the size GTK+ will suggest to the window manager for the initial window
1522 	 * size (but this is not reliably the same as the size the window
1523 	 * manager will actually select). The size obtained by
1524 	 * gtk_window_get_size() is the last size received in a
1525 	 * GdkEventConfigure, that is, GTK+ uses its locally-stored size,
1526 	 * rather than querying the X server for the size. As a result, if you
1527 	 * call gtk_window_resize() then immediately call
1528 	 * gtk_window_get_size(), the size won't have taken effect yet. After
1529 	 * the window manager processes the resize request, GTK+ receives
1530 	 * notification that the size has changed via a configure event, and
1531 	 * the size of the window gets updated.
1532 	 * Note 1: Nearly any use of this function creates a race condition,
1533 	 * because the size of the window may change between the time that you
1534 	 * get the size and the time that you perform some action assuming
1535 	 * that size is the current size. To avoid race conditions, connect to
1536 	 * "configure-event" on the window and adjust your size-dependent
1537 	 * state to match the size delivered in the GdkEventConfigure.
1538 	 * Note 2: The returned size does not include the
1539 	 * size of the window manager decorations (aka the window frame or
1540 	 * border). Those are not drawn by GTK+ and GTK+ has no reliable
1541 	 * method of determining their size.
1542 	 * Note 3: If you are getting a window size in order to position
1543 	 * the window onscreen, there may be a better way. The preferred
1544 	 * way is to simply set the window's semantic type with
1545 	 * gtk_window_set_type_hint(), which allows the window manager to
1546 	 * e.g. center dialogs. Also, if you set the transient parent of
1547 	 * dialogs with gtk_window_set_transient_for() window managers
1548 	 * will often center the dialog over its parent window. It's
1549 	 * much preferred to let the window manager handle these
1550 	 * things rather than doing it yourself, because all apps will
1551 	 * behave consistently and according to user prefs if the window
1552 	 * manager handles it. Also, the window manager can take the size
1553 	 * of the window decorations/border into account, while your
1554 	 * application cannot.
1555 	 * In any case, if you insist on application-specified window
1556 	 * positioning, there's still a better way than
1557 	 * doing it yourself - gtk_window_set_position() will frequently
1558 	 * handle the details for you.
1559 	 * Params:
1560 	 * width = return location for width, or NULL. [out][allow-none]
1561 	 * height = return location for height, or NULL. [out][allow-none]
1562 	 */
1563 	public void getSize(out int width, out int height)
1564 	{
1565 		// void gtk_window_get_size (GtkWindow *window,  gint *width,  gint *height);
1566 		gtk_window_get_size(gtkWindow, &width, &height);
1567 	}
1568 	
1569 	/**
1570 	 * Retrieves the title of the window. See gtk_window_set_title().
1571 	 * Returns: the title of the window, or NULL if none has been set explicitely. The returned string is owned by the widget and must not be modified or freed.
1572 	 */
1573 	public string getTitle()
1574 	{
1575 		// const gchar * gtk_window_get_title (GtkWindow *window);
1576 		return Str.toString(gtk_window_get_title(gtkWindow));
1577 	}
1578 	
1579 	/**
1580 	 * Fetches the transient parent for this window. See
1581 	 * gtk_window_set_transient_for().
1582 	 * Returns: the transient parent for this window, or NULL if no transient parent has been set. [transfer none]
1583 	 */
1584 	public Window getTransientFor()
1585 	{
1586 		// GtkWindow * gtk_window_get_transient_for (GtkWindow *window);
1587 		auto p = gtk_window_get_transient_for(gtkWindow);
1588 		
1589 		if(p is null)
1590 		{
1591 			return null;
1592 		}
1593 		
1594 		return ObjectG.getDObject!(Window)(cast(GtkWindow*) p);
1595 	}
1596 	
1597 	/**
1598 	 * Fetches the attach widget for this window. See
1599 	 * gtk_window_set_attached_to().
1600 	 * Returns: the widget where the window is attached, or NULL if the window is not attached to any widget. [transfer none] Since 3.4
1601 	 */
1602 	public Widget getAttachedTo()
1603 	{
1604 		// GtkWidget * gtk_window_get_attached_to (GtkWindow *window);
1605 		auto p = gtk_window_get_attached_to(gtkWindow);
1606 		
1607 		if(p is null)
1608 		{
1609 			return null;
1610 		}
1611 		
1612 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
1613 	}
1614 	
1615 	/**
1616 	 * Gets the type hint for this window. See gtk_window_set_type_hint().
1617 	 * Returns: the type hint for window.
1618 	 */
1619 	public GdkWindowTypeHint getTypeHint()
1620 	{
1621 		// GdkWindowTypeHint gtk_window_get_type_hint (GtkWindow *window);
1622 		return gtk_window_get_type_hint(gtkWindow);
1623 	}
1624 	
1625 	/**
1626 	 * Gets the value set by gtk_window_set_skip_taskbar_hint()
1627 	 * Since 2.2
1628 	 * Returns: TRUE if window shouldn't be in taskbar
1629 	 */
1630 	public int getSkipTaskbarHint()
1631 	{
1632 		// gboolean gtk_window_get_skip_taskbar_hint (GtkWindow *window);
1633 		return gtk_window_get_skip_taskbar_hint(gtkWindow);
1634 	}
1635 	
1636 	/**
1637 	 * Gets the value set by gtk_window_set_skip_pager_hint().
1638 	 * Since 2.2
1639 	 * Returns: TRUE if window shouldn't be in pager
1640 	 */
1641 	public int getSkipPagerHint()
1642 	{
1643 		// gboolean gtk_window_get_skip_pager_hint (GtkWindow *window);
1644 		return gtk_window_get_skip_pager_hint(gtkWindow);
1645 	}
1646 	
1647 	/**
1648 	 * Gets the value set by gtk_window_set_urgency_hint()
1649 	 * Since 2.8
1650 	 * Returns: TRUE if window is urgent
1651 	 */
1652 	public int getUrgencyHint()
1653 	{
1654 		// gboolean gtk_window_get_urgency_hint (GtkWindow *window);
1655 		return gtk_window_get_urgency_hint(gtkWindow);
1656 	}
1657 	
1658 	/**
1659 	 * Gets the value set by gtk_window_set_accept_focus().
1660 	 * Since 2.4
1661 	 * Returns: TRUE if window should receive the input focus
1662 	 */
1663 	public int getAcceptFocus()
1664 	{
1665 		// gboolean gtk_window_get_accept_focus (GtkWindow *window);
1666 		return gtk_window_get_accept_focus(gtkWindow);
1667 	}
1668 	
1669 	/**
1670 	 * Gets the value set by gtk_window_set_focus_on_map().
1671 	 * Since 2.6
1672 	 * Returns: TRUE if window should receive the input focus when mapped.
1673 	 */
1674 	public int getFocusOnMap()
1675 	{
1676 		// gboolean gtk_window_get_focus_on_map (GtkWindow *window);
1677 		return gtk_window_get_focus_on_map(gtkWindow);
1678 	}
1679 	
1680 	/**
1681 	 * Returns the group for window or the default group, if
1682 	 * window is NULL or if window does not have an explicit
1683 	 * window group.
1684 	 * Since 2.10
1685 	 * Returns: the GtkWindowGroup for a window or the default group. [transfer none]
1686 	 */
1687 	public WindowGroup getGroup()
1688 	{
1689 		// GtkWindowGroup * gtk_window_get_group (GtkWindow *window);
1690 		auto p = gtk_window_get_group(gtkWindow);
1691 		
1692 		if(p is null)
1693 		{
1694 			return null;
1695 		}
1696 		
1697 		return ObjectG.getDObject!(WindowGroup)(cast(GtkWindowGroup*) p);
1698 	}
1699 	
1700 	/**
1701 	 * Returns whether window has an explicit window group.
1702 	 * Since 2.22
1703 	 * Returns: TRUE if window has an explicit window group.
1704 	 */
1705 	public int hasGroup()
1706 	{
1707 		// gboolean gtk_window_has_group (GtkWindow *window);
1708 		return gtk_window_has_group(gtkWindow);
1709 	}
1710 	
1711 	/**
1712 	 * Gets the type of the window. See GtkWindowType.
1713 	 * Since 2.20
1714 	 * Returns: the type of the window
1715 	 */
1716 	public GtkWindowType getWindowType()
1717 	{
1718 		// GtkWindowType gtk_window_get_window_type (GtkWindow *window);
1719 		return gtk_window_get_window_type(gtkWindow);
1720 	}
1721 	
1722 	/**
1723 	 * Asks the window manager to move
1724 	 * window to the given position. Window managers are free to ignore
1725 	 * this; most window managers ignore requests for initial window
1726 	 * positions (instead using a user-defined placement algorithm) and
1727 	 * honor requests after the window has already been shown.
1728 	 * Note: the position is the position of the gravity-determined
1729 	 * Params:
1730 	 * x = X coordinate to move window to
1731 	 * y = Y coordinate to move window to
1732 	 */
1733 	public void move(int x, int y)
1734 	{
1735 		// void gtk_window_move (GtkWindow *window,  gint x,  gint y);
1736 		gtk_window_move(gtkWindow, x, y);
1737 	}
1738 	
1739 	/**
1740 	 * Parses a standard X Window System geometry string - see the
1741 	 * manual page for X (type 'man X') for details on this.
1742 	 * gtk_window_parse_geometry() does work on all GTK+ ports
1743 	 * including Win32 but is primarily intended for an X environment.
1744 	 * If either a size or a position can be extracted from the
1745 	 * geometry string, gtk_window_parse_geometry() returns TRUE
1746 	 * and calls gtk_window_set_default_size() and/or gtk_window_move()
1747 	 * to resize/move the window.
1748 	 * If gtk_window_parse_geometry() returns TRUE, it will also
1749 	 * set the GDK_HINT_USER_POS and/or GDK_HINT_USER_SIZE hints
1750 	 * indicating to the window manager that the size/position of
1751 	 * the window was user-specified. This causes most window
1752 	 * managers to honor the geometry.
1753 	 * Note that for gtk_window_parse_geometry() to work as expected, it has
1754 	 * to be called when the window has its "final" size, i.e. after calling
1755 	 * gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints()
1756 	 * on the window.
1757 	 * $(DDOC_COMMENT example)
1758 	 * Params:
1759 	 * geometry = geometry string
1760 	 * Returns: TRUE if string was parsed successfully
1761 	 */
1762 	public int parseGeometry(string geometry)
1763 	{
1764 		// gboolean gtk_window_parse_geometry (GtkWindow *window,  const gchar *geometry);
1765 		return gtk_window_parse_geometry(gtkWindow, Str.toStringz(geometry));
1766 	}
1767 	
1768 	/**
1769 	 * Warning
1770 	 * gtk_window_reshow_with_initial_size has been deprecated since version 3.10 and should not be used in newly-written code. GUI builders can call gtk_widget_hide(),
1771 	 *  gtk_widget_unrealize() and then gtk_widget_show() on window
1772 	 *  themselves, if they still need this functionality.
1773 	 * Hides window, then reshows it, resetting the
1774 	 * default size and position of the window. Used
1775 	 * by GUI builders only.
1776 	 */
1777 	public void reshowWithInitialSize()
1778 	{
1779 		// void gtk_window_reshow_with_initial_size (GtkWindow *window);
1780 		gtk_window_reshow_with_initial_size(gtkWindow);
1781 	}
1782 	
1783 	/**
1784 	 * Resizes the window as if the user had done so, obeying geometry
1785 	 * constraints. The default geometry constraint is that windows may
1786 	 * not be smaller than their size request; to override this
1787 	 * constraint, call gtk_widget_set_size_request() to set the window's
1788 	 * request to a smaller value.
1789 	 * If gtk_window_resize() is called before showing a window for the
1790 	 * first time, it overrides any default size set with
1791 	 * gtk_window_set_default_size().
1792 	 * Windows may not be resized smaller than 1 by 1 pixels.
1793 	 * Params:
1794 	 * width = width in pixels to resize the window to
1795 	 * height = height in pixels to resize the window to
1796 	 */
1797 	public void resize(int width, int height)
1798 	{
1799 		// void gtk_window_resize (GtkWindow *window,  gint width,  gint height);
1800 		gtk_window_resize(gtkWindow, width, height);
1801 	}
1802 	
1803 	/**
1804 	 * Like gtk_window_resize(), but width and height are interpreted
1805 	 * in terms of the base size and increment set with
1806 	 * gtk_window_set_geometry_hints.
1807 	 * Params:
1808 	 * width = width in resize increments to resize the window to
1809 	 * height = height in resize increments to resize the window to
1810 	 * Since 3.0
1811 	 */
1812 	public void resizeToGeometry(int width, int height)
1813 	{
1814 		// void gtk_window_resize_to_geometry (GtkWindow *window,  gint width,  gint height);
1815 		gtk_window_resize_to_geometry(gtkWindow, width, height);
1816 	}
1817 	
1818 	/**
1819 	 * Sets an icon list to be used as fallback for windows that haven't
1820 	 * had gtk_window_set_icon_list() called on them to set up a
1821 	 * window-specific icon list. This function allows you to set up the
1822 	 * icon for all windows in your app at once.
1823 	 * See gtk_window_set_icon_list() for more details.
1824 	 * Params:
1825 	 * list = a list of GdkPixbuf. [element-type GdkPixbuf][transfer container]
1826 	 */
1827 	public static void setDefaultIconList(ListG list)
1828 	{
1829 		// void gtk_window_set_default_icon_list (GList *list);
1830 		gtk_window_set_default_icon_list((list is null) ? null : list.getListGStruct());
1831 	}
1832 	
1833 	/**
1834 	 * Sets an icon to be used as fallback for windows that haven't
1835 	 * had gtk_window_set_icon() called on them from a pixbuf.
1836 	 * Since 2.4
1837 	 * Params:
1838 	 * icon = the icon
1839 	 */
1840 	public static void setDefaultIcon(Pixbuf icon)
1841 	{
1842 		// void gtk_window_set_default_icon (GdkPixbuf *icon);
1843 		gtk_window_set_default_icon((icon is null) ? null : icon.getPixbufStruct());
1844 	}
1845 	
1846 	/**
1847 	 * Sets an icon to be used as fallback for windows that haven't
1848 	 * had gtk_window_set_icon_list() called on them from a file
1849 	 * on disk. Warns on failure if err is NULL.
1850 	 * Since 2.2
1851 	 * Params:
1852 	 * filename = location of icon file. [type filename]
1853 	 * Returns: TRUE if setting the icon succeeded.
1854 	 * Throws: GException on failure.
1855 	 */
1856 	public static int setDefaultIconFromFile(string filename)
1857 	{
1858 		// gboolean gtk_window_set_default_icon_from_file  (const gchar *filename,  GError **err);
1859 		GError* err = null;
1860 		
1861 		auto p = gtk_window_set_default_icon_from_file(Str.toStringz(filename), &err);
1862 		
1863 		if (err !is null)
1864 		{
1865 			throw new GException( new ErrorG(err) );
1866 		}
1867 		
1868 		return p;
1869 	}
1870 	
1871 	/**
1872 	 * Sets an icon to be used as fallback for windows that haven't
1873 	 * had gtk_window_set_icon_list() called on them from a named
1874 	 * themed icon, see gtk_window_set_icon_name().
1875 	 * Since 2.6
1876 	 * Params:
1877 	 * name = the name of the themed icon
1878 	 */
1879 	public static void setDefaultIconName(string name)
1880 	{
1881 		// void gtk_window_set_default_icon_name (const gchar *name);
1882 		gtk_window_set_default_icon_name(Str.toStringz(name));
1883 	}
1884 	
1885 	/**
1886 	 * Sets up the icon representing a GtkWindow. This icon is used when
1887 	 * the window is minimized (also known as iconified). Some window
1888 	 * managers or desktop environments may also place it in the window
1889 	 * frame, or display it in other contexts.
1890 	 * The icon should be provided in whatever size it was naturally
1891 	 * drawn; that is, don't scale the image before passing it to
1892 	 * GTK+. Scaling is postponed until the last minute, when the desired
1893 	 * final size is known, to allow best quality.
1894 	 * If you have your icon hand-drawn in multiple sizes, use
1895 	 * gtk_window_set_icon_list(). Then the best size will be used.
1896 	 * This function is equivalent to calling gtk_window_set_icon_list()
1897 	 * with a 1-element list.
1898 	 * See also gtk_window_set_default_icon_list() to set the icon
1899 	 * for all windows in your application in one go.
1900 	 * Params:
1901 	 * icon = icon image, or NULL. [allow-none]
1902 	 */
1903 	public void setIcon(Pixbuf icon)
1904 	{
1905 		// void gtk_window_set_icon (GtkWindow *window,  GdkPixbuf *icon);
1906 		gtk_window_set_icon(gtkWindow, (icon is null) ? null : icon.getPixbufStruct());
1907 	}
1908 	
1909 	/**
1910 	 * Sets up the icon representing a GtkWindow. The icon is used when
1911 	 * the window is minimized (also known as iconified). Some window
1912 	 * managers or desktop environments may also place it in the window
1913 	 * frame, or display it in other contexts.
1914 	 * gtk_window_set_icon_list() allows you to pass in the same icon in
1915 	 * several hand-drawn sizes. The list should contain the natural sizes
1916 	 * your icon is available in; that is, don't scale the image before
1917 	 * passing it to GTK+. Scaling is postponed until the last minute,
1918 	 * when the desired final size is known, to allow best quality.
1919 	 * By passing several sizes, you may improve the final image quality
1920 	 * of the icon, by reducing or eliminating automatic image scaling.
1921 	 * Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
1922 	 * larger images (64x64, 128x128) if you have them.
1923 	 * See also gtk_window_set_default_icon_list() to set the icon
1924 	 * for all windows in your application in one go.
1925 	 * Note that transient windows (those who have been set transient for another
1926 	 * window using gtk_window_set_transient_for()) will inherit their
1927 	 * icon from their transient parent. So there's no need to explicitly
1928 	 * set the icon on transient windows.
1929 	 * Params:
1930 	 * list = list of GdkPixbuf. [element-type GdkPixbuf]
1931 	 */
1932 	public void setIconList(ListG list)
1933 	{
1934 		// void gtk_window_set_icon_list (GtkWindow *window,  GList *list);
1935 		gtk_window_set_icon_list(gtkWindow, (list is null) ? null : list.getListGStruct());
1936 	}
1937 	
1938 	/**
1939 	 * Sets the icon for window.
1940 	 * Warns on failure if err is NULL.
1941 	 * This function is equivalent to calling gtk_window_set_icon()
1942 	 * with a pixbuf created by loading the image from filename.
1943 	 * Since 2.2
1944 	 * Params:
1945 	 * filename = location of icon file. [type filename]
1946 	 * Returns: TRUE if setting the icon succeeded.
1947 	 * Throws: GException on failure.
1948 	 */
1949 	public int setIconFromFile(string filename)
1950 	{
1951 		// gboolean gtk_window_set_icon_from_file (GtkWindow *window,  const gchar *filename,  GError **err);
1952 		GError* err = null;
1953 		
1954 		auto p = gtk_window_set_icon_from_file(gtkWindow, Str.toStringz(filename), &err);
1955 		
1956 		if (err !is null)
1957 		{
1958 			throw new GException( new ErrorG(err) );
1959 		}
1960 		
1961 		return p;
1962 	}
1963 	
1964 	/**
1965 	 * Sets the icon for the window from a named themed icon. See
1966 	 * the docs for GtkIconTheme for more details.
1967 	 * Note that this has nothing to do with the WM_ICON_NAME
1968 	 * property which is mentioned in the ICCCM.
1969 	 * Since 2.6
1970 	 * Params:
1971 	 * name = the name of the themed icon. [allow-none]
1972 	 */
1973 	public void setIconName(string name)
1974 	{
1975 		// void gtk_window_set_icon_name (GtkWindow *window,  const gchar *name);
1976 		gtk_window_set_icon_name(gtkWindow, Str.toStringz(name));
1977 	}
1978 	
1979 	/**
1980 	 * By default, after showing the first GtkWindow, GTK+ calls
1981 	 * gdk_notify_startup_complete(). Call this function to disable
1982 	 * the automatic startup notification. You might do this if your
1983 	 * first window is a splash screen, and you want to delay notification
1984 	 * until after your real main window has been shown, for example.
1985 	 * In that example, you would disable startup notification
1986 	 * temporarily, show your splash screen, then re-enable it so that
1987 	 * showing the main window would automatically result in notification.
1988 	 * Since 2.2
1989 	 * Params:
1990 	 * setting = TRUE to automatically do startup notification
1991 	 */
1992 	public static void setAutoStartupNotification(int setting)
1993 	{
1994 		// void gtk_window_set_auto_startup_notification  (gboolean setting);
1995 		gtk_window_set_auto_startup_notification(setting);
1996 	}
1997 	
1998 	/**
1999 	 * Warning
2000 	 * gtk_window_get_opacity has been deprecated since version 3.8 and should not be used in newly-written code. Use gtk_widget_get_opacity instead.
2001 	 * Fetches the requested opacity for this window. See
2002 	 * gtk_window_set_opacity().
2003 	 * Since 2.12
2004 	 * Returns: the requested opacity for this window.
2005 	 */
2006 	public override double getOpacity()
2007 	{
2008 		// gdouble gtk_window_get_opacity (GtkWindow *window);
2009 		return gtk_window_get_opacity(gtkWindow);
2010 	}
2011 	
2012 	/**
2013 	 * Warning
2014 	 * gtk_window_set_opacity has been deprecated since version 3.8 and should not be used in newly-written code. Use gtk_widget_set_opacity instead.
2015 	 * Request the windowing system to make window partially transparent,
2016 	 * with opacity 0 being fully transparent and 1 fully opaque. (Values
2017 	 * of the opacity parameter are clamped to the [0,1] range.) On X11
2018 	 * this has any effect only on X screens with a compositing manager
2019 	 * running. See gtk_widget_is_composited(). On Windows it should work
2020 	 * always.
2021 	 * Note that setting a window's opacity after the window has been
2022 	 * shown causes it to flicker once on Windows.
2023 	 * Since 2.12
2024 	 * Params:
2025 	 * opacity = desired opacity, between 0 and 1
2026 	 */
2027 	public override void setOpacity(double opacity)
2028 	{
2029 		// void gtk_window_set_opacity (GtkWindow *window,  gdouble opacity);
2030 		gtk_window_set_opacity(gtkWindow, opacity);
2031 	}
2032 	
2033 	/**
2034 	 * Gets the value of the "mnemonics-visible" property.
2035 	 * Since 2.20
2036 	 * Returns: TRUE if mnemonics are supposed to be visible in this window.
2037 	 */
2038 	public int getMnemonicsVisible()
2039 	{
2040 		// gboolean gtk_window_get_mnemonics_visible (GtkWindow *window);
2041 		return gtk_window_get_mnemonics_visible(gtkWindow);
2042 	}
2043 	
2044 	/**
2045 	 * Sets the "mnemonics-visible" property.
2046 	 * Since 2.20
2047 	 * Params:
2048 	 * setting = the new value
2049 	 */
2050 	public void setMnemonicsVisible(int setting)
2051 	{
2052 		// void gtk_window_set_mnemonics_visible (GtkWindow *window,  gboolean setting);
2053 		gtk_window_set_mnemonics_visible(gtkWindow, setting);
2054 	}
2055 	
2056 	/**
2057 	 * Gets the value of the "focus-visible" property.
2058 	 * Returns: TRUE if 'focus rectangles' are supposed to be visible in this window. Since 3.2
2059 	 */
2060 	public int getFocusVisible()
2061 	{
2062 		// gboolean gtk_window_get_focus_visible (GtkWindow *window);
2063 		return gtk_window_get_focus_visible(gtkWindow);
2064 	}
2065 	
2066 	/**
2067 	 * Sets the "focus-visible" property.
2068 	 * Params:
2069 	 * setting = the new value
2070 	 * Since 3.2
2071 	 */
2072 	public void setFocusVisible(int setting)
2073 	{
2074 		// void gtk_window_set_focus_visible (GtkWindow *window,  gboolean setting);
2075 		gtk_window_set_focus_visible(gtkWindow, setting);
2076 	}
2077 	
2078 	/**
2079 	 * Sets whether window has a corner resize grip.
2080 	 * Note that the resize grip is only shown if the window
2081 	 * is actually resizable and not maximized. Use
2082 	 * gtk_window_resize_grip_is_visible() to find out if the
2083 	 * resize grip is currently shown.
2084 	 * Params:
2085 	 * value = TRUE to allow a resize grip
2086 	 * Since 3.0
2087 	 */
2088 	public void setHasResizeGrip(int value)
2089 	{
2090 		// void gtk_window_set_has_resize_grip (GtkWindow *window,  gboolean value);
2091 		gtk_window_set_has_resize_grip(gtkWindow, value);
2092 	}
2093 	
2094 	/**
2095 	 * Determines whether the window may have a resize grip.
2096 	 * Returns: TRUE if the window has a resize grip Since 3.0
2097 	 */
2098 	public int getHasResizeGrip()
2099 	{
2100 		// gboolean gtk_window_get_has_resize_grip (GtkWindow *window);
2101 		return gtk_window_get_has_resize_grip(gtkWindow);
2102 	}
2103 	
2104 	/**
2105 	 * Determines whether a resize grip is visible for the specified window.
2106 	 * Returns: TRUE if a resize grip exists and is visible Since 3.0
2107 	 */
2108 	public int resizeGripIsVisible()
2109 	{
2110 		// gboolean gtk_window_resize_grip_is_visible (GtkWindow *window);
2111 		return gtk_window_resize_grip_is_visible(gtkWindow);
2112 	}
2113 	
2114 	/**
2115 	 * If a window has a resize grip, this will retrieve the grip
2116 	 * position, width and height into the specified GdkRectangle.
2117 	 * Params:
2118 	 * rect = a pointer to a GdkRectangle which we should store
2119 	 * the resize grip area. [out]
2120 	 * Returns: TRUE if the resize grip's area was retrieved Since 3.0
2121 	 */
2122 	public int getResizeGripArea(out Rectangle rect)
2123 	{
2124 		// gboolean gtk_window_get_resize_grip_area (GtkWindow *window,  GdkRectangle *rect);
2125 		return gtk_window_get_resize_grip_area(gtkWindow, &rect);
2126 	}
2127 	
2128 	/**
2129 	 * Gets the GtkApplication associated with the window (if any).
2130 	 * Returns: a GtkApplication, or NULL. [transfer none] Since 3.0
2131 	 */
2132 	public Application getApplication()
2133 	{
2134 		// GtkApplication * gtk_window_get_application (GtkWindow *window);
2135 		auto p = gtk_window_get_application(gtkWindow);
2136 		
2137 		if(p is null)
2138 		{
2139 			return null;
2140 		}
2141 		
2142 		return ObjectG.getDObject!(Application)(cast(GtkApplication*) p);
2143 	}
2144 	
2145 	/**
2146 	 * Sets or unsets the GtkApplication associated with the window.
2147 	 * The application will be kept alive for at least as long as the window
2148 	 * is open.
2149 	 * Params:
2150 	 * application = a GtkApplication, or NULL. [allow-none]
2151 	 * Since 3.0
2152 	 */
2153 	public void setApplication(Application application)
2154 	{
2155 		// void gtk_window_set_application (GtkWindow *window,  GtkApplication *application);
2156 		gtk_window_set_application(gtkWindow, (application is null) ? null : application.getGtkApplicationStruct());
2157 	}
2158 	
2159 	/**
2160 	 * Tells GTK+ whether to drop its extra reference to the window
2161 	 * when gtk_widget_destroy() is called.
2162 	 * This function is only exported for the benefit of language
2163 	 * bindings which may need to keep the window alive until their
2164 	 * wrapper object is garbage collected. There is no justification
2165 	 * for ever calling this function in an application.
2166 	 * Params:
2167 	 * setting = the new value
2168 	 * Since 3.0
2169 	 */
2170 	public void setHasUserRefCount(int setting)
2171 	{
2172 		// void gtk_window_set_has_user_ref_count (GtkWindow *window,  gboolean setting);
2173 		gtk_window_set_has_user_ref_count(gtkWindow, setting);
2174 	}
2175 	
2176 	/**
2177 	 * Sets a custom titlebar for window.
2178 	 * If you set a custom titlebar, GTK+ will do its best to convince
2179 	 * the window manager not to put its own titlebar on the window.
2180 	 * Depending on the system, this function may not work for a window
2181 	 * that is already visible, so you set the titlebar before calling
2182 	 * gtk_widget_show().
2183 	 * Params:
2184 	 * titlebar = the widget to use as titlebar
2185 	 * Since 3.10
2186 	 */
2187 	public void setTitlebar(Widget titlebar)
2188 	{
2189 		// void gtk_window_set_titlebar (GtkWindow *window,  GtkWidget *titlebar);
2190 		gtk_window_set_titlebar(gtkWindow, (titlebar is null) ? null : titlebar.getWidgetStruct());
2191 	}
2192 }