public class Display : Object
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.
- public static unowned Display? get_default ()
Gets the default Display.
- public static unowned Display? open (string display_name)
Opens a display.
- public static unowned Display? open_default_libgtk_only ()
Opens the default display specified by command line arguments or environment variables, sets it as the default display, and returns it.
- protected Display ()
- 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
- 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 ()
Returns the DeviceManager associated to this.
- 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 (
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
windowresides, or a monitor close to
windowif 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
- 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_maskcan 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_maskcan 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
yon 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.
- public signal void closed (bool is_error)
The closed signal is emitted when the connection to the windowing system for
- public signal void monitor_added (Monitor monitor)
The monitor_added signal is emitted whenever a monitor is added.
- public signal void monitor_removed (Monitor monitor)
The monitor_removed signal is emitted whenever a monitor is removed.
- public signal void opened ()
The opened signal is emitted when the connection to the windowing system for
- public signal void seat_added (Seat seat)
The seat_added signal is emitted whenever a new seat is made known to the windowing system.
- public signal void seat_removed (Seat seat)
The seat_removed signal is emitted whenever a seat is removed by the windowing system.