00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028 #ifndef __HILDON_STATUS_BAR_MAIN__H__
00029 #define __HILDON_STATUS_BAR_MAIN__H__
00030
00031 #include <libosso.h>
00032
00033 #include "libdesktop/hildon-log.h"
00034
00035 G_BEGIN_DECLS
00036
00037 #define HILDON_STATUS_BAR_NAME "statusbar"
00038 #define HILDON_STATUS_BAR_VERSION "2.0"
00039
00040 #define HSB_MAX_NO_OF_ITEMS 30
00041 #define HSB_VISIBLE_ITEMS_IN_ROW 7
00042 #define HSB_VISIBLE_ITEMS_IN_1ROW_EXTENSION 12
00043 #define HSB_VISIBLE_ITEMS_IN_2ROW_EXTENSION 18
00044
00045
00046 #define HSB_MARGIN_DEFAULT 6
00047
00048 #define HSB_PANEL_DEFAULT_WIDTH 280
00049 #define HSB_ITEM_HEIGHT 50
00050 #define HSB_ITEM_WIDTH 40
00051
00052 #define HSB_ARROW_ICON_NAME "qgn_stat_more"
00053 #define HSB_ARROW_ICON_SIZE HSB_ITEM_WIDTH
00054
00055
00056
00057 #define HSB_ITEM_Y 0
00058 #define HSB_ITEM_X_OFFSET 40
00059 #define HSB_ITEM_Y_OFFSET 40
00060
00061
00062 #define HSB_PRESENCE_SLOT 4
00063 #define HSB_DISPLAY_SLOT 3
00064 #define HSB_SOUND_SLOT 2
00065 #define HSB_INTERNET_SLOT 1
00066 #define HSB_BATTERY_SLOT 0
00067
00068 #define XLIB_FORMAT_32_BIT 32
00069
00070 #define HSB_PLUGIN_USER_CONFIG_DIR "/.osso/hildon-status-bar/"
00071 #define HSB_PLUGIN_USER_CONFIG_FILE "/.osso/hildon-status-bar/plugins.conf"
00072 #define HSB_PLUGIN_FACTORY_CONFIG_FILE "/etc/hildon-status-bar/plugins.conf"
00073
00074
00075 #define HSB_PLUGIN_CONFIG_LIBRARY_KEY "Library"
00076 #define HSB_PLUGIN_CONFIG_CATEGORY_KEY "Category"
00077 #define HSB_PLUGIN_CONFIG_POSITION_KEY "Position"
00078 #define HSB_PLUGIN_CONFIG_MANDATORY_KEY "Mandatory"
00079
00080
00081
00082 #define HSB_PLUGIN_CONFIG_LIBRARY_VALUE "None"
00083
00084
00085 #define HSB_PLUGIN_CATEGORY_PERMANENT "permanent"
00086 #define HSB_PLUGIN_CATEGORY_CONDITIONAL "conditional"
00087 #define HSB_PLUGIN_CATEGORY_TEMPORAL "temporal"
00088
00089 #define HSB_PLUGIN_LOG_FILE "/.osso/statusbar.log"
00090 #define HSB_PLUGIN_LOG_KEY_START "Init"
00091 #define HSB_PLUGIN_LOG_KEY_END "End"
00092
00093
00094
00095 typedef struct status_bar_st StatusBar;
00096
00097 struct status_bar_st
00098 {
00099 GtkWidget *window;
00100 GtkWidget *popup;
00101 GtkWidget *fixed;
00102 GtkWidget *popup_fixed;
00103
00104 GtkWidget *items[HSB_MAX_NO_OF_ITEMS];
00105 GtkWidget *buffer_items[HSB_MAX_NO_OF_ITEMS];
00106
00107 GtkWidget *arrow_button;
00108 gboolean arrow_button_toggled;
00109
00110 HildonLog *log;
00111
00112 guint item_num;
00113
00114
00115 gint plugin_pos_x[HSB_MAX_NO_OF_ITEMS];
00116
00117 gint plugin_pos_y[HSB_MAX_NO_OF_ITEMS];
00118
00119 osso_context_t *osso;
00120 };
00121
00122
00123
00124 typedef struct status_bar_del_ib_st SBDelayedInfobanner;
00125
00126 struct status_bar_del_ib_st
00127 {
00128 gint32 displaytime;
00129 gchar *text;
00130 guint timeout_to_show_id;
00131 guint timeout_onscreen_id;
00132 GtkWidget *banner;
00133 };
00134
00135
00136
00137 typedef struct _statusbarplugin StatusBarPlugin;
00138
00139 struct _statusbarplugin
00140 {
00141 gchar *library;
00142 gint position;
00143 gboolean conditional;
00144 gboolean mandatory;
00145 };
00146
00147
00148
00149 int status_bar_main(osso_context_t *osso, StatusBar **panel);
00150 void status_bar_deinitialize(osso_context_t *osso, StatusBar **panel);
00151
00152
00153 G_END_DECLS
00154
00155 #endif