MxOffscreen

MxOffscreen — an offscreen container widget

Functions

Properties

gboolean accumulation-enabled Read / Write
gpointer accumulation-material Read
gboolean auto-update Read / Write
gpointer buffer Read
ClutterActor * child Read / Write
gboolean pick-child Read / Write
gboolean redirect-enabled Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── ClutterTexture
                ╰── MxOffscreen

Implemented Interfaces

MxOffscreen implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and MxFocusable.

Description

MxOffscreen allows you to redirect the painting of a ClutterActor to a texture. It can either contain this actor, or optionally, it can redirect the painting of an actor that it does not contain.

This is often useful for applying a ClutterShader effect to an actor or group of actors that is not a texture.

Functions

mx_offscreen_new ()

ClutterActor *
mx_offscreen_new (void);

Creates a new MxOffscreen.

Returns

a newly allocated MxOffscreen


mx_offscreen_set_child ()

void
mx_offscreen_set_child (MxOffscreen *offscreen,
                        ClutterActor *actor);

Redirects the painting of actor to the offscreen surface owned by offscreen . In the event that actor is unparented, it will be parented to offscreen . Note that when you redirect the painting of actor , it will no longer be painted in its original position in the scenegraph.

Parameters

offscreen

A MxOffscreen

 

actor

A ClutterActor

 

mx_offscreen_get_child ()

ClutterActor *
mx_offscreen_get_child (MxOffscreen *offscreen);

Gets the value of the “child” property.

Parameters

offscreen

A MxOffscreen

 

Returns

The child of the offscreen widget.

[transfer none]


mx_offscreen_set_pick_child ()

void
mx_offscreen_set_pick_child (MxOffscreen *offscreen,
                             gboolean pick);

Enable picking of the child actor.

Parameters

offscreen

A MxOffscreen

 

pick

TRUE to enable picking of the child actor

 

mx_offscreen_get_pick_child ()

gboolean
mx_offscreen_get_pick_child (MxOffscreen *offscreen);

Gets the value of the “pick-child” property.

Parameters

offscreen

A MxOffscreen

 

Returns

TRUE if picking of the child is enabled.


mx_offscreen_set_auto_update ()

void
mx_offscreen_set_auto_update (MxOffscreen *offscreen,
                              gboolean auto_update);

Enable automatic updating of the offscreen surface when the child is updated.

Parameters

offscreen

A MxOffscreen

 

auto_update

TRUE if the offscreen surface should be automatically updated

 

mx_offscreen_get_auto_update ()

gboolean
mx_offscreen_get_auto_update (MxOffscreen *offscreen);

Gets the value of the “auto-update” property.

Parameters

offscreen

A MxOffscreen

 

Returns

TRUE if automatic updating of the offscreen surface is enabled


mx_offscreen_set_redirect_enabled ()

void
mx_offscreen_set_redirect_enabled (MxOffscreen *offscreen,
                                   gboolean enabled);

Sets the value of the “redirect-enabled” property. When redirection is enabled, the painting of the child of offscreen will be redirected to the texture of offscreen .

Parameters

offscreen

A MxOffscreen

 

enabled

TRUE if redirection to the offscreen surface should be enabled

 

Since: 1.2


mx_offscreen_get_redirect_enabled ()

gboolean
mx_offscreen_get_redirect_enabled (MxOffscreen *offscreen);

Gets the value of the “redirect-enabled” property.

Parameters

offscreen

A MxOffscreen

 

Returns

TRUE if offscreen redirection is enabled

Since: 1.2


mx_offscreen_get_buffer ()

CoglHandle
mx_offscreen_get_buffer (MxOffscreen *offscreen);

Gets the value of the “buffer” property.

Parameters

offscreen

A MxOffscreen

 

Returns

the CoglHandle for the offscreen buffer object.

[transfer none]

Since: 1.2


mx_offscreen_update ()

void
mx_offscreen_update (MxOffscreen *offscreen);

Updates the offscreen surface. This causes the child of offscreen to be drawn into the texture of offscreen .

Parameters

offscreen

A MxOffscreen

 

mx_offscreen_set_accumulation_enabled ()

void
mx_offscreen_set_accumulation_enabled (MxOffscreen *offscreen,
                                       gboolean enable);

Sets whether the accumulation buffer is enabled. When enabled, an extra offscreen buffer is allocated, and the contents of the offscreen texture are blended with this accumulation buffer. By default, the blend function is set to blend the contents of the offscreen texture with the accumulation buffer at the opacity specified in the alpha component of the blend constant. This opacity is 50% by default.

Parameters

offscreen

A MxOffscreen

 

enable

TRUE to enable an accumulation buffer

 

Since: 1.2


mx_offscreen_get_accumulation_enabled ()

gboolean
mx_offscreen_get_accumulation_enabled (MxOffscreen *offscreen);

Gets the value of the “accumulation-enabled” property.

Parameters

offscreen

A MxOffscreen

 

Returns

TRUE if the accumulation buffer is enabled

Since: 1.2


mx_offscreen_get_accumulation_material ()

CoglHandle
mx_offscreen_get_accumulation_material
                               (MxOffscreen *offscreen);

Gets the “accumulation-material” property.

Parameters

offscreen

A MxOffscreen

 

Returns

The CoglHandle for the material used for the accumulation buffer.

[transfer none]

Since: 1.2

Types and Values

struct MxOffscreen

struct MxOffscreen;

The contents of this structure is private and should only be accessed using the provided API.


struct MxOffscreenClass

struct MxOffscreenClass {
  ClutterTextureClass parent_class;

  /* vfuncs */
  void (* paint_child) (MxOffscreen *self);

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
};

Property Details

The “accumulation-enabled” property

  “accumulation-enabled”     gboolean

Enable an accumulation buffer via a secondary buffer.

Owner: MxOffscreen

Flags: Read / Write

Default value: FALSE


The “accumulation-material” property

  “accumulation-material”    gpointer

Material used for the accumulation buffer.

Owner: MxOffscreen

Flags: Read


The “auto-update” property

  “auto-update”              gboolean

Update child actor automatically when painting.

Owner: MxOffscreen

Flags: Read / Write

Default value: TRUE


The “buffer” property

  “buffer”                   gpointer

The off-screen buffer used to draw the child.

[type Cogl.Handle]

Owner: MxOffscreen

Flags: Read


The “child” property

  “child”                    ClutterActor *

Child actor of the offscreen texture.

Owner: MxOffscreen

Flags: Read / Write


The “pick-child” property

  “pick-child”               gboolean

Whether to pick the child.

Owner: MxOffscreen

Flags: Read / Write

Default value: FALSE


The “redirect-enabled” property

  “redirect-enabled”         gboolean

Enable redirection of the child actor to the off-screen surface.

Owner: MxOffscreen

Flags: Read / Write

Default value: TRUE