gi-gtk-4.0.4: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
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 #

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, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, 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, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, 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

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