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.Interfaces.Toplevel

Contents

- Exported types
- Methods
  - beginMove
  - beginResize
  - focus
  - getCapabilities
  - getGravity
  - getState
  - inhibitSystemShortcuts
  - lower
  - minimize
  - present
  - restoreSystemShortcuts
  - setDecorated
  - setDeletable
  - setGravity
  - setIconList
  - setModal
  - setStartupId
  - setTitle
  - setTransientFor
  - showWindowMenu
  - supportsEdgeConstraints
  - titlebarGesture
- Properties
  - capabilities
  - decorated
  - deletable
  - fullscreenMode
  - gravity
  - iconList
  - modal
  - shortcutsInhibited
  - startupId
  - state
  - title
  - transientFor
- Signals
  - computeSize

Description

A freestanding toplevel surface.

The `GdkToplevel` interface provides useful APIs for interacting with the windowing system, such as controlling maximization and size of the surface, setting icons and transient parents for dialogs.

Synopsis

- newtype Toplevel = Toplevel (ManagedPtr Toplevel)
- class (GObject o, IsDescendantOf Toplevel o) => IsToplevel o
- toToplevel :: (MonadIO m, IsToplevel o) => o -> m Toplevel
- toplevelBeginMove :: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) => a -> b -> Int32 -> Double -> Double -> Word32 -> m ()
- toplevelBeginResize :: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) => a -> SurfaceEdge -> Maybe b -> Int32 -> Double -> Double -> Word32 -> m ()
- toplevelFocus :: (HasCallStack, MonadIO m, IsToplevel a) => a -> Word32 -> m ()
- toplevelGetCapabilities :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m [ToplevelCapabilities]
- toplevelGetGravity :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m Gravity
- toplevelGetState :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m [ToplevelState]
- toplevelInhibitSystemShortcuts :: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) => a -> Maybe b -> m ()
- toplevelLower :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m Bool
- toplevelMinimize :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m Bool
- toplevelPresent :: (HasCallStack, MonadIO m, IsToplevel a) => a -> ToplevelLayout -> m ()
- toplevelRestoreSystemShortcuts :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m ()
- toplevelSetDecorated :: (HasCallStack, MonadIO m, IsToplevel a) => a -> Bool -> m ()
- toplevelSetDeletable :: (HasCallStack, MonadIO m, IsToplevel a) => a -> Bool -> m ()
- toplevelSetGravity :: (HasCallStack, MonadIO m, IsToplevel a) => a -> Gravity -> m ()
- toplevelSetIconList :: (HasCallStack, MonadIO m, IsToplevel a, IsTexture b) => a -> [b] -> m ()
- toplevelSetModal :: (HasCallStack, MonadIO m, IsToplevel a) => a -> Bool -> m ()
- toplevelSetStartupId :: (HasCallStack, MonadIO m, IsToplevel a) => a -> Text -> m ()
- toplevelSetTitle :: (HasCallStack, MonadIO m, IsToplevel a) => a -> Text -> m ()
- toplevelSetTransientFor :: (HasCallStack, MonadIO m, IsToplevel a, IsSurface b) => a -> b -> m ()
- toplevelShowWindowMenu :: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) => a -> b -> m Bool
- toplevelSupportsEdgeConstraints :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m Bool
- toplevelTitlebarGesture :: (HasCallStack, MonadIO m, IsToplevel a) => a -> TitlebarGesture -> m Bool
- getToplevelCapabilities :: (MonadIO m, IsToplevel o) => o -> m [ToplevelCapabilities]
- constructToplevelDecorated :: (IsToplevel o, MonadIO m) => Bool -> m (GValueConstruct o)
- getToplevelDecorated :: (MonadIO m, IsToplevel o) => o -> m Bool
- setToplevelDecorated :: (MonadIO m, IsToplevel o) => o -> Bool -> m ()
- constructToplevelDeletable :: (IsToplevel o, MonadIO m) => Bool -> m (GValueConstruct o)
- getToplevelDeletable :: (MonadIO m, IsToplevel o) => o -> m Bool
- setToplevelDeletable :: (MonadIO m, IsToplevel o) => o -> Bool -> m ()
- constructToplevelFullscreenMode :: (IsToplevel o, MonadIO m) => FullscreenMode -> m (GValueConstruct o)
- getToplevelFullscreenMode :: (MonadIO m, IsToplevel o) => o -> m FullscreenMode
- setToplevelFullscreenMode :: (MonadIO m, IsToplevel o) => o -> FullscreenMode -> m ()
- constructToplevelGravity :: (IsToplevel o, MonadIO m) => Gravity -> m (GValueConstruct o)
- getToplevelGravity :: (MonadIO m, IsToplevel o) => o -> m Gravity
- setToplevelGravity :: (MonadIO m, IsToplevel o) => o -> Gravity -> m ()
- constructToplevelIconList :: (IsToplevel o, MonadIO m) => Ptr () -> m (GValueConstruct o)
- getToplevelIconList :: (MonadIO m, IsToplevel o) => o -> m (Ptr ())
- setToplevelIconList :: (MonadIO m, IsToplevel o) => o -> Ptr () -> m ()
- constructToplevelModal :: (IsToplevel o, MonadIO m) => Bool -> m (GValueConstruct o)
- getToplevelModal :: (MonadIO m, IsToplevel o) => o -> m Bool
- setToplevelModal :: (MonadIO m, IsToplevel o) => o -> Bool -> m ()
- getToplevelShortcutsInhibited :: (MonadIO m, IsToplevel o) => o -> m Bool
- constructToplevelStartupId :: (IsToplevel o, MonadIO m) => Text -> m (GValueConstruct o)
- getToplevelStartupId :: (MonadIO m, IsToplevel o) => o -> m (Maybe Text)
- setToplevelStartupId :: (MonadIO m, IsToplevel o) => o -> Text -> m ()
- getToplevelState :: (MonadIO m, IsToplevel o) => o -> m [ToplevelState]
- constructToplevelTitle :: (IsToplevel o, MonadIO m) => Text -> m (GValueConstruct o)
- getToplevelTitle :: (MonadIO m, IsToplevel o) => o -> m (Maybe Text)
- setToplevelTitle :: (MonadIO m, IsToplevel o) => o -> Text -> m ()
- constructToplevelTransientFor :: (IsToplevel o, MonadIO m, IsSurface a) => a -> m (GValueConstruct o)
- getToplevelTransientFor :: (MonadIO m, IsToplevel o) => o -> m (Maybe Surface)
- setToplevelTransientFor :: (MonadIO m, IsToplevel o, IsSurface a) => o -> a -> m ()
- type ToplevelComputeSizeCallback = ToplevelSize -> IO ()
- afterToplevelComputeSize :: (IsToplevel a, MonadIO m) => a -> ((?self :: a) => ToplevelComputeSizeCallback) -> m SignalHandlerId
- onToplevelComputeSize :: (IsToplevel a, MonadIO m) => a -> ((?self :: a) => ToplevelComputeSizeCallback) -> m SignalHandlerId

