gi-gdk4-4.0.10: Gdk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gdk.Objects.Display

Contents

- Exported types
- Methods
  - beep
  - close
  - createGlContext
  - deviceIsGrabbed
  - flush
  - getAppLaunchContext
  - getClipboard
  - getDefault
  - getDefaultSeat
  - getDmabufFormats
  - getMonitorAtSurface
  - getMonitors
  - getName
  - getPrimaryClipboard
  - getSetting
  - getStartupNotificationId
  - isClosed
  - isComposited
  - isRgba
  - listSeats
  - mapKeycode
  - mapKeyval
  - notifyStartupComplete
  - open
  - prepareGl
  - putEvent
  - supportsInputShapes
  - supportsShadowWidth
  - sync
  - translateKey
- Properties
  - composited
  - dmabufFormats
  - inputShapes
  - rgba
  - shadowWidth
- Signals
  - closed
  - opened
  - seatAdded
  - seatRemoved
  - settingChanged

Description

A representation of a workstation.

Their purpose are two-fold:

- To manage and provide information about input devices (pointers, keyboards, etc)
- To manage and provide information about output devices (monitors, projectors, etc)

Most of the input device handling has been factored out into separate `Seat` objects. Every display has a one or more seats, which can be accessed with `displayGetDefaultSeat` and `displayListSeats`.

Output devices are represented by `Monitor` objects, which can be accessed with `displayGetMonitorAtSurface` and similar APIs.

Synopsis

- newtype Display = Display (ManagedPtr Display)
- class (GObject o, IsDescendantOf Display o) => IsDisplay o
- toDisplay :: (MonadIO m, IsDisplay o) => o -> m Display
- displayBeep :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayClose :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayCreateGlContext :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m GLContext
- displayDeviceIsGrabbed :: (HasCallStack, MonadIO m, IsDisplay a, IsDevice b) => a -> b -> m Bool
- displayFlush :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayGetAppLaunchContext :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m AppLaunchContext
- displayGetClipboard :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Clipboard
- displayGetDefault :: (HasCallStack, MonadIO m) => m (Maybe Display)
- displayGetDefaultSeat :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Maybe Seat)
- displayGetDmabufFormats :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m DmabufFormats
- displayGetMonitorAtSurface :: (HasCallStack, MonadIO m, IsDisplay a, IsSurface b) => a -> b -> m (Maybe Monitor)
- displayGetMonitors :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ListModel
- displayGetName :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Text
- displayGetPrimaryClipboard :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Clipboard
- displayGetSetting :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Text -> GValue -> m Bool
- displayGetStartupNotificationId :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m (Maybe Text)
- displayIsClosed :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displayIsComposited :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displayIsRgba :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displayListSeats :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m [Seat]
- displayMapKeycode :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Word32 -> m (Bool, [KeymapKey], [Word32])
- displayMapKeyval :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Word32 -> m (Bool, [KeymapKey])
- displayNotifyStartupComplete :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Text -> m ()
- displayOpen :: (HasCallStack, MonadIO m) => Maybe Text -> m (Maybe Display)
- displayPrepareGl :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayPutEvent :: (HasCallStack, MonadIO m, IsDisplay a, IsEvent b) => a -> b -> m ()
- displaySupportsInputShapes :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySupportsShadowWidth :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Bool
- displaySync :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m ()
- displayTranslateKey :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Word32 -> [ModifierType] -> Int32 -> m (Bool, Word32, Int32, Int32, [ModifierType])
- getDisplayComposited :: (MonadIO m, IsDisplay o) => o -> m Bool
- getDisplayDmabufFormats :: (MonadIO m, IsDisplay o) => o -> m DmabufFormats
- getDisplayInputShapes :: (MonadIO m, IsDisplay o) => o -> m Bool
- getDisplayRgba :: (MonadIO m, IsDisplay o) => o -> m Bool
- getDisplayShadowWidth :: (MonadIO m, IsDisplay o) => o -> m Bool
- type DisplayClosedCallback = Bool -> IO ()
- afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId
- onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId
- type DisplayOpenedCallback = IO ()
- afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId
- onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId
- type DisplaySeatAddedCallback = Seat -> IO ()
- afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId
- onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId
- type DisplaySeatRemovedCallback = Seat -> IO ()
- afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId
- onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId
- type DisplaySettingChangedCallback = Text -> IO ()
- afterDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySettingChangedCallback) -> m SignalHandlerId
- onDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySettingChangedCallback) -> m SignalHandlerId

