gdkx11

package
Version: v0.0.0-...-2625db3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2021 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func X11DeviceGetID

func X11DeviceGetID(device *X11DeviceCore) int

X11DeviceGetID returns the device ID as seen by XInput2.

> If gdk_disable_multidevice() has been called, this function > will respectively return 2/3 for the core pointer and keyboard, > (matching the IDs for the Virtual Core Pointer and Keyboard in > XInput 2), but calling this function on any slave devices (i.e. > those managed via XInput 1.x), will return 0.

func X11DisplayGetGLXVersion

func X11DisplayGetGLXVersion(display *gdk.Display) (major int, minor int, ok bool)

X11DisplayGetGLXVersion retrieves the version of the GLX implementation.

func X11FreeCompoundText

func X11FreeCompoundText(ctext *byte)

X11FreeCompoundText frees the data returned from gdk_x11_display_string_to_compound_text().

func X11GetDefaultScreen

func X11GetDefaultScreen() int

X11GetDefaultScreen gets the default GTK+ screen number.

func X11GetParentRelativePattern deprecated

This function has been deprecated.
func X11GetParentRelativePattern() *cairo.Pattern

X11GetParentRelativePattern: used with gdk_window_set_background_pattern() to inherit background from parent window. Useful for imitating transparency when compositing is not available. Otherwise behaves like a transparent pattern.

Deprecated: Don't use this function.

func X11GetServerTime

func X11GetServerTime(window *X11Window) uint32

X11GetServerTime: routine to get the current X server time stamp.

func X11GrabServer

func X11GrabServer()

X11GrabServer: call gdk_x11_display_grab() on the default display. To ungrab the server again, use gdk_x11_ungrab_server().

gdk_x11_grab_server()/gdk_x11_ungrab_server() calls can be nested.

func X11RegisterStandardEventType

func X11RegisterStandardEventType(display *X11Display, eventBase int, nEvents int)

X11RegisterStandardEventType registers interest in receiving extension events with type codes between event_base and event_base + n_events - 1. The registered events must have the window field in the same place as core X events (this is not the case for e.g. XKB extension events).

If an event type is registered, events of this type will go through global and window-specific filters (see gdk_window_add_filter()). Unregistered events will only go through global filters. GDK may register the events of some X extensions on its own.

This function should only be needed in unusual circumstances, e.g. when filtering XInput extension events on the root window.

func X11SetSmClientID

func X11SetSmClientID(smClientId string)

X11SetSmClientID sets the SM_CLIENT_ID property on the application’s leader window so that the window manager can save the application’s state using the X11R6 ICCCM session management protocol.

See the X Session Management Library documentation for more information on session management and the Inter-Client Communication Conventions Manual

func X11UngrabServer

func X11UngrabServer()

X11UngrabServer: ungrab the default display after it has been grabbed with gdk_x11_grab_server().

Types

type X11AppLaunchContext

type X11AppLaunchContext struct {
	gdk.AppLaunchContext
}

type X11Cursor

type X11Cursor struct {
	gdk.Cursor
}

type X11DeviceCore

type X11DeviceCore struct {
	gdk.Device
}

func X11DeviceManagerLookup

func X11DeviceManagerLookup(deviceManager *X11DeviceManagerCore, deviceId int) *X11DeviceCore

X11DeviceManagerLookup returns the Device that wraps the given device ID.

type X11DeviceManagerCore

type X11DeviceManagerCore struct {
	gdk.DeviceManager
}

type X11DeviceManagerXI2

type X11DeviceManagerXI2 struct {
	X11DeviceManagerCore
}

type X11DeviceXI2

type X11DeviceXI2 struct {
	gdk.Device
}

type X11Display

type X11Display struct {
	gdk.Display
}

func (*X11Display) ErrorTrapPop

func (display *X11Display) ErrorTrapPop() int

ErrorTrapPop pops the error trap pushed by gdk_x11_display_error_trap_push(). Will XSync() if necessary and will always block until the error is known to have occurred or not occurred, so the error code can be returned.

