Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A Toplevel
is a freestanding toplevel surface.
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 ()
- toplevelGetState :: (HasCallStack, MonadIO m, IsToplevel a) => a -> m [SurfaceState]
- 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 -> Int32 -> Int32 -> ToplevelLayout -> m Bool
- 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 ()
- 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
- 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 ()
- 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 [SurfaceState]
- 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 ()
Exported types
Memory-managed wrapper type.
Instances
Eq Toplevel Source # | |
IsGValue Toplevel Source # | Convert |
ManagedPtrNewtype Toplevel Source # | |
Defined in GI.Gdk.Interfaces.Toplevel toManagedPtr :: Toplevel -> ManagedPtr Toplevel # | |
TypedObject Toplevel Source # | |
Defined in GI.Gdk.Interfaces.Toplevel | |
GObject Toplevel Source # | |
Defined in GI.Gdk.Interfaces.Toplevel | |
HasParentTypes Toplevel Source # | |
Defined in GI.Gdk.Interfaces.Toplevel | |
type ParentTypes Toplevel Source # | |
Defined in GI.Gdk.Interfaces.Toplevel |
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
(GObject o, IsDescendantOf Toplevel o) => IsToplevel o Source # | |
Defined in GI.Gdk.Interfaces.Toplevel |
toToplevel :: (MonadIO m, IsToplevel o) => o -> m Toplevel Source #
Methods
Overloaded methods
beginMove
:: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> Double |
|
-> Double |
|
-> Word32 |
|
-> m () |
Begins an interactive move operation (for a toplevel surface). You might use this function to implement draggable titlebars.
beginResize
:: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) | |
=> a |
|
-> SurfaceEdge |
|
-> Maybe b |
|
-> Int32 |
|
-> Double |
|
-> Double |
|
-> Word32 |
|
-> m () |
Begins an interactive resize operation (for a toplevel surface). You might use this function to implement a “window resize grip.”
focus
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> Word32 |
|
-> 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.
getState
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> m [SurfaceState] | Returns: surface state bitfield |
Gets the bitwise OR of the currently active surface state flags,
from the SurfaceState
enumeration.
inhibitSystemShortcuts
toplevelInhibitSystemShortcuts Source #
:: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Requests that the toplevel
inhibit the system shortcuts, 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 enviroment, 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 GdkToplevel[shortcutsInhibited](#g:signal:shortcutsInhibited) property.
lower
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> m Bool | Returns: |
Asks to lower the toplevel
below other windows.
The windowing system may choose to ignore the request.
minimize
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> m Bool | Returns: |
Asks to minimize the toplevel
.
The windowing system may choose to ignore the request.
present
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> ToplevelLayout |
|
-> m Bool | Returns: |
Present toplevel
after having processed the ToplevelLayout
rules.
If the toplevel was previously now showing, it will be showed,
otherwise it will change layout according to layout
.
Presenting may fail.
restoreSystemShortcuts
toplevelRestoreSystemShortcuts Source #
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> m () |
Restore default system keyboard shortcuts which were previously
requested to be inhibited by toplevelInhibitSystemShortcuts
.
setDecorated
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> Bool |
|
-> m () |
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
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> Bool |
|
-> m () |
Setting deletable
to True
hints the desktop environment
that it should offer the user a way to close the surface.
setIconList
:: (HasCallStack, MonadIO m, IsToplevel a, IsTexture b) | |
=> a |
|
-> [b] |
|
-> 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
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> Bool |
|
-> m () |
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
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> Text |
|
-> m () |
When using GTK, typically you should use gtk_window_set_startup_id()
instead of this low-level function.
setTitle
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the title of a toplevel surface, to be displayed in the titlebar, in lists of windows, etc.
setTransientFor
toplevelSetTransientFor Source #
:: (HasCallStack, MonadIO m, IsToplevel a, IsSurface b) | |
=> a |
|
-> b |
|
-> m () |
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
or
GtkDialog
.
showWindowMenu
toplevelShowWindowMenu Source #
:: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsToplevel a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the desktop environment supports tiled window states.
Properties
decorated
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
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 ]
iconList
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
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
No description available in the introspection data.
getToplevelState :: (MonadIO m, IsToplevel o) => o -> m [SurfaceState] Source #
Get the value of the “state
” property.
When overloading is enabled, this is equivalent to
get
toplevel #state
title
No description available in the introspection data.
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
No description available in the introspection data.
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 ]