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)
78 #define ICO_HS_WS_HOST ("127.0.0.1")
80 #define ICO_HS_APP_NUM_MAX (128)
81 #define ICO_HS_WINDOW_NUM_MAX (10)
82 #define ICO_HS_MSG_SIZE (1024)
83 #define ICO_HS_TEMP_BUF_SIZE (256)
84 #define ICO_HS_NOTILE_APP_MAX (20)
86 #define ICO_HS_PROTOCOL "hs-protocol"
88 #define ICO_HS_PROTOCOL_CM "gui-protocol"
89 /* protocol to communicate external tools */
90 #define ICO_HS_PROTOCOL_SB "statusbar-protocol"
91 /* protocol to communicate status bar */
92 #define ICO_HS_PROTOCOL_OS "onscreen-protocol"
93 /* protocol to communicate onscreen */
94 #define ICO_HS_PROTOCOL_APP "app-protocol"
95 /* protocol to communicate application(not used)*/
96 #define ICO_HS_PROTOCOL_TYPE_CM (1)
97 #define ICO_HS_PROTOCOL_TYPE_SB (2)
98 #define ICO_HS_PROTOCOL_TYPE_OS (3)
99 #define ICO_HS_PROTOCOL_TYPE_APP (4)
100 #define ICO_HS_MSG_HEAD_CM "GUI"
101 #define ICO_HS_MSG_HEAD_SB "STB"
102 #define ICO_HS_MSG_HEAD_OS "ONS"
103 #define ICO_HS_MSG_HEAD_APP "APP"
104 #define HS_REQ_ANS_HELLO "REQ_ANS_HELLO"
106 #define ICO_HS_SIZE_SB_HEIGHT (64)
107 #define ICO_HS_SIZE_LAYOUT_WIDTH (768)
108 #define ICO_HS_SIZE_LAYOUT_HEIGHT (1024)
110 /* define for statusbar configuration */
111 #define ICO_SB_CONFIG_SHTCT_APP "shortcut_app"
113 /* define for sound configuration */
114 #define ICO_HS_SND_TYPE_DEFAULT (1)
116 #define ICO_HS_SND_CNAME_DEFAULT "sound_default"
117 #define ICO_HS_SND_FNAME_DEFAULT "default.wav"
119 /*============================================================================*/
121 /*============================================================================*/
122 typedef struct _hs_window_data hs_window_data_t;
123 struct _hs_window_data {
124 char appid[ICO_UXF_MAX_PROCESS_NAME+1];
125 char exe_name[ICO_UXF_MAX_PROCESS_NAME+1];
136 /*============================================================================*/
138 /*============================================================================*/
139 extern void hs_tile_free_app(int idx);
140 extern void hs_tile_kill_app(const char *appid);
141 extern void hs_tile_set_app(int idx, const char *appid);
142 extern int hs_tile_get_index_app(const char *appid);
143 extern int hs_tile_get_index_pos(int x, int y, int w, int h);
144 extern int hs_tile_get_minchange(void);
145 extern void hs_tile_show_screen(void);
146 extern int hs_get_index_appscreendata(const char *appid);
147 extern void hs_req_ctlr_tile(void);
148 extern void hs_click_escutcheon(void);
149 extern int hs_click_applist(void);
150 extern void hs_show_onscreen(void);
151 extern void hs_hide_onscreen(void);
152 extern void hs_show_appscreen(const char *appid);
153 extern void hs_tile_delete_hide(const char *appid);
155 extern void hs_get_image_path(char *buff, int len);
156 extern void hs_get_sound_path(char *buff, int len);
157 extern void hs_get_edj_path(char *buff, int len);
158 extern void hs_get_ons_edj_path(char *buff, int len);
159 extern void hs_get_conf_path(char *buff, int len);
161 extern hs_window_data_t hs_command_tile_req[ICO_HS_APP_NUM_MAX];
162 extern hs_window_data_t hs_app_screen_window[ICO_HS_APP_NUM_MAX];
163 extern char hs_name_homescreen[ICO_UXF_MAX_PROCESS_NAME+1];
164 extern char hs_kill_appid[ICO_UXF_MAX_PROCESS_NAME];
165 extern char hs_active_onscreen[ICO_UXF_MAX_PROCESS_NAME];
167 extern int hs_snd_play(char *wav_file);
168 extern char *hs_snd_get_filename(int type);
169 extern int hs_snd_init(void);
170 #endif /* _HOME_SCREEN_H_ */
173 * End of File. (home_screen.h)