2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 * @brief header file of homescreen application
15 #ifndef _HOME_SCREEN_H_
16 #define _HOME_SCREEN_H_
20 /*============================================================================*/
22 /*============================================================================*/
24 #define ICO_HS_ERR (-1)
26 #define ICO_HS_TOUCH_TOBE_HIDE (1)
27 #define ICO_HS_TOUCH_TOBE_SHOW (2)
28 #define ICO_HS_TOUCH_IN_HIDE (3)
29 #define ICO_HS_TOUCH_IN_SHOW (4)
31 #define ICO_HS_TILE_NOCHANGE (1)
32 #define ICO_HS_TILE_APPLIST (2)
33 #define ICO_HS_TILE_OTHERS (5)
34 #define ICO_HS_TILE_SMALL (11)
35 #define ICO_HS_TILE_HWIDE (21)
36 #define ICO_HS_TILE_VWIDE (12)
37 #define ICO_HS_TILE_LARGE (22)
39 #define ICO_HS_TILE_CHAN (18)
40 #define ICO_HS_TILE_SIZE_S (170)
41 #define ICO_HS_TILE_SIZE_W (ICO_HS_TILE_SIZE_S*2 + ICO_HS_TILE_CHAN)
43 #define ICO_HS_CONFIG_HOMESCREEN "homescreen"
44 #define ICO_HS_CONFIG_ONSCREEN "onscreen"
45 #define ICO_HS_CONFIG_STATUBAR "statusbar"
46 #define ICO_HS_CONFIG_SOUND "sound"
48 #define ICO_HS_CONFIG_TILE_COLCNT "tileinfo_colcnt"
49 #define ICO_HS_CONFIG_TILE_ROWCNT "tileinfo_rowcnt"
50 #define ICO_HS_CONFIG_TILE_VALID "tileinfo_valid"
51 #define ICO_HS_CONFIG_TILE_TYPE "tileinfo_type"
52 #define ICO_HS_CONFIG_TILE_APP "tileinfo_app"
54 #define ICO_HS_CONFIG_TILE_ROWCNT_DEFAULT (4)
55 #define ICO_HS_CONFIG_TILE_COLCNT_DEFAULT (5)
56 #define ICO_HS_CONFIG_TILE_APP_DEFAULT "none"
58 #define ICO_HS_CONFIG_WS_PORT "wsport"
59 #define ICO_HS_CONFIG_ORIENTAION "orientation"
61 #define ICO_HS_CONFIG_BG "bgimage"
63 #define ICO_HS_CONFIG_SB "statusbar"
64 #define ICO_HS_CONFIG_ONS "onscreen"
65 #define ICO_HS_APPID_DEFAULT_SB "org.tizen.ico.statusbar" /* default status bar appid */
66 #define ICO_HS_APPID_DEFAULT_ONS "org.tizen.ico.onscreen" /* default on screen appid */
67 #define ICO_HS_APPID_DEFAULT_TOUCH "TOUCH_SCREEN" /* default touch screen name */
69 #define ICO_HS_GROUP_SPECIAL "menu"
71 #define ICO_HS_ONS_APPLI_KILL_NAME "appli_kill.edj"
72 #define ICO_HS_ONS_APPLI_LIST_NAME "appli_list.edj"
73 #define ICO_HS_ONS_PART_RECT_NAME "rect_"
74 #define ICO_HS_ONS_PART_NEXT_NAME "next_bt"
75 #define ICO_HS_ONS_PART_CANCEL_NAME "cancel_bt"
77 #define ICO_HS_WS_PORT (10001)
79 #define ICO_HS_APP_NUM_MAX (128)
80 #define ICO_HS_WINDOW_NUM_MAX (10)
81 #define ICO_HS_MSG_SIZE (1024)
82 #define ICO_HS_TEMP_BUF_SIZE (256)
83 #define ICO_HS_NOTILE_APP_MAX (20)
85 #define ICO_HS_PROTOCOL_CM "gui-protocol"
86 /* protocol to communicate external tools */
87 #define ICO_HS_PROTOCOL_SB "statusbar-protocol"
88 /* protocol to communicate status bar */
89 #define ICO_HS_PROTOCOL_OS "onscreen-protocol"
90 /* protocol to communicate onscreen */
91 #define ICO_HS_PROTOCOL_APP "app-protocol"
92 /* protocol to communicate application(not used)*/
93 #define ICO_HS_PROTOCOL_TYPE_CM (1)
94 #define ICO_HS_PROTOCOL_TYPE_SB (2)
95 #define ICO_HS_PROTOCOL_TYPE_OS (3)
96 #define ICO_HS_PROTOCOL_TYPE_APP (4)
98 #define ICO_HS_SIZE_SB_HEIGHT (64)
99 #define ICO_HS_SIZE_LAYOUT_WIDTH (768)
100 #define ICO_HS_SIZE_LAYOUT_HEIGHT (1024)
102 /* define for statusbar configuration */
103 #define ICO_SB_CONFIG_SHTCT_APP "shortcut_app"
105 /* define for sound configuration */
106 #define ICO_HS_SND_TYPE_DEFAULT (1)
108 #define ICO_HS_SND_CNAME_DEFAULT "sound_default"
109 #define ICO_HS_SND_FNAME_DEFAULT "default.wav"
111 /*============================================================================*/
113 /*============================================================================*/
114 typedef struct _hs_window_data hs_window_data_t;
115 struct _hs_window_data {
116 char appid[ICO_UXF_MAX_PROCESS_NAME+1];
117 char exe_name[ICO_UXF_MAX_PROCESS_NAME+1];
128 /*============================================================================*/
130 /*============================================================================*/
131 extern void hs_tile_free_app(int idx);
132 extern void hs_tile_kill_app(const char *appid);
133 extern void hs_tile_set_app(int idx, const char *appid);
134 extern int hs_tile_get_index_app(const char *appid);
135 extern int hs_tile_get_index_pos(int x, int y, int w, int h);
136 extern int hs_tile_get_minchange(void);
137 extern void hs_tile_show_screen(void);
138 extern int hs_get_index_appscreendata(const char *appid);
139 extern void hs_req_ctlr_tile(void);
140 extern void hs_click_escutcheon(void);
141 extern int hs_click_applist(void);
142 extern void hs_show_onscreen(void);
143 extern void hs_hide_onscreen(void);
144 extern void hs_show_appscreen(const char *appid);
146 extern void hs_get_image_path(char *buff, int len);
147 extern void hs_get_sound_path(char *buff, int len);
148 extern void hs_get_edj_path(char *buff, int len);
149 extern void hs_get_ons_edj_path(char *buff, int len);
150 extern void hs_get_conf_path(char *buff, int len);
152 extern hs_window_data_t hs_command_tile_req[ICO_HS_APP_NUM_MAX];
153 extern hs_window_data_t hs_app_screen_window[ICO_HS_APP_NUM_MAX];
154 extern char hs_name_homescreen[ICO_UXF_MAX_PROCESS_NAME+1];
155 extern char hs_kill_appid[ICO_UXF_MAX_PROCESS_NAME];
156 extern char hs_active_onscreen[ICO_UXF_MAX_PROCESS_NAME];
158 extern int hs_snd_play(char *wav_file);
159 extern char *hs_snd_get_filename(int type);
160 extern int hs_snd_init(void);
161 #endif /* _HOME_SCREEN_H_ */
164 * End of File. (home_screen.h)