gi-clutter-1.0.3: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.Effect

Description

The Effect structure contains only private data and should be accessed using the provided API

Since: 1.4

Synopsis

Exported types

newtype Effect Source #

Memory-managed wrapper type.

Constructors

Effect (ManagedPtr Effect) 

Instances

Instances details
Eq Effect Source # 
Instance details

Defined in GI.Clutter.Objects.Effect

Methods

(==) :: Effect -> Effect -> Bool #

(/=) :: Effect -> Effect -> Bool #

GObject Effect Source # 
Instance details

Defined in GI.Clutter.Objects.Effect

ManagedPtrNewtype Effect Source # 
Instance details

Defined in GI.Clutter.Objects.Effect

Methods

toManagedPtr :: Effect -> ManagedPtr Effect

TypedObject Effect Source # 
Instance details

Defined in GI.Clutter.Objects.Effect

Methods

glibType :: IO GType

HasParentTypes Effect Source # 
Instance details

Defined in GI.Clutter.Objects.Effect

IsGValue (Maybe Effect) Source #

Convert Effect to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Objects.Effect

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Effect -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Effect)

type ParentTypes Effect Source # 
Instance details

Defined in GI.Clutter.Objects.Effect

type ParentTypes Effect = '[ActorMeta, Object]

class (GObject o, IsDescendantOf Effect o) => IsEffect o Source #

Type class for types which can be safely cast to Effect, for instance with toEffect.

Instances

Instances details
(GObject o, IsDescendantOf Effect o) => IsEffect o Source # 
Instance details

Defined in GI.Clutter.Objects.Effect

toEffect :: (MonadIO m, IsEffect o) => o -> m Effect Source #

Cast to Effect, for types for which this is known to be safe. For general casts, use castTo.

Methods

queueRepaint

effectQueueRepaint Source #

Arguments

:: (HasCallStack, MonadIO m, IsEffect a) 
=> a

effect: A Effect which needs redrawing

-> m () 

Queues a repaint of the effect. The effect can detect when the ‘paint’ method is called as a result of this function because it will not have the EffectPaintFlagsActorDirty flag set. In that case the effect is free to assume that the actor has not changed its appearance since the last time it was painted so it doesn't need to call actorContinuePaint if it can draw a cached image. This is mostly intended for effects that are using a CoglOffscreen to redirect the actor (such as ClutterOffscreenEffect). In that case the effect can save a bit of rendering time by painting the cached texture without causing the entire actor to be painted.

This function can be used by effects that have their own animatable parameters. For example, an effect which adds a varying degree of a red tint to an actor by redirecting it through a CoglOffscreen might have a property to specify the level of tint. When this value changes, the underlying actor doesn't need to be redrawn so the effect can call effectQueueRepaint to make sure the effect is repainted.

Note however that modifying the position of the parent of an actor may change the appearance of the actor because its transformation matrix would change. In this case a redraw wouldn't be queued on the actor itself so the EffectPaintFlagsActorDirty would still not be set. The effect can detect this case by keeping track of the last modelview matrix that was used to render the actor and veryifying that it remains the same in the next paint.

Any other effects that are layered on top of the passed in effect will still be passed the EffectPaintFlagsActorDirty flag. If anything queues a redraw on the actor without specifying an effect or with an effect that is lower in the chain of effects than this one then that will override this call. In that case this effect will instead be called with the EffectPaintFlagsActorDirty flag set.

Since: 1.8