Display objects purpose are two fold:
- To manage and provide information about input devices (pointers and keyboards)
- To manage and provide information about the available Screens
GdkDisplay objects are the GDK representation of an 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 GdkScreen objects currently
instantiated by the application. It is also used to access the keyboard(s) and mouse pointer(s) of the display.
Most of the input device handling has been factored out into the separate
DeviceManager object. Every display has a device manager, which you can obtain using
get_device_manager.
- public void beep ()
Emits a short beep on this
- public void close ()
Closes the connection to the windowing system for the given display,
and cleans up associated resources.
- 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; 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.
- public AppLaunchContext get_app_launch_context ()
Returns a
AppLaunchContext 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
Seat 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)
Appends a copy of the given event onto the front of 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
gdk_window_input_shape_combine_mask
can be used to modify the input shape of windows on this
.
- 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.