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

Contents

- Exported types
- Methods
  - foreignNewForDisplay
  - getDesktop
  - getXid
  - lookupForDisplay
  - moveToCurrentDesktop
  - moveToDesktop
  - setFrameExtents
  - setFrameSyncEnabled
  - setHideTitlebarWhenMaximized
  - setThemeVariant
  - setUserTime
  - setUtf8Property

Description

No description available in the introspection data.

Synopsis

- newtype X11Window = X11Window (ManagedPtr X11Window)
- class GObject o => IsX11Window o
- toX11Window :: (MonadIO m, IsX11Window o) => o -> m X11Window
- noX11Window :: Maybe X11Window
- x11WindowForeignNewForDisplay :: (HasCallStack, MonadIO m, IsX11Display a) => a -> CULong -> m X11Window
- x11WindowGetDesktop :: (HasCallStack, MonadIO m, IsX11Window a) => a -> m Word32
- x11WindowGetXid :: (HasCallStack, MonadIO m, IsX11Window a) => a -> m CULong
- x11WindowLookupForDisplay :: (HasCallStack, MonadIO m, IsX11Display a) => a -> CULong -> m X11Window
- x11WindowMoveToCurrentDesktop :: (HasCallStack, MonadIO m, IsX11Window a) => a -> m ()
- x11WindowMoveToDesktop :: (HasCallStack, MonadIO m, IsX11Window a) => a -> Word32 -> m ()
- x11WindowSetFrameExtents :: (HasCallStack, MonadIO m, IsX11Window a) => a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
- x11WindowSetFrameSyncEnabled :: (HasCallStack, MonadIO m, IsX11Window a) => a -> Bool -> m ()
- x11WindowSetHideTitlebarWhenMaximized :: (HasCallStack, MonadIO m, IsX11Window a) => a -> Bool -> m ()
- x11WindowSetThemeVariant :: (HasCallStack, MonadIO m, IsX11Window a) => a -> Text -> m ()
- x11WindowSetUserTime :: (HasCallStack, MonadIO m, IsX11Window a) => a -> Word32 -> m ()
- x11WindowSetUtf8Property :: (HasCallStack, MonadIO m, IsX11Window a) => a -> Text -> Maybe Text -> m ()

# Exported types

newtype X11Window Source #

Memory-managed wrapper type.

Constructors

X11Window (ManagedPtr X11Window) |

Instances

GObject X11Window Source # |
Instance details Defined in GI.GdkX11.Objects.X11Window Methods gobjectType :: X11Window -> IO GType Source #
IsWindow X11Window Source # |
Instance details Defined in GI.GdkX11.Objects.X11Window
IsObject X11Window Source # |
Instance details Defined in GI.GdkX11.Objects.X11Window
IsX11Window X11Window Source # |
Instance details Defined in GI.GdkX11.Objects.X11Window

class GObject o => IsX11Window o Source #

Type class for types which can be safely cast to `X11Window`, for instance with `toX11Window`.

Instances

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

toX11Window :: (MonadIO m, IsX11Window o) => o -> m X11Window Source #

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

noX11Window :: Maybe X11Window Source #

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

# Methods

## foreignNewForDisplay

x11WindowForeignNewForDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) |
=> a | `display`: the `Display` where the window handle comes from.
-> CULong | `window`: an Xlib Window
-> m X11Window | Returns: a `Window` wrapper for the native window, or `Nothing` if the window has been destroyed. The wrapper will be newly created, if one doesn’t exist already.

Wraps a native window in a `Window`. The function will try to look up the window using `x11WindowLookupForDisplay` first. If it does not find it there, it will create a new window.

This may fail if the window has been destroyed. If the window was already known to GDK, a new reference to the existing `Window` is returned.

Since: 2.24

## getDesktop

x11WindowGetDesktop Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a `Window`
-> m Word32 | Returns: the current workspace of `window`

Gets the number of the workspace `window` is on.

Since: 3.10

## getXid

