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_CLOCKAPP_HOME_MAIN_H
00029 #define HILDON_CLOCKAPP_HOME_MAIN_H
00030
00031 #include "hildon-home-interface.h"
00032
00033 G_BEGIN_DECLS
00034
00035
00036 #define COMMON_STRING(a) dgettext("hildon-common-strings", a)
00037 #define FM(a) dgettext("hildon-fm", a)
00038
00039 #define HILDON_MENU_KEY GDK_F4
00040
00041 #define WINDOW_WIDTH 800
00042 #define WINDOW_HEIGHT 480
00043 #define HILDON_HOME_ENV_HOME "HOME"
00044
00045 #define HILDON_HOME_FLASH_FULL_TEXT dgettext("ke-recv", "cerm_device_memory_full")
00046 #define HILDON_HOME_MMC_NOT_OPEN_TEXT COMMON_STRING("sfil_ni_cannot_open_mmc_cover_open")
00047 #define HILDON_HOME_MMC_NOT_OPEN_CLOSE COMMON_STRING("sfil_ni_cannot_open_mmc_cover_open_ok")
00048 #define HILDON_HOME_INTERRUPTED_TEXT COMMON_STRING("sfil_ni_cannot_open_no_connection")
00049
00050
00051 #define HILDON_HOME_NAME "Home"
00052 #define HILDON_HOME_WINDOW_NAME "HildonHome"
00053 #define HILDON_HOME_VERSION "2.1.0"
00054 #define HILDON_HOME_SYSTEM_DIR ".osso/hildon-home"
00055 #define HILDON_HOME_SYSTEM_DIR_ACCESS 0755
00056 #define HILDON_HOME_PATH_STR_LENGTH 2048
00057
00058
00059 #define HILDON_HOME_FACTORY_FILENAME "/etc/hildon-home/hildon-home.conf"
00060 #define HILDON_HOME_FACTORY_FORMAT \
00061 "WShide=%d\nWSproperties=%d\nBGchange=%d\nBGfile=%200s\n"
00062
00063
00064 #define HILDON_HOME_HC_USER_IMAGE_DIR "MyDocs/.images"
00065 #define HILDON_HOME_CONF_USER_FILENAME "hildon-home.conf"
00066 #define HILDON_HOME_CONF_USER_ORIGINAL_FILENAME "user_filename.txt"
00067 #define HILDON_HOME_CONF_USER_IMAGE_DIR "MyDocs/.images"
00068 #define HILDON_HOME_BG_DEFAULT_IMG_INFO_DIR "/usr/share/backgrounds"
00069
00070
00071 #define BG_DESKTOP_GROUP "Desktop Entry"
00072 #define BG_DESKTOP_IMAGE_NAME "Name"
00073 #define BG_DESKTOP_IMAGE_FILENAME "File"
00074 #define BG_DESKTOP_IMAGE_PRIORITY "X-Order"
00075 #define BG_IMG_INFO_FILE_TYPE "desktop"
00076 #define HOME_BG_IMG_DEFAULT_PRIORITY 15327
00077 #define BG_LOADING_PIXBUF_NULL -526
00078 #define BG_LOADING_OTHER_ERROR -607
00079 #define BG_LOADING_RENAME_FAILED -776
00080 #define BG_LOADING_SUCCESS 0
00081 #define MAX_CHARS_HERE 6
00082
00083 #define HILDON_HOME_SET_BG_TITLE _("home_ti_set_backgr")
00084 #define HILDON_HOME_SET_BG_OK _("home_bd_set_backgr_ok")
00085 #define HILDON_HOME_SET_BG_PREVIEW _("home_bd_set_backgr_preview")
00086 #define HILDON_HOME_SET_BG_IMAGE _("home_bd_set_backgr_image")
00087 #define HILDON_HOME_SET_BG_CANCEL _("home_bd_set_backgr_cancel")
00088
00089 #define HILDON_HOME_SET_BG_RESPONSE_PREVIEW GTK_RESPONSE_YES
00090 #define HILDON_HOME_SET_BG_RESPONSE_IMAGE GTK_RESPONSE_APPLY
00091
00092 #define HILDON_HOME_SET_BG_COLOR_TITLE _("home_fi_set_backgr_color")
00093 #define HILDON_HOME_SET_BG_IMAGE_TITLE _("home_fi_set_backgr_image")
00094 #define HILDON_HOME_SET_BG_IMAGE_NONE _("home_va_set_backgr_none")
00095 #define HILDON_HOME_SET_BG_MODE_TITLE _("home_fi_set_backgr_mode")
00096 #define HILDON_HOME_SET_BG_MODE_CENTERED _("home_va_set_backgr_centered")
00097 #define HILDON_HOME_SET_BG_MODE_SCALED _("home_va_set_backgr_scaled")
00098 #define HILDON_HOME_SET_BG_MODE_STRETCHED _("home_va_set_backgr_stretched")
00099 #define HILDON_HOME_SET_BG_MODE_TILED _("home_va_set_backgr_tiled")
00100
00101 #define HILDON_HOME_FILE_CHOOSER_ACTION_PROP "action"
00102 #define HILDON_HOME_FILE_CHOOSER_TITLE_PROP "title"
00103 #define HILDON_HOME_FILE_CHOOSER_TITLE _("home_ti_select_image")
00104 #define HILDON_HOME_FILE_CHOOSER_SELECT_PROP "open-button-text"
00105 #define HILDON_HOME_FILE_CHOOSER_SELECT _("home_bd_select_image")
00106 #define HILDON_HOME_FILE_CHOOSER_EMPTY_PROP "empty-text"
00107 #define HILDON_HOME_FILE_CHOOSER_EMPTY _("home_li_no_images")
00108
00109
00110 #define HILDON_HOME_CONF_USER_FORMAT \
00111 "red=%d\ngreen=%d\nblue=%d\nmode=%d\n"
00112 #define HILDON_HOME_CONF_DEFAULT_COLOR 0
00113
00114
00115 #define HILDON_HOME_USER_PLUGIN_PATH "/var/lib/install/usr/lib/hildon-home/"
00116 #define HILDON_HOME_USER_PLUGIN_CONF_FORMAT \
00117 "plugin=%s\nwidth=%d\nheight=%d\nx=%d\ny=%d\n"
00118
00119 #define STARTUP_LOCK_FILE "/var/lock/hildon-home-startup"
00120 #define STARTUP_LOCK_TIME 10000
00121
00122
00123 #define HILDON_HOME_TEMPORARY_FILENAME_EXT "_tmp"
00124 #define HILDON_HOME_BG_USER_FILENAME "hildon_home_bg_user.png"
00125 #define HILDON_HOME_BG_USER_FILENAME_TEMP "hildon_home_bg_user.png_tmp"
00126 #define HILDON_HOME_BG_FILENAME_FORMAT "%s\n"
00127 #define HILDON_HOME_BG_FILENAME_FORMAT_SAVE "%200s\n"
00128
00129 #define HILDON_HOME_IMAGE_LOADER "home-image-loader"
00130 #define HILDON_HOME_IMAGE_LOADER_PATH "/usr/bin/home-image-loader"
00131 #define HILDON_HOME_IMAGE_LOADER_NICE 19
00132
00133 #define HILDON_HOME_BLEND_IMAGE_TITLEBAR_NAME "HildonHomeTitleBar"
00134 #define HILDON_HOME_BLEND_IMAGE_SIDEBAR_NAME "HildonHomeLeftEdge"
00135
00136 #define HILDON_HOME_ORIGINAL_IMAGE_TITLEBAR "original_titlebar.png"
00137 #define HILDON_HOME_ORIGINAL_IMAGE_SIDEBAR "original_sidebar.png"
00138
00139 #define HILDON_HOME_WIDTH (WINDOW_WIDTH-HILDON_TASKNAV_WIDTH)
00140 #define HILDON_HOME_HEIGHT WINDOW_HEIGHT
00141 #define HILDON_HOME_X HILDON_TASKNAV_WIDTH
00142 #define HILDON_HOME_Y 0
00143 #define HILDON_HOME_AREA_WIDTH HILDON_HOME_WIDTH
00144 #define HILDON_HOME_AREA_HEIGHT HILDON_HOME_HEIGHT
00145 #define HILDON_HOME_AREA_X 0
00146 #define HILDON_HOME_AREA_Y 0
00147
00148
00149
00150 #define HILDON_HOME_TITLEBAR_NAME "HildonHomeTitleBar"
00151 #define HILDON_HOME_TITLEBAR_WIDTH (WINDOW_WIDTH-HILDON_TASKNAV_WIDTH)
00152 #define HILDON_HOME_TITLEBAR_X 0
00153 #define HILDON_HOME_TITLEBAR_Y 0
00154 #define HILDON_HOME_TITLEBAR_LEFT_X "0"
00155 #define HILDON_HOME_TITLEBAR_TOP_Y "0"
00156
00157 #define HILDON_HOME_TITLEBAR_MENU_NAME "menu_force_with_corners"
00158 #define HILDON_HOME_TITLEBAR_MENU_LABEL _("home_ap_home_view")
00159
00160 #define HILDON_HOME_TITLEBAR_MENU_SELECT_APPLETS _("home_me_select_applets")
00161 #define HILDON_HOME_TITLEBAR_MENU_APPLET_SETTINGS _("home_me_applet_settings")
00162 #define HILDON_HOME_MENU_APPLET_SETTINGS_NOAVAIL _("home_ib_not_available")
00163 #define HILDON_HOME_MENU_EDIT_LAYOUT_NOAVAIL _("home_ib_select_applets")
00164 #define HILDON_HOME_TITLEBAR_MENU_EDIT_LAYOUT _("home_me_edit_layout")
00165 #define HILDON_HOME_TITLEBAR_MENU_TOOLS _("home_me_tools")
00166 #define HILDON_HOME_TITLEBAR_SUB_SET_BG _("home_me_tools_set_background")
00167 #define HILDON_HOME_TITLEBAR_SUB_PERSONALISATION _("home_me_tools_personalisation")
00168 #define HILDON_HOME_TITLEBAR_SUB_CALIBRATION _("home_me_tools_screen_calibration")
00169 #define HILDON_HOME_TITLEBAR_SUB_HELP _("home_me_tools_help")
00170
00171 #define HILDON_CP_DESKTOP_NAME "Name"
00172 #define HILDON_CP_PLUGIN_PERSONALISATION "personalisation.desktop"
00173 #define HILDON_CP_PLUGIN_CALIBRATION "tscalibrate.desktop"
00174
00175
00176 #define HILDON_HOME_NORMAL_HELP_TOPIC "uiframework_home_normal_mode"
00177 #define HILDON_HOME_LAYOUT_HELP_TOPIC "uiframework_home_layout_mode"
00178 #define HILDON_HOME_SELECT_APPLETS_HELP_TOPIC "uiframework_home_select_applets"
00179 #define HILDON_HOME_SET_BACKGROUND_HELP_TOPIC "uiframework_home_set_background"
00180 #define HILDON_HOME_SELECT_IMAGE_HELP_TOPIC "uiframework_home_select_image"
00181
00182
00183
00184
00185 #define HILDON_HOME_TITLEBAR_X_OFFSET_DEFAULT 10
00186 #define HILDON_HOME_TITLEBAR_Y_OFFSET_DEFAULT -13
00187
00188 #define HILDON_HOME_MENUAREA_WIDTH 348
00189 #define HILDON_HOME_MENUAREA_LMARGIN 0
00190
00191
00192 #define HILDON_HOME_SIDEBAR_NAME "HildonHomeLeftEdge"
00193 #define HILDON_HOME_SIDEBAR_WIDTH 10
00194 #define HILDON_HOME_SIDEBAR_HEIGHT (WINDOW_HEIGHT-HILDON_HOME_TITLEBAR_HEIGHT)
00195 #define HILDON_HOME_SIDEBAR_X 0
00196 #define HILDON_HOME_SIDEBAR_Y HILDON_HOME_TITLEBAR_HEIGHT
00197 #define HILDON_HOME_SIDEBAR_LEFT_X "0"
00198 #define HILDON_HOME_SIDEBAR_TOP_Y "60"
00199
00200
00201
00202 #define HILDON_HOME_APP_AREA_NAME "HildonHomeAppArea"
00203 #define HILDON_HOME_APP_AREA_WIDTH (HILDON_HOME_AREA_WIDTH-\
00204 HILDON_HOME_SIDEBAR_WIDTH)
00205 #define HILDON_HOME_APP_AREA_HEIGHT HILDON_HOME_SIDEBAR_HEIGHT
00206 #define HILDON_HOME_APP_AREA_X HILDON_HOME_SIDEBAR_WIDTH
00207 #define HILDON_HOME_APP_AREA_Y HILDON_HOME_SIDEBAR_Y
00208 #define HILDON_HOME_APP_AREA_MARGIN 9
00209 #define HILDON_HOME_APP_AREA_MARGIN_INNER 6
00210
00211
00212 #define HILDON_HOME_APPLET_BORDER_WIDTH 6
00213 #define HILDON_HOME_APPLET_LEFT_X HILDON_HOME_APP_AREA_X+\
00214 HILDON_HOME_APP_AREA_MARGIN
00215 #define HILDON_HOME_APPLET_TOP_Y HILDON_HOME_APP_AREA_Y+\
00216 HILDON_HOME_APP_AREA_MARGIN
00217
00218
00219 #define HILDON_HOME_LOADING_IMAGE_TEXT _("home_nw_loading_image")
00220 #define HILDON_HOME_LOADING_IMAGE_ANI "qgn_indi_process_a"
00221 #define HILDON_NOTE_INFORMATION_ICON "qgn_note_info"
00222
00223
00224 #define HILDON_HOME_NO_MEMORY_TEXT COMMON_STRING("sfil_ni_not_enough_memory")
00225
00226
00227 #define HILDON_HOME_CONNECTIVITY_TEXT COMMON_STRING("sfil_ni_cannot_open_no_connection")
00228
00229
00230
00231 #define HILDON_HOME_FILE_UNREADABLE_TEXT FM("sfil_ib_opening_not_allowed")
00232
00233
00234 #define TRANSIENCY_MAXITER 50
00235
00236 enum {
00237 BG_IMAGE_NAME,
00238 BG_IMAGE_FILENAME,
00239 BG_IMAGE_PRIORITY
00240 };
00241
00242 #if 0
00243 void show_no_memory_note(void);
00244 void show_connectivity_broke_note(void);
00245 void show_system_resource_note(void);
00246 void show_file_corrupt_note(void);
00247 void show_file_unreadable_note(void);
00248 void show_mmc_cover_open_note(void);
00249 void show_flash_full_note(void);
00250
00251 void home_layoutmode_menuitem_sensitivity_check(void);
00252 #endif
00253
00254 osso_context_t * home_get_osso_context (void);
00255
00256 G_END_DECLS
00257
00258 #endif