| 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 |
GI.Gtk.Structs.WidgetPath
Contents
- 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
Description
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 #GtkStyleContext 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 gtk_widget_get_path(), and the style context returned by gtk_widget_get_style_context() will be automatically updated on widget hierarchy changes.
The widget path generation is generally simple:
## Defining a button within a window
|[language="C" -- { 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
|[language="C" -- { 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 :: (MonadIO m, IsWidget a) => WidgetPath -> a -> m Int32
- data WidgetPathAppendTypeMethodInfo
- widgetPathAppendType :: MonadIO m => WidgetPath -> GType -> m Int32
- data WidgetPathAppendWithSiblingsMethodInfo
- widgetPathAppendWithSiblings :: MonadIO m => WidgetPath -> WidgetPath -> Word32 -> m Int32
- data WidgetPathCopyMethodInfo
- widgetPathCopy :: MonadIO m => WidgetPath -> m WidgetPath
- data WidgetPathFreeMethodInfo
- widgetPathFree :: MonadIO m => WidgetPath -> m ()
- data WidgetPathGetObjectTypeMethodInfo
- widgetPathGetObjectType :: MonadIO m => WidgetPath -> m GType
- data WidgetPathHasParentMethodInfo
- widgetPathHasParent :: MonadIO m => WidgetPath -> GType -> m Bool
- data WidgetPathIsTypeMethodInfo
- widgetPathIsType :: MonadIO m => WidgetPath -> GType -> m Bool
- data WidgetPathIterAddClassMethodInfo
- widgetPathIterAddClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterAddRegionMethodInfo
- widgetPathIterAddRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> [RegionFlags] -> m ()
- data WidgetPathIterClearClassesMethodInfo
- widgetPathIterClearClasses :: MonadIO m => WidgetPath -> Int32 -> m ()
- data WidgetPathIterClearRegionsMethodInfo
- widgetPathIterClearRegions :: MonadIO m => WidgetPath -> Int32 -> m ()
- data WidgetPathIterGetNameMethodInfo
- widgetPathIterGetName :: MonadIO m => WidgetPath -> Int32 -> m Text
- data WidgetPathIterGetObjectNameMethodInfo
- widgetPathIterGetObjectName :: MonadIO m => WidgetPath -> Int32 -> m Text
- data WidgetPathIterGetObjectTypeMethodInfo
- widgetPathIterGetObjectType :: MonadIO m => WidgetPath -> Int32 -> m GType
- data WidgetPathIterGetSiblingIndexMethodInfo
- widgetPathIterGetSiblingIndex :: MonadIO m => WidgetPath -> Int32 -> m Word32
- data WidgetPathIterGetSiblingsMethodInfo
- widgetPathIterGetSiblings :: MonadIO m => WidgetPath -> Int32 -> m WidgetPath
- data WidgetPathIterGetStateMethodInfo
- widgetPathIterGetState :: MonadIO m => WidgetPath -> Int32 -> m [StateFlags]
- data WidgetPathIterHasClassMethodInfo
- widgetPathIterHasClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m Bool
- data WidgetPathIterHasNameMethodInfo
- widgetPathIterHasName :: MonadIO m => WidgetPath -> Int32 -> Text -> m Bool
- data WidgetPathIterHasQclassMethodInfo
- widgetPathIterHasQclass :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m Bool
- data WidgetPathIterHasQnameMethodInfo
- widgetPathIterHasQname :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m Bool
- data WidgetPathIterHasQregionMethodInfo
- widgetPathIterHasQregion :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m (Bool, [RegionFlags])
- data WidgetPathIterHasRegionMethodInfo
- widgetPathIterHasRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> m (Bool, [RegionFlags])
- data WidgetPathIterListClassesMethodInfo
- widgetPathIterListClasses :: MonadIO m => WidgetPath -> Int32 -> m [Text]
- data WidgetPathIterListRegionsMethodInfo
- widgetPathIterListRegions :: MonadIO m => WidgetPath -> Int32 -> m [Text]
- data WidgetPathIterRemoveClassMethodInfo
- widgetPathIterRemoveClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterRemoveRegionMethodInfo
- widgetPathIterRemoveRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterSetNameMethodInfo
- widgetPathIterSetName :: MonadIO m => WidgetPath -> Int32 -> Text -> m ()
- data WidgetPathIterSetObjectNameMethodInfo
- widgetPathIterSetObjectName :: MonadIO m => WidgetPath -> Int32 -> Maybe Text -> m ()
- data WidgetPathIterSetObjectTypeMethodInfo
- widgetPathIterSetObjectType :: MonadIO m => WidgetPath -> Int32 -> GType -> m ()
- data WidgetPathIterSetStateMethodInfo
- widgetPathIterSetState :: MonadIO m => WidgetPath -> Int32 -> [StateFlags] -> m ()
- data WidgetPathLengthMethodInfo
- widgetPathLength :: MonadIO m => WidgetPath -> m Int32
- widgetPathNew :: MonadIO m => m WidgetPath
- data WidgetPathPrependTypeMethodInfo
- widgetPathPrependType :: MonadIO m => WidgetPath -> GType -> m ()
- data WidgetPathRefMethodInfo
- widgetPathRef :: MonadIO m => WidgetPath -> m WidgetPath
- data WidgetPathToStringMethodInfo
- widgetPathToString :: MonadIO m => WidgetPath -> m Text
- data WidgetPathUnrefMethodInfo
- widgetPathUnref :: MonadIO m => WidgetPath -> m ()
Exported types
newtype WidgetPath Source #
Constructors
| WidgetPath (ManagedPtr WidgetPath) |
Instances
Methods
appendForWidget
data WidgetPathAppendForWidgetMethodInfo Source #
Instances
| ((~) * signature (a -> m Int32), MonadIO m, IsWidget a) => MethodInfo * WidgetPathAppendForWidgetMethodInfo WidgetPath signature Source # | |
widgetPathAppendForWidget :: (MonadIO m, IsWidget a) => WidgetPath -> a -> m Int32 Source #
appendType
data WidgetPathAppendTypeMethodInfo Source #
Instances
| ((~) * signature (GType -> m Int32), MonadIO m) => MethodInfo * WidgetPathAppendTypeMethodInfo WidgetPath signature Source # | |
widgetPathAppendType :: MonadIO m => WidgetPath -> GType -> m Int32 Source #
appendWithSiblings
data WidgetPathAppendWithSiblingsMethodInfo Source #
Instances
| ((~) * signature (WidgetPath -> Word32 -> m Int32), MonadIO m) => MethodInfo * WidgetPathAppendWithSiblingsMethodInfo WidgetPath signature Source # | |
widgetPathAppendWithSiblings :: MonadIO m => WidgetPath -> WidgetPath -> Word32 -> m Int32 Source #
copy
data WidgetPathCopyMethodInfo Source #
Instances
| ((~) * signature (m WidgetPath), MonadIO m) => MethodInfo * WidgetPathCopyMethodInfo WidgetPath signature Source # | |
widgetPathCopy :: MonadIO m => WidgetPath -> m WidgetPath Source #
free
data WidgetPathFreeMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * WidgetPathFreeMethodInfo WidgetPath signature Source # | |
widgetPathFree :: MonadIO m => WidgetPath -> m () Source #
getObjectType
data WidgetPathGetObjectTypeMethodInfo Source #
Instances
| ((~) * signature (m GType), MonadIO m) => MethodInfo * WidgetPathGetObjectTypeMethodInfo WidgetPath signature Source # | |
widgetPathGetObjectType :: MonadIO m => WidgetPath -> m GType Source #
hasParent
data WidgetPathHasParentMethodInfo Source #
Instances
| ((~) * signature (GType -> m Bool), MonadIO m) => MethodInfo * WidgetPathHasParentMethodInfo WidgetPath signature Source # | |
widgetPathHasParent :: MonadIO m => WidgetPath -> GType -> m Bool Source #
isType
data WidgetPathIsTypeMethodInfo Source #
Instances
| ((~) * signature (GType -> m Bool), MonadIO m) => MethodInfo * WidgetPathIsTypeMethodInfo WidgetPath signature Source # | |
widgetPathIsType :: MonadIO m => WidgetPath -> GType -> m Bool Source #
iterAddClass
data WidgetPathIterAddClassMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterAddClassMethodInfo WidgetPath signature Source # | |
widgetPathIterAddClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source #
iterAddRegion
data WidgetPathIterAddRegionMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> [RegionFlags] -> m ()), MonadIO m) => MethodInfo * WidgetPathIterAddRegionMethodInfo WidgetPath signature Source # | |
widgetPathIterAddRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> [RegionFlags] -> m () Source #
Deprecated: (Since version 3.14)The use of regions is deprecated.
iterClearClasses
data WidgetPathIterClearClassesMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * WidgetPathIterClearClassesMethodInfo WidgetPath signature Source # | |
widgetPathIterClearClasses :: MonadIO m => WidgetPath -> Int32 -> m () Source #
iterClearRegions
data WidgetPathIterClearRegionsMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * WidgetPathIterClearRegionsMethodInfo WidgetPath signature Source # | |
widgetPathIterClearRegions :: MonadIO m => WidgetPath -> Int32 -> m () Source #
Deprecated: (Since version 3.14)The use of regions is deprecated.
iterGetName
data WidgetPathIterGetNameMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m Text), MonadIO m) => MethodInfo * WidgetPathIterGetNameMethodInfo WidgetPath signature Source # | |
widgetPathIterGetName :: MonadIO m => WidgetPath -> Int32 -> m Text Source #
iterGetObjectName
data WidgetPathIterGetObjectNameMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m Text), MonadIO m) => MethodInfo * WidgetPathIterGetObjectNameMethodInfo WidgetPath signature Source # | |
widgetPathIterGetObjectName :: MonadIO m => WidgetPath -> Int32 -> m Text Source #
iterGetObjectType
data WidgetPathIterGetObjectTypeMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m GType), MonadIO m) => MethodInfo * WidgetPathIterGetObjectTypeMethodInfo WidgetPath signature Source # | |
widgetPathIterGetObjectType :: MonadIO m => WidgetPath -> Int32 -> m GType Source #
iterGetSiblingIndex
data WidgetPathIterGetSiblingIndexMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m Word32), MonadIO m) => MethodInfo * WidgetPathIterGetSiblingIndexMethodInfo WidgetPath signature Source # | |
widgetPathIterGetSiblingIndex :: MonadIO m => WidgetPath -> Int32 -> m Word32 Source #
iterGetSiblings
data WidgetPathIterGetSiblingsMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m WidgetPath), MonadIO m) => MethodInfo * WidgetPathIterGetSiblingsMethodInfo WidgetPath signature Source # | |
widgetPathIterGetSiblings :: MonadIO m => WidgetPath -> Int32 -> m WidgetPath Source #
iterGetState
data WidgetPathIterGetStateMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m [StateFlags]), MonadIO m) => MethodInfo * WidgetPathIterGetStateMethodInfo WidgetPath signature Source # | |
widgetPathIterGetState :: MonadIO m => WidgetPath -> Int32 -> m [StateFlags] Source #
iterHasClass
data WidgetPathIterHasClassMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasClassMethodInfo WidgetPath signature Source # | |
widgetPathIterHasClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m Bool Source #
iterHasName
data WidgetPathIterHasNameMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasNameMethodInfo WidgetPath signature Source # | |
widgetPathIterHasName :: MonadIO m => WidgetPath -> Int32 -> Text -> m Bool Source #
iterHasQclass
data WidgetPathIterHasQclassMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Word32 -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasQclassMethodInfo WidgetPath signature Source # | |
widgetPathIterHasQclass :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m Bool Source #
iterHasQname
data WidgetPathIterHasQnameMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Word32 -> m Bool), MonadIO m) => MethodInfo * WidgetPathIterHasQnameMethodInfo WidgetPath signature Source # | |
widgetPathIterHasQname :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m Bool Source #
iterHasQregion
data WidgetPathIterHasQregionMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Word32 -> m (Bool, [RegionFlags])), MonadIO m) => MethodInfo * WidgetPathIterHasQregionMethodInfo WidgetPath signature Source # | |
widgetPathIterHasQregion :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m (Bool, [RegionFlags]) Source #
Deprecated: (Since version 3.14)The use of regions is deprecated.
iterHasRegion
data WidgetPathIterHasRegionMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> m (Bool, [RegionFlags])), MonadIO m) => MethodInfo * WidgetPathIterHasRegionMethodInfo WidgetPath signature Source # | |
widgetPathIterHasRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> m (Bool, [RegionFlags]) Source #
Deprecated: (Since version 3.14)The use of regions is deprecated.
iterListClasses
data WidgetPathIterListClassesMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m [Text]), MonadIO m) => MethodInfo * WidgetPathIterListClassesMethodInfo WidgetPath signature Source # | |
widgetPathIterListClasses :: MonadIO m => WidgetPath -> Int32 -> m [Text] Source #
iterListRegions
data WidgetPathIterListRegionsMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m [Text]), MonadIO m) => MethodInfo * WidgetPathIterListRegionsMethodInfo WidgetPath signature Source # | |
widgetPathIterListRegions :: MonadIO m => WidgetPath -> Int32 -> m [Text] Source #
Deprecated: (Since version 3.14)The use of regions is deprecated.
iterRemoveClass
data WidgetPathIterRemoveClassMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterRemoveClassMethodInfo WidgetPath signature Source # | |
widgetPathIterRemoveClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source #
iterRemoveRegion
data WidgetPathIterRemoveRegionMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterRemoveRegionMethodInfo WidgetPath signature Source # | |
widgetPathIterRemoveRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source #
Deprecated: (Since version 3.14)The use of regions is deprecated.
iterSetName
data WidgetPathIterSetNameMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetNameMethodInfo WidgetPath signature Source # | |
widgetPathIterSetName :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source #
iterSetObjectName
data WidgetPathIterSetObjectNameMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Maybe Text -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetObjectNameMethodInfo WidgetPath signature Source # | |
widgetPathIterSetObjectName :: MonadIO m => WidgetPath -> Int32 -> Maybe Text -> m () Source #
iterSetObjectType
data WidgetPathIterSetObjectTypeMethodInfo Source #
Instances
| ((~) * signature (Int32 -> GType -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetObjectTypeMethodInfo WidgetPath signature Source # | |
widgetPathIterSetObjectType :: MonadIO m => WidgetPath -> Int32 -> GType -> m () Source #
iterSetState
data WidgetPathIterSetStateMethodInfo Source #
Instances
| ((~) * signature (Int32 -> [StateFlags] -> m ()), MonadIO m) => MethodInfo * WidgetPathIterSetStateMethodInfo WidgetPath signature Source # | |
widgetPathIterSetState :: MonadIO m => WidgetPath -> Int32 -> [StateFlags] -> m () Source #
length
data WidgetPathLengthMethodInfo Source #
Instances
| ((~) * signature (m Int32), MonadIO m) => MethodInfo * WidgetPathLengthMethodInfo WidgetPath signature Source # | |
widgetPathLength :: MonadIO m => WidgetPath -> m Int32 Source #
new
widgetPathNew :: MonadIO m => m WidgetPath Source #
prependType
data WidgetPathPrependTypeMethodInfo Source #
Instances
| ((~) * signature (GType -> m ()), MonadIO m) => MethodInfo * WidgetPathPrependTypeMethodInfo WidgetPath signature Source # | |
widgetPathPrependType :: MonadIO m => WidgetPath -> GType -> m () Source #
ref
data WidgetPathRefMethodInfo Source #
Instances
| ((~) * signature (m WidgetPath), MonadIO m) => MethodInfo * WidgetPathRefMethodInfo WidgetPath signature Source # | |
widgetPathRef :: MonadIO m => WidgetPath -> m WidgetPath Source #
toString
data WidgetPathToStringMethodInfo Source #
Instances
| ((~) * signature (m Text), MonadIO m) => MethodInfo * WidgetPathToStringMethodInfo WidgetPath signature Source # | |
widgetPathToString :: MonadIO m => WidgetPath -> m Text Source #
unref
data WidgetPathUnrefMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * WidgetPathUnrefMethodInfo WidgetPath signature Source # | |
widgetPathUnref :: MonadIO m => WidgetPath -> m () Source #