# Exported types

newtype Toplevel Source #

Memory-managed wrapper type.

Constructors

Toplevel (ManagedPtr Toplevel) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf Toplevel o) => IsToplevel o Source #

Type class for types which can be safely cast to `Toplevel`, for instance with `toToplevel`.

#### Instances

Instances details

(GObject o, IsDescendantOf Toplevel o) => IsToplevel o Source # |
Instance details Defined in GI.Gdk.Interfaces.Toplevel

toToplevel :: (MonadIO m, IsToplevel o) => o -> m Toplevel Source #

Cast to `Toplevel`, 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, beginMove, beginResize, bindProperty, bindPropertyFull, createCairoContext, createGlContext, createSimilarSurface, createVulkanContext, destroy, focus, forceFloating, freezeNotify, getv, hide, inhibitSystemShortcuts, isDestroyed, isFloating, lower, minimize, notify, notifyByPspec, present, queueRender, ref, refSink, requestLayout, restoreSystemShortcuts, runDispose, showWindowMenu, stealData, stealQdata, supportsEdgeConstraints, thawNotify, titlebarGesture, translateCoordinates, unref, watchClosure.

#### Getters

getCapabilities, getCursor, getData, getDeviceCursor, getDevicePosition, getDisplay, getFrameClock, getGravity, getHeight, getMapped, getProperty, getQdata, getScale, getScaleFactor, getState, getWidth.

#### Setters

setCursor, setData, setDataFull, setDecorated, setDeletable, setDeviceCursor, setGravity, setIconList, setInputRegion, setModal, setOpaqueRegion, setProperty, setStartupId, setTitle, setTransientFor.

## beginMove

