Top level visual element to which actors are placed.
<clutter-stage>
is a top level 'window' on which child actors are
placed and manipulated.
Backends might provide support for multiple stages. The support for this
feature can be checked at run-time using the
clutter-feature-available
function and the
‘CLUTTER_FEATURE_STAGE_MULTIPLE’ flag. If the backend used supports
multiple stages, new <clutter-stage>
instances can be created
using clutter-stage-new
. These stages must be managed by the
developer using clutter-actor-destroy
, which will take care of
destroying all the actors contained inside them.
<clutter-stage>
is a proxy actor, wrapping the backend-specific
implementation of the windowing system. It is possible to subclass
<clutter-stage>
, as long as every overridden virtual function
chains up to the parent class corresponding function.
<clutter-actor>
)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
clutter-stage-get-default
will always return the same instance, you will have to keep a pointer to any<clutter-stage>
returned byclutter-stage-new
.The ability to support multiple stages depends on the current backend. Use
clutter-feature-available
and ‘CLUTTER_FEATURE_STAGE_MULTIPLE’ to check at runtime whether a backend supports multiple stages.
- ret
- a new stage, or ‘
#f
’ if the default backend does not support multiple stages. Useclutter-actor-destroy
to programmatically close the returned stage.Since 0.8
<clutter-stage>
) (fullscreen bool
)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
<"fullscreen">
and<"unfullscreen">
signals, or use the notify signal for the<"fullscreen-set">
property
- stage
- a
<clutter-stage>
- fullscreen
- ‘
#t
’ to to set the stage fullscreenSince 1.0
<clutter-stage>
) ⇒ (ret bool
)Retrieves whether the stage is full screen or not
- stage
- a
<clutter-stage>
- ret
- ‘
#t
’ if the stage is full screenSince 1.0
<clutter-stage>
)Shows the cursor on the stage window
- stage
- a
<clutter-stage>
<clutter-stage>
)Makes the cursor invisible on the stage window
- stage
- a
<clutter-stage>
Since 0.4
<clutter-stage>
) (pick_mode <clutter-pick-mode>
) (x int
) (y int
) ⇒ (ret <clutter-actor>
)Checks the scene at the coordinates x and y and returns a pointer to the
<clutter-actor>
at those coordinates.By using pick-mode it is possible to control which actors will be painted and thus available.
- stage
- a
<clutter-stage>
- pick-mode
- how the scene graph should be painted
- x
- X coordinate to check
- y
- Y coordinate to check
- ret
- the actor at the specified coordinates, if any.
<clutter-stage>
)This function essentially makes sure the right GL context is current for the passed stage. It is not intended to be used by applications.
- stage
- the
<clutter-stage>
Since 0.8
<clutter-stage>
)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
<clutter-stage>
into a toolkit with another windowing system, like GTK+.
- stage
- a
<clutter-stage>
Since 1.0
<clutter-stage>
)Ensures that stage is redrawn
This function should not be called by applications: it is used when embedding a
<clutter-stage>
into a toolkit with another windowing system, like GTK+.
- stage
- a
<clutter-stage>
Since 1.0
<clutter-stage>
) (event <clutter-event>
) ⇒ (ret bool
)This function is used to emit an event on the main stage.
You should rarely need to use this function, except for synthetised events.
- stage
- a
<clutter-stage>
- event
- a
<clutter-event>
- ret
- the return value from the signal emission
Since 0.4
<clutter-stage>
) (actor <clutter-actor>
)Sets the key focus on actor. An actor with key focus will receive all the key events. If actor is ‘
#f
’, the stage will receive focus.
- stage
- the
<clutter-stage>
- actor
- the actor to set key focus to, or ‘
#f
’.Since 0.6
<clutter-stage>
) ⇒ (ret <clutter-actor>
)Retrieves the actor that is currently under key focus.
- stage
- the
<clutter-stage>
- ret
- the actor with key focus, or the stage.
Since 0.6
<clutter-stage>
) (use_alpha bool
)Sets whether the stage should honour the
<"opacity">
and the alpha channel of the<"color">
- stage
- a
<clutter-stage>
- use-alpha
- whether the stage should honour the opacity or the alpha channel of the stage color
Since 1.2
<clutter-stage>
) ⇒ (ret bool
)Retrieves the value set using
clutter-stage-set-use-alpha
- stage
- a
<clutter-stage>
- ret
- ‘
#t
’ if the stage should honour the opacity and the alpha channel of the stage colorSince 1.2
<clutter-stage>
) (width unsigned-int
) (height unsigned-int
)Sets the minimum size for a stage window, if the default backend uses
<clutter-stage>
inside a windowThis is a convenience function, and it is equivalent to setting the
<"min-width">
and<"min-height">
on stageIf 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
- stage
- a
<clutter-stage>
- width
- width, in pixels
- height
- height, in pixels
Since 1.2
<clutter-stage>
) ⇒ (width unsigned-int
) (height unsigned-int
)Retrieves the minimum size for a stage window as set using
clutter-stage-set-minimum-size
.The returned size may not correspond to the actual minimum size and it is specific to the
<clutter-stage>
implementation inside the Clutter backend
- stage
- a
<clutter-stage>
- width
- return location for the minimum width, in pixels, or ‘
#f
’.- height
- return location for the minimum height, in pixels, or ‘
#f
’.Since 1.2
<clutter-stage>
) (no_clear bool
)Sets whether the stage should clear itself at the beginning of each paint cycle or not.
Clearing the
<clutter-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.
- stage
- a
<clutter-stage>
- no-clear
- ‘
#t
’ if the stage should not clear itself on every repaint cycleSince 1.4
<clutter-stage>
) ⇒ (ret bool
)Retrieves the hint set with
clutter-stage-set-no-clear-hint
- stage
- a
<clutter-stage>
- ret
- ‘
#t
’ if the stage should not clear itself on every paint cycle, and ‘#f
’ otherwiseSince 1.4
<clutter-stage>
) (accept_focus bool
)Sets whether the stage should accept the key focus when shown.
This function should be called before showing stage using
clutter-actor-show
.
- stage
- a
<clutter-stage>
- accept-focus
- ‘
#t
’ to accept focus on showSince 1.6
<clutter-stage>
) ⇒ (ret bool
)Retrieves the value set with
clutter-stage-set-accept-focus
.
- stage
- a
<clutter-stage>
- ret
- ‘
#t
’ if the<clutter-stage>
should accept focus, and ‘#f
’ otherwiseSince 1.6
<clutter-stage>
) (perspective <clutter-perspective>
)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.
- stage
- A
<clutter-stage>
- perspective
- A
<clutter-perspective>
<clutter-stage>
) ⇒ (ret scm
)Retrieves the stage perspective.
- stage
- A
<clutter-stage>
- perspective
- return location for a
<clutter-perspective>
.
<clutter-stage>
) (title mchars
)Sets the stage title.
- stage
- A
<clutter-stage>
- title
- A utf8 string for the stage windows title.
Since 0.4
<clutter-stage>
) ⇒ (ret mchars
)Gets the stage title.
- stage
- A
<clutter-stage>
- ret
- pointer to the title string for the stage. The returned string is owned by the actor and should not be modified or freed.
Since 0.4