00001 /* 00002 * This file is part of connectionMgr. 00003 * 00004 * connectionMgr is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * connectionMgr is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00038 #ifndef _WIDGET_UTILS_H_ 00039 #define _WIDGET_UTILS_H_ 00040 00041 #include <glib.h> 00042 #include <gtk/gtk.h> 00043 00044 #include <liberregxml/erregapi.h> 00045 #include <libergtk/ergtk.h> 00046 #include "connectPing.h" 00047 00048 typedef struct _wdtLabelEntry 00049 { 00050 GtkWidget *parent; // the top container, GtkVBox 00051 GtkWidget *label; // GtkLabel 00052 GtkWidget *entry; // erGtkEntry or erGtkEntryIPV4 00053 GtkWidget *button; // GtkToggleButton 00054 } wdtLabelEntry; 00055 00056 typedef struct _wdtLabelButton 00057 { 00058 GtkWidget *parent; // the top container, GtkVBox 00059 GtkWidget *label; // GtkLabel 00060 GtkWidget *selection; // erGtkSelectionGroup 00061 int nbutton; // the nubmer of buttons 00062 GtkToggleButton **buttonList; // the list of GtkToggleButton 00063 } wdtLabelButton; 00064 00065 typedef struct _bkWdtLabelEntry 00066 { 00067 GtkWidget *background; // GtkEventBox 00068 wdtLabelEntry *details; 00069 }bkWdtLabelEntry; 00070 00071 typedef struct _bkWdtLabelButton 00072 { 00073 GtkWidget *background; // GtkEventBox 00074 wdtLabelButton *details; 00075 }bkWdtLabelButton; 00076 00077 typedef struct _bkProfileEntry 00078 { 00079 GtkWidget *background; // GtkEventBox 00080 GtkWidget *details; 00081 }bkProfileEntry; 00082 00083 #ifdef __cplusplus 00084 extern "C" 00085 { 00086 #endif /* __cplusplus */ 00087 00088 // Create wdtLabelEntry. 00089 wdtLabelEntry *wdt_label_entry_new (entryFilter_e filter); 00090 00091 // Create wdtLabelButton 00092 wdtLabelButton *wdt_label_button_new (int nbutton, 00093 gboolean smallButton, 00094 int minsel, 00095 int maxsel); 00096 00097 // Create bkWdtLabelEntry. 00098 bkWdtLabelEntry *bk_wdt_label_entry_new(entryFilter_e filter); 00099 00100 // Create bkWdtLabelButton. 00101 bkWdtLabelButton *bk_wdt_label_button_new(int nbutton, 00102 gboolean smallButton, 00103 int minsel, 00104 int maxsel); 00105 00106 // Create bkProfileEntry. 00107 bkProfileEntry *bk_profile_entry_new(void); 00108 00109 // Display settings 00110 void bk_profile_entry_display(const bkProfileEntry *item, 00111 const regNetworkProfile_t *settings); 00112 00113 // Update the status 00114 void bk_profile_entry_update_status(const bkProfileEntry *item, 00115 pingStatus_t status); 00116 00117 #ifdef __cplusplus 00118 } 00119 #endif /* __cplusplus */ 00120 00121 00122 #endif //_WIDGET_UTILS_H_