Documentation ¶
Index ¶
- Variables
- type WaylandDevice
- type WaylandDisplay
- func (display *WaylandDisplay) EglDisplay() unsafe.Pointer
- func (display *WaylandDisplay) QueryRegistry(global string) bool
- func (display *WaylandDisplay) SetCursorTheme(name string, size int)
- func (display *WaylandDisplay) SetStartupNotificationID(startupId string)deprecated
- func (display *WaylandDisplay) StartupNotificationID() stringdeprecated
- type WaylandGLContext
- type WaylandMonitor
- type WaylandPopup
- type WaylandSeat
- type WaylandSurface
- type WaylandToplevel
- func (toplevel *WaylandToplevel) DropExportedHandle(handle string)
- func (toplevel *WaylandToplevel) ExportHandle(callback WaylandToplevelExported) bool
- func (toplevel *WaylandToplevel) SetApplicationID(applicationId string)
- func (toplevel *WaylandToplevel) SetTransientForExported(parentHandleStr string) bool
- func (toplevel *WaylandToplevel) UnexportHandle()deprecated
- type WaylandToplevelExported
Constants ¶
This section is empty.
Variables ¶
var ( GTypeWaylandDevice = coreglib.Type(C.gdk_wayland_device_get_type()) GTypeWaylandDisplay = coreglib.Type(C.gdk_wayland_display_get_type()) GTypeWaylandGLContext = coreglib.Type(C.gdk_wayland_gl_context_get_type()) GTypeWaylandMonitor = coreglib.Type(C.gdk_wayland_monitor_get_type()) GTypeWaylandPopup = coreglib.Type(C.gdk_wayland_popup_get_type()) GTypeWaylandSeat = coreglib.Type(C.gdk_wayland_seat_get_type()) GTypeWaylandSurface = coreglib.Type(C.gdk_wayland_surface_get_type()) GTypeWaylandToplevel = coreglib.Type(C.gdk_wayland_toplevel_get_type()) )
GType values.
Functions ¶
This section is empty.
Types ¶
type WaylandDevice ¶
type WaylandDevice struct { gdk.Device // contains filtered or unexported fields }
WaylandDevice: wayland implementation of GdkDevice.
Beyond the regular gdk.Device API, the Wayland implementation provides access to Wayland objects such as the wl_seat with gdkwayland.WaylandDevice.GetWlSeat(), the wl_keyboard with gdkwayland.WaylandDevice.GetWlKeyboard() and the wl_pointer with gdkwayland.WaylandDevice.GetWlPointer().
func (*WaylandDevice) NodePath ¶
func (device *WaylandDevice) NodePath() string
NodePath returns the /dev/input/event* path of this device.
For GdkDevices that possibly coalesce multiple hardware devices (eg. mouse, keyboard, touch,...), this function will return NULL.
This is most notably implemented for devices of type GDK_SOURCE_PEN, GDK_SOURCE_TABLET_PAD.
The function returns the following values:
- utf8 (optional): /dev/input/event* path of this device.
type WaylandDisplay ¶
type WaylandDisplay struct { gdk.Display // contains filtered or unexported fields }
WaylandDisplay: wayland implementation of GdkDisplay.
Beyond the regular gdk.Display API, the Wayland implementation provides access to Wayland objects such as the wl_display with gdkwayland.WaylandDisplay.GetWlDisplay(), the wl_compositor with gdkwayland.WaylandDisplay.GetWlCompositor().
You can find out what Wayland globals are supported by a display with gdkwayland.WaylandDisplay.QueryRegistry().
func (*WaylandDisplay) EglDisplay ¶ added in v0.3.0
func (display *WaylandDisplay) EglDisplay() unsafe.Pointer
EglDisplay retrieves the EGL display connection object for the given GDK display.
The function returns the following values:
- gpointer (optional): EGL display.
func (*WaylandDisplay) QueryRegistry ¶
func (display *WaylandDisplay) QueryRegistry(global string) bool
QueryRegistry returns TRUE if the interface was found in the display wl_registry.global handler.
The function takes the following parameters:
- global interface to query in the registry.
The function returns the following values:
- ok: TRUE if the global is offered by the compositor.
func (*WaylandDisplay) SetCursorTheme ¶
func (display *WaylandDisplay) SetCursorTheme(name string, size int)
SetCursorTheme sets the cursor theme for the given display.
The function takes the following parameters:
- name: new cursor theme.
- size to use for cursors.
func (*WaylandDisplay) SetStartupNotificationID
deprecated
func (display *WaylandDisplay) SetStartupNotificationID(startupId string)
SetStartupNotificationID sets the startup notification ID for a display.
This is usually taken from the value of the DESKTOP_STARTUP_ID environment variable, but in some cases (such as the application not being launched using exec()) it can come from other sources.
The startup ID is also what is used to signal that the startup is complete (for example, when opening a window or when calling gdk.Display.NotifyStartupComplete()).
Deprecated: Use gdk.Toplevel.SetStartupID().
The function takes the following parameters:
- startupId: startup notification ID (must be valid utf8).
func (*WaylandDisplay) StartupNotificationID
deprecated
func (display *WaylandDisplay) StartupNotificationID() string
StartupNotificationID gets the startup notification ID for a Wayland display, or NULL if no ID has been defined.
Deprecated: since version 4.10.
The function returns the following values:
- utf8 (optional): startup notification ID for display.
type WaylandGLContext ¶
type WaylandGLContext struct { gdk.GLContext // contains filtered or unexported fields }
WaylandGLContext: wayland implementation of GdkGLContext.
type WaylandMonitor ¶
type WaylandMonitor struct { gdk.Monitor // contains filtered or unexported fields }
WaylandMonitor: wayland implementation of GdkMonitor.
Beyond the gdk.Monitor API, the Wayland implementation offers access to the Wayland wl_output object with gdkwayland.WaylandMonitor.GetWlOutput().
type WaylandPopup ¶
type WaylandPopup struct { WaylandSurface *coreglib.Object gdk.Popup gdk.Surface // contains filtered or unexported fields }
WaylandPopup: wayland implementation of GdkPopup.
type WaylandSeat ¶
type WaylandSeat struct { gdk.Seat // contains filtered or unexported fields }
WaylandSeat: wayland implementation of GdkSeat.
Beyond the regular gdk.Seat API, the Wayland implementation provides access to the Wayland wl_seat object with gdkwayland.WaylandSeat.GetWlSeat().
type WaylandSurface ¶
type WaylandSurface struct { gdk.Surface // contains filtered or unexported fields }
WaylandSurface: wayland implementation of GdkSurface.
Beyond the gdk.Surface API, the Wayland implementation offers access to the Wayland wl_surface object with gdkwayland.WaylandSurface.GetWlSurface().
type WaylandToplevel ¶
type WaylandToplevel struct { WaylandSurface *coreglib.Object gdk.Surface gdk.Toplevel // contains filtered or unexported fields }
WaylandToplevel: wayland implementation of GdkToplevel.
Beyond the gdk.Toplevel API, the Wayland implementation has API to set up cross-process parent-child relationships between surfaces with gdkwayland.WaylandToplevel.ExportHandle() and gdkwayland.WaylandToplevel.SetTransientForExported().
func (*WaylandToplevel) DropExportedHandle ¶ added in v0.3.0
func (toplevel *WaylandToplevel) DropExportedHandle(handle string)
DropExportedHandle: destroy a handle that was obtained with gdk_wayland_toplevel_export_handle().
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
The function takes the following parameters:
- handle to drop.
func (*WaylandToplevel) ExportHandle ¶
func (toplevel *WaylandToplevel) ExportHandle(callback WaylandToplevelExported) bool
ExportHandle: asynchronously obtains a handle for a surface that can be passed to other processes.
When the handle has been obtained, callback will be called.
It is an error to call this function on a surface that is already exported.
When the handle is no longer needed, gdkwayland.WaylandToplevel.UnexportHandle() should be called to clean up resources.
The main purpose for obtaining a handle is to mark a surface from another surface as transient for this one, see gdkwayland.WaylandToplevel.SetTransientForExported().
Before 4.12, this API could not safely be used multiple times, since there was no reference counting for handles. Starting with 4.12, every call to this function obtains a new handle, and every call to gdkwayland.WaylandToplevel.DropExportedHandle() drops just the handle that it is given.
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
The function takes the following parameters:
- callback to call with the handle.
The function returns the following values:
- ok: TRUE if the handle has been requested, FALSE if an error occurred.
func (*WaylandToplevel) SetApplicationID ¶
func (toplevel *WaylandToplevel) SetApplicationID(applicationId string)
SetApplicationID sets the application id on a GdkToplevel.
The function takes the following parameters:
- applicationId: application id for the toplevel.
func (*WaylandToplevel) SetTransientForExported ¶
func (toplevel *WaylandToplevel) SetTransientForExported(parentHandleStr string) bool
SetTransientForExported marks toplevel as transient for the surface to which the given parent_handle_str refers.
Typically, the handle will originate from a gdkwayland.WaylandToplevel.ExportHandle() call in another process.
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
The function takes the following parameters:
- parentHandleStr: exported handle for a surface.
The function returns the following values:
- ok: TRUE if the surface has been marked as transient, FALSE if an error occurred.
func (*WaylandToplevel) UnexportHandle
deprecated
func (toplevel *WaylandToplevel) UnexportHandle()
UnexportHandle destroys the handle that was obtained with gdk_wayland_toplevel_export_handle().
It is an error to call this function on a surface that does not have a handle.
Since 4.12, this function does nothing. Use gdkwayland.WaylandToplevel.DropExportedHandle() instead to drop a handle that was obtained with gdkwayland.WaylandToplevel.ExportHandle().
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
Deprecated: Use gdkwayland.WaylandToplevel.DropExportedHandle() instead, this function does nothing.
type WaylandToplevelExported ¶
type WaylandToplevelExported func(toplevel *WaylandToplevel, handle string)
WaylandToplevelExported: callback that gets called when the handle for a surface has been obtained from the Wayland compositor.
This callback is used in gdkwayland.WaylandToplevel.ExportHandle().
The handle can be passed to other processes, for the purpose of marking surfaces as transient for out-of-process surfaces.