If you don’t need to use the return value, gdk_x11_display_error_trap_pop_ignored() would be more efficient.

See gdk_error_trap_pop() for the all-displays-at-once equivalent.

func (*X11Display) ErrorTrapPopIgnored

func (display *X11Display) ErrorTrapPopIgnored()

ErrorTrapPopIgnored pops the error trap pushed by gdk_x11_display_error_trap_push(). Does not block to see if an error occurred; merely records the range of requests to ignore errors for, and ignores those errors if they arrive asynchronously.

See gdk_error_trap_pop_ignored() for the all-displays-at-once equivalent.

func (*X11Display) ErrorTrapPush

func (display *X11Display) ErrorTrapPush()

ErrorTrapPush begins a range of X requests on display for which X error events will be ignored. Unignored errors (when no trap is pushed) will abort the application. Use gdk_x11_display_error_trap_pop() or gdk_x11_display_error_trap_pop_ignored()to lift a trap pushed with this function.

See also gdk_error_trap_push() to push a trap on all displays.

func (*X11Display) Grab

func (display *X11Display) Grab()

Grab: call XGrabServer() on display. To ungrab the display again, use gdk_x11_display_ungrab().

gdk_x11_display_grab()/gdk_x11_display_ungrab() calls can be nested.

func (*X11Display) SetCursorTheme

func (display *X11Display) SetCursorTheme(theme string, size int)

SetCursorTheme sets the cursor theme from which the images for cursor should be taken.

If the windowing system supports it, existing cursors created with gdk_cursor_new(), gdk_cursor_new_for_display() and gdk_cursor_new_from_name() are updated to reflect the theme change. Custom cursors constructed with gdk_cursor_new_from_pixbuf() will have to be handled by the application (GTK+ applications can learn about cursor theme changes by listening for change notification for the corresponding Setting).

func (*X11Display) SetStartupNotificationID

func (display *X11Display) 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.

If the ID contains the string "_TIME" then the portion following that string is taken to be the X11 timestamp of the event that triggered the application to be launched and the GDK current event time is set accordingly.

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_notify_startup_complete()).

func (*X11Display) SetWindowScale

func (display *X11Display) SetWindowScale(scale int)

SetWindowScale forces a specific window scale for all windows on this display, instead of using the default or user configured scale. This is can be used to disable scaling support by setting scale to 1, or to programmatically set the window scale.

Once the scale is set by this call it will not change in response to later user configuration changes.

func (*X11Display) StartupNotificationID

func (display *X11Display) StartupNotificationID() string

StartupNotificationID gets the startup notification ID for a display.

func (*X11Display) Ungrab

func (display *X11Display) Ungrab()

Ungrab display after it has been grabbed with gdk_x11_display_grab().

func (*X11Display) UserTime

func (display *X11Display) UserTime() uint32

UserTime returns the timestamp of the last user interaction on display. The timestamp is taken from events caused by user interaction such as key presses or pointer movements. See gdk_x11_window_set_user_time().

type X11DisplayManager

type X11DisplayManager struct {
	gdk.DisplayManager
}

type X11DragContext

type X11DragContext struct {
	gdk.DragContext
}

type X11GLContext

type X11GLContext struct {
	gdk.GLContext
}

type X11Keymap

type X11Keymap struct {
	gdk.Keymap
}

func (*X11Keymap) GroupForState

func (keymap *X11Keymap) GroupForState(state uint) int

GroupForState extracts the group from the state field sent in an X Key event. This is only needed for code processing raw X events, since EventKey directly includes an is_modifier field.

func (*X11Keymap) KeyIsModifier

func (keymap *X11Keymap) KeyIsModifier(keycode uint) bool

KeyIsModifier determines whether a particular key code represents a key that is a modifier. That is, it’s a key that normally just affects the keyboard state and the behavior of other keys rather than producing a direct effect itself. This is only needed for code processing raw X events, since EventKey directly includes an is_modifier field.

