---
name: "Clutter::Stage"
section: "3pm"
platform: "linux"
package: "libclutter-perl"
version: "1.002-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Clutter::Stage"
---

# Clutter::Stage(3pm)

Top level visual element to which actors are placed

## NAME

Clutter::Stage - Top level visual element to which actors are placed

## SYNOPSIS

```
    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 pointer
    my $stage = Clutter::Stage->get_default();
```

## DESCRIPTION

**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::ClutterScriptable
  Clutter::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)

- •

  `$mode` (Clutter::PickMode)

- •

  `$x` (double)

- •

  `$y` (double)

### 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)

- •

  `$z_near` (double)

- •

  `$z_far` (double)

### 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)

- •

  `$fovy` (double)

- •

  `$aspect` (double)

- •

  `$z_near` (double)

- •

  `$z_far` (double)

### $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'

## SEE ALSO

Clutter, Glib::Object, Glib::InitiallyUnowned, Clutter::Actor, Clutter::Group

## COPYRIGHT

Copyright (C) 2006, 2007, 2008  OpenedHand Ltd

Copyright (C) 2009  Intel Corporation

This module is free software; you can redistribute it and/or modify it under the terms of either:

- •

  the GNU Lesser General Public Library version 2.1; or

- •

  the Artistic License, version 2.0.

See Clutter for the full copyright notice.
