gi-gtk-4.0.9: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Interfaces.Root

Description

GtkRoot is the interface implemented by all widgets that can act as a toplevel widget.

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 GtkRoot is GtkWindow.

To get the display to which a GtkRoot belongs, use rootGetDisplay.

GtkRoot also maintains the location of keyboard focus inside its widget hierarchy, with rootSetFocus and rootGetFocus.

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 #

GObject Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

ManagedPtrNewtype Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

Methods

toManagedPtr :: Root -> ManagedPtr Root

TypedObject Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

Methods

glibType :: IO GType

HasParentTypes Root Source # 
Instance details

Defined in GI.Gtk.Interfaces.Root

IsGValue (Maybe Root) Source #

Convert Root to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Interfaces.Root

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Root -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe 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

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, updateProperty, updateRelation, updateState, watchClosure.

Getters

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

Setters

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

getDisplay

rootGetDisplay Source #

Arguments

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

self: a GtkRoot

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

-> m (Maybe Widget)

Returns: the currently focused widget

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 GtkRoot

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