toplevelBeginMove Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) |
=> a | `toplevel`: a `GdkToplevel`
-> b | `device`: the device used for the operation
-> Int32 | `button`: the button being used to drag, or 0 for a keyboard-initiated drag
-> Double | `x`: surface X coordinate of mouse click that began the drag
-> Double | `y`: surface Y coordinate of mouse click that began the drag
-> Word32 | `timestamp`: timestamp of mouse click that began the drag (use `eventGetTime`)
-> m () |

Begins an interactive move operation.

You might use this function to implement draggable titlebars.

## beginResize

toplevelBeginResize Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) |
=> a | `toplevel`: a `GdkToplevel`
-> SurfaceEdge | `edge`: the edge or corner from which the drag is started
-> Maybe b | `device`: the device used for the operation
-> Int32 | `button`: the button being used to drag, or 0 for a keyboard-initiated drag
-> Double | `x`: surface X coordinate of mouse click that began the drag
-> Double | `y`: surface Y coordinate of mouse click that began the drag
-> Word32 | `timestamp`: timestamp of mouse click that began the drag (use `eventGetTime`)
-> m () |

Begins an interactive resize operation.

You might use this function to implement a “window resize grip.”

## focus

toplevelFocus Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> Word32 | `timestamp`: timestamp of the event triggering the surface focus
-> m () |

Sets keyboard focus to `surface`.

In most cases, gtk_window_present_with_time() should be used on a GtkWindow, rather than calling this function.

## getCapabilities

toplevelGetCapabilities Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> m [ToplevelCapabilities] | Returns: the capabilities of the `GdkToplevel`.

The capabilities that are available for this toplevel.

Since: 4.20

## getGravity

toplevelGetGravity Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a toplevel
-> m Gravity | Returns: the gravity

Returns the gravity that is used when changing the toplevel size programmatically.

Since: 4.20

## getState

toplevelGetState Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> m [ToplevelState] | Returns: surface state bitfield

Gets the bitwise or of the currently active surface state flags, from the `GdkToplevelState` enumeration.

## inhibitSystemShortcuts

toplevelInhibitSystemShortcuts Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) |
=> a | `toplevel`: a `GdkToplevel`
-> Maybe b | `event`: the `GdkEvent` that is triggering the inhibit request, or `Nothing` if none is available
-> m () |

Requests that the `toplevel` inhibit the system shortcuts.

This is asking the desktop environment/windowing system to let all keyboard events reach the surface, as long as it is focused, instead of triggering system actions.

If granted, the rerouting remains active until the default shortcuts processing is restored with `toplevelRestoreSystemShortcuts`, or the request is revoked by the desktop environment, windowing system or the user.

A typical use case for this API is remote desktop or virtual machine viewers which need to inhibit the default system keyboard shortcuts so that the remote session or virtual host gets those instead of the local environment.

The windowing system or desktop environment may ask the user to grant or deny the request or even choose to ignore the request entirely.

The caller can be notified whenever the request is granted or revoked by listening to the Toplevel:shortcutsInhibited property.

## lower

toplevelLower Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> m Bool | Returns: `True` if the surface was lowered

Asks to lower the `toplevel` below other windows.

The windowing system may choose to ignore the request.

## minimize

toplevelMinimize Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> m Bool | Returns: `True` if the surface was minimized

Asks to minimize the `toplevel`.

The windowing system may choose to ignore the request.

## present

toplevelPresent Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: the `GdkToplevel` to show
-> ToplevelLayout | `layout`: the `GdkToplevelLayout` object used to layout
-> m () |

Present `toplevel` after having processed the `GdkToplevelLayout` rules.

If the toplevel was previously not showing, it will be showed, otherwise it will change layout according to `layout`.

GDK may emit the Toplevel::computeSize signal to let the user of this toplevel compute the preferred size of the toplevel surface.

Presenting is asynchronous and the specified layout parameters are not guaranteed to be respected.

## restoreSystemShortcuts

toplevelRestoreSystemShortcuts Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> m () |

Restore default system keyboard shortcuts which were previously inhibited.

This undoes the effect of `toplevelInhibitSystemShortcuts`.

## setDecorated

toplevelSetDecorated Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> Bool | `decorated`: `True` to request decorations
-> m () |

Sets the toplevel to be decorated.

Setting `decorated` to `False` hints the desktop environment that the surface has its own, client-side decorations and does not need to have window decorations added.

## setDeletable

toplevelSetDeletable Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> Bool | `deletable`: `True` to request a delete button
-> m () |

Sets the toplevel to be deletable.

Setting `deletable` to `True` hints the desktop environment that it should offer the user a way to close the surface.