# Exported types

newtype Display Source #

Memory-managed wrapper type.

Constructors

Display (ManagedPtr Display) |

#### Instances

Instances details

Eq Display Source # |
Instance details Defined in GI.Gdk.Objects.Display Methods (==) :: Display -> Display -> Bool Source # (/=) :: Display -> Display -> Bool Source #
GObject Display Source # |
Instance details Defined in GI.Gdk.Objects.Display
ManagedPtrNewtype Display Source # |
Instance details Defined in GI.Gdk.Objects.Display Methods toManagedPtr :: Display -> ManagedPtr Display Source #
TypedObject Display Source # |
Instance details Defined in GI.Gdk.Objects.Display Methods glibType :: IO GType Source #
HasParentTypes Display Source # |
Instance details Defined in GI.Gdk.Objects.Display
IsGValue (Maybe Display) Source # | Convert `Display` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gdk.Objects.Display Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Display -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Display) Source #
type ParentTypes Display Source # |
Instance details Defined in GI.Gdk.Objects.Display type ParentTypes Display = '[Object]

class (GObject o, IsDescendantOf Display o) => IsDisplay o Source #

Type class for types which can be safely cast to `Display`, for instance with `toDisplay`.

#### Instances

Instances details

(GObject o, IsDescendantOf Display o) => IsDisplay o Source # |
Instance details Defined in GI.Gdk.Objects.Display

toDisplay :: (MonadIO m, IsDisplay o) => o -> m Display Source #

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

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

beep, bindProperty, bindPropertyFull, close, createGlContext, deviceIsGrabbed, flush, forceFloating, freezeNotify, getv, isClosed, isComposited, isFloating, isRgba, listSeats, mapKeycode, mapKeyval, notify, notifyByPspec, notifyStartupComplete, prepareGl, putEvent, ref, refSink, runDispose, stealData, stealQdata, supportsInputShapes, supportsShadowWidth, sync, thawNotify, translateKey, unref, watchClosure.

#### Getters

getAppLaunchContext, getClipboard, getData, getDefaultSeat, getDmabufFormats, getMonitorAtSurface, getMonitors, getName, getPrimaryClipboard, getProperty, getQdata, getSetting, getStartupNotificationId.

#### Setters

setData, setDataFull, setProperty.

## beep

displayBeep Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m () |

Emits a short beep on `display`

## close

displayClose Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m () |

Closes the connection to the windowing system for the given display.

This cleans up associated resources.

## createGlContext

displayCreateGlContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `self`: a `GdkDisplay`
-> m GLContext | Returns: the newly created `GdkGLContext` (Can throw `GError`)

Creates a new `GdkGLContext` for the `GdkDisplay`.

The context is disconnected from any particular surface or surface and cannot be used to draw to any surface. It can only be used to draw to non-surface framebuffers like textures.

If the creation of the `GdkGLContext` failed, `error` will be set. Before using the returned `GdkGLContext`, you will need to call `gLContextMakeCurrent` or `gLContextRealize`.

Since: 4.6

## deviceIsGrabbed

displayDeviceIsGrabbed Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a, IsDevice b) |
=> a | `display`: a `GdkDisplay`
-> b | `device`: a `GdkDevice`
-> m Bool | Returns: `True` if there is a grab in effect for `device`.

Returns `True` if there is an ongoing grab on `device` for `display`.

## flush

displayFlush Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m () |

Flushes any requests queued for the windowing system.

This happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this function explicitly. A common case where this function needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

## getAppLaunchContext

displayGetAppLaunchContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m AppLaunchContext | Returns: a new `GdkAppLaunchContext` for `display`

