gi-gtk4-4.0.12: Gtk 4.x 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.WindowHandle

Contents

- Exported types
- Methods
  - getChild
  - new
  - setChild
- Properties
  - child

Description

Implements titlebar functionality for a window.

When added into a window, it can be dragged to move the window, and it implements the right click, double click and middle click behaviors that are expected of a titlebar.

# CSS nodes

`GtkWindowHandle` has a single CSS node with the name `windowhandle`.

# Accessibility

Until GTK 4.10, `GtkWindowHandle` used the `AccessibleRoleGroup` role.

Starting from GTK 4.12, `GtkWindowHandle` uses the `AccessibleRoleGeneric` role.

Synopsis

- newtype WindowHandle = WindowHandle (ManagedPtr WindowHandle)
- class (GObject o, IsDescendantOf WindowHandle o) => IsWindowHandle o
- toWindowHandle :: (MonadIO m, IsWindowHandle o) => o -> m WindowHandle
- windowHandleGetChild :: (HasCallStack, MonadIO m, IsWindowHandle a) => a -> m (Maybe Widget)
- windowHandleNew :: (HasCallStack, MonadIO m) => m WindowHandle
- windowHandleSetChild :: (HasCallStack, MonadIO m, IsWindowHandle a, IsWidget b) => a -> Maybe b -> m ()
- clearWindowHandleChild :: (MonadIO m, IsWindowHandle o) => o -> m ()
- constructWindowHandleChild :: (IsWindowHandle o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowHandleChild :: (MonadIO m, IsWindowHandle o) => o -> m (Maybe Widget)
- setWindowHandleChild :: (MonadIO m, IsWindowHandle o, IsWidget a) => o -> a -> m ()

# Exported types

newtype WindowHandle Source #

Memory-managed wrapper type.

Constructors

WindowHandle (ManagedPtr WindowHandle) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf WindowHandle o) => IsWindowHandle o Source #

Type class for types which can be safely cast to `WindowHandle`, for instance with `toWindowHandle`.

#### Instances

Instances details

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

toWindowHandle :: (MonadIO m, IsWindowHandle o) => o -> m WindowHandle Source #

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

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

#### Setters

setAccessibleParent, setCanFocus, setCanTarget, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

## getChild

windowHandleGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowHandle a) |
=> a | `self`: a `GtkWindowHandle`
-> m (Maybe Widget) | Returns: the child widget of `self`

Gets the child widget of `self`.

## new

windowHandleNew Source #

Arguments

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

Creates a new `GtkWindowHandle`.

## setChild

windowHandleSetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindowHandle a, IsWidget b) |
=> a | `self`: a `GtkWindowHandle`
-> Maybe b | `child`: the child widget
-> m () |

Sets the child widget of `self`.

# Properties

## child

The child widget.

clearWindowHandleChild :: (MonadIO m, IsWindowHandle o) => o -> m () Source #

Set the value of the “`child`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #child

constructWindowHandleChild :: (IsWindowHandle o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`child`” property. This is rarely needed directly, but it is used by `new`.

getWindowHandleChild :: (MonadIO m, IsWindowHandle o) => o -> m (Maybe Widget) Source #

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

    get windowHandle #child

setWindowHandleChild :: (MonadIO m, IsWindowHandle o, IsWidget a) => o -> a -> m () Source #

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

    set windowHandle [ #child := value ]