Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal helpers for applying attributes and signal handlers to GTK+ widgets.
Synopsis
- type CollectedProperties widget = HashMap Text (CollectedProperty widget)
- data Collected widget event = Collected {}
- canBeModifiedTo :: CollectedProperties widget -> CollectedProperties widget -> Bool
- collectAttributes :: Vector (Attribute widget event) -> Collected widget event
- constructProperties :: Collected widget event -> [AttrOp widget AttrConstruct]
- updateProperties :: widget -> CollectedProperties widget -> CollectedProperties widget -> IO ()
- updateClasses :: StyleContext -> ClassSet -> ClassSet -> IO ()
Documentation
type CollectedProperties widget = HashMap Text (CollectedProperty widget) Source #
A collected map of key/value pairs, where the type-level property
names are represented as ErrorMessage
values. This is used to calculate
differences in old and new property sets when patching.
data Collected widget event Source #
All the collected properties and classes for a widget. These are based
on the Attribute
list in the declarative markup, but collected separately
into more efficient data structures, optimized for patching.
canBeModifiedTo :: CollectedProperties widget -> CollectedProperties widget -> Bool Source #
Checks if the old
collected properties are a subset of the new
ones,
and thus if a widget thus be updated or if it has to be recreated.
collectAttributes :: Vector (Attribute widget event) -> Collected widget event Source #
Collect declarative markup attributes to the patching-optimized
Collected
data structure.
constructProperties :: Collected widget event -> [AttrOp widget AttrConstruct] Source #
Create a list of GTK construct operations based on collected properties, used when creating new widgets.
updateProperties :: widget -> CollectedProperties widget -> CollectedProperties widget -> IO () Source #
Update the changed properties of a widget, based on the old and new collected properties.
updateClasses :: StyleContext -> ClassSet -> ClassSet -> IO () Source #
Update the style context's classes to only include the new set of classes (last argument).