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

GI.Gtk.Interfaces.Root

Description

Root is the interface implemented by all widgets that can act as a toplevel widget to a hierarchy of widgets. The root widget takes care of providing the connection to the windowing system and manages layout, drawing and event delivery for its widget hierarchy.

The obvious example of a Root is Window.

Synopsis

Exported types

newtype Root Source #

Memory-managed wrapper type.

Constructors

Root (ManagedPtr Root) 

Instances

Instances details
Eq Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

Methods

(==) :: Root -> Root -> Bool #

(/=) :: Root -> Root -> Bool #

IsGValue Root Source #

Convert Root to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Interfaces.Root

ManagedPtrNewtype Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

TypedObject Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

Methods

glibType :: IO GType #

GObject Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

HasParentTypes Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

type ParentTypes Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

type ParentTypes Root = '[Native, Widget, Object]

class (GObject o, IsDescendantOf Root o) => IsRoot o Source #

Type class for types which can be safely cast to Root, for instance with toRoot.

Instances

Instances details
(GObject o, IsDescendantOf Root o) => IsRoot o Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

toRoot :: (MonadIO m, IsRoot o) => o -> m Root Source #

Cast to Root, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

getDisplay

rootGetDisplay Source #

Arguments

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

self: a Root

-> m Display

Returns: the display of root

Returns the display that this GtkRoot is on.

getFocus

rootGetFocus Source #

Arguments

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

self: a Root

-> m (Maybe Widget)

Returns: the currently focused widget, or Nothing if there is none.

Retrieves the current focused widget within the root.

Note that this is the widget that would have the focus if the root is active; if the root is not focused then gtk_widget_has_focus (widget) will be False for the widget.

setFocus

rootSetFocus Source #

Arguments

:: (HasCallStack, MonadIO m, IsRoot a, IsWidget b) 
=> a

self: a Root

-> Maybe b

focus: widget to be the new focus widget, or Nothing to unset the focus widget

-> m () 

If focus is not the current focus widget, and is focusable, sets it as the focus widget for the root. If focus is Nothing, unsets the focus widget for the root.

To set the focus to a particular widget in the root, it is usually more convenient to use widgetGrabFocus instead of this function.