Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- disableMultidevice :: (HasCallStack, MonadIO m) => m ()
- x11AtomToXatomForDisplay :: (HasCallStack, MonadIO m, IsX11Display a) => a -> Text -> m CULong
- x11DeviceGetId :: (HasCallStack, MonadIO m, IsX11DeviceCore a) => a -> m Int32
- x11DeviceManagerLookup :: (HasCallStack, MonadIO m, IsX11DeviceManagerCore a) => a -> Int32 -> m (Maybe X11DeviceCore)
- x11FreeCompoundText :: (HasCallStack, MonadIO m) => Word8 -> m ()
- x11FreeTextList :: (HasCallStack, MonadIO m) => Text -> m ()
- x11GetServerTime :: (HasCallStack, MonadIO m, IsX11Surface a) => a -> m Word32
- x11GetXatomByNameForDisplay :: (HasCallStack, MonadIO m, IsX11Display a) => a -> Text -> m CULong
- x11GetXatomNameForDisplay :: (HasCallStack, MonadIO m, IsX11Display a) => a -> CULong -> m Text
- x11LookupXdisplay :: (HasCallStack, MonadIO m) => Display -> m X11Display
- x11RegisterStandardEventType :: (HasCallStack, MonadIO m, IsX11Display a) => a -> Int32 -> Int32 -> m ()
- x11SetSmClientId :: (HasCallStack, MonadIO m) => Maybe Text -> m ()
- x11XatomToAtomForDisplay :: (HasCallStack, MonadIO m, IsX11Display a) => a -> CULong -> m Text
Methods
disableMultidevice
disableMultidevice :: (HasCallStack, MonadIO m) => m () Source #
Disables multidevice support in GDKs X11 backend. This call must happen prior
to displayOpen
, gtk_init()
or gtk_init_check()
in order to
take effect.
Most common GTK+ applications won’t ever need to call this. Only applications that do mixed GDK/Xlib calls could want to disable multidevice support if such Xlib code deals with input devices in any way and doesn’t observe the presence of XInput 2.
x11AtomToXatomForDisplay
x11AtomToXatomForDisplay Source #
:: (HasCallStack, MonadIO m, IsX11Display a) | |
=> a |
|
-> Text |
|
-> m CULong | Returns: the X atom corresponding to |
x11DeviceGetId
:: (HasCallStack, MonadIO m, IsX11DeviceCore a) | |
=> a |
|
-> m Int32 | Returns: the XInput2 device ID. |
Returns the device ID as seen by XInput2.
If 'GI.GdkX11.Functions.disableMultidevice' 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.
x11DeviceManagerLookup
x11DeviceManagerLookup Source #
:: (HasCallStack, MonadIO m, IsX11DeviceManagerCore a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe X11DeviceCore) | Returns: The |
Returns the Device
that wraps the given device ID.
x11FreeCompoundText
:: (HasCallStack, MonadIO m) | |
=> Word8 |
|
-> m () |
Frees the data returned from x11DisplayStringToCompoundText
.
x11FreeTextList
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m () |
Frees the array of strings created by
x11DisplayTextPropertyToTextList
.
x11GetServerTime
:: (HasCallStack, MonadIO m, IsX11Surface a) | |
=> a |
|
-> m Word32 | Returns: the time stamp. |
Routine to get the current X server time stamp.
x11GetXatomByNameForDisplay
x11GetXatomByNameForDisplay Source #
:: (HasCallStack, MonadIO m, IsX11Display a) | |
=> a |
|
-> Text |
|
-> m CULong | Returns: a X atom for a |
Returns the X atom for a Display
corresponding to atomName
.
This function caches the result, so if called repeatedly it is much
faster than XInternAtom()
, which is a round trip to the server each time.
x11GetXatomNameForDisplay
x11GetXatomNameForDisplay Source #
:: (HasCallStack, MonadIO m, IsX11Display a) | |
=> a |
|
-> CULong |
|
-> m Text | Returns: name of the X atom; this string is owned by GDK, so it shouldn’t be modifed or freed. |
Returns the name of an X atom for its display. This
function is meant mainly for debugging, so for convenience, unlike
XAtomName()
and the result doesn’t need to
be freed.
x11LookupXdisplay
:: (HasCallStack, MonadIO m) | |
=> Display |
|
-> m X11Display |
Find the Display
corresponding to xdisplay
, if any exists.
x11RegisterStandardEventType
x11RegisterStandardEventType Source #
:: (HasCallStack, MonadIO m, IsX11Display a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Registers interest in receiving extension events with type codes
between eventBase
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).
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.
x11SetSmClientId
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> m () |
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
x11XatomToAtomForDisplay
x11XatomToAtomForDisplay Source #
:: (HasCallStack, MonadIO m, IsX11Display a) | |
=> a |
|
-> CULong |
|
-> m Text | Returns: the corresponding |
Convert from an X atom for a Display
to the corresponding
GdkAtom
.