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
- widgetPathAppendForWidget
- widgetPathAppendType
- widgetPathAppendWithSiblings
- widgetPathCopy
- widgetPathFree
- widgetPathGetObjectType
- widgetPathHasParent
- widgetPathIsType
- widgetPathIterAddClass
- widgetPathIterAddRegion
- widgetPathIterClearClasses
- widgetPathIterClearRegions
- widgetPathIterGetName
- widgetPathIterGetObjectType
- widgetPathIterGetSiblingIndex
- widgetPathIterGetSiblings
- widgetPathIterGetState
- widgetPathIterHasClass
- widgetPathIterHasName
- widgetPathIterHasQclass
- widgetPathIterHasQname
- widgetPathIterHasQregion
- widgetPathIterHasRegion
- widgetPathIterListClasses
- widgetPathIterListRegions
- widgetPathIterRemoveClass
- widgetPathIterRemoveRegion
- widgetPathIterSetName
- widgetPathIterSetObjectType
- widgetPathIterSetState
- widgetPathLength
- widgetPathNew
- widgetPathPrependType
- widgetPathRef
- widgetPathToString
- widgetPathUnref
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 (ForeignPtr WidgetPath)
- noWidgetPath :: Maybe WidgetPath
- data WidgetPathAppendForWidgetMethodInfo
- widgetPathAppendForWidget :: (MonadIO m, WidgetK 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 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 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
Methods
widgetPathAppendForWidget
data WidgetPathAppendForWidgetMethodInfo Source
((~) (TYPE Lifted) signature (a -> m Int32), MonadIO m, WidgetK a) => MethodInfo (TYPE Lifted) WidgetPathAppendForWidgetMethodInfo WidgetPath signature Source | |
widgetPathAppendForWidget :: (MonadIO m, WidgetK a) => WidgetPath -> a -> m Int32 Source
widgetPathAppendType
data WidgetPathAppendTypeMethodInfo Source
((~) (TYPE Lifted) signature (GType -> m Int32), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathAppendTypeMethodInfo WidgetPath signature Source | |
widgetPathAppendType :: MonadIO m => WidgetPath -> GType -> m Int32 Source
widgetPathAppendWithSiblings
data WidgetPathAppendWithSiblingsMethodInfo Source
((~) (TYPE Lifted) signature (WidgetPath -> Word32 -> m Int32), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathAppendWithSiblingsMethodInfo WidgetPath signature Source | |
widgetPathAppendWithSiblings :: MonadIO m => WidgetPath -> WidgetPath -> Word32 -> m Int32 Source
widgetPathCopy
data WidgetPathCopyMethodInfo Source
((~) (TYPE Lifted) signature (m WidgetPath), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathCopyMethodInfo WidgetPath signature Source | |
widgetPathCopy :: MonadIO m => WidgetPath -> m WidgetPath Source
widgetPathFree
data WidgetPathFreeMethodInfo Source
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathFreeMethodInfo WidgetPath signature Source | |
widgetPathFree :: MonadIO m => WidgetPath -> m () Source
widgetPathGetObjectType
data WidgetPathGetObjectTypeMethodInfo Source
((~) (TYPE Lifted) signature (m GType), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathGetObjectTypeMethodInfo WidgetPath signature Source | |
widgetPathGetObjectType :: MonadIO m => WidgetPath -> m GType Source
widgetPathHasParent
data WidgetPathHasParentMethodInfo Source
((~) (TYPE Lifted) signature (GType -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathHasParentMethodInfo WidgetPath signature Source | |
widgetPathHasParent :: MonadIO m => WidgetPath -> GType -> m Bool Source
widgetPathIsType
data WidgetPathIsTypeMethodInfo Source
((~) (TYPE Lifted) signature (GType -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIsTypeMethodInfo WidgetPath signature Source | |
widgetPathIsType :: MonadIO m => WidgetPath -> GType -> m Bool Source
widgetPathIterAddClass
data WidgetPathIterAddClassMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterAddClassMethodInfo WidgetPath signature Source | |
widgetPathIterAddClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source
widgetPathIterAddRegion
data WidgetPathIterAddRegionMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> [RegionFlags] -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterAddRegionMethodInfo WidgetPath signature Source | |
widgetPathIterAddRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> [RegionFlags] -> m () Source
Deprecated: (Since version 3.14)The use of regions is deprecated.
widgetPathIterClearClasses
data WidgetPathIterClearClassesMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterClearClassesMethodInfo WidgetPath signature Source | |
widgetPathIterClearClasses :: MonadIO m => WidgetPath -> Int32 -> m () Source
widgetPathIterClearRegions
data WidgetPathIterClearRegionsMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterClearRegionsMethodInfo WidgetPath signature Source | |
widgetPathIterClearRegions :: MonadIO m => WidgetPath -> Int32 -> m () Source
Deprecated: (Since version 3.14)The use of regions is deprecated.
widgetPathIterGetName
data WidgetPathIterGetNameMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m Text), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterGetNameMethodInfo WidgetPath signature Source | |
widgetPathIterGetName :: MonadIO m => WidgetPath -> Int32 -> m Text Source
widgetPathIterGetObjectType
data WidgetPathIterGetObjectTypeMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m GType), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterGetObjectTypeMethodInfo WidgetPath signature Source | |
widgetPathIterGetObjectType :: MonadIO m => WidgetPath -> Int32 -> m GType Source
widgetPathIterGetSiblingIndex
data WidgetPathIterGetSiblingIndexMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m Word32), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterGetSiblingIndexMethodInfo WidgetPath signature Source | |
widgetPathIterGetSiblingIndex :: MonadIO m => WidgetPath -> Int32 -> m Word32 Source
widgetPathIterGetSiblings
data WidgetPathIterGetSiblingsMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m WidgetPath), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterGetSiblingsMethodInfo WidgetPath signature Source | |
widgetPathIterGetSiblings :: MonadIO m => WidgetPath -> Int32 -> m WidgetPath Source
widgetPathIterGetState
data WidgetPathIterGetStateMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m [StateFlags]), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterGetStateMethodInfo WidgetPath signature Source | |
widgetPathIterGetState :: MonadIO m => WidgetPath -> Int32 -> m [StateFlags] Source
widgetPathIterHasClass
data WidgetPathIterHasClassMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterHasClassMethodInfo WidgetPath signature Source | |
widgetPathIterHasClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m Bool Source
widgetPathIterHasName
data WidgetPathIterHasNameMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterHasNameMethodInfo WidgetPath signature Source | |
widgetPathIterHasName :: MonadIO m => WidgetPath -> Int32 -> Text -> m Bool Source
widgetPathIterHasQclass
data WidgetPathIterHasQclassMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Word32 -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterHasQclassMethodInfo WidgetPath signature Source | |
widgetPathIterHasQclass :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m Bool Source
widgetPathIterHasQname
data WidgetPathIterHasQnameMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Word32 -> m Bool), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterHasQnameMethodInfo WidgetPath signature Source | |
widgetPathIterHasQname :: MonadIO m => WidgetPath -> Int32 -> Word32 -> m Bool Source
widgetPathIterHasQregion
data WidgetPathIterHasQregionMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Word32 -> m (Bool, [RegionFlags])), MonadIO m) => MethodInfo (TYPE Lifted) 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.
widgetPathIterHasRegion
data WidgetPathIterHasRegionMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> m (Bool, [RegionFlags])), MonadIO m) => MethodInfo (TYPE Lifted) 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.
widgetPathIterListClasses
data WidgetPathIterListClassesMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m [Text]), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterListClassesMethodInfo WidgetPath signature Source | |
widgetPathIterListClasses :: MonadIO m => WidgetPath -> Int32 -> m [Text] Source
widgetPathIterListRegions
data WidgetPathIterListRegionsMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> m [Text]), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterListRegionsMethodInfo WidgetPath signature Source | |
widgetPathIterListRegions :: MonadIO m => WidgetPath -> Int32 -> m [Text] Source
Deprecated: (Since version 3.14)The use of regions is deprecated.
widgetPathIterRemoveClass
data WidgetPathIterRemoveClassMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterRemoveClassMethodInfo WidgetPath signature Source | |
widgetPathIterRemoveClass :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source
widgetPathIterRemoveRegion
data WidgetPathIterRemoveRegionMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterRemoveRegionMethodInfo WidgetPath signature Source | |
widgetPathIterRemoveRegion :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source
Deprecated: (Since version 3.14)The use of regions is deprecated.
widgetPathIterSetName
data WidgetPathIterSetNameMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> Text -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterSetNameMethodInfo WidgetPath signature Source | |
widgetPathIterSetName :: MonadIO m => WidgetPath -> Int32 -> Text -> m () Source
widgetPathIterSetObjectType
data WidgetPathIterSetObjectTypeMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> GType -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterSetObjectTypeMethodInfo WidgetPath signature Source | |
widgetPathIterSetObjectType :: MonadIO m => WidgetPath -> Int32 -> GType -> m () Source
widgetPathIterSetState
data WidgetPathIterSetStateMethodInfo Source
((~) (TYPE Lifted) signature (Int32 -> [StateFlags] -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathIterSetStateMethodInfo WidgetPath signature Source | |
widgetPathIterSetState :: MonadIO m => WidgetPath -> Int32 -> [StateFlags] -> m () Source
widgetPathLength
data WidgetPathLengthMethodInfo Source
((~) (TYPE Lifted) signature (m Int32), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathLengthMethodInfo WidgetPath signature Source | |
widgetPathLength :: MonadIO m => WidgetPath -> m Int32 Source
widgetPathNew
widgetPathNew :: MonadIO m => m WidgetPath Source
widgetPathPrependType
data WidgetPathPrependTypeMethodInfo Source
((~) (TYPE Lifted) signature (GType -> m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathPrependTypeMethodInfo WidgetPath signature Source | |
widgetPathPrependType :: MonadIO m => WidgetPath -> GType -> m () Source
widgetPathRef
data WidgetPathRefMethodInfo Source
((~) (TYPE Lifted) signature (m WidgetPath), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathRefMethodInfo WidgetPath signature Source | |
widgetPathRef :: MonadIO m => WidgetPath -> m WidgetPath Source
widgetPathToString
data WidgetPathToStringMethodInfo Source
((~) (TYPE Lifted) signature (m Text), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathToStringMethodInfo WidgetPath signature Source | |
widgetPathToString :: MonadIO m => WidgetPath -> m Text Source
widgetPathUnref
data WidgetPathUnrefMethodInfo Source
((~) (TYPE Lifted) signature (m ()), MonadIO m) => MethodInfo (TYPE Lifted) WidgetPathUnrefMethodInfo WidgetPath signature Source | |
widgetPathUnref :: MonadIO m => WidgetPath -> m () Source