![]() |
![]() |
![]() |
Clutter-Gtk 0.8.1 Reference Manual | ![]() |
---|---|---|---|---|
enum ClutterGtkInitError; ClutterInitError gtk_clutter_init (gint *argc, gchar ***argv); void gtk_clutter_get_fg_color (GtkWidget *widget, GtkStateType state, ClutterColor *color); void gtk_clutter_get_bg_color (GtkWidget *widget, GtkStateType state, ClutterColor *color); void gtk_clutter_get_text_color (GtkWidget *widget, GtkStateType state, ClutterColor *color); void gtk_clutter_get_base_color (GtkWidget *widget, GtkStateType state, ClutterColor *color); ClutterActor* gtk_clutter_texture_new_from_pixbuf (GdkPixbuf *pixbuf); ClutterActor* gtk_clutter_texture_new_from_stock (GtkWidget *widget, const gchar *stock_id, GtkIconSize size); ClutterActor* gtk_clutter_texture_new_from_icon_name (GtkWidget *widget, const gchar *icon_name, GtkIconSize size); void gtk_clutter_texture_set_from_pixbuf (ClutterTexture *texture, GdkPixbuf *pixbuf); void gtk_clutter_texture_set_from_stock (ClutterTexture *texture, GtkWidget *widget, const gchar *stock_id, GtkIconSize size); void gtk_clutter_texture_set_from_icon_name (ClutterTexture *texture, GtkWidget *widget, const gchar *icon_name, GtkIconSize size);
In order to properly integrate a Clutter scene into a GTK+ applications a certain degree of state must be retrieved from GTK+ itself.
Clutter-GTK provides API for easing the process of synchronizing colors with the current GTK+ theme and for loading image sources from GdkPixbuf, GTK+ stock items and icon themes.
typedef enum { CLUTTER_INIT_ERROR_LAST = CLUTTER_INIT_ERROR_INTERNAL, CLUTTER_INIT_ERROR_GTK = (CLUTTER_INIT_ERROR_LAST - 1) } ClutterGtkInitError;
Extension of the ClutterInitError enumeration for the integration with GTK+
Since 0.8
ClutterInitError gtk_clutter_init (gint *argc, gchar ***argv);
This function should be called instead of clutter_init()
and
gtk_init()
.
|
pointer to the arguments count, or NULL
|
|
pointer to the arguments vector, or NULL
|
Returns : |
CLUTTER_INIT_SUCCESS on success, a negative integer
on failure.
|
Since 0.8
void gtk_clutter_get_fg_color (GtkWidget *widget, GtkStateType state, ClutterColor *color);
Retrieves the foreground color of widget
for the given state
and copies
it into color
.
|
a GtkWidget |
|
a state |
|
return location for a ClutterColor |
Since 0.8
void gtk_clutter_get_bg_color (GtkWidget *widget, GtkStateType state, ClutterColor *color);
Retrieves the background color of widget
for the given state
and copies
it into color
.
|
a GtkWidget |
|
a state |
|
return location for a ClutterColor |
Since 0.8
void gtk_clutter_get_text_color (GtkWidget *widget, GtkStateType state, ClutterColor *color);
Retrieves the text color of widget
for the given state
and copies it
into color
.
|
a GtkWidget |
|
a state |
|
return location for a ClutterColor |
Since 0.8
void gtk_clutter_get_base_color (GtkWidget *widget, GtkStateType state, ClutterColor *color);
Retrieves the base color of widget
for the given state
and copies it
into color
.
|
a GtkWidget |
|
a state |
|
return location for a ClutterColor |
Since 0.8
ClutterActor* gtk_clutter_texture_new_from_pixbuf (GdkPixbuf *pixbuf);
Creates a new ClutterTexture and sets its contents with a copy
of pixbuf
.
|
a GdkPixbuf |
Returns : |
the newly created ClutterTexture |
Since 0.8
ClutterActor* gtk_clutter_texture_new_from_stock (GtkWidget *widget, const gchar *stock_id, GtkIconSize size);
Creates a new ClutterTexture and sets its contents using the stock
icon stock_id
as rendered by widget
.
|
a GtkWidget |
|
the stock id of the icon |
|
the size of the icon, or -1 |
Returns : |
the newly created ClutterTexture |
Since 0.8
ClutterActor* gtk_clutter_texture_new_from_icon_name (GtkWidget *widget, const gchar *icon_name, GtkIconSize size);
Creates a new ClutterTexture and sets its contents to be
the icon_name
from the current icon theme.
|
a GtkWidget or NULL
|
|
the name of the icon |
|
the size of the icon, or -1 |
Returns : |
the newly created texture, or NULL if widget
was NULL and icon_name was not found.
|
Since 0.8
void gtk_clutter_texture_set_from_pixbuf (ClutterTexture *texture, GdkPixbuf *pixbuf);
Sets the contents of texture
with a copy of pixbuf
.
|
a ClutterTexture |
|
a GdkPixbuf |
Since 0.8
void gtk_clutter_texture_set_from_stock (ClutterTexture *texture, GtkWidget *widget, const gchar *stock_id, GtkIconSize size);
Sets the contents of texture
using the stock icon stock_id
, as
rendered by widget
.
|
a ClutterTexture |
|
a GtkWidget |
|
the stock id of the icon |
|
the size of the icon, or -1 |
Since 0.8
void gtk_clutter_texture_set_from_icon_name (ClutterTexture *texture, GtkWidget *widget, const gchar *icon_name, GtkIconSize size);
Sets the contents of texture
using the icon_name
from the
current icon theme.
|
a ClutterTexture |
|
a GtkWidget or NULL
|
|
the name of the icon |
|
the icon size or -1 |
Since 0.8