type X11Monitor

type X11Monitor struct {
	gdk.Monitor
}

type X11Screen

type X11Screen struct {
	gdk.Screen
}

func (*X11Screen) CurrentDesktop

func (screen *X11Screen) CurrentDesktop() uint32

CurrentDesktop returns the current workspace for screen when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) specification.

func (*X11Screen) NumberOfDesktops

func (screen *X11Screen) NumberOfDesktops() uint32

NumberOfDesktops returns the number of workspaces for screen when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) specification.

func (*X11Screen) ScreenNumber

func (screen *X11Screen) ScreenNumber() int

ScreenNumber returns the index of a Screen.

func (*X11Screen) WindowManagerName

func (screen *X11Screen) WindowManagerName() string

WindowManagerName returns the name of the window manager for screen.

type X11Visual

type X11Visual struct {
	gdk.Visual
}

type X11Window

type X11Window struct {
	gdk.Window
}

func (*X11Window) Desktop

func (window *X11Window) Desktop() uint32

Desktop gets the number of the workspace window is on.

func (*X11Window) MoveToCurrentDesktop

func (window *X11Window) MoveToCurrentDesktop()

MoveToCurrentDesktop moves the window to the correct workspace when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) specification. Will not do anything if the window is already on all workspaces.

func (*X11Window) MoveToDesktop

func (window *X11Window) MoveToDesktop(desktop uint32)

MoveToDesktop moves the window to the given workspace when running unde a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) specification.

func (*X11Window) SetFrameExtents deprecated

This method has been deprecated.
func (window *X11Window) SetFrameExtents(left int, right int, top int, bottom int)

SetFrameExtents: this is the same as gdk_window_set_shadow_width() but it only works on GdkX11Window.

Deprecated: Use gdk_window_set_shadow_width() instead.

func (*X11Window) SetFrameSyncEnabled

func (window *X11Window) SetFrameSyncEnabled(frameSyncEnabled bool)

SetFrameSyncEnabled: this function can be used to disable frame synchronization for a window. Normally frame synchronziation will be enabled or disabled based on whether the system has a compositor that supports frame synchronization, but if the window is not directly managed by the window manager, then frame synchronziation may need to be disabled. This is the case for a window embedded via the XEMBED protocol.

func (*X11Window) SetHideTitlebarWhenMaximized

func (window *X11Window) SetHideTitlebarWhenMaximized(hideTitlebarWhenMaximized bool)

SetHideTitlebarWhenMaximized: set a hint for the window manager, requesting that the titlebar should be hidden when the window is maximized.

Note that this property is automatically updated by GTK+, so this function should only be used by applications which do not use GTK+ to create toplevel windows.

func (*X11Window) SetThemeVariant

func (window *X11Window) SetThemeVariant(variant string)

SetThemeVariant: GTK+ applications can request a dark theme variant. In order to make other applications - namely window managers using GTK+ for themeing - aware of this choice, GTK+ uses this function to export the requested theme variant as _GTK_THEME_VARIANT property on toplevel windows.

Note that this property is automatically updated by GTK+, so this function should only be used by applications which do not use GTK+ to create toplevel windows.

func (*X11Window) SetUTF8Property

func (window *X11Window) SetUTF8Property(name string, value string)

SetUTF8Property: this function modifies or removes an arbitrary X11 window property of type UTF8_STRING. If the given window is not a toplevel window, it is ignored.

func (*X11Window) SetUserTime

func (window *X11Window) SetUserTime(timestamp uint32)

SetUserTime: application can use this call to update the _NET_WM_USER_TIME property on a toplevel window. This property stores an Xserver time which represents the time of the last user input event received for this window. This property may be used by the window manager to alter the focus, stacking, and/or placement behavior of windows when they are mapped depending on whether the new window was created by a user action or is a "pop-up" window activated by a timer or some other event.

Note that this property is automatically updated by GDK, so this function should only be used by applications which handle input events bypassing GDK.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL