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