## setGravity

toplevelSetGravity Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a toplevel
-> Gravity | `gravity`: the new gravity
-> m () |

Sets the gravity that is used when changing the toplevel size programmatically.

Since: 4.20

## setIconList

toplevelSetIconList Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsTexture b) |
=> a | `toplevel`: a `GdkToplevel`
-> [b] | `surfaces`: A list of textures to use as icon, of different sizes
-> m () |

Sets a list of icons for the surface.

One of these will be used to represent the surface in iconic form. The icon may be shown in window lists or task bars. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality.

Note that some platforms don't support surface icons.

## setModal

toplevelSetModal Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> Bool | `modal`: `True` if the surface is modal, `False` otherwise.
-> m () |

Sets the toplevel to be modal.

The application can use this hint to tell the window manager that a certain surface has modal behaviour. The window manager can use this information to handle modal surfaces in a special way.

You should only use this on surfaces for which you have previously called `toplevelSetTransientFor`.

## setStartupId

toplevelSetStartupId Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> Text | `startupId`: a string with startup-notification identifier
-> m () |

Sets the startup notification ID.

When using GTK, typically you should use gtk_window_set_startup_id() instead of this low-level function.

## setTitle

toplevelSetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> Text | `title`: title of `surface`
-> m () |

Sets the title of a toplevel surface.

The title maybe be displayed in the titlebar, in lists of windows, etc.

## setTransientFor

toplevelSetTransientFor Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsSurface b) |
=> a | `toplevel`: a `GdkToplevel`
-> b | `parent`: another toplevel `GdkSurface`
-> m () |

Sets a transient-for parent.

Indicates to the window manager that `surface` is a transient dialog associated with the application surface `parent`. This allows the window manager to do things like center `surface` on `parent` and keep `surface` above `parent`.

See gtk_window_set_transient_for() if you’re using GtkWindow.

## showWindowMenu

toplevelShowWindowMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) |
=> a | `toplevel`: a `GdkToplevel`
-> b | `event`: a `GdkEvent` to show the menu for
-> m Bool | Returns: `True` if the window menu was shown and `False` otherwise.

Asks the windowing system to show the window menu.

The window menu is the menu shown when right-clicking the titlebar on traditional windows managed by the window manager. This is useful for windows using client-side decorations, activating it with a right-click on the window decorations.

## supportsEdgeConstraints

toplevelSupportsEdgeConstraints Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> m Bool | Returns: `True` if the desktop environment supports tiled window states

Returns whether the desktop environment supports tiled window states.

## titlebarGesture

toplevelTitlebarGesture Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) |
=> a | `toplevel`: a `GdkToplevel`
-> TitlebarGesture | `gesture`: a `GdkTitlebarGesture`
-> m Bool | Returns: whether the gesture was performed

Performs a title bar gesture.

Since: 4.4

# Properties

## capabilities

The capabilities that are available for this toplevel.

Since: 4.20

getToplevelCapabilities :: (MonadIO m, IsToplevel o) => o -> m [ToplevelCapabilities] Source #

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

    get toplevel #capabilities

## decorated

Whether the window manager should add decorations.

