Display
Object Hierarchy:
Description:
[
CCode ( type_id =
"gdk_display_get_type ()" ) ]
public class Display :
Object
GdkDisplay objects are the GDK 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 Seat objects.
Every display has a one or more seats, which can be accessed with
get_default_seat and list_seats.
Output devices are represented by Monitor objects, which can be accessed with
get_monitor_at_surface and similar APIs.
Content:
Properties:
- public bool composited { get; }
true if the display properly composites
the alpha channel.
- public bool input_shapes { get; }
true if the display supports input shapes.
- public bool rgba { get; }
true if the display supports an alpha
channel.
Static methods:
Creation methods:
Methods:
- 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 unowned Clipboard get_clipboard ()
Gets the clipboard used for copy/paste operations.
- public unowned Seat? get_default_seat ()
Returns the default
Seat for this display.
- public unowned Monitor get_monitor_at_surface (Surface surface)
Gets the monitor in which the largest area of surface
resides,
or a monitor close to surface
if it is outside of all monitors.
- public unowned ListModel get_monitors ()
Gets the list of monitors associated with this display.
- public unowned string get_name ()
Gets the name of the display.
- public unowned Clipboard get_primary_clipboard ()
Gets the clipboard used for the primary selection.
- public bool get_setting (string name, Value value)
Retrieves a desktop-wide setting such as double-click time for the
this.
- public unowned string? get_startup_notification_id ()
Gets the startup notification ID for a Wayland display, or
null if no ID has been defined.
- public bool is_closed ()
Finds out if the display has been closed.
- public bool is_composited ()
Returns whether surfaces can reasonably be expected to have their alpha
channel drawn correctly on the screen.
- public bool is_rgba ()
Returns whether surfaces on this this are
created with an alpha channel.
- public List<unowned Seat> list_seats ()
Returns the list of seats known to this.
- public bool map_keycode (uint keycode, out KeymapKey[] keys, out uint[] keyvals)
Returns the keyvals bound to keycode
.
- public bool map_keyval (uint keyval, out KeymapKey[] keys)
Obtains a list of keycode/group/level combinations that will generate
keyval
.
- public void notify_startup_complete (string startup_id)
Indicates to the GUI environment that the application has finished loading,
using a given identifier.
- public void put_event (Event event)
Appends the given event onto the front of the event queue for
this.
- public bool supports_input_shapes ()
Returns true if
set_input_region can be used to modify the input shape of surfaces on
this.
- public void sync ()
Flushes any requests queued for the windowing system and waits until all
requests have been handled.
- public bool translate_key (uint keycode, ModifierType state, int group, out uint keyval, out int effective_group, out int level, out ModifierType consumed)
Translates the contents of a GdkEventKey
(ie keycode
, state
, and group
) into a keyval, effective group, and level.
Signals:
- public signal void closed (bool is_error)
The closed signal is emitted when the connection
to the windowing system for display
is closed.
- public signal void opened ()
The opened signal is emitted when the connection
to the windowing system for display
is opened.
- 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.
- public signal void setting_changed (string setting)
The setting_changed signal is emitted whenever a
setting changes its value.
Inherited Members:
All known members inherited from class GLib.Object