gi-gdkx11-3.0.2: GdkX11 bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.GdkX11.Objects.X11Display

Contents

- Exported types
- Methods
  - errorTrapPop
  - errorTrapPopIgnored
  - errorTrapPush
  - getGlxVersion
  - getStartupNotificationId
  - getUserTime
  - getXdisplay
  - grab
  - setCursorTheme
  - setStartupNotificationId
  - setWindowScale
  - textPropertyToTextList
  - ungrab

Description

No description available in the introspection data.

Synopsis

- newtype X11Display = X11Display (ManagedPtr X11Display)
- class GObject o => IsX11Display o
- toX11Display :: (MonadIO m, IsX11Display o) => o -> m X11Display
- noX11Display :: Maybe X11Display
- x11DisplayErrorTrapPop :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m Int32
- x11DisplayErrorTrapPopIgnored :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m ()
- x11DisplayErrorTrapPush :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m ()
- x11DisplayGetGlxVersion :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Bool, Int32, Int32)
- x11DisplayGetStartupNotificationId :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m Text
- x11DisplayGetUserTime :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m Word32
- x11DisplayGetXdisplay :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m Display
- x11DisplayGrab :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m ()
- x11DisplaySetCursorTheme :: (HasCallStack, MonadIO m, IsX11Display a) => a -> Maybe Text -> Int32 -> m ()
- x11DisplaySetStartupNotificationId :: (HasCallStack, MonadIO m, IsX11Display a) => a -> Text -> m ()
- x11DisplaySetWindowScale :: (HasCallStack, MonadIO m, IsX11Display a) => a -> Int32 -> m ()
- x11DisplayTextPropertyToTextList :: (HasCallStack, MonadIO m, IsX11Display a) => a -> Atom -> Int32 -> Word8 -> Int32 -> Text -> m Int32
- x11DisplayUngrab :: (HasCallStack, MonadIO m, IsX11Display a) => a -> m ()

# Exported types

newtype X11Display Source #

Memory-managed wrapper type.

Constructors

X11Display (ManagedPtr X11Display) |

Instances

GObject X11Display Source # |
Instance details Defined in GI.GdkX11.Objects.X11Display Methods gobjectType :: X11Display -> IO GType Source #
IsDisplay X11Display Source # |
Instance details Defined in GI.GdkX11.Objects.X11Display
IsObject X11Display Source # |
Instance details Defined in GI.GdkX11.Objects.X11Display
IsX11Display X11Display Source # |
Instance details Defined in GI.GdkX11.Objects.X11Display

class GObject o => IsX11Display o Source #

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

Instances

(GObject a, (UnknownAncestorError X11Display a :: Constraint)) => IsX11Display a Source # |
Instance details Defined in GI.GdkX11.Objects.X11Display
IsX11Display X11Display 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`.

noX11Display :: Maybe X11Display Source #

A convenience alias for `Nothing` :: `Maybe` `X11Display`.

# 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 `errorTrapPop` for the all-displays-at-once equivalent.

Since: 3.0

## 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 `errorTrapPopIgnored` for the all-displays-at-once equivalent.

Since: 3.0

## 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 `x11DisplayErrorTrapPopIgnored`to lift a trap pushed with this function.

See also `errorTrapPush` to push a trap on all displays.

Since: 3.0

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

Since: 3.16

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

Since: 2.12

## 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 `x11WindowSetUserTime`.

Since: 2.8

## 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`.

Since: 2.2

## 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`.

'GI.GdkX11.Objects.X11Display.x11DisplayGrab'\/'GI.GdkX11.Objects.X11Display.x11DisplayUngrab' calls can be nested.

Since: 2.2

## 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 `cursorNew`, `cursorNewForDisplay` and `cursorNewFromName` are updated to reflect the theme change. Custom cursors constructed with `cursorNewFromPixbuf` 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`).

Since: 2.8

## 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 `notifyStartupComplete`).

Since: 3.0

## setWindowScale

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

Since: 3.10

## textPropertyToTextList

x11DisplayTextPropertyToTextList Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) |
=> a | `display`: The `Display` where the encoding is defined
-> Atom | `encoding`: an atom 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.)

Since: 2.24

## ungrab

x11DisplayUngrab Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) |
=> a | `display`: a `Display`
-> m () |

Ungrab `display` after it has been grabbed with `x11DisplayGrab`.

Since: 2.2