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