Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Base interface for container specific state for child actors. A child data is meant to be used when you need to keep track of information about each individual child added to a container.
In order to use it you should create your own subclass of
ChildMeta
and set the ContainerIface
child_meta_type
interface member to your subclass type, like:
static void my_container_iface_init (ClutterContainerIface *iface) { // set the rest of the #ClutterContainer vtable container_iface->child_meta_type = MY_TYPE_CHILD_META; }
This will automatically create a ChildMeta
of type
MY_TYPE_CHILD_META
for every actor that is added to the container.
The child data for an actor can be retrieved using the
containerGetChildMeta
function.
The properties of the data and your subclass can be manipulated with
clutter_container_child_set()
and clutter_container_child_get()
which
act like g_object_set()
and g_object_get()
.
You can provide hooks for your own storage as well as control the
instantiation by overriding the ContainerIface
virtual functions
ContainerIface
.create_child_meta
(), ContainerIface
.destroy_child_meta
(),
and ContainerIface
.get_child_meta
().
Since: 0.8
Synopsis
- newtype ChildMeta = ChildMeta (ManagedPtr ChildMeta)
- class (GObject o, IsDescendantOf ChildMeta o) => IsChildMeta o
- toChildMeta :: (MonadIO m, IsChildMeta o) => o -> m ChildMeta
- childMetaGetActor :: (HasCallStack, MonadIO m, IsChildMeta a) => a -> m Actor
- childMetaGetContainer :: (HasCallStack, MonadIO m, IsChildMeta a) => a -> m Container
- constructChildMetaActor :: (IsChildMeta o, MonadIO m, IsActor a) => a -> m (GValueConstruct o)
- getChildMetaActor :: (MonadIO m, IsChildMeta o) => o -> m Actor
- constructChildMetaContainer :: (IsChildMeta o, MonadIO m, IsContainer a) => a -> m (GValueConstruct o)
- getChildMetaContainer :: (MonadIO m, IsChildMeta o) => o -> m Container
Exported types
Memory-managed wrapper type.
Instances
Eq ChildMeta Source # | |
GObject ChildMeta Source # | |
Defined in GI.Clutter.Objects.ChildMeta | |
ManagedPtrNewtype ChildMeta Source # | |
Defined in GI.Clutter.Objects.ChildMeta | |
TypedObject ChildMeta Source # | |
Defined in GI.Clutter.Objects.ChildMeta | |
HasParentTypes ChildMeta Source # | |
Defined in GI.Clutter.Objects.ChildMeta | |
IsGValue (Maybe ChildMeta) Source # | Convert |
Defined in GI.Clutter.Objects.ChildMeta | |
type ParentTypes ChildMeta Source # | |
Defined in GI.Clutter.Objects.ChildMeta |
class (GObject o, IsDescendantOf ChildMeta o) => IsChildMeta o Source #
Type class for types which can be safely cast to ChildMeta
, for instance with toChildMeta
.
Instances
(GObject o, IsDescendantOf ChildMeta o) => IsChildMeta o Source # | |
Defined in GI.Clutter.Objects.ChildMeta |
toChildMeta :: (MonadIO m, IsChildMeta o) => o -> m ChildMeta Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getActor, getContainer, getData, getProperty, getQdata.
Setters
getActor
:: (HasCallStack, MonadIO m, IsChildMeta a) | |
=> a |
|
-> m Actor | Returns: a |
Retrieves the actor wrapped by data
Since: 0.8
getContainer
childMetaGetContainer Source #
:: (HasCallStack, MonadIO m, IsChildMeta a) | |
=> a |
|
-> m Container | Returns: a |
Retrieves the container using data
Since: 0.8
Properties
actor
constructChildMetaActor :: (IsChildMeta o, MonadIO m, IsActor a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “actor
” property. This is rarely needed directly, but it is used by new
.
getChildMetaActor :: (MonadIO m, IsChildMeta o) => o -> m Actor Source #
Get the value of the “actor
” property.
When overloading is enabled, this is equivalent to
get
childMeta #actor
container
constructChildMetaContainer :: (IsChildMeta o, MonadIO m, IsContainer a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “container
” property. This is rarely needed directly, but it is used by new
.
getChildMetaContainer :: (MonadIO m, IsChildMeta o) => o -> m Container Source #
Get the value of the “container
” property.
When overloading is enabled, this is equivalent to
get
childMeta #container