gi-gdk-4.0.2: Gdk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Interfaces.Toplevel

Description

A Toplevel is a freestanding toplevel surface.

Synopsis

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

IsGValue Toplevel Source #

Convert Toplevel to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Interfaces.Toplevel

ManagedPtrNewtype Toplevel Source # 
Instance details

Defined in GI.Gdk.Interfaces.Toplevel

TypedObject Toplevel Source # 
Instance details

Defined in GI.Gdk.Interfaces.Toplevel

Methods

glibType :: IO GType #

GObject Toplevel Source # 
Instance details

Defined in GI.Gdk.Interfaces.Toplevel

HasParentTypes Toplevel Source # 
Instance details

Defined in GI.Gdk.Interfaces.Toplevel

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

Overloaded methods

beginMove

toplevelBeginMove Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) 
=> a

toplevel: a Toplevel

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

-> m () 

Begins an interactive move operation (for a toplevel surface). You might use this function to implement draggable titlebars.

beginResize

toplevelBeginResize Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsDevice b) 
=> a

toplevel: a Toplevel

-> 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 (for a toplevel surface). You might use this function to implement a “window resize grip.”

focus

toplevelFocus Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) 
=> a

toplevel: a Toplevel

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

getState

toplevelGetState Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) 
=> a

toplevel: a Toplevel

-> m [SurfaceState]

Returns: surface state bitfield

Gets the bitwise OR of the currently active surface state flags, from the SurfaceState enumeration.

inhibitSystemShortcuts

toplevelInhibitSystemShortcuts Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) 
=> a

toplevel: the Toplevel requesting system keyboard shortcuts

-> Maybe b

event: the Event that is triggering the inhibit request, or Nothing if none is available.

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

toplevelLower Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) 
=> a

toplevel: a Toplevel

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

-> 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 Toplevel to show

-> Int32

width: the unconstrained toplevel width to layout

-> Int32

height: the unconstrained toplevel height to layout

-> ToplevelLayout

layout: the ToplevelLayout object used to layout

-> m Bool

Returns: False if toplevel failed to be presented, otherwise True.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) 
=> a

toplevel: a Toplevel

-> m () 

Restore default system keyboard shortcuts which were previously requested to be inhibited by toplevelInhibitSystemShortcuts.

setDecorated

toplevelSetDecorated Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) 
=> a

toplevel: a Toplevel

-> Bool

decorated: True to request decorations

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

toplevelSetDeletable Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) 
=> a

toplevel: a Toplevel

-> Bool

deletable: True to request a delete button

-> m () 

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

setIconList

toplevelSetIconList Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsTexture b) 
=> a

toplevel: a Toplevel

-> [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 toplevel surface

-> Bool

modal: True if the surface is modal, False otherwise.

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

toplevelSetStartupId Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a) 
=> a

toplevel: a Toplevel

-> Text

startupId: a string with startup-notification identifier

-> m () 

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 Toplevel

-> Text

title: title of surface

-> m () 

Sets the title of a toplevel surface, to be displayed in the titlebar, in lists of windows, etc.

setTransientFor

toplevelSetTransientFor Source #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsSurface b) 
=> a

toplevel: a Toplevel

-> b

parent: another toplevel Surface

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsToplevel a, IsEvent b) 
=> a

toplevel: a Toplevel

-> b

event: a Event 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 Toplevel

-> m Bool

Returns: True if the desktop environment supports tiled window states

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 ]