00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00031 #ifndef __HILDON_HOME_PRIVATE_H__
00032 #define __HILDON_HOME_PRIVATE_H__
00033
00034 #include <glib.h>
00035 #include <glib/gi18n.h>
00036
00037 G_BEGIN_DECLS
00038
00039
00040 #define _HN_COMMON_STRING(a) dgettext("hildon-common-strings", (a))
00041 #define _HN_FM_STRING(a) dgettext("hildon-fm", (a))
00042 #define _KE_RECV_STRING(a) dgettext("ke-recv", (a))
00043
00044 #define HILDON_HOME_FLASH_FULL_TEXT _KE_RECV_STRING("cerm_device_memory_full")
00045 #define HILDON_HOME_LOWMEM_TEXT _KE_RECV_STRING("memr_ib_operation_disabled")
00046 #define HILDON_HOME_INTERRUPTED_TEXT _HN_COMMON_STRING("sfil_ni_cannot_open_no_connection")
00047 #define HILDON_HOME_CORRUPTED_TEXT _HN_COMMON_STRING("ckct_ni_unable_to_open_file_corrupted")
00048 #define HILDON_HOME_MMC_OPEN_TEXT _HN_COMMON_STRING("sfil_ni_cannot_open_mmc_cover_open")
00049
00050 #define HILDON_HOME_ENV_HOME "HOME"
00051 #define HILDON_HOME_ENV_MMC_MOUNTPOINT "MMC_MOUNTPOINT"
00052
00053
00054 #define HILDON_HOME_FACTORY_DIR SYSCONFDIR
00055 #define HILDON_HOME_USER_SYSTEM_DIR ".osso"
00056
00057
00058 #define HILDON_HOME_CONF_DIR "hildon-home"
00059 #define HILDON_HOME_CONF_FILE "hildon-home.conf"
00060
00061 #define HILDON_HOME_CONF_MAIN_GROUP "Hildon Home"
00062 #define HILDON_HOME_CONF_BG_URI_KEY "BackgroundImage"
00063 #define HILDON_HOME_CONF_SIDEBAR_KEY "SidebarImage"
00064 #define HILDON_HOME_CONF_TITLEBAR_KEY "TitlebarImage"
00065 #define HILDON_HOME_CONF_CACHE_KEY "CacheImage"
00066 #define HILDON_HOME_CONF_BG_COLOR_RED_KEY "Red"
00067 #define HILDON_HOME_CONF_BG_COLOR_GREEN_KEY "Green"
00068 #define HILDON_HOME_CONF_BG_COLOR_BLUE_KEY "Blue"
00069 #define HILDON_HOME_CONF_BG_MODE_KEY "Mode"
00070
00071
00072 #define HILDON_HOME_NAME "Home"
00073 #define HILDON_HOME_WINDOW_NAME "HildonHome"
00074 #define HILDON_HOME_VERSION "2.1.0"
00075 #define HILDON_HOME_SYSTEM_DIR ".osso/hildon-home"
00076 #define HILDON_HOME_SYSTEM_DIR_ACCESS 0755
00077 #define HILDON_HOME_PATH_STR_LENGTH 2048
00078
00079
00080 #define HILDON_HOME_FACTORY_FILENAME "/etc/hildon-home/hildon-home.conf"
00081 #define HILDON_HOME_FACTORY_FORMAT \
00082 "WShide=%d\nWSproperties=%d\nBGchange=%d\nBGfile=%200s\n"
00083
00084
00085 #define HILDON_HOME_HC_USER_IMAGE_DIR "MyDocs/.images"
00086 #define HILDON_HOME_CONF_USER_FILENAME "hildon-home.conf"
00087 #define HILDON_HOME_CONF_USER_ORIGINAL_FILENAME "user_filename.txt"
00088 #define HILDON_HOME_CONF_USER_IMAGE_DIR "MyDocs/.images"
00089 #define HILDON_HOME_BG_DEFAULT_IMG_INFO_DIR "/usr/share/backgrounds"
00090
00091
00092 #define BG_DESKTOP_GROUP "Desktop Entry"
00093 #define BG_DESKTOP_IMAGE_NAME "Name"
00094 #define BG_DESKTOP_IMAGE_FILENAME "File"
00095 #define BG_DESKTOP_IMAGE_PRIORITY "X-Order"
00096 #define BG_IMG_INFO_FILE_TYPE "desktop"
00097 #define HOME_BG_IMG_DEFAULT_PRIORITY 15327
00098 #define BG_LOADING_PIXBUF_NULL -526
00099 #define BG_LOADING_OTHER_ERROR -607
00100 #define BG_LOADING_RENAME_FAILED -776
00101 #define BG_LOADING_SUCCESS 0
00102 #define MAX_CHARS_HERE 6
00103
00104 #define HILDON_HOME_SET_BG_TITLE _("home_ti_set_backgr")
00105 #define HILDON_HOME_SET_BG_OK _("home_bd_set_backgr_ok")
00106 #define HILDON_HOME_SET_BG_PREVIEW _("home_bd_set_backgr_preview")
00107 #define HILDON_HOME_SET_BG_IMAGE _("home_bd_set_backgr_image")
00108 #define HILDON_HOME_SET_BG_CANCEL _("home_bd_set_backgr_cancel")
00109
00110 #define HILDON_HOME_SET_BG_RESPONSE_PREVIEW GTK_RESPONSE_YES
00111 #define HILDON_HOME_SET_BG_RESPONSE_IMAGE GTK_RESPONSE_APPLY
00112
00113 #define HILDON_HOME_SET_BG_COLOR_TITLE _("home_fi_set_backgr_color")
00114 #define HILDON_HOME_SET_BG_IMAGE_TITLE _("home_fi_set_backgr_image")
00115 #define HILDON_HOME_SET_BG_IMAGE_NONE _("home_va_set_backgr_none")
00116 #define HILDON_HOME_SET_BG_MODE_TITLE _("home_fi_set_backgr_mode")
00117 #define HILDON_HOME_SET_BG_MODE_CENTERED _("home_va_set_backgr_centered")
00118 #define HILDON_HOME_SET_BG_MODE_SCALED _("home_va_set_backgr_scaled")
00119 #define HILDON_HOME_SET_BG_MODE_STRETCHED _("home_va_set_backgr_stretched")
00120 #define HILDON_HOME_SET_BG_MODE_TILED _("home_va_set_backgr_tiled")
00121
00122 #define HILDON_HOME_FILE_CHOOSER_ACTION_PROP "action"
00123 #define HILDON_HOME_FILE_CHOOSER_TITLE_PROP "title"
00124 #define HILDON_HOME_FILE_CHOOSER_TITLE _("home_ti_select_image")
00125 #define HILDON_HOME_FILE_CHOOSER_SELECT_PROP "open-button-text"
00126 #define HILDON_HOME_FILE_CHOOSER_SELECT _("home_bd_select_image")
00127 #define HILDON_HOME_FILE_CHOOSER_EMPTY_PROP "empty-text"
00128 #define HILDON_HOME_FILE_CHOOSER_EMPTY _("home_li_no_images")
00129
00130
00131 #define HILDON_HOME_CONF_USER_FORMAT \
00132 "red=%d\ngreen=%d\nblue=%d\nmode=%d\n"
00133 #define HILDON_HOME_CONF_DEFAULT_COLOR 0
00134
00135
00136 #define HILDON_HOME_USER_PLUGIN_PATH "/var/lib/install/usr/lib/hildon-home/"
00137 #define HILDON_HOME_USER_PLUGIN_CONF_FORMAT \
00138 "plugin=%s\nwidth=%d\nheight=%d\nx=%d\ny=%d\n"
00139
00140 #define STARTUP_LOCK_FILE "/var/lock/hildon-home-startup"
00141 #define STARTUP_LOCK_TIME 10000
00142
00143
00144 #define HILDON_HOME_TEMPORARY_FILENAME_EXT "_tmp"
00145 #define HILDON_HOME_BG_USER_FILENAME "hildon_home_bg_user.png"
00146 #define HILDON_HOME_BG_USER_FILENAME_TEMP "hildon_home_bg_user.png_tmp"
00147 #define HILDON_HOME_BG_FILENAME_FORMAT "%s\n"
00148 #define HILDON_HOME_BG_FILENAME_FORMAT_SAVE "%200s\n"
00149
00150 #define HILDON_HOME_IMAGE_LOADER "home-image-loader"
00151 #define HILDON_HOME_IMAGE_LOADER_PATH "/usr/bin/home-image-loader"
00152 #define HILDON_HOME_IMAGE_LOADER_NICE 19
00153
00154 #define HILDON_HOME_BLEND_IMAGE_TITLEBAR_NAME "HildonHomeTitleBar"
00155 #define HILDON_HOME_BLEND_IMAGE_SIDEBAR_NAME "HildonHomeLeftEdge"
00156
00157 #define HILDON_HOME_ORIGINAL_IMAGE_TITLEBAR "original_titlebar.png"
00158 #define HILDON_HOME_ORIGINAL_IMAGE_SIDEBAR "original_sidebar.png"
00159
00160
00161
00162 #define HILDON_HOME_TITLEBAR_NAME "HildonHomeTitleBar"
00163 #define HILDON_HOME_TITLEBAR_X 0
00164 #define HILDON_HOME_TITLEBAR_Y 0
00165 #define HILDON_HOME_TITLEBAR_LEFT_X "0"
00166 #define HILDON_HOME_TITLEBAR_TOP_Y "0"
00167
00168 #define HILDON_HOME_TITLEBAR_MENU_NAME "menu_force_with_corners"
00169 #define HILDON_HOME_TITLEBAR_MENU_LABEL _("home_ap_home_view")
00170
00171 #define HILDON_HOME_TITLEBAR_MENU_SELECT_APPLETS _("home_me_select_applets")
00172 #define HILDON_HOME_TITLEBAR_MENU_APPLET_SETTINGS _("home_me_applet_settings")
00173 #define HILDON_HOME_MENU_APPLET_SETTINGS_NOAVAIL _("home_ib_not_available")
00174 #define HILDON_HOME_MENU_EDIT_LAYOUT_NOAVAIL _("home_ib_select_applets")
00175 #define HILDON_HOME_TITLEBAR_MENU_EDIT_LAYOUT _("home_me_edit_layout")
00176 #define HILDON_HOME_TITLEBAR_MENU_TOOLS _("home_me_tools")
00177 #define HILDON_HOME_TITLEBAR_SUB_SET_BG _("home_me_tools_set_background")
00178 #define HILDON_HOME_TITLEBAR_SUB_PERSONALISATION _("home_me_tools_personalisation")
00179 #define HILDON_HOME_TITLEBAR_SUB_CALIBRATION _("home_me_tools_screen_calibration")
00180 #define HILDON_HOME_TITLEBAR_SUB_HELP _("home_me_tools_help")
00181
00182 #define HILDON_CP_DESKTOP_NAME "Name"
00183 #define HILDON_CP_PLUGIN_PERSONALISATION "personalisation.desktop"
00184 #define HILDON_CP_PLUGIN_CALIBRATION "tscalibrate.desktop"
00185
00186
00187 #define HILDON_HOME_NORMAL_HELP_TOPIC "uiframework_home_normal_mode"
00188 #define HILDON_HOME_LAYOUT_HELP_TOPIC "uiframework_home_layout_mode"
00189 #define HILDON_HOME_SELECT_APPLETS_HELP_TOPIC "uiframework_home_select_applets"
00190 #define HILDON_HOME_SET_BACKGROUND_HELP_TOPIC "uiframework_home_set_background"
00191 #define HILDON_HOME_SELECT_IMAGE_HELP_TOPIC "uiframework_home_select_image"
00192
00193
00194
00195
00196 #define HILDON_HOME_TITLEBAR_X_OFFSET_DEFAULT 10
00197 #define HILDON_HOME_TITLEBAR_Y_OFFSET_DEFAULT -13
00198
00199 #define HILDON_HOME_MENUAREA_WIDTH 348
00200 #define HILDON_HOME_MENUAREA_LMARGIN 0
00201
00202
00203 #define HILDON_HOME_SIDEBAR_NAME "HildonHomeLeftEdge"
00204 #define HILDON_HOME_SIDEBAR_WIDTH 10
00205 #define HILDON_HOME_SIDEBAR_HEIGHT (WINDOW_HEIGHT-HILDON_HOME_TITLEBAR_HEIGHT)
00206 #define HILDON_HOME_SIDEBAR_X 0
00207 #define HILDON_HOME_SIDEBAR_Y HILDON_HOME_TITLEBAR_HEIGHT
00208 #define HILDON_HOME_SIDEBAR_LEFT_X "0"
00209 #define HILDON_HOME_SIDEBAR_TOP_Y "60"
00210
00211
00212
00213 #define HILDON_HOME_APP_AREA_NAME "HildonHomeAppArea"
00214 #define HILDON_HOME_APP_AREA_WIDTH (HILDON_HOME_AREA_WIDTH-\
00215 HILDON_HOME_SIDEBAR_WIDTH)
00216 #define HILDON_HOME_APP_AREA_HEIGHT HILDON_HOME_SIDEBAR_HEIGHT
00217 #define HILDON_HOME_APP_AREA_X HILDON_HOME_SIDEBAR_WIDTH
00218 #define HILDON_HOME_APP_AREA_Y HILDON_HOME_SIDEBAR_Y
00219 #define HILDON_HOME_APP_AREA_MARGIN 9
00220 #define HILDON_HOME_APP_AREA_MARGIN_INNER 6
00221
00222
00223 #define HILDON_HOME_APPLET_BORDER_WIDTH 6
00224 #define HILDON_HOME_APPLET_LEFT_X HILDON_HOME_APP_AREA_X+\
00225 HILDON_HOME_APP_AREA_MARGIN
00226 #define HILDON_HOME_APPLET_TOP_Y HILDON_HOME_APP_AREA_Y+\
00227 HILDON_HOME_APP_AREA_MARGIN
00228
00229
00230 #define HILDON_HOME_LOADING_IMAGE_TEXT _("home_nw_loading_image")
00231 #define HILDON_HOME_LOADING_IMAGE_ANI "qgn_indi_process_a"
00232 #define HILDON_NOTE_INFORMATION_ICON "qgn_note_info"
00233
00234
00235 #define HILDON_HOME_NO_MEMORY_TEXT COMMON_STRING("sfil_ni_not_enough_memory")
00236
00237
00238 #define HILDON_HOME_CONNECTIVITY_TEXT COMMON_STRING("sfil_ni_cannot_open_no_connection")
00239
00240
00241
00242 #define HILDON_HOME_FILE_UNREADABLE_TEXT FM("sfil_ib_opening_not_allowed")
00243
00244 #define LAYOUT_MODE_NOTIFICATION_MODE_ACCEPT_TEXT _("home_ni_overlapping_applets")
00245 #define LAYOUT_MODE_NOTIFICATION_MODE_BEGIN_TEXT _("home_pb_layout_mode")
00246 #define LAYOUT_MODE_NOTIFICATION_MODE_CANCEL_TEXT _("home_nc_cancel_layout")
00247 #define LAYOUT_MODE_NOTIFICATION_MODE_CANCEL_YES _("home_bd_cancel_layout_yes")
00248
00249 #define LAYOUT_MODE_NOTIFICATION_MODE_CANCEL_NO _("home_bd_cancel_layout_no")
00250 #define LAYOUT_MODE_NOTIFICATION_MODE_ACCEPT_TEXT _("home_ni_overlapping_applets")
00251
00252
00253 #define TRANSIENCY_MAXITER 50
00254
00255 enum {
00256 BG_IMAGE_NAME,
00257 BG_IMAGE_FILENAME,
00258 BG_IMAGE_PRIORITY
00259 };
00260
00261 typedef enum {
00262 HILDON_HOME_ERROR_PARSER,
00263
00264 HILDON_HOME_ERROR_UNKNOWN
00265 } HildonHomeError;
00266
00267 #define HILDON_HOME_ERROR (hildon_home_error_quark ())
00268 GQuark hildon_home_error_quark (void) G_GNUC_CONST;
00269
00270 G_END_DECLS
00271
00272 #endif