Display
Object Hierarchy:
Gdk.Display
Gdk.Display
Gdk.Display
GLib.Object
GLib.Object
GLib.Object->Gdk.Display
Description:
[
CCode ( type_id =
"gdk_display_get_type ()" ) ]
public sealed 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 [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.
Content:
Properties:
public bool composited { get ; }
true if the display properly composites
the alpha channel.
public DmabufFormats dmabuf_formats { get ; }
The dma-buf formats that are supported on this display
public bool input_shapes { get ; }
true if the display supports input shapes.
public bool rgba { get ; }
true if the display supports an alpha
channel.
public bool shadow_width { get ; }
true if the display supports extensible
frames.
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.
public GLContext create_gl_context () throws Error
Creates a new `GdkGLContext` for the `GdkDisplay`.
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 unowned Clipboard get_clipboard ()
Gets the clipboard used for copy/paste operations.
public unowned Seat ? get_default_seat ()
Returns the default `GdkSeat` for this display.
public unowned DmabufFormats get_dmabuf_formats ()
Returns the dma-buf formats that are supported on this display.
public unowned Monitor ? get_monitor_at_surface (Surface surface)
Gets the monitor in which the largest area of surface
resides.
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 bool prepare_gl () throws Error
Checks that OpenGL is available for this
and ensures that it is properly initialized.
public void put_event (Event event)
Adds the given event to the event queue for this
.
public bool supports_input_shapes ()
Returns true if the display supports input
shapes.
public bool supports_shadow_width ()
Returns whether it's possible for a surface to draw outside of the window
area.
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` into a keyval, effective group,
and level.
Signals:
public signal void closed (bool is_error)
Emitted when the connection to the windowing system for display
is closed.
public signal void opened ()
Emitted when the connection to the windowing system for display
is opened.
public signal void seat_added (Seat seat)
Emitted whenever a new seat is made known to the windowing system.
public signal void seat_removed (Seat seat)
Emitted whenever a seat is removed by the windowing system.
public signal void setting_changed (string setting)
Emitted whenever a setting changes its value.
Inherited Members:
All known members inherited from class GLib.Object