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 module gdk.Window;
26 
27 private import cairo.Context;
28 private import cairo.Pattern;
29 private import cairo.Region;
30 private import cairo.Surface;
31 private import gdk.Color;
32 private import gdk.Cursor;
33 private import gdk.Device;
34 private import gdk.Display;
35 private import gdk.Event;
36 private import gdk.FrameClock;
37 private import gdk.GLContext;
38 private import gdk.RGBA;
39 private import gdk.Screen;
40 private import gdk.Visual;
41 private import gdkpixbuf.Pixbuf;
42 private import glib.ConstructionException;
43 private import glib.ErrorG;
44 private import glib.GException;
45 private import glib.ListG;
46 private import glib.Str;
47 private import gobject.ObjectG;
48 private import gobject.Signals;
49 private import gtkc.gdk;
50 public  import gtkc.gdktypes;
51 
52 
53 public class Window : ObjectG
54 {
55 	/** the main Gtk struct */
56 	protected GdkWindow* gdkWindow;
57 
58 	/** Get the main Gtk struct */
59 	public GdkWindow* getWindowStruct()
60 	{
61 		return gdkWindow;
62 	}
63 
64 	/** the main Gtk struct as a void* */
65 	protected override void* getStruct()
66 	{
67 		return cast(void*)gdkWindow;
68 	}
69 
70 	protected override void setStruct(GObject* obj)
71 	{
72 		gdkWindow = cast(GdkWindow*)obj;
73 		super.setStruct(obj);
74 	}
75 
76 	/**
77 	 * Sets our main struct and passes it to the parent class.
78 	 */
79 	public this (GdkWindow* gdkWindow, bool ownedRef = false)
80 	{
81 		this.gdkWindow = gdkWindow;
82 		super(cast(GObject*)gdkWindow, ownedRef);
83 	}
84 
85 	/**
86 	 */
87 
88 	public static GType getType()
89 	{
90 		return gdk_window_get_type();
91 	}
92 
93 	/**
94 	 * Creates a new #GdkWindow using the attributes from
95 	 * @attributes. See #GdkWindowAttr and #GdkWindowAttributesType for
96 	 * more details.  Note: to use this on displays other than the default
97 	 * display, @parent must be specified.
98 	 *
99 	 * Params:
100 	 *     parent = a #GdkWindow, or %NULL to create the window as a child of
101 	 *         the default root window for the default display.
102 	 *     attributes = attributes of the new window
103 	 *     attributesMask = mask indicating which
104 	 *         fields in @attributes are valid
105 	 *
106 	 * Return: the new #GdkWindow
107 	 *
108 	 * Throws: ConstructionException GTK+ fails to create the object.
109 	 */
110 	public this(Window parent, GdkWindowAttr* attributes, int attributesMask)
111 	{
112 		auto p = gdk_window_new((parent is null) ? null : parent.getWindowStruct(), attributes, attributesMask);
113 		
114 		if(p is null)
115 		{
116 			throw new ConstructionException("null returned by new");
117 		}
118 		
119 		this(cast(GdkWindow*) p, true);
120 	}
121 
122 	/**
123 	 * Obtains the window underneath the mouse pointer, returning the
124 	 * location of that window in @win_x, @win_y. Returns %NULL if the
125 	 * window under the mouse pointer is not known to GDK (if the window
126 	 * belongs to another application and a #GdkWindow hasn’t been created
127 	 * for it with gdk_window_foreign_new())
128 	 *
129 	 * NOTE: For multihead-aware widgets or applications use
130 	 * gdk_display_get_window_at_pointer() instead.
131 	 *
132 	 * Deprecated: Use gdk_device_get_window_at_position() instead.
133 	 *
134 	 * Params:
135 	 *     winX = return location for origin of the window under the pointer
136 	 *     winY = return location for origin of the window under the pointer
137 	 *
138 	 * Return: window under the mouse pointer
139 	 */
140 	public static Window atPointer(out int winX, out int winY)
141 	{
142 		auto p = gdk_window_at_pointer(&winX, &winY);
143 		
144 		if(p is null)
145 		{
146 			return null;
147 		}
148 		
149 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
150 	}
151 
152 	/**
153 	 * Constrains a desired width and height according to a
154 	 * set of geometry hints (such as minimum and maximum size).
155 	 *
156 	 * Params:
157 	 *     geometry = a #GdkGeometry structure
158 	 *     flags = a mask indicating what portions of @geometry are set
159 	 *     width = desired width of window
160 	 *     height = desired height of the window
161 	 *     newWidth = location to store resulting width
162 	 *     newHeight = location to store resulting height
163 	 */
164 	public static void constrainSize(GdkGeometry* geometry, GdkWindowHints flags, int width, int height, out int newWidth, out int newHeight)
165 	{
166 		gdk_window_constrain_size(geometry, flags, width, height, &newWidth, &newHeight);
167 	}
168 
169 	/**
170 	 * Calls gdk_window_process_updates() for all windows (see #GdkWindow)
171 	 * in the application.
172 	 */
173 	public static void processAllUpdates()
174 	{
175 		gdk_window_process_all_updates();
176 	}
177 
178 	/**
179 	 * With update debugging enabled, calls to
180 	 * gdk_window_invalidate_region() clear the invalidated region of the
181 	 * screen to a noticeable color, and GDK pauses for a short time
182 	 * before sending exposes to windows during
183 	 * gdk_window_process_updates().  The net effect is that you can see
184 	 * the invalid region for each window and watch redraws as they
185 	 * occur. This allows you to diagnose inefficiencies in your application.
186 	 *
187 	 * In essence, because the GDK rendering model prevents all flicker,
188 	 * if you are redrawing the same region 400 times you may never
189 	 * notice, aside from noticing a speed problem. Enabling update
190 	 * debugging causes GTK to flicker slowly and noticeably, so you can
191 	 * see exactly what’s being redrawn when, in what order.
192 	 *
193 	 * The --gtk-debug=updates command line option passed to GTK+ programs
194 	 * enables this debug option at application startup time. That's
195 	 * usually more useful than calling gdk_window_set_debug_updates()
196 	 * yourself, though you might want to use this function to enable
197 	 * updates sometime after application startup time.
198 	 *
199 	 * Params:
200 	 *     setting = %TRUE to turn on update debugging
201 	 */
202 	public static void setDebugUpdates(bool setting)
203 	{
204 		gdk_window_set_debug_updates(setting);
205 	}
206 
207 	/**
208 	 * Adds an event filter to @window, allowing you to intercept events
209 	 * before they reach GDK. This is a low-level operation and makes it
210 	 * easy to break GDK and/or GTK+, so you have to know what you're
211 	 * doing. Pass %NULL for @window to get all events for all windows,
212 	 * instead of events for a specific window.
213 	 *
214 	 * If you are interested in X GenericEvents, bear in mind that
215 	 * XGetEventData() has been already called on the event, and
216 	 * XFreeEventData() must not be called within @function.
217 	 *
218 	 * Params:
219 	 *     funct = filter callback
220 	 *     data = data to pass to filter callback
221 	 */
222 	public void addFilter(GdkFilterFunc funct, void* data)
223 	{
224 		gdk_window_add_filter(gdkWindow, funct, data);
225 	}
226 
227 	/**
228 	 * Emits a short beep associated to @window in the appropriate
229 	 * display, if supported. Otherwise, emits a short beep on
230 	 * the display just as gdk_display_beep().
231 	 *
232 	 * Since: 2.12
233 	 */
234 	public void beep()
235 	{
236 		gdk_window_beep(gdkWindow);
237 	}
238 
239 	/**
240 	 * Begins a window move operation (for a toplevel window).
241 	 *
242 	 * This function assumes that the drag is controlled by the
243 	 * client pointer device, use gdk_window_begin_move_drag_for_device()
244 	 * to begin a drag with a different device.
245 	 *
246 	 * Params:
247 	 *     button = the button being used to drag, or 0 for a keyboard-initiated drag
248 	 *     rootX = root window X coordinate of mouse click that began the drag
249 	 *     rootY = root window Y coordinate of mouse click that began the drag
250 	 *     timestamp = timestamp of mouse click that began the drag
251 	 */
252 	public void beginMoveDrag(int button, int rootX, int rootY, uint timestamp)
253 	{
254 		gdk_window_begin_move_drag(gdkWindow, button, rootX, rootY, timestamp);
255 	}
256 
257 	/**
258 	 * Begins a window move operation (for a toplevel window).
259 	 * You might use this function to implement a “window move grip,” for
260 	 * example. The function works best with window managers that support the
261 	 * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
262 	 * but has a fallback implementation for other window managers.
263 	 *
264 	 * Params:
265 	 *     device = the device used for the operation
266 	 *     button = the button being used to drag, or 0 for a keyboard-initiated drag
267 	 *     rootX = root window X coordinate of mouse click that began the drag
268 	 *     rootY = root window Y coordinate of mouse click that began the drag
269 	 *     timestamp = timestamp of mouse click that began the drag
270 	 *
271 	 * Since: 3.4
272 	 */
273 	public void beginMoveDragForDevice(Device device, int button, int rootX, int rootY, uint timestamp)
274 	{
275 		gdk_window_begin_move_drag_for_device(gdkWindow, (device is null) ? null : device.getDeviceStruct(), button, rootX, rootY, timestamp);
276 	}
277 
278 	/**
279 	 * A convenience wrapper around gdk_window_begin_paint_region() which
280 	 * creates a rectangular region for you. See
281 	 * gdk_window_begin_paint_region() for details.
282 	 *
283 	 * Params:
284 	 *     rectangle = rectangle you intend to draw to
285 	 */
286 	public void beginPaintRect(GdkRectangle* rectangle)
287 	{
288 		gdk_window_begin_paint_rect(gdkWindow, rectangle);
289 	}
290 
291 	/**
292 	 * Indicates that you are beginning the process of redrawing @region.
293 	 * A backing store (offscreen buffer) large enough to contain @region
294 	 * will be created. The backing store will be initialized with the
295 	 * background color or background surface for @window. Then, all
296 	 * drawing operations performed on @window will be diverted to the
297 	 * backing store.  When you call gdk_window_end_paint(), the backing
298 	 * store will be copied to @window, making it visible onscreen. Only
299 	 * the part of @window contained in @region will be modified; that is,
300 	 * drawing operations are clipped to @region.
301 	 *
302 	 * The net result of all this is to remove flicker, because the user
303 	 * sees the finished product appear all at once when you call
304 	 * gdk_window_end_paint(). If you draw to @window directly without
305 	 * calling gdk_window_begin_paint_region(), the user may see flicker
306 	 * as individual drawing operations are performed in sequence.  The
307 	 * clipping and background-initializing features of
308 	 * gdk_window_begin_paint_region() are conveniences for the
309 	 * programmer, so you can avoid doing that work yourself.
310 	 *
311 	 * When using GTK+, the widget system automatically places calls to
312 	 * gdk_window_begin_paint_region() and gdk_window_end_paint() around
313 	 * emissions of the expose_event signal. That is, if you’re writing an
314 	 * expose event handler, you can assume that the exposed area in
315 	 * #GdkEventExpose has already been cleared to the window background,
316 	 * is already set as the clip region, and already has a backing store.
317 	 * Therefore in most cases, application code need not call
318 	 * gdk_window_begin_paint_region(). (You can disable the automatic
319 	 * calls around expose events on a widget-by-widget basis by calling
320 	 * gtk_widget_set_double_buffered().)
321 	 *
322 	 * If you call this function multiple times before calling the
323 	 * matching gdk_window_end_paint(), the backing stores are pushed onto
324 	 * a stack. gdk_window_end_paint() copies the topmost backing store
325 	 * onscreen, subtracts the topmost region from all other regions in
326 	 * the stack, and pops the stack. All drawing operations affect only
327 	 * the topmost backing store in the stack. One matching call to
328 	 * gdk_window_end_paint() is required for each call to
329 	 * gdk_window_begin_paint_region().
330 	 *
331 	 * Params:
332 	 *     region = region you intend to draw to
333 	 */
334 	public void beginPaintRegion(Region region)
335 	{
336 		gdk_window_begin_paint_region(gdkWindow, (region is null) ? null : region.getRegionStruct());
337 	}
338 
339 	/**
340 	 * Begins a window resize operation (for a toplevel window).
341 	 *
342 	 * This function assumes that the drag is controlled by the
343 	 * client pointer device, use gdk_window_begin_resize_drag_for_device()
344 	 * to begin a drag with a different device.
345 	 *
346 	 * Params:
347 	 *     edge = the edge or corner from which the drag is started
348 	 *     button = the button being used to drag, or 0 for a keyboard-initiated drag
349 	 *     rootX = root window X coordinate of mouse click that began the drag
350 	 *     rootY = root window Y coordinate of mouse click that began the drag
351 	 *     timestamp = timestamp of mouse click that began the drag (use gdk_event_get_time())
352 	 */
353 	public void beginResizeDrag(GdkWindowEdge edge, int button, int rootX, int rootY, uint timestamp)
354 	{
355 		gdk_window_begin_resize_drag(gdkWindow, edge, button, rootX, rootY, timestamp);
356 	}
357 
358 	/**
359 	 * Begins a window resize operation (for a toplevel window).
360 	 * You might use this function to implement a “window resize grip,” for
361 	 * example; in fact #GtkStatusbar uses it. The function works best
362 	 * with window managers that support the
363 	 * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
364 	 * but has a fallback implementation for other window managers.
365 	 *
366 	 * Params:
367 	 *     edge = the edge or corner from which the drag is started
368 	 *     device = the device used for the operation
369 	 *     button = the button being used to drag, or 0 for a keyboard-initiated drag
370 	 *     rootX = root window X coordinate of mouse click that began the drag
371 	 *     rootY = root window Y coordinate of mouse click that began the drag
372 	 *     timestamp = timestamp of mouse click that began the drag (use gdk_event_get_time())
373 	 *
374 	 * Since: 3.4
375 	 */
376 	public void beginResizeDragForDevice(GdkWindowEdge edge, Device device, int button, int rootX, int rootY, uint timestamp)
377 	{
378 		gdk_window_begin_resize_drag_for_device(gdkWindow, edge, (device is null) ? null : device.getDeviceStruct(), button, rootX, rootY, timestamp);
379 	}
380 
381 	/**
382 	 * Does nothing, present only for compatiblity.
383 	 *
384 	 * Deprecated: this function is no longer needed
385 	 *
386 	 * Since: 2.6
387 	 */
388 	public void configureFinished()
389 	{
390 		gdk_window_configure_finished(gdkWindow);
391 	}
392 
393 	/**
394 	 * Transforms window coordinates from a parent window to a child
395 	 * window, where the parent window is the normal parent as returned by
396 	 * gdk_window_get_parent() for normal windows, and the window's
397 	 * embedder as returned by gdk_offscreen_window_get_embedder() for
398 	 * offscreen windows.
399 	 *
400 	 * For normal windows, calling this function is equivalent to subtracting
401 	 * the return values of gdk_window_get_position() from the parent coordinates.
402 	 * For offscreen windows however (which can be arbitrarily transformed),
403 	 * this function calls the GdkWindow::from-embedder: signal to translate
404 	 * the coordinates.
405 	 *
406 	 * You should always use this function when writing generic code that
407 	 * walks down a window hierarchy.
408 	 *
409 	 * See also: gdk_window_coords_to_parent()
410 	 *
411 	 * Params:
412 	 *     parentX = X coordinate in parent’s coordinate system
413 	 *     parentY = Y coordinate in parent’s coordinate system
414 	 *     x = return location for X coordinate in child’s coordinate system
415 	 *     y = return location for Y coordinate in child’s coordinate system
416 	 *
417 	 * Since: 2.22
418 	 */
419 	public void coordsFromParent(double parentX, double parentY, out double x, out double y)
420 	{
421 		gdk_window_coords_from_parent(gdkWindow, parentX, parentY, &x, &y);
422 	}
423 
424 	/**
425 	 * Transforms window coordinates from a child window to its parent
426 	 * window, where the parent window is the normal parent as returned by
427 	 * gdk_window_get_parent() for normal windows, and the window's
428 	 * embedder as returned by gdk_offscreen_window_get_embedder() for
429 	 * offscreen windows.
430 	 *
431 	 * For normal windows, calling this function is equivalent to adding
432 	 * the return values of gdk_window_get_position() to the child coordinates.
433 	 * For offscreen windows however (which can be arbitrarily transformed),
434 	 * this function calls the GdkWindow::to-embedder: signal to translate
435 	 * the coordinates.
436 	 *
437 	 * You should always use this function when writing generic code that
438 	 * walks up a window hierarchy.
439 	 *
440 	 * See also: gdk_window_coords_from_parent()
441 	 *
442 	 * Params:
443 	 *     x = X coordinate in child’s coordinate system
444 	 *     y = Y coordinate in child’s coordinate system
445 	 *     parentX = return location for X coordinate
446 	 *         in parent’s coordinate system, or %NULL
447 	 *     parentY = return location for Y coordinate
448 	 *         in parent’s coordinate system, or %NULL
449 	 *
450 	 * Since: 2.22
451 	 */
452 	public void coordsToParent(double x, double y, out double parentX, out double parentY)
453 	{
454 		gdk_window_coords_to_parent(gdkWindow, x, y, &parentX, &parentY);
455 	}
456 
457 	/**
458 	 * Creates a new #GdkGLContext matching the
459 	 * framebuffer format to the visual of the #GdkWindow. The context
460 	 * is disconnected from any particular window or surface.
461 	 *
462 	 * If the creation of the #GdkGLContext failed, @error will be set.
463 	 *
464 	 * Before using the returned #GdkGLContext, you will need to
465 	 * call gdk_gl_context_make_current() or gdk_gl_context_realize().
466 	 *
467 	 * Return: the newly created #GdkGLContext, or
468 	 *     %NULL on error
469 	 *
470 	 * Since: 3.16
471 	 *
472 	 * Throws: GException on failure.
473 	 */
474 	public GLContext createGlContext()
475 	{
476 		GError* err = null;
477 		
478 		auto p = gdk_window_create_gl_context(gdkWindow, &err);
479 		
480 		if (err !is null)
481 		{
482 			throw new GException( new ErrorG(err) );
483 		}
484 		
485 		if(p is null)
486 		{
487 			return null;
488 		}
489 		
490 		return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) p, true);
491 	}
492 
493 	/**
494 	 * Create a new image surface that is efficient to draw on the
495 	 * given @window.
496 	 *
497 	 * Initially the surface contents are all 0 (transparent if contents
498 	 * have transparency, black otherwise.)
499 	 *
500 	 * Params:
501 	 *     format = the format for the new surface
502 	 *     width = width of the new surface
503 	 *     height = height of the new surface
504 	 *     scale = the scale of the new surface, or 0 to use same as @window
505 	 *
506 	 * Return: a pointer to the newly allocated surface. The caller
507 	 *     owns the surface and should call cairo_surface_destroy() when done
508 	 *     with it.
509 	 *
510 	 *     This function always returns a valid pointer, but it will return a
511 	 *     pointer to a “nil” surface if @other is already in an error state
512 	 *     or any other error occurs.
513 	 *
514 	 * Since: 3.10
515 	 */
516 	public Surface createSimilarImageSurface(cairo_format_t format, int width, int height, int scale)
517 	{
518 		auto p = gdk_window_create_similar_image_surface(gdkWindow, format, width, height, scale);
519 		
520 		if(p is null)
521 		{
522 			return null;
523 		}
524 		
525 		return new Surface(cast(cairo_surface_t*) p);
526 	}
527 
528 	/**
529 	 * Create a new surface that is as compatible as possible with the
530 	 * given @window. For example the new surface will have the same
531 	 * fallback resolution and font options as @window. Generally, the new
532 	 * surface will also use the same backend as @window, unless that is
533 	 * not possible for some reason. The type of the returned surface may
534 	 * be examined with cairo_surface_get_type().
535 	 *
536 	 * Initially the surface contents are all 0 (transparent if contents
537 	 * have transparency, black otherwise.)
538 	 *
539 	 * Params:
540 	 *     content = the content for the new surface
541 	 *     width = width of the new surface
542 	 *     height = height of the new surface
543 	 *
544 	 * Return: a pointer to the newly allocated surface. The caller
545 	 *     owns the surface and should call cairo_surface_destroy() when done
546 	 *     with it.
547 	 *
548 	 *     This function always returns a valid pointer, but it will return a
549 	 *     pointer to a “nil” surface if @other is already in an error state
550 	 *     or any other error occurs.
551 	 *
552 	 * Since: 2.22
553 	 */
554 	public Surface createSimilarSurface(cairo_content_t content, int width, int height)
555 	{
556 		auto p = gdk_window_create_similar_surface(gdkWindow, content, width, height);
557 		
558 		if(p is null)
559 		{
560 			return null;
561 		}
562 		
563 		return new Surface(cast(cairo_surface_t*) p);
564 	}
565 
566 	/**
567 	 * Attempt to deiconify (unminimize) @window. On X11 the window manager may
568 	 * choose to ignore the request to deiconify. When using GTK+,
569 	 * use gtk_window_deiconify() instead of the #GdkWindow variant. Or better yet,
570 	 * you probably want to use gtk_window_present(), which raises the window, focuses it,
571 	 * unminimizes it, and puts it on the current desktop.
572 	 */
573 	public void deiconify()
574 	{
575 		gdk_window_deiconify(gdkWindow);
576 	}
577 
578 	/**
579 	 * Destroys the window system resources associated with @window and decrements @window's
580 	 * reference count. The window system resources for all children of @window are also
581 	 * destroyed, but the children’s reference counts are not decremented.
582 	 *
583 	 * Note that a window will not be destroyed automatically when its reference count
584 	 * reaches zero. You must call this function yourself before that happens.
585 	 */
586 	public void destroy()
587 	{
588 		gdk_window_destroy(gdkWindow);
589 	}
590 
591 	public void destroyNotify()
592 	{
593 		gdk_window_destroy_notify(gdkWindow);
594 	}
595 
596 	/**
597 	 * Does nothing, present only for compatiblity.
598 	 *
599 	 * Deprecated: this function is no longer needed
600 	 *
601 	 * Since: 2.6
602 	 */
603 	public void enableSynchronizedConfigure()
604 	{
605 		gdk_window_enable_synchronized_configure(gdkWindow);
606 	}
607 
608 	/**
609 	 * Indicates that the backing store created by the most recent call
610 	 * to gdk_window_begin_paint_region() should be copied onscreen and
611 	 * deleted, leaving the next-most-recent backing store or no backing
612 	 * store at all as the active paint region. See
613 	 * gdk_window_begin_paint_region() for full details.
614 	 *
615 	 * It is an error to call this function without a matching
616 	 * gdk_window_begin_paint_region() first.
617 	 */
618 	public void endPaint()
619 	{
620 		gdk_window_end_paint(gdkWindow);
621 	}
622 
623 	/**
624 	 * Tries to ensure that there is a window-system native window for this
625 	 * GdkWindow. This may fail in some situations, returning %FALSE.
626 	 *
627 	 * Offscreen window and children of them can never have native windows.
628 	 *
629 	 * Some backends may not support native child windows.
630 	 *
631 	 * Return: %TRUE if the window has a native window, %FALSE otherwise
632 	 *
633 	 * Since: 2.18
634 	 */
635 	public bool ensureNative()
636 	{
637 		return gdk_window_ensure_native(gdkWindow) != 0;
638 	}
639 
640 	/**
641 	 * This function does nothing.
642 	 *
643 	 * Since: 2.18
644 	 */
645 	public void flush()
646 	{
647 		gdk_window_flush(gdkWindow);
648 	}
649 
650 	/**
651 	 * Sets keyboard focus to @window. In most cases, gtk_window_present()
652 	 * should be used on a #GtkWindow, rather than calling this function.
653 	 *
654 	 * Params:
655 	 *     timestamp = timestamp of the event triggering the window focus
656 	 */
657 	public void focus(uint timestamp)
658 	{
659 		gdk_window_focus(gdkWindow, timestamp);
660 	}
661 
662 	/**
663 	 * Temporarily freezes a window and all its descendants such that it won't
664 	 * receive expose events.  The window will begin receiving expose events
665 	 * again when gdk_window_thaw_toplevel_updates_libgtk_only() is called. If
666 	 * gdk_window_freeze_toplevel_updates_libgtk_only()
667 	 * has been called more than once,
668 	 * gdk_window_thaw_toplevel_updates_libgtk_only() must be called
669 	 * an equal number of times to begin processing exposes.
670 	 *
671 	 * This function is not part of the GDK public API and is only
672 	 * for use by GTK+.
673 	 *
674 	 * Deprecated: This symbol was never meant to be used outside of GTK+
675 	 */
676 	public void freezeToplevelUpdatesLibgtkOnly()
677 	{
678 		gdk_window_freeze_toplevel_updates_libgtk_only(gdkWindow);
679 	}
680 
681 	/**
682 	 * Temporarily freezes a window such that it won’t receive expose
683 	 * events.  The window will begin receiving expose events again when
684 	 * gdk_window_thaw_updates() is called. If gdk_window_freeze_updates()
685 	 * has been called more than once, gdk_window_thaw_updates() must be called
686 	 * an equal number of times to begin processing exposes.
687 	 */
688 	public void freezeUpdates()
689 	{
690 		gdk_window_freeze_updates(gdkWindow);
691 	}
692 
693 	/**
694 	 * Moves the window into fullscreen mode. This means the
695 	 * window covers the entire screen and is above any panels
696 	 * or task bars.
697 	 *
698 	 * If the window was already fullscreen, then this function does nothing.
699 	 *
700 	 * On X11, asks the window manager to put @window in a fullscreen
701 	 * state, if the window manager supports this operation. Not all
702 	 * window managers support this, and some deliberately ignore it or
703 	 * don’t have a concept of “fullscreen”; so you can’t rely on the
704 	 * fullscreenification actually happening. But it will happen with
705 	 * most standard window managers, and GDK makes a best effort to get
706 	 * it to happen.
707 	 *
708 	 * Since: 2.2
709 	 */
710 	public void fullscreen()
711 	{
712 		gdk_window_fullscreen(gdkWindow);
713 	}
714 
715 	/**
716 	 * This function informs GDK that the geometry of an embedded
717 	 * offscreen window has changed. This is necessary for GDK to keep
718 	 * track of which offscreen window the pointer is in.
719 	 *
720 	 * Since: 2.18
721 	 */
722 	public void geometryChanged()
723 	{
724 		gdk_window_geometry_changed(gdkWindow);
725 	}
726 
727 	/**
728 	 * Determines whether or not the desktop environment shuld be hinted that
729 	 * the window does not want to receive input focus.
730 	 *
731 	 * Return: whether or not the window should receive input focus.
732 	 *
733 	 * Since: 2.22
734 	 */
735 	public bool getAcceptFocus()
736 	{
737 		return gdk_window_get_accept_focus(gdkWindow) != 0;
738 	}
739 
740 	/**
741 	 * Gets the pattern used to clear the background on @window. If @window
742 	 * does not have its own background and reuses the parent's, %NULL is
743 	 * returned and you’ll have to query it yourself.
744 	 *
745 	 * Return: The pattern to use for the
746 	 *     background or %NULL to use the parent’s background.
747 	 *
748 	 * Since: 2.22
749 	 */
750 	public Pattern getBackgroundPattern()
751 	{
752 		auto p = gdk_window_get_background_pattern(gdkWindow);
753 		
754 		if(p is null)
755 		{
756 			return null;
757 		}
758 		
759 		return new Pattern(cast(cairo_pattern_t*) p);
760 	}
761 
762 	/**
763 	 * Gets the list of children of @window known to GDK.
764 	 * This function only returns children created via GDK,
765 	 * so for example it’s useless when used with the root window;
766 	 * it only returns windows an application created itself.
767 	 *
768 	 * The returned list must be freed, but the elements in the
769 	 * list need not be.
770 	 *
771 	 * Return: list of child windows inside @window
772 	 */
773 	public ListG getChildren()
774 	{
775 		auto p = gdk_window_get_children(gdkWindow);
776 		
777 		if(p is null)
778 		{
779 			return null;
780 		}
781 		
782 		return new ListG(cast(GList*) p);
783 	}
784 
785 	/**
786 	 * Gets the list of children of @window known to GDK with a
787 	 * particular @user_data set on it.
788 	 *
789 	 * The returned list must be freed, but the elements in the
790 	 * list need not be.
791 	 *
792 	 * The list is returned in (relative) stacking order, i.e. the
793 	 * lowest window is first.
794 	 *
795 	 * Params:
796 	 *     userData = user data to look for
797 	 *
798 	 * Return: list of child windows inside @window
799 	 *
800 	 * Since: 3.10
801 	 */
802 	public ListG getChildrenWithUserData(void* userData)
803 	{
804 		auto p = gdk_window_get_children_with_user_data(gdkWindow, userData);
805 		
806 		if(p is null)
807 		{
808 			return null;
809 		}
810 		
811 		return new ListG(cast(GList*) p);
812 	}
813 
814 	/**
815 	 * Computes the region of a window that potentially can be written
816 	 * to by drawing primitives. This region may not take into account
817 	 * other factors such as if the window is obscured by other windows,
818 	 * but no area outside of this region will be affected by drawing
819 	 * primitives.
820 	 *
821 	 * Return: a #cairo_region_t. This must be freed with cairo_region_destroy()
822 	 *     when you are done.
823 	 */
824 	public Region getClipRegion()
825 	{
826 		auto p = gdk_window_get_clip_region(gdkWindow);
827 		
828 		if(p is null)
829 		{
830 			return null;
831 		}
832 		
833 		return new Region(cast(cairo_region_t*) p);
834 	}
835 
836 	/**
837 	 * Determines whether @window is composited.
838 	 *
839 	 * See gdk_window_set_composited().
840 	 *
841 	 * Deprecated: Compositing is an outdated technology that
842 	 * only ever worked on X11.
843 	 *
844 	 * Return: %TRUE if the window is composited.
845 	 *
846 	 * Since: 2.22
847 	 */
848 	public bool getComposited()
849 	{
850 		return gdk_window_get_composited(gdkWindow) != 0;
851 	}
852 
853 	/**
854 	 * Retrieves a #GdkCursor pointer for the cursor currently set on the
855 	 * specified #GdkWindow, or %NULL.  If the return value is %NULL then
856 	 * there is no custom cursor set on the specified window, and it is
857 	 * using the cursor for its parent window.
858 	 *
859 	 * Return: a #GdkCursor, or %NULL. The
860 	 *     returned object is owned by the #GdkWindow and should not be
861 	 *     unreferenced directly. Use gdk_window_set_cursor() to unset the
862 	 *     cursor of the window
863 	 *
864 	 * Since: 2.18
865 	 */
866 	public Cursor getCursor()
867 	{
868 		auto p = gdk_window_get_cursor(gdkWindow);
869 		
870 		if(p is null)
871 		{
872 			return null;
873 		}
874 		
875 		return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p);
876 	}
877 
878 	/**
879 	 * Returns the decorations set on the GdkWindow with
880 	 * gdk_window_set_decorations().
881 	 *
882 	 * Params:
883 	 *     decorations = The window decorations will be written here
884 	 *
885 	 * Return: %TRUE if the window has decorations set, %FALSE otherwise.
886 	 */
887 	public bool getDecorations(out GdkWMDecoration decorations)
888 	{
889 		return gdk_window_get_decorations(gdkWindow, &decorations) != 0;
890 	}
891 
892 	/**
893 	 * Retrieves a #GdkCursor pointer for the @device currently set on the
894 	 * specified #GdkWindow, or %NULL.  If the return value is %NULL then
895 	 * there is no custom cursor set on the specified window, and it is
896 	 * using the cursor for its parent window.
897 	 *
898 	 * Params:
899 	 *     device = a master, pointer #GdkDevice.
900 	 *
901 	 * Return: a #GdkCursor, or %NULL. The
902 	 *     returned object is owned by the #GdkWindow and should not be
903 	 *     unreferenced directly. Use gdk_window_set_cursor() to unset the
904 	 *     cursor of the window
905 	 *
906 	 * Since: 3.0
907 	 */
908 	public Cursor getDeviceCursor(Device device)
909 	{
910 		auto p = gdk_window_get_device_cursor(gdkWindow, (device is null) ? null : device.getDeviceStruct());
911 		
912 		if(p is null)
913 		{
914 			return null;
915 		}
916 		
917 		return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p);
918 	}
919 
920 	/**
921 	 * Returns the event mask for @window corresponding to an specific device.
922 	 *
923 	 * Params:
924 	 *     device = a #GdkDevice.
925 	 *
926 	 * Return: device event mask for @window
927 	 *
928 	 * Since: 3.0
929 	 */
930 	public GdkEventMask getDeviceEvents(Device device)
931 	{
932 		return gdk_window_get_device_events(gdkWindow, (device is null) ? null : device.getDeviceStruct());
933 	}
934 
935 	/**
936 	 * Obtains the current device position and modifier state.
937 	 * The position is given in coordinates relative to the upper left
938 	 * corner of @window.
939 	 *
940 	 * Use gdk_window_get_device_position_double() if you need subpixel precision.
941 	 *
942 	 * Params:
943 	 *     device = pointer #GdkDevice to query to.
944 	 *     x = return location for the X coordinate of @device, or %NULL.
945 	 *     y = return location for the Y coordinate of @device, or %NULL.
946 	 *     mask = return location for the modifier mask, or %NULL.
947 	 *
948 	 * Return: The window underneath @device
949 	 *     (as with gdk_device_get_window_at_position()), or %NULL if the
950 	 *     window is not known to GDK.
951 	 *
952 	 * Since: 3.0
953 	 */
954 	public Window getDevicePosition(Device device, out int x, out int y, out GdkModifierType mask)
955 	{
956 		auto p = gdk_window_get_device_position(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask);
957 		
958 		if(p is null)
959 		{
960 			return null;
961 		}
962 		
963 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
964 	}
965 
966 	/**
967 	 * Obtains the current device position in doubles and modifier state.
968 	 * The position is given in coordinates relative to the upper left
969 	 * corner of @window.
970 	 *
971 	 * Params:
972 	 *     device = pointer #GdkDevice to query to.
973 	 *     x = return location for the X coordinate of @device, or %NULL.
974 	 *     y = return location for the Y coordinate of @device, or %NULL.
975 	 *     mask = return location for the modifier mask, or %NULL.
976 	 *
977 	 * Return: The window underneath @device
978 	 *     (as with gdk_device_get_window_at_position()), or %NULL if the
979 	 *     window is not known to GDK.
980 	 *
981 	 * Since: 3.10
982 	 */
983 	public Window getDevicePositionDouble(Device device, out double x, out double y, out GdkModifierType mask)
984 	{
985 		auto p = gdk_window_get_device_position_double(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask);
986 		
987 		if(p is null)
988 		{
989 			return null;
990 		}
991 		
992 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
993 	}
994 
995 	/**
996 	 * Gets the #GdkDisplay associated with a #GdkWindow.
997 	 *
998 	 * Return: the #GdkDisplay associated with @window
999 	 *
1000 	 * Since: 2.24
1001 	 */
1002 	public Display getDisplay()
1003 	{
1004 		auto p = gdk_window_get_display(gdkWindow);
1005 		
1006 		if(p is null)
1007 		{
1008 			return null;
1009 		}
1010 		
1011 		return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p);
1012 	}
1013 
1014 	/**
1015 	 * Finds out the DND protocol supported by a window.
1016 	 *
1017 	 * Params:
1018 	 *     target = location of the window
1019 	 *         where the drop should happen. This may be @window or a proxy window,
1020 	 *         or %NULL if @window does not support Drag and Drop.
1021 	 *
1022 	 * Return: the supported DND protocol.
1023 	 *
1024 	 * Since: 3.0
1025 	 */
1026 	public GdkDragProtocol getDragProtocol(out Window target)
1027 	{
1028 		GdkWindow* outtarget = null;
1029 		
1030 		auto p = gdk_window_get_drag_protocol(gdkWindow, &outtarget);
1031 		
1032 		target = ObjectG.getDObject!(Window)(outtarget);
1033 		
1034 		return p;
1035 	}
1036 
1037 	/**
1038 	 * Obtains the parent of @window, as known to GDK. Works like
1039 	 * gdk_window_get_parent() for normal windows, but returns the
1040 	 * window’s embedder for offscreen windows.
1041 	 *
1042 	 * See also: gdk_offscreen_window_get_embedder()
1043 	 *
1044 	 * Return: effective parent of @window
1045 	 *
1046 	 * Since: 2.22
1047 	 */
1048 	public Window getEffectiveParent()
1049 	{
1050 		auto p = gdk_window_get_effective_parent(gdkWindow);
1051 		
1052 		if(p is null)
1053 		{
1054 			return null;
1055 		}
1056 		
1057 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
1058 	}
1059 
1060 	/**
1061 	 * Gets the toplevel window that’s an ancestor of @window.
1062 	 *
1063 	 * Works like gdk_window_get_toplevel(), but treats an offscreen window's
1064 	 * embedder as its parent, using gdk_window_get_effective_parent().
1065 	 *
1066 	 * See also: gdk_offscreen_window_get_embedder()
1067 	 *
1068 	 * Return: the effective toplevel window containing @window
1069 	 *
1070 	 * Since: 2.22
1071 	 */
1072 	public Window getEffectiveToplevel()
1073 	{
1074 		auto p = gdk_window_get_effective_toplevel(gdkWindow);
1075 		
1076 		if(p is null)
1077 		{
1078 			return null;
1079 		}
1080 		
1081 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
1082 	}
1083 
1084 	/**
1085 	 * Get the current event compression setting for this window.
1086 	 *
1087 	 * Return: %TRUE if motion events will be compressed
1088 	 *
1089 	 * Since: 3.12
1090 	 */
1091 	public bool getEventCompression()
1092 	{
1093 		return gdk_window_get_event_compression(gdkWindow) != 0;
1094 	}
1095 
1096 	/**
1097 	 * Gets the event mask for @window for all master input devices. See
1098 	 * gdk_window_set_events().
1099 	 *
1100 	 * Return: event mask for @window
1101 	 */
1102 	public GdkEventMask getEvents()
1103 	{
1104 		return gdk_window_get_events(gdkWindow);
1105 	}
1106 
1107 	/**
1108 	 * Determines whether or not the desktop environment should be hinted that the
1109 	 * window does not want to receive input focus when it is mapped.
1110 	 *
1111 	 * Return: whether or not the window wants to receive input focus when
1112 	 *     it is mapped.
1113 	 *
1114 	 * Since: 2.22
1115 	 */
1116 	public bool getFocusOnMap()
1117 	{
1118 		return gdk_window_get_focus_on_map(gdkWindow) != 0;
1119 	}
1120 
1121 	/**
1122 	 * Gets the frame clock for the window. The frame clock for a window
1123 	 * never changes unless the window is reparented to a new toplevel
1124 	 * window.
1125 	 *
1126 	 * Return: the frame clock
1127 	 *
1128 	 * Since: 3.8
1129 	 */
1130 	public FrameClock getFrameClock()
1131 	{
1132 		auto p = gdk_window_get_frame_clock(gdkWindow);
1133 		
1134 		if(p is null)
1135 		{
1136 			return null;
1137 		}
1138 		
1139 		return ObjectG.getDObject!(FrameClock)(cast(GdkFrameClock*) p);
1140 	}
1141 
1142 	/**
1143 	 * Obtains the bounding box of the window, including window manager
1144 	 * titlebar/borders if any. The frame position is given in root window
1145 	 * coordinates. To get the position of the window itself (rather than
1146 	 * the frame) in root window coordinates, use gdk_window_get_origin().
1147 	 *
1148 	 * Params:
1149 	 *     rect = rectangle to fill with bounding box of the window frame
1150 	 */
1151 	public void getFrameExtents(out GdkRectangle rect)
1152 	{
1153 		gdk_window_get_frame_extents(gdkWindow, &rect);
1154 	}
1155 
1156 	/**
1157 	 * Obtains the #GdkFullscreenMode of the @window.
1158 	 *
1159 	 * Return: The #GdkFullscreenMode applied to the window when fullscreen.
1160 	 *
1161 	 * Since: 3.8
1162 	 */
1163 	public GdkFullscreenMode getFullscreenMode()
1164 	{
1165 		return gdk_window_get_fullscreen_mode(gdkWindow);
1166 	}
1167 
1168 	/**
1169 	 * Any of the return location arguments to this function may be %NULL,
1170 	 * if you aren’t interested in getting the value of that field.
1171 	 *
1172 	 * The X and Y coordinates returned are relative to the parent window
1173 	 * of @window, which for toplevels usually means relative to the
1174 	 * window decorations (titlebar, etc.) rather than relative to the
1175 	 * root window (screen-size background window).
1176 	 *
1177 	 * On the X11 platform, the geometry is obtained from the X server,
1178 	 * so reflects the latest position of @window; this may be out-of-sync
1179 	 * with the position of @window delivered in the most-recently-processed
1180 	 * #GdkEventConfigure. gdk_window_get_position() in contrast gets the
1181 	 * position from the most recent configure event.
1182 	 *
1183 	 * Note: If @window is not a toplevel, it is much better
1184 	 * to call gdk_window_get_position(), gdk_window_get_width() and
1185 	 * gdk_window_get_height() instead, because it avoids the roundtrip to
1186 	 * the X server and because these functions support the full 32-bit
1187 	 * coordinate space, whereas gdk_window_get_geometry() is restricted to
1188 	 * the 16-bit coordinates of X11.
1189 	 *
1190 	 * Params:
1191 	 *     x = return location for X coordinate of window (relative to its parent)
1192 	 *     y = return location for Y coordinate of window (relative to its parent)
1193 	 *     width = return location for width of window
1194 	 *     height = return location for height of window
1195 	 */
1196 	public void getGeometry(out int x, out int y, out int width, out int height)
1197 	{
1198 		gdk_window_get_geometry(gdkWindow, &x, &y, &width, &height);
1199 	}
1200 
1201 	/**
1202 	 * Returns the group leader window for @window. See gdk_window_set_group().
1203 	 *
1204 	 * Return: the group leader window for @window
1205 	 *
1206 	 * Since: 2.4
1207 	 */
1208 	public Window getGroup()
1209 	{
1210 		auto p = gdk_window_get_group(gdkWindow);
1211 		
1212 		if(p is null)
1213 		{
1214 			return null;
1215 		}
1216 		
1217 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
1218 	}
1219 
1220 	/**
1221 	 * Returns the height of the given @window.
1222 	 *
1223 	 * On the X11 platform the returned size is the size reported in the
1224 	 * most-recently-processed configure event, rather than the current
1225 	 * size on the X server.
1226 	 *
1227 	 * Return: The height of @window
1228 	 *
1229 	 * Since: 2.24
1230 	 */
1231 	public int getHeight()
1232 	{
1233 		return gdk_window_get_height(gdkWindow);
1234 	}
1235 
1236 	/**
1237 	 * Determines whether or not the window manager is hinted that @window
1238 	 * has modal behaviour.
1239 	 *
1240 	 * Return: whether or not the window has the modal hint set.
1241 	 *
1242 	 * Since: 2.22
1243 	 */
1244 	public bool getModalHint()
1245 	{
1246 		return gdk_window_get_modal_hint(gdkWindow) != 0;
1247 	}
1248 
1249 	/**
1250 	 * Obtains the position of a window in root window coordinates.
1251 	 * (Compare with gdk_window_get_position() and
1252 	 * gdk_window_get_geometry() which return the position of a window
1253 	 * relative to its parent window.)
1254 	 *
1255 	 * Params:
1256 	 *     x = return location for X coordinate
1257 	 *     y = return location for Y coordinate
1258 	 *
1259 	 * Return: not meaningful, ignore
1260 	 */
1261 	public int getOrigin(out int x, out int y)
1262 	{
1263 		return gdk_window_get_origin(gdkWindow, &x, &y);
1264 	}
1265 
1266 	/**
1267 	 * Obtains the parent of @window, as known to GDK. Does not query the
1268 	 * X server; thus this returns the parent as passed to gdk_window_new(),
1269 	 * not the actual parent. This should never matter unless you’re using
1270 	 * Xlib calls mixed with GDK calls on the X11 platform. It may also
1271 	 * matter for toplevel windows, because the window manager may choose
1272 	 * to reparent them.
1273 	 *
1274 	 * Note that you should use gdk_window_get_effective_parent() when
1275 	 * writing generic code that walks up a window hierarchy, because
1276 	 * gdk_window_get_parent() will most likely not do what you expect if
1277 	 * there are offscreen windows in the hierarchy.
1278 	 *
1279 	 * Return: parent of @window
1280 	 */
1281 	public Window getParent()
1282 	{
1283 		auto p = gdk_window_get_parent(gdkWindow);
1284 		
1285 		if(p is null)
1286 		{
1287 			return null;
1288 		}
1289 		
1290 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
1291 	}
1292 
1293 	/**
1294 	 * Obtains the current pointer position and modifier state.
1295 	 * The position is given in coordinates relative to the upper left
1296 	 * corner of @window.
1297 	 *
1298 	 * Deprecated: Use gdk_window_get_device_position() instead.
1299 	 *
1300 	 * Params:
1301 	 *     x = return location for X coordinate of pointer or %NULL to not
1302 	 *         return the X coordinate
1303 	 *     y = return location for Y coordinate of pointer or %NULL to not
1304 	 *         return the Y coordinate
1305 	 *     mask = return location for modifier mask or %NULL to not return the
1306 	 *         modifier mask
1307 	 *
1308 	 * Return: the window containing the
1309 	 *     pointer (as with gdk_window_at_pointer()), or %NULL if the window
1310 	 *     containing the pointer isn’t known to GDK
1311 	 */
1312 	public Window getPointer(out int x, out int y, out GdkModifierType mask)
1313 	{
1314 		auto p = gdk_window_get_pointer(gdkWindow, &x, &y, &mask);
1315 		
1316 		if(p is null)
1317 		{
1318 			return null;
1319 		}
1320 		
1321 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
1322 	}
1323 
1324 	/**
1325 	 * Obtains the position of the window as reported in the
1326 	 * most-recently-processed #GdkEventConfigure. Contrast with
1327 	 * gdk_window_get_geometry() which queries the X server for the
1328 	 * current window position, regardless of which events have been
1329 	 * received or processed.
1330 	 *
1331 	 * The position coordinates are relative to the window’s parent window.
1332 	 *
1333 	 * Params:
1334 	 *     x = X coordinate of window
1335 	 *     y = Y coordinate of window
1336 	 */
1337 	public void getPosition(out int x, out int y)
1338 	{
1339 		gdk_window_get_position(gdkWindow, &x, &y);
1340 	}
1341 
1342 	/**
1343 	 * Obtains the position of a window position in root
1344 	 * window coordinates. This is similar to
1345 	 * gdk_window_get_origin() but allows you to pass
1346 	 * in any position in the window, not just the origin.
1347 	 *
1348 	 * Params:
1349 	 *     x = X coordinate in window
1350 	 *     y = Y coordinate in window
1351 	 *     rootX = return location for X coordinate
1352 	 *     rootY = return location for Y coordinate
1353 	 *
1354 	 * Since: 2.18
1355 	 */
1356 	public void getRootCoords(int x, int y, out int rootX, out int rootY)
1357 	{
1358 		gdk_window_get_root_coords(gdkWindow, x, y, &rootX, &rootY);
1359 	}
1360 
1361 	/**
1362 	 * Obtains the top-left corner of the window manager frame in root
1363 	 * window coordinates.
1364 	 *
1365 	 * Params:
1366 	 *     x = return location for X position of window frame
1367 	 *     y = return location for Y position of window frame
1368 	 */
1369 	public void getRootOrigin(out int x, out int y)
1370 	{
1371 		gdk_window_get_root_origin(gdkWindow, &x, &y);
1372 	}
1373 
1374 	/**
1375 	 * Returns the internal scale factor that maps from window coordiantes
1376 	 * to the actual device pixels. On traditional systems this is 1, but
1377 	 * on very high density outputs this can be a higher value (often 2).
1378 	 *
1379 	 * A higher value means that drawing is automatically scaled up to
1380 	 * a higher resolution, so any code doing drawing will automatically look
1381 	 * nicer. However, if you are supplying pixel-based data the scale
1382 	 * value can be used to determine whether to use a pixel resource
1383 	 * with higher resolution data.
1384 	 *
1385 	 * The scale of a window may change during runtime, if this happens
1386 	 * a configure event will be sent to the toplevel window.
1387 	 *
1388 	 * Return: the scale factor
1389 	 *
1390 	 * Since: 3.10
1391 	 */
1392 	public int getScaleFactor()
1393 	{
1394 		return gdk_window_get_scale_factor(gdkWindow);
1395 	}
1396 
1397 	/**
1398 	 * Gets the #GdkScreen associated with a #GdkWindow.
1399 	 *
1400 	 * Return: the #GdkScreen associated with @window
1401 	 *
1402 	 * Since: 2.24
1403 	 */
1404 	public Screen getScreen()
1405 	{
1406 		auto p = gdk_window_get_screen(gdkWindow);
1407 		
1408 		if(p is null)
1409 		{
1410 			return null;
1411 		}
1412 		
1413 		return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p);
1414 	}
1415 
1416 	/**
1417 	 * Returns the event mask for @window corresponding to the device class specified
1418 	 * by @source.
1419 	 *
1420 	 * Params:
1421 	 *     source = a #GdkInputSource to define the source class.
1422 	 *
1423 	 * Return: source event mask for @window
1424 	 */
1425 	public GdkEventMask getSourceEvents(GdkInputSource source)
1426 	{
1427 		return gdk_window_get_source_events(gdkWindow, source);
1428 	}
1429 
1430 	/**
1431 	 * Gets the bitwise OR of the currently active window state flags,
1432 	 * from the #GdkWindowState enumeration.
1433 	 *
1434 	 * Return: window state bitfield
1435 	 */
1436 	public GdkWindowState getState()
1437 	{
1438 		return gdk_window_get_state(gdkWindow);
1439 	}
1440 
1441 	/**
1442 	 * Returns %TRUE if the window is aware of the existence of multiple
1443 	 * devices.
1444 	 *
1445 	 * Return: %TRUE if the window handles multidevice features.
1446 	 *
1447 	 * Since: 3.0
1448 	 */
1449 	public bool getSupportMultidevice()
1450 	{
1451 		return gdk_window_get_support_multidevice(gdkWindow) != 0;
1452 	}
1453 
1454 	/**
1455 	 * Gets the toplevel window that’s an ancestor of @window.
1456 	 *
1457 	 * Any window type but %GDK_WINDOW_CHILD is considered a
1458 	 * toplevel window, as is a %GDK_WINDOW_CHILD window that
1459 	 * has a root window as parent.
1460 	 *
1461 	 * Note that you should use gdk_window_get_effective_toplevel() when
1462 	 * you want to get to a window’s toplevel as seen on screen, because
1463 	 * gdk_window_get_toplevel() will most likely not do what you expect
1464 	 * if there are offscreen windows in the hierarchy.
1465 	 *
1466 	 * Return: the toplevel window containing @window
1467 	 */
1468 	public Window getToplevel()
1469 	{
1470 		auto p = gdk_window_get_toplevel(gdkWindow);
1471 		
1472 		if(p is null)
1473 		{
1474 			return null;
1475 		}
1476 		
1477 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
1478 	}
1479 
1480 	/**
1481 	 * This function returns the type hint set for a window.
1482 	 *
1483 	 * Return: The type hint set for @window
1484 	 *
1485 	 * Since: 2.10
1486 	 */
1487 	public GdkWindowTypeHint getTypeHint()
1488 	{
1489 		return gdk_window_get_type_hint(gdkWindow);
1490 	}
1491 
1492 	/**
1493 	 * Transfers ownership of the update area from @window to the caller
1494 	 * of the function. That is, after calling this function, @window will
1495 	 * no longer have an invalid/dirty region; the update area is removed
1496 	 * from @window and handed to you. If a window has no update area,
1497 	 * gdk_window_get_update_area() returns %NULL. You are responsible for
1498 	 * calling cairo_region_destroy() on the returned region if it’s non-%NULL.
1499 	 *
1500 	 * Return: the update area for @window
1501 	 */
1502 	public Region getUpdateArea()
1503 	{
1504 		auto p = gdk_window_get_update_area(gdkWindow);
1505 		
1506 		if(p is null)
1507 		{
1508 			return null;
1509 		}
1510 		
1511 		return new Region(cast(cairo_region_t*) p);
1512 	}
1513 
1514 	/**
1515 	 * Retrieves the user data for @window, which is normally the widget
1516 	 * that @window belongs to. See gdk_window_set_user_data().
1517 	 *
1518 	 * Params:
1519 	 *     data = return location for user data
1520 	 */
1521 	public void getUserData(out void* data)
1522 	{
1523 		gdk_window_get_user_data(gdkWindow, &data);
1524 	}
1525 
1526 	/**
1527 	 * Computes the region of the @window that is potentially visible.
1528 	 * This does not necessarily take into account if the window is
1529 	 * obscured by other windows, but no area outside of this region
1530 	 * is visible.
1531 	 *
1532 	 * Return: a #cairo_region_t. This must be freed with cairo_region_destroy()
1533 	 *     when you are done.
1534 	 */
1535 	public Region getVisibleRegion()
1536 	{
1537 		auto p = gdk_window_get_visible_region(gdkWindow);
1538 		
1539 		if(p is null)
1540 		{
1541 			return null;
1542 		}
1543 		
1544 		return new Region(cast(cairo_region_t*) p);
1545 	}
1546 
1547 	/**
1548 	 * Gets the #GdkVisual describing the pixel format of @window.
1549 	 *
1550 	 * Return: a #GdkVisual
1551 	 *
1552 	 * Since: 2.24
1553 	 */
1554 	public Visual getVisual()
1555 	{
1556 		auto p = gdk_window_get_visual(gdkWindow);
1557 		
1558 		if(p is null)
1559 		{
1560 			return null;
1561 		}
1562 		
1563 		return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p);
1564 	}
1565 
1566 	/**
1567 	 * Returns the width of the given @window.
1568 	 *
1569 	 * On the X11 platform the returned size is the size reported in the
1570 	 * most-recently-processed configure event, rather than the current
1571 	 * size on the X server.
1572 	 *
1573 	 * Return: The width of @window
1574 	 *
1575 	 * Since: 2.24
1576 	 */
1577 	public int getWidth()
1578 	{
1579 		return gdk_window_get_width(gdkWindow);
1580 	}
1581 
1582 	/**
1583 	 * Gets the type of the window. See #GdkWindowType.
1584 	 *
1585 	 * Return: type of window
1586 	 */
1587 	public GdkWindowType getWindowType()
1588 	{
1589 		return gdk_window_get_window_type(gdkWindow);
1590 	}
1591 
1592 	/**
1593 	 * Checks whether the window has a native window or not. Note that
1594 	 * you can use gdk_window_ensure_native() if a native window is needed.
1595 	 *
1596 	 * Return: %TRUE if the @window has a native window, %FALSE otherwise.
1597 	 *
1598 	 * Since: 2.22
1599 	 */
1600 	public bool hasNative()
1601 	{
1602 		return gdk_window_has_native(gdkWindow) != 0;
1603 	}
1604 
1605 	/**
1606 	 * For toplevel windows, withdraws them, so they will no longer be
1607 	 * known to the window manager; for all windows, unmaps them, so
1608 	 * they won’t be displayed. Normally done automatically as
1609 	 * part of gtk_widget_hide().
1610 	 */
1611 	public void hide()
1612 	{
1613 		gdk_window_hide(gdkWindow);
1614 	}
1615 
1616 	/**
1617 	 * Asks to iconify (minimize) @window. The window manager may choose
1618 	 * to ignore the request, but normally will honor it. Using
1619 	 * gtk_window_iconify() is preferred, if you have a #GtkWindow widget.
1620 	 *
1621 	 * This function only makes sense when @window is a toplevel window.
1622 	 */
1623 	public void iconify()
1624 	{
1625 		gdk_window_iconify(gdkWindow);
1626 	}
1627 
1628 	/**
1629 	 * Like gdk_window_shape_combine_region(), but the shape applies
1630 	 * only to event handling. Mouse events which happen while
1631 	 * the pointer position corresponds to an unset bit in the
1632 	 * mask will be passed on the window below @window.
1633 	 *
1634 	 * An input shape is typically used with RGBA windows.
1635 	 * The alpha channel of the window defines which pixels are
1636 	 * invisible and allows for nicely antialiased borders,
1637 	 * and the input shape controls where the window is
1638 	 * “clickable”.
1639 	 *
1640 	 * On the X11 platform, this requires version 1.1 of the
1641 	 * shape extension.
1642 	 *
1643 	 * On the Win32 platform, this functionality is not present and the
1644 	 * function does nothing.
1645 	 *
1646 	 * Params:
1647 	 *     shapeRegion = region of window to be non-transparent
1648 	 *     offsetX = X position of @shape_region in @window coordinates
1649 	 *     offsetY = Y position of @shape_region in @window coordinates
1650 	 *
1651 	 * Since: 2.10
1652 	 */
1653 	public void inputShapeCombineRegion(Region shapeRegion, int offsetX, int offsetY)
1654 	{
1655 		gdk_window_input_shape_combine_region(gdkWindow, (shapeRegion is null) ? null : shapeRegion.getRegionStruct(), offsetX, offsetY);
1656 	}
1657 
1658 	/**
1659 	 * Adds @region to the update area for @window. The update area is the
1660 	 * region that needs to be redrawn, or “dirty region.” The call
1661 	 * gdk_window_process_updates() sends one or more expose events to the
1662 	 * window, which together cover the entire update area. An
1663 	 * application would normally redraw the contents of @window in
1664 	 * response to those expose events.
1665 	 *
1666 	 * GDK will call gdk_window_process_all_updates() on your behalf
1667 	 * whenever your program returns to the main loop and becomes idle, so
1668 	 * normally there’s no need to do that manually, you just need to
1669 	 * invalidate regions that you know should be redrawn.
1670 	 *
1671 	 * The @child_func parameter controls whether the region of
1672 	 * each child window that intersects @region will also be invalidated.
1673 	 * Only children for which @child_func returns #TRUE will have the area
1674 	 * invalidated.
1675 	 *
1676 	 * Params:
1677 	 *     region = a #cairo_region_t
1678 	 *     childFunc = function to use to decide if to
1679 	 *         recurse to a child, %NULL means never recurse.
1680 	 *     userData = data passed to @child_func
1681 	 */
1682 	public void invalidateMaybeRecurse(Region region, GdkWindowChildFunc childFunc, void* userData)
1683 	{
1684 		gdk_window_invalidate_maybe_recurse(gdkWindow, (region is null) ? null : region.getRegionStruct(), childFunc, userData);
1685 	}
1686 
1687 	/**
1688 	 * A convenience wrapper around gdk_window_invalidate_region() which
1689 	 * invalidates a rectangular region. See
1690 	 * gdk_window_invalidate_region() for details.
1691 	 *
1692 	 * Params:
1693 	 *     rect = rectangle to invalidate or %NULL to invalidate the whole
1694 	 *         window
1695 	 *     invalidateChildren = whether to also invalidate child windows
1696 	 */
1697 	public void invalidateRect(GdkRectangle* rect, bool invalidateChildren)
1698 	{
1699 		gdk_window_invalidate_rect(gdkWindow, rect, invalidateChildren);
1700 	}
1701 
1702 	/**
1703 	 * Adds @region to the update area for @window. The update area is the
1704 	 * region that needs to be redrawn, or “dirty region.” The call
1705 	 * gdk_window_process_updates() sends one or more expose events to the
1706 	 * window, which together cover the entire update area. An
1707 	 * application would normally redraw the contents of @window in
1708 	 * response to those expose events.
1709 	 *
1710 	 * GDK will call gdk_window_process_all_updates() on your behalf
1711 	 * whenever your program returns to the main loop and becomes idle, so
1712 	 * normally there’s no need to do that manually, you just need to
1713 	 * invalidate regions that you know should be redrawn.
1714 	 *
1715 	 * The @invalidate_children parameter controls whether the region of
1716 	 * each child window that intersects @region will also be invalidated.
1717 	 * If %FALSE, then the update area for child windows will remain
1718 	 * unaffected. See gdk_window_invalidate_maybe_recurse if you need
1719 	 * fine grained control over which children are invalidated.
1720 	 *
1721 	 * Params:
1722 	 *     region = a #cairo_region_t
1723 	 *     invalidateChildren = %TRUE to also invalidate child windows
1724 	 */
1725 	public void invalidateRegion(Region region, bool invalidateChildren)
1726 	{
1727 		gdk_window_invalidate_region(gdkWindow, (region is null) ? null : region.getRegionStruct(), invalidateChildren);
1728 	}
1729 
1730 	/**
1731 	 * Check to see if a window is destroyed..
1732 	 *
1733 	 * Return: %TRUE if the window is destroyed
1734 	 *
1735 	 * Since: 2.18
1736 	 */
1737 	public bool isDestroyed()
1738 	{
1739 		return gdk_window_is_destroyed(gdkWindow) != 0;
1740 	}
1741 
1742 	/**
1743 	 * Determines whether or not the window is an input only window.
1744 	 *
1745 	 * Return: %TRUE if @window is input only
1746 	 *
1747 	 * Since: 2.22
1748 	 */
1749 	public bool isInputOnly()
1750 	{
1751 		return gdk_window_is_input_only(gdkWindow) != 0;
1752 	}
1753 
1754 	/**
1755 	 * Determines whether or not the window is shaped.
1756 	 *
1757 	 * Return: %TRUE if @window is shaped
1758 	 *
1759 	 * Since: 2.22
1760 	 */
1761 	public bool isShaped()
1762 	{
1763 		return gdk_window_is_shaped(gdkWindow) != 0;
1764 	}
1765 
1766 	/**
1767 	 * Check if the window and all ancestors of the window are
1768 	 * mapped. (This is not necessarily "viewable" in the X sense, since
1769 	 * we only check as far as we have GDK window parents, not to the root
1770 	 * window.)
1771 	 *
1772 	 * Return: %TRUE if the window is viewable
1773 	 */
1774 	public bool isViewable()
1775 	{
1776 		return gdk_window_is_viewable(gdkWindow) != 0;
1777 	}
1778 
1779 	/**
1780 	 * Checks whether the window has been mapped (with gdk_window_show() or
1781 	 * gdk_window_show_unraised()).
1782 	 *
1783 	 * Return: %TRUE if the window is mapped
1784 	 */
1785 	public bool isVisible()
1786 	{
1787 		return gdk_window_is_visible(gdkWindow) != 0;
1788 	}
1789 
1790 	/**
1791 	 * Lowers @window to the bottom of the Z-order (stacking order), so that
1792 	 * other windows with the same parent window appear above @window.
1793 	 * This is true whether or not the other windows are visible.
1794 	 *
1795 	 * If @window is a toplevel, the window manager may choose to deny the
1796 	 * request to move the window in the Z-order, gdk_window_lower() only
1797 	 * requests the restack, does not guarantee it.
1798 	 *
1799 	 * Note that gdk_window_show() raises the window again, so don’t call this
1800 	 * function before gdk_window_show(). (Try gdk_window_show_unraised().)
1801 	 */
1802 	public void lower()
1803 	{
1804 		gdk_window_lower(gdkWindow);
1805 	}
1806 
1807 	/**
1808 	 * If you call this during a paint (e.g. between gdk_window_begin_paint_region()
1809 	 * and gdk_window_end_paint() then GDK will mark the current clip region of the
1810 	 * window as being drawn. This is required when mixing GL rendering via
1811 	 * gdk_cairo_draw_from_gl() and cairo rendering, as otherwise GDK has no way
1812 	 * of knowing when something paints over the GL-drawn regions.
1813 	 *
1814 	 * This is typically called automatically by GTK+ and you don't need
1815 	 * to care about this.
1816 	 *
1817 	 * Params:
1818 	 *     cr = a #cairo_t
1819 	 *
1820 	 * Since: 3.16
1821 	 */
1822 	public void markPaintFromClip(Context cr)
1823 	{
1824 		gdk_window_mark_paint_from_clip(gdkWindow, (cr is null) ? null : cr.getContextStruct());
1825 	}
1826 
1827 	/**
1828 	 * Maximizes the window. If the window was already maximized, then
1829 	 * this function does nothing.
1830 	 *
1831 	 * On X11, asks the window manager to maximize @window, if the window
1832 	 * manager supports this operation. Not all window managers support
1833 	 * this, and some deliberately ignore it or don’t have a concept of
1834 	 * “maximized”; so you can’t rely on the maximization actually
1835 	 * happening. But it will happen with most standard window managers,
1836 	 * and GDK makes a best effort to get it to happen.
1837 	 *
1838 	 * On Windows, reliably maximizes the window.
1839 	 */
1840 	public void maximize()
1841 	{
1842 		gdk_window_maximize(gdkWindow);
1843 	}
1844 
1845 	/**
1846 	 * Merges the input shape masks for any child windows into the
1847 	 * input shape mask for @window. i.e. the union of all input masks
1848 	 * for @window and its children will become the new input mask
1849 	 * for @window. See gdk_window_input_shape_combine_region().
1850 	 *
1851 	 * This function is distinct from gdk_window_set_child_input_shapes()
1852 	 * because it includes @window’s input shape mask in the set of
1853 	 * shapes to be merged.
1854 	 *
1855 	 * Since: 2.10
1856 	 */
1857 	public void mergeChildInputShapes()
1858 	{
1859 		gdk_window_merge_child_input_shapes(gdkWindow);
1860 	}
1861 
1862 	/**
1863 	 * Merges the shape masks for any child windows into the
1864 	 * shape mask for @window. i.e. the union of all masks
1865 	 * for @window and its children will become the new mask
1866 	 * for @window. See gdk_window_shape_combine_region().
1867 	 *
1868 	 * This function is distinct from gdk_window_set_child_shapes()
1869 	 * because it includes @window’s shape mask in the set of shapes to
1870 	 * be merged.
1871 	 */
1872 	public void mergeChildShapes()
1873 	{
1874 		gdk_window_merge_child_shapes(gdkWindow);
1875 	}
1876 
1877 	/**
1878 	 * Repositions a window relative to its parent window.
1879 	 * For toplevel windows, window managers may ignore or modify the move;
1880 	 * you should probably use gtk_window_move() on a #GtkWindow widget
1881 	 * anyway, instead of using GDK functions. For child windows,
1882 	 * the move will reliably succeed.
1883 	 *
1884 	 * If you’re also planning to resize the window, use gdk_window_move_resize()
1885 	 * to both move and resize simultaneously, for a nicer visual effect.
1886 	 *
1887 	 * Params:
1888 	 *     x = X coordinate relative to window’s parent
1889 	 *     y = Y coordinate relative to window’s parent
1890 	 */
1891 	public void move(int x, int y)
1892 	{
1893 		gdk_window_move(gdkWindow, x, y);
1894 	}
1895 
1896 	/**
1897 	 * Move the part of @window indicated by @region by @dy pixels in the Y
1898 	 * direction and @dx pixels in the X direction. The portions of @region
1899 	 * that not covered by the new position of @region are invalidated.
1900 	 *
1901 	 * Child windows are not moved.
1902 	 *
1903 	 * Params:
1904 	 *     region = The #cairo_region_t to move
1905 	 *     dx = Amount to move in the X direction
1906 	 *     dy = Amount to move in the Y direction
1907 	 *
1908 	 * Since: 2.8
1909 	 */
1910 	public void moveRegion(Region region, int dx, int dy)
1911 	{
1912 		gdk_window_move_region(gdkWindow, (region is null) ? null : region.getRegionStruct(), dx, dy);
1913 	}
1914 
1915 	/**
1916 	 * Equivalent to calling gdk_window_move() and gdk_window_resize(),
1917 	 * except that both operations are performed at once, avoiding strange
1918 	 * visual effects. (i.e. the user may be able to see the window first
1919 	 * move, then resize, if you don’t use gdk_window_move_resize().)
1920 	 *
1921 	 * Params:
1922 	 *     x = new X position relative to window’s parent
1923 	 *     y = new Y position relative to window’s parent
1924 	 *     width = new width
1925 	 *     height = new height
1926 	 */
1927 	public void moveResize(int x, int y, int width, int height)
1928 	{
1929 		gdk_window_move_resize(gdkWindow, x, y, width, height);
1930 	}
1931 
1932 	/**
1933 	 * Like gdk_window_get_children(), but does not copy the list of
1934 	 * children, so the list does not need to be freed.
1935 	 *
1936 	 * Return: a reference to the list of child windows in @window
1937 	 */
1938 	public ListG peekChildren()
1939 	{
1940 		auto p = gdk_window_peek_children(gdkWindow);
1941 		
1942 		if(p is null)
1943 		{
1944 			return null;
1945 		}
1946 		
1947 		return new ListG(cast(GList*) p);
1948 	}
1949 
1950 	/**
1951 	 * Sends one or more expose events to @window. The areas in each
1952 	 * expose event will cover the entire update area for the window (see
1953 	 * gdk_window_invalidate_region() for details). Normally GDK calls
1954 	 * gdk_window_process_all_updates() on your behalf, so there’s no
1955 	 * need to call this function unless you want to force expose events
1956 	 * to be delivered immediately and synchronously (vs. the usual
1957 	 * case, where GDK delivers them in an idle handler). Occasionally
1958 	 * this is useful to produce nicer scrolling behavior, for example.
1959 	 *
1960 	 * Params:
1961 	 *     updateChildren = whether to also process updates for child windows
1962 	 */
1963 	public void processUpdates(bool updateChildren)
1964 	{
1965 		gdk_window_process_updates(gdkWindow, updateChildren);
1966 	}
1967 
1968 	/**
1969 	 * Raises @window to the top of the Z-order (stacking order), so that
1970 	 * other windows with the same parent window appear below @window.
1971 	 * This is true whether or not the windows are visible.
1972 	 *
1973 	 * If @window is a toplevel, the window manager may choose to deny the
1974 	 * request to move the window in the Z-order, gdk_window_raise() only
1975 	 * requests the restack, does not guarantee it.
1976 	 */
1977 	public void raise()
1978 	{
1979 		gdk_window_raise(gdkWindow);
1980 	}
1981 
1982 	/**
1983 	 * Registers a window as a potential drop destination.
1984 	 */
1985 	public void registerDnd()
1986 	{
1987 		gdk_window_register_dnd(gdkWindow);
1988 	}
1989 
1990 	/**
1991 	 * Remove a filter previously added with gdk_window_add_filter().
1992 	 *
1993 	 * Params:
1994 	 *     funct = previously-added filter function
1995 	 *     data = user data for previously-added filter function
1996 	 */
1997 	public void removeFilter(GdkFilterFunc funct, void* data)
1998 	{
1999 		gdk_window_remove_filter(gdkWindow, funct, data);
2000 	}
2001 
2002 	/**
2003 	 * Reparents @window into the given @new_parent. The window being
2004 	 * reparented will be unmapped as a side effect.
2005 	 *
2006 	 * Params:
2007 	 *     newParent = new parent to move @window into
2008 	 *     x = X location inside the new parent
2009 	 *     y = Y location inside the new parent
2010 	 */
2011 	public void reparent(Window newParent, int x, int y)
2012 	{
2013 		gdk_window_reparent(gdkWindow, (newParent is null) ? null : newParent.getWindowStruct(), x, y);
2014 	}
2015 
2016 	/**
2017 	 * Resizes @window; for toplevel windows, asks the window manager to resize
2018 	 * the window. The window manager may not allow the resize. When using GTK+,
2019 	 * use gtk_window_resize() instead of this low-level GDK function.
2020 	 *
2021 	 * Windows may not be resized below 1x1.
2022 	 *
2023 	 * If you’re also planning to move the window, use gdk_window_move_resize()
2024 	 * to both move and resize simultaneously, for a nicer visual effect.
2025 	 *
2026 	 * Params:
2027 	 *     width = new width of the window
2028 	 *     height = new height of the window
2029 	 */
2030 	public void resize(int width, int height)
2031 	{
2032 		gdk_window_resize(gdkWindow, width, height);
2033 	}
2034 
2035 	/**
2036 	 * Changes the position of  @window in the Z-order (stacking order), so that
2037 	 * it is above @sibling (if @above is %TRUE) or below @sibling (if @above is
2038 	 * %FALSE).
2039 	 *
2040 	 * If @sibling is %NULL, then this either raises (if @above is %TRUE) or
2041 	 * lowers the window.
2042 	 *
2043 	 * If @window is a toplevel, the window manager may choose to deny the
2044 	 * request to move the window in the Z-order, gdk_window_restack() only
2045 	 * requests the restack, does not guarantee it.
2046 	 *
2047 	 * Params:
2048 	 *     sibling = a #GdkWindow that is a sibling of @window, or %NULL
2049 	 *     above = a boolean
2050 	 *
2051 	 * Since: 2.18
2052 	 */
2053 	public void restack(Window sibling, bool above)
2054 	{
2055 		gdk_window_restack(gdkWindow, (sibling is null) ? null : sibling.getWindowStruct(), above);
2056 	}
2057 
2058 	/**
2059 	 * Scroll the contents of @window, both pixels and children, by the
2060 	 * given amount. @window itself does not move. Portions of the window
2061 	 * that the scroll operation brings in from offscreen areas are
2062 	 * invalidated. The invalidated region may be bigger than what would
2063 	 * strictly be necessary.
2064 	 *
2065 	 * For X11, a minimum area will be invalidated if the window has no
2066 	 * subwindows, or if the edges of the window’s parent do not extend
2067 	 * beyond the edges of the window. In other cases, a multi-step process
2068 	 * is used to scroll the window which may produce temporary visual
2069 	 * artifacts and unnecessary invalidations.
2070 	 *
2071 	 * Params:
2072 	 *     dx = Amount to scroll in the X direction
2073 	 *     dy = Amount to scroll in the Y direction
2074 	 */
2075 	public void scroll(int dx, int dy)
2076 	{
2077 		gdk_window_scroll(gdkWindow, dx, dy);
2078 	}
2079 
2080 	/**
2081 	 * Setting @accept_focus to %FALSE hints the desktop environment that the
2082 	 * window doesn’t want to receive input focus.
2083 	 *
2084 	 * On X, it is the responsibility of the window manager to interpret this
2085 	 * hint. ICCCM-compliant window manager usually respect it.
2086 	 *
2087 	 * Params:
2088 	 *     acceptFocus = %TRUE if the window should receive input focus
2089 	 *
2090 	 * Since: 2.4
2091 	 */
2092 	public void setAcceptFocus(bool acceptFocus)
2093 	{
2094 		gdk_window_set_accept_focus(gdkWindow, acceptFocus);
2095 	}
2096 
2097 	/**
2098 	 * Sets the background color of @window.
2099 	 *
2100 	 * However, when using GTK+, influence the background of a widget
2101 	 * using a style class or CSS — if you’re an application — or with
2102 	 * gtk_style_context_set_background() — if you're implementing a
2103 	 * custom widget.
2104 	 *
2105 	 * See also gdk_window_set_background_pattern().
2106 	 *
2107 	 * Deprecated: Use gdk_window_set_background_rgba() instead.
2108 	 *
2109 	 * Params:
2110 	 *     color = a #GdkColor
2111 	 */
2112 	public void setBackground(Color color)
2113 	{
2114 		gdk_window_set_background(gdkWindow, (color is null) ? null : color.getColorStruct());
2115 	}
2116 
2117 	/**
2118 	 * Sets the background of @window.
2119 	 *
2120 	 * A background of %NULL means that the window will inherit its
2121 	 * background from its parent window.
2122 	 *
2123 	 * The windowing system will normally fill a window with its background
2124 	 * when the window is obscured then exposed.
2125 	 *
2126 	 * Params:
2127 	 *     pattern = a pattern to use, or %NULL
2128 	 */
2129 	public void setBackgroundPattern(Pattern pattern)
2130 	{
2131 		gdk_window_set_background_pattern(gdkWindow, (pattern is null) ? null : pattern.getPatternStruct());
2132 	}
2133 
2134 	/**
2135 	 * Sets the background color of @window.
2136 	 *
2137 	 * See also gdk_window_set_background_pattern().
2138 	 *
2139 	 * Params:
2140 	 *     rgba = a #GdkRGBA color
2141 	 */
2142 	public void setBackgroundRgba(RGBA rgba)
2143 	{
2144 		gdk_window_set_background_rgba(gdkWindow, (rgba is null) ? null : rgba.getRGBAStruct());
2145 	}
2146 
2147 	/**
2148 	 * Sets the input shape mask of @window to the union of input shape masks
2149 	 * for all children of @window, ignoring the input shape mask of @window
2150 	 * itself. Contrast with gdk_window_merge_child_input_shapes() which includes
2151 	 * the input shape mask of @window in the masks to be merged.
2152 	 *
2153 	 * Since: 2.10
2154 	 */
2155 	public void setChildInputShapes()
2156 	{
2157 		gdk_window_set_child_input_shapes(gdkWindow);
2158 	}
2159 
2160 	/**
2161 	 * Sets the shape mask of @window to the union of shape masks
2162 	 * for all children of @window, ignoring the shape mask of @window
2163 	 * itself. Contrast with gdk_window_merge_child_shapes() which includes
2164 	 * the shape mask of @window in the masks to be merged.
2165 	 */
2166 	public void setChildShapes()
2167 	{
2168 		gdk_window_set_child_shapes(gdkWindow);
2169 	}
2170 
2171 	/**
2172 	 * Sets a #GdkWindow as composited, or unsets it. Composited
2173 	 * windows do not automatically have their contents drawn to
2174 	 * the screen. Drawing is redirected to an offscreen buffer
2175 	 * and an expose event is emitted on the parent of the composited
2176 	 * window. It is the responsibility of the parent’s expose handler
2177 	 * to manually merge the off-screen content onto the screen in
2178 	 * whatever way it sees fit.
2179 	 *
2180 	 * It only makes sense for child windows to be composited; see
2181 	 * gdk_window_set_opacity() if you need translucent toplevel
2182 	 * windows.
2183 	 *
2184 	 * An additional effect of this call is that the area of this
2185 	 * window is no longer clipped from regions marked for
2186 	 * invalidation on its parent. Draws done on the parent
2187 	 * window are also no longer clipped by the child.
2188 	 *
2189 	 * This call is only supported on some systems (currently,
2190 	 * only X11 with new enough Xcomposite and Xdamage extensions).
2191 	 * You must call gdk_display_supports_composite() to check if
2192 	 * setting a window as composited is supported before
2193 	 * attempting to do so.
2194 	 *
2195 	 * Deprecated: Compositing is an outdated technology that
2196 	 * only ever worked on X11.
2197 	 *
2198 	 * Params:
2199 	 *     composited = %TRUE to set the window as composited
2200 	 *
2201 	 * Since: 2.12
2202 	 */
2203 	public void setComposited(bool composited)
2204 	{
2205 		gdk_window_set_composited(gdkWindow, composited);
2206 	}
2207 
2208 	/**
2209 	 * Sets the default mouse pointer for a #GdkWindow.
2210 	 *
2211 	 * Note that @cursor must be for the same display as @window.
2212 	 *
2213 	 * Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixbuf() to
2214 	 * create the cursor. To make the cursor invisible, use %GDK_BLANK_CURSOR.
2215 	 * Passing %NULL for the @cursor argument to gdk_window_set_cursor() means
2216 	 * that @window will use the cursor of its parent window. Most windows
2217 	 * should use this default.
2218 	 *
2219 	 * Params:
2220 	 *     cursor = a cursor
2221 	 */
2222 	public void setCursor(Cursor cursor)
2223 	{
2224 		gdk_window_set_cursor(gdkWindow, (cursor is null) ? null : cursor.getCursorStruct());
2225 	}
2226 
2227 	/**
2228 	 * “Decorations” are the features the window manager adds to a toplevel #GdkWindow.
2229 	 * This function sets the traditional Motif window manager hints that tell the
2230 	 * window manager which decorations you would like your window to have.
2231 	 * Usually you should use gtk_window_set_decorated() on a #GtkWindow instead of
2232 	 * using the GDK function directly.
2233 	 *
2234 	 * The @decorations argument is the logical OR of the fields in
2235 	 * the #GdkWMDecoration enumeration. If #GDK_DECOR_ALL is included in the
2236 	 * mask, the other bits indicate which decorations should be turned off.
2237 	 * If #GDK_DECOR_ALL is not included, then the other bits indicate
2238 	 * which decorations should be turned on.
2239 	 *
2240 	 * Most window managers honor a decorations hint of 0 to disable all decorations,
2241 	 * but very few honor all possible combinations of bits.
2242 	 *
2243 	 * Params:
2244 	 *     decorations = decoration hint mask
2245 	 */
2246 	public void setDecorations(GdkWMDecoration decorations)
2247 	{
2248 		gdk_window_set_decorations(gdkWindow, decorations);
2249 	}
2250 
2251 	/**
2252 	 * Sets a specific #GdkCursor for a given device when it gets inside @window.
2253 	 * Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixbuf() to create
2254 	 * the cursor. To make the cursor invisible, use %GDK_BLANK_CURSOR. Passing
2255 	 * %NULL for the @cursor argument to gdk_window_set_cursor() means that
2256 	 * @window will use the cursor of its parent window. Most windows should
2257 	 * use this default.
2258 	 *
2259 	 * Params:
2260 	 *     device = a master, pointer #GdkDevice
2261 	 *     cursor = a #GdkCursor
2262 	 *
2263 	 * Since: 3.0
2264 	 */
2265 	public void setDeviceCursor(Device device, Cursor cursor)
2266 	{
2267 		gdk_window_set_device_cursor(gdkWindow, (device is null) ? null : device.getDeviceStruct(), (cursor is null) ? null : cursor.getCursorStruct());
2268 	}
2269 
2270 	/**
2271 	 * Sets the event mask for a given device (Normally a floating device, not
2272 	 * attached to any visible pointer) to @window. For example, an event mask
2273 	 * including #GDK_BUTTON_PRESS_MASK means the window should report button
2274 	 * press events. The event mask is the bitwise OR of values from the
2275 	 * #GdkEventMask enumeration.
2276 	 *
2277 	 * See the [input handling overview][event-masks] for details.
2278 	 *
2279 	 * Params:
2280 	 *     device = #GdkDevice to enable events for.
2281 	 *     eventMask = event mask for @window
2282 	 *
2283 	 * Since: 3.0
2284 	 */
2285 	public void setDeviceEvents(Device device, GdkEventMask eventMask)
2286 	{
2287 		gdk_window_set_device_events(gdkWindow, (device is null) ? null : device.getDeviceStruct(), eventMask);
2288 	}
2289 
2290 	/**
2291 	 * Determines whether or not extra unprocessed motion events in
2292 	 * the event queue can be discarded. If %TRUE only the most recent
2293 	 * event will be delivered.
2294 	 *
2295 	 * Some types of applications, e.g. paint programs, need to see all
2296 	 * motion events and will benefit from turning off event compression.
2297 	 *
2298 	 * By default, event compression is enabled.
2299 	 *
2300 	 * Params:
2301 	 *     eventCompression = %TRUE if motion events should be compressed
2302 	 *
2303 	 * Since: 3.12
2304 	 */
2305 	public void setEventCompression(bool eventCompression)
2306 	{
2307 		gdk_window_set_event_compression(gdkWindow, eventCompression);
2308 	}
2309 
2310 	/**
2311 	 * The event mask for a window determines which events will be reported
2312 	 * for that window from all master input devices. For example, an event mask
2313 	 * including #GDK_BUTTON_PRESS_MASK means the window should report button
2314 	 * press events. The event mask is the bitwise OR of values from the
2315 	 * #GdkEventMask enumeration.
2316 	 *
2317 	 * See the [input handling overview][event-masks] for details.
2318 	 *
2319 	 * Params:
2320 	 *     eventMask = event mask for @window
2321 	 */
2322 	public void setEvents(GdkEventMask eventMask)
2323 	{
2324 		gdk_window_set_events(gdkWindow, eventMask);
2325 	}
2326 
2327 	/**
2328 	 * Setting @focus_on_map to %FALSE hints the desktop environment that the
2329 	 * window doesn’t want to receive input focus when it is mapped.
2330 	 * focus_on_map should be turned off for windows that aren’t triggered
2331 	 * interactively (such as popups from network activity).
2332 	 *
2333 	 * On X, it is the responsibility of the window manager to interpret
2334 	 * this hint. Window managers following the freedesktop.org window
2335 	 * manager extension specification should respect it.
2336 	 *
2337 	 * Params:
2338 	 *     focusOnMap = %TRUE if the window should receive input focus when mapped
2339 	 *
2340 	 * Since: 2.6
2341 	 */
2342 	public void setFocusOnMap(bool focusOnMap)
2343 	{
2344 		gdk_window_set_focus_on_map(gdkWindow, focusOnMap);
2345 	}
2346 
2347 	/**
2348 	 * Specifies whether the @window should span over all monitors (in a multi-head
2349 	 * setup) or only the current monitor when in fullscreen mode.
2350 	 *
2351 	 * The @mode argument is from the #GdkFullscreenMode enumeration.
2352 	 * If #GDK_FULLSCREEN_ON_ALL_MONITORS is specified, the fullscreen @window will
2353 	 * span over all monitors from the #GdkScreen.
2354 	 *
2355 	 * On X11, searches through the list of monitors from the #GdkScreen the ones
2356 	 * which delimit the 4 edges of the entire #GdkScreen and will ask the window
2357 	 * manager to span the @window over these monitors.
2358 	 *
2359 	 * If the XINERAMA extension is not available or not usable, this function
2360 	 * has no effect.
2361 	 *
2362 	 * Not all window managers support this, so you can’t rely on the fullscreen
2363 	 * window to span over the multiple monitors when #GDK_FULLSCREEN_ON_ALL_MONITORS
2364 	 * is specified.
2365 	 *
2366 	 * Params:
2367 	 *     mode = fullscreen mode
2368 	 *
2369 	 * Since: 3.8
2370 	 */
2371 	public void setFullscreenMode(GdkFullscreenMode mode)
2372 	{
2373 		gdk_window_set_fullscreen_mode(gdkWindow, mode);
2374 	}
2375 
2376 	/**
2377 	 * Sets hints about the window management functions to make available
2378 	 * via buttons on the window frame.
2379 	 *
2380 	 * On the X backend, this function sets the traditional Motif window
2381 	 * manager hint for this purpose. However, few window managers do
2382 	 * anything reliable or interesting with this hint. Many ignore it
2383 	 * entirely.
2384 	 *
2385 	 * The @functions argument is the logical OR of values from the
2386 	 * #GdkWMFunction enumeration. If the bitmask includes #GDK_FUNC_ALL,
2387 	 * then the other bits indicate which functions to disable; if
2388 	 * it doesn’t include #GDK_FUNC_ALL, it indicates which functions to
2389 	 * enable.
2390 	 *
2391 	 * Params:
2392 	 *     functions = bitmask of operations to allow on @window
2393 	 */
2394 	public void setFunctions(GdkWMFunction functions)
2395 	{
2396 		gdk_window_set_functions(gdkWindow, functions);
2397 	}
2398 
2399 	/**
2400 	 * Sets the geometry hints for @window. Hints flagged in @geom_mask
2401 	 * are set, hints not flagged in @geom_mask are unset.
2402 	 * To unset all hints, use a @geom_mask of 0 and a @geometry of %NULL.
2403 	 *
2404 	 * This function provides hints to the windowing system about
2405 	 * acceptable sizes for a toplevel window. The purpose of
2406 	 * this is to constrain user resizing, but the windowing system
2407 	 * will typically  (but is not required to) also constrain the
2408 	 * current size of the window to the provided values and
2409 	 * constrain programatic resizing via gdk_window_resize() or
2410 	 * gdk_window_move_resize().
2411 	 *
2412 	 * Note that on X11, this effect has no effect on windows
2413 	 * of type %GDK_WINDOW_TEMP or windows where override redirect
2414 	 * has been turned on via gdk_window_set_override_redirect()
2415 	 * since these windows are not resizable by the user.
2416 	 *
2417 	 * Since you can’t count on the windowing system doing the
2418 	 * constraints for programmatic resizes, you should generally
2419 	 * call gdk_window_constrain_size() yourself to determine
2420 	 * appropriate sizes.
2421 	 *
2422 	 * Params:
2423 	 *     geometry = geometry hints
2424 	 *     geomMask = bitmask indicating fields of @geometry to pay attention to
2425 	 */
2426 	public void setGeometryHints(GdkGeometry* geometry, GdkWindowHints geomMask)
2427 	{
2428 		gdk_window_set_geometry_hints(gdkWindow, geometry, geomMask);
2429 	}
2430 
2431 	/**
2432 	 * Sets the group leader window for @window. By default,
2433 	 * GDK sets the group leader for all toplevel windows
2434 	 * to a global window implicitly created by GDK. With this function
2435 	 * you can override this default.
2436 	 *
2437 	 * The group leader window allows the window manager to distinguish
2438 	 * all windows that belong to a single application. It may for example
2439 	 * allow users to minimize/unminimize all windows belonging to an
2440 	 * application at once. You should only set a non-default group window
2441 	 * if your application pretends to be multiple applications.
2442 	 *
2443 	 * Params:
2444 	 *     leader = group leader window, or %NULL to restore the default group leader window
2445 	 */
2446 	public void setGroup(Window leader)
2447 	{
2448 		gdk_window_set_group(gdkWindow, (leader is null) ? null : leader.getWindowStruct());
2449 	}
2450 
2451 	/**
2452 	 * Sets a list of icons for the window. One of these will be used
2453 	 * to represent the window when it has been iconified. The icon is
2454 	 * usually shown in an icon box or some sort of task bar. Which icon
2455 	 * size is shown depends on the window manager. The window manager
2456 	 * can scale the icon  but setting several size icons can give better
2457 	 * image quality since the window manager may only need to scale the
2458 	 * icon by a small amount or not at all.
2459 	 *
2460 	 * Params:
2461 	 *     pixbufs = A list of pixbufs, of different sizes.
2462 	 */
2463 	public void setIconList(ListG pixbufs)
2464 	{
2465 		gdk_window_set_icon_list(gdkWindow, (pixbufs is null) ? null : pixbufs.getListGStruct());
2466 	}
2467 
2468 	/**
2469 	 * Windows may have a name used while minimized, distinct from the
2470 	 * name they display in their titlebar. Most of the time this is a bad
2471 	 * idea from a user interface standpoint. But you can set such a name
2472 	 * with this function, if you like.
2473 	 *
2474 	 * After calling this with a non-%NULL @name, calls to gdk_window_set_title()
2475 	 * will not update the icon title.
2476 	 *
2477 	 * Using %NULL for @name unsets the icon title; further calls to
2478 	 * gdk_window_set_title() will again update the icon title as well.
2479 	 *
2480 	 * Params:
2481 	 *     name = name of window while iconified (minimized)
2482 	 */
2483 	public void setIconName(string name)
2484 	{
2485 		gdk_window_set_icon_name(gdkWindow, Str.toStringz(name));
2486 	}
2487 
2488 	/**
2489 	 * Registers an invalidate handler for a specific window. This
2490 	 * will get called whenever a region in the window or its children
2491 	 * is invalidated.
2492 	 *
2493 	 * This can be used to record the invalidated region, which is
2494 	 * useful if you are keeping an offscreen copy of some region
2495 	 * and want to keep it up to date. You can also modify the
2496 	 * invalidated region in case you’re doing some effect where
2497 	 * e.g. a child widget appears in multiple places.
2498 	 *
2499 	 * Params:
2500 	 *     handler = a #GdkWindowInvalidateHandlerFunc callback function
2501 	 *
2502 	 * Since: 3.10
2503 	 */
2504 	public void setInvalidateHandler(GdkWindowInvalidateHandlerFunc handler)
2505 	{
2506 		gdk_window_set_invalidate_handler(gdkWindow, handler);
2507 	}
2508 
2509 	/**
2510 	 * Set if @window must be kept above other windows. If the
2511 	 * window was already above, then this function does nothing.
2512 	 *
2513 	 * On X11, asks the window manager to keep @window above, if the window
2514 	 * manager supports this operation. Not all window managers support
2515 	 * this, and some deliberately ignore it or don’t have a concept of
2516 	 * “keep above”; so you can’t rely on the window being kept above.
2517 	 * But it will happen with most standard window managers,
2518 	 * and GDK makes a best effort to get it to happen.
2519 	 *
2520 	 * Params:
2521 	 *     setting = whether to keep @window above other windows
2522 	 *
2523 	 * Since: 2.4
2524 	 */
2525 	public void setKeepAbove(bool setting)
2526 	{
2527 		gdk_window_set_keep_above(gdkWindow, setting);
2528 	}
2529 
2530 	/**
2531 	 * Set if @window must be kept below other windows. If the
2532 	 * window was already below, then this function does nothing.
2533 	 *
2534 	 * On X11, asks the window manager to keep @window below, if the window
2535 	 * manager supports this operation. Not all window managers support
2536 	 * this, and some deliberately ignore it or don’t have a concept of
2537 	 * “keep below”; so you can’t rely on the window being kept below.
2538 	 * But it will happen with most standard window managers,
2539 	 * and GDK makes a best effort to get it to happen.
2540 	 *
2541 	 * Params:
2542 	 *     setting = whether to keep @window below other windows
2543 	 *
2544 	 * Since: 2.4
2545 	 */
2546 	public void setKeepBelow(bool setting)
2547 	{
2548 		gdk_window_set_keep_below(gdkWindow, setting);
2549 	}
2550 
2551 	/**
2552 	 * The application can use this hint to tell the window manager
2553 	 * that a certain window has modal behaviour. The window manager
2554 	 * can use this information to handle modal windows in a special
2555 	 * way.
2556 	 *
2557 	 * You should only use this on windows for which you have
2558 	 * previously called gdk_window_set_transient_for()
2559 	 *
2560 	 * Params:
2561 	 *     modal = %TRUE if the window is modal, %FALSE otherwise.
2562 	 */
2563 	public void setModalHint(bool modal)
2564 	{
2565 		gdk_window_set_modal_hint(gdkWindow, modal);
2566 	}
2567 
2568 	/**
2569 	 * Set @window to render as partially transparent,
2570 	 * with opacity 0 being fully transparent and 1 fully opaque. (Values
2571 	 * of the opacity parameter are clamped to the [0,1] range.)
2572 	 *
2573 	 * For toplevel windows this depends on support from the windowing system
2574 	 * that may not always be there. For instance, On X11, this works only on
2575 	 * X screens with a compositing manager running. On Wayland, there is no
2576 	 * per-window opacity value that the compositor would apply. Instead, use
2577 	 * `gdk_window_set_opaque_region (window, NULL)` to tell the compositor
2578 	 * that the entire window is (potentially) non-opaque, and draw your content
2579 	 * with alpha, or use gtk_widget_set_opacity() to set an overall opacity
2580 	 * for your widgets.
2581 	 *
2582 	 * For child windows this function only works for non-native windows.
2583 	 *
2584 	 * For setting up per-pixel alpha topelevels, see gdk_screen_get_rgba_visual(),
2585 	 * and for non-toplevels, see gdk_window_set_composited().
2586 	 *
2587 	 * Support for non-toplevel windows was added in 3.8.
2588 	 *
2589 	 * Params:
2590 	 *     opacity = opacity
2591 	 *
2592 	 * Since: 2.12
2593 	 */
2594 	public void setOpacity(double opacity)
2595 	{
2596 		gdk_window_set_opacity(gdkWindow, opacity);
2597 	}
2598 
2599 	/**
2600 	 * For optimizization purposes, compositing window managers may
2601 	 * like to not draw obscured regions of windows, or turn off blending
2602 	 * during for these regions. With RGB windows with no transparency,
2603 	 * this is just the shape of the window, but with ARGB32 windows, the
2604 	 * compositor does not know what regions of the window are transparent
2605 	 * or not.
2606 	 *
2607 	 * This function only works for toplevel windows.
2608 	 *
2609 	 * GTK+ will automatically update this property automatically if
2610 	 * the @window background is opaque, as we know where the opaque regions
2611 	 * are. If your window background is not opaque, please update this
2612 	 * property in your #GtkWidget::style-updated handler.
2613 	 *
2614 	 * Params:
2615 	 *     region = a region
2616 	 *
2617 	 * Since: 3.10
2618 	 */
2619 	public void setOpaqueRegion(Region region)
2620 	{
2621 		gdk_window_set_opaque_region(gdkWindow, (region is null) ? null : region.getRegionStruct());
2622 	}
2623 
2624 	/**
2625 	 * An override redirect window is not under the control of the window manager.
2626 	 * This means it won’t have a titlebar, won’t be minimizable, etc. - it will
2627 	 * be entirely under the control of the application. The window manager
2628 	 * can’t see the override redirect window at all.
2629 	 *
2630 	 * Override redirect should only be used for short-lived temporary
2631 	 * windows, such as popup menus. #GtkMenu uses an override redirect
2632 	 * window in its implementation, for example.
2633 	 *
2634 	 * Params:
2635 	 *     overrideRedirect = %TRUE if window should be override redirect
2636 	 */
2637 	public void setOverrideRedirect(bool overrideRedirect)
2638 	{
2639 		gdk_window_set_override_redirect(gdkWindow, overrideRedirect);
2640 	}
2641 
2642 	/**
2643 	 * When using GTK+, typically you should use gtk_window_set_role() instead
2644 	 * of this low-level function.
2645 	 *
2646 	 * The window manager and session manager use a window’s role to
2647 	 * distinguish it from other kinds of window in the same application.
2648 	 * When an application is restarted after being saved in a previous
2649 	 * session, all windows with the same title and role are treated as
2650 	 * interchangeable.  So if you have two windows with the same title
2651 	 * that should be distinguished for session management purposes, you
2652 	 * should set the role on those windows. It doesn’t matter what string
2653 	 * you use for the role, as long as you have a different role for each
2654 	 * non-interchangeable kind of window.
2655 	 *
2656 	 * Params:
2657 	 *     role = a string indicating its role
2658 	 */
2659 	public void setRole(string role)
2660 	{
2661 		gdk_window_set_role(gdkWindow, Str.toStringz(role));
2662 	}
2663 
2664 	/**
2665 	 * Newer GTK+ windows using client-side decorations use extra geometry
2666 	 * around their frames for effects like shadows and invisible borders.
2667 	 * Window managers that want to maximize windows or snap to edges need
2668 	 * to know where the extents of the actual frame lie, so that users
2669 	 * don’t feel like windows are snapping against random invisible edges.
2670 	 *
2671 	 * Note that this property is automatically updated by GTK+, so this
2672 	 * function should only be used by applications which do not use GTK+
2673 	 * to create toplevel windows.
2674 	 *
2675 	 * Params:
2676 	 *     left = The left extent
2677 	 *     right = The right extent
2678 	 *     top = The top extent
2679 	 *     bottom = The bottom extent
2680 	 *
2681 	 * Since: 3.12
2682 	 */
2683 	public void setShadowWidth(int left, int right, int top, int bottom)
2684 	{
2685 		gdk_window_set_shadow_width(gdkWindow, left, right, top, bottom);
2686 	}
2687 
2688 	/**
2689 	 * Toggles whether a window should appear in a pager (workspace
2690 	 * switcher, or other desktop utility program that displays a small
2691 	 * thumbnail representation of the windows on the desktop). If a
2692 	 * window’s semantic type as specified with gdk_window_set_type_hint()
2693 	 * already fully describes the window, this function should
2694 	 * not be called in addition, instead you should
2695 	 * allow the window to be treated according to standard policy for
2696 	 * its semantic type.
2697 	 *
2698 	 * Params:
2699 	 *     skipsPager = %TRUE to skip the pager
2700 	 *
2701 	 * Since: 2.2
2702 	 */
2703 	public void setSkipPagerHint(bool skipsPager)
2704 	{
2705 		gdk_window_set_skip_pager_hint(gdkWindow, skipsPager);
2706 	}
2707 
2708 	/**
2709 	 * Toggles whether a window should appear in a task list or window
2710 	 * list. If a window’s semantic type as specified with
2711 	 * gdk_window_set_type_hint() already fully describes the window, this
2712 	 * function should not be called in addition,
2713 	 * instead you should allow the window to be treated according to
2714 	 * standard policy for its semantic type.
2715 	 *
2716 	 * Params:
2717 	 *     skipsTaskbar = %TRUE to skip the taskbar
2718 	 *
2719 	 * Since: 2.2
2720 	 */
2721 	public void setSkipTaskbarHint(bool skipsTaskbar)
2722 	{
2723 		gdk_window_set_skip_taskbar_hint(gdkWindow, skipsTaskbar);
2724 	}
2725 
2726 	/**
2727 	 * Sets the event mask for any floating device (i.e. not attached to any
2728 	 * visible pointer) that has the source defined as @source. This event
2729 	 * mask will be applied both to currently existing, newly added devices
2730 	 * after this call, and devices being attached/detached.
2731 	 *
2732 	 * Params:
2733 	 *     source = a #GdkInputSource to define the source class.
2734 	 *     eventMask = event mask for @window
2735 	 *
2736 	 * Since: 3.0
2737 	 */
2738 	public void setSourceEvents(GdkInputSource source, GdkEventMask eventMask)
2739 	{
2740 		gdk_window_set_source_events(gdkWindow, source, eventMask);
2741 	}
2742 
2743 	/**
2744 	 * When using GTK+, typically you should use gtk_window_set_startup_id()
2745 	 * instead of this low-level function.
2746 	 *
2747 	 * Params:
2748 	 *     startupId = a string with startup-notification identifier
2749 	 *
2750 	 * Since: 2.12
2751 	 */
2752 	public void setStartupId(string startupId)
2753 	{
2754 		gdk_window_set_startup_id(gdkWindow, Str.toStringz(startupId));
2755 	}
2756 
2757 	/**
2758 	 * Used to set the bit gravity of the given window to static, and flag
2759 	 * it so all children get static subwindow gravity. This is used if you
2760 	 * are implementing scary features that involve deep knowledge of the
2761 	 * windowing system. Don’t worry about it.
2762 	 *
2763 	 * Deprecated: static gravities haven't worked on anything but X11
2764 	 * for a long time.
2765 	 *
2766 	 * Params:
2767 	 *     useStatic = %TRUE to turn on static gravity
2768 	 *
2769 	 * Return: %FALSE
2770 	 */
2771 	public bool setStaticGravities(bool useStatic)
2772 	{
2773 		return gdk_window_set_static_gravities(gdkWindow, useStatic) != 0;
2774 	}
2775 
2776 	/**
2777 	 * This function will enable multidevice features in @window.
2778 	 *
2779 	 * Multidevice aware windows will need to handle properly multiple,
2780 	 * per device enter/leave events, device grabs and grab ownerships.
2781 	 *
2782 	 * Params:
2783 	 *     supportMultidevice = %TRUE to enable multidevice support in @window.
2784 	 *
2785 	 * Since: 3.0
2786 	 */
2787 	public void setSupportMultidevice(bool supportMultidevice)
2788 	{
2789 		gdk_window_set_support_multidevice(gdkWindow, supportMultidevice);
2790 	}
2791 
2792 	/**
2793 	 * Sets the title of a toplevel window, to be displayed in the titlebar.
2794 	 * If you haven’t explicitly set the icon name for the window
2795 	 * (using gdk_window_set_icon_name()), the icon name will be set to
2796 	 * @title as well. @title must be in UTF-8 encoding (as with all
2797 	 * user-readable strings in GDK/GTK+). @title may not be %NULL.
2798 	 *
2799 	 * Params:
2800 	 *     title = title of @window
2801 	 */
2802 	public void setTitle(string title)
2803 	{
2804 		gdk_window_set_title(gdkWindow, Str.toStringz(title));
2805 	}
2806 
2807 	/**
2808 	 * Indicates to the window manager that @window is a transient dialog
2809 	 * associated with the application window @parent. This allows the
2810 	 * window manager to do things like center @window on @parent and
2811 	 * keep @window above @parent.
2812 	 *
2813 	 * See gtk_window_set_transient_for() if you’re using #GtkWindow or
2814 	 * #GtkDialog.
2815 	 *
2816 	 * Params:
2817 	 *     parent = another toplevel #GdkWindow
2818 	 */
2819 	public void setTransientFor(Window parent)
2820 	{
2821 		gdk_window_set_transient_for(gdkWindow, (parent is null) ? null : parent.getWindowStruct());
2822 	}
2823 
2824 	/**
2825 	 * The application can use this call to provide a hint to the window
2826 	 * manager about the functionality of a window. The window manager
2827 	 * can use this information when determining the decoration and behaviour
2828 	 * of the window.
2829 	 *
2830 	 * The hint must be set before the window is mapped.
2831 	 *
2832 	 * Params:
2833 	 *     hint = A hint of the function this window will have
2834 	 */
2835 	public void setTypeHint(GdkWindowTypeHint hint)
2836 	{
2837 		gdk_window_set_type_hint(gdkWindow, hint);
2838 	}
2839 
2840 	/**
2841 	 * Toggles whether a window needs the user's
2842 	 * urgent attention.
2843 	 *
2844 	 * Params:
2845 	 *     urgent = %TRUE if the window is urgent
2846 	 *
2847 	 * Since: 2.8
2848 	 */
2849 	public void setUrgencyHint(bool urgent)
2850 	{
2851 		gdk_window_set_urgency_hint(gdkWindow, urgent);
2852 	}
2853 
2854 	/**
2855 	 * For most purposes this function is deprecated in favor of
2856 	 * g_object_set_data(). However, for historical reasons GTK+ stores
2857 	 * the #GtkWidget that owns a #GdkWindow as user data on the
2858 	 * #GdkWindow. So, custom widget implementations should use
2859 	 * this function for that. If GTK+ receives an event for a #GdkWindow,
2860 	 * and the user data for the window is non-%NULL, GTK+ will assume the
2861 	 * user data is a #GtkWidget, and forward the event to that widget.
2862 	 *
2863 	 * Params:
2864 	 *     userData = user data
2865 	 */
2866 	public void setUserData(ObjectG userData)
2867 	{
2868 		gdk_window_set_user_data(gdkWindow, (userData is null) ? null : userData.getObjectGStruct());
2869 	}
2870 
2871 	/**
2872 	 * Makes pixels in @window outside @shape_region be transparent,
2873 	 * so that the window may be nonrectangular.
2874 	 *
2875 	 * If @shape_region is %NULL, the shape will be unset, so the whole
2876 	 * window will be opaque again. @offset_x and @offset_y are ignored
2877 	 * if @shape_region is %NULL.
2878 	 *
2879 	 * On the X11 platform, this uses an X server extension which is
2880 	 * widely available on most common platforms, but not available on
2881 	 * very old X servers, and occasionally the implementation will be
2882 	 * buggy. On servers without the shape extension, this function
2883 	 * will do nothing.
2884 	 *
2885 	 * This function works on both toplevel and child windows.
2886 	 *
2887 	 * Params:
2888 	 *     shapeRegion = region of window to be non-transparent
2889 	 *     offsetX = X position of @shape_region in @window coordinates
2890 	 *     offsetY = Y position of @shape_region in @window coordinates
2891 	 */
2892 	public void shapeCombineRegion(Region shapeRegion, int offsetX, int offsetY)
2893 	{
2894 		gdk_window_shape_combine_region(gdkWindow, (shapeRegion is null) ? null : shapeRegion.getRegionStruct(), offsetX, offsetY);
2895 	}
2896 
2897 	/**
2898 	 * Like gdk_window_show_unraised(), but also raises the window to the
2899 	 * top of the window stack (moves the window to the front of the
2900 	 * Z-order).
2901 	 *
2902 	 * This function maps a window so it’s visible onscreen. Its opposite
2903 	 * is gdk_window_hide().
2904 	 *
2905 	 * When implementing a #GtkWidget, you should call this function on the widget's
2906 	 * #GdkWindow as part of the “map” method.
2907 	 */
2908 	public void show()
2909 	{
2910 		gdk_window_show(gdkWindow);
2911 	}
2912 
2913 	/**
2914 	 * Shows a #GdkWindow onscreen, but does not modify its stacking
2915 	 * order. In contrast, gdk_window_show() will raise the window
2916 	 * to the top of the window stack.
2917 	 *
2918 	 * On the X11 platform, in Xlib terms, this function calls
2919 	 * XMapWindow() (it also updates some internal GDK state, which means
2920 	 * that you can’t really use XMapWindow() directly on a GDK window).
2921 	 */
2922 	public void showUnraised()
2923 	{
2924 		gdk_window_show_unraised(gdkWindow);
2925 	}
2926 
2927 	/**
2928 	 * Asks the windowing system to show the window menu. The window menu
2929 	 * is the menu shown when right-clicking the titlebar on traditional
2930 	 * windows managed by the window manager. This is useful for windows
2931 	 * using client-side decorations, activating it with a right-click
2932 	 * on the window decorations.
2933 	 *
2934 	 * Params:
2935 	 *     event = a #GdkEvent to show the menu for
2936 	 *
2937 	 * Return: %TRUE if the window menu was shown and %FALSE otherwise.
2938 	 *
2939 	 * Since: 3.14
2940 	 */
2941 	public bool showWindowMenu(Event event)
2942 	{
2943 		return gdk_window_show_window_menu(gdkWindow, (event is null) ? null : event.getEventStruct()) != 0;
2944 	}
2945 
2946 	/**
2947 	 * “Pins” a window such that it’s on all workspaces and does not scroll
2948 	 * with viewports, for window managers that have scrollable viewports.
2949 	 * (When using #GtkWindow, gtk_window_stick() may be more useful.)
2950 	 *
2951 	 * On the X11 platform, this function depends on window manager
2952 	 * support, so may have no effect with many window managers. However,
2953 	 * GDK will do the best it can to convince the window manager to stick
2954 	 * the window. For window managers that don’t support this operation,
2955 	 * there’s nothing you can do to force it to happen.
2956 	 */
2957 	public void stick()
2958 	{
2959 		gdk_window_stick(gdkWindow);
2960 	}
2961 
2962 	/**
2963 	 * Thaws a window frozen with
2964 	 * gdk_window_freeze_toplevel_updates_libgtk_only().
2965 	 *
2966 	 * This function is not part of the GDK public API and is only
2967 	 * for use by GTK+.
2968 	 *
2969 	 * Deprecated: This symbol was never meant to be used outside of GTK+
2970 	 */
2971 	public void thawToplevelUpdatesLibgtkOnly()
2972 	{
2973 		gdk_window_thaw_toplevel_updates_libgtk_only(gdkWindow);
2974 	}
2975 
2976 	/**
2977 	 * Thaws a window frozen with gdk_window_freeze_updates().
2978 	 */
2979 	public void thawUpdates()
2980 	{
2981 		gdk_window_thaw_updates(gdkWindow);
2982 	}
2983 
2984 	/**
2985 	 * Moves the window out of fullscreen mode. If the window was not
2986 	 * fullscreen, does nothing.
2987 	 *
2988 	 * On X11, asks the window manager to move @window out of the fullscreen
2989 	 * state, if the window manager supports this operation. Not all
2990 	 * window managers support this, and some deliberately ignore it or
2991 	 * don’t have a concept of “fullscreen”; so you can’t rely on the
2992 	 * unfullscreenification actually happening. But it will happen with
2993 	 * most standard window managers, and GDK makes a best effort to get
2994 	 * it to happen.
2995 	 *
2996 	 * Since: 2.2
2997 	 */
2998 	public void unfullscreen()
2999 	{
3000 		gdk_window_unfullscreen(gdkWindow);
3001 	}
3002 
3003 	/**
3004 	 * Unmaximizes the window. If the window wasn’t maximized, then this
3005 	 * function does nothing.
3006 	 *
3007 	 * On X11, asks the window manager to unmaximize @window, if the
3008 	 * window manager supports this operation. Not all window managers
3009 	 * support this, and some deliberately ignore it or don’t have a
3010 	 * concept of “maximized”; so you can’t rely on the unmaximization
3011 	 * actually happening. But it will happen with most standard window
3012 	 * managers, and GDK makes a best effort to get it to happen.
3013 	 *
3014 	 * On Windows, reliably unmaximizes the window.
3015 	 */
3016 	public void unmaximize()
3017 	{
3018 		gdk_window_unmaximize(gdkWindow);
3019 	}
3020 
3021 	/**
3022 	 * Reverse operation for gdk_window_stick(); see gdk_window_stick(),
3023 	 * and gtk_window_unstick().
3024 	 */
3025 	public void unstick()
3026 	{
3027 		gdk_window_unstick(gdkWindow);
3028 	}
3029 
3030 	/**
3031 	 * Withdraws a window (unmaps it and asks the window manager to forget about it).
3032 	 * This function is not really useful as gdk_window_hide() automatically
3033 	 * withdraws toplevel windows before hiding them.
3034 	 */
3035 	public void withdraw()
3036 	{
3037 		gdk_window_withdraw(gdkWindow);
3038 	}
3039 
3040 	int[string] connectedSignals;
3041 
3042 	Surface delegate(int, int, Window)[] onCreateSurfaceListeners;
3043 	/**
3044 	 * The ::create-surface signal is emitted when an offscreen window
3045 	 * needs its surface (re)created, which happens either when the
3046 	 * window is first drawn to, or when the window is being
3047 	 * resized. The first signal handler that returns a non-%NULL
3048 	 * surface will stop any further signal emission, and its surface
3049 	 * will be used.
3050 	 *
3051 	 * Note that it is not possible to access the window's previous
3052 	 * surface from within any callback of this signal. Calling
3053 	 * gdk_offscreen_window_get_surface() will lead to a crash.
3054 	 *
3055 	 * Params:
3056 	 *     width = the width of the offscreen surface to create
3057 	 *     height = the height of the offscreen surface to create
3058 	 *
3059 	 * Return: the newly created #cairo_surface_t for the offscreen window
3060 	 *
3061 	 * Since: 3.0
3062 	 */
3063 	void addOnCreateSurface(Surface delegate(int, int, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
3064 	{
3065 		if ( "create-surface" !in connectedSignals )
3066 		{
3067 			Signals.connectData(
3068 				this,
3069 				"create-surface",
3070 				cast(GCallback)&callBackCreateSurface,
3071 				cast(void*)this,
3072 				null,
3073 				connectFlags);
3074 			connectedSignals["create-surface"] = 1;
3075 		}
3076 		onCreateSurfaceListeners ~= dlg;
3077 	}
3078 	extern(C) static cairo_surface_t* callBackCreateSurface(GdkWindow* windowStruct, int width, int height, Window _window)
3079 	{
3080 		foreach ( Surface delegate(int, int, Window) dlg; _window.onCreateSurfaceListeners )
3081 		{
3082 			if ( auto r = dlg(width, height, _window) )
3083 				return r.getSurfaceStruct();
3084 		}
3085 		
3086 		return null;
3087 	}
3088 
3089 	void delegate(double, double, void*, void*, Window)[] onFromEmbedderListeners;
3090 	/**
3091 	 * The ::from-embedder signal is emitted to translate coordinates
3092 	 * in the embedder of an offscreen window to the offscreen window.
3093 	 *
3094 	 * See also #GdkWindow::to-embedder.
3095 	 *
3096 	 * Params:
3097 	 *     embedderX = x coordinate in the embedder window
3098 	 *     embedderY = y coordinate in the embedder window
3099 	 *     offscreenX = return location for the x
3100 	 *         coordinate in the offscreen window
3101 	 *     offscreenY = return location for the y
3102 	 *         coordinate in the offscreen window
3103 	 *
3104 	 * Since: 2.18
3105 	 */
3106 	void addOnFromEmbedder(void delegate(double, double, void*, void*, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
3107 	{
3108 		if ( "from-embedder" !in connectedSignals )
3109 		{
3110 			Signals.connectData(
3111 				this,
3112 				"from-embedder",
3113 				cast(GCallback)&callBackFromEmbedder,
3114 				cast(void*)this,
3115 				null,
3116 				connectFlags);
3117 			connectedSignals["from-embedder"] = 1;
3118 		}
3119 		onFromEmbedderListeners ~= dlg;
3120 	}
3121 	extern(C) static void callBackFromEmbedder(GdkWindow* windowStruct, double embedderX, double embedderY, void* offscreenX, void* offscreenY, Window _window)
3122 	{
3123 		foreach ( void delegate(double, double, void*, void*, Window) dlg; _window.onFromEmbedderListeners )
3124 		{
3125 			dlg(embedderX, embedderY, offscreenX, offscreenY, _window);
3126 		}
3127 	}
3128 
3129 	Window delegate(double, double, Window)[] onPickEmbeddedChildListeners;
3130 	/**
3131 	 * The ::pick-embedded-child signal is emitted to find an embedded
3132 	 * child at the given position.
3133 	 *
3134 	 * Params:
3135 	 *     x = x coordinate in the window
3136 	 *     y = y coordinate in the window
3137 	 *
3138 	 * Return: the #GdkWindow of the
3139 	 *     embedded child at @x, @y, or %NULL
3140 	 *
3141 	 * Since: 2.18
3142 	 */
3143 	void addOnPickEmbeddedChild(Window delegate(double, double, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
3144 	{
3145 		if ( "pick-embedded-child" !in connectedSignals )
3146 		{
3147 			Signals.connectData(
3148 				this,
3149 				"pick-embedded-child",
3150 				cast(GCallback)&callBackPickEmbeddedChild,
3151 				cast(void*)this,
3152 				null,
3153 				connectFlags);
3154 			connectedSignals["pick-embedded-child"] = 1;
3155 		}
3156 		onPickEmbeddedChildListeners ~= dlg;
3157 	}
3158 	extern(C) static GdkWindow* callBackPickEmbeddedChild(GdkWindow* windowStruct, double x, double y, Window _window)
3159 	{
3160 		foreach ( Window delegate(double, double, Window) dlg; _window.onPickEmbeddedChildListeners )
3161 		{
3162 			if ( auto r = dlg(x, y, _window) )
3163 				return r.getWindowStruct();
3164 		}
3165 		
3166 		return null;
3167 	}
3168 
3169 	void delegate(double, double, void*, void*, Window)[] onToEmbedderListeners;
3170 	/**
3171 	 * The ::to-embedder signal is emitted to translate coordinates
3172 	 * in an offscreen window to its embedder.
3173 	 *
3174 	 * See also #GdkWindow::from-embedder.
3175 	 *
3176 	 * Params:
3177 	 *     offscreenX = x coordinate in the offscreen window
3178 	 *     offscreenY = y coordinate in the offscreen window
3179 	 *     embedderX = return location for the x
3180 	 *         coordinate in the embedder window
3181 	 *     embedderY = return location for the y
3182 	 *         coordinate in the embedder window
3183 	 *
3184 	 * Since: 2.18
3185 	 */
3186 	void addOnToEmbedder(void delegate(double, double, void*, void*, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
3187 	{
3188 		if ( "to-embedder" !in connectedSignals )
3189 		{
3190 			Signals.connectData(
3191 				this,
3192 				"to-embedder",
3193 				cast(GCallback)&callBackToEmbedder,
3194 				cast(void*)this,
3195 				null,
3196 				connectFlags);
3197 			connectedSignals["to-embedder"] = 1;
3198 		}
3199 		onToEmbedderListeners ~= dlg;
3200 	}
3201 	extern(C) static void callBackToEmbedder(GdkWindow* windowStruct, double offscreenX, double offscreenY, void* embedderX, void* embedderY, Window _window)
3202 	{
3203 		foreach ( void delegate(double, double, void*, void*, Window) dlg; _window.onToEmbedderListeners )
3204 		{
3205 			dlg(offscreenX, offscreenY, embedderX, embedderY, _window);
3206 		}
3207 	}
3208 
3209 	/**
3210 	 * Obtains the root window (parent all other windows are inside)
3211 	 * for the default display and screen.
3212 	 *
3213 	 * Return: the default root window
3214 	 */
3215 	public static Window getDefaultRootWindow()
3216 	{
3217 		auto p = gdk_get_default_root_window();
3218 		
3219 		if(p is null)
3220 		{
3221 			return null;
3222 		}
3223 		
3224 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
3225 	}
3226 
3227 	/**
3228 	 * Gets the window that @window is embedded in.
3229 	 *
3230 	 * Params:
3231 	 *     window = a #GdkWindow
3232 	 *
3233 	 * Return: the embedding #GdkWindow, or
3234 	 *     %NULL if @window is not an mbedded offscreen window
3235 	 *
3236 	 * Since: 2.18
3237 	 */
3238 	public static Window offscreenWindowGetEmbedder(Window window)
3239 	{
3240 		auto p = gdk_offscreen_window_get_embedder((window is null) ? null : window.getWindowStruct());
3241 		
3242 		if(p is null)
3243 		{
3244 			return null;
3245 		}
3246 		
3247 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
3248 	}
3249 
3250 	/**
3251 	 * Gets the offscreen surface that an offscreen window renders into.
3252 	 * If you need to keep this around over window resizes, you need to
3253 	 * add a reference to it.
3254 	 *
3255 	 * Params:
3256 	 *     window = a #GdkWindow
3257 	 *
3258 	 * Return: The offscreen surface, or
3259 	 *     %NULL if not offscreen
3260 	 */
3261 	public static Surface offscreenWindowGetSurface(Window window)
3262 	{
3263 		auto p = gdk_offscreen_window_get_surface((window is null) ? null : window.getWindowStruct());
3264 		
3265 		if(p is null)
3266 		{
3267 			return null;
3268 		}
3269 		
3270 		return new Surface(cast(cairo_surface_t*) p);
3271 	}
3272 
3273 	/**
3274 	 * Sets @window to be embedded in @embedder.
3275 	 *
3276 	 * To fully embed an offscreen window, in addition to calling this
3277 	 * function, it is also necessary to handle the #GdkWindow::pick-embedded-child
3278 	 * signal on the @embedder and the #GdkWindow::to-embedder and
3279 	 * #GdkWindow::from-embedder signals on @window.
3280 	 *
3281 	 * Params:
3282 	 *     window = a #GdkWindow
3283 	 *     embedder = the #GdkWindow that @window gets embedded in
3284 	 *
3285 	 * Since: 2.18
3286 	 */
3287 	public static void offscreenWindowSetEmbedder(Window window, Window embedder)
3288 	{
3289 		gdk_offscreen_window_set_embedder((window is null) ? null : window.getWindowStruct(), (embedder is null) ? null : embedder.getWindowStruct());
3290 	}
3291 }