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, 2006 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  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00031 #ifndef HILDON_STATUS_BAR_ITEM_H
00032 #define HILDON_STATUS_BAR_ITEM_H
00033 
00034 #include <gtk/gtkcontainer.h>
00035 #include <gtk/gtkimage.h>
00036 #include <gdk/gdkpixbuf.h>
00037 #include <libosso.h>
00038 
00039 G_BEGIN_DECLS
00040 
00041 
00042 #define HILDON_STATUS_BAR_ITEM_TYPE ( hildon_status_bar_item_get_type() )
00043 #define HILDON_STATUS_BAR_ITEM(obj) (GTK_CHECK_CAST (obj, \
00044             HILDON_STATUS_BAR_ITEM_TYPE, \
00045             HildonStatusBarItem))
00046 #define HILDON_STATUS_BAR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
00047             HILDON_STATUS_BAR_ITEM_TYPE, HildonStatusBarItemClass))
00048 #define HILDON_IS_STATUS_BAR_ITEM(obj) (GTK_CHECK_TYPE (obj, \
00049             HILDON_STATUS_BAR_ITEM_TYPE))
00050 #define HILDON_IS_STATUS_BAR_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), \
00051             HILDON_STATUS_BAR_ITEM_TYPE))
00052 #define HILDON_STATUS_BAR_ITEM_GET_PRIVATE(obj) \
00053         (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
00054         HILDON_STATUS_BAR_ITEM_TYPE, HildonStatusBarItemPrivate));
00055 
00056 
00057 typedef struct _HildonStatusBarItem HildonStatusBarItem; 
00058 typedef struct _HildonStatusBarItemClass HildonStatusBarItemClass;
00059 typedef struct _HildonStatusBarPluginFn_st HildonStatusBarPluginFn_st; 
00060 
00061 struct _HildonStatusBarItem
00062 {
00063     GtkContainer parent;
00064 };
00065 
00066 struct _HildonStatusBarItemClass
00067 {
00068     GtkContainerClass parent_class;
00069 };
00070 
00071 /* Type definitions for the plugin API */ 
00072 typedef void (*HildonStatusBarItemEntryFn)( HildonStatusBarPluginFn_st *fn );
00073 typedef void *(*HildonStatusBarItemInitializeFn)( HildonStatusBarItem *item,
00074                                                   GtkWidget **button);
00075 typedef void (*HildonStatusBarItemDestroyFn)( void *data );
00076 typedef void (*HildonStatusBarItemUpdateFn)( void *data, gint value1, 
00077                                              gint value2, const gchar *str);
00078 typedef int (*HildonStatusBarItemGetPriorityFn)( void *data );
00079 
00080 /* Struct for the plugin API function pointers */
00081 struct _HildonStatusBarPluginFn_st 
00082 {
00083     HildonStatusBarItemInitializeFn  initialize;
00084     HildonStatusBarItemDestroyFn     destroy;
00085     HildonStatusBarItemUpdateFn      update;
00086     HildonStatusBarItemGetPriorityFn get_priority;
00087 };
00088 
00097 GType hildon_status_bar_item_get_type( void );
00098 
00110 HildonStatusBarItem *hildon_status_bar_item_new( const char* path,
00111                                                  const char* name );
00112 
00127 void hildon_status_bar_item_update( HildonStatusBarItem *item, 
00128                                     gint value1, 
00129                                     gint value2, 
00130                                     const gchar *str );
00131 
00142 gint hildon_status_bar_item_get_priority( HildonStatusBarItem *item );
00143 
00154 const gchar *hildon_status_bar_item_get_name( HildonStatusBarItem *item );
00155 
00156 
00157 G_END_DECLS
00158 
00159 #endif /* HILDON_STATUS_BAR_ITEM_H */

Generated on Fri Jun 9 16:23:09 2006 for maemo-af-desktop-documentation by  doxygen 1.4.6