constructToplevelDecorated :: (IsToplevel o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getToplevelDecorated :: (MonadIO m, IsToplevel o) => o -> m Bool Source #

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

    get toplevel #decorated

setToplevelDecorated :: (MonadIO m, IsToplevel o) => o -> Bool -> m () Source #

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

    set toplevel [ #decorated := value ]

## deletable

Whether the window manager should allow to close the surface.

constructToplevelDeletable :: (IsToplevel o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getToplevelDeletable :: (MonadIO m, IsToplevel o) => o -> m Bool Source #

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

    get toplevel #deletable

setToplevelDeletable :: (MonadIO m, IsToplevel o) => o -> Bool -> m () Source #

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

    set toplevel [ #deletable := value ]

## fullscreenMode

The fullscreen mode of the surface.

constructToplevelFullscreenMode :: (IsToplevel o, MonadIO m) => FullscreenMode -> m (GValueConstruct o) Source #

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

getToplevelFullscreenMode :: (MonadIO m, IsToplevel o) => o -> m FullscreenMode Source #

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

    get toplevel #fullscreenMode

setToplevelFullscreenMode :: (MonadIO m, IsToplevel o) => o -> FullscreenMode -> m () Source #

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

    set toplevel [ #fullscreenMode := value ]

## gravity

The gravity to use when resizing a surface programmatically.

Gravity describes which point of the surface we want to keep fixed (meaning that the surface will grow in the opposite direction). For example, a gravity of `GDK_GRAVITY_NORTH_EAST` means that we want to fix top right corner of the surface.

This property is just a hint that may affect the result when negotiating toplevel sizes with the windowing system. It does not affect interactive resizes started with `toplevelBeginResize`.

Since: 4.20

constructToplevelGravity :: (IsToplevel o, MonadIO m) => Gravity -> m (GValueConstruct o) Source #

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

getToplevelGravity :: (MonadIO m, IsToplevel o) => o -> m Gravity Source #

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

    get toplevel #gravity

setToplevelGravity :: (MonadIO m, IsToplevel o) => o -> Gravity -> m () Source #

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

    set toplevel [ #gravity := value ]

## iconList

A list of textures to use as icon.

constructToplevelIconList :: (IsToplevel o, MonadIO m) => Ptr () -> m (GValueConstruct o) Source #

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

getToplevelIconList :: (MonadIO m, IsToplevel o) => o -> m (Ptr ()) Source #

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

    get toplevel #iconList

setToplevelIconList :: (MonadIO m, IsToplevel o) => o -> Ptr () -> m () Source #

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

    set toplevel [ #iconList := value ]

## modal

Whether the surface is modal.

constructToplevelModal :: (IsToplevel o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getToplevelModal :: (MonadIO m, IsToplevel o) => o -> m Bool Source #

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

    get toplevel #modal

setToplevelModal :: (MonadIO m, IsToplevel o) => o -> Bool -> m () Source #

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

    set toplevel [ #modal := value ]

## shortcutsInhibited

Whether the surface should inhibit keyboard shortcuts.

getToplevelShortcutsInhibited :: (MonadIO m, IsToplevel o) => o -> m Bool Source #

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

    get toplevel #shortcutsInhibited

## startupId

The startup ID of the surface.

See `AppLaunchContext` for more information about startup feedback.

constructToplevelStartupId :: (IsToplevel o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getToplevelStartupId :: (MonadIO m, IsToplevel o) => o -> m (Maybe Text) Source #

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

    get toplevel #startupId

setToplevelStartupId :: (MonadIO m, IsToplevel o) => o -> Text -> m () Source #

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

    set toplevel [ #startupId := value ]

## state

The state of the toplevel.

getToplevelState :: (MonadIO m, IsToplevel o) => o -> m [ToplevelState] Source #

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

    get toplevel #state

## title

The title of the surface.

constructToplevelTitle :: (IsToplevel o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getToplevelTitle :: (MonadIO m, IsToplevel o) => o -> m (Maybe Text) Source #

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

    get toplevel #title

setToplevelTitle :: (MonadIO m, IsToplevel o) => o -> Text -> m () Source #

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

    set toplevel [ #title := value ]

## transientFor

The transient parent of the surface.

constructToplevelTransientFor :: (IsToplevel o, MonadIO m, IsSurface a) => a -> m (GValueConstruct o) Source #

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

getToplevelTransientFor :: (MonadIO m, IsToplevel o) => o -> m (Maybe Surface) Source #

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

    get toplevel #transientFor

setToplevelTransientFor :: (MonadIO m, IsToplevel o, IsSurface a) => o -> a -> m () Source #

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

    set toplevel [ #transientFor := value ]

# Signals

## computeSize

type ToplevelComputeSizeCallback Source #

Arguments

= ToplevelSize | `size`: a `GdkToplevelSize`
-> IO () |

Emitted when the size for the surface needs to be computed, when it is present.

This signal will normally be emitted during or after a call to `toplevelPresent`, depending on the configuration received by the windowing system. It may also be emitted at any other point in time, in response to the windowing system spontaneously changing the configuration of the toplevel surface.

It is the responsibility of the toplevel user to handle this signal and compute the desired size of the toplevel, given the information passed via the `ToplevelSize` object. Failing to do so will result in an arbitrary size being used as a result.

afterToplevelComputeSize :: (IsToplevel a, MonadIO m) => a -> ((?self :: a) => ToplevelComputeSizeCallback) -> m SignalHandlerId Source #

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

    after toplevel #computeSize 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.

onToplevelComputeSize :: (IsToplevel a, MonadIO m) => a -> ((?self :: a) => ToplevelComputeSizeCallback) -> m SignalHandlerId Source #

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

    on toplevel #computeSize callback