Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- appendForWidget
- appendType
- appendWithSiblings
- copy
- free
- getObjectType
- hasParent
- isType
- iterAddClass
- iterAddRegion
- iterClearClasses
- iterClearRegions
- iterGetName
- iterGetObjectName
- iterGetObjectType
- iterGetSiblingIndex
- iterGetSiblings
- iterGetState
- iterHasClass
- iterHasName
- iterHasQclass
- iterHasQname
- iterHasQregion
- iterHasRegion
- iterListClasses
- iterListRegions
- iterRemoveClass
- iterRemoveRegion
- iterSetName
- iterSetObjectName
- iterSetObjectType
- iterSetState
- length
- new
- prependType
- ref
- toString
- unref
GtkWidgetPath is a boxed type that represents a widget hierarchy from
the topmost widget, typically a toplevel, to any child. This widget
path abstraction is used in StyleContext
on behalf of the real
widget in order to query style information.
If you are using GTK+ widgets, you probably will not need to use
this API directly, as there is widgetGetPath
, and the style
context returned by widgetGetStyleContext
will be automatically
updated on widget hierarchy changes.
The widget path generation is generally simple:
Defining a button within a window
C code
{ GtkWidgetPath *path; path = gtk_widget_path_new (); gtk_widget_path_append_type (path, GTK_TYPE_WINDOW); gtk_widget_path_append_type (path, GTK_TYPE_BUTTON); }
Although more complex information, such as widget names, or different classes (property that may be used by other widget types) and intermediate regions may be included:
Defining the first tab widget in a notebook
C code
{ GtkWidgetPath *path; guint pos; path = gtk_widget_path_new (); pos = gtk_widget_path_append_type (path, GTK_TYPE_NOTEBOOK); gtk_widget_path_iter_add_region (path, pos, "tab", GTK_REGION_EVEN | GTK_REGION_FIRST); pos = gtk_widget_path_append_type (path, GTK_TYPE_LABEL); gtk_widget_path_iter_set_name (path, pos, "first tab label"); }
All this information will be used to match the style information that applies to the described widget.
- newtype WidgetPath = WidgetPath (ManagedPtr WidgetPath)
- noWidgetPath :: Maybe WidgetPath
- data WidgetPathAppendForWidgetMethodInfo
- widgetPathAppendForWidget :: (HasCallStack, MonadIO m, IsWidget a) => WidgetPath -> a -> m Int32
- data WidgetPathAppendTypeMethodInfo
- widgetPathAppendType :: (HasCallStack, MonadIO m) => WidgetPath -> GType -> m Int32
- data WidgetPathAppendWithSiblingsMethodInfo
- widgetPathAppendWithSiblings :: (HasCallStack, MonadIO m) => WidgetPath -> WidgetPath -> Word32 -> m Int32
- data WidgetPathCopyMethodInfo
- widgetPathCopy :: (HasCallStack, MonadIO m) => WidgetPath -> m WidgetPath
- data WidgetPathFreeMethodInfo
- widgetPathFree :: (HasCallStack, MonadIO m) => WidgetPath -> m ()
- data WidgetPathGetObjectTypeMethodInfo
- widgetPathGetObjectType :: (HasCallStack, MonadIO m) => WidgetPath -> m GType
- data WidgetPathHasParentMethodInfo
- widgetPathHasParent :: (HasCallStack, MonadIO m) => WidgetPath -> GType -> m Bool
- data WidgetPathIsTypeMethodInfo
- widgetPathIsType :: (HasCallStack, MonadIO m) => WidgetPath -> GType -> m Bool
- data WidgetPathIterAddClassMethodInfo
- widgetPathIterAddClass :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterAddRegionMethodInfo
- widgetPathIterAddRegion :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> [RegionFlags] -> m ()
- data WidgetPathIterClearClassesMethodInfo
- widgetPathIterClearClasses :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m ()
- data WidgetPathIterClearRegionsMethodInfo
- widgetPathIterClearRegions :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m ()
- data WidgetPathIterGetNameMethodInfo
- widgetPathIterGetName :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m (Maybe Text)
- data WidgetPathIterGetObjectNameMethodInfo
- widgetPathIterGetObjectName :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m (Maybe Text)
- data WidgetPathIterGetObjectTypeMethodInfo
- widgetPathIterGetObjectType :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m GType
- data WidgetPathIterGetSiblingIndexMethodInfo
- widgetPathIterGetSiblingIndex :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m Word32
- data WidgetPathIterGetSiblingsMethodInfo
- widgetPathIterGetSiblings :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m WidgetPath
- data WidgetPathIterGetStateMethodInfo
- widgetPathIterGetState :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m [StateFlags]
- data WidgetPathIterHasClassMethodInfo
- widgetPathIterHasClass :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> m Bool
- data WidgetPathIterHasNameMethodInfo
- widgetPathIterHasName :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> m Bool
- data WidgetPathIterHasQclassMethodInfo
- widgetPathIterHasQclass :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Word32 -> m Bool
- data WidgetPathIterHasQnameMethodInfo
- widgetPathIterHasQname :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Word32 -> m Bool
- data WidgetPathIterHasQregionMethodInfo
- widgetPathIterHasQregion :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Word32 -> m (Bool, [RegionFlags])
- data WidgetPathIterHasRegionMethodInfo
- widgetPathIterHasRegion :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> m (Bool, [RegionFlags])
- data WidgetPathIterListClassesMethodInfo
- widgetPathIterListClasses :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m [Text]
- data WidgetPathIterListRegionsMethodInfo
- widgetPathIterListRegions :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> m [Text]
- data WidgetPathIterRemoveClassMethodInfo
- widgetPathIterRemoveClass :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterRemoveRegionMethodInfo
- widgetPathIterRemoveRegion :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterSetNameMethodInfo
- widgetPathIterSetName :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterSetObjectNameMethodInfo
- widgetPathIterSetObjectName :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> Maybe Text -> m ()
- data WidgetPathIterSetObjectTypeMethodInfo
- widgetPathIterSetObjectType :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> GType -> m ()
- data WidgetPathIterSetStateMethodInfo
- widgetPathIterSetState :: (HasCallStack, MonadIO m) => WidgetPath -> Int32 -> [StateFlags] -> m ()
- data WidgetPathLengthMethodInfo
- widgetPathLength :: (HasCallStack, MonadIO m) => WidgetPath -> m Int32
- widgetPathNew :: (HasCallStack, MonadIO m) => m WidgetPath
- data WidgetPathPrependTypeMethodInfo
- widgetPathPrependType :: (HasCallStack, MonadIO m) => WidgetPath -> GType -> m ()
- data WidgetPathRefMethodInfo
- widgetPathRef :: (HasCallStack, MonadIO m) => WidgetPath -> m WidgetPath
- data WidgetPathToStringMethodInfo
- widgetPathToString :: (HasCallStack, MonadIO m) => WidgetPath -> m Text
- data WidgetPathUnrefMethodInfo
- widgetPathUnref :: (HasCallStack, MonadIO m) => WidgetPath -> m ()
Exported types
newtype WidgetPath Source #
Methods
appendForWidget
data WidgetPathAppendForWidgetMethodInfo Source #
((~) * signature (a -> m Int32), MonadIO m, IsWidget a) => MethodInfo * WidgetPathAppendForWidgetMethodInfo WidgetPath signature Source # | |
widgetPathAppendForWidget Source #
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> WidgetPath |
|
-> a |
|
-> m Int32 | Returns: the position where the data was inserted |
Appends the data from widget
to the widget hierarchy represented
by path
. This function is a shortcut for adding information from
widget
to the given path
. This includes setting the name or
adding the style classes from widget
.
Since: 3.2
appendType
data WidgetPathAppendTypeMethodInfo Source #
((~) * signature (GType -> m Int32), MonadIO m) => MethodInfo * WidgetPathAppendTypeMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> GType |
|
-> m Int32 | Returns: the position where the element was inserted |
Appends a widget type to the widget hierarchy represented by path
.
Since: 3.0
appendWithSiblings
data WidgetPathAppendWithSiblingsMethodInfo Source #
((~) * signature (WidgetPath -> Word32 -> m Int32), MonadIO m) => MethodInfo * WidgetPathAppendWithSiblingsMethodInfo WidgetPath signature Source # | |
widgetPathAppendWithSiblings Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> WidgetPath |
|
-> Word32 |
|
-> m Int32 | Returns: the position where the element was inserted. |
Appends a widget type with all its siblings to the widget hierarchy
represented by path
. Using this function instead of
widgetPathAppendType
will allow the CSS theming to use
sibling matches in selectors and apply :nth-child()
pseudo classes.
In turn, it requires a lot more care in widget implementations as
widgets need to make sure to call widgetResetStyle
on all
involved widgets when the siblings
path changes.
Since: 3.2
copy
data WidgetPathCopyMethodInfo Source #
((~) * signature (m WidgetPath), MonadIO m) => MethodInfo * WidgetPathCopyMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> m WidgetPath | Returns: a copy of |
Returns a copy of path
Since: 3.0
free
data WidgetPathFreeMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * WidgetPathFreeMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> m () |
Decrements the reference count on path
, freeing the structure
if the reference count reaches 0.
Since: 3.0
getObjectType
data WidgetPathGetObjectTypeMethodInfo Source #
((~) * signature (m GType), MonadIO m) => MethodInfo * WidgetPathGetObjectTypeMethodInfo WidgetPath signature Source # | |
widgetPathGetObjectType Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> m GType | Returns: The object type |
Returns the topmost object type, that is, the object type this path is representing.
Since: 3.0
hasParent
data WidgetPathHasParentMethodInfo Source #
((~) * signature (GType -> m Bool), MonadIO m) => MethodInfo * WidgetPathHasParentMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> GType |
|
-> m Bool | Returns: |
Returns True
if any of the parents of the widget represented
in path
is of type type
, or any subtype of it.
Since: 3.0
isType
data WidgetPathIsTypeMethodInfo Source #
((~) * signature (GType -> m Bool), MonadIO m) => MethodInfo * WidgetPathIsTypeMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> GType |
|
-> m Bool | Returns: |
Returns True
if the widget type represented by this path
is type
, or a subtype of it.
Since: 3.0
iterAddClass
data WidgetPathIterAddClassMethodInfo Source #
((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterAddClassMethodInfo WidgetPath signature Source # | |
widgetPathIterAddClass Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> m () |
Adds the class name
to the widget at position pos
in
the hierarchy defined in path
. See
styleContextAddClass
.
Since: 3.0
iterAddRegion
data WidgetPathIterAddRegionMethodInfo Source #
((~) * signature (Int32 -> Text -> [RegionFlags] -> m ()), MonadIO m) => MethodInfo * WidgetPathIterAddRegionMethodInfo WidgetPath signature Source # | |
widgetPathIterAddRegion Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> [RegionFlags] |
|
-> m () |
Deprecated: (Since version 3.14)The use of regions is deprecated.
Adds the region name
to the widget at position pos
in
the hierarchy defined in path
. See
styleContextAddRegion
.
Region names must only contain lowercase letters and “-”, starting always with a lowercase letter.
Since: 3.0
iterClearClasses
data WidgetPathIterClearClassesMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * WidgetPathIterClearClassesMethodInfo WidgetPath signature Source # | |
widgetPathIterClearClasses Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m () |
Removes all classes from the widget at position pos
in the
hierarchy defined in path
.
Since: 3.0
iterClearRegions
data WidgetPathIterClearRegionsMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * WidgetPathIterClearRegionsMethodInfo WidgetPath signature Source # | |
widgetPathIterClearRegions Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 3.14)The use of regions is deprecated.
Removes all regions from the widget at position pos
in the
hierarchy defined in path
.
Since: 3.0
iterGetName
data WidgetPathIterGetNameMethodInfo Source #
((~) * signature (Int32 -> m (Maybe Text)), MonadIO m) => MethodInfo * WidgetPathIterGetNameMethodInfo WidgetPath signature Source # | |
widgetPathIterGetName Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m (Maybe Text) | Returns: The widget name, or |
Returns the name corresponding to the widget found at
the position pos
in the widget hierarchy defined by
path
iterGetObjectName
data WidgetPathIterGetObjectNameMethodInfo Source #
((~) * signature (Int32 -> m (Maybe Text)), MonadIO m) => MethodInfo * WidgetPathIterGetObjectNameMethodInfo WidgetPath signature Source # | |
widgetPathIterGetObjectName Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m (Maybe Text) | Returns: the name or |
Returns the object name that is at position pos
in the widget
hierarchy defined in path
.
Since: 3.20
iterGetObjectType
data WidgetPathIterGetObjectTypeMethodInfo Source #
((~) * signature (Int32 -> m GType), MonadIO m) => MethodInfo * WidgetPathIterGetObjectTypeMethodInfo WidgetPath signature Source # | |
widgetPathIterGetObjectType Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m GType | Returns: a widget type |
Returns the object GType
that is at position pos
in the widget
hierarchy defined in path
.
Since: 3.0
iterGetSiblingIndex
data WidgetPathIterGetSiblingIndexMethodInfo Source #
((~) * signature (Int32 -> m Word32), MonadIO m) => MethodInfo * WidgetPathIterGetSiblingIndexMethodInfo WidgetPath signature Source # | |
widgetPathIterGetSiblingIndex Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m Word32 | Returns: 0 or the index into the list of siblings for the element at |
Returns the index into the list of siblings for the element at pos
as
returned by widgetPathIterGetSiblings
. If that function would
return Nothing
because the element at pos
has no siblings, this function
will return 0.
iterGetSiblings
data WidgetPathIterGetSiblingsMethodInfo Source #
((~) * signature (Int32 -> m WidgetPath), MonadIO m) => MethodInfo * WidgetPathIterGetSiblingsMethodInfo WidgetPath signature Source # | |
widgetPathIterGetSiblings Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m WidgetPath | Returns: |
Returns the list of siblings for the element at pos
. If the element
was not added with siblings, Nothing
is returned.
iterGetState
data WidgetPathIterGetStateMethodInfo Source #
((~) * signature (Int32 -> m [StateFlags]), MonadIO m) => MethodInfo * WidgetPathIterGetStateMethodInfo WidgetPath signature Source # | |
widgetPathIterGetState Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m [StateFlags] | Returns: The state flags |
Returns the state flags corresponding to the widget found at
the position pos
in the widget hierarchy defined by
path
Since: 3.14
iterHasClass
data WidgetPathIterHasClassMethodInfo Source #
((~) * signature (Int32 -> Text -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasClassMethodInfo WidgetPath signature Source # | |
widgetPathIterHasClass Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> m Bool | Returns: |
iterHasName
data WidgetPathIterHasNameMethodInfo Source #
((~) * signature (Int32 -> Text -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasNameMethodInfo WidgetPath signature Source # | |
widgetPathIterHasName Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> m Bool | Returns: |
iterHasQclass
data WidgetPathIterHasQclassMethodInfo Source #
((~) * signature (Int32 -> Word32 -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasQclassMethodInfo WidgetPath signature Source # | |
widgetPathIterHasQclass Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Word32 |
|
-> m Bool | Returns: |
See widgetPathIterHasClass
. This is a version that operates
with GQuarks.
Since: 3.0
iterHasQname
data WidgetPathIterHasQnameMethodInfo Source #
((~) * signature (Int32 -> Word32 -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasQnameMethodInfo WidgetPath signature Source # | |
widgetPathIterHasQname Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Word32 |
|
-> m Bool | Returns: |
See widgetPathIterHasName
. This is a version
that operates on GQuarks
.
Since: 3.0
iterHasQregion
data WidgetPathIterHasQregionMethodInfo Source #
((~) * signature (Int32 -> Word32 -> m (Bool, [RegionFlags])), MonadIO m) => MethodInfo * WidgetPathIterHasQregionMethodInfo WidgetPath signature Source # | |
widgetPathIterHasQregion Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Word32 |
|
-> m (Bool, [RegionFlags]) | Returns: |
Deprecated: (Since version 3.14)The use of regions is deprecated.
See widgetPathIterHasRegion
. This is a version that operates
with GQuarks.
Since: 3.0
iterHasRegion
data WidgetPathIterHasRegionMethodInfo Source #
((~) * signature (Int32 -> Text -> m (Bool, [RegionFlags])), MonadIO m) => MethodInfo * WidgetPathIterHasRegionMethodInfo WidgetPath signature Source # | |
widgetPathIterHasRegion Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> m (Bool, [RegionFlags]) | Returns: |
iterListClasses
data WidgetPathIterListClassesMethodInfo Source #
((~) * signature (Int32 -> m [Text]), MonadIO m) => MethodInfo * WidgetPathIterListClassesMethodInfo WidgetPath signature Source # | |
widgetPathIterListClasses Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m [Text] | Returns: The list of
classes, This is a list of strings, the |
Returns a list with all the class names defined for the widget
at position pos
in the hierarchy defined in path
.
Since: 3.0
iterListRegions
data WidgetPathIterListRegionsMethodInfo Source #
((~) * signature (Int32 -> m [Text]), MonadIO m) => MethodInfo * WidgetPathIterListRegionsMethodInfo WidgetPath signature Source # | |
widgetPathIterListRegions Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> m [Text] | Returns: The list of
regions, This is a list of strings, the |
Deprecated: (Since version 3.14)The use of regions is deprecated.
Returns a list with all the region names defined for the widget
at position pos
in the hierarchy defined in path
.
Since: 3.0
iterRemoveClass
data WidgetPathIterRemoveClassMethodInfo Source #
((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterRemoveClassMethodInfo WidgetPath signature Source # | |
widgetPathIterRemoveClass Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> m () |
Removes the class name
from the widget at position pos
in
the hierarchy defined in path
.
Since: 3.0
iterRemoveRegion
data WidgetPathIterRemoveRegionMethodInfo Source #
((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterRemoveRegionMethodInfo WidgetPath signature Source # | |
widgetPathIterRemoveRegion Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> m () |
Deprecated: (Since version 3.14)The use of regions is deprecated.
Removes the region name
from the widget at position pos
in
the hierarchy defined in path
.
Since: 3.0
iterSetName
data WidgetPathIterSetNameMethodInfo Source #
((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetNameMethodInfo WidgetPath signature Source # | |
widgetPathIterSetName Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Text |
|
-> m () |
Sets the widget name for the widget found at position pos
in the widget hierarchy defined by path
.
Since: 3.0
iterSetObjectName
data WidgetPathIterSetObjectNameMethodInfo Source #
((~) * signature (Int32 -> Maybe Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetObjectNameMethodInfo WidgetPath signature Source # | |
widgetPathIterSetObjectName Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> Maybe Text |
|
-> m () |
Sets the object name for a given position in the widget hierarchy
defined by path
.
When set, the object name overrides the object type when matching CSS.
Since: 3.20
iterSetObjectType
data WidgetPathIterSetObjectTypeMethodInfo Source #
((~) * signature (Int32 -> GType -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetObjectTypeMethodInfo WidgetPath signature Source # | |
widgetPathIterSetObjectType Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> GType |
|
-> m () |
Sets the object type for a given position in the widget hierarchy
defined by path
.
Since: 3.0
iterSetState
data WidgetPathIterSetStateMethodInfo Source #
((~) * signature (Int32 -> [StateFlags] -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetStateMethodInfo WidgetPath signature Source # | |
widgetPathIterSetState Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> Int32 |
|
-> [StateFlags] |
|
-> m () |
Sets the widget name for the widget found at position pos
in the widget hierarchy defined by path
.
If you want to update just a single state flag, you need to do this manually, as this function updates all state flags.
Setting a flag
C code
gtk_widget_path_iter_set_state (path, pos, gtk_widget_path_iter_get_state (path, pos) | flag);
Unsetting a flag
C code
gtk_widget_path_iter_set_state (path, pos, gtk_widget_path_iter_get_state (path, pos) & ~flag);
Since: 3.14
length
data WidgetPathLengthMethodInfo Source #
((~) * signature (m Int32), MonadIO m) => MethodInfo * WidgetPathLengthMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> m Int32 | Returns: the number of elements in the path |
Returns the number of Widget
GTypes
between the represented
widget and its topmost container.
Since: 3.0
new
:: (HasCallStack, MonadIO m) | |
=> m WidgetPath | Returns: A newly created, empty, |
Returns an empty widget path.
Since: 3.0
prependType
data WidgetPathPrependTypeMethodInfo Source #
((~) * signature (GType -> m ()), MonadIO m) => MethodInfo * WidgetPathPrependTypeMethodInfo WidgetPath signature Source # | |
widgetPathPrependType Source #
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> GType |
|
-> m () |
Prepends a widget type to the widget hierachy represented by path
.
Since: 3.0
ref
data WidgetPathRefMethodInfo Source #
((~) * signature (m WidgetPath), MonadIO m) => MethodInfo * WidgetPathRefMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> m WidgetPath | Returns: |
Increments the reference count on path
.
Since: 3.2
toString
data WidgetPathToStringMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * WidgetPathToStringMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> m Text | Returns: A new string describing |
Dumps the widget path into a string representation. It tries to match the CSS style as closely as possible (Note that there might be paths that cannot be represented in CSS).
The main use of this code is for debugging purposes, so that you can
g_print()
the path or dump it in a gdb session.
Since: 3.2
unref
data WidgetPathUnrefMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * WidgetPathUnrefMethodInfo WidgetPath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> WidgetPath |
|
-> m () |
Decrements the reference count on path
, freeing the structure
if the reference count reaches 0.
Since: 3.2