00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00030 #ifndef HILDON_STATUS_BAR_ITEM_H
00031 #define HILDON_STATUS_BAR_ITEM_H
00032
00033 #include <gtk/gtkcontainer.h>
00034
00035 G_BEGIN_DECLS
00036
00037 #define HILDON_STATUS_BAR_ITEM_TYPE ( hildon_status_bar_item_get_type() )
00038 #define HILDON_STATUS_BAR_ITEM(obj) (GTK_CHECK_CAST (obj, \
00039 HILDON_STATUS_BAR_ITEM_TYPE, \
00040 HildonStatusBarItem))
00041 #define HILDON_STATUS_BAR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
00042 HILDON_STATUS_BAR_ITEM_TYPE, HildonStatusBarItemClass))
00043 #define HILDON_IS_STATUS_BAR_ITEM(obj) (GTK_CHECK_TYPE (obj, \
00044 HILDON_STATUS_BAR_ITEM_TYPE))
00045 #define HILDON_IS_STATUS_BAR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \
00046 HILDON_STATUS_BAR_ITEM_TYPE))
00047 #define HILDON_STATUS_BAR_ITEM_GET_PRIVATE(obj) \
00048 (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
00049 HILDON_STATUS_BAR_ITEM_TYPE, HildonStatusBarItemPrivate));
00050
00051 typedef struct _HildonStatusBarItem HildonStatusBarItem;
00052 typedef struct _HildonStatusBarItemClass HildonStatusBarItemClass;
00053 typedef struct _HildonStatusBarPluginFn_st HildonStatusBarPluginFn_st;
00054
00055 struct _HildonStatusBarItem
00056 {
00057 GtkContainer parent;
00058 };
00059
00060 struct _HildonStatusBarItemClass
00061 {
00062 GtkContainerClass parent_class;
00063 void (*hildon_status_bar_update_conditional)
00064 (HildonStatusBarItem * self, gboolean conditional_status);
00065
00066 void (*hildon_status_bar_log_start) (HildonStatusBarItem * self);
00067 void (*hildon_status_bar_log_end) (HildonStatusBarItem * self);
00068 };
00069
00070
00071 typedef void (*HildonStatusBarItemEntryFn)( HildonStatusBarPluginFn_st *fn );
00072 typedef void *(*HildonStatusBarItemInitializeFn)( HildonStatusBarItem *item,
00073 GtkWidget **button);
00074 typedef void (*HildonStatusBarItemDestroyFn)( void *data );
00075 typedef void (*HildonStatusBarItemUpdateFn)( void *data,
00076 gint value1,
00077 gint value2,
00078 const gchar *str);
00079 typedef int (*HildonStatusBarItemGetPriorityFn)( void *data );
00080 typedef void (*HildonStatusBarItemSetConditionalFn)( void *data,
00081 gboolean cond );
00082
00083
00084
00085 struct _HildonStatusBarPluginFn_st
00086 {
00087 HildonStatusBarItemInitializeFn initialize;
00088 HildonStatusBarItemDestroyFn destroy;
00089 HildonStatusBarItemUpdateFn update;
00090 HildonStatusBarItemGetPriorityFn get_priority;
00091 HildonStatusBarItemSetConditionalFn set_conditional;
00092 };
00093
00099 GType hildon_status_bar_item_get_type( void );
00100
00110 HildonStatusBarItem *hildon_status_bar_item_new( const char* name, gboolean mandatory );
00111
00112
00120 void hildon_status_bar_item_initialize (HildonStatusBarItem *item);
00121
00132 void hildon_status_bar_item_update( HildonStatusBarItem *item,
00133 gint value1,
00134 gint value2,
00135 const gchar *str );
00136
00146 void hildon_status_bar_item_update_conditional_cb( HildonStatusBarItem *item,
00147 gboolean user_data );
00148
00157 void hildon_status_bar_item_set_position( HildonStatusBarItem *item,
00158 gint position );
00159
00169 gint hildon_status_bar_item_get_position( HildonStatusBarItem *item );
00170
00180 gint hildon_status_bar_item_get_priority( HildonStatusBarItem *item );
00181
00191 const gchar *hildon_status_bar_item_get_name( HildonStatusBarItem *item );
00192
00202 gboolean hildon_status_bar_item_get_conditional( HildonStatusBarItem *item );
00203
00213 gboolean hildon_status_bar_item_get_mandatory( HildonStatusBarItem *item );
00214
00222 void hildon_status_bar_item_set_button( HildonStatusBarItem *item,
00223 GtkWidget *button );
00224
00234 GtkWidget* hildon_status_bar_item_get_button( HildonStatusBarItem *item );
00235
00236
00237 G_END_DECLS
00238
00239 #endif