![]() |
![]() |
![]() |
clutk Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#include <ctk-button.h> CtkImage; CtkImageClass; CtkImagePrivate; enum CtkImageType; ClutterActor * ctk_image_new (guint size
); ClutterActor * ctk_image_new_from_pixbuf (guint size
,GdkPixbuf *pixbuf
); ClutterActor * ctk_image_new_from_stock (guint size
,const gchar *stock_id
); ClutterActor * ctk_image_new_from_icon_name (guint size
,const gchar *icon_name
); ClutterActor * ctk_image_new_from_gicon (guint size
,GIcon *icon
); ClutterActor * ctk_image_new_from_filename (guint size
,const gchar *filename
); CtkImageType ctk_image_get_image_storage_type (CtkImage *image
); void ctk_image_set_size (CtkImage *image
,guint size
); guint ctk_image_get_size (CtkImage *image
); void ctk_image_set_from_pixbuf (CtkImage *image
,GdkPixbuf *pixbuf
); void ctk_image_set_from_stock (CtkImage *image
,const gchar *stock_id
); void ctk_image_set_from_icon_name (CtkImage *image
,const gchar *icon_name
); void ctk_image_set_from_gicon (CtkImage *image
,GIcon *icon
); void ctk_image_set_from_filename (CtkImage *image
,const gchar *filename
); GdkPixbuf * ctk_image_get_pixbuf (CtkImage *image
); const gchar * ctk_image_get_stock (CtkImage *image
); const gchar * ctk_image_get_icon_name (CtkImage *image
); GIcon * ctk_image_get_gicon (CtkImage *image
); const gchar * ctk_image_get_filename (CtkImage *image
);
"filename" gchar* : Read / Write "gicon" GIcon* : Read / Write "icon-name" gchar* : Read / Write "pixbuf" GdkPixbuf* : Read / Write "size" gint : Read / Write "stock-id" gchar* : Read / Write
CtkImage is designed to present graphical images whist being able to load from intelligent sources such as stock icons and icon names
typedef enum { CTK_IMAGE_EMPTY, CTK_IMAGE_PIXBUF, CTK_IMAGE_STOCK, CTK_IMAGE_ICON_NAME, CTK_IMAGE_GICON, CTK_IMAGE_FILENAME } CtkImageType;
ClutterActor * ctk_image_new (guint size
);
Creates a new Ctk of the given size
|
the size of the resulting image |
Returns : |
a CtkImage |
ClutterActor * ctk_image_new_from_pixbuf (guint size
,GdkPixbuf *pixbuf
);
Creates a new CtkImage object based on the data in pixbuf
|
the size of the image in pixels |
|
a GdkPixbuf object |
Returns : |
a new CtkImage |
ClutterActor * ctk_image_new_from_stock (guint size
,const gchar *stock_id
);
Creates a new CtkImage based on the stock_id
provided, see GtkStockItem
|
the size of the image in pixels |
|
a string containing the stock id name |
Returns : |
a new CtkImage |
ClutterActor * ctk_image_new_from_icon_name (guint size
,const gchar *icon_name
);
Uses a "named icon" to create a new CtkImage object
|
the size of the image in pixels |
|
a string containing the icon name |
Returns : |
a new ClutterActor |
ClutterActor * ctk_image_new_from_gicon (guint size
,GIcon *icon
);
Creates a new CtkImage object based on the data in the provided GIcon icon
|
the size of the image in pixels |
|
a GIcon object containing the icon |
Returns : |
a new CtkImage |
ClutterActor * ctk_image_new_from_filename (guint size
,const gchar *filename
);
Creates a new CtkImage from the image containined at filename
|
the size of the image in pixels |
|
the filename of the image |
Returns : |
a new CtkImage |
CtkImageType ctk_image_get_image_storage_type (CtkImage *image
);
Retrives the storage type used to create/set the CtkImage object
|
A CtkImage |
Returns : |
a CtkImageType object |
void ctk_image_set_size (CtkImage *image
,guint size
);
Sets the size of image
to the given size
|
A CtkImage |
|
size in pixels of the image |
guint ctk_image_get_size (CtkImage *image
);
Retrives the current size in pixels of image
|
A CtkImage object |
Returns : |
a uint, 0 if image is invalid
|
void ctk_image_set_from_pixbuf (CtkImage *image
,GdkPixbuf *pixbuf
);
sets image
to use pixbuf
for its image data
see ctk_image_new_from_pixbuf()
|
A CtkImage object |
|
A GdkPixbuf object |
void ctk_image_set_from_stock (CtkImage *image
,const gchar *stock_id
);
sets a CtkImage to display a stock icon
see ctk_image_new_from_stock()
|
a CtkImage |
|
a gchar referencing the stock image id |
void ctk_image_set_from_icon_name (CtkImage *image
,const gchar *icon_name
);
Sets image
to use the image data supplied with the given icon_name
see: ctk_image_new_from_icon_name()
;
|
A CtkImage |
|
a string representation of the icon name |
void ctk_image_set_from_gicon (CtkImage *image
,GIcon *icon
);
Sets image
to use icon
as its image data
see: ctk_image_new_from_gicon()
|
a CtkImage |
|
A GIcon object |
void ctk_image_set_from_filename (CtkImage *image
,const gchar *filename
);
Sets image
to use filename
as its iamge data
|
a CtkImage |
|
a string representation of the filename |
const gchar * ctk_image_get_icon_name (CtkImage *image
);
|
|
Returns : |
"filename"
property "filename" gchar* : Read / Write
Filename to display image of.
Default value: NULL
"icon-name"
property "icon-name" gchar* : Read / Write
Icon name of icon to display.
Default value: NULL
"size"
property "size" gint : Read / Write
Size of image.
Allowed values: >= 0
Default value: 48