libhildondesktop 2.0 Reference Manual | ||||
---|---|---|---|---|
HildonDesktopHomeItemHildonDesktopHomeItem — A widget to be used as base class for the HildonHomeArea children |
#define HILDON_DESKTOP_TYPE_HOME_ITEM_RESIZE_TYPE enum HildonDesktopHomeItemResizeType; HildonDesktopHomeItem; GType hildon_desktop_home_item_get_type (void); GtkWidget* hildon_desktop_home_item_new (void); void hildon_desktop_home_item_set_resize_type (HildonDesktopHomeItem *item, HildonDesktopHomeItemResizeType resize_type); HildonDesktopHomeItemResizeType hildon_desktop_home_item_get_resize_type (HildonDesktopHomeItem *item); GtkWidget* hildon_desktop_home_item_get_settings_menu_item (HildonDesktopHomeItem *item); void hildon_desktop_home_item_set_is_background (HildonDesktopHomeItem *item, gboolean is_background); void hildon_desktop_home_item_raise (HildonDesktopHomeItem *item); void hildon_desktop_home_item_lower (HildonDesktopHomeItem *item);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----HildonDesktopItem +----HildonDesktopHomeItem
"minimum-height" gint : Read / Write "minimum-width" gint : Read / Write "resize-type" HildonDesktopHomeItemResizeType : Read / Write "state" gint : Read / Write
The HildonDesktopHomeItem is the base class implemented by Home plugin writers. It implements the dragging and resizing of the item.
It also provides commodities for the plugin writer to know whether
the item is in foreground or background, and allows providing
a GtkMenuItem
, which when activated can open a "settings" dialog for
the item.
typedef enum { HILDON_DESKTOP_HOME_ITEM_RESIZE_NONE, HILDON_DESKTOP_HOME_ITEM_RESIZE_VERTICAL, HILDON_DESKTOP_HOME_ITEM_RESIZE_HORIZONTAL, HILDON_DESKTOP_HOME_ITEM_RESIZE_BOTH } HildonDesktopHomeItemResizeType;
Enum values used to specify how a HildonDesktopHomeItem can be resized.
GType hildon_desktop_home_item_get_type (void);
Registers and returns the GType for HildonDesktopHomeItem
Returns : | the GType for HildonDesktopHomeItem |
GtkWidget* hildon_desktop_home_item_new (void);
Creates a new HildonDesktopHomeItem.
Returns : | A new HildonDesktopHomeItem. |
void hildon_desktop_home_item_set_resize_type (HildonDesktopHomeItem *item, HildonDesktopHomeItemResizeType resize_type);
Sets whether the item can be resized horizontally, vertically, both, or if it cannot be resized.
item : |
A HildonDesktopHomeItem. |
resize_type : |
A HildonDesktopHomeItemResizeType |
HildonDesktopHomeItemResizeType hildon_desktop_home_item_get_resize_type (HildonDesktopHomeItem *item);
Returns whether the item is set to be resized horizontally, vertically, both, or if it cannot be resized.
item : |
A HildonDesktopHomeItem. |
Returns : | The resize type for the item. |
GtkWidget* hildon_desktop_home_item_get_settings_menu_item (HildonDesktopHomeItem *item);
Returns a menu item which can be used to show a dialog with settings related to this item. If the item has no settings, the function returns NULL.
item : |
A HildonDesktopHomeItem. |
Returns : | A GtkMenuItem to use for settings, or NULL |
void hildon_desktop_home_item_set_is_background (HildonDesktopHomeItem *item, gboolean is_background);
Sets whether or not the item is currently in the background. If in the background, the item is expected to reduce its activity, for instance by stopping animations.
item : |
A HildonDesktopHomeItem. |
is_background : |
Whether or not the item is in the background |
void hildon_desktop_home_item_raise (HildonDesktopHomeItem *item);
Raises the item above all its siblings.
item : |
A HildonDesktopHomeItem. |
void hildon_desktop_home_item_lower (HildonDesktopHomeItem *item);
Lowers the item above all its siblings.
item : |
A HildonDesktopHomeItem. |
"minimum-height"
property"minimum-height" gint : Read / Write
Minimum height for this applet.
Allowed values: >= -1
Default value: -1
"minimum-width"
property"minimum-width" gint : Read / Write
Minimum width for this applet.
Allowed values: >= -1
Default value: -1
"resize-type"
property"resize-type" HildonDesktopHomeItemResizeType : Read / Write
Whether the applet can be resized vertically, horizontally, or both.
Default value: HILDON_DESKTOP_HOME_ITEM_RESIZE_NONE
"background"
signalvoid user_function (HildonDesktopHomeItem *widget, gpointer user_data) : Run First
The ::background signal is emitted when the Home View has gone in the background. The widget should reduce its activity to save energy, for instance stop animations.
widget : |
the widget that received the signal |
user_data : |
user data set when the signal handler was connected. |
"foreground"
signalvoid user_function (HildonDesktopHomeItem *widget, gpointer user_data) : Run First
The ::foreground signal is emitted when the Home View has comes back in the foreground.
widget : |
the widget that received the signal |
user_data : |
user data set when the signal handler was connected. |
"settings"
signalGtkWidget* user_function (HildonDesktopHomeItem *widget, GtkWidget *returns, gpointer user_data) : Run Last
The ::settings signal is emitted when the desktop requests the item for a "Settings" menu item. The item can provide such a menu item, which when activated shows a settings dialog.
widget : |
the widget that received the signal |
returns : |
A GtkMenuItem, or NULL. |
user_data : |
user data set when the signal handler was connected. |