1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GdkDisplay.html
27  * outPack = gdk
28  * outFile = Display
29  * strct   = GdkDisplay
30  * realStrct=
31  * ctorStrct=
32  * clss    = Display
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gdk_display_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- glib.ListG
48  * 	- gdk.AppLaunchContext
49  * 	- gdk.DeviceManager
50  * 	- gdk.Device
51  * 	- gdk.Event
52  * 	- gdk.Screen
53  * 	- gdk.Window
54  * structWrap:
55  * 	- GList* -> ListG
56  * 	- GdkAppLaunchContext* -> AppLaunchContext
57  * 	- GdkDevice* -> Device
58  * 	- GdkDeviceManager* -> DeviceManager
59  * 	- GdkDisplay* -> Display
60  * 	- GdkEvent* -> Event
61  * 	- GdkScreen* -> Screen
62  * 	- GdkWindow* -> Window
63  * module aliases:
64  * local aliases:
65  * overrides:
66  */
67 
68 module gdk.Display;
69 
70 public  import gtkc.gdktypes;
71 
72 private import gtkc.gdk;
73 private import glib.ConstructionException;
74 private import gobject.ObjectG;
75 
76 private import gobject.Signals;
77 public  import gtkc.gdktypes;
78 private import glib.Str;
79 private import glib.ListG;
80 private import gdk.AppLaunchContext;
81 private import gdk.DeviceManager;
82 private import gdk.Device;
83 private import gdk.Event;
84 private import gdk.Screen;
85 private import gdk.Window;
86 
87 
88 private import gobject.ObjectG;
89 
90 /**
91  * GdkDisplay objects purpose are two fold:
92  *
93  *  To manage and provide information about input devices (pointers
94  *  and keyboards)
95  *
96  *  To manage and provide information about the available GdkScreens
97  *
98  * GdkDisplay objects are the GDK representation of an X Display,
99  * which can be described as a workstation consisting of
100  * a keyboard, a pointing device (such as a mouse) and one or more
101  * screens.
102  * It is used to open and keep track of various GdkScreen objects
103  * currently instantiated by the application. It is also used to
104  * access the keyboard(s) and mouse pointer(s) of the display.
105  *
106  * Most of the input device handling has been factored out into
107  * the separate GdkDeviceManager object. Every display has a
108  * device manager, which you can obtain using
109  * gdk_display_get_device_manager().
110  */
111 public class Display : ObjectG
112 {
113 	
114 	/** the main Gtk struct */
115 	protected GdkDisplay* gdkDisplay;
116 	
117 	
118 	/** Get the main Gtk struct */
119 	public GdkDisplay* getDisplayStruct()
120 	{
121 		return gdkDisplay;
122 	}
123 	
124 	
125 	/** the main Gtk struct as a void* */
126 	protected override void* getStruct()
127 	{
128 		return cast(void*)gdkDisplay;
129 	}
130 	
131 	/**
132 	 * Sets our main struct and passes it to the parent class
133 	 */
134 	public this (GdkDisplay* gdkDisplay)
135 	{
136 		super(cast(GObject*)gdkDisplay);
137 		this.gdkDisplay = gdkDisplay;
138 	}
139 	
140 	protected override void setStruct(GObject* obj)
141 	{
142 		super.setStruct(obj);
143 		gdkDisplay = cast(GdkDisplay*)obj;
144 	}
145 	
146 	/**
147 	 */
148 	int[string] connectedSignals;
149 	
150 	void delegate(gboolean, Display)[] onClosedListeners;
151 	/**
152 	 * The ::closed signal is emitted when the connection to the windowing
153 	 * system for display is closed.
154 	 * TRUE if the display was closed due to an error
155 	 * Since 2.2
156 	 */
157 	void addOnClosed(void delegate(gboolean, Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
158 	{
159 		if ( !("closed" in connectedSignals) )
160 		{
161 			Signals.connectData(
162 			getStruct(),
163 			"closed",
164 			cast(GCallback)&callBackClosed,
165 			cast(void*)this,
166 			null,
167 			connectFlags);
168 			connectedSignals["closed"] = 1;
169 		}
170 		onClosedListeners ~= dlg;
171 	}
172 	extern(C) static void callBackClosed(GdkDisplay* displayStruct, gboolean isError, Display _display)
173 	{
174 		foreach ( void delegate(gboolean, Display) dlg ; _display.onClosedListeners )
175 		{
176 			dlg(isError, _display);
177 		}
178 	}
179 	
180 	void delegate(Display)[] onOpenedListeners;
181 	/**
182 	 * The ::opened signal is emitted when the connection to the windowing
183 	 * system for display is opened.
184 	 */
185 	void addOnOpened(void delegate(Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
186 	{
187 		if ( !("opened" in connectedSignals) )
188 		{
189 			Signals.connectData(
190 			getStruct(),
191 			"opened",
192 			cast(GCallback)&callBackOpened,
193 			cast(void*)this,
194 			null,
195 			connectFlags);
196 			connectedSignals["opened"] = 1;
197 		}
198 		onOpenedListeners ~= dlg;
199 	}
200 	extern(C) static void callBackOpened(GdkDisplay* displayStruct, Display _display)
201 	{
202 		foreach ( void delegate(Display) dlg ; _display.onOpenedListeners )
203 		{
204 			dlg(_display);
205 		}
206 	}
207 	
208 	
209 	/**
210 	 * Opens a display.
211 	 * Since 2.2
212 	 * Params:
213 	 * displayName = the name of the display to open
214 	 * Returns: a GdkDisplay, or NULL if the display could not be opened. [transfer none]
215 	 */
216 	public static Display open(string displayName)
217 	{
218 		// GdkDisplay * gdk_display_open (const gchar *display_name);
219 		auto p = gdk_display_open(Str.toStringz(displayName));
220 		
221 		if(p is null)
222 		{
223 			return null;
224 		}
225 		
226 		return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p);
227 	}
228 	
229 	/**
230 	 * Gets the default GdkDisplay. This is a convenience
231 	 * function for
232 	 * gdk_display_manager_get_default_display (gdk_display_manager_get()).
233 	 * Since 2.2
234 	 * Returns: a GdkDisplay, or NULL if there is no default display. [transfer none]
235 	 */
236 	public static Display getDefault()
237 	{
238 		// GdkDisplay * gdk_display_get_default (void);
239 		auto p = gdk_display_get_default();
240 		
241 		if(p is null)
242 		{
243 			return null;
244 		}
245 		
246 		return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p);
247 	}
248 	
249 	/**
250 	 * Gets the name of the display.
251 	 * Since 2.2
252 	 * Returns: a string representing the display name. This string is owned by GDK and should not be modified or freed.
253 	 */
254 	public string getName()
255 	{
256 		// const gchar * gdk_display_get_name (GdkDisplay *display);
257 		return Str.toString(gdk_display_get_name(gdkDisplay));
258 	}
259 	
260 	/**
261 	 * Warning
262 	 * gdk_display_get_n_screens has been deprecated since version 3.10 and should not be used in newly-written code. The number of screens is always 1.
263 	 * Gets the number of screen managed by the display.
264 	 * Since 2.2
265 	 * Returns: number of screens.
266 	 */
267 	public int getNScreens()
268 	{
269 		// gint gdk_display_get_n_screens (GdkDisplay *display);
270 		return gdk_display_get_n_screens(gdkDisplay);
271 	}
272 	
273 	/**
274 	 * Returns a screen object for one of the screens of the display.
275 	 * Since 2.2
276 	 * Params:
277 	 * screenNum = the screen number
278 	 * Returns: the GdkScreen object. [transfer none]
279 	 */
280 	public Screen getScreen(int screenNum)
281 	{
282 		// GdkScreen * gdk_display_get_screen (GdkDisplay *display,  gint screen_num);
283 		auto p = gdk_display_get_screen(gdkDisplay, screenNum);
284 		
285 		if(p is null)
286 		{
287 			return null;
288 		}
289 		
290 		return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p);
291 	}
292 	
293 	/**
294 	 * Get the default GdkScreen for display.
295 	 * Since 2.2
296 	 * Returns: the default GdkScreen object for display. [transfer none]
297 	 */
298 	public Screen getDefaultScreen()
299 	{
300 		// GdkScreen * gdk_display_get_default_screen (GdkDisplay *display);
301 		auto p = gdk_display_get_default_screen(gdkDisplay);
302 		
303 		if(p is null)
304 		{
305 			return null;
306 		}
307 		
308 		return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p);
309 	}
310 	
311 	/**
312 	 * Returns the GdkDeviceManager associated to display.
313 	 * Returns: A GdkDeviceManager, or NULL. This memory is owned by GDK and must not be freed or unreferenced. [transfer none] Since 3.0
314 	 */
315 	public DeviceManager getDeviceManager()
316 	{
317 		// GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display);
318 		auto p = gdk_display_get_device_manager(gdkDisplay);
319 		
320 		if(p is null)
321 		{
322 			return null;
323 		}
324 		
325 		return ObjectG.getDObject!(DeviceManager)(cast(GdkDeviceManager*) p);
326 	}
327 	
328 	/**
329 	 * Warning
330 	 * gdk_display_pointer_ungrab has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_ungrab(), together with gdk_device_grab()
331 	 *  instead.
332 	 * Release any pointer grab.
333 	 * Since 2.2
334 	 * Params:
335 	 * time = a timestap (e.g. GDK_CURRENT_TIME).
336 	 */
337 	public void pointerUngrab(uint time)
338 	{
339 		// void gdk_display_pointer_ungrab (GdkDisplay *display,  guint32 time_);
340 		gdk_display_pointer_ungrab(gdkDisplay, time);
341 	}
342 	
343 	/**
344 	 * Warning
345 	 * gdk_display_keyboard_ungrab has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_ungrab(), together with gdk_device_grab()
346 	 *  instead.
347 	 * Release any keyboard grab
348 	 * Since 2.2
349 	 * Params:
350 	 * time = a timestap (e.g GDK_CURRENT_TIME).
351 	 */
352 	public void keyboardUngrab(uint time)
353 	{
354 		// void gdk_display_keyboard_ungrab (GdkDisplay *display,  guint32 time_);
355 		gdk_display_keyboard_ungrab(gdkDisplay, time);
356 	}
357 	
358 	/**
359 	 * Warning
360 	 * gdk_display_pointer_is_grabbed has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_display_device_is_grabbed() instead.
361 	 * Test if the pointer is grabbed.
362 	 * Since 2.2
363 	 * Returns: TRUE if an active X pointer grab is in effect
364 	 */
365 	public int pointerIsGrabbed()
366 	{
367 		// gboolean gdk_display_pointer_is_grabbed (GdkDisplay *display);
368 		return gdk_display_pointer_is_grabbed(gdkDisplay);
369 	}
370 	
371 	/**
372 	 * Returns TRUE if there is an ongoing grab on device for display.
373 	 * Params:
374 	 * device = a GdkDevice
375 	 * Returns: TRUE if there is a grab in effect for device.
376 	 */
377 	public int deviceIsGrabbed(Device device)
378 	{
379 		// gboolean gdk_display_device_is_grabbed (GdkDisplay *display,  GdkDevice *device);
380 		return gdk_display_device_is_grabbed(gdkDisplay, (device is null) ? null : device.getDeviceStruct());
381 	}
382 	
383 	/**
384 	 * Emits a short beep on display
385 	 * Since 2.2
386 	 */
387 	public void beep()
388 	{
389 		// void gdk_display_beep (GdkDisplay *display);
390 		gdk_display_beep(gdkDisplay);
391 	}
392 	
393 	/**
394 	 * Flushes any requests queued for the windowing system and waits until all
395 	 * requests have been handled. This is often used for making sure that the
396 	 * display is synchronized with the current state of the program. Calling
397 	 * gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors
398 	 * generated from earlier requests are handled before the error trap is
399 	 * removed.
400 	 * This is most useful for X11. On windowing systems where requests are
401 	 * handled synchronously, this function will do nothing.
402 	 * Since 2.2
403 	 */
404 	public void sync()
405 	{
406 		// void gdk_display_sync (GdkDisplay *display);
407 		gdk_display_sync(gdkDisplay);
408 	}
409 	
410 	/**
411 	 * Flushes any requests queued for the windowing system; this happens automatically
412 	 * when the main loop blocks waiting for new events, but if your application
413 	 * is drawing without returning control to the main loop, you may need
414 	 * to call this function explicitely. A common case where this function
415 	 * needs to be called is when an application is executing drawing commands
416 	 * from a thread other than the thread where the main loop is running.
417 	 * This is most useful for X11. On windowing systems where requests are
418 	 * handled synchronously, this function will do nothing.
419 	 * Since 2.4
420 	 */
421 	public void flush()
422 	{
423 		// void gdk_display_flush (GdkDisplay *display);
424 		gdk_display_flush(gdkDisplay);
425 	}
426 	
427 	/**
428 	 * Closes the connection to the windowing system for the given display,
429 	 * and cleans up associated resources.
430 	 * Since 2.2
431 	 */
432 	public void close()
433 	{
434 		// void gdk_display_close (GdkDisplay *display);
435 		gdk_display_close(gdkDisplay);
436 	}
437 	
438 	/**
439 	 * Finds out if the display has been closed.
440 	 * Since 2.22
441 	 * Returns: TRUE if the display is closed.
442 	 */
443 	public int isClosed()
444 	{
445 		// gboolean gdk_display_is_closed (GdkDisplay *display);
446 		return gdk_display_is_closed(gdkDisplay);
447 	}
448 	
449 	/**
450 	 * Gets the next GdkEvent to be processed for display, fetching events from the
451 	 * windowing system if necessary.
452 	 * Since 2.2
453 	 * Returns: the next GdkEvent to be processed, or NULL if no events are pending. The returned GdkEvent should be freed with gdk_event_free().
454 	 */
455 	public Event getEvent()
456 	{
457 		// GdkEvent * gdk_display_get_event (GdkDisplay *display);
458 		auto p = gdk_display_get_event(gdkDisplay);
459 		
460 		if(p is null)
461 		{
462 			return null;
463 		}
464 		
465 		return ObjectG.getDObject!(Event)(cast(GdkEvent*) p);
466 	}
467 	
468 	/**
469 	 * Gets a copy of the first GdkEvent in the display's event queue, without
470 	 * removing the event from the queue. (Note that this function will
471 	 * not get more events from the windowing system. It only checks the events
472 	 * that have already been moved to the GDK event queue.)
473 	 * Since 2.2
474 	 * Returns: a copy of the first GdkEvent on the event queue, or NULL if no events are in the queue. The returned GdkEvent should be freed with gdk_event_free().
475 	 */
476 	public Event peekEvent()
477 	{
478 		// GdkEvent * gdk_display_peek_event (GdkDisplay *display);
479 		auto p = gdk_display_peek_event(gdkDisplay);
480 		
481 		if(p is null)
482 		{
483 			return null;
484 		}
485 		
486 		return ObjectG.getDObject!(Event)(cast(GdkEvent*) p);
487 	}
488 	
489 	/**
490 	 * Appends a copy of the given event onto the front of the event
491 	 * queue for display.
492 	 * Since 2.2
493 	 * Params:
494 	 * event = a GdkEvent.
495 	 */
496 	public void putEvent(Event event)
497 	{
498 		// void gdk_display_put_event (GdkDisplay *display,  const GdkEvent *event);
499 		gdk_display_put_event(gdkDisplay, (event is null) ? null : event.getEventStruct());
500 	}
501 	
502 	/**
503 	 * Returns whether the display has events that are waiting
504 	 * to be processed.
505 	 * Returns: TRUE if there are events ready to be processed. Since 3.0
506 	 */
507 	public int hasPending()
508 	{
509 		// gboolean gdk_display_has_pending (GdkDisplay *display);
510 		return gdk_display_has_pending(gdkDisplay);
511 	}
512 	
513 	/**
514 	 * Sets the double click time (two clicks within this time interval
515 	 * count as a double click and result in a GDK_2BUTTON_PRESS event).
516 	 * Applications should not set this, it is a global
517 	 * user-configured setting.
518 	 * Since 2.2
519 	 * Params:
520 	 * msec = double click time in milliseconds (thousandths of a second)
521 	 */
522 	public void setDoubleClickTime(uint msec)
523 	{
524 		// void gdk_display_set_double_click_time (GdkDisplay *display,  guint msec);
525 		gdk_display_set_double_click_time(gdkDisplay, msec);
526 	}
527 	
528 	/**
529 	 * Sets the double click distance (two clicks within this distance
530 	 * count as a double click and result in a GDK_2BUTTON_PRESS event).
531 	 * See also gdk_display_set_double_click_time().
532 	 * Applications should not set this, it is a global
533 	 * user-configured setting.
534 	 * Since 2.4
535 	 * Params:
536 	 * distance = distance in pixels
537 	 */
538 	public void setDoubleClickDistance(uint distance)
539 	{
540 		// void gdk_display_set_double_click_distance  (GdkDisplay *display,  guint distance);
541 		gdk_display_set_double_click_distance(gdkDisplay, distance);
542 	}
543 	
544 	/**
545 	 * Warning
546 	 * gdk_display_get_pointer has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_get_position() instead.
547 	 * Gets the current location of the pointer and the current modifier
548 	 * mask for a given display.
549 	 * Since 2.2
550 	 * Params:
551 	 * screen = location to store the screen that the
552 	 * cursor is on, or NULL. [out][allow-none][transfer none]
553 	 * x = location to store root window X coordinate of pointer, or NULL. [out][allow-none]
554 	 * y = location to store root window Y coordinate of pointer, or NULL. [out][allow-none]
555 	 * mask = location to store current modifier mask, or NULL. [out][allow-none]
556 	 */
557 	public void getPointer(out Screen screen, out int x, out int y, out GdkModifierType mask)
558 	{
559 		// void gdk_display_get_pointer (GdkDisplay *display,  GdkScreen **screen,  gint *x,  gint *y,  GdkModifierType *mask);
560 		GdkScreen* outscreen = null;
561 		
562 		gdk_display_get_pointer(gdkDisplay, &outscreen, &x, &y, &mask);
563 		
564 		screen = ObjectG.getDObject!(Screen)(outscreen);
565 	}
566 	
567 	/**
568 	 * Warning
569 	 * gdk_display_list_devices has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_manager_list_devices() instead.
570 	 * Returns the list of available input devices attached to display.
571 	 * The list is statically allocated and should not be freed.
572 	 * Since 2.2
573 	 * Returns: a list of GdkDevice. [transfer none][element-type GdkDevice]
574 	 */
575 	public ListG listDevices()
576 	{
577 		// GList * gdk_display_list_devices (GdkDisplay *display);
578 		auto p = gdk_display_list_devices(gdkDisplay);
579 		
580 		if(p is null)
581 		{
582 			return null;
583 		}
584 		
585 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
586 	}
587 	
588 	/**
589 	 * Warning
590 	 * gdk_display_get_window_at_pointer has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_get_window_at_position() instead.
591 	 * Obtains the window underneath the mouse pointer, returning the location
592 	 * of the pointer in that window in win_x, win_y for screen. Returns NULL
593 	 * if the window under the mouse pointer is not known to GDK (for example,
594 	 * belongs to another application).
595 	 * Since 2.2
596 	 * Params:
597 	 * winX = return location for x coordinate of the pointer location relative
598 	 * to the window origin, or NULL. [out][allow-none]
599 	 * winY = return location for y coordinate of the pointer location relative
600 	 *  to the window origin, or NULL. [out][allow-none]
601 	 * Returns: the window under the mouse pointer, or NULL. [transfer none]
602 	 */
603 	public Window getWindowAtPointer(out int winX, out int winY)
604 	{
605 		// GdkWindow * gdk_display_get_window_at_pointer (GdkDisplay *display,  gint *win_x,  gint *win_y);
606 		auto p = gdk_display_get_window_at_pointer(gdkDisplay, &winX, &winY);
607 		
608 		if(p is null)
609 		{
610 			return null;
611 		}
612 		
613 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
614 	}
615 	
616 	/**
617 	 * Warning
618 	 * gdk_display_warp_pointer has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_warp() instead.
619 	 * Warps the pointer of display to the point x,y on
620 	 * the screen screen, unless the pointer is confined
621 	 * to a window by a grab, in which case it will be moved
622 	 * as far as allowed by the grab. Warping the pointer
623 	 * creates events as if the user had moved the mouse
624 	 * instantaneously to the destination.
625 	 * Note that the pointer should normally be under the
626 	 * control of the user. This function was added to cover
627 	 * some rare use cases like keyboard navigation support
628 	 * for the color picker in the GtkColorSelectionDialog.
629 	 * Since 2.8
630 	 * Params:
631 	 * screen = the screen of display to warp the pointer to
632 	 * x = the x coordinate of the destination
633 	 * y = the y coordinate of the destination
634 	 */
635 	public void warpPointer(Screen screen, int x, int y)
636 	{
637 		// void gdk_display_warp_pointer (GdkDisplay *display,  GdkScreen *screen,  gint x,  gint y);
638 		gdk_display_warp_pointer(gdkDisplay, (screen is null) ? null : screen.getScreenStruct(), x, y);
639 	}
640 	
641 	/**
642 	 * Returns TRUE if multicolored cursors are supported
643 	 * on display. Otherwise, cursors have only a forground
644 	 * and a background color.
645 	 * Since 2.4
646 	 * Returns: whether cursors can have multiple colors.
647 	 */
648 	public int supportsCursorColor()
649 	{
650 		// gboolean gdk_display_supports_cursor_color (GdkDisplay *display);
651 		return gdk_display_supports_cursor_color(gdkDisplay);
652 	}
653 	
654 	/**
655 	 * Returns TRUE if cursors can use an 8bit alpha channel
656 	 * on display. Otherwise, cursors are restricted to bilevel
657 	 * alpha (i.e. a mask).
658 	 * Since 2.4
659 	 * Returns: whether cursors can have alpha channels.
660 	 */
661 	public int supportsCursorAlpha()
662 	{
663 		// gboolean gdk_display_supports_cursor_alpha (GdkDisplay *display);
664 		return gdk_display_supports_cursor_alpha(gdkDisplay);
665 	}
666 	
667 	/**
668 	 * Returns the default size to use for cursors on display.
669 	 * Since 2.4
670 	 * Returns: the default cursor size.
671 	 */
672 	public uint getDefaultCursorSize()
673 	{
674 		// guint gdk_display_get_default_cursor_size (GdkDisplay *display);
675 		return gdk_display_get_default_cursor_size(gdkDisplay);
676 	}
677 	
678 	/**
679 	 * Gets the maximal size to use for cursors on display.
680 	 * Since 2.4
681 	 * Params:
682 	 * width = the return location for the maximal cursor width. [out]
683 	 * height = the return location for the maximal cursor height. [out]
684 	 */
685 	public void getMaximalCursorSize(out uint width, out uint height)
686 	{
687 		// void gdk_display_get_maximal_cursor_size (GdkDisplay *display,  guint *width,  guint *height);
688 		gdk_display_get_maximal_cursor_size(gdkDisplay, &width, &height);
689 	}
690 	
691 	/**
692 	 * Returns the default group leader window for all toplevel windows
693 	 * on display. This window is implicitly created by GDK.
694 	 * See gdk_window_set_group().
695 	 * Since 2.4
696 	 * Returns: The default group leader window for display. [transfer none]
697 	 */
698 	public Window getDefaultGroup()
699 	{
700 		// GdkWindow * gdk_display_get_default_group (GdkDisplay *display);
701 		auto p = gdk_display_get_default_group(gdkDisplay);
702 		
703 		if(p is null)
704 		{
705 			return null;
706 		}
707 		
708 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
709 	}
710 	
711 	/**
712 	 * Returns whether GdkEventOwnerChange events will be
713 	 * sent when the owner of a selection changes.
714 	 * Since 2.6
715 	 * Returns: whether GdkEventOwnerChange events will be sent.
716 	 */
717 	public int supportsSelectionNotification()
718 	{
719 		// gboolean gdk_display_supports_selection_notification  (GdkDisplay *display);
720 		return gdk_display_supports_selection_notification(gdkDisplay);
721 	}
722 	
723 	/**
724 	 * Request GdkEventOwnerChange events for ownership changes
725 	 * of the selection named by the given atom.
726 	 * Since 2.6
727 	 * Params:
728 	 * selection = the GdkAtom naming the selection for which
729 	 * ownership change notification is requested
730 	 * Returns: whether GdkEventOwnerChange events will be sent.
731 	 */
732 	public int requestSelectionNotification(GdkAtom selection)
733 	{
734 		// gboolean gdk_display_request_selection_notification  (GdkDisplay *display,  GdkAtom selection);
735 		return gdk_display_request_selection_notification(gdkDisplay, selection);
736 	}
737 	
738 	/**
739 	 * Returns whether the speicifed display supports clipboard
740 	 * persistance; i.e. if it's possible to store the clipboard data after an
741 	 * application has quit. On X11 this checks if a clipboard daemon is
742 	 * running.
743 	 * Since 2.6
744 	 * Returns: TRUE if the display supports clipboard persistance.
745 	 */
746 	public int supportsClipboardPersistence()
747 	{
748 		// gboolean gdk_display_supports_clipboard_persistence  (GdkDisplay *display);
749 		return gdk_display_supports_clipboard_persistence(gdkDisplay);
750 	}
751 	
752 	/**
753 	 * Issues a request to the clipboard manager to store the
754 	 * clipboard data. On X11, this is a special program that works
755 	 * according to the freedesktop clipboard specification, available at
756 	 * http://www.freedesktop.org/Standards/clipboard-manager-spec.
757 	 * Since 2.6
758 	 * Params:
759 	 * clipboardWindow = a GdkWindow belonging to the clipboard owner
760 	 * time = a timestamp
761 	 * targets = an array of targets
762 	 * that should be saved, or NULL
763 	 * if all available targets should be saved. [array length=n_targets]
764 	 */
765 	public void storeClipboard(Window clipboardWindow, uint time, GdkAtom[] targets)
766 	{
767 		// void gdk_display_store_clipboard (GdkDisplay *display,  GdkWindow *clipboard_window,  guint32 time_,  const GdkAtom *targets,  gint n_targets);
768 		gdk_display_store_clipboard(gdkDisplay, (clipboardWindow is null) ? null : clipboardWindow.getWindowStruct(), time, targets.ptr, cast(int) targets.length);
769 	}
770 	
771 	/**
772 	 * Returns TRUE if gdk_window_shape_combine_mask() can
773 	 * be used to create shaped windows on display.
774 	 * Since 2.10
775 	 * Returns: TRUE if shaped windows are supported
776 	 */
777 	public int supportsShapes()
778 	{
779 		// gboolean gdk_display_supports_shapes (GdkDisplay *display);
780 		return gdk_display_supports_shapes(gdkDisplay);
781 	}
782 	
783 	/**
784 	 * Returns TRUE if gdk_window_input_shape_combine_mask() can
785 	 * be used to modify the input shape of windows on display.
786 	 * Since 2.10
787 	 * Returns: TRUE if windows with modified input shape are supported
788 	 */
789 	public int supportsInputShapes()
790 	{
791 		// gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
792 		return gdk_display_supports_input_shapes(gdkDisplay);
793 	}
794 	
795 	/**
796 	 * Returns TRUE if gdk_window_set_composited() can be used
797 	 * to redirect drawing on the window using compositing.
798 	 * Currently this only works on X11 with XComposite and
799 	 * XDamage extensions available.
800 	 * Since 2.12
801 	 * Returns: TRUE if windows may be composited.
802 	 */
803 	public int supportsComposite()
804 	{
805 		// gboolean gdk_display_supports_composite (GdkDisplay *display);
806 		return gdk_display_supports_composite(gdkDisplay);
807 	}
808 	
809 	/**
810 	 * Returns a GdkAppLaunchContext suitable for launching
811 	 * applications on the given display.
812 	 * Returns: a new GdkAppLaunchContext for display. Free with g_object_unref() when done. [transfer full] Since 3.0
813 	 */
814 	public AppLaunchContext getAppLaunchContext()
815 	{
816 		// GdkAppLaunchContext * gdk_display_get_app_launch_context  (GdkDisplay *display);
817 		auto p = gdk_display_get_app_launch_context(gdkDisplay);
818 		
819 		if(p is null)
820 		{
821 			return null;
822 		}
823 		
824 		return ObjectG.getDObject!(AppLaunchContext)(cast(GdkAppLaunchContext*) p);
825 	}
826 	
827 	/**
828 	 * Indicates to the GUI environment that the application has
829 	 * finished loading, using a given identifier.
830 	 * GTK+ will call this function automatically for GtkWindow
831 	 * with custom startup-notification identifier unless
832 	 * gtk_window_set_auto_startup_notification() is called to
833 	 * disable that feature.
834 	 * Since 2.2
835 	 * Params:
836 	 * startupId = a startup-notification identifier, for which
837 	 * notification process should be completed
838 	 * Since 3.0
839 	 * Signal Details
840 	 * The "closed" signal
841 	 * void user_function (GdkDisplay *display,
842 	 *  gboolean is_error,
843 	 *  gpointer user_data) : Run Last
844 	 * The ::closed signal is emitted when the connection to the windowing
845 	 * system for display is closed.
846 	 */
847 	public void notifyStartupComplete(string startupId)
848 	{
849 		// void gdk_display_notify_startup_complete (GdkDisplay *display,  const gchar *startup_id);
850 		gdk_display_notify_startup_complete(gdkDisplay, Str.toStringz(startupId));
851 	}
852 }