gi-gtk-3.0.43: Gtk 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.Gtk.Objects.WindowGroup

Contents

- Exported types
- Methods
  - addWindow
  - getCurrentDeviceGrab
  - getCurrentGrab
  - listWindows
  - new
  - removeWindow

Description

A `WindowGroup` restricts the effect of grabs to windows in the same group, thereby making window groups almost behave like separate applications.

A window can be a member in at most one window group at a time. Windows that have not been explicitly assigned to a group are implicitly treated like windows of the default window group.

GtkWindowGroup objects are referenced by each window in the group, so once you have added all windows to a GtkWindowGroup, you can drop the initial reference to the window group with `objectUnref`. If the windows in the window group are subsequently destroyed, then they will be removed from the window group and drop their references on the window group; when all window have been removed, the window group will be freed.

Synopsis

- newtype WindowGroup = WindowGroup (ManagedPtr WindowGroup)
- class (GObject o, IsDescendantOf WindowGroup o) => IsWindowGroup o
- toWindowGroup :: (MonadIO m, IsWindowGroup o) => o -> m WindowGroup
- windowGroupAddWindow :: (HasCallStack, MonadIO m, IsWindowGroup a, IsWindow b) => a -> b -> m ()
- windowGroupGetCurrentDeviceGrab :: (HasCallStack, MonadIO m, IsWindowGroup a, IsDevice b) => a -> b -> m (Maybe Widget)
- windowGroupGetCurrentGrab :: (HasCallStack, MonadIO m, IsWindowGroup a) => a -> m Widget
- windowGroupListWindows :: (HasCallStack, MonadIO m, IsWindowGroup a) => a -> m [Window]
- windowGroupNew :: (HasCallStack, MonadIO m) => m WindowGroup
- windowGroupRemoveWindow :: (HasCallStack, MonadIO m, IsWindowGroup a, IsWindow b) => a -> b -> m ()

# Exported types

newtype WindowGroup Source #

Memory-managed wrapper type.

Constructors

WindowGroup (ManagedPtr WindowGroup) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf WindowGroup o) => IsWindowGroup o Source #

Type class for types which can be safely cast to `WindowGroup`, for instance with `toWindowGroup`.

#### Instances

Instances details

(GObject o, IsDescendantOf WindowGroup o) => IsWindowGroup o Source # |
Instance details Defined in GI.Gtk.Objects.WindowGroup

toWindowGroup :: (MonadIO m, IsWindowGroup o) => o -> m WindowGroup Source #

Cast to `WindowGroup`, 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

addWindow, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, listWindows, notify, notifyByPspec, ref, refSink, removeWindow, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getCurrentDeviceGrab, getCurrentGrab, getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## addWindow

windowGroupAddWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowGroup a, IsWindow b) |
=> a | `windowGroup`: a `WindowGroup`
-> b | `window`: the `Window` to add
-> m () |

Adds a window to a `WindowGroup`.

## getCurrentDeviceGrab

windowGroupGetCurrentDeviceGrab Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowGroup a, IsDevice b) |
=> a | `windowGroup`: a `WindowGroup`
-> b | `device`: a `Device`
-> m (Maybe Widget) | Returns: The grab widget, or `Nothing`

Returns the current grab widget for `device`, or `Nothing` if none.

Since: 3.0

## getCurrentGrab

windowGroupGetCurrentGrab Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowGroup a) |
=> a | `windowGroup`: a `WindowGroup`
-> m Widget | Returns: the current grab widget of the group

Gets the current grab widget of the given group, see `widgetGrabAdd`.

Since: 2.22

## listWindows

windowGroupListWindows Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowGroup a) |
=> a | `windowGroup`: a `WindowGroup`
-> m [Window] | Returns: A newly-allocated list of windows inside the group.

Returns a list of the `GtkWindows` that belong to `windowGroup`.

Since: 2.14

## new

windowGroupNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m WindowGroup | Returns: a new `WindowGroup`.

Creates a new `WindowGroup` object. Grabs added with `widgetGrabAdd` only affect windows within the same `WindowGroup`.

## removeWindow

windowGroupRemoveWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowGroup a, IsWindow b) |
=> a | `windowGroup`: a `WindowGroup`
-> b | `window`: the `Window` to remove
-> m () |

Removes a window from a `WindowGroup`.