| 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.Stage
Contents
- Exported types
- Methods
- ensureCurrent
- ensureRedraw
- ensureViewport
- event
- getAcceptFocus
- getActorAtPos
- getColor
- getDefault
- getFog
- getFullscreen
- getKeyFocus
- getMinimumSize
- getMotionEventsEnabled
- getNoClearHint
- getPerspective
- getRedrawClipBounds
- getThrottleMotionEvents
- getTitle
- getUseAlpha
- getUseFog
- getUserResizable
- hideCursor
- isDefault
- new
- queueRedraw
- setAcceptFocus
- setColor
- setFog
- setFullscreen
- setKeyFocus
- setMinimumSize
- setMotionEventsEnabled
- setNoClearHint
- setPerspective
- setThrottleMotionEvents
- setTitle
- setUseAlpha
- setUseFog
- setUserResizable
- showCursor
- Properties
- Signals
Description
The Stage structure contains only private data
and should be accessed using the provided API
Since: 0.2
Synopsis
- newtype Stage = Stage (ManagedPtr Stage)
- class (GObject o, IsDescendantOf Stage o) => IsStage o
- toStage :: (MonadIO m, IsStage o) => o -> m Stage
- stageEnsureCurrent :: (HasCallStack, MonadIO m, IsStage a) => a -> m ()
- stageEnsureRedraw :: (HasCallStack, MonadIO m, IsStage a) => a -> m ()
- stageEnsureViewport :: (HasCallStack, MonadIO m, IsStage a) => a -> m ()
- stageEvent :: (HasCallStack, MonadIO m, IsStage a) => a -> Event -> m Bool
- stageGetAcceptFocus :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageGetActorAtPos :: (HasCallStack, MonadIO m, IsStage a) => a -> PickMode -> Int32 -> Int32 -> m Actor
- stageGetColor :: (HasCallStack, MonadIO m, IsStage a) => a -> m Color
- stageGetDefault :: (HasCallStack, MonadIO m) => m Stage
- stageGetFog :: (HasCallStack, MonadIO m, IsStage a) => a -> m Fog
- stageGetFullscreen :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageGetKeyFocus :: (HasCallStack, MonadIO m, IsStage a) => a -> m Actor
- stageGetMinimumSize :: (HasCallStack, MonadIO m, IsStage a) => a -> m (Word32, Word32)
- stageGetMotionEventsEnabled :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageGetNoClearHint :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageGetPerspective :: (HasCallStack, MonadIO m, IsStage a) => a -> m Perspective
- stageGetRedrawClipBounds :: (HasCallStack, MonadIO m, IsStage a) => a -> m RectangleInt
- stageGetThrottleMotionEvents :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageGetTitle :: (HasCallStack, MonadIO m, IsStage a) => a -> m Text
- stageGetUseAlpha :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageGetUseFog :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageGetUserResizable :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageHideCursor :: (HasCallStack, MonadIO m, IsStage a) => a -> m ()
- stageIsDefault :: (HasCallStack, MonadIO m, IsStage a) => a -> m Bool
- stageNew :: (HasCallStack, MonadIO m) => m Stage
- stageQueueRedraw :: (HasCallStack, MonadIO m, IsStage a) => a -> m ()
- stageSetAcceptFocus :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageSetColor :: (HasCallStack, MonadIO m, IsStage a) => a -> Color -> m ()
- stageSetFog :: (HasCallStack, MonadIO m, IsStage a) => a -> Fog -> m ()
- stageSetFullscreen :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageSetKeyFocus :: (HasCallStack, MonadIO m, IsStage a, IsActor b) => a -> Maybe b -> m ()
- stageSetMinimumSize :: (HasCallStack, MonadIO m, IsStage a) => a -> Word32 -> Word32 -> m ()
- stageSetMotionEventsEnabled :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageSetNoClearHint :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageSetPerspective :: (HasCallStack, MonadIO m, IsStage a) => a -> Perspective -> m ()
- stageSetThrottleMotionEvents :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageSetTitle :: (HasCallStack, MonadIO m, IsStage a) => a -> Text -> m ()
- stageSetUseAlpha :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageSetUseFog :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageSetUserResizable :: (HasCallStack, MonadIO m, IsStage a) => a -> Bool -> m ()
- stageShowCursor :: (HasCallStack, MonadIO m, IsStage a) => a -> m ()
- constructStageAcceptFocus :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStageAcceptFocus :: (MonadIO m, IsStage o) => o -> m Bool
- setStageAcceptFocus :: (MonadIO m, IsStage o) => o -> Bool -> m ()
- constructStageColor :: (IsStage o, MonadIO m) => Color -> m (GValueConstruct o)
- getStageColor :: (MonadIO m, IsStage o) => o -> m (Maybe Color)
- setStageColor :: (MonadIO m, IsStage o) => o -> Color -> m ()
- constructStageCursorVisible :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStageCursorVisible :: (MonadIO m, IsStage o) => o -> m Bool
- setStageCursorVisible :: (MonadIO m, IsStage o) => o -> Bool -> m ()
- constructStageFog :: (IsStage o, MonadIO m) => Fog -> m (GValueConstruct o)
- getStageFog :: (MonadIO m, IsStage o) => o -> m (Maybe Fog)
- setStageFog :: (MonadIO m, IsStage o) => o -> Fog -> m ()
- getStageFullscreenSet :: (MonadIO m, IsStage o) => o -> m Bool
- clearStageKeyFocus :: (MonadIO m, IsStage o) => o -> m ()
- constructStageKeyFocus :: (IsStage o, MonadIO m, IsActor a) => a -> m (GValueConstruct o)
- getStageKeyFocus :: (MonadIO m, IsStage o) => o -> m Actor
- setStageKeyFocus :: (MonadIO m, IsStage o, IsActor a) => o -> a -> m ()
- constructStageNoClearHint :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStageNoClearHint :: (MonadIO m, IsStage o) => o -> m Bool
- setStageNoClearHint :: (MonadIO m, IsStage o) => o -> Bool -> m ()
- constructStageOffscreen :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStageOffscreen :: (MonadIO m, IsStage o) => o -> m Bool
- setStageOffscreen :: (MonadIO m, IsStage o) => o -> Bool -> m ()
- constructStagePerspective :: (IsStage o, MonadIO m) => Perspective -> m (GValueConstruct o)
- getStagePerspective :: (MonadIO m, IsStage o) => o -> m (Maybe Perspective)
- setStagePerspective :: (MonadIO m, IsStage o) => o -> Perspective -> m ()
- constructStageTitle :: (IsStage o, MonadIO m) => Text -> m (GValueConstruct o)
- getStageTitle :: (MonadIO m, IsStage o) => o -> m Text
- setStageTitle :: (MonadIO m, IsStage o) => o -> Text -> m ()
- constructStageUseAlpha :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStageUseAlpha :: (MonadIO m, IsStage o) => o -> m Bool
- setStageUseAlpha :: (MonadIO m, IsStage o) => o -> Bool -> m ()
- constructStageUseFog :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStageUseFog :: (MonadIO m, IsStage o) => o -> m Bool
- setStageUseFog :: (MonadIO m, IsStage o) => o -> Bool -> m ()
- constructStageUserResizable :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStageUserResizable :: (MonadIO m, IsStage o) => o -> m Bool
- setStageUserResizable :: (MonadIO m, IsStage o) => o -> Bool -> m ()
- type StageActivateCallback = IO ()
- afterStageActivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageActivateCallback) -> m SignalHandlerId
- onStageActivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageActivateCallback) -> m SignalHandlerId
- type StageAfterPaintCallback = IO ()
- afterStageAfterPaint :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageAfterPaintCallback) -> m SignalHandlerId
- onStageAfterPaint :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageAfterPaintCallback) -> m SignalHandlerId
- type StageDeactivateCallback = IO ()
- afterStageDeactivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeactivateCallback) -> m SignalHandlerId
- onStageDeactivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeactivateCallback) -> m SignalHandlerId
- type StageDeleteEventCallback = Event -> IO Bool
- afterStageDeleteEvent :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeleteEventCallback) -> m SignalHandlerId
- onStageDeleteEvent :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeleteEventCallback) -> m SignalHandlerId
- type StageFullscreenCallback = IO ()
- afterStageFullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageFullscreenCallback) -> m SignalHandlerId
- onStageFullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageFullscreenCallback) -> m SignalHandlerId
- type StageUnfullscreenCallback = IO ()
- afterStageUnfullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageUnfullscreenCallback) -> m SignalHandlerId
- onStageUnfullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageUnfullscreenCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
| Eq Stage Source # | |
| GObject Stage Source # | |
Defined in GI.Clutter.Objects.Stage | |
| ManagedPtrNewtype Stage Source # | |
Defined in GI.Clutter.Objects.Stage Methods toManagedPtr :: Stage -> ManagedPtr Stage | |
| TypedObject Stage Source # | |
Defined in GI.Clutter.Objects.Stage | |
| HasParentTypes Stage Source # | |
Defined in GI.Clutter.Objects.Stage | |
| IsGValue (Maybe Stage) Source # | Convert |
Defined in GI.Clutter.Objects.Stage Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Stage -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Stage) | |
| type ParentTypes Stage Source # | |
Defined in GI.Clutter.Objects.Stage type ParentTypes Stage = '[Group, Actor, Object, ImplementorIface, Animatable, Container, Scriptable] | |
class (GObject o, IsDescendantOf Stage o) => IsStage o Source #
Instances
| (GObject o, IsDescendantOf Stage o) => IsStage o Source # | |
Defined in GI.Clutter.Objects.Stage | |
Methods
Click to display all available methods, including inherited ones
Methods
addAction, addActionWithName, addActor, addChild, addConstraint, addConstraintWithName, addEffect, addEffectWithName, addTransition, allocate, allocateAlignFill, allocateAvailableSize, allocatePreferredSize, animateProperty, animateWithAlphav, animateWithTimelinev, animatev, applyRelativeTransformToPoint, applyTransformToPoint, bindModel, bindProperty, bindPropertyFull, childGetProperty, childNotify, childSetProperty, clearActions, clearConstraints, clearEffects, contains, continuePaint, createChildMeta, createPangoContext, createPangoLayout, destroy, destroyAllChildren, destroyChildMeta, detachAnimation, ensureCurrent, ensureRedraw, ensureViewport, event, findChildByName, findProperty, forceFloating, foreach, foreachWithInternals, freezeNotify, getv, grabKeyFocus, hasActions, hasAllocation, hasClip, hasConstraints, hasEffects, hasKeyFocus, hasOverlaps, hasPointer, hide, hideAll, hideCursor, insertChildAbove, insertChildAtIndex, insertChildBelow, interpolateValue, isDefault, isFloating, isInClonePaint, isMapped, isRealized, isRotated, isScaled, isVisible, lower, lowerBottom, lowerChild, map, moveAnchorPoint, moveAnchorPointFromGravity, moveBy, needsExpand, notify, notifyByPspec, paint, parseCustomNode, popInternal, pushInternal, queueRedraw, queueRedrawWithClip, queueRelayout, raise, raiseChild, raiseTop, readPixels, realize, ref, refSink, removeAction, removeActionByName, removeActor, removeAll, removeAllChildren, removeAllTransitions, removeChild, removeClip, removeConstraint, removeConstraintByName, removeEffect, removeEffectByName, removeTransition, reparent, replaceChild, restoreEasingState, runDispose, saveEasingState, shouldPickPaint, show, showAll, showCursor, sortDepthOrder, stealData, stealQdata, thawNotify, transformStagePoint, unmap, unparent, unrealize, unref, unsetFlags, watchClosure.
Getters
getAbsAllocationVertices, getAcceptFocus, getAccessible, getAction, getActions, getActorAtPos, getAllocationBox, getAllocationGeometry, getAllocationVertices, getAnchorPoint, getAnchorPointGravity, getAnimation, getBackgroundColor, getChildAtIndex, getChildMeta, getChildTransform, getChildren, getClip, getClipToAllocation, getColor, getConstraint, getConstraints, getContent, getContentBox, getContentGravity, getContentRepeat, getContentScalingFilters, getData, getDefaultPaintVolume, getDepth, getEasingDelay, getEasingDuration, getEasingMode, getEffect, getEffects, getFirstChild, getFixedPositionSet, getFlags, getFog, getFullscreen, getGeometry, getGid, getHeight, getId, getInitialState, getKeyFocus, getLastChild, getLayoutManager, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMinimumSize, getMotionEventsEnabled, getNChildren, getName, getNextSibling, getNoClearHint, getNthChild, getOffscreenRedirect, getOpacity, getPaintBox, getPaintOpacity, getPaintVisibility, getPaintVolume, getPangoContext, getParent, getPerspective, getPivotPoint, getPivotPointZ, getPosition, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreviousSibling, getProperty, getQdata, getReactive, getRedrawClipBounds, getRequestMode, getRotation, getRotationAngle, getScale, getScaleCenter, getScaleGravity, getScaleZ, getShader, getSize, getStage, getTextDirection, getThrottleMotionEvents, getTitle, getTransform, getTransformationMatrix, getTransformedPaintVolume, getTransformedPosition, getTransformedSize, getTransition, getTranslation, getUseAlpha, getUseFog, getUserResizable, getWidth, getX, getXAlign, getXExpand, getY, getYAlign, getYExpand, getZPosition, getZRotationGravity.
Setters
setAcceptFocus, setAllocation, setAnchorPoint, setAnchorPointFromGravity, setBackgroundColor, setChildAboveSibling, setChildAtIndex, setChildBelowSibling, setChildTransform, setClip, setClipToAllocation, setColor, setContent, setContentGravity, setContentRepeat, setContentScalingFilters, setCustomProperty, setData, setDataFull, setDepth, setEasingDelay, setEasingDuration, setEasingMode, setFinalState, setFixedPositionSet, setFlags, setFog, setFullscreen, setGeometry, setHeight, setId, setKeyFocus, setLayoutManager, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMinimumSize, setMotionEventsEnabled, setName, setNoClearHint, setOffscreenRedirect, setOpacity, setParent, setPerspective, setPivotPoint, setPivotPointZ, setPosition, setProperty, setReactive, setRequestMode, setRotation, setRotationAngle, setScale, setScaleFull, setScaleWithGravity, setScaleZ, setShader, setShaderParam, setShaderParamFloat, setShaderParamInt, setSize, setTextDirection, setThrottleMotionEvents, setTitle, setTransform, setTranslation, setUseAlpha, setUseFog, setUserResizable, setWidth, setX, setXAlign, setXExpand, setY, setYAlign, setYExpand, setZPosition, setZRotationFromGravity.
ensureCurrent
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m () |
This function essentially makes sure the right GL context is current for the passed stage. It is not intended to be used by applications.
Since: 0.8
ensureRedraw
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m () |
Ensures that stage is redrawn
This function should not be called by applications: it is
used when embedding a Stage into a toolkit with
another windowing system, like GTK+.
Since: 1.0
ensureViewport
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m () |
Ensures that the GL viewport is updated with the current stage window size.
This function will queue a redraw of stage.
This function should not be called by applications; it is used
when embedding a Stage into a toolkit with another
windowing system, like GTK+.
Since: 1.0
event
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Event |
|
| -> m Bool | Returns: the return value from the signal emission |
This function is used to emit an event on the main stage.
You should rarely need to use this function, except for synthetised events.
Since: 0.4
getAcceptFocus
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves the value set with stageSetAcceptFocus.
Since: 1.6
getActorAtPos
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> PickMode |
|
| -> Int32 |
|
| -> Int32 |
|
| -> m Actor | Returns: the actor at the specified coordinates, if any |
Checks the scene at the coordinates x and y and returns a pointer
to the Actor at those coordinates.
By using pickMode it is possible to control which actors will be
painted and thus available.
getColor
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Color |
Deprecated: (Since version 1.10)Use actorGetBackgroundColor instead.
Retrieves the stage color.
getDefault
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Stage | Returns: the main
|
Deprecated: (Since version 1.10)Use stageNew instead.
Retrieves a Stage singleton.
This function is not as useful as it sounds, and will most likely
by deprecated in the future. Application code should only create
a Stage instance using stageNew, and manage the
lifetime of the stage manually.
The default stage singleton has a platform-specific behaviour: on
platforms without the FeatureFlagsStageMultiple feature flag
set, the first Stage instance will also be set to be the
default stage instance, and this function will always return a
pointer to it.
On platforms with the FeatureFlagsStageMultiple feature flag
set, the default stage will be created by the first call to this
function, and every following call will return the same pointer to
it.
getFog
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Fog |
Deprecated: (Since version 1.10)This function will always return the default values of Fog
Retrieves the current depth cueing settings from the stage.
Since: 0.6
getFullscreen
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves whether the stage is full screen or not
Since: 1.0
getKeyFocus
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Actor | Returns: the actor with key focus, or the stage |
Retrieves the actor that is currently under key focus.
Since: 0.6
getMinimumSize
Retrieves the minimum size for a stage window as set using
stageSetMinimumSize.
The returned size may not correspond to the actual minimum size and
it is specific to the Stage implementation inside the
Clutter backend
Since: 1.2
getMotionEventsEnabled
stageGetMotionEventsEnabled Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves the value set using stageSetMotionEventsEnabled.
Since: 1.8
getNoClearHint
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves the hint set with stageSetNoClearHint
Since: 1.4
getPerspective
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Perspective |
Retrieves the stage perspective.
getRedrawClipBounds
stageGetRedrawClipBounds Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m RectangleInt |
Gets the bounds of the current redraw for stage in stage pixel
coordinates. E.g., if only a single actor has queued a redraw then
Clutter may redraw the stage with a clip so that it doesn't have to
paint every pixel in the stage. This function would then return the
bounds of that clip. An application can use this information to
avoid some extra work if it knows that some regions of the stage
aren't going to be painted. This should only be called while the
stage is being painted. If there is no current redraw clip then
this function will set clip to the full extents of the stage.
Since: 1.8
getThrottleMotionEvents
stageGetThrottleMotionEvents Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves the value set with stageSetThrottleMotionEvents
Since: 1.0
getTitle
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Text | Returns: pointer to the title string for the stage. The returned string is owned by the actor and should not be modified or freed. |
Gets the stage title.
Since: 0.4
getUseAlpha
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves the value set using stageSetUseAlpha
Since: 1.2
getUseFog
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Deprecated: (Since version 1.10)This function will always return False
Gets whether the depth cueing effect is enabled on stage.
Since: 0.6
getUserResizable
stageGetUserResizable Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Retrieves the value set with stageSetUserResizable.
Since: 0.4
hideCursor
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m () |
Makes the cursor invisible on the stage window
Since: 0.4
isDefault
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m Bool | Returns: |
Deprecated: (Since version 1.10)Track the stage pointer inside your application code, or use actorGetStage to retrieve the stage for a given actor.
Checks if stage is the default stage, or an instance created using
stageNew but internally using the same implementation.
Since: 0.8
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Stage | Returns: a new stage, or |
Creates a new, non-default stage. A non-default stage is a new
top-level actor which can be used as another container. It works
exactly like the default stage, but while stageGetDefault
will always return the same instance, you will have to keep a pointer
to any Stage returned by stageNew.
The ability to support multiple stages depends on the current
backend. Use featureAvailable and
FeatureFlagsStageMultiple to check at runtime whether a
backend supports multiple stages.
Since: 0.8
queueRedraw
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m () |
Deprecated: (Since version 1.10)Use actorQueueRedraw instead.
Queues a redraw for the passed stage.
Applications should call actorQueueRedraw and not
this function.
Since: 0.8
setAcceptFocus
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the stage should accept the key focus when shown.
This function should be called before showing stage using
actorShow.
Since: 1.6
setColor
Deprecated: (Since version 1.10)Use actorSetBackgroundColor instead.
Sets the stage color.
setFog
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Fog |
|
| -> m () |
Deprecated: (Since version 1.10)Fog settings are ignored.
Sets the fog (also known as "depth cueing") settings for the stage.
A Stage will only use a linear fog progression, which
depends solely on the distance from the viewer. The setFog
function in COGL exposes more of the underlying implementation,
and allows changing the for progression function. It can be directly
used by disabling the Stage:useFog property and connecting
a signal handler to the Actor::paint signal on the stage,
like:
clutter_stage_set_use_fog (stage, FALSE); g_signal_connect (stage, "paint", G_CALLBACK (on_stage_paint), NULL);
The paint signal handler will call setFog with the
desired settings:
static void
on_stage_paint (ClutterActor *actor)
{
ClutterColor stage_color = { 0, };
CoglColor fog_color = { 0, };
// set the fog color to the stage background color
clutter_stage_get_color (CLUTTER_STAGE (actor), &stage_color);
cogl_color_init_from_4ub (&fog_color,
stage_color.red,
stage_color.green,
stage_color.blue,
stage_color.alpha);
// enable fog //
cogl_set_fog (&fog_color,
COGL_FOG_MODE_EXPONENTIAL, // mode
0.5, // density
5.0, 30.0); // z_near and z_far
}The fogging functions only work correctly when the visible actors use
unmultiplied alpha colors. By default Cogl will premultiply textures and
setSourceColor will premultiply colors, so unless you explicitly
load your textures requesting an unmultiplied internal format and use
materialSetColor you can only use fogging with fully opaque actors.
Support for premultiplied colors will improve in the future when we can
depend on fragment shaders.
Since: 0.6
setFullscreen
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Asks to place the stage window in the fullscreen or unfullscreen states.
( Note that you shouldn't assume the window is definitely full screen afterward, because other entities (e.g. the user or window manager) could unfullscreen it again, and not all window managers honor requests to fullscreen windows.
If you want to receive notification of the fullscreen state you should either use the Stage::fullscreen and Stage::unfullscreen signals, or use the notify signal for the Stage:fullscreenSet property
Since: 1.0
setKeyFocus
Arguments
| :: (HasCallStack, MonadIO m, IsStage a, IsActor b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets the key focus on actor. An actor with key focus will receive
all the key events. If actor is Nothing, the stage will receive
focus.
Since: 0.6
setMinimumSize
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Word32 |
|
| -> Word32 |
|
| -> m () |
Sets the minimum size for a stage window, if the default backend
uses Stage inside a window
This is a convenience function, and it is equivalent to setting the
Actor:minWidth and Actor:minHeight on stage
If the current size of stage is smaller than the minimum size, the
stage will be resized to the new width and height
This function has no effect if stage is fullscreen
Since: 1.2
setMotionEventsEnabled
stageSetMotionEventsEnabled Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether per-actor motion events (and relative crossing events) should be disabled or not.
The default is True.
If enable is False the following signals will not be emitted
by the actors children of stage:
The events will still be delivered to the Stage.
The main side effect of this function is that disabling the motion
events will disable picking to detect the Actor underneath
the pointer for each motion event. This is useful, for instance,
when dragging a Actor across the stage: the actor underneath
the pointer is not going to change, so it's meaningless to perform
a pick.
Since: 1.8
setNoClearHint
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the stage should clear itself at the beginning
of each paint cycle or not.
Clearing the Stage can be a costly operation, especially
if the stage is always covered - for instance, in a full-screen
video player or in a game with a background texture.
This setting is a hint; Clutter might discard this hint depending on its internal state.
If parts of the stage are visible and you disable clearing you might end up with visual artifacts while painting the contents of the stage.
Since: 1.4
setPerspective
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Perspective |
|
| -> m () |
Sets the stage perspective. Using this function is not recommended because it will disable Clutter's attempts to generate an appropriate perspective based on the size of the stage.
setThrottleMotionEvents
stageSetThrottleMotionEvents Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether motion events received between redraws should
be throttled or not. If motion events are throttled, those
events received by the windowing system between redraws will
be compressed so that only the last event will be propagated
to the stage and its actors.
This function should only be used if you want to have all the motion events delivered to your application code.
Since: 1.0
setTitle
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Text |
|
| -> m () |
Sets the stage title.
Since: 0.4
setUseAlpha
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the stage should honour the Actor:opacity and
the alpha channel of the Stage:color
Since: 1.2
setUseFog
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Deprecated: (Since version 1.10)Calling this function produces no visible effect
Sets whether the depth cueing effect on the stage should be enabled or not.
Depth cueing is a 3D effect that makes actors farther away from the viewing point less opaque, by fading them with the stage color.
The parameters of the GL fog used can be changed using the
stageSetFog function.
Since: 0.6
setUserResizable
stageSetUserResizable Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets if the stage is resizable by user interaction (e.g. via window manager controls)
Since: 0.4
showCursor
Arguments
| :: (HasCallStack, MonadIO m, IsStage a) | |
| => a |
|
| -> m () |
Shows the cursor on the stage window
Properties
acceptFocus
Whether the Stage should accept key focus when shown.
Since: 1.6
constructStageAcceptFocus :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “accept-focus” property. This is rarely needed directly, but it is used by new.
getStageAcceptFocus :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “accept-focus” property.
When overloading is enabled, this is equivalent to
get stage #acceptFocus
setStageAcceptFocus :: (MonadIO m, IsStage o) => o -> Bool -> m () Source #
Set the value of the “accept-focus” property.
When overloading is enabled, this is equivalent to
setstage [ #acceptFocus:=value ]
color
The background color of the main stage.
constructStageColor :: (IsStage o, MonadIO m) => Color -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “color” property. This is rarely needed directly, but it is used by new.
getStageColor :: (MonadIO m, IsStage o) => o -> m (Maybe Color) Source #
Get the value of the “color” property.
When overloading is enabled, this is equivalent to
get stage #color
setStageColor :: (MonadIO m, IsStage o) => o -> Color -> m () Source #
Set the value of the “color” property.
When overloading is enabled, this is equivalent to
setstage [ #color:=value ]
cursorVisible
Whether the mouse pointer should be visible
constructStageCursorVisible :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “cursor-visible” property. This is rarely needed directly, but it is used by new.
getStageCursorVisible :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “cursor-visible” property.
When overloading is enabled, this is equivalent to
get stage #cursorVisible
setStageCursorVisible :: (MonadIO m, IsStage o) => o -> Bool -> m () Source #
Set the value of the “cursor-visible” property.
When overloading is enabled, this is equivalent to
setstage [ #cursorVisible:=value ]
fog
The settings for the GL "fog", used only if Stage:useFog
is set to True
Since: 1.0
constructStageFog :: (IsStage o, MonadIO m) => Fog -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “fog” property. This is rarely needed directly, but it is used by new.
getStageFog :: (MonadIO m, IsStage o) => o -> m (Maybe Fog) Source #
Get the value of the “fog” property.
When overloading is enabled, this is equivalent to
get stage #fog
setStageFog :: (MonadIO m, IsStage o) => o -> Fog -> m () Source #
Set the value of the “fog” property.
When overloading is enabled, this is equivalent to
setstage [ #fog:=value ]
fullscreenSet
No description available in the introspection data.
getStageFullscreenSet :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “fullscreen-set” property.
When overloading is enabled, this is equivalent to
get stage #fullscreenSet
keyFocus
The Actor that will receive key events from the underlying
windowing system.
If Nothing, the Stage will receive the events.
Since: 1.2
clearStageKeyFocus :: (MonadIO m, IsStage o) => o -> m () Source #
Set the value of the “key-focus” property to Nothing.
When overloading is enabled, this is equivalent to
clear #keyFocus
constructStageKeyFocus :: (IsStage o, MonadIO m, IsActor a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “key-focus” property. This is rarely needed directly, but it is used by new.
getStageKeyFocus :: (MonadIO m, IsStage o) => o -> m Actor Source #
Get the value of the “key-focus” property.
When overloading is enabled, this is equivalent to
get stage #keyFocus
setStageKeyFocus :: (MonadIO m, IsStage o, IsActor a) => o -> a -> m () Source #
Set the value of the “key-focus” property.
When overloading is enabled, this is equivalent to
setstage [ #keyFocus:=value ]
noClearHint
Whether or not the Stage should clear its contents
before each paint cycle.
See stageSetNoClearHint for further information.
Since: 1.4
constructStageNoClearHint :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “no-clear-hint” property. This is rarely needed directly, but it is used by new.
getStageNoClearHint :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “no-clear-hint” property.
When overloading is enabled, this is equivalent to
get stage #noClearHint
setStageNoClearHint :: (MonadIO m, IsStage o) => o -> Bool -> m () Source #
Set the value of the “no-clear-hint” property.
When overloading is enabled, this is equivalent to
setstage [ #noClearHint:=value ]
offscreen
Whether the stage should be rendered in an offscreen buffer.
constructStageOffscreen :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “offscreen” property. This is rarely needed directly, but it is used by new.
getStageOffscreen :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “offscreen” property.
When overloading is enabled, this is equivalent to
get stage #offscreen
setStageOffscreen :: (MonadIO m, IsStage o) => o -> Bool -> m () Source #
Set the value of the “offscreen” property.
When overloading is enabled, this is equivalent to
setstage [ #offscreen:=value ]
perspective
The parameters used for the perspective projection from 3D coordinates to 2D
Since: 0.8
constructStagePerspective :: (IsStage o, MonadIO m) => Perspective -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “perspective” property. This is rarely needed directly, but it is used by new.
getStagePerspective :: (MonadIO m, IsStage o) => o -> m (Maybe Perspective) Source #
Get the value of the “perspective” property.
When overloading is enabled, this is equivalent to
get stage #perspective
setStagePerspective :: (MonadIO m, IsStage o) => o -> Perspective -> m () Source #
Set the value of the “perspective” property.
When overloading is enabled, this is equivalent to
setstage [ #perspective:=value ]
title
The stage's title - usually displayed in stage windows title decorations.
Since: 0.4
constructStageTitle :: (IsStage o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “title” property. This is rarely needed directly, but it is used by new.
getStageTitle :: (MonadIO m, IsStage o) => o -> m Text Source #
Get the value of the “title” property.
When overloading is enabled, this is equivalent to
get stage #title
setStageTitle :: (MonadIO m, IsStage o) => o -> Text -> m () Source #
Set the value of the “title” property.
When overloading is enabled, this is equivalent to
setstage [ #title:=value ]
useAlpha
Whether the Stage should honour the alpha component of the
Stage:color property when painting. If Clutter is run under
a compositing manager this will result in the stage being blended
with the underlying window(s)
Since: 1.2
constructStageUseAlpha :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “use-alpha” property. This is rarely needed directly, but it is used by new.
getStageUseAlpha :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “use-alpha” property.
When overloading is enabled, this is equivalent to
get stage #useAlpha
setStageUseAlpha :: (MonadIO m, IsStage o) => o -> Bool -> m () Source #
Set the value of the “use-alpha” property.
When overloading is enabled, this is equivalent to
setstage [ #useAlpha:=value ]
useFog
Whether the stage should use a linear GL "fog" in creating the depth-cueing effect, to enhance the perception of depth by fading actors farther from the viewpoint.
Since: 0.6
constructStageUseFog :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “use-fog” property. This is rarely needed directly, but it is used by new.
getStageUseFog :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “use-fog” property.
When overloading is enabled, this is equivalent to
get stage #useFog
setStageUseFog :: (MonadIO m, IsStage o) => o -> Bool -> m () Source #
Set the value of the “use-fog” property.
When overloading is enabled, this is equivalent to
setstage [ #useFog:=value ]
userResizable
Whether the stage is resizable via user interaction.
Since: 0.4
constructStageUserResizable :: (IsStage o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “user-resizable” property. This is rarely needed directly, but it is used by new.
getStageUserResizable :: (MonadIO m, IsStage o) => o -> m Bool Source #
Get the value of the “user-resizable” property.
When overloading is enabled, this is equivalent to
get stage #userResizable
setStageUserResizable :: (MonadIO m, IsStage o) => o -> Bool -> m () Source #
Set the value of the “user-resizable” property.
When overloading is enabled, this is equivalent to
setstage [ #userResizable:=value ]
Signals
activate
type StageActivateCallback = IO () Source #
The activate signal is emitted when the stage receives key focus from the underlying window system.
Since: 0.6
afterStageActivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after stage #activate 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.
onStageActivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on stage #activate callback
afterPaint
type StageAfterPaintCallback = IO () Source #
The afterPaint signal is emitted after the stage is painted, but before the results are displayed on the screen.
Since: 1.20
afterStageAfterPaint :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageAfterPaintCallback) -> m SignalHandlerId Source #
Connect a signal handler for the afterPaint signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after stage #afterPaint 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.
onStageAfterPaint :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageAfterPaintCallback) -> m SignalHandlerId Source #
Connect a signal handler for the afterPaint signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on stage #afterPaint callback
deactivate
type StageDeactivateCallback = IO () Source #
The deactivate signal is emitted when the stage loses key focus from the underlying window system.
Since: 0.6
afterStageDeactivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeactivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deactivate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after stage #deactivate 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.
onStageDeactivate :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeactivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deactivate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on stage #deactivate callback
deleteEvent
type StageDeleteEventCallback Source #
Arguments
| = Event |
|
| -> IO Bool |
The deleteEvent signal is emitted when the user closes a
Stage window using the window controls.
Clutter by default will call mainQuit if stage is
the default stage, and actorDestroy for any other
stage.
It is possible to override the default behaviour by connecting
a new handler and returning True there.
This signal is emitted only on Clutter backends that
embed Stage in native windows. It is not emitted for
backends that use a static frame buffer.
Since: 1.2
afterStageDeleteEvent :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeleteEventCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deleteEvent signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after stage #deleteEvent 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.
onStageDeleteEvent :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageDeleteEventCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deleteEvent signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on stage #deleteEvent callback
fullscreen
type StageFullscreenCallback = IO () Source #
The fullscreen signal is emitted when the stage is made fullscreen.
Since: 0.6
afterStageFullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageFullscreenCallback) -> m SignalHandlerId Source #
Connect a signal handler for the fullscreen signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after stage #fullscreen 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.
onStageFullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageFullscreenCallback) -> m SignalHandlerId Source #
Connect a signal handler for the fullscreen signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on stage #fullscreen callback
unfullscreen
type StageUnfullscreenCallback = IO () Source #
The unfullscreen signal is emitted when the stage leaves a fullscreen state.
Since: 0.6
afterStageUnfullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageUnfullscreenCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unfullscreen signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after stage #unfullscreen 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.
onStageUnfullscreen :: (IsStage a, MonadIO m) => a -> ((?self :: a) => StageUnfullscreenCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unfullscreen signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on stage #unfullscreen callback