| 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 |
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.
Synopsis
- newtype Root = Root (ManagedPtr Root)
- noRoot :: Maybe Root
- class (GObject o, IsDescendantOf Root o) => IsRoot o
- toRoot :: (MonadIO m, IsRoot o) => o -> m Root
- rootGetFocus :: (HasCallStack, MonadIO m, IsRoot a) => a -> m (Maybe Widget)
- rootGetForSurface :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Widget
- rootSetFocus :: (HasCallStack, MonadIO m, IsRoot a, IsWidget b) => a -> Maybe b -> m ()
- clearRootFocusWidget :: (MonadIO m, IsRoot o) => o -> m ()
- constructRootFocusWidget :: (IsRoot o, IsWidget a) => a -> IO (GValueConstruct o)
- getRootFocusWidget :: (MonadIO m, IsRoot o) => o -> m (Maybe Widget)
- setRootFocusWidget :: (MonadIO m, IsRoot o, IsWidget a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Constructors
| Root (ManagedPtr Root) |
Instances
| Eq Root Source # | |
| IsGValue Root Source # | Convert |
| GObject Root Source # | |
Defined in GI.Gtk.Interfaces.Root Methods gobjectType :: IO GType # | |
| HasParentTypes Root Source # | |
Defined in GI.Gtk.Interfaces.Root | |
| type ParentTypes Root Source # | |
Defined in GI.Gtk.Interfaces.Root | |
class (GObject o, IsDescendantOf Root o) => IsRoot o Source #
Instances
| (GObject o, IsDescendantOf Root o) => IsRoot o Source # | |
Defined in GI.Gtk.Interfaces.Root | |
Methods
Overloaded methods
getFocus
Arguments
| :: (HasCallStack, MonadIO m, IsRoot a) | |
| => a |
|
| -> m (Maybe Widget) | Returns: the currently focused widget,
or |
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.
getForSurface
Arguments
| :: (HasCallStack, MonadIO m, IsSurface a) | |
| => a |
|
| -> m Widget | Returns: the |
Finds the GtkRoot associated with the surface.
setFocus
Arguments
| :: (HasCallStack, MonadIO m, IsRoot a, IsWidget b) | |
| => a |
|
| -> Maybe b |
|
| -> 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.
Properties
focusWidget
No description available in the introspection data.
clearRootFocusWidget :: (MonadIO m, IsRoot o) => o -> m () Source #
Set the value of the “focus-widget” property to Nothing.
When overloading is enabled, this is equivalent to
clear #focusWidget
constructRootFocusWidget :: (IsRoot o, IsWidget a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “focus-widget” property. This is rarely needed directly, but it is used by new.
getRootFocusWidget :: (MonadIO m, IsRoot o) => o -> m (Maybe Widget) Source #
Get the value of the “focus-widget” property.
When overloading is enabled, this is equivalent to
get root #focusWidget
setRootFocusWidget :: (MonadIO m, IsRoot o, IsWidget a) => o -> a -> m () Source #
Set the value of the “focus-widget” property.
When overloading is enabled, this is equivalent to
setroot [ #focusWidget:=value ]