mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
image: Add get_texture()
Allow retrieving the Cogl texture used by the ClutterImage.
This commit is contained in:
parent
9845ce9d89
commit
2be850f441
@ -30,6 +30,10 @@
|
||||
* #ClutterImage is a #ClutterContent implementation that displays
|
||||
* image data.
|
||||
*
|
||||
* <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../tests/interactive/test-image-box.c">
|
||||
* <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
* </xi:include>
|
||||
*
|
||||
* #ClutterImage is available since Clutter 1.10.
|
||||
*/
|
||||
|
||||
@ -37,6 +41,8 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
#include "clutter-image.h"
|
||||
|
||||
#include "clutter-color.h"
|
||||
@ -226,3 +232,22 @@ clutter_image_set_data (ClutterImage *image,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_image_get_texture:
|
||||
* @image: a #ClutterImage
|
||||
*
|
||||
* Retrieves a pointer to the Cogl texture used by @image.
|
||||
*
|
||||
* Return value: (transfer none): a pointer to the Cogl texture, or %NULL
|
||||
*
|
||||
* Since: 1.10
|
||||
* Stability: unstable
|
||||
*/
|
||||
CoglTexture *
|
||||
clutter_image_get_texture (ClutterImage *image)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_IMAGE (image), NULL);
|
||||
|
||||
return image->priv->texture;
|
||||
}
|
||||
|
@ -96,6 +96,10 @@ gboolean clutter_image_set_data (ClutterImage *image
|
||||
guint row_stride,
|
||||
GError **error);
|
||||
|
||||
#if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
|
||||
CoglTexture * clutter_image_get_texture (ClutterImage *image);
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_IMAGE_H__ */
|
||||
|
@ -731,6 +731,7 @@ clutter_group_new
|
||||
clutter_group_remove_all
|
||||
clutter_image_error_get_type
|
||||
clutter_image_error_quark
|
||||
clutter_image_get_texture
|
||||
clutter_image_get_type
|
||||
clutter_image_new
|
||||
clutter_image_set_data
|
||||
|
@ -3157,6 +3157,7 @@ ClutterImageClass
|
||||
ClutterImageError
|
||||
clutter_image_new
|
||||
clutter_image_set_data
|
||||
clutter_image_get_texture
|
||||
<SUBSECTION Standard>
|
||||
CLUTTER_TYPE_IMAGE
|
||||
CLUTTER_IMAGE
|
||||
|
Loading…
Reference in New Issue
Block a user