Returns a `GdkAppLaunchContext` suitable for launching applications on the given display.

## getClipboard

displayGetClipboard Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Clipboard | Returns: the display's clipboard

Gets the clipboard used for copy/paste operations.

## getDefault

displayGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m (Maybe Display) | Returns: a `GdkDisplay`, or `Nothing` if there is no default display

Gets the default `GdkDisplay`.

This is a convenience function for:

gdk_display_manager_get_default_display (gdk_display_manager_get ())

## getDefaultSeat

displayGetDefaultSeat Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m (Maybe Seat) | Returns: the default seat.

Returns the default `GdkSeat` for this display.

Note that a display may not have a seat. In this case, this function will return `Nothing`.

## getDmabufFormats

displayGetDmabufFormats Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m DmabufFormats | Returns: a `GdkDmabufFormats` object

Returns the dma-buf formats that are supported on this display.

GTK may use OpenGL or Vulkan to support some formats. Calling this function will then initialize them if they aren't yet.

The formats returned by this function can be used for negotiating buffer formats with producers such as v4l, pipewire or GStreamer.

To learn more about dma-bufs, see `DmabufTextureBuilder`.

This function is threadsafe. It can be called from any thread.

Since: 4.14

## getMonitorAtSurface

displayGetMonitorAtSurface Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a, IsSurface b) |
=> a | `display`: a `GdkDisplay`
-> b | `surface`: a `GdkSurface`
-> m (Maybe Monitor) | Returns: the monitor with the largest overlap with `surface`

Gets the monitor in which the largest area of `surface` resides.

## getMonitors

displayGetMonitors Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `self`: a `GdkDisplay`
-> m ListModel | Returns: a `GListModel` of `GdkMonitor`

Gets the list of monitors associated with this display.

Subsequent calls to this function will always return the same list for the same display.

You can listen to the GListModelitemsChanged signal on this list to monitor changes to the monitor of this display.

## getName

displayGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Text | Returns: a string representing the display name. This string is owned by GDK and should not be modified or freed.

Gets the name of the display.

## getPrimaryClipboard

displayGetPrimaryClipboard Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Clipboard | Returns: the primary clipboard

Gets the clipboard used for the primary selection.

On backends where the primary clipboard is not supported natively, GDK emulates this clipboard locally.

## getSetting

displayGetSetting Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> Text | `name`: the name of the setting
-> GValue | `value`: location to store the value of the setting
-> m Bool | Returns: `True` if the setting existed and a value was stored in `value`, `False` otherwise

Retrieves a desktop-wide setting such as double-click time for the `display`.

## getStartupNotificationId

displayGetStartupNotificationId Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m (Maybe Text) | Returns: the startup notification ID for `display`

Deprecated: (Since version 4.10)

Gets the startup notification ID for a Wayland display, or `Nothing` if no ID has been defined.

## isClosed

displayIsClosed Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Bool | Returns: `True` if the display is closed.

Finds out if the display has been closed.

## isComposited

displayIsComposited Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Bool | Returns: Whether surfaces with RGBA visuals can reasonably be expected to have their alpha channels drawn correctly on the screen.

Returns whether surfaces can reasonably be expected to have their alpha channel drawn correctly on the screen.

Check `displayIsRgba` for whether the display supports an alpha channel.

On X11 this function returns whether a compositing manager is compositing on `display`.

On modern displays, this value is always `True`.

## isRgba

displayIsRgba Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Bool | Returns: `True` if surfaces are created with an alpha channel or `False` if the display does not support this functionality.

Returns whether surfaces on this `display` are created with an alpha channel.

Even if a `True` is returned, it is possible that the surface’s alpha channel won’t be honored when displaying the surface on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display. Use `displayIsComposited` to check if that is the case.

On modern displays, this value is always `True`.

## listSeats

displayListSeats Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m [Seat] | Returns: the list of seats known to the `GdkDisplay`

Returns the list of seats known to `display`.

## mapKeycode

