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