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.Screen;
26 
27 private import cairo.FontOption;
28 private import gdk.Display;
29 private import gdk.Visual;
30 private import gdk.Window;
31 private import glib.ListG;
32 private import glib.Str;
33 private import gobject.ObjectG;
34 private import gobject.Signals;
35 private import gobject.Value;
36 private import gtkc.gdk;
37 public  import gtkc.gdktypes;
38 private import std.algorithm;
39 
40 
41 /**
42  * #GdkScreen objects are the GDK representation of the screen on
43  * which windows can be displayed and on which the pointer moves.
44  * X originally identified screens with physical screens, but
45  * nowadays it is more common to have a single #GdkScreen which
46  * combines several physical monitors (see gdk_screen_get_n_monitors()).
47  * 
48  * GdkScreen is used throughout GDK and GTK+ to specify which screen
49  * the top level windows are to be displayed on. it is also used to
50  * query the screen specification and default settings such as
51  * the default visual (gdk_screen_get_system_visual()), the dimensions
52  * of the physical monitors (gdk_screen_get_monitor_geometry()), etc.
53  */
54 public class Screen : ObjectG
55 {
56 	/** the main Gtk struct */
57 	protected GdkScreen* gdkScreen;
58 
59 	/** Get the main Gtk struct */
60 	public GdkScreen* getScreenStruct()
61 	{
62 		return gdkScreen;
63 	}
64 
65 	/** the main Gtk struct as a void* */
66 	protected override void* getStruct()
67 	{
68 		return cast(void*)gdkScreen;
69 	}
70 
71 	protected override void setStruct(GObject* obj)
72 	{
73 		gdkScreen = cast(GdkScreen*)obj;
74 		super.setStruct(obj);
75 	}
76 
77 	/**
78 	 * Sets our main struct and passes it to the parent class.
79 	 */
80 	public this (GdkScreen* gdkScreen, bool ownedRef = false)
81 	{
82 		this.gdkScreen = gdkScreen;
83 		super(cast(GObject*)gdkScreen, ownedRef);
84 	}
85 
86 
87 	/** */
88 	public static GType getType()
89 	{
90 		return gdk_screen_get_type();
91 	}
92 
93 	/**
94 	 * Gets the default screen for the default display. (See
95 	 * gdk_display_get_default ()).
96 	 *
97 	 * Returns: a #GdkScreen, or %NULL if
98 	 *     there is no default display.
99 	 *
100 	 * Since: 2.2
101 	 */
102 	public static Screen getDefault()
103 	{
104 		auto p = gdk_screen_get_default();
105 		
106 		if(p is null)
107 		{
108 			return null;
109 		}
110 		
111 		return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p);
112 	}
113 
114 	/**
115 	 * Gets the height of the default screen in pixels. The returned
116 	 * size is in ”application pixels”, not in ”device pixels” (see
117 	 * gdk_screen_get_monitor_scale_factor()).
118 	 *
119 	 * Deprecated: Use per-monitor information
120 	 *
121 	 * Returns: the height of the default screen in pixels.
122 	 */
123 	public static int height()
124 	{
125 		return gdk_screen_height();
126 	}
127 
128 	/**
129 	 * Returns the height of the default screen in millimeters.
130 	 * Note that on many X servers this value will not be correct.
131 	 *
132 	 * Deprecated: Use per-monitor information
133 	 *
134 	 * Returns: the height of the default screen in millimeters,
135 	 *     though it is not always correct.
136 	 */
137 	public static int heightMm()
138 	{
139 		return gdk_screen_height_mm();
140 	}
141 
142 	/**
143 	 * Gets the width of the default screen in pixels. The returned
144 	 * size is in ”application pixels”, not in ”device pixels” (see
145 	 * gdk_screen_get_monitor_scale_factor()).
146 	 *
147 	 * Deprecated: Use per-monitor information
148 	 *
149 	 * Returns: the width of the default screen in pixels.
150 	 */
151 	public static int width()
152 	{
153 		return gdk_screen_width();
154 	}
155 
156 	/**
157 	 * Returns the width of the default screen in millimeters.
158 	 * Note that on many X servers this value will not be correct.
159 	 *
160 	 * Deprecated: Use per-monitor information
161 	 *
162 	 * Returns: the width of the default screen in millimeters,
163 	 *     though it is not always correct.
164 	 */
165 	public static int widthMm()
166 	{
167 		return gdk_screen_width_mm();
168 	}
169 
170 	/**
171 	 * Returns the screen’s currently active window.
172 	 *
173 	 * On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
174 	 * on the root window, as described in the
175 	 * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
176 	 * If there is no currently currently active
177 	 * window, or the window manager does not support the
178 	 * _NET_ACTIVE_WINDOW hint, this function returns %NULL.
179 	 *
180 	 * On other platforms, this function may return %NULL, depending on whether
181 	 * it is implementable on that platform.
182 	 *
183 	 * The returned window should be unrefed using g_object_unref() when
184 	 * no longer needed.
185 	 *
186 	 * Returns: the currently active window,
187 	 *     or %NULL.
188 	 *
189 	 * Since: 2.10
190 	 */
191 	public Window getActiveWindow()
192 	{
193 		auto p = gdk_screen_get_active_window(gdkScreen);
194 		
195 		if(p is null)
196 		{
197 			return null;
198 		}
199 		
200 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p, true);
201 	}
202 
203 	/**
204 	 * Gets the display to which the @screen belongs.
205 	 *
206 	 * Returns: the display to which @screen belongs
207 	 *
208 	 * Since: 2.2
209 	 */
210 	public Display getDisplay()
211 	{
212 		auto p = gdk_screen_get_display(gdkScreen);
213 		
214 		if(p is null)
215 		{
216 			return null;
217 		}
218 		
219 		return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p);
220 	}
221 
222 	/**
223 	 * Gets any options previously set with gdk_screen_set_font_options().
224 	 *
225 	 * Returns: the current font options, or %NULL if no
226 	 *     default font options have been set.
227 	 *
228 	 * Since: 2.10
229 	 */
230 	public FontOption getFontOptions()
231 	{
232 		auto p = gdk_screen_get_font_options(gdkScreen);
233 		
234 		if(p is null)
235 		{
236 			return null;
237 		}
238 		
239 		return new FontOption(cast(cairo_font_options_t*) p);
240 	}
241 
242 	/**
243 	 * Gets the height of @screen in pixels. The returned size is in
244 	 * ”application pixels”, not in ”device pixels” (see
245 	 * gdk_screen_get_monitor_scale_factor()).
246 	 *
247 	 * Deprecated: Use per-monitor information instead
248 	 *
249 	 * Returns: the height of @screen in pixels.
250 	 *
251 	 * Since: 2.2
252 	 */
253 	public int getHeight()
254 	{
255 		return gdk_screen_get_height(gdkScreen);
256 	}
257 
258 	/**
259 	 * Returns the height of @screen in millimeters.
260 	 *
261 	 * Note that this value is somewhat ill-defined when the screen
262 	 * has multiple monitors of different resolution. It is recommended
263 	 * to use the monitor dimensions instead.
264 	 *
265 	 * Deprecated: Use per-monitor information instead
266 	 *
267 	 * Returns: the heigth of @screen in millimeters.
268 	 *
269 	 * Since: 2.2
270 	 */
271 	public int getHeightMm()
272 	{
273 		return gdk_screen_get_height_mm(gdkScreen);
274 	}
275 
276 	/**
277 	 * Returns the monitor number in which the point (@x,@y) is located.
278 	 *
279 	 * Deprecated: Use gdk_display_get_monitor_at_point() instead
280 	 *
281 	 * Params:
282 	 *     x = the x coordinate in the virtual screen.
283 	 *     y = the y coordinate in the virtual screen.
284 	 *
285 	 * Returns: the monitor number in which the point (@x,@y) lies, or
286 	 *     a monitor close to (@x,@y) if the point is not in any monitor.
287 	 *
288 	 * Since: 2.2
289 	 */
290 	public int getMonitorAtPoint(int x, int y)
291 	{
292 		return gdk_screen_get_monitor_at_point(gdkScreen, x, y);
293 	}
294 
295 	/**
296 	 * Returns the number of the monitor in which the largest area of the
297 	 * bounding rectangle of @window resides.
298 	 *
299 	 * Deprecated: Use gdk_display_get_monitor_at_window() instead
300 	 *
301 	 * Params:
302 	 *     window = a #GdkWindow
303 	 *
304 	 * Returns: the monitor number in which most of @window is located,
305 	 *     or if @window does not intersect any monitors, a monitor,
306 	 *     close to @window.
307 	 *
308 	 * Since: 2.2
309 	 */
310 	public int getMonitorAtWindow(Window window)
311 	{
312 		return gdk_screen_get_monitor_at_window(gdkScreen, (window is null) ? null : window.getWindowStruct());
313 	}
314 
315 	/**
316 	 * Retrieves the #GdkRectangle representing the size and position of
317 	 * the individual monitor within the entire screen area. The returned
318 	 * geometry is in ”application pixels”, not in ”device pixels” (see
319 	 * gdk_screen_get_monitor_scale_factor()).
320 	 *
321 	 * Monitor numbers start at 0. To obtain the number of monitors of
322 	 * @screen, use gdk_screen_get_n_monitors().
323 	 *
324 	 * Note that the size of the entire screen area can be retrieved via
325 	 * gdk_screen_get_width() and gdk_screen_get_height().
326 	 *
327 	 * Deprecated: Use gdk_monitor_get_geometry() instead
328 	 *
329 	 * Params:
330 	 *     monitorNum = the monitor number
331 	 *     dest = a #GdkRectangle to be filled with
332 	 *         the monitor geometry
333 	 *
334 	 * Since: 2.2
335 	 */
336 	public void getMonitorGeometry(int monitorNum, out GdkRectangle dest)
337 	{
338 		gdk_screen_get_monitor_geometry(gdkScreen, monitorNum, &dest);
339 	}
340 
341 	/**
342 	 * Gets the height in millimeters of the specified monitor.
343 	 *
344 	 * Deprecated: Use gdk_monitor_get_height_mm() instead
345 	 *
346 	 * Params:
347 	 *     monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
348 	 *
349 	 * Returns: the height of the monitor, or -1 if not available
350 	 *
351 	 * Since: 2.14
352 	 */
353 	public int getMonitorHeightMm(int monitorNum)
354 	{
355 		return gdk_screen_get_monitor_height_mm(gdkScreen, monitorNum);
356 	}
357 
358 	/**
359 	 * Returns the output name of the specified monitor.
360 	 * Usually something like VGA, DVI, or TV, not the actual
361 	 * product name of the display device.
362 	 *
363 	 * Deprecated: Use gdk_monitor_get_model() instead
364 	 *
365 	 * Params:
366 	 *     monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
367 	 *
368 	 * Returns: a newly-allocated string containing the name
369 	 *     of the monitor, or %NULL if the name cannot be determined
370 	 *
371 	 * Since: 2.14
372 	 */
373 	public string getMonitorPlugName(int monitorNum)
374 	{
375 		auto retStr = gdk_screen_get_monitor_plug_name(gdkScreen, monitorNum);
376 		
377 		scope(exit) Str.freeString(retStr);
378 		return Str.toString(retStr);
379 	}
380 
381 	/**
382 	 * Returns the internal scale factor that maps from monitor coordinates
383 	 * to the actual device pixels. On traditional systems this is 1, but
384 	 * on very high density outputs this can be a higher value (often 2).
385 	 *
386 	 * This can be used if you want to create pixel based data for a
387 	 * particular monitor, but most of the time you’re drawing to a window
388 	 * where it is better to use gdk_window_get_scale_factor() instead.
389 	 *
390 	 * Deprecated: Use gdk_monitor_get_scale_factor() instead
391 	 *
392 	 * Params:
393 	 *     monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
394 	 *
395 	 * Returns: the scale factor
396 	 *
397 	 * Since: 3.10
398 	 */
399 	public int getMonitorScaleFactor(int monitorNum)
400 	{
401 		return gdk_screen_get_monitor_scale_factor(gdkScreen, monitorNum);
402 	}
403 
404 	/**
405 	 * Gets the width in millimeters of the specified monitor, if available.
406 	 *
407 	 * Deprecated: Use gdk_monitor_get_width_mm() instead
408 	 *
409 	 * Params:
410 	 *     monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
411 	 *
412 	 * Returns: the width of the monitor, or -1 if not available
413 	 *
414 	 * Since: 2.14
415 	 */
416 	public int getMonitorWidthMm(int monitorNum)
417 	{
418 		return gdk_screen_get_monitor_width_mm(gdkScreen, monitorNum);
419 	}
420 
421 	/**
422 	 * Retrieves the #GdkRectangle representing the size and position of
423 	 * the “work area” on a monitor within the entire screen area. The returned
424 	 * geometry is in ”application pixels”, not in ”device pixels” (see
425 	 * gdk_screen_get_monitor_scale_factor()).
426 	 *
427 	 * The work area should be considered when positioning menus and
428 	 * similar popups, to avoid placing them below panels, docks or other
429 	 * desktop components.
430 	 *
431 	 * Note that not all backends may have a concept of workarea. This
432 	 * function will return the monitor geometry if a workarea is not
433 	 * available, or does not apply.
434 	 *
435 	 * Monitor numbers start at 0. To obtain the number of monitors of
436 	 * @screen, use gdk_screen_get_n_monitors().
437 	 *
438 	 * Deprecated: Use gdk_monitor_get_workarea() instead
439 	 *
440 	 * Params:
441 	 *     monitorNum = the monitor number
442 	 *     dest = a #GdkRectangle to be filled with
443 	 *         the monitor workarea
444 	 *
445 	 * Since: 3.4
446 	 */
447 	public void getMonitorWorkarea(int monitorNum, out GdkRectangle dest)
448 	{
449 		gdk_screen_get_monitor_workarea(gdkScreen, monitorNum, &dest);
450 	}
451 
452 	/**
453 	 * Returns the number of monitors which @screen consists of.
454 	 *
455 	 * Deprecated: Use gdk_display_get_n_monitors() instead
456 	 *
457 	 * Returns: number of monitors which @screen consists of
458 	 *
459 	 * Since: 2.2
460 	 */
461 	public int getNMonitors()
462 	{
463 		return gdk_screen_get_n_monitors(gdkScreen);
464 	}
465 
466 	/**
467 	 * Gets the index of @screen among the screens in the display
468 	 * to which it belongs. (See gdk_screen_get_display())
469 	 *
470 	 * Returns: the index
471 	 *
472 	 * Since: 2.2
473 	 */
474 	public int getNumber()
475 	{
476 		return gdk_screen_get_number(gdkScreen);
477 	}
478 
479 	/**
480 	 * Gets the primary monitor for @screen.  The primary monitor
481 	 * is considered the monitor where the “main desktop” lives.
482 	 * While normal application windows typically allow the window
483 	 * manager to place the windows, specialized desktop applications
484 	 * such as panels should place themselves on the primary monitor.
485 	 *
486 	 * If no primary monitor is configured by the user, the return value
487 	 * will be 0, defaulting to the first monitor.
488 	 *
489 	 * Deprecated: Use gdk_display_get_primary_monitor() instead
490 	 *
491 	 * Returns: An integer index for the primary monitor, or 0 if none is configured.
492 	 *
493 	 * Since: 2.20
494 	 */
495 	public int getPrimaryMonitor()
496 	{
497 		return gdk_screen_get_primary_monitor(gdkScreen);
498 	}
499 
500 	/**
501 	 * Gets the resolution for font handling on the screen; see
502 	 * gdk_screen_set_resolution() for full details.
503 	 *
504 	 * Returns: the current resolution, or -1 if no resolution
505 	 *     has been set.
506 	 *
507 	 * Since: 2.10
508 	 */
509 	public double getResolution()
510 	{
511 		return gdk_screen_get_resolution(gdkScreen);
512 	}
513 
514 	/**
515 	 * Gets a visual to use for creating windows with an alpha channel.
516 	 * The windowing system on which GTK+ is running
517 	 * may not support this capability, in which case %NULL will
518 	 * be returned. Even if a non-%NULL value is returned, its
519 	 * possible that the window’s alpha channel won’t be honored
520 	 * when displaying the window on the screen: in particular, for
521 	 * X an appropriate windowing manager and compositing manager
522 	 * must be running to provide appropriate display.
523 	 *
524 	 * This functionality is not implemented in the Windows backend.
525 	 *
526 	 * For setting an overall opacity for a top-level window, see
527 	 * gdk_window_set_opacity().
528 	 *
529 	 * Returns: a visual to use for windows
530 	 *     with an alpha channel or %NULL if the capability is not
531 	 *     available.
532 	 *
533 	 * Since: 2.8
534 	 */
535 	public Visual getRgbaVisual()
536 	{
537 		auto p = gdk_screen_get_rgba_visual(gdkScreen);
538 		
539 		if(p is null)
540 		{
541 			return null;
542 		}
543 		
544 		return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p);
545 	}
546 
547 	/**
548 	 * Gets the root window of @screen.
549 	 *
550 	 * Returns: the root window
551 	 *
552 	 * Since: 2.2
553 	 */
554 	public Window getRootWindow()
555 	{
556 		auto p = gdk_screen_get_root_window(gdkScreen);
557 		
558 		if(p is null)
559 		{
560 			return null;
561 		}
562 		
563 		return ObjectG.getDObject!(Window)(cast(GdkWindow*) p);
564 	}
565 
566 	/**
567 	 * Retrieves a desktop-wide setting such as double-click time
568 	 * for the #GdkScreen @screen.
569 	 *
570 	 * FIXME needs a list of valid settings here, or a link to
571 	 * more information.
572 	 *
573 	 * Params:
574 	 *     name = the name of the setting
575 	 *     value = location to store the value of the setting
576 	 *
577 	 * Returns: %TRUE if the setting existed and a value was stored
578 	 *     in @value, %FALSE otherwise.
579 	 *
580 	 * Since: 2.2
581 	 */
582 	public bool getSetting(string name, Value value)
583 	{
584 		return gdk_screen_get_setting(gdkScreen, Str.toStringz(name), (value is null) ? null : value.getValueStruct()) != 0;
585 	}
586 
587 	/**
588 	 * Get the system’s default visual for @screen.
589 	 * This is the visual for the root window of the display.
590 	 * The return value should not be freed.
591 	 *
592 	 * Returns: the system visual
593 	 *
594 	 * Since: 2.2
595 	 */
596 	public Visual getSystemVisual()
597 	{
598 		auto p = gdk_screen_get_system_visual(gdkScreen);
599 		
600 		if(p is null)
601 		{
602 			return null;
603 		}
604 		
605 		return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p);
606 	}
607 
608 	/**
609 	 * Obtains a list of all toplevel windows known to GDK on the screen @screen.
610 	 * A toplevel window is a child of the root window (see
611 	 * gdk_get_default_root_window()).
612 	 *
613 	 * The returned list should be freed with g_list_free(), but
614 	 * its elements need not be freed.
615 	 *
616 	 * Returns: list of toplevel windows, free with g_list_free()
617 	 *
618 	 * Since: 2.2
619 	 */
620 	public ListG getToplevelWindows()
621 	{
622 		auto p = gdk_screen_get_toplevel_windows(gdkScreen);
623 		
624 		if(p is null)
625 		{
626 			return null;
627 		}
628 		
629 		return new ListG(cast(GList*) p);
630 	}
631 
632 	/**
633 	 * Gets the width of @screen in pixels. The returned size is in
634 	 * ”application pixels”, not in ”device pixels” (see
635 	 * gdk_screen_get_monitor_scale_factor()).
636 	 *
637 	 * Deprecated: Use per-monitor information instead
638 	 *
639 	 * Returns: the width of @screen in pixels.
640 	 *
641 	 * Since: 2.2
642 	 */
643 	public int getWidth()
644 	{
645 		return gdk_screen_get_width(gdkScreen);
646 	}
647 
648 	/**
649 	 * Gets the width of @screen in millimeters.
650 	 *
651 	 * Note that this value is somewhat ill-defined when the screen
652 	 * has multiple monitors of different resolution. It is recommended
653 	 * to use the monitor dimensions instead.
654 	 *
655 	 * Deprecated: Use per-monitor information instead
656 	 *
657 	 * Returns: the width of @screen in millimeters.
658 	 *
659 	 * Since: 2.2
660 	 */
661 	public int getWidthMm()
662 	{
663 		return gdk_screen_get_width_mm(gdkScreen);
664 	}
665 
666 	/**
667 	 * Returns a #GList of #GdkWindows representing the current
668 	 * window stack.
669 	 *
670 	 * On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
671 	 * property on the root window, as described in the
672 	 * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
673 	 * If the window manager does not support the
674 	 * _NET_CLIENT_LIST_STACKING hint, this function returns %NULL.
675 	 *
676 	 * On other platforms, this function may return %NULL, depending on whether
677 	 * it is implementable on that platform.
678 	 *
679 	 * The returned list is newly allocated and owns references to the
680 	 * windows it contains, so it should be freed using g_list_free() and
681 	 * its windows unrefed using g_object_unref() when no longer needed.
682 	 *
683 	 * Returns: a
684 	 *     list of #GdkWindows for the current window stack, or %NULL.
685 	 *
686 	 * Since: 2.10
687 	 */
688 	public ListG getWindowStack()
689 	{
690 		auto p = gdk_screen_get_window_stack(gdkScreen);
691 		
692 		if(p is null)
693 		{
694 			return null;
695 		}
696 		
697 		return new ListG(cast(GList*) p, true);
698 	}
699 
700 	/**
701 	 * Returns whether windows with an RGBA visual can reasonably
702 	 * be expected to have their alpha channel drawn correctly on
703 	 * the screen.
704 	 *
705 	 * On X11 this function returns whether a compositing manager is
706 	 * compositing @screen.
707 	 *
708 	 * Returns: Whether windows with RGBA visuals can reasonably be
709 	 *     expected to have their alpha channels drawn correctly on the screen.
710 	 *
711 	 * Since: 2.10
712 	 */
713 	public bool isComposited()
714 	{
715 		return gdk_screen_is_composited(gdkScreen) != 0;
716 	}
717 
718 	/**
719 	 * Lists the available visuals for the specified @screen.
720 	 * A visual describes a hardware image data format.
721 	 * For example, a visual might support 24-bit color, or 8-bit color,
722 	 * and might expect pixels to be in a certain format.
723 	 *
724 	 * Call g_list_free() on the return value when you’re finished with it.
725 	 *
726 	 * Returns: a list of visuals; the list must be freed, but not its contents
727 	 *
728 	 * Since: 2.2
729 	 */
730 	public ListG listVisuals()
731 	{
732 		auto p = gdk_screen_list_visuals(gdkScreen);
733 		
734 		if(p is null)
735 		{
736 			return null;
737 		}
738 		
739 		return new ListG(cast(GList*) p);
740 	}
741 
742 	/**
743 	 * Determines the name to pass to gdk_display_open() to get
744 	 * a #GdkDisplay with this screen as the default screen.
745 	 *
746 	 * Returns: a newly allocated string, free with g_free()
747 	 *
748 	 * Since: 2.2
749 	 */
750 	public string makeDisplayName()
751 	{
752 		auto retStr = gdk_screen_make_display_name(gdkScreen);
753 		
754 		scope(exit) Str.freeString(retStr);
755 		return Str.toString(retStr);
756 	}
757 
758 	/**
759 	 * Sets the default font options for the screen. These
760 	 * options will be set on any #PangoContext’s newly created
761 	 * with gdk_pango_context_get_for_screen(). Changing the
762 	 * default set of font options does not affect contexts that
763 	 * have already been created.
764 	 *
765 	 * Params:
766 	 *     options = a #cairo_font_options_t, or %NULL to unset any
767 	 *         previously set default font options.
768 	 *
769 	 * Since: 2.10
770 	 */
771 	public void setFontOptions(FontOption options)
772 	{
773 		gdk_screen_set_font_options(gdkScreen, (options is null) ? null : options.getFontOptionStruct());
774 	}
775 
776 	/**
777 	 * Sets the resolution for font handling on the screen. This is a
778 	 * scale factor between points specified in a #PangoFontDescription
779 	 * and cairo units. The default value is 96, meaning that a 10 point
780 	 * font will be 13 units high. (10 * 96. / 72. = 13.3).
781 	 *
782 	 * Params:
783 	 *     dpi = the resolution in “dots per inch”. (Physical inches aren’t actually
784 	 *         involved; the terminology is conventional.)
785 	 *
786 	 * Since: 2.10
787 	 */
788 	public void setResolution(double dpi)
789 	{
790 		gdk_screen_set_resolution(gdkScreen, dpi);
791 	}
792 
793 	protected class OnCompositedChangedDelegateWrapper
794 	{
795 		static OnCompositedChangedDelegateWrapper[] listeners;
796 		void delegate(Screen) dlg;
797 		gulong handlerId;
798 		
799 		this(void delegate(Screen) dlg)
800 		{
801 			this.dlg = dlg;
802 			this.listeners ~= this;
803 		}
804 		
805 		void remove(OnCompositedChangedDelegateWrapper source)
806 		{
807 			foreach(index, wrapper; listeners)
808 			{
809 				if (wrapper.handlerId == source.handlerId)
810 				{
811 					listeners[index] = null;
812 					listeners = std.algorithm.remove(listeners, index);
813 					break;
814 				}
815 			}
816 		}
817 	}
818 
819 	/**
820 	 * The ::composited-changed signal is emitted when the composited
821 	 * status of the screen changes
822 	 *
823 	 * Since: 2.10
824 	 */
825 	gulong addOnCompositedChanged(void delegate(Screen) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
826 	{
827 		auto wrapper = new OnCompositedChangedDelegateWrapper(dlg);
828 		wrapper.handlerId = Signals.connectData(
829 			this,
830 			"composited-changed",
831 			cast(GCallback)&callBackCompositedChanged,
832 			cast(void*)wrapper,
833 			cast(GClosureNotify)&callBackCompositedChangedDestroy,
834 			connectFlags);
835 		return wrapper.handlerId;
836 	}
837 	
838 	extern(C) static void callBackCompositedChanged(GdkScreen* screenStruct, OnCompositedChangedDelegateWrapper wrapper)
839 	{
840 		wrapper.dlg(wrapper.outer);
841 	}
842 	
843 	extern(C) static void callBackCompositedChangedDestroy(OnCompositedChangedDelegateWrapper wrapper, GClosure* closure)
844 	{
845 		wrapper.remove(wrapper);
846 	}
847 
848 	protected class OnMonitorsChangedDelegateWrapper
849 	{
850 		static OnMonitorsChangedDelegateWrapper[] listeners;
851 		void delegate(Screen) dlg;
852 		gulong handlerId;
853 		
854 		this(void delegate(Screen) dlg)
855 		{
856 			this.dlg = dlg;
857 			this.listeners ~= this;
858 		}
859 		
860 		void remove(OnMonitorsChangedDelegateWrapper source)
861 		{
862 			foreach(index, wrapper; listeners)
863 			{
864 				if (wrapper.handlerId == source.handlerId)
865 				{
866 					listeners[index] = null;
867 					listeners = std.algorithm.remove(listeners, index);
868 					break;
869 				}
870 			}
871 		}
872 	}
873 
874 	/**
875 	 * The ::monitors-changed signal is emitted when the number, size
876 	 * or position of the monitors attached to the screen change.
877 	 *
878 	 * Only for X11 and OS X for now. A future implementation for Win32
879 	 * may be a possibility.
880 	 *
881 	 * Since: 2.14
882 	 */
883 	gulong addOnMonitorsChanged(void delegate(Screen) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
884 	{
885 		auto wrapper = new OnMonitorsChangedDelegateWrapper(dlg);
886 		wrapper.handlerId = Signals.connectData(
887 			this,
888 			"monitors-changed",
889 			cast(GCallback)&callBackMonitorsChanged,
890 			cast(void*)wrapper,
891 			cast(GClosureNotify)&callBackMonitorsChangedDestroy,
892 			connectFlags);
893 		return wrapper.handlerId;
894 	}
895 	
896 	extern(C) static void callBackMonitorsChanged(GdkScreen* screenStruct, OnMonitorsChangedDelegateWrapper wrapper)
897 	{
898 		wrapper.dlg(wrapper.outer);
899 	}
900 	
901 	extern(C) static void callBackMonitorsChangedDestroy(OnMonitorsChangedDelegateWrapper wrapper, GClosure* closure)
902 	{
903 		wrapper.remove(wrapper);
904 	}
905 
906 	protected class OnSizeChangedDelegateWrapper
907 	{
908 		static OnSizeChangedDelegateWrapper[] listeners;
909 		void delegate(Screen) dlg;
910 		gulong handlerId;
911 		
912 		this(void delegate(Screen) dlg)
913 		{
914 			this.dlg = dlg;
915 			this.listeners ~= this;
916 		}
917 		
918 		void remove(OnSizeChangedDelegateWrapper source)
919 		{
920 			foreach(index, wrapper; listeners)
921 			{
922 				if (wrapper.handlerId == source.handlerId)
923 				{
924 					listeners[index] = null;
925 					listeners = std.algorithm.remove(listeners, index);
926 					break;
927 				}
928 			}
929 		}
930 	}
931 
932 	/**
933 	 * The ::size-changed signal is emitted when the pixel width or
934 	 * height of a screen changes.
935 	 *
936 	 * Since: 2.2
937 	 */
938 	gulong addOnSizeChanged(void delegate(Screen) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
939 	{
940 		auto wrapper = new OnSizeChangedDelegateWrapper(dlg);
941 		wrapper.handlerId = Signals.connectData(
942 			this,
943 			"size-changed",
944 			cast(GCallback)&callBackSizeChanged,
945 			cast(void*)wrapper,
946 			cast(GClosureNotify)&callBackSizeChangedDestroy,
947 			connectFlags);
948 		return wrapper.handlerId;
949 	}
950 	
951 	extern(C) static void callBackSizeChanged(GdkScreen* screenStruct, OnSizeChangedDelegateWrapper wrapper)
952 	{
953 		wrapper.dlg(wrapper.outer);
954 	}
955 	
956 	extern(C) static void callBackSizeChangedDestroy(OnSizeChangedDelegateWrapper wrapper, GClosure* closure)
957 	{
958 		wrapper.remove(wrapper);
959 	}
960 }