00001 #ifndef __STATUSBAR_H__ 00002 #define __STATUSBAR_H__ 00003 00004 /** 00005 * File Name : statusbar.h 00006 * 00007 * Description: The statusbar item functions 00008 */ 00009 00010 /* 00011 * This file is part of popupmenu. 00012 * 00013 * popupmenu is free software: you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation, either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * popupmenu is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 */ 00026 00027 /** 00028 * Copyright (C) 2008 iRex Technologies B.V. 00029 * All rights reserved. 00030 */ 00031 00032 //---------------------------------------------------------------------------- 00033 // Include Files 00034 //---------------------------------------------------------------------------- 00035 00036 #include <glib.h> 00037 00038 G_BEGIN_DECLS 00039 00040 //---------------------------------------------------------------------------- 00041 // Global Variables 00042 //---------------------------------------------------------------------------- 00043 00044 GtkWindow *g_statusbar_window; 00045 00046 00047 //============================================================================ 00048 // Public Functions 00049 //============================================================================ 00050 00051 /**--------------------------------------------------------------------------- 00052 * 00053 * Name : statusbar_create 00054 * 00055 * @brief Create and initialize the statusbar 00056 * 00057 * @return -- 00058 * 00059 *--------------------------------------------------------------------------*/ 00060 typedef GtkWidget*(*dialog_cb_t)(GtkMessageType type, 00061 const char *title, 00062 const char *message, 00063 eripc_context_t *context, 00064 const char *message_id); 00065 void statusbar_create(dialog_cb_t cb); 00066 00067 00068 /**--------------------------------------------------------------------------- 00069 * 00070 * Name : statusbar_item_set_state 00071 * 00072 * @brief Set the state of a status bar item 00073 * 00074 * @param item Item name 00075 * @param statename Name of new state 00076 * 00077 * @return Returns TRUE on success, FALSE otherwise 00078 * 00079 *--------------------------------------------------------------------------*/ 00080 gboolean statusbar_item_set_state(const char *item, const char *statename); 00081 00082 /**--------------------------------------------------------------------------- 00083 * 00084 * Name : statusbar_item_show 00085 * 00086 * @brief Show a status bar item 00087 * 00088 * @param item Item name 00089 * @param mode New mode (show/hide) 00090 * 00091 * @return Returns TRUE on success, FALSE otherwise 00092 * 00093 *--------------------------------------------------------------------------*/ 00094 gboolean statusbar_item_show(const char *item, const char *mode); 00095 00096 /**--------------------------------------------------------------------------- 00097 * 00098 * Name : statusbar_remove_item 00099 * 00100 * @brief Remove and free a status bar item 00101 * 00102 * @param item Item name 00103 * 00104 * @return Returns TRUE on success, FALSE otherwise 00105 * 00106 *--------------------------------------------------------------------------*/ 00107 gboolean statusbar_remove_item(const char *item); 00108 00109 /**--------------------------------------------------------------------------- 00110 * 00111 * Name : statusbar_update_battery_state 00112 * 00113 * @brief Update battery state icon 00114 * 00115 * @param level Battery level in percent 00116 * @param state Charge state string 00117 * 00118 * @return -- 00119 * 00120 *--------------------------------------------------------------------------*/ 00121 void statusbar_update_battery_state(gint level, const char *state); 00122 00123 void statusbar_update_signal_strength(const char *medium, gint strength); 00124 00125 void statusbar_update_pagecounter(gint curpage, gint numpages, gboolean boundary_check); 00126 00127 void statusbar_hide_pagecounter(); 00128 00129 void statusbar_set_text(void); 00130 00131 #if MACHINE_IS_DR1000S || MACHINE_IS_DR1000SW 00132 void statusbar_update_toolbar(); 00133 #endif 00134 00135 G_END_DECLS 00136 00137 #endif 00138