gi-gdkx11-4.0.2: GdkX11 bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GdkX11.Objects.X11Display

Description

No description available in the introspection data.

Synopsis

Exported types

newtype X11Display Source #

Memory-managed wrapper type.

Instances

Instances details
Eq X11Display Source # 
Instance details

Defined in GI.GdkX11.Objects.X11Display

IsGValue X11Display Source #

Convert X11Display to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.GdkX11.Objects.X11Display

ManagedPtrNewtype X11Display Source # 
Instance details

Defined in GI.GdkX11.Objects.X11Display

TypedObject X11Display Source # 
Instance details

Defined in GI.GdkX11.Objects.X11Display

Methods

glibType :: IO GType #

GObject X11Display Source # 
Instance details

Defined in GI.GdkX11.Objects.X11Display

HasParentTypes X11Display Source # 
Instance details

Defined in GI.GdkX11.Objects.X11Display

type ParentTypes X11Display Source # 
Instance details

Defined in GI.GdkX11.Objects.X11Display

type ParentTypes X11Display = '[Display, Object]

class (GObject o, IsDescendantOf X11Display o) => IsX11Display o Source #

Type class for types which can be safely cast to X11Display, for instance with toX11Display.

Instances

Instances details
(GObject o, IsDescendantOf X11Display o) => IsX11Display o Source # 
Instance details

Defined in GI.GdkX11.Objects.X11Display

toX11Display :: (MonadIO m, IsX11Display o) => o -> m X11Display Source #

Cast to X11Display, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

errorTrapPop

x11DisplayErrorTrapPop Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: the display

-> m Int32

Returns: X error code or 0 on success

Pops the error trap pushed by x11DisplayErrorTrapPush. 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, x11DisplayErrorTrapPopIgnored would be more efficient.

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

errorTrapPopIgnored

x11DisplayErrorTrapPopIgnored Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: the display

-> m () 

Pops the error trap pushed by x11DisplayErrorTrapPush. 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.

errorTrapPush

x11DisplayErrorTrapPush Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m () 

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 x11DisplayErrorTrapPop or x11DisplayErrorTrapPopIgnoredto lift a trap pushed with this function.

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

getGlxVersion

x11DisplayGetGlxVersion Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) 
=> a

display: a Display

-> m (Bool, Int32, Int32)

Returns: True if GLX is available

Retrieves the version of the GLX implementation.

getPrimaryMonitor

x11DisplayGetPrimaryMonitor Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) 
=> a

self: a Display

-> m Monitor

Returns: the primary monitor, or any monitor if no primary monitor is configured by the user

Gets the primary monitor for the display.

The primary monitor is considered the monitor where the “main desktop” lives. While normal application surfaces typically allow the window manager to place the surfaces, specialized desktop applications such as panels should place themselves on the primary monitor.

If no monitor is the designated primary monitor, any monitor (usually the first) may be returned.

getScreen

x11DisplayGetScreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) 
=> a

display: a X11Display

-> m X11Screen

Returns: the X11Screen

Retrieves the X11Screen of the display.

getStartupNotificationId

x11DisplayGetStartupNotificationId Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m Text

Returns: the startup notification ID for display

Gets the startup notification ID for a display.

getUserTime

x11DisplayGetUserTime Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m Word32

Returns: the timestamp of the last user interaction

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 x11SurfaceSetUserTime.

getXcursor

x11DisplayGetXcursor Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a, IsCursor b) 
=> a

display: a Display

-> b

cursor: a Cursor.

-> m CULong

Returns: an Xlib Cursor.

Returns the X cursor belonging to a Cursor, potentially creating the cursor.

Be aware that the returned cursor may not be unique to cursor. It may for example be shared with its fallback cursor. On old X servers that don't support the XCursor extension, all cursors may even fall back to a few default cursors.

getXdisplay

x11DisplayGetXdisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m Display

Returns: an X display

Returns the X display of a Display.

getXrootwindow

x11DisplayGetXrootwindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m CULong

Returns: an X Window

Returns the root X window used by Display.

getXscreen

x11DisplayGetXscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m Screen

Returns: an X Screen

Returns the X Screen used by Display.

grab

