#include <glib.h>
#include <gtk/gtk.h>
#include <liberipc/eripc.h>
#include <liberipc/eripctoolbar.h>
#include <liberipc/eripcbusyd.h>
#include <liberipc/eripccontentlister.h>
#include <libermanifest/ermanifest.h>
#include "contentListerLog.h"
#include "erConnect.h"
#include "system.h"
#include "gtkPincodeScreen.h"
#include "control.h"
#include "displayUpdate.h"
#include "toolbar.h"
Go to the source code of this file.
Functions | |
static void | toolbar_clear_internal (void) |
void | toolbar_init () |
void | toolbar_restore () |
void | toolbar_clear () |
void | toolbar_disableUpdate () |
void | toolbar_enableUpdate () |
void | toolbar_setIconState (int iconID, int iconState) |
void | toolbar_synchronise (void) |
gboolean | toolbar_is_trashcan_selected () |
gboolean | toolbar_is_locked_selected () |
gboolean | toolbar_is_tagging_selected () |
gboolean | toolbar_is_search_selected () |
gboolean | toolbar_is_sort_selected () |
gboolean | toolbar_is_lock_screen_selected () |
gboolean | toolbar_is_share_selected () |
Variables | |
static erClientChannel_t | toolbarChannel |
static gboolean | g_trashcan_selected = FALSE |
static gboolean | g_locked_selected = FALSE |
static gboolean | g_tagging_selected = FALSE |
static gboolean | g_search_selected = FALSE |
static gboolean | g_sort_selected = FALSE |
static gboolean | g_share_selected = FALSE |
static gint | g_lock_screen_state = iconState_normal |
static gint | g_connect_state = iconState_grey |
Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.
<File description>="">
Definition in file toolbar.c.
void toolbar_clear | ( | void | ) |
Definition at line 151 of file toolbar.c.
00152 { 00153 CL_TBPRINTF("entry"); 00154 00155 // freeze toolbar layout 00156 tbDisableUpdate(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00157 00158 // clear the toolbar 00159 toolbar_clear_internal(); 00160 00161 // redraw toolbar now 00162 tbEnableUpdate(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00163 }
static void toolbar_clear_internal | ( | void | ) | [static] |
Definition at line 112 of file toolbar.c.
00113 { 00114 CL_TBPRINTF("entry"); 00115 00116 // tell toolbar which iconset to display 00117 tbSelectIconSet(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00118 00119 // clear the toolbar 00120 tbClearIconSet(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00121 00122 // set system icons 00123 // 00124 // disable trashcan icon 00125 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_trashcan, ccClToolbarIcon); 00126 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_trashcan, iconState_grey ); 00127 g_trashcan_selected = FALSE; 00128 // 00129 // restore connect icon 00130 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_connect, ccClToolbarIcon); 00131 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_connect, g_connect_state); 00132 // 00133 // restore screen lock (PIN code) icon 00134 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_lock_screen, ccClToolbarIcon); 00135 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_lock_screen, g_lock_screen_state); 00136 // 00137 // enable/disable locked icon 00138 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_locked, ccClToolbarIcon); 00139 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_locked, g_locked_selected ? iconState_selected : iconState_normal); 00140 // 00141 // disable keyboard icon 00142 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_keyboard, ccClToolbarIcon); 00143 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_keyboard, iconState_grey ); 00144 // 00145 // disable tagging icon 00146 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_tagging, ccClToolbarIcon); 00147 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_tagging, iconState_grey ); 00148 g_tagging_selected = FALSE; 00149 }
void toolbar_disableUpdate | ( | void | ) |
Definition at line 167 of file toolbar.c.
00168 { 00169 CL_TBPRINTF("entry"); 00170 00171 tbDisableUpdate(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00172 }
void toolbar_enableUpdate | ( | void | ) |
Definition at line 175 of file toolbar.c.
00176 { 00177 CL_TBPRINTF("entry"); 00178 00179 tbEnableUpdate(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00180 }
void toolbar_init | ( | void | ) |
Definition at line 65 of file toolbar.c.
00066 { 00067 int returnValue; 00068 00069 CL_TBPRINTF("entry"); 00070 00071 // create/init the channel to communicate with the toolbar service 00072 returnValue = erIpcStartClient(ER_TOOLBAR_CHANNEL, &toolbarChannel); 00073 00074 if (returnValue != 0) 00075 { 00076 CL_WARNPRINTF("erIpcStartClient returned %d", returnValue); 00077 return; 00078 } 00079 00080 toolbar_restore(); 00081 }
gboolean toolbar_is_lock_screen_selected | ( | ) |
Definition at line 254 of file toolbar.c.
00255 { 00256 if (g_lock_screen_state == iconState_selected) 00257 return TRUE; 00258 else 00259 return FALSE; 00260 }
gboolean toolbar_is_locked_selected | ( | void | ) |
Definition at line 231 of file toolbar.c.
00232 { 00233 CL_TBPRINTF("return [%d]", g_locked_selected); 00234 return g_locked_selected; 00235 }
gboolean toolbar_is_search_selected | ( | void | ) |
Definition at line 242 of file toolbar.c.
00243 { 00244 CL_TBPRINTF("return [%d]", g_search_selected); 00245 return g_search_selected; 00246 }
gboolean toolbar_is_share_selected | ( | ) |
Definition at line 262 of file toolbar.c.
00263 { 00264 CL_TBPRINTF("return [%d]", g_share_selected); 00265 return g_share_selected; 00266 }
gboolean toolbar_is_sort_selected | ( | ) |
Definition at line 248 of file toolbar.c.
00249 { 00250 CL_TBPRINTF("return [%d]", g_sort_selected); 00251 return g_sort_selected; 00252 }
gboolean toolbar_is_tagging_selected | ( | void | ) |
Definition at line 236 of file toolbar.c.
00237 { 00238 CL_TBPRINTF("return [%d]", g_tagging_selected); 00239 return g_tagging_selected; 00240 }
gboolean toolbar_is_trashcan_selected | ( | void | ) |
Definition at line 225 of file toolbar.c.
00226 { 00227 CL_TBPRINTF("return [%d]", g_trashcan_selected); 00228 return g_trashcan_selected; 00229 }
void toolbar_restore | ( | ) |
Definition at line 83 of file toolbar.c.
00084 { 00085 CL_TBPRINTF("entry"); 00086 00087 // freeze toolbar layout 00088 tbDisableUpdate(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00089 00090 // clear toolbar, set system icons 00091 toolbar_clear_internal(); 00092 00093 // set application-specific icons 00094 // 00095 // disable search icon 00096 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_search, ccClToolbarIcon); 00097 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_search, iconState_grey ); 00098 g_search_selected = FALSE; 00099 // disable sort icon 00100 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_sort, ccClToolbarIcon); 00101 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_sort, iconState_grey ); 00102 g_sort_selected = FALSE; 00103 00104 // disable share icon 00105 tbAppendPlatformIcon( toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_share, ccClToolbarIcon); 00106 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID_share, iconState_grey ); 00107 00108 // redraw toolbar now 00109 tbEnableUpdate(toolbarChannel, ER_CONTENT_LISTER_UA_ID); 00110 }
void toolbar_setIconState | ( | int | iconID, | |
int | iconState | |||
) |
Definition at line 182 of file toolbar.c.
00183 { 00184 CL_TBPRINTF("entry: iconID [%d] iconState [%d]", iconID, iconState); 00185 00186 tbSetStatePlatformIcon(toolbarChannel, ER_CONTENT_LISTER_UA_ID, iconID, iconState); 00187 switch (iconID) 00188 { 00189 case iconID_trashcan: 00190 g_trashcan_selected = (iconState == iconState_selected); 00191 break; 00192 case iconID_connect: 00193 g_connect_state = iconState; 00194 break; 00195 case iconID_lock_screen: 00196 g_lock_screen_state = iconState; 00197 break; 00198 case iconID_locked: 00199 g_locked_selected = (iconState == iconState_selected); 00200 break; 00201 case iconID_tagging: 00202 g_tagging_selected = (iconState == iconState_selected); 00203 break; 00204 case iconID_search: 00205 g_search_selected = (iconState == iconState_selected); 00206 break; 00207 case iconID_sort: 00208 g_sort_selected = (iconState == iconState_selected); 00209 break; 00210 case iconID_share: 00211 g_share_selected = (iconState == iconState_selected); 00212 break; 00213 default: 00214 /* ignore */ ; 00215 } 00216 }
void toolbar_synchronise | ( | void | ) |
Definition at line 218 of file toolbar.c.
00219 { 00220 CL_TBPRINTF("entry"); 00221 00222 tbSynchronise(toolbarChannel, ER_CONTENT_LISTER_UA_ID, ccClToolbarSynchronised); 00223 }
gint g_connect_state = iconState_grey [static] |
gint g_lock_screen_state = iconState_normal [static] |
gboolean g_locked_selected = FALSE [static] |
gboolean g_search_selected = FALSE [static] |
gboolean g_share_selected = FALSE [static] |
gboolean g_sort_selected = FALSE [static] |
gboolean g_tagging_selected = FALSE [static] |
gboolean g_trashcan_selected = FALSE [static] |
erClientChannel_t toolbarChannel [static] |