/usr/include/gdkmm-3.0/gdkmm/display.h is in libgtkmm-3.0-dev 3.22.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | // Generated by gmmproc 2.54.0 -- DO NOT MODIFY!
#ifndef _GDKMM_DISPLAY_H
#define _GDKMM_DISPLAY_H
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
/*
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <vector>
#include <gdkmm/screen.h>
#include <gdkmm/applaunchcontext.h>
#include <gdkmm/types.h> //For ModifierType
#ifndef DOXYGEN_SHOULD_SKIP_THIS
using GdkDisplay = struct _GdkDisplay;
using GdkDisplayClass = struct _GdkDisplayClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Gdk
{ class Display_Class; } // namespace Gdk
#endif //DOXYGEN_SHOULD_SKIP_THIS
namespace Gdk
{
class Device;
class DeviceManager;
class Seat;
class Monitor;
class Window;
/** Gdk::Display object's purpose is two fold:
* To grab/ungrab keyboard focus and mouse pointer
* To manage and provide information about the Gdk::Screen(s) available for this Gdk::Display
*
* Gdk::Display objects are the GDK representation of the X Display which can be described as a workstation consisting
* of a keyboard a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of
* various Gdk::Screen objects currently instantiated by the application. It is also used to grab and release the keyboard
* and the mouse pointer.
*/
class Display : public Glib::Object
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
using CppObjectType = Display;
using CppClassType = Display_Class;
using BaseObjectType = GdkDisplay;
using BaseClassType = GdkDisplayClass;
// noncopyable
Display(const Display&) = delete;
Display& operator=(const Display&) = delete;
private: friend class Display_Class;
static CppClassType display_class_;
protected:
explicit Display(const Glib::ConstructParams& construct_params);
explicit Display(GdkDisplay* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
Display(Display&& src) noexcept;
Display& operator=(Display&& src) noexcept;
~Display() noexcept override;
/** Get the GType for this class, for use with the underlying GObject type system.
*/
static GType get_type() G_GNUC_CONST;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
GdkDisplay* gobj() { return reinterpret_cast<GdkDisplay*>(gobject_); }
///Provides access to the underlying C GObject.
const GdkDisplay* gobj() const { return reinterpret_cast<GdkDisplay*>(gobject_); }
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GdkDisplay* gobj_copy();
private:
protected:
Display();
public:
/** Opens a display.
*
* @newin{2,2}
*
* @param display_name The name of the display to open.
* @return A Gdk::Display, or <tt>nullptr</tt> if the
* display could not be opened.
*/
static Glib::RefPtr<Display> open(const Glib::ustring& display_name);
/** Gets the name of the display.
*
* @newin{2,2}
*
* @return A string representing the display name. This string is owned
* by GDK and should not be modified or freed.
*/
Glib::ustring get_name() const;
#ifndef GDKMM_DISABLE_DEPRECATED
/** Gets the number of screen managed by the @a display.
*
* @newin{2,2}
*
* Deprecated: 3.10: The number of screens is always 1.
*
* @deprecated The number of screens is always 1.
*
* @return Number of screens.
*/
int get_n_screens() const;
#endif // GDKMM_DISABLE_DEPRECATED
#ifndef GDKMM_DISABLE_DEPRECATED
/** Returns a screen object for one of the screens of the display.
*
* @newin{2,2}
* Deprecated: 3.20: There is only one screen; use get_default_screen() to get it.
*
* @deprecated There is only one screen; use get_default_screen() to get it.
*
* @param screen_num The screen number.
* @return The Gdk::Screen object.
*/
Glib::RefPtr<Screen> get_screen(int screen_num = 0);
#endif // GDKMM_DISABLE_DEPRECATED
#ifndef GDKMM_DISABLE_DEPRECATED
/** Returns a screen object for one of the screens of the display.
*
* @newin{2,2}
* Deprecated: 3.20: There is only one screen; use get_default_screen() to get it.
*
* @deprecated There is only one screen; use get_default_screen() to get it.
*
* @param screen_num The screen number.
* @return The Gdk::Screen object.
*/
Glib::RefPtr<const Screen> get_screen(int screen_num = 0) const;
#endif // GDKMM_DISABLE_DEPRECATED
/** Get the default Gdk::Screen for @a display.
*
* @newin{2,2}
*
* @return The default Gdk::Screen object for @a display.
*/
Glib::RefPtr<Screen> get_default_screen();
/** Get the default Gdk::Screen for @a display.
*
* @newin{2,2}
*
* @return The default Gdk::Screen object for @a display.
*/
Glib::RefPtr<const Screen> get_default_screen() const;
//deprecated
/** Returns <tt>true</tt> if there is an ongoing grab on @a device for @a display.
*
* @param device A Gdk::Device.
* @return <tt>true</tt> if there is a grab in effect for @a device.
*/
bool device_is_grabbed(const Glib::RefPtr<const Gdk::Device>& device) const;
/** Emits a short beep on @a display
*
* @newin{2,2}
*/
void beep();
/** Flushes any requests queued for the windowing system and waits until all
* requests have been handled. This is often used for making sure that the
* display is synchronized with the current state of the program. Calling
* sync() before gdk_error_trap_pop() makes sure that any errors
* generated from earlier requests are handled before the error trap is
* removed.
*
* This is most useful for X11. On windowing systems where requests are
* handled synchronously, this function will do nothing.
*
* @newin{2,2}
*/
void sync();
/** Closes the connection to the windowing system for the given display,
* and cleans up associated resources.
*
* @newin{2,2}
*/
void close();
/** Finds out if the display has been closed.
*
* @newin{2,22}
*
* @return <tt>true</tt> if the display is closed.
*/
bool is_closed() const;
//deprecated
//TODO: Use C++ Gdk::Event:
//TODO: get_event() removes the next event, if there is one - then there should not be a const version:
/** Gets the next Gdk::Event to be processed for @a display, fetching events from the
* windowing system if necessary.
*
* @newin{2,2}
*
* @return The next Gdk::Event to be processed, or <tt>nullptr</tt>
* if no events are pending. The returned Gdk::Event should be freed
* with Gdk::Event::free().
*/
GdkEvent* get_event();
/** Gets the next Gdk::Event to be processed for @a display, fetching events from the
* windowing system if necessary.
*
* @newin{2,2}
*
* @return The next Gdk::Event to be processed, or <tt>nullptr</tt>
* if no events are pending. The returned Gdk::Event should be freed
* with Gdk::Event::free().
*/
const GdkEvent* get_event() const;
/** Gets a copy of the first Gdk::Event in the @a display’s event queue, without
* removing the event from the queue. (Note that this function will
* not get more events from the windowing system. It only checks the events
* that have already been moved to the GDK event queue.)
*
* @newin{2,2}
*
* @return A copy of the first Gdk::Event on the event
* queue, or <tt>nullptr</tt> if no events are in the queue. The returned
* Gdk::Event should be freed with Gdk::Event::free().
*/
GdkEvent* peek_event();
/** Gets a copy of the first Gdk::Event in the @a display’s event queue, without
* removing the event from the queue. (Note that this function will
* not get more events from the windowing system. It only checks the events
* that have already been moved to the GDK event queue.)
*
* @newin{2,2}
*
* @return A copy of the first Gdk::Event on the event
* queue, or <tt>nullptr</tt> if no events are in the queue. The returned
* Gdk::Event should be freed with Gdk::Event::free().
*/
GdkEvent* peek_event() const;
/** Appends a copy of the given event onto the front of the event
* queue for @a display.
*
* @newin{2,2}
*
* @param event A Gdk::Event.
*/
void put_event(GdkEvent* event);
/** Returns whether the display has events that are waiting
* to be processed.
*
* @newin{3,0}
*
* @return <tt>true</tt> if there are events ready to be processed.
*/
bool has_pending() const;
#ifndef GDKMM_DISABLE_DEPRECATED
/** Sets the double click time (two clicks within this time interval
* count as a double click and result in a Gdk::2BUTTON_PRESS event).
* Applications should not set this, it is a global
* user-configured setting.
*
* @newin{2,2}
*
* @deprecated No replacement method. Applications should not set this.
*
* @param msec Double click time in milliseconds (thousandths of a second).
*/
void set_double_click_time(guint msec);
#endif // GDKMM_DISABLE_DEPRECATED
#ifndef GDKMM_DISABLE_DEPRECATED
/** Sets the double click distance (two clicks within this distance
* count as a double click and result in a Gdk::2BUTTON_PRESS event).
* See also set_double_click_time().
* Applications should not set this, it is a global
* user-configured setting.
*
* @newin{2,4}
*
* @deprecated No replacement method. Applications should not set this.
*
* @param distance Distance in pixels.
*/
void set_double_click_distance(guint distance);
#endif // GDKMM_DISABLE_DEPRECATED
/** Gets the default Gdk::Display. This is a convenience
* function for:
* `gdk_display_manager_get_default_display (Gdk::DisplayManager::get())`.
*
* @newin{2,2}
*
* @return A Gdk::Display, or <tt>nullptr</tt> if
* there is no default display.
*/
static Glib::RefPtr<Display> get_default();
//deprecated
#ifndef GDKMM_DISABLE_DEPRECATED
/** Opens the default display specified by command line arguments or
* environment variables, sets it as the default display, and returns
* it. gdk_parse_args() must have been called first. If the default
* display has previously been set, simply returns that. An internal
* function that should not be used by applications.
*
* Deprecated: 3.16: This symbol was never meant to be used outside
* of GTK+
*
* @deprecated This method was never meant to be used outside of GTK+.
*
* @return The default display, if it
* could be opened, otherwise <tt>nullptr</tt>.
*/
static Glib::RefPtr<Display> open_default_libgtk_only();
#endif // GDKMM_DISABLE_DEPRECATED
/** Returns the Gdk::Keymap attached to @a display.
*
* @newin{2,2}
*
* @return The Gdk::Keymap attached to @a display.
*/
GdkKeymap* get_keymap();
/** Returns the Gdk::Keymap attached to @a display.
*
* @newin{2,2}
*
* @return The Gdk::Keymap attached to @a display.
*/
const GdkKeymap* get_keymap() const;
bool set_selection_owner(const Glib::RefPtr<Window>& owner, Glib::ustring& selection, guint32 time_, bool send_event);
Glib::RefPtr<Window> get_selection_owner(const Glib::ustring& selection);
/** Send a response to SelectionRequest event.
*
* @newin{2,2}
*
* @param requestor Window to which to deliver response.
* @param selection Selection that was requested.
* @param target Target that was selected.
* @param property Property in which the selection owner stored the data,
* or "None" to indicate that the request was rejected.
* @param time_ Timestamp.
*/
void selection_send_notify(const Glib::RefPtr<Window>& requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_);
/** Flushes any requests queued for the windowing system; this happens automatically
* when the main loop blocks waiting for new events, but if your application
* is drawing without returning control to the main loop, you may need
* to call this function explicitly. A common case where this function
* needs to be called is when an application is executing drawing commands
* from a thread other than the thread where the main loop is running.
*
* This is most useful for X11. On windowing systems where requests are
* handled synchronously, this function will do nothing.
*
* @newin{2,4}
*/
void flush();
/** Returns <tt>true</tt> if cursors can use an 8bit alpha channel
* on @a display. Otherwise, cursors are restricted to bilevel
* alpha (i.e. a mask).
*
* @newin{2,4}
*
* @return Whether cursors can have alpha channels.
*/
bool supports_cursor_alpha() const;
/** Returns <tt>true</tt> if multicolored cursors are supported
* on @a display. Otherwise, cursors have only a forground
* and a background color.
*
* @newin{2,4}
*
* @return Whether cursors can have multiple colors.
*/
bool supports_cursor_color() const;
/** Returns the default size to use for cursors on @a display.
*
* @newin{2,4}
*
* @return The default cursor size.
*/
guint get_default_cursor_size() const;
/** Gets the maximal size to use for cursors on @a display.
*
* @newin{2,4}
*
* @param width The return location for the maximal cursor width.
* @param height The return location for the maximal cursor height.
*/
void get_maximal_cursor_size(guint& width, guint& height);
/** Returns the default group leader window for all toplevel windows
* on @a display. This window is implicitly created by GDK.
* See Gdk::Window::set_group().
*
* @newin{2,4}
*
* @return The default group leader window
* for @a display.
*/
Glib::RefPtr<Window> get_default_group();
/** Returns the default group leader window for all toplevel windows
* on @a display. This window is implicitly created by GDK.
* See Gdk::Window::set_group().
*
* @newin{2,4}
*
* @return The default group leader window
* for @a display.
*/
Glib::RefPtr<const Window> get_default_group() const;
/** Returns whether Gdk::EventOwnerChange events will be
* sent when the owner of a selection changes.
*
* @newin{2,6}
*
* @return Whether Gdk::EventOwnerChange events will
* be sent.
*/
bool supports_selection_notification() const;
/** Request Gdk::EventOwnerChange events for ownership changes
* of the selection named by the given atom.
*
* @newin{2,6}
*
* @param selection The Gdk::Atom naming the selection for which
* ownership change notification is requested.
* @return Whether Gdk::EventOwnerChange events will
* be sent.
*/
bool request_selection_notification(const Glib::ustring& selection);
/** Returns whether the speicifed display supports clipboard
* persistance; i.e.\ if it’s possible to store the clipboard data after an
* application has quit. On X11 this checks if a clipboard daemon is
* running.
*
* @newin{2,6}
*
* @return <tt>true</tt> if the display supports clipboard persistance.
*/
bool supports_clipboard_persistence() const;
/** Issues a request to the clipboard manager to store the clipboard data,
* saving all available targets.
* On X11, this is a special program that works according to the freedesktop clipboard specification,
* available at http://www.freedesktop.org/Standards/clipboard-manager-spec.
* @newin{2,6}
*
* @param clipboard_window A Gdk::Window belonging to the clipboard owner.
* @param time_ A timestamp.
*/
void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_);
void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const std::vector<Glib::ustring>& targets);
/** Returns <tt>true</tt> if gdk_window_shape_combine_mask() can
* be used to create shaped windows on @a display.
*
* @newin{2,10}
*
* @return <tt>true</tt> if shaped windows are supported.
*/
bool supports_shapes() const;
/** Returns <tt>true</tt> if gdk_window_input_shape_combine_mask() can
* be used to modify the input shape of windows on @a display.
*
* @newin{2,10}
*
* @return <tt>true</tt> if windows with modified input shape are supported.
*/
bool supports_input_shapes() const;
#ifndef GDKMM_DISABLE_DEPRECATED
/** Returns <tt>true</tt> if Gdk::Window::set_composited() can be used
* to redirect drawing on the window using compositing.
*
* Currently this only works on X11 with XComposite and
* XDamage extensions available.
*
* @newin{2,12}
*
* Deprecated: 3.16: Compositing is an outdated technology that
* only ever worked on X11.
*
* @deprecated Compositing is an outdated technology that only ever worked on X11.
*
* @return <tt>true</tt> if windows may be composited.
*/
bool supports_composite() const;
#endif // GDKMM_DISABLE_DEPRECATED
/** Indicates to the GUI environment that the application has
* finished loading, using a given identifier.
*
* GTK+ will call this function automatically for Gtk::Window
* with custom startup-notification identifier unless
* gtk_window_set_auto_startup_notification() is called to
* disable that feature.
*
* @newin{3,0}
*
* @param startup_id A startup-notification identifier, for which
* notification process should be completed.
*/
void notify_startup_complete(const Glib::ustring& startup_id);
#ifndef GDKMM_DISABLE_DEPRECATED
/** Returns the Gdk::DeviceManager associated to @a display.
*
* @newin{3,0}
*
* Deprecated: 3.20. Use get_default_seat() and Gdk::Seat operations.
*
* @deprecated Use get_default_seat() and Gdk::Seat operations.
*
* @return A Gdk::DeviceManager, or
* <tt>nullptr</tt>. This memory is owned by GDK and must not be freed
* or unreferenced.
*/
Glib::RefPtr<DeviceManager> get_device_manager();
#endif // GDKMM_DISABLE_DEPRECATED
#ifndef GDKMM_DISABLE_DEPRECATED
/** Returns the Gdk::DeviceManager associated to @a display.
*
* @newin{3,0}
*
* Deprecated: 3.20. Use get_default_seat() and Gdk::Seat operations.
*
* @deprecated Use get_default_seat() and Gdk::Seat operations.
*
* @return A Gdk::DeviceManager, or
* <tt>nullptr</tt>. This memory is owned by GDK and must not be freed
* or unreferenced.
*/
Glib::RefPtr<const DeviceManager> get_device_manager() const;
#endif // GDKMM_DISABLE_DEPRECATED
/** Returns a Gdk::AppLaunchContext suitable for launching
* applications on the given display.
*
* @newin{3,0}
*
* @return A new Gdk::AppLaunchContext for @a display.
* Free with Glib::object_unref() when done.
*/
Glib::RefPtr<AppLaunchContext> get_app_launch_context();
/** Returns a Gdk::AppLaunchContext suitable for launching
* applications on the given display.
*
* @newin{3,0}
*
* @return A new Gdk::AppLaunchContext for @a display.
* Free with Glib::object_unref() when done.
*/
Glib::RefPtr<const AppLaunchContext> get_app_launch_context() const;
/** Returns the default Gdk::Seat for this display.
*
* @newin{3,20}
*
* @return The default seat.
*/
Glib::RefPtr<Seat> get_default_seat();
/** Returns the default Gdk::Seat for this display.
*
* @newin{3,20}
*
* @return The default seat.
*/
Glib::RefPtr<const Seat> get_default_seat() const;
/** Returns the list of seats known to @a display.
*
* @newin{3,20}
*
* @return The
* list of seats known to the Gdk::Display.
*/
std::vector<Glib::RefPtr<Seat>> list_seats();
/** Returns the list of seats known to @a display.
*
* @newin{3,20}
*
* @return The
* list of seats known to the Gdk::Display.
*/
std::vector<Glib::RefPtr<const Seat>> list_seats() const;
/** Gets the number of monitors that belong to @a display.
*
* The returned number is valid until the next emission of the
* Gdk::Display::signal_monitor_added() or Gdk::Display::signal_monitor_removed() signal.
*
* @newin{3,22}
*
* @return The number of monitors.
*/
int get_n_monitors() const;
/** Gets a monitor associated with this display.
*
* @newin{3,22}
*
* @param monitor_num Number of the monitor.
* @return The Gdk::Monitor, or <tt>nullptr</tt> if
* @a monitor_num is not a valid monitor number.
*/
Glib::RefPtr<Monitor> get_monitor(int monitor_num);
/** Gets a monitor associated with this display.
*
* @newin{3,22}
*
* @param monitor_num Number of the monitor.
* @return The Gdk::Monitor, or <tt>nullptr</tt> if
* @a monitor_num is not a valid monitor number.
*/
Glib::RefPtr<const Monitor> get_monitor(int monitor_num) const;
/** Gets the primary monitor for the display.
*
* The primary monitor is considered the monitor where the “main desktop”
* lives. While normal application windows typically allow the window
* manager to place the windows, specialized desktop applications
* such as panels should place themselves on the primary monitor.
*
* @newin{3,22}
*
* @return The primary monitor, or <tt>nullptr</tt> if no primary
* monitor is configured by the user.
*/
Glib::RefPtr<Monitor> get_primary_monitor();
/** Gets the primary monitor for the display.
*
* The primary monitor is considered the monitor where the “main desktop”
* lives. While normal application windows typically allow the window
* manager to place the windows, specialized desktop applications
* such as panels should place themselves on the primary monitor.
*
* @newin{3,22}
*
* @return The primary monitor, or <tt>nullptr</tt> if no primary
* monitor is configured by the user.
*/
Glib::RefPtr<const Monitor> get_primary_monitor() const;
/** Gets the monitor in which the point ( @a x, @a y) is located,
* or a nearby monitor if the point is not in any monitor.
*
* @newin{3,22}
*
* @param x The x coordinate of the point.
* @param y The y coordinate of the point.
* @return The monitor containing the point.
*/
Glib::RefPtr<Monitor> get_monitor_at_point(int x, int y);
/** Gets the monitor in which the point ( @a x, @a y) is located,
* or a nearby monitor if the point is not in any monitor.
*
* @newin{3,22}
*
* @param x The x coordinate of the point.
* @param y The y coordinate of the point.
* @return The monitor containing the point.
*/
Glib::RefPtr<const Monitor> get_monitor_at_point(int x, int y) const;
/** Gets the monitor in which the largest area of @a window
* resides, or a monitor close to @a window if it is outside
* of all monitors.
*
* @newin{3,22}
*
* @param window A Gdk::Window.
* @return The monitor with the largest overlap with @a window.
*/
Glib::RefPtr<Monitor> get_monitor_at_window(const Glib::RefPtr<Window>& window);
/** Gets the monitor in which the largest area of @a window
* resides, or a monitor close to @a window if it is outside
* of all monitors.
*
* @newin{3,22}
*
* @param window A Gdk::Window.
* @return The monitor with the largest overlap with @a window.
*/
Glib::RefPtr<const Monitor> get_monitor_at_window(const Glib::RefPtr<Window>& window) const;
//We use no_default_handler because GdkDisplayClass is private.
/**
* @par Slot Prototype:
* <tt>void on_my_%closed(bool is_error)</tt>
*
* Flags: Run Last
*
* The signal_closed() signal is emitted when the connection to the windowing
* system for @a display is closed.
*
* @newin{2,2}
*
* @param is_error <tt>true</tt> if the display was closed due to an error.
*/
Glib::SignalProxy< void,bool > signal_closed();
/**
* @par Slot Prototype:
* <tt>void on_my_%opened()</tt>
*
* Flags: Run Last
*
* The signal_opened() signal is emitted when the connection to the windowing
* system for @a display is opened.
*/
Glib::SignalProxy< void > signal_opened();
/**
* @par Slot Prototype:
* <tt>void on_my_%seat_added(const Glib::RefPtr<Seat>& seat)</tt>
*
* Flags: Run Last
*
* The signal_seat_added() signal is emitted whenever a new seat is made
* known to the windowing system.
*
* @newin{3,20}
*
* @param seat The seat that was just added.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Seat>& > signal_seat_added();
/**
* @par Slot Prototype:
* <tt>void on_my_%seat_removed(const Glib::RefPtr<Seat>& seat)</tt>
*
* Flags: Run Last
*
* The signal_seat_removed() signal is emitted whenever a seat is removed
* by the windowing system.
*
* @newin{3,20}
*
* @param seat The seat that was just removed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Seat>& > signal_seat_removed();
/**
* @par Slot Prototype:
* <tt>void on_my_%monitor_added(const Glib::RefPtr<Monitor>& monitor)</tt>
*
* Flags: Run Last
*
* The signal_monitor_added() signal is emitted whenever a monitor is
* added.
*
* @newin{3,22}
*
* @param monitor The monitor that was just added.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Monitor>& > signal_monitor_added();
/**
* @par Slot Prototype:
* <tt>void on_my_%monitor_removed(const Glib::RefPtr<Monitor>& monitor)</tt>
*
* Flags: Run Last
*
* The signal_monitor_removed() signal is emitted whenever a monitor is
* removed.
*
* @newin{3,22}
*
* @param monitor The monitor that was just removed.
*/
Glib::SignalProxy< void,const Glib::RefPtr<Monitor>& > signal_monitor_removed();
// There are no properties.
// We don't wrap the vfuncs because GdkDisplayClass is private.
public:
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
};
} // namespace Gdk
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gdk::Display
*/
Glib::RefPtr<Gdk::Display> wrap(GdkDisplay* object, bool take_copy = false);
}
#endif /* _GDKMM_DISPLAY_H */
|