Clutter::Stage Class Reference

#include <stage.h>

Inheritance diagram for Clutter::Stage:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Stage ()
ClutterStage * gobj ()
 Provides access to the underlying C GObject.
const ClutterStage * gobj () const
 Provides access to the underlying C GObject.
ClutterStage * gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void set_color (const Color &color)
 Sets the stage color.
Color get_color () const
 Retrieves the stage color.
void set_perspective (const Perspective &prespective)
 Sets the stage perspective.
void get_perspective (Perspective &prespective)
 Retrieves the stage perspective.
void show_cursor ()
 Shows the cursor on the stage window.
void hide_cursor ()
 Makes the cursor invisible on the stage window.
Glib::ustring get_title () const
 Gets the stage title.
void set_title (const Glib::ustring &title)
 Sets the stage title.
void set_user_resizable (bool value)
 Sets if the stage is resizable by user interaction (e.g. via window manager controls).
bool get_user_resizable () const
 Retrieves the value set with set_user_resizable().
Glib::RefPtr< Actorget_actor_at_pos (PickMode pick_mode, int x, int y)
 Checks the scene at the coordinates x and y and returns a pointer to the Clutter::Actor at those coordinates.
Glib::RefPtr< const Actorget_actor_at_pos (PickMode pick_mode, int x, int y) const
 Checks the scene at the coordinates x and y and returns a pointer to the Clutter::Actor at those coordinates.
Glib::RefPtr< Actorget_key_focus ()
 Retrieves the actor that is currently under key focus.
Glib::RefPtr< const Actorget_key_focus () const
 Retrieves the actor that is currently under key focus.
void set_key_focus (const Glib::RefPtr< Actor > &actor)
 Sets the key focus on actor.
void set_key_focus ()
guchar * read_pixels (int x, int y, int width, int height) const
 Makes a screenshot of the stage in RGBA 8bit data, returns a linear buffer with width * 4 as rowstride.
bool get_use_fog () const
 Gets whether the depth cueing effect is enabled on stage.
void set_use_fog (bool fog=true)
 Sets whether the depth cueing effect on the stage should be enabled or not.
void set_fog (const Fog &fog)
 Sets the fog (also known as "depth cueing") settings for the stage.
void get_fog (Fog &fog) const
 Retrieves the current depth cueing settings from the stage.
void stage_event (Event *event)
 This function is used to emit an event on the main stage.
bool is_default () const
 Checks if stage is the default stage, or an instance created using new() but internally using the same implementation.
void ensure_current ()
 This function essentially makes sure the right GL context is current for the passed stage.
void ensure_viewport ()
 Ensures that the GL viewport is updated with the current stage window size.
Glib::SignalProxy0< void > signal_fullscreen ()
Glib::SignalProxy0< void > signal_unfullscreen ()
Glib::SignalProxy0< void > signal_activate ()
Glib::SignalProxy0< void > signal_deactivate ()
Glib::PropertyProxy< Colorproperty_color ()
 The color of the stage.
Glib::PropertyProxy_ReadOnly
< Color
property_color () const
 The color of the stage.
Glib::PropertyProxy< bool > property_cursor_visible ()
 Whether the mouse pointer is visible on the main stage .
Glib::PropertyProxy_ReadOnly
< bool > 
property_cursor_visible () const
 Whether the mouse pointer is visible on the main stage .
Glib::PropertyProxy< bool > property_fullscreen ()
 Whether the main stage is fullscreen.
Glib::PropertyProxy_ReadOnly
< bool > 
property_fullscreen () const
 Whether the main stage is fullscreen.
Glib::PropertyProxy< bool > property_offscreen ()
 Whether the main stage is renderer offscreen.
Glib::PropertyProxy_ReadOnly
< bool > 
property_offscreen () const
 Whether the main stage is renderer offscreen.
Glib::PropertyProxy
< Glib::ustring > 
property_title ()
 Stage Title.
Glib::PropertyProxy_ReadOnly
< Glib::ustring > 
property_title () const
 Stage Title.
Glib::PropertyProxy< bool > property_use_fog ()
 Whether to enable depth cueing.
Glib::PropertyProxy_ReadOnly
< bool > 
property_use_fog () const
 Whether to enable depth cueing.
Glib::PropertyProxy< bool > property_user_resizable ()
 Whether the stage is able to be resized via user interaction.
Glib::PropertyProxy_ReadOnly
< bool > 
property_user_resizable () const
 Whether the stage is able to be resized via user interaction.

Static Public Member Functions

static Glib::RefPtr< Stageget_default ()
 Return value: (transfer none): the main Clutter::Stage.

Protected Member Functions

 Stage ()
virtual void on_fullscreen ()
virtual void on_unfullscreen ()
virtual void on_activate ()
virtual void on_deactivate ()

Related Functions

(Note that these are not member functions.)



Glib::RefPtr< Clutter::Stagewrap (ClutterStage *object, bool take_copy=false)
 A Glib::wrap() method for this object.

Constructor & Destructor Documentation

virtual Clutter::Stage::~Stage (  )  [virtual]
Clutter::Stage::Stage (  )  [protected]

Member Function Documentation

void Clutter::Stage::ensure_current (  ) 

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

void Clutter::Stage::ensure_viewport (  ) 

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+.

Since: 1.0

Glib::RefPtr<const Actor> Clutter::Stage::get_actor_at_pos ( PickMode  pick_mode,
int  x,
int  y 
) const

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.

Parameters:
pick_mode How the scene graph should be painted.
x X coordinate to check.
y Y coordinate to check.
Returns:
(transfer none): the actor at the specified coordinates, if any.
Glib::RefPtr<Actor> Clutter::Stage::get_actor_at_pos ( PickMode  pick_mode,
int  x,
int  y 
)

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.

Parameters:
pick_mode How the scene graph should be painted.
x X coordinate to check.
y Y coordinate to check.
Returns:
(transfer none): the actor at the specified coordinates, if any.
Color Clutter::Stage::get_color (  )  const

Retrieves the stage color.

Parameters:
color Return location for a Clutter::Color.
static Glib::RefPtr<Stage> Clutter::Stage::get_default (  )  [static]

Return value: (transfer none): the main Clutter::Stage.

You should never

Returns:
(transfer none): the main Clutter::Stage. You should never destroy or unref the returned actor.
void Clutter::Stage::get_fog ( Fog fog  )  const

Retrieves the current depth cueing settings from the stage.

Since: 0.6

Parameters:
fog Return location for a Clutter::Fog structure.
Glib::RefPtr<const Actor> Clutter::Stage::get_key_focus (  )  const

Retrieves the actor that is currently under key focus.

Returns:
(transfer none): the actor with key focus, or the stage

Since: 0.6.

Glib::RefPtr<Actor> Clutter::Stage::get_key_focus (  ) 

Retrieves the actor that is currently under key focus.

Returns:
(transfer none): the actor with key focus, or the stage

Since: 0.6.

void Clutter::Stage::get_perspective ( Perspective prespective  ) 

Retrieves the stage perspective.

Parameters:
perspective Return location for a Clutter::Perspective.
Glib::ustring Clutter::Stage::get_title (  )  const

Gets the stage title.

Returns:
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.

bool Clutter::Stage::get_use_fog (  )  const

Gets whether the depth cueing effect is enabled on stage.

Returns:
true if the the depth cueing effect is enabled

Since: 0.6.

bool Clutter::Stage::get_user_resizable (  )  const

Retrieves the value set with set_user_resizable().

Returns:
true if the stage is resizable by the user.

Since: 0.4.

const ClutterStage* Clutter::Stage::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Group.

ClutterStage* Clutter::Stage::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Clutter::Group.

ClutterStage* Clutter::Stage::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Clutter::Group.

void Clutter::Stage::hide_cursor (  ) 

Makes the cursor invisible on the stage window.

Since: 0.4

bool Clutter::Stage::is_default (  )  const

Checks if stage is the default stage, or an instance created using new() but internally using the same implementation.

Returns:
true if the passed stage is the default one

Since: 0.8.

virtual void Clutter::Stage::on_activate (  )  [protected, virtual]
virtual void Clutter::Stage::on_deactivate (  )  [protected, virtual]
virtual void Clutter::Stage::on_fullscreen (  )  [protected, virtual]
virtual void Clutter::Stage::on_unfullscreen (  )  [protected, virtual]
Glib::PropertyProxy_ReadOnly<Color> Clutter::Stage::property_color (  )  const

The color of the stage.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<Color> Clutter::Stage::property_color (  ) 

The color of the stage.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Clutter::Stage::property_cursor_visible (  )  const

Whether the mouse pointer is visible on the main stage .

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Clutter::Stage::property_cursor_visible (  ) 

Whether the mouse pointer is visible on the main stage .

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Clutter::Stage::property_fullscreen (  )  const

Whether the main stage is fullscreen.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Clutter::Stage::property_fullscreen (  ) 

Whether the main stage is fullscreen.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Clutter::Stage::property_offscreen (  )  const

Whether the main stage is renderer offscreen.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Clutter::Stage::property_offscreen (  ) 

Whether the main stage is renderer offscreen.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<Glib::ustring> Clutter::Stage::property_title (  )  const

Stage Title.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<Glib::ustring> Clutter::Stage::property_title (  ) 

Stage Title.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Clutter::Stage::property_use_fog (  )  const

Whether to enable depth cueing.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Clutter::Stage::property_use_fog (  ) 

Whether to enable depth cueing.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Clutter::Stage::property_user_resizable (  )  const

Whether the stage is able to be resized via user interaction.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Clutter::Stage::property_user_resizable (  ) 

Whether the stage is able to be resized via user interaction.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
guchar* Clutter::Stage::read_pixels ( int  x,
int  y,
int  width,
int  height 
) const

Makes a screenshot of the stage in RGBA 8bit data, returns a linear buffer with width * 4 as rowstride.

The alpha data contained in the returned buffer is driver-dependent, and not guaranteed to hold any sensible value.

Parameters:
x X coordinate of the first pixel that is read from stage.
y Y coordinate of the first pixel that is read from stage.
width Width dimention of pixels to be read, or -1 for the entire stage width.
height Height dimention of pixels to be read, or -1 for the entire stage height.
Returns:
A pointer to newly allocated memory with the buffer or 0 if the read failed. Use Glib::free() on the returned data to release the resources it has allocated.
void Clutter::Stage::set_color ( const Color color  ) 

Sets the stage color.

Parameters:
color A Clutter::Color.
void Clutter::Stage::set_fog ( const Fog fog  ) 

Sets the fog (also known as "depth cueing") settings for the stage.

A Clutter::Stage will only use a linear fog progression, which depends solely on the distance from the viewer. The cogl_set_fog() function in COGL exposes more of the underlying implementation, and allows changing the for progression function. It can be directly used by disabling the Clutter::Stage:use-fog property and connecting a signal handler to the Clutter::Actor::paint signal on the stage.

Note:
The fogging functions only work correctly when the visible actors use unmultiplied alpha colors. By default Cogl will premultiply textures and cogl_set_source_color will premultiply colors, so unless you explicitly load your textures requesting an unmultiplied internal_format and use cogl_material_set_color you can only use fogging with fully opaque actors.

We can look to improve this in the future when we can depend on fragment shaders.

Since: 0.6

Parameters:
fog A Clutter::Fog structure.
void Clutter::Stage::set_key_focus (  ) 
void Clutter::Stage::set_key_focus ( const Glib::RefPtr< Actor > &  actor  ) 

Sets the key focus on actor.

An actor with key focus will receive all the key events. If actor is 0, the stage will receive focus.

Since: 0.6

Parameters:
actor The actor to set key focus to, or 0.
void Clutter::Stage::set_perspective ( const Perspective prespective  ) 

Sets the stage perspective.

Parameters:
perspective A Clutter::Perspective.
void Clutter::Stage::set_title ( const Glib::ustring &  title  ) 

Sets the stage title.

Since: 0.4

Parameters:
title A utf8 string for the stage windows title.
void Clutter::Stage::set_use_fog ( bool  fog = true  ) 

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 set_fog() function.

Since: 0.6

Parameters:
fog true for enabling the depth cueing effect.
void Clutter::Stage::set_user_resizable ( bool  value  ) 

Sets if the stage is resizable by user interaction (e.g. via window manager controls).

Since: 0.4

Parameters:
resizable Whether the stage should be user resizable.
void Clutter::Stage::show_cursor (  ) 

Shows the cursor on the stage window.

Glib::SignalProxy0< void > Clutter::Stage::signal_activate (  ) 
Prototype:
void on_my_activate()
Glib::SignalProxy0< void > Clutter::Stage::signal_deactivate (  ) 
Prototype:
void on_my_deactivate()
Glib::SignalProxy0< void > Clutter::Stage::signal_fullscreen (  ) 
Prototype:
void on_my_fullscreen()
Glib::SignalProxy0< void > Clutter::Stage::signal_unfullscreen (  ) 
Prototype:
void on_my_unfullscreen()
void Clutter::Stage::stage_event ( Event event  ) 

This function is used to emit an event on the main stage.

You should rarely need to use this function, except for synthetised events.

Parameters:
event A Clutter::Event.
Returns:
The return value from the signal emission

Since: 0.4.


Friends And Related Function Documentation

Glib::RefPtr< Clutter::Stage > wrap ( ClutterStage *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

Generated on 7 Sep 2009 for cluttermm by  doxygen 1.6.1