A representation of a workstation.
Their purpose are two-fold:
- To manage and provide information about input devices (pointers, keyboards, etc)
- To manage and provide information about output devices (monitors, projectors, etc)
Most of the input device handling has been factored out into separate [class@Gdk.Seat] objects. Every display has a one or more seats,
which can be accessed with [method@Gdk.Display.get_default_seat] and [method@Gdk.Display.list_seats].
Output devices are represented by [class@Gdk.Monitor] objects, which can be accessed with [method@Gdk.Display.get_monitor_at_surface] and
similar APIs.
- public void beep ()
Emits a short beep on this
- public void close ()
Closes the connection to the windowing system for the given display.
- public bool device_is_grabbed (Device device)
Returns true if there is an ongoing
grab on device for this.
- public void flush ()
Flushes any requests queued for the windowing system.
- public AppLaunchContext get_app_launch_context ()
Returns a `GdkAppLaunchContext` suitable for launching applications on
the given display.
- public uint get_default_cursor_size ()
Returns the default size to use for cursors on
this.
- public unowned Window get_default_group ()
Returns the default group leader window for all toplevel windows on
this.
- public unowned Screen get_default_screen ()
Get the default Screen for
this.
- public unowned Seat get_default_seat ()
Returns the default `GdkSeat` for this display.
- public unowned DeviceManager? get_device_manager ()
- public Event? get_event ()
Gets the next Event to be
processed for this, fetching events from the windowing system if necessary.
- public void get_maximal_cursor_size (out uint width, out uint height)
Gets the maximal size to use for cursors on
this.
- public unowned Monitor? get_monitor (int monitor_num)
Gets a monitor associated with this display.
- public unowned Monitor get_monitor_at_point (int x, int y)
Gets the monitor in which the point (x, y)
is located, or a nearby monitor if the point is not in any monitor.
- public unowned Monitor get_monitor_at_window (Window window)
Gets the monitor in which the largest area of window
resides, or a monitor close to window if it is outside of all monitors.
- public int get_n_monitors ()
Gets the number of monitors that belong to
this.
- public int get_n_screens ()
Gets the number of screen managed by the
this.
- public unowned string get_name ()
Gets the name of the display.
- public void get_pointer (out unowned Screen screen, out int x, out int y, out ModifierType mask)
Gets the current location of the pointer and the current modifier mask
for a given display.
- public unowned Monitor? get_primary_monitor ()
Gets the primary monitor for the display.
- public unowned Screen get_screen (int screen_num)
Returns a screen object for one of the screens of the display.
- public unowned Window? get_window_at_pointer (out int win_x, out int win_y)
Obtains the window underneath the mouse pointer, returning the
location of the pointer in that window in win_x, win_y for screen.
- public bool has_pending ()
Returns whether the display has events that are waiting to be
processed.
- public bool is_closed ()
Finds out if the display has been closed.
- public void keyboard_ungrab (uint32 time_)
Release any keyboard grab
- public unowned List<Device> list_devices ()
Returns the list of available input devices attached to
this.
- public List<unowned Seat> list_seats ()
Returns the list of seats known to this
.
- public void notify_startup_complete (string startup_id)
Indicates to the GUI environment that the application has finished
loading, using a given identifier.
- public Event? peek_event ()
Gets a copy of the first Event
in the this’s event queue, without removing the event from the queue.
- public bool pointer_is_grabbed ()
Test if the pointer is grabbed.
- public void pointer_ungrab (uint32 time_)
Release any pointer grab.
- public void put_event (Event event)
Adds the given event to the event queue for
this.
- public bool request_selection_notification (Atom selection)
Request
EventOwnerChange events for ownership changes of the selection named by the given atom.
- public void set_double_click_distance (uint distance)
Sets the double click distance (two clicks within this distance count
as a double click and result in a @2BUTTON_PRESS event).
- public void set_double_click_time (uint msec)
Sets the double click time (two clicks within this time interval count
as a double click and result in a @2BUTTON_PRESS event).
- public void store_clipboard (Window clipboard_window, uint32 time_, Atom[]? targets)
Issues a request to the clipboard manager to store the clipboard data.
- public bool supports_clipboard_persistence ()
Returns whether the speicifed display supports clipboard persistance;
i.
- public bool supports_composite ()
Returns true if
set_composited can be used to redirect drawing on the window using
compositing.
- public bool supports_cursor_alpha ()
Returns true if cursors can use an
8bit alpha channel on this.
- public bool supports_cursor_color ()
Returns true if multicolored cursors
are supported on this.
- public bool supports_input_shapes ()
Returns true if the display supports
input shapes.
- public bool supports_selection_notification ()
Returns whether
EventOwnerChange events will be sent when the owner of a selection changes.
- public bool supports_shapes ()
Returns true if
gdk_window_shape_combine_mask can be used to create shaped windows on this.
- public void sync ()
Flushes any requests queued for the windowing system and waits until
all requests have been handled.
- public void warp_pointer (Screen screen, int x, int y)
Warps the pointer of this to the
point x,y on the screen screen, unless the pointer is confined to a window by a grab, in which
case it will be moved as far as allowed by the grab.