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

Contents

- Exported types
- Methods
  - getCurrentDesktop
  - getMonitorOutput
  - getNumberOfDesktops
  - getScreenNumber
  - getWindowManagerName
  - getXscreen
  - lookupVisual
  - supportsNetWmHint
- Signals
  - windowManagerChanged

Description

No description available in the introspection data.

Synopsis

- newtype X11Screen = X11Screen (ManagedPtr X11Screen)
- class GObject o => IsX11Screen o
- toX11Screen :: (MonadIO m, IsX11Screen o) => o -> m X11Screen
- noX11Screen :: Maybe X11Screen
- x11ScreenGetCurrentDesktop :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> m Word32
- x11ScreenGetMonitorOutput :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> Int32 -> m CULong
- x11ScreenGetNumberOfDesktops :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> m Word32
- x11ScreenGetScreenNumber :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> m Int32
- x11ScreenGetWindowManagerName :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> m Text
- x11ScreenGetXscreen :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> m Screen
- x11ScreenLookupVisual :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> CULong -> m X11Visual
- x11ScreenSupportsNetWmHint :: (HasCallStack, MonadIO m, IsX11Screen a) => a -> Atom -> m Bool
- type C_X11ScreenWindowManagerChangedCallback = Ptr () -> Ptr () -> IO ()
- type X11ScreenWindowManagerChangedCallback = IO ()
- afterX11ScreenWindowManagerChanged :: (IsX11Screen a, MonadIO m) => a -> X11ScreenWindowManagerChangedCallback -> m SignalHandlerId
- genClosure_X11ScreenWindowManagerChanged :: X11ScreenWindowManagerChangedCallback -> IO Closure
- mk_X11ScreenWindowManagerChangedCallback :: C_X11ScreenWindowManagerChangedCallback -> IO (FunPtr C_X11ScreenWindowManagerChangedCallback)
- noX11ScreenWindowManagerChangedCallback :: Maybe X11ScreenWindowManagerChangedCallback
- onX11ScreenWindowManagerChanged :: (IsX11Screen a, MonadIO m) => a -> X11ScreenWindowManagerChangedCallback -> m SignalHandlerId
- wrap_X11ScreenWindowManagerChangedCallback :: X11ScreenWindowManagerChangedCallback -> C_X11ScreenWindowManagerChangedCallback

# Exported types

newtype X11Screen Source #

Memory-managed wrapper type.

Constructors

X11Screen (ManagedPtr X11Screen) |

Instances

GObject X11Screen Source # |
Instance details Defined in GI.GdkX11.Objects.X11Screen Methods gobjectType :: X11Screen -> IO GType Source #
IsScreen X11Screen Source # |
Instance details Defined in GI.GdkX11.Objects.X11Screen
IsObject X11Screen Source # |
Instance details Defined in GI.GdkX11.Objects.X11Screen
IsX11Screen X11Screen Source # |
Instance details Defined in GI.GdkX11.Objects.X11Screen

class GObject o => IsX11Screen o Source #

Type class for types which can be safely cast to `X11Screen`, for instance with `toX11Screen`.

Instances

(GObject a, (UnknownAncestorError X11Screen a :: Constraint)) => IsX11Screen a Source # |
Instance details Defined in GI.GdkX11.Objects.X11Screen
IsX11Screen X11Screen Source # |
Instance details Defined in GI.GdkX11.Objects.X11Screen

toX11Screen :: (MonadIO m, IsX11Screen o) => o -> m X11Screen Source #

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

noX11Screen :: Maybe X11Screen Source #

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

# Methods

## getCurrentDesktop

x11ScreenGetCurrentDesktop Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: a `Screen`
-> m Word32 | Returns: the current workspace, or 0 if workspaces are not supported

Returns the current workspace for `screen` when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints specification.

Since: 3.10

## getMonitorOutput

x11ScreenGetMonitorOutput Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: a `Screen`
-> Int32 | `monitorNum`: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
-> m CULong | Returns: the XID of the monitor

Gets the XID of the specified output/monitor. If the X server does not support version 1.2 of the RANDR extension, 0 is returned.

Since: 2.14

## getNumberOfDesktops

x11ScreenGetNumberOfDesktops Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: a `Screen`
-> m Word32 | Returns: the number of workspaces, or 0 if workspaces are not supported

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

Since: 3.10

## getScreenNumber

x11ScreenGetScreenNumber Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: a `Screen`
-> m Int32 | Returns: the position of `screen` among the screens of its display

Returns the index of a `Screen`.

Since: 2.2

## getWindowManagerName

x11ScreenGetWindowManagerName Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: a `Screen`
-> m Text | Returns: the name of the window manager screen `screen`, or "unknown" if the window manager is unknown. The string is owned by GDK and should not be freed.

Returns the name of the window manager for `screen`.

Since: 2.2

## getXscreen

x11ScreenGetXscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: a `Screen`
-> m Screen | Returns: an Xlib Screen*

Returns the screen of a `Screen`.

Since: 2.2

## lookupVisual

x11ScreenLookupVisual Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: a `Screen`.
-> CULong | `xvisualid`: an X Visual ID.
-> m X11Visual | Returns: the `Visual` (owned by the screen object), or `Nothing` if the visual ID wasn’t found.

Looks up the `Visual` for a particular screen and X Visual ID.

Since: 2.2

## supportsNetWmHint

x11ScreenSupportsNetWmHint Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Screen a) |
=> a | `screen`: the relevant `Screen`.
-> Atom | `property`: a property atom.
-> m Bool | Returns: `True` if the window manager supports `property`

This function is specific to the X11 backend of GDK, and indicates whether the window manager supports a certain hint from the Extended Window Manager Hints specification.

When using this function, keep in mind that the window manager can change over time; so you shouldn’t use this function in a way that impacts persistent application state. A common bug is that your application can start up before the window manager does when the user logs in, and before the window manager starts `x11ScreenSupportsNetWmHint` will return `False` for every property. You can monitor the window_manager_changed signal on `Screen` to detect a window manager change.

Since: 2.2

# Signals

## windowManagerChanged

type C_X11ScreenWindowManagerChangedCallback = Ptr () -> Ptr () -> IO () Source #

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

type X11ScreenWindowManagerChangedCallback = IO () Source #

No description available in the introspection data.

afterX11ScreenWindowManagerChanged :: (IsX11Screen a, MonadIO m) => a -> X11ScreenWindowManagerChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`window-manager-changed`” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after x11Screen #windowManagerChanged callback

genClosure_X11ScreenWindowManagerChanged :: X11ScreenWindowManagerChangedCallback -> IO Closure Source #

Wrap the callback into a `Closure`.

mk_X11ScreenWindowManagerChangedCallback :: C_X11ScreenWindowManagerChangedCallback -> IO (FunPtr C_X11ScreenWindowManagerChangedCallback) Source #

Generate a function pointer callable from C code, from a `C_X11ScreenWindowManagerChangedCallback`.

noX11ScreenWindowManagerChangedCallback :: Maybe X11ScreenWindowManagerChangedCallback Source #

A convenience synonym for ``Nothing` :: `Maybe` `X11ScreenWindowManagerChangedCallback``.

onX11ScreenWindowManagerChanged :: (IsX11Screen a, MonadIO m) => a -> X11ScreenWindowManagerChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`window-manager-changed`” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on x11Screen #windowManagerChanged callback

wrap_X11ScreenWindowManagerChangedCallback :: X11ScreenWindowManagerChangedCallback -> C_X11ScreenWindowManagerChangedCallback Source #

Wrap a `X11ScreenWindowManagerChangedCallback` into a `C_X11ScreenWindowManagerChangedCallback`.