ClutterX11TexturePixmap

ClutterX11TexturePixmap — A texture which displays the content of an X Pixmap.

Functions

Properties

gboolean automatic-updates Read / Write
gboolean destroyed Read
gulong pixmap Read / Write
guint pixmap-depth Read
guint pixmap-height Read
guint pixmap-width Read
gulong window Read / Write
gboolean window-mapped Read
gboolean window-override-redirect Read
gboolean window-redirect-automatic Read / Write
gint window-x Read
gint window-y Read

Signals

void queue-damage-redraw Run First
void update-area Run First

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── ClutterTexture
                ╰── ClutterX11TexturePixmap

Implemented Interfaces

ClutterX11TexturePixmap implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Description

ClutterX11TexturePixmap is a class for displaying the content of an X Pixmap as a ClutterActor. Used together with the X Composite extension, it allows to display the content of X Windows inside Clutter.

The class uses the GLX_EXT_texture_from_pixmap OpenGL extension (http://people.freedesktop.org/~davidr/GLX_EXT_texture_from_pixmap.txt) if available

Functions

clutter_x11_texture_pixmap_new ()

ClutterActor *
clutter_x11_texture_pixmap_new (void);

Creates a new ClutterX11TexturePixmap which can be used to display the contents of an X11 Pixmap inside a Clutter scene graph

Returns

A new ClutterX11TexturePixmap

Since: 0.8


clutter_x11_texture_pixmap_new_with_pixmap ()

ClutterActor *
clutter_x11_texture_pixmap_new_with_pixmap
                               (Pixmap pixmap);

Creates a new ClutterX11TexturePixmap for pixmap

Parameters

pixmap

the X Pixmap to which this texture should be bound

 

Returns

A new ClutterX11TexturePixmap bound to the given X Pixmap

Since: 0.8


clutter_x11_texture_pixmap_new_with_window ()

ClutterActor *
clutter_x11_texture_pixmap_new_with_window
                               (Window window);

Creates a new ClutterX11TexturePixmap for window

Parameters

window

the X window to which this texture should be bound

 

Returns

A new ClutterX11TexturePixmap bound to the given X window.

Since: 0.8


clutter_x11_texture_pixmap_set_automatic ()

void
clutter_x11_texture_pixmap_set_automatic
                               (ClutterX11TexturePixmap *texture,
                                gboolean setting);

Enables or disables the automatic updates ot texture in case the backing pixmap or window is damaged

Parameters

texture

a ClutterX11TexturePixmap

 

setting

TRUE to enable automatic updates

 

Since: 0.8


clutter_x11_texture_pixmap_set_pixmap ()

void
clutter_x11_texture_pixmap_set_pixmap (ClutterX11TexturePixmap *texture,
                                       Pixmap pixmap);

Sets the X Pixmap to which the texture should be bound.

Parameters

texture

the texture to bind

 

pixmap

the X Pixmap to which the texture should be bound

 

Since: 0.8


clutter_x11_texture_pixmap_set_window ()

void
clutter_x11_texture_pixmap_set_window (ClutterX11TexturePixmap *texture,
                                       Window window,
                                       gboolean automatic);

Sets up a suitable pixmap for the window, using the composite and damage extensions if possible, and then calls clutter_x11_texture_pixmap_set_pixmap().

If you want to display a window in a ClutterTexture, you probably want this function, or its older sister, clutter_glx_texture_pixmap_set_window().

This function has no effect unless the XComposite extension is available.

Parameters

texture

the texture to bind

 

window

the X window to which the texture should be bound

 

automatic

TRUE for automatic window updates, FALSE for manual.

 

Since: 0.8


clutter_x11_texture_pixmap_sync_window ()

void
clutter_x11_texture_pixmap_sync_window
                               (ClutterX11TexturePixmap *texture);

Resets the texture's pixmap from its window, perhaps in response to the pixmap's invalidation as the window changed size.

Parameters

texture

the texture to bind

 

Since: 0.8


clutter_x11_texture_pixmap_update_area ()

void
clutter_x11_texture_pixmap_update_area
                               (ClutterX11TexturePixmap *texture,
                                gint x,
                                gint y,
                                gint width,
                                gint height);

Performs the actual binding of texture to the current content of the pixmap. Can be called to update the texture if the pixmap content has changed.

Parameters

texture

The texture whose content shall be updated.

 

x

the X coordinate of the area to update

 

y

the Y coordinate of the area to update

 

width

the width of the area to update

 

height

the height of the area to update

 

Since: 0.8

Types and Values

struct ClutterX11TexturePixmap

struct ClutterX11TexturePixmap;

The ClutterX11TexturePixmap structure contains only private data

Since: 0.8


struct ClutterX11TexturePixmapClass

struct ClutterX11TexturePixmapClass {
  void (* update_area) (ClutterX11TexturePixmap *texture,
                        gint                     x,
                        gint                     y,
                        gint                     width,
                        gint                     height);
};

The ClutterX11TexturePixmapClass structure contains only private data

Members

update_area ()

virtual function for updating the area of the texture

 

Since: 0.8


ClutterX11TexturePixmapPrivate

typedef struct _ClutterX11TexturePixmapPrivate ClutterX11TexturePixmapPrivate;

Property Details

The “automatic-updates” property

  “automatic-updates”        gboolean

If the texture should be kept in sync with any pixmap changes.

Owner: ClutterX11TexturePixmap

Flags: Read / Write

Default value: FALSE


The “destroyed” property

  “destroyed”                gboolean

If window has been destroyed.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: FALSE


The “pixmap” property

  “pixmap”                   gulong

The X11 Pixmap to be bound.

Owner: ClutterX11TexturePixmap

Flags: Read / Write


The “pixmap-depth” property

  “pixmap-depth”             guint

The depth (in number of bits) of the pixmap bound to this texture.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: 0


The “pixmap-height” property

  “pixmap-height”            guint

The height of the pixmap bound to this texture.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: 0


The “pixmap-width” property

  “pixmap-width”             guint

The width of the pixmap bound to this texture.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: 0


The “window” property

  “window”                   gulong

The X11 Window to be bound.

Owner: ClutterX11TexturePixmap

Flags: Read / Write


The “window-mapped” property

  “window-mapped”            gboolean

If window is mapped.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: FALSE


The “window-override-redirect” property

  “window-override-redirect” gboolean

If this is an override-redirect window.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: FALSE


The “window-redirect-automatic” property

  “window-redirect-automatic” gboolean

If composite window redirects are set to Automatic (or Manual if false).

Owner: ClutterX11TexturePixmap

Flags: Read / Write

Default value: TRUE


The “window-x” property

  “window-x”                 gint

X position of window on screen according to X11.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: 0


The “window-y” property

  “window-y”                 gint

Y position of window on screen according to X11.

Owner: ClutterX11TexturePixmap

Flags: Read

Default value: 0

Signal Details

The “queue-damage-redraw” signal

void
user_function (ClutterX11TexturePixmap *texture,
               gint                     x,
               gint                     y,
               gint                     width,
               gint                     height,
               gpointer                 user_data)

::queue-damage-redraw is emitted to notify that some sub-region of the texture has been changed (either by an automatic damage update or by an explicit call to clutter_x11_texture_pixmap_update_area). This usually means a redraw needs to be queued for the actor.

The default handler will queue a clipped redraw in response to the damage, using the assumption that the pixmap is being painted to a rectangle covering the transformed allocation of the actor. If you sub-class and change the paint method so this isn't true then you must also provide your own damage signal handler to queue a redraw that blocks this default behaviour.

Parameters

texture

the object which received the signal

 

x

The top left x position of the damage region

 

y

The top left y position of the damage region

 

width

The width of the damage region

 

height

The height of the damage region

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

Since: 1.2


The “update-area” signal

void
user_function (ClutterX11TexturePixmap *texture,
               gint                     x,
               gint                     y,
               gint                     width,
               gint                     height,
               gpointer                 user_data)

The ::update-area signal is emitted to ask the texture to update its content from its source pixmap.

Parameters

texture

the object which received the signal

 

x

X coordinate of the area to update

 

y

Y coordinate of the area to update

 

width

width of the area to update

 

height

height of the area to update

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

Since: 0.8