displayMapKeycode Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> Word32 | `keycode`: a keycode
-> m (Bool, [KeymapKey], [Word32]) | Returns: `True` if there were any entries

Returns the keyvals bound to `keycode`.

The Nth `GdkKeymapKey` in `keys` is bound to the Nth keyval in `keyvals`.

When a keycode is pressed by the user, the keyval from this list of entries is selected by considering the effective keyboard group and level.

Free the returned arrays with `free`.

## mapKeyval

displayMapKeyval Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> Word32 | `keyval`: a keyval, such as `KEY_a`, `KEY_Up`, `KEY_Return`, etc.
-> m (Bool, [KeymapKey]) | Returns: `True` if keys were found and returned

Obtains a list of keycode/group/level combinations that will generate `keyval`.

Groups and levels are two kinds of keyboard mode; in general, the level determines whether the top or bottom symbol on a key is used, and the group determines whether the left or right symbol is used.

On US keyboards, the shift key changes the keyboard level, and there are no groups. A group switch key might convert a keyboard between Hebrew to English modes, for example.

`GdkEventKey` contains a `group` field that indicates the active keyboard group. The level is computed from the modifier mask.

The returned array should be freed with `free`.

## notifyStartupComplete

displayNotifyStartupComplete Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> Text | `startupId`: a startup-notification identifier, for which notification process should be completed
-> m () |

Deprecated: (Since version 4.10)Using `toplevelSetStartupId` is sufficient

Indicates to the GUI environment that the application has finished loading, using a given identifier.

GTK will call this function automatically for GtkWindow with custom startup-notification identifier unless gtk_window_set_auto_startup_notification() is called to disable that feature.

## open

displayOpen Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Maybe Text | `displayName`: the name of the display to open
-> m (Maybe Display) | Returns: a `GdkDisplay`

Opens a display.

If opening the display fails, `NULL` is returned.

## prepareGl

displayPrepareGl Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `self`: a `GdkDisplay`
-> m () | (Can throw `GError`)

Checks that OpenGL is available for `self` and ensures that it is properly initialized. When this fails, an `error` will be set describing the error and this function returns `False`.

Note that even if this function succeeds, creating a `GdkGLContext` may still fail.

This function is idempotent. Calling it multiple times will just return the same value or error.

You never need to call this function, GDK will call it automatically as needed. But you can use it as a check when setting up code that might make use of OpenGL.

Since: 4.4

## putEvent

displayPutEvent Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a, IsEvent b) |
=> a | `display`: a `GdkDisplay`
-> b | `event`: a `GdkEvent`
-> m () |

Deprecated: (Since version 4.10)This function is only useful in veryspecial situations and should not be used by applications.

Adds the given event to the event queue for `display`.

## supportsInputShapes

displaySupportsInputShapes Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Bool | Returns: `True` if surfaces with modified input shape are supported

Returns `True` if the display supports input shapes.

This means that `surfaceSetInputRegion` can be used to modify the input shape of surfaces on `display`.

On modern displays, this value is always `True`.

## supportsShadowWidth

displaySupportsShadowWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m Bool | Returns: `True` if surfaces can draw shadows or `False` if the display does not support this functionality.

Returns whether it's possible for a surface to draw outside of the window area.

If `True` is returned the application decides if it wants to draw shadows. If `False` is returned, the compositor decides if it wants to draw shadows.

Since: 4.14

## sync

displaySync Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> m () |

Flushes any requests queued for the windowing system and waits until all requests have been handled.

This is often used for making sure that the display is synchronized with the current state of the program. Calling `displaySync` before [method`gdkX11`.Display.error_trap_pop] makes sure that any errors generated from earlier requests are handled before the error trap is removed.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

## translateKey

displayTranslateKey Source #

Arguments

:: (HasCallStack, MonadIO m, IsDisplay a) |
=> a | `display`: a `GdkDisplay`
-> Word32 | `keycode`: a keycode
-> [ModifierType] | `state`: a modifier state
-> Int32 | `group`: active keyboard group
-> m (Bool, Word32, Int32, Int32, [ModifierType]) | Returns: `True` if there was a keyval bound to keycode/state/group.

