Clutter::Stage3pm
Top level visual element to which actors are placed
Usage
my $stage = Clutter::Stage->new();$stage->signal_connect(destroy => sub { Clutter->main_quit });$stage->add($actor, $rectangle, $group, $texture, $label);$stage->show();$stage->destroy();# the default stage is owned by Clutter, and get_default() will# always return the same pointermy $stage = Clutter::Stage->get_default();
Overview
Clutter::Stage is a top level 'window' on which child actors are placed and manipulated.
Clutter creates a default stage upon initialization, which can be retrieved using Clutter::Stage::get_default(). Clutter always provides the default stage, unless the backend is unable to create one. The stage returned by Clutter::Stage::get_default() is guaranteed to always be the same.
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 '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.
Hierarchy
Glib::Object+----Glib::InitiallyUnowned+----Clutter::Actor+----Clutter::Group+----Clutter::Stage
Interfaces
Glib::Object::_Unregistered::ClutterScriptableClutter::Container
Methods
actor = Clutter::Stage->new
Creates a new Clutter::Stage, if the Clutter backend supports multiple stages.
actor = $stage->get_actor_at_pos ($mode, $x, $y)
•
|
|
|---|---|
•
|
|
•
|
|
color = $stage->get_color
$stage->set_color ($color)
- •
-
$color(Clutter::Color)
actor = Clutter::Stage->get_default
Retrieves the default Clutter::Stage. The returned stage is always the same and it must not be destroyed.
$stage->event ($event)
- •
-
$event(Clutter::Event)
(z_near, z_far) = $stage->get_fog
$stage->set_fog ($z_near, $z_far)
•
|
|
|---|---|
•
|
|
boolean = $stage->get_fullscreen
$stage->set_fullscreen ($fullscreen)
- •
-
$fullscreen(boolean)
$stage->hide_cursor
boolean = $stage->is_default
actor = $stage->get_key_focus
$stage->set_key_focus ($actor)
- •
-
$actor(Clutter::Actor or undef)
(fovy, aspect, z_near, z_far) = $stage->get_perspective
$stage->set_perspective ($fovy, $aspect, $z_near, $z_far)
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
$stage->show_cursor
string = $stage->get_title
$stage->set_title ($title)
- •
-
$title(string or undef)
boolean = $stage->get_use_fog
$stage->set_use_fog ($use_fog)
- •
-
$use_fog(boolean)
boolean = $stage->get_user_resizable
$stage->set_user_resizable ($resizable)
- •
-
$resizable(boolean)
Properties
'color' (Clutter::Color : readable / writable / private)
|
The color of the stage |
|---|---|
'cursor-visible' (boolean : readable / writable / private)
|
Whether the mouse pointer is visible on the main stage |
'fog' (ClutterFog : readable / writable / private)
|
Settings for the depth cueing |
'fullscreen-set' (boolean : readable / private)
|
Whether the main stage is fullscreen |
'offscreen' (boolean : readable / writable / private)
|
Whether the main stage should be rendered offscreen |
'perspective' (ClutterPerspective : readable / writable / private)
|
Perspective projection parameters |
'title' (string : readable / writable / private)
|
Stage Title |
'use-fog' (boolean : readable / writable / private)
|
Whether to enable depth cueing |
'user-resizable' (boolean : readable / writable / private)
|
Whether the stage is able to be resized via user interaction |
Signals
activate(Clutter::Stage)
fullscreen(Clutter::Stage)
unfullscreen(Clutter::Stage)
deactivate(Clutter::Stage)
Enums and flags
enum Clutter::PickMode
•
|
'none' / 'CLUTTER_PICK_NONE' |
|---|---|
•
|
'reactive' / 'CLUTTER_PICK_REACTIVE' |
•
|
'all' / 'CLUTTER_PICK_ALL' |
Releases
2 releases since Debian 5.0 (Lenny); the text changed 1 time.