hildon-home-main.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of maemo-af-desktop
00003  *
00004  * Copyright (C) 2006 Nokia Corporation.
00005  *
00006  * Contact: Karoliina Salminen <karoliina.t.salminen@nokia.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00029 #ifndef HILDON_CLOCKAPP_HOME_MAIN_H
00030 #define HILDON_CLOCKAPP_HOME_MAIN_H
00031 
00032 #include "hildon-home-image-loader.h"
00033 #include "hildon-home-interface.h"
00034 
00035 G_BEGIN_DECLS
00036 
00037 /* generic and not home specific values */
00038 #define _(a) gettext(a)
00039 #define COMMON_STRING(a) dgettext("hildon-common-strings", a)
00040 #define FM(a) dgettext("hildon-fm", a)
00041 
00042 #define HILDON_MENU_KEY                 GDK_F4
00043 
00044 #define WINDOW_WIDTH                    800
00045 #define WINDOW_HEIGHT                   480
00046 #define HILDON_HOME_ENV_HOME            "HOME"
00047 
00048 #define HILDON_HOME_FLASH_FULL_TEXT      dgettext("libosso-common-error", "cerm_device_memory_full")
00049 #define HILDON_HOME_MMC_NOT_OPEN_TEXT   COMMON_STRING("sfil_ni_cannot_open_mmc_cover_open")
00050 #define HILDON_HOME_MMC_NOT_OPEN_CLOSE  COMMON_STRING("sfil_ni_cannot_open_mmc_cover_open_ok")
00051 
00052 /* Home */
00053 #define HILDON_HOME_NAME                "Home"
00054 #define HILDON_HOME_WINDOW_NAME         "HildonHome"
00055 #define HILDON_HOME_VERSION             "2.1.0"
00056 #define HILDON_HOME_SYSTEM_DIR          ".osso/hildon-home"
00057 #define HILDON_HOME_SYSTEM_DIR_ACCESS   0755
00058 #define HILDON_HOME_PATH_STR_LENGTH     2048
00059 
00060 /* Default factory values */
00061 #define HILDON_HOME_FACTORY_FILENAME    "/etc/hildon-home/hildon-home.conf"
00062 #define HILDON_HOME_FACTORY_FORMAT    \
00063  "WShide=%d\nWSproperties=%d\nBGchange=%d\nBGfile=%200s\n"
00064 
00065 /* Hard code values which are used when no other values are available */
00066 #define HILDON_HOME_HC_USER_IMAGE_DIR    "MyDocs/.images"
00067 #define HILDON_HOME_CONF_USER_FILENAME   "hildon-home.conf"
00068 #define HILDON_HOME_CONF_USER_ORIGINAL_FILENAME  "user_filename.txt"
00069 #define HILDON_HOME_CONF_USER_IMAGE_DIR  "MyDocs/.images"
00070 #define HILDON_HOME_BG_DEFAULT_IMG_INFO_DIR  "/usr/share/backgrounds"
00071      
00072 /* background image related definitions */   
00073 #define BG_DESKTOP_GROUP           "Desktop Entry"
00074 #define BG_DESKTOP_IMAGE_NAME      "Name"
00075 #define BG_DESKTOP_IMAGE_FILENAME  "File"
00076 #define BG_DESKTOP_IMAGE_PRIORITY  "X-Order"
00077 #define BG_IMG_INFO_FILE_TYPE      "desktop"
00078 #define HOME_BG_IMG_DEFAULT_PRIORITY  15327 /* this is a random number */
00079 #define BG_LOADING_PIXBUF_NULL    -526
00080 #define BG_LOADING_OTHER_ERROR    -607
00081 #define BG_LOADING_RENAME_FAILED  -776
00082 #define BG_LOADING_SUCCESS        0
00083 #define MAX_CHARS_HERE            6
00084 
00085 #define HILDON_HOME_SET_BG_TITLE    _("home_ti_set_backgr")
00086 #define HILDON_HOME_SET_BG_OK       _("home_bd_set_backgr_ok")
00087 #define HILDON_HOME_SET_BG_PREVIEW  _("home_bd_set_backgr_preview")
00088 #define HILDON_HOME_SET_BG_IMAGE    _("home_bd_set_backgr_image")  
00089 #define HILDON_HOME_SET_BG_CANCEL   _("home_bd_set_backgr_cancel")   
00090 
00091 #define HILDON_HOME_SET_BG_RESPONSE_PREVIEW  GTK_RESPONSE_YES
00092 #define HILDON_HOME_SET_BG_RESPONSE_IMAGE    GTK_RESPONSE_APPLY 
00093  
00094 #define HILDON_HOME_SET_BG_COLOR_TITLE     _("home_fi_set_backgr_color")
00095 #define HILDON_HOME_SET_BG_IMAGE_TITLE     _("home_fi_set_backgr_image")
00096 #define HILDON_HOME_SET_BG_IMAGE_NONE      _("home_va_set_backgr_none")
00097 #define HILDON_HOME_SET_BG_MODE_TITLE      _("home_fi_set_backgr_mode") 
00098 #define HILDON_HOME_SET_BG_MODE_CENTERED   _("home_va_set_backgr_centered")
00099 #define HILDON_HOME_SET_BG_MODE_SCALED     _("home_va_set_backgr_scaled")
00100 #define HILDON_HOME_SET_BG_MODE_STRETCHED  _("home_va_set_backgr_stretched")
00101 #define HILDON_HOME_SET_BG_MODE_TILED      _("home_va_set_backgr_tiled") 
00102   
00103 #define HILDON_HOME_FILE_CHOOSER_ACTION_PROP  "action"
00104 #define HILDON_HOME_FILE_CHOOSER_TITLE_PROP   "title"
00105 #define HILDON_HOME_FILE_CHOOSER_TITLE        _("home_ti_select_image")
00106 #define HILDON_HOME_FILE_CHOOSER_SELECT_PROP  "open-button-text"
00107 #define HILDON_HOME_FILE_CHOOSER_SELECT       _("home_bd_select_image")
00108 #define HILDON_HOME_FILE_CHOOSER_EMPTY_PROP   "empty-text"
00109 #define HILDON_HOME_FILE_CHOOSER_EMPTY        _("home_li_no_images")
00110 
00111 
00112 #define HILDON_HOME_CONF_USER_FORMAT \
00113         "red=%d\ngreen=%d\nblue=%d\nmode=%d\n"
00114 #define HILDON_HOME_CONF_DEFAULT_COLOR 0
00115 
00116         
00117 #define HILDON_HOME_USER_PLUGIN_PATH "/var/lib/install/usr/lib/hildon-home/"
00118 #define HILDON_HOME_USER_PLUGIN_CONF_FORMAT    \
00119     "plugin=%s\nwidth=%d\nheight=%d\nx=%d\ny=%d\n"
00120 
00121 #define STARTUP_LOCK_FILE  "/var/lock/hildon-home-startup"
00122 #define STARTUP_LOCK_TIME  10000
00123 
00124 /* user saved values */
00125 #define HILDON_HOME_TEMPORARY_FILENAME_EXT   "_tmp"
00126 #define HILDON_HOME_BG_USER_FILENAME         "hildon_home_bg_user.png"
00127 #define HILDON_HOME_BG_USER_FILENAME_TEMP    "hildon_home_bg_user.png_tmp"
00128 #define HILDON_HOME_BG_FILENAME_FORMAT       "%s\n"
00129 #define HILDON_HOME_BG_FILENAME_FORMAT_SAVE  "%200s\n"
00130 
00131 #define HILDON_HOME_IMAGE_LOADER       "home-image-loader"
00132 #define HILDON_HOME_IMAGE_LOADER_PATH  "/usr/bin/home-image-loader"
00133 #define HILDON_HOME_IMAGE_LOADER_NICE  19
00134 
00135 #define HILDON_HOME_BLEND_IMAGE_TITLEBAR_NAME  "HildonHomeTitleBar"
00136 #define HILDON_HOME_BLEND_IMAGE_SIDEBAR_NAME   "HildonHomeLeftEdge"
00137 
00138 #define HILDON_HOME_ORIGINAL_IMAGE_TITLEBAR  "original_titlebar.png"
00139 #define HILDON_HOME_ORIGINAL_IMAGE_SIDEBAR   "original_sidebar.png"
00140 
00141 #define HILDON_HOME_WIDTH        (WINDOW_WIDTH-HILDON_TASKNAV_WIDTH)
00142 #define HILDON_HOME_HEIGHT       WINDOW_HEIGHT
00143 #define HILDON_HOME_X            HILDON_TASKNAV_WIDTH
00144 #define HILDON_HOME_Y            0
00145 #define HILDON_HOME_AREA_WIDTH   HILDON_HOME_WIDTH 
00146 #define HILDON_HOME_AREA_HEIGHT  HILDON_HOME_HEIGHT
00147 #define HILDON_HOME_AREA_X       0
00148 #define HILDON_HOME_AREA_Y       0
00149 
00150 
00151 /* title bar and menu */
00152 #define HILDON_HOME_TITLEBAR_NAME     "HildonHomeTitleBar"
00153 #define HILDON_HOME_TITLEBAR_WIDTH    (WINDOW_WIDTH-HILDON_TASKNAV_WIDTH)
00154 #define HILDON_HOME_TITLEBAR_X        0
00155 #define HILDON_HOME_TITLEBAR_Y        0
00156 #define HILDON_HOME_TITLEBAR_LEFT_X  "0"
00157 #define HILDON_HOME_TITLEBAR_TOP_Y   "0"
00158 
00159 #define HILDON_HOME_TITLEBAR_MENU_NAME   "menu_force_with_corners"
00160 #define HILDON_HOME_TITLEBAR_MENU_LABEL  _("home_ap_home_view")
00161 
00162 #define HILDON_HOME_TITLEBAR_MENU_SELECT_APPLETS   _("home_me_select_applets")
00163 #define HILDON_HOME_TITLEBAR_MENU_APPLET_SETTINGS  _("home_me_applet_settings")
00164 #define HILDON_HOME_MENU_APPLET_SETTINGS_NOAVAIL   _("home_ib_not_available")
00165 #define HILDON_HOME_TITLEBAR_MENU_EDIT_LAYOUT      _("home_me_edit_layout")
00166 #define HILDON_HOME_TITLEBAR_MENU_TOOLS            _("home_me_tools")
00167 #define HILDON_HOME_TITLEBAR_SUB_SET_BG            _("home_me_tools_set_background")
00168 #define HILDON_HOME_TITLEBAR_SUB_PERSONALISATION   _("home_me_tools_personalisation")
00169 #define HILDON_HOME_TITLEBAR_SUB_CALIBRATION       _("home_me_tools_screen_calibration")
00170 #define HILDON_HOME_TITLEBAR_SUB_HELP              _("home_me_tools_help")
00171 
00172 #define HILDON_CP_DESKTOP_NAME            "Name"
00173 #define HILDON_CP_PLUGIN_PERSONALISATION  "personalisation.desktop"
00174 #define HILDON_CP_PLUGIN_CALIBRATION      "tscalibrate.desktop"
00175 
00176 /* help topics */
00177 #define HILDON_HOME_NORMAL_HELP_TOPIC           "uiframework_home_normal_mode"
00178 #define HILDON_HOME_LAYOUT_HELP_TOPIC           "uiframework_home_layout_mode"
00179 #define HILDON_HOME_SELECT_APPLETS_HELP_TOPIC   "uiframework_home_select_applets"
00180 #define HILDON_HOME_SET_BACKGROUND_HELP_TOPIC   "uiframework_home_set_background"
00181 #define HILDON_HOME_SELECT_IMAGE_HELP_TOPIC   "uiframework_home_select_image"
00182 
00183 /* The edge offsets used for aligning the menu if no theme information is
00184    available */
00185 
00186 #define HILDON_HOME_TITLEBAR_X_OFFSET_DEFAULT  10 
00187 #define HILDON_HOME_TITLEBAR_Y_OFFSET_DEFAULT  -13 
00188 
00189 #define HILDON_HOME_MENUAREA_WIDTH      348
00190 #define HILDON_HOME_MENUAREA_LMARGIN    0
00191 
00192 /* skin area */
00193 #define HILDON_HOME_SIDEBAR_NAME    "HildonHomeLeftEdge"
00194 #define HILDON_HOME_SIDEBAR_WIDTH   10
00195 #define HILDON_HOME_SIDEBAR_HEIGHT  (WINDOW_HEIGHT-HILDON_HOME_TITLEBAR_HEIGHT)
00196 #define HILDON_HOME_SIDEBAR_X       0
00197 #define HILDON_HOME_SIDEBAR_Y       HILDON_HOME_TITLEBAR_HEIGHT
00198 #define HILDON_HOME_SIDEBAR_LEFT_X  "0"
00199 #define HILDON_HOME_SIDEBAR_TOP_Y   "60" /* HILDON_HOME_TITLEBAR_HEIGHT */
00200 
00201 
00202 /* applet area values */
00203 #define HILDON_HOME_APP_AREA_NAME       "HildonHomeAppArea"
00204 #define HILDON_HOME_APP_AREA_WIDTH      (HILDON_HOME_AREA_WIDTH-\
00205                                          HILDON_HOME_SIDEBAR_WIDTH)
00206 #define HILDON_HOME_APP_AREA_HEIGHT     HILDON_HOME_SIDEBAR_HEIGHT
00207 #define HILDON_HOME_APP_AREA_X          HILDON_HOME_SIDEBAR_WIDTH
00208 #define HILDON_HOME_APP_AREA_Y          HILDON_HOME_SIDEBAR_Y
00209 #define HILDON_HOME_APP_AREA_MARGIN       9
00210 #define HILDON_HOME_APP_AREA_MARGIN_INNER 6
00211 
00212 /* generic applet values */
00213 #define HILDON_HOME_APPLET_BORDER_WIDTH 6
00214 #define HILDON_HOME_APPLET_LEFT_X       HILDON_HOME_APP_AREA_X+\
00215                                         HILDON_HOME_APP_AREA_MARGIN
00216 #define HILDON_HOME_APPLET_TOP_Y        HILDON_HOME_APP_AREA_Y+\
00217                                         HILDON_HOME_APP_AREA_MARGIN
00218 
00219 /* HOM-NOT006*/
00220 #define HILDON_HOME_LOADING_IMAGE_TEXT    _("home_nw_loading_image")
00221 #define HILDON_HOME_LOADING_IMAGE_ANI     "qgn_indi_process_a"
00222 #define HILDON_NOTE_INFORMATION_ICON      "qgn_note_info"
00223 
00224 /* WID-NOT201*/
00225 #define HILDON_HOME_NO_MEMORY_TEXT       COMMON_STRING("sfil_ni_not_enough_memory")
00226 
00227 /* WID-NOT202 */
00228 #define HILDON_HOME_CONNECTIVITY_TEXT    COMMON_STRING("sfil_ni_cannot_open_no_connection")
00229 
00230 /* FIL-INF010 */
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 
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 G_END_DECLS
00252 
00253 #endif

Generated on Fri Jun 9 16:23:05 2006 for maemo-af-desktop-documentation by  doxygen 1.4.6