Main Page | Directories | File List | File Members

hildon-status-bar-item.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
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 /* Type definitions for the plugin API */ 
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 /* Struct for the plugin API function pointers */
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 /* HILDON_STATUS_BAR_ITEM_H */

Generated on Thu Dec 21 11:26:52 2006 for maemo-af-desktop-documentation by  doxygen 1.4.2