| Guifications Library Reference Manual |
|---|
GfItemGfItem — GfItem Object API |
GfItem;
enum GfItemPosition;
void gf_item_set_notification (GfItem *item,
GfNotification *notification);
GfNotification* gf_item_get_notification (const GfItem *item);
void gf_item_set_position (GfItem *item,
GfItemPosition position);
GfItemPosition gf_item_get_position (const GfItem *item);
void gf_item_set_horizontal_offset_value
(GfItem *item,
gint offset);
gint gf_item_get_horizontal_offset_value
(const GfItem *item);
void gf_item_set_horizontal_offset_percentage
(GfItem *item,
gboolean percentage);
gboolean gf_item_get_horizontal_offset_percentage
(const GfItem *item);
void gf_item_set_vertical_offset_value
(GfItem *item,
gint offset);
gint gf_item_get_vertical_offset_value
(const GfItem *item);
void gf_item_set_vertical_offset_percentage
(GfItem *item,
gboolean percentage);
gboolean gf_item_get_vertical_offset_percentage
(const GfItem *item);
void gf_item_get_render_position (const GfItem *item,
gint *x,
gint *y,
gint width,
gint height,
gint dest_width,
gint dest_height);
void gf_item_render (const GfItem *item,
GfDrawable *drawable);
#define gf_item_position_from_string (str)
#define gf_item_position_to_string (position, i18n)
"h-off-per" gboolean : Read / Write "h-off-val" gint : Read / Write "notification" GfNotification : Read / Write "position" GfItemPosition : Read / Write "v-off-per" gboolean : Read / Write "v-off-val" gint : Read / Write
typedef struct _GfItem GfItem;
GfItem is an opaque structure that should not be used directly.
typedef enum _GfItemPosition {
GF_ITEM_POSITION_UNKNOWN = 0,
GF_ITEM_POSITION_NW,
GF_ITEM_POSITION_N,
GF_ITEM_POSITION_NE,
GF_ITEM_POSITION_W,
GF_ITEM_POSITION_C,
GF_ITEM_POSITION_E,
GF_ITEM_POSITION_SW,
GF_ITEM_POSITION_S,
GF_ITEM_POSITION_SE,
GF_ITEM_POSITION_NORTH_WEST = GF_ITEM_POSITION_NW,
GF_ITEM_POSITION_NORTH = GF_ITEM_POSITION_N,
GF_ITEM_POSITION_NORTH_EAST = GF_ITEM_POSITION_NE,
GF_ITEM_POSITION_WEST = GF_ITEM_POSITION_W,
GF_ITEM_POSITION_CENTER = GF_ITEM_POSITION_C,
GF_ITEM_POSITION_EAST = GF_ITEM_POSITION_E,
GF_ITEM_POSITION_SOUTH_WEST = GF_ITEM_POSITION_SW,
GF_ITEM_POSITION_SOUTH = GF_ITEM_POSITION_S,
GF_ITEM_POSITION_SOUTH_EAST = GF_ITEM_POSITION_SE,
GF_ITEM_POSITIONS
} GfItemPosition;
The possible positions for a GfItem.
GF_ITEM_POSITION_UNKNOWN |
Unknown |
GF_ITEM_POSITION_NW |
North West |
GF_ITEM_POSITION_N |
North |
GF_ITEM_POSITION_NE |
North East |
GF_ITEM_POSITION_W |
West |
GF_ITEM_POSITION_C |
Center |
GF_ITEM_POSITION_E |
East |
GF_ITEM_POSITION_SW |
South West |
GF_ITEM_POSITION_S |
South |
GF_ITEM_POSITION_SE |
South East |
GF_ITEM_POSITION_NORTH_WEST |
North West |
GF_ITEM_POSITION_NORTH |
North |
GF_ITEM_POSITION_NORTH_EAST |
North East |
GF_ITEM_POSITION_WEST |
West |
GF_ITEM_POSITION_CENTER |
Center |
GF_ITEM_POSITION_EAST |
East |
GF_ITEM_POSITION_SOUTH_WEST |
South West |
GF_ITEM_POSITION_SOUTH |
South |
GF_ITEM_POSITION_SOUTH_EAST |
South East |
GF_ITEM_POSITIONS |
Total Positions |
void gf_item_set_notification (GfItem *item, GfNotification *notification);
Sets the GfNotification that item belongs to.
item : |
The GfItem instance. |
notification : |
The GfNotification instance. |
GfNotification* gf_item_get_notification (const GfItem *item);
Gets the GfNotification that item belongs to.
item : |
The GfItem instance. |
| Returns : | The GfNotification that item belongs to.
|
void gf_item_set_position (GfItem *item, GfItemPosition position);
Sets the GfItemPosition for item.
item : |
The GfItem instance. |
position : |
The new position. |
GfItemPosition gf_item_get_position (const GfItem *item);
Gets the GfItemPosition for item.
item : |
The GfItem instance. |
| Returns : | The GfItemPosition for item.
|
void gf_item_set_horizontal_offset_value
(GfItem *item,
gint offset);
Sets the horizontal offset value for item.
item : |
The GfItem instance. |
offset : |
The new offset. |
gint gf_item_get_horizontal_offset_value
(const GfItem *item);
Gets the horizontal offset value for item.
item : |
The GfItem instance. |
| Returns : | The horizontal offset value for item.
|
void gf_item_set_horizontal_offset_percentage
(GfItem *item,
gboolean percentage);
Sets whether or not the horizontal offset is a percentage.
item : |
The GfItem instance. |
percentage : |
The percentage value. |
gboolean gf_item_get_horizontal_offset_percentage
(const GfItem *item);
Gets whether or not the horizontal offset is a percentage.
item : |
The GfItem instance. |
| Returns : | TRUE if the horizontal offset is a percentage. |
void gf_item_set_vertical_offset_value
(GfItem *item,
gint offset);
Sets the vertical offset value for item.
item : |
The GfItem instance. |
offset : |
The new offset. |
gint gf_item_get_vertical_offset_value
(const GfItem *item);
Gets the vertical offset value for item.
item : |
The GfItem instance. |
| Returns : | The vertical offset value for item.
|
void gf_item_set_vertical_offset_percentage
(GfItem *item,
gboolean percentage);
Sets whether or not the vertical offset value for item is a percentage.
item : |
The GfItem instance. |
percentage : |
The percentage. |
gboolean gf_item_get_vertical_offset_percentage
(const GfItem *item);
Gets whether or not the vertical offset value for item is a percentage.
item : |
The GfItem instance. |
| Returns : | TRUE if the vertical offset value is a percentage. |
void gf_item_get_render_position (const GfItem *item, gint *x, gint *y, gint width, gint height, gint dest_width, gint dest_height);
Gets the x and y-coordinates for rendering item.
item : |
The GfItem instance. |
x : |
The return address for the x-coordinate. |
y : |
The return address for the y-coordinate. |
width : |
The width of item.
|
height : |
The height of item.
|
dest_width : |
The width of the GfDrawable. |
dest_height : |
The height of the GfDrawable. |
void gf_item_render (const GfItem *item, GfDrawable *drawable);
Renders item onto drawable.
item : |
The GfItem instance. |
drawable : |
The GfDrawable instance. |
#define gf_item_position_from_string(str)
Gets a GfItemPosition from a string.
str : |
The string. |
| Returns : | The GfItemPosition. |
#define gf_item_position_to_string(position, i18n)
Gets a string from a GfItemPosition.
position : |
The GfItemPosition. |
i18n : |
TRUE for the translated version. |
| Returns : |
position as a string.
|
h-off-per" property"h-off-per" gboolean : Read / Write
If the horizontal offset is a percentage.
Default value: FALSE
h-off-val" property"h-off-val" gint : Read / Write
The horizontal offset value of the item.
Allowed values: [-512,512]
Default value: 0
notification" property"notification" GfNotification : Read / Write
The parent notification of this item.
position" property"position" GfItemPosition : Read / Write
The position of the item.
Default value: Unknown Position
v-off-per" property"v-off-per" gboolean : Read / Write
If the vertical offset is a percentage.
Default value: FALSE
| << GfNotification | GfItemShape >> |