Translates the contents of a `GdkEventKey` into a keyval, effective group, and level.

Modifiers that affected the translation and are thus unavailable for application use are returned in `consumedModifiers`.

The `effectiveGroup` is the group that was actually used for the translation; some keys such as Enter are not affected by the active keyboard group. The `level` is derived from `state`.

`consumedModifiers` gives modifiers that should be masked out from `state` when comparing this key press to a keyboard shortcut. For instance, on a US keyboard, the `plus` symbol is shifted, so when comparing a key press to a `<Control>plus` accelerator `<Shift>` should be masked out.

This function should rarely be needed, since `GdkEventKey` already contains the translated keyval. It is exported for the benefit of virtualized test environments.

# Properties

## composited

`True` if the display properly composites the alpha channel.

getDisplayComposited :: (MonadIO m, IsDisplay o) => o -> m Bool Source #

Get the value of the “`composited`” property. When overloading is enabled, this is equivalent to

    get display #composited

## dmabufFormats

The dma-buf formats that are supported on this display

Since: 4.14

getDisplayDmabufFormats :: (MonadIO m, IsDisplay o) => o -> m DmabufFormats Source #

Get the value of the “`dmabuf-formats`” property. When overloading is enabled, this is equivalent to

    get display #dmabufFormats

## inputShapes

`True` if the display supports input shapes.

getDisplayInputShapes :: (MonadIO m, IsDisplay o) => o -> m Bool Source #

Get the value of the “`input-shapes`” property. When overloading is enabled, this is equivalent to

    get display #inputShapes

## rgba

`True` if the display supports an alpha channel.

getDisplayRgba :: (MonadIO m, IsDisplay o) => o -> m Bool Source #

Get the value of the “`rgba`” property. When overloading is enabled, this is equivalent to

    get display #rgba

## shadowWidth

`True` if the display supports extensible frames.

Since: 4.14

getDisplayShadowWidth :: (MonadIO m, IsDisplay o) => o -> m Bool Source #

Get the value of the “`shadow-width`” property. When overloading is enabled, this is equivalent to

    get display #shadowWidth

# Signals

## closed

type DisplayClosedCallback Source #

Arguments

= Bool | `isError`: `True` if the display was closed due to an error
-> IO () |

Emitted when the connection to the windowing system for `display` is closed.

afterDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId Source #

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

    after display #closed callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onDisplayClosed :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayClosedCallback) -> m SignalHandlerId Source #

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

    on display #closed callback

## opened

type DisplayOpenedCallback = IO () Source #

Emitted when the connection to the windowing system for `display` is opened.

afterDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId Source #

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

    after display #opened callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onDisplayOpened :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplayOpenedCallback) -> m SignalHandlerId Source #

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

    on display #opened callback

## seatAdded

type DisplaySeatAddedCallback Source #

Arguments

= Seat | `seat`: the seat that was just added
-> IO () |

Emitted whenever a new seat is made known to the windowing system.

afterDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId Source #

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

    after display #seatAdded callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onDisplaySeatAdded :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatAddedCallback) -> m SignalHandlerId Source #

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

    on display #seatAdded callback

## seatRemoved

type DisplaySeatRemovedCallback Source #

Arguments

= Seat | `seat`: the seat that was just removed
-> IO () |

Emitted whenever a seat is removed by the windowing system.

afterDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId Source #

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

    after display #seatRemoved callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onDisplaySeatRemoved :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySeatRemovedCallback) -> m SignalHandlerId Source #

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

    on display #seatRemoved callback

## settingChanged

type DisplaySettingChangedCallback Source #

Arguments

= Text | `setting`: the name of the setting that changed
-> IO () |

Emitted whenever a setting changes its value.

afterDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySettingChangedCallback) -> m SignalHandlerId Source #

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

    after display #settingChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onDisplaySettingChanged :: (IsDisplay a, MonadIO m) => a -> ((?self :: a) => DisplaySettingChangedCallback) -> m SignalHandlerId Source #

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

    on display #settingChanged callback