| 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 |
GI.Clutter.Objects.LayoutManager
Description
The LayoutManager structure contains only private data
and should be accessed using the provided API
Since: 1.2
Synopsis
- newtype LayoutManager = LayoutManager (ManagedPtr LayoutManager)
- class (GObject o, IsDescendantOf LayoutManager o) => IsLayoutManager o
- toLayoutManager :: (MonadIO m, IsLayoutManager o) => o -> m LayoutManager
- layoutManagerAllocate :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) => a -> b -> ActorBox -> [AllocationFlags] -> m ()
- layoutManagerBeginAnimation :: (HasCallStack, MonadIO m, IsLayoutManager a) => a -> Word32 -> CULong -> m Alpha
- layoutManagerChildGetProperty :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b, IsActor c) => a -> b -> c -> Text -> GValue -> m ()
- layoutManagerChildSetProperty :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b, IsActor c) => a -> b -> c -> Text -> GValue -> m ()
- layoutManagerEndAnimation :: (HasCallStack, MonadIO m, IsLayoutManager a) => a -> m ()
- layoutManagerFindChildProperty :: (HasCallStack, MonadIO m, IsLayoutManager a) => a -> Text -> m GParamSpec
- layoutManagerGetAnimationProgress :: (HasCallStack, MonadIO m, IsLayoutManager a) => a -> m Double
- layoutManagerGetChildMeta :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b, IsActor c) => a -> b -> c -> m LayoutMeta
- layoutManagerGetPreferredHeight :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) => a -> b -> Float -> m (Float, Float)
- layoutManagerGetPreferredWidth :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) => a -> b -> Float -> m (Float, Float)
- layoutManagerLayoutChanged :: (HasCallStack, MonadIO m, IsLayoutManager a) => a -> m ()
- layoutManagerSetContainer :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) => a -> Maybe b -> m ()
- type LayoutManagerLayoutChangedCallback = IO ()
- afterLayoutManagerLayoutChanged :: (IsLayoutManager a, MonadIO m) => a -> ((?self :: a) => LayoutManagerLayoutChangedCallback) -> m SignalHandlerId
- onLayoutManagerLayoutChanged :: (IsLayoutManager a, MonadIO m) => a -> ((?self :: a) => LayoutManagerLayoutChangedCallback) -> m SignalHandlerId
Exported types
newtype LayoutManager Source #
Memory-managed wrapper type.
Constructors
| LayoutManager (ManagedPtr LayoutManager) |
Instances
| Eq LayoutManager Source # | |
Defined in GI.Clutter.Objects.LayoutManager Methods (==) :: LayoutManager -> LayoutManager -> Bool # (/=) :: LayoutManager -> LayoutManager -> Bool # | |
| GObject LayoutManager Source # | |
Defined in GI.Clutter.Objects.LayoutManager | |
| ManagedPtrNewtype LayoutManager Source # | |
Defined in GI.Clutter.Objects.LayoutManager Methods toManagedPtr :: LayoutManager -> ManagedPtr LayoutManager | |
| TypedObject LayoutManager Source # | |
Defined in GI.Clutter.Objects.LayoutManager | |
| HasParentTypes LayoutManager Source # | |
Defined in GI.Clutter.Objects.LayoutManager | |
| IsGValue (Maybe LayoutManager) Source # | Convert |
Defined in GI.Clutter.Objects.LayoutManager Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe LayoutManager -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe LayoutManager) | |
| type ParentTypes LayoutManager Source # | |
Defined in GI.Clutter.Objects.LayoutManager type ParentTypes LayoutManager = '[Object] | |
class (GObject o, IsDescendantOf LayoutManager o) => IsLayoutManager o Source #
Type class for types which can be safely cast to LayoutManager, for instance with toLayoutManager.
Instances
| (GObject o, IsDescendantOf LayoutManager o) => IsLayoutManager o Source # | |
Defined in GI.Clutter.Objects.LayoutManager | |
toLayoutManager :: (MonadIO m, IsLayoutManager o) => o -> m LayoutManager Source #
Cast to LayoutManager, for types for which this is known to be safe. For general casts, use castTo.
Methods
Click to display all available methods, including inherited ones
Methods
allocate, beginAnimation, bindProperty, bindPropertyFull, childGetProperty, childSetProperty, endAnimation, findChildProperty, forceFloating, freezeNotify, getv, isFloating, layoutChanged, listChildProperties, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAnimationProgress, getChildMeta, getData, getPreferredHeight, getPreferredWidth, getProperty, getQdata.
Setters
allocate
layoutManagerAllocate Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) | |
| => a |
|
| -> b |
|
| -> ActorBox |
|
| -> [AllocationFlags] |
|
| -> m () |
beginAnimation
layoutManagerBeginAnimation Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a) | |
| => a |
|
| -> Word32 |
|
| -> CULong |
|
| -> m Alpha | Returns: The |
Deprecated: (Since version 1.12)
Begins an animation of duration milliseconds, using the provided
easing mode
The easing mode can be specified either as a AnimationMode
or as a logical id returned by clutter_alpha_register_func()
The result of this function depends on the manager implementation
Since: 1.2
childGetProperty
layoutManagerChildGetProperty Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b, IsActor c) | |
| => a |
|
| -> b |
|
| -> c |
|
| -> Text |
|
| -> GValue |
|
| -> m () |
Gets a property on the LayoutMeta created by manager and
attached to a child of container
The Value must already be initialized to the type of the property
and has to be unset with valueUnset after extracting the real
value out of it
Since: 1.2
childSetProperty
layoutManagerChildSetProperty Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b, IsActor c) | |
| => a |
|
| -> b |
|
| -> c |
|
| -> Text |
|
| -> GValue |
|
| -> m () |
Sets a property on the LayoutMeta created by manager and
attached to a child of container
Since: 1.2
endAnimation
layoutManagerEndAnimation Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a) | |
| => a |
|
| -> m () |
Deprecated: (Since version 1.12)
Ends an animation started by layoutManagerBeginAnimation
The result of this call depends on the manager implementation
Since: 1.2
findChildProperty
layoutManagerFindChildProperty Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a) | |
| => a |
|
| -> Text |
|
| -> m GParamSpec | Returns: a |
Retrieves the ParamSpec for the layout property name inside
the LayoutMeta sub-class used by manager
Since: 1.2
getAnimationProgress
layoutManagerGetAnimationProgress Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a) | |
| => a |
|
| -> m Double | Returns: the progress of the animation |
Deprecated: (Since version 1.12)
Retrieves the progress of the animation, if one has been started by
layoutManagerBeginAnimation
The returned value has the same semantics of the Alpha:alpha value
Since: 1.2
getChildMeta
layoutManagerGetChildMeta Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b, IsActor c) | |
| => a |
|
| -> b |
|
| -> c |
|
| -> m LayoutMeta | Returns: a |
Retrieves the LayoutMeta that the layout manager associated
to the actor child of container, eventually by creating one if the
LayoutManager supports layout properties
Since: 1.0
getPreferredHeight
layoutManagerGetPreferredHeight Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) | |
| => a |
|
| -> b |
|
| -> Float |
|
| -> m (Float, Float) |
Computes the minimum and natural heights of the container according
to manager.
See also actorGetPreferredHeight
Since: 1.2
getPreferredWidth
layoutManagerGetPreferredWidth Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) | |
| => a |
|
| -> b |
|
| -> Float |
|
| -> m (Float, Float) |
Computes the minimum and natural widths of the container according
to manager.
See also actorGetPreferredWidth
Since: 1.2
layoutChanged
layoutManagerLayoutChanged Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a) | |
| => a |
|
| -> m () |
Emits the LayoutManager::layoutChanged signal on manager
This function should only be called by implementations of the
LayoutManager class
Since: 1.2
setContainer
layoutManagerSetContainer Source #
Arguments
| :: (HasCallStack, MonadIO m, IsLayoutManager a, IsContainer b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
If the LayoutManager sub-class allows it, allow
adding a weak reference of the container using manager
from within the layout manager
The layout manager should not increase the reference
count of the container
Since: 1.2
Signals
layoutChanged
type LayoutManagerLayoutChangedCallback = IO () Source #
The layoutChanged signal is emitted each time a layout manager
has been changed. Every Actor using the manager instance
as a layout manager should connect a handler to the layoutChanged
signal and queue a relayout on themselves:
static void layout_changed (ClutterLayoutManager *manager,
ClutterActor *self)
{
clutter_actor_queue_relayout (self);
}
...
self->manager = g_object_ref_sink (manager);
g_signal_connect (self->manager, "layout-changed",
G_CALLBACK (layout_changed),
self);Sub-classes of LayoutManager that implement a layout that
can be controlled or changed using parameters should emit the
layoutChanged signal whenever one of the parameters changes,
by using layoutManagerLayoutChanged.
Since: 1.2
afterLayoutManagerLayoutChanged :: (IsLayoutManager a, MonadIO m) => a -> ((?self :: a) => LayoutManagerLayoutChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the layoutChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after layoutManager #layoutChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onLayoutManagerLayoutChanged :: (IsLayoutManager a, MonadIO m) => a -> ((?self :: a) => LayoutManagerLayoutChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the layoutChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on layoutManager #layoutChanged callback