x11DisplayGrab Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m () 

Call XGrabServer() on display. To ungrab the display again, use x11DisplayUngrab.

x11DisplayGrab/x11DisplayUngrab calls can be nested.

open

x11DisplayOpen Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

displayName: name of the X display. See the openDisplay for details.

-> m (Maybe Display)

Returns: The new display or Nothing on error.

Tries to open a new display to the X server given by displayName. If opening the display fails, Nothing is returned.

setCursorTheme

x11DisplaySetCursorTheme Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> Maybe Text

theme: the name of the cursor theme to use, or Nothing to unset a previously set value

-> Int32

size: the cursor size to use, or 0 to keep the previous size

-> m () 

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 cursorNewFromName are updated to reflect the theme change. Custom cursors constructed with cursorNewFromTexture will have to be handled by the application (GTK+ applications can learn about cursor theme changes by listening for change notification for the corresponding GtkSetting).

setProgramClass

x11DisplaySetProgramClass Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) 
=> a

display: a Display

-> Text

programClass: a string

-> m () 

Sets the program class.

The X11 backend uses the program class to set the class name part of the WM_CLASS property on toplevel windows; see the ICCCM.

setStartupNotificationId

x11DisplaySetStartupNotificationId Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> Text

startupId: the startup notification ID (must be valid utf8)

-> m () 

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

setSurfaceScale

x11DisplaySetSurfaceScale Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: the display

-> Int32

scale: The new scale value

-> m () 

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.

stringToCompoundText

x11DisplayStringToCompoundText Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: the Display where the encoding is defined

-> Text

str: a nul-terminated string

-> m (Int32, Text, Int32, ByteString)

Returns: 0 upon success, non-zero upon failure

Convert a string from the encoding of the current locale into a form suitable for storing in a window property.

textPropertyToTextList

x11DisplayTextPropertyToTextList Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: The Display where the encoding is defined

-> Text

encoding: a string representing the encoding. The most common values for this are "STRING", or "COMPOUND_TEXT". This is value used as the type for the property

-> Int32

format: the format of the property

-> Word8

text: The text data

-> Int32

length: The number of items to transform

-> Text

list: location to store an array of strings in the encoding of the current locale. This array should be freed using gdk_free_text_list().

-> m Int32

Returns: the number of strings stored in list, or 0, if the conversion failed

Convert a text string from the encoding as it is stored in a property into an array of strings in the encoding of the current locale. (The elements of the array represent the nul-separated elements of the original text string.)

ungrab

x11DisplayUngrab Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> m () 

Ungrab display after it has been grabbed with x11DisplayGrab.

utf8ToCompoundText

x11DisplayUtf8ToCompoundText Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) 
=> a

display: a Display

-> Text

str: a UTF-8 string

-> m (Bool, Text, Int32, ByteString)

Returns: True if the conversion succeeded, otherwise False

Converts from UTF-8 to compound text.

Signals

xevent

type C_X11DisplayXeventCallback = Ptr () -> Ptr () -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type X11DisplayXeventCallback Source #

Arguments

 = Ptr ()

xevent: a pointer to the XEvent to process

-> IO Bool

Returns: True to stop other handlers from being invoked for the event. False to propagate the event further.

The xevent signal is a low level signal that is emitted whenever an XEvent has been received.

When handlers to this signal return True, no other handlers will be invoked. In particular, the default handler for this function is GDK's own event handling mechanism, so by returning True for an event that GDK expects to translate, you may break GDK and/or GTK+ in interesting ways. You have been warned.

If you want this signal handler to queue a Event, you can use displayPutEvent.

If you are interested in X GenericEvents, bear in mind that XGetEventData() has been already called on the event, and XFreeEventData() will be called afterwards.

afterX11DisplayXevent :: (IsX11Display a, MonadIO m) => a -> X11DisplayXeventCallback -> m SignalHandlerId Source #

Connect a signal handler for the xevent signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after x11Display #xevent callback

onX11DisplayXevent :: (IsX11Display a, MonadIO m) => a -> X11DisplayXeventCallback -> m SignalHandlerId Source #

Connect a signal handler for the xevent signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on x11Display #xevent callback