mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-texture.c: Small clean ups in the coding style.
This commit is contained in:
parent
6846235793
commit
0ca514a35f
@ -1,3 +1,7 @@
|
|||||||
|
2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-texture.c: Small clean ups in the coding style.
|
||||||
|
|
||||||
2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter.symbols: Add new symbols
|
* clutter.symbols: Add new symbols
|
||||||
|
@ -1564,7 +1564,7 @@ clutter_texture_set_from_rgb_data (ClutterTexture *texture,
|
|||||||
g_signal_emit (texture, texture_signals[PIXBUF_CHANGE], 0);
|
g_signal_emit (texture, texture_signals[PIXBUF_CHANGE], 0);
|
||||||
|
|
||||||
/* If resized actor may need resizing but paint() will do this */
|
/* If resized actor may need resizing but paint() will do this */
|
||||||
if (CLUTTER_ACTOR_IS_MAPPED (CLUTTER_ACTOR(texture)))
|
if (CLUTTER_ACTOR_IS_MAPPED (texture))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (texture));
|
||||||
|
|
||||||
if (copy_data != NULL)
|
if (copy_data != NULL)
|
||||||
@ -1729,10 +1729,10 @@ clutter_texture_set_pixbuf (ClutterTexture *texture,
|
|||||||
{
|
{
|
||||||
ClutterTexturePrivate *priv;
|
ClutterTexturePrivate *priv;
|
||||||
|
|
||||||
priv = texture->priv;
|
|
||||||
|
|
||||||
g_return_val_if_fail (pixbuf != NULL, FALSE);
|
g_return_val_if_fail (pixbuf != NULL, FALSE);
|
||||||
|
|
||||||
|
priv = texture->priv;
|
||||||
|
|
||||||
return clutter_texture_set_from_rgb_data (texture,
|
return clutter_texture_set_from_rgb_data (texture,
|
||||||
gdk_pixbuf_get_pixels (pixbuf),
|
gdk_pixbuf_get_pixels (pixbuf),
|
||||||
gdk_pixbuf_get_has_alpha (pixbuf),
|
gdk_pixbuf_get_has_alpha (pixbuf),
|
||||||
@ -1755,11 +1755,7 @@ clutter_texture_set_pixbuf (ClutterTexture *texture,
|
|||||||
ClutterActor*
|
ClutterActor*
|
||||||
clutter_texture_new_from_pixbuf (GdkPixbuf *pixbuf)
|
clutter_texture_new_from_pixbuf (GdkPixbuf *pixbuf)
|
||||||
{
|
{
|
||||||
ClutterTexture *texture;
|
return g_object_new (CLUTTER_TYPE_TEXTURE, "pixbuf", pixbuf, NULL);
|
||||||
|
|
||||||
texture = g_object_new (CLUTTER_TYPE_TEXTURE, "pixbuf", pixbuf, NULL);
|
|
||||||
|
|
||||||
return CLUTTER_ACTOR(texture);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1789,11 +1785,13 @@ clutter_texture_get_base_size (ClutterTexture *texture,
|
|||||||
gint *width,
|
gint *width,
|
||||||
gint *height)
|
gint *height)
|
||||||
{
|
{
|
||||||
|
g_return_if_fail (CLUTTER_IS_TEXTURE (texture));
|
||||||
|
|
||||||
/* Attempt to realize, mainly for subclasses ( such as labels )
|
/* Attempt to realize, mainly for subclasses ( such as labels )
|
||||||
* which may not create pixbuf data and thus base size until
|
* which may not create pixbuf data and thus base size until
|
||||||
* realization happens.
|
* realization happens.
|
||||||
*/
|
*/
|
||||||
if (!CLUTTER_ACTOR_IS_REALIZED(CLUTTER_ACTOR(texture)))
|
if (!CLUTTER_ACTOR_IS_REALIZED (texture))
|
||||||
clutter_actor_realize (CLUTTER_ACTOR (texture));
|
clutter_actor_realize (CLUTTER_ACTOR (texture));
|
||||||
|
|
||||||
if (width)
|
if (width)
|
||||||
@ -1843,6 +1841,8 @@ clutter_texture_get_n_tiles (ClutterTexture *texture,
|
|||||||
gint *n_x_tiles,
|
gint *n_x_tiles,
|
||||||
gint *n_y_tiles)
|
gint *n_y_tiles)
|
||||||
{
|
{
|
||||||
|
g_return_if_fail (CLUTTER_IS_TEXTURE (texture));
|
||||||
|
|
||||||
if (n_x_tiles)
|
if (n_x_tiles)
|
||||||
*n_x_tiles = texture->priv->n_x_tiles;
|
*n_x_tiles = texture->priv->n_x_tiles;
|
||||||
|
|
||||||
@ -1871,16 +1871,21 @@ clutter_texture_get_x_tile_detail (ClutterTexture *texture,
|
|||||||
gint *size,
|
gint *size,
|
||||||
gint *waste)
|
gint *waste)
|
||||||
{
|
{
|
||||||
|
ClutterTexturePrivate *priv;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_TEXTURE (texture));
|
||||||
g_return_if_fail (x_index < texture->priv->n_x_tiles);
|
g_return_if_fail (x_index < texture->priv->n_x_tiles);
|
||||||
|
|
||||||
|
priv = texture->priv;
|
||||||
|
|
||||||
if (pos)
|
if (pos)
|
||||||
*pos = texture->priv->x_tiles[x_index].pos;
|
*pos = priv->x_tiles[x_index].pos;
|
||||||
|
|
||||||
if (size)
|
if (size)
|
||||||
*size = texture->priv->x_tiles[x_index].size;
|
*size = priv->x_tiles[x_index].size;
|
||||||
|
|
||||||
if (waste)
|
if (waste)
|
||||||
*waste = texture->priv->x_tiles[x_index].waste;
|
*waste = priv->x_tiles[x_index].waste;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1937,7 +1942,7 @@ clutter_texture_has_generated_tiles (ClutterTexture *texture)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_TEXTURE (texture), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_TEXTURE (texture), FALSE);
|
||||||
|
|
||||||
return (texture->priv->tiles != NULL);
|
return texture->priv->tiles != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2308,12 +2313,12 @@ on_fbo_parent_change (ClutterActor *actor,
|
|||||||
* sized large enough to contain any child tranformations.</para>
|
* sized large enough to contain any child tranformations.</para>
|
||||||
* </listitem>
|
* </listitem>
|
||||||
* <listitem>
|
* <listitem>
|
||||||
* <para>Uploading pixel data to the texture (e.g by
|
* <para>Uploading pixel data to the texture (e.g by using
|
||||||
* #clutter_actor_set_pixbuf) will destroy the offscreen texture data
|
* clutter_actor_set_pixbuf()) will destroy the offscreen texture data
|
||||||
* and end redirection.</para>
|
* and end redirection.</para>
|
||||||
* </listitem>
|
* </listitem>
|
||||||
* <listitem>
|
* <listitem>
|
||||||
* <para>#clutter_texture_get_pixbuf can be used to read the offscreen
|
* <para>clutter_texture_get_pixbuf() can be used to read the offscreen
|
||||||
* texture pixels into a pixbuf.</para>
|
* texture pixels into a pixbuf.</para>
|
||||||
* </listitem>
|
* </listitem>
|
||||||
* </itemizedlist>
|
* </itemizedlist>
|
||||||
|
Loading…
Reference in New Issue
Block a user