x11WindowGetXid Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a native `Window`.
-> m CULong | Returns: the ID of `drawable`’s X resource.

Returns the X resource (window) belonging to a `Window`.

## lookupForDisplay

x11WindowLookupForDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Display a) |
=> a | `display`: the `Display` corresponding to the window handle
-> CULong | `window`: an Xlib Window
-> m X11Window | Returns: the `Window` wrapper for the native window, or `Nothing` if there is none.

Looks up the `Window` that wraps the given native window handle.

Since: 2.24

## moveToCurrentDesktop

x11WindowMoveToCurrentDesktop Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a `Window`
-> m () |

Moves the window to the correct workspace when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints specification. Will not do anything if the window is already on all workspaces.

Since: 2.8

## moveToDesktop

x11WindowMoveToDesktop Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a `Window`
-> Word32 | `desktop`: the number of the workspace to move the window to
-> m () |

Moves the window to the given workspace when running unde a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints specification.

Since: 3.10

## setFrameExtents

x11WindowSetFrameExtents Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a `Window`
-> Int32 | `left`: The left extent
-> Int32 | `right`: The right extent
-> Int32 | `top`: The top extent
-> Int32 | `bottom`: The bottom extent
-> m () |

Deprecated: (Since version 3.12)Use `windowSetShadowWidth` instead.

This is the same as `windowSetShadowWidth` but it only works on GdkX11Window.

Since: 3.10

## setFrameSyncEnabled

x11WindowSetFrameSyncEnabled Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a native `Window`
-> Bool | `frameSyncEnabled`: whether frame-synchronization should be enabled
-> m () |

This function can be used to disable frame synchronization for a window. Normally frame synchronziation will be enabled or disabled based on whether the system has a compositor that supports frame synchronization, but if the window is not directly managed by the window manager, then frame synchronziation may need to be disabled. This is the case for a window embedded via the XEMBED protocol.

Since: 3.8

## setHideTitlebarWhenMaximized

x11WindowSetHideTitlebarWhenMaximized Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a `Window`
-> Bool | `hideTitlebarWhenMaximized`: whether to hide the titlebar when maximized
-> m () |

Set a hint for the window manager, requesting that the titlebar should be hidden when the window is maximized.

Note that this property is automatically updated by GTK+, so this function should only be used by applications which do not use GTK+ to create toplevel windows.

Since: 3.4

## setThemeVariant

x11WindowSetThemeVariant Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a `Window`
-> Text | `variant`: the theme variant to export
-> m () |

GTK+ applications can request a dark theme variant. In order to make other applications - namely window managers using GTK+ for themeing - aware of this choice, GTK+ uses this function to export the requested theme variant as _GTK_THEME_VARIANT property on toplevel windows.

Note that this property is automatically updated by GTK+, so this function should only be used by applications which do not use GTK+ to create toplevel windows.

Since: 3.2

## setUserTime

x11WindowSetUserTime Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: A toplevel `Window`
-> Word32 | `timestamp`: An XServer timestamp to which the property should be set
-> m () |

The application can use this call to update the _NET_WM_USER_TIME property on a toplevel window. This property stores an Xserver time which represents the time of the last user input event received for this window. This property may be used by the window manager to alter the focus, stacking, and/or placement behavior of windows when they are mapped depending on whether the new window was created by a user action or is a "pop-up" window activated by a timer or some other event.

Note that this property is automatically updated by GDK, so this function should only be used by applications which handle input events bypassing GDK.

Since: 2.6

## setUtf8Property

x11WindowSetUtf8Property Source #

Arguments

:: (HasCallStack, MonadIO m, IsX11Window a) |
=> a | `window`: a `Window`
-> Text | `name`: Property name, will be interned as an X atom
-> Maybe Text | `value`: Property value, or `Nothing` to delete
-> m () |

This function modifies or removes an arbitrary X11 window property of type UTF8_STRING. If the given `window` is not a toplevel window, it is ignored.

Since: 3.4