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