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)
 Set the stage color.
Color get_color () const
 Retrieves the stage color.
void set_perspectivex (ClutterPerspective *perspective)
 Set the stage perspective.
void get_perspectivex (ClutterPerspective *perspective) const
 Retrieves the stage perspective.
void set_perspective (float fovy, float aspect, float z_near, float z_far)
 Set the stage perspective.
void get_perspective (float &fovy, float &aspect, float &z_near, float &z_far)
 Retrieves the stage perspective.
void fullscreen ()
 Asks to place the stage window in the fullscreen state.
void unfullscreen ()
 Asks to toggle off the fullscreen state for the stage window.
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 able to be resized by user interaction (i.e via window manager controls).
bool get_user_resizable () const
 Retrieves the value set with set_user_resizable().
Glib::RefPtr< Actorget_actor_at_pos (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 (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.
Glib::RefPtr< Gdk::Pixbuf > snapshot (int x, int y, int width, int height) const
 Gets a pixel based representation of the current rendered stage.
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 (double density, double z_near, double z_far)
 Sets the GL fog settings used to create the depth cueing effect on the stage.
void get_fog (double &density, double &z_near, double &z_far) const
 Retrieves the settings used by the GL fog to create the depth cueing effect on the stage.
void set_fogx (const Fog &fog)
 Sets the depth cueing settings for the stage.
void get_fogx (Fog &fog) const
 Retrieves the current depth cueing settings from the stage.
double get_resolution () const
 Retrieves the resolution (in DPI) of the stage from the default backend.
Fixed get_resolutionx () const
 Fixed point version of get_resolution().
void stage_event (Event *event)
 This function is used to emit an event on the main stage.
Glib::SignalProxy0< void > signal_fullscreen ()
Glib::SignalProxy0< void > signal_unfullscreen ()
Glib::SignalProxy0< void > signal_activate ()
Glib::SignalProxy0< void > signal_deactivate ()

Static Public Member Functions

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

Protected Member Functions

 Stage ()
virtual void set_fullscreen_vfunc (bool fullscreen)
virtual void set_cursor_visible_vfunc (bool visible)
virtual Glib::RefPtr< Gdk::Pixbuf > draw_to_pixbuf_vfunc (int x, int y, int width, int height)
virtual void set_title_vfunc (const Glib::ustring &title)
virtual void set_user_resize_vfunc (bool value)
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

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

Provides access to the underlying C GObject.

Reimplemented from Clutter::Group.

const ClutterStage* Clutter::Stage::gobj (  )  const [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.

static Glib::RefPtr<Stage> Clutter::Stage::get_default (  )  [static]

Return value: the main Clutter::Stage.

You should never

Returns:
The main Clutter::Stage. You should never destroy or unref the returned actor.

void Clutter::Stage::set_color ( const Color color  ) 

Set the stage color.

Parameters:
color A Clutter::Color.

Color Clutter::Stage::get_color (  )  const

Retrieves the stage color.

Parameters:
color Return location for a Clutter::Color.

void Clutter::Stage::set_perspectivex ( ClutterPerspective *  perspective  ) 

Set the stage perspective.

Parameters:
perspective A Clutter::Perspective.

void Clutter::Stage::get_perspectivex ( ClutterPerspective *  perspective  )  const

Retrieves the stage perspective.

Parameters:
perspective Return location for a Clutter::Perspective.

void Clutter::Stage::set_perspective ( float  fovy,
float  aspect,
float  z_near,
float  z_far 
)

Set the stage perspective.

Since: 0.4

Parameters:
fovy The field of view angle, in degrees, in the y direction.
aspect The aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
z_near The distance from the viewer to the near clipping plane (always positive).
z_far The distance from the viewer to the far clipping plane (always positive).

void Clutter::Stage::get_perspective ( float &  fovy,
float &  aspect,
float &  z_near,
float &  z_far 
)

Retrieves the stage perspective.

Since: 0.4

Parameters:
fovy Return location for the field of view, in degrees, or 0.
aspect Return location for the aspect ratio, or 0.
z_near Return location for the distance of the viewer from the near clipping plane, or 0.
z_far Return location for the distance of the viewer from the far clipping plane, or 0.

void Clutter::Stage::fullscreen (  ) 

Asks to place the stage window in the fullscreen state.

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.

void Clutter::Stage::unfullscreen (  ) 

Asks to toggle off the fullscreen state for the stage window.

Note that you shouldn't assume the window is definitely not full screen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows.

void Clutter::Stage::show_cursor (  ) 

Shows the cursor on the stage window.

void Clutter::Stage::hide_cursor (  ) 

Makes the cursor invisible on the stage window.

Since: 0.4

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.

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_user_resizable ( bool  value  ) 

Sets if the stage is able to be resized by user interaction (i.e via window manager controls).

Since: 0.4

Parameters:
resizable Whether if the stage should be user resizable.

bool Clutter::Stage::get_user_resizable (  )  const

Retrieves the value set with set_user_resizable().

Returns:
true is the stage is resizable by the user.
Since: 0.4.

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

Checks the scene at the coordinates x and y and returns a pointer to the Clutter::Actor at those coordinates.

Parameters:
x X coordinate to check.
y Y coordinate to check.
Returns:
The actor at the specified coordinates, if any.

Glib::RefPtr<const Actor> Clutter::Stage::get_actor_at_pos ( 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.

Parameters:
x X coordinate to check.
y Y coordinate to check.
Returns:
The actor at the specified coordinates, if any.

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

Retrieves the actor that is currently under key focus.

Returns:
The actor with key focus, or the stage
Since: 0.6.

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

Retrieves the actor that is currently under key focus.

Returns:
The actor with key focus, or the stage
Since: 0.6.

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.

Glib::RefPtr<Gdk::Pixbuf> Clutter::Stage::snapshot ( int  x,
int  y,
int  width,
int  height 
) const

Gets a pixel based representation of the current rendered stage.

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:
Pixel representation as a Gdk::Pixbuf.

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.

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_fog ( double  density,
double  z_near,
double  z_far 
)

Sets the GL fog settings used to create the depth cueing effect on the stage.

If the actors are all near the view point you will need a higher density and a smaller interval between z_near and z_far. On the other hand, if actors are placed far away from the view point you will need a lower density but a bigger interval between z_near and z_far.

Since: 0.6

Parameters:
density Density of the intensity dampening.
z_near Starting point of the depth cueing.
z_far Ending point of the depth cueing.

void Clutter::Stage::get_fog ( double &  density,
double &  z_near,
double &  z_far 
) const

Retrieves the settings used by the GL fog to create the depth cueing effect on the stage.

Since: 0.6

Parameters:
density Return location for the intensity dampening.
z_near Return location for the starting point of the depth cueing.
z_far Return location for the ending point of the depth cueing.

void Clutter::Stage::set_fogx ( const Fog fog  ) 

Sets the depth cueing settings for the stage.

This is the fixed point version of set_fog().

Since: 0.6

Parameters:
fog A Clutter::Fog structure.

void Clutter::Stage::get_fogx ( Fog fog  )  const

Retrieves the current depth cueing settings from the stage.

This is the fixed point version of get_fog().

Since: 0.6

Parameters:
fog Return location for a Clutter::Fog structure.

double Clutter::Stage::get_resolution (  )  const

Retrieves the resolution (in DPI) of the stage from the default backend.

Returns:
The resolution of the stage
Since: 0.6.

Fixed Clutter::Stage::get_resolutionx (  )  const

Fixed point version of get_resolution().

Returns:
The resolution of the stage
Since: 0.6.

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 synthetising events.

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

Glib::SignalProxy0< void > Clutter::Stage::signal_fullscreen (  ) 

Prototype:
void on_my_fullscreen()

Glib::SignalProxy0< void > Clutter::Stage::signal_unfullscreen (  ) 

Prototype:
void on_my_unfullscreen()

Glib::SignalProxy0< void > Clutter::Stage::signal_activate (  ) 

Prototype:
void on_my_activate()

Glib::SignalProxy0< void > Clutter::Stage::signal_deactivate (  ) 

Prototype:
void on_my_deactivate()

virtual void Clutter::Stage::set_fullscreen_vfunc ( bool  fullscreen  )  [protected, virtual]

virtual void Clutter::Stage::set_cursor_visible_vfunc ( bool  visible  )  [protected, virtual]

virtual Glib::RefPtr<Gdk::Pixbuf> Clutter::Stage::draw_to_pixbuf_vfunc ( int  x,
int  y,
int  width,
int  height 
) [protected, virtual]

virtual void Clutter::Stage::set_title_vfunc ( const Glib::ustring &  title  )  [protected, virtual]

virtual void Clutter::Stage::set_user_resize_vfunc ( bool  value  )  [protected, virtual]

virtual void Clutter::Stage::on_fullscreen (  )  [protected, virtual]

virtual void Clutter::Stage::on_unfullscreen (  )  [protected, virtual]

virtual void Clutter::Stage::on_activate (  )  [protected, virtual]

virtual void Clutter::Stage::on_deactivate (  )  [protected, virtual]


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 Fri Jun 6 02:16:48 2008 for cluttermm by  doxygen 1.5.5