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_SMALL (11)
32 #define ICO_HS_TILE_HWIDE (21)
33 #define ICO_HS_TILE_VWIDE (12)
34 #define ICO_HS_TILE_LARGE (22)
35 #define ICO_HS_TILE_OTHERS (0)
37 #define ICO_HS_TILE_CHAN (18)
38 #define ICO_HS_TILE_SIZE_S (170)
39 #define ICO_HS_TILE_SIZE_W (ICO_HS_TILE_SIZE_S*2 + ICO_HS_TILE_CHAN)
41 #define ICO_HS_CONFIG_HOMESCREEN "homescreen"
42 #define ICO_HS_CONFIG_ONSCREEN "onscreen"
43 #define ICO_HS_CONFIG_STATUBAR "statusbar"
44 #define ICO_HS_CONFIG_SOUND "sound"
46 #define ICO_HS_CONFIG_TILE_COLCNT "tileinfo_colcnt"
47 #define ICO_HS_CONFIG_TILE_ROWCNT "tileinfo_rowcnt"
48 #define ICO_HS_CONFIG_TILE_VALID "tileinfo_valid"
49 #define ICO_HS_CONFIG_TILE_TYPE "tileinfo_type"
50 #define ICO_HS_CONFIG_TILE_APP "tileinfo_app"
52 #define ICO_HS_CONFIG_TILE_ROWCNT_DEFAULT (4)
53 #define ICO_HS_CONFIG_TILE_COLCNT_DEFAULT (5)
54 #define ICO_HS_CONFIG_TILE_APP_DEFAULT "none"
56 #define ICO_HS_CONFIG_WS_PORT "wsport"
57 #define ICO_HS_CONFIG_ORIENTAION "orientation"
59 #define ICO_HS_CONFIG_BG "bgimage"
61 #define ICO_HS_CONFIG_SB "statusbar"
62 #define ICO_HS_CONFIG_ONS "onscreen"
63 #define ICO_HS_APPID_DEFAULT_SB "org.tizen.ico.statusbar" /* default status bar appid */
64 #define ICO_HS_APPID_DEFAULT_ONS "org.tizen.ico.onscreen" /* default on screen appid */
65 #define ICO_HS_APPID_DEFAULT_TOUCH "TOUCH_SCREEN" /* default touch screen name */
67 #define ICO_HS_GROUP_SPECIAL "menu"
69 #define ICO_HS_ONS_APPLI_KILL_NAME "appli_kill.edj"
70 #define ICO_HS_ONS_APPLI_LIST_NAME "appli_list.edj"
71 #define ICO_HS_ONS_PART_RECT_NAME "rect_"
72 #define ICO_HS_ONS_PART_NEXT_NAME "next_bt"
73 #define ICO_HS_ONS_PART_CANCEL_NAME "cancel_bt"
75 #define ICO_HS_WS_PORT (10001)
77 #define ICO_HS_APP_NUM_MAX (128)
78 #define ICO_HS_WINDOW_NUM_MAX (10)
79 #define ICO_HS_MSG_SIZE (1024)
80 #define ICO_HS_TEMP_BUF_SIZE (256)
82 #define ICO_HS_PROTOCOL_CM "gui-protocol"
83 /* protocol to communicate external tools */
84 #define ICO_HS_PROTOCOL_SB "statusbar-protocol"
85 /* protocol to communicate status bar */
86 #define ICO_HS_PROTOCOL_OS "onscreen-protocol"
87 /* protocol to communicate onscreen */
88 #define ICO_HS_PROTOCOL_APP "app-protocol"
89 /* protocol to communicate application(not used)*/
90 #define ICO_HS_PROTOCOL_TYPE_CM (1)
91 #define ICO_HS_PROTOCOL_TYPE_SB (2)
92 #define ICO_HS_PROTOCOL_TYPE_OS (3)
93 #define ICO_HS_PROTOCOL_TYPE_APP (4)
95 #define ICO_HS_SIZE_SB_HEIGHT (64)
96 #define ICO_HS_SIZE_LAYOUT_WIDTH (768)
97 #define ICO_HS_SIZE_LAYOUT_HEIGHT (1024)
99 /* define for sound configuration */
100 #define ICO_HS_SND_TYPE_DEFAULT (1)
102 #define ICO_HS_SND_CNAME_DEFAULT "sound_default"
103 #define ICO_HS_SND_FNAME_DEFAULT "default.wav"
105 /*============================================================================*/
107 /*============================================================================*/
108 typedef struct _hs_window_data hs_window_data_t;
109 struct _hs_window_data {
110 char appid[ICO_UXF_MAX_PROCESS_NAME+1];
111 char exe_name[ICO_UXF_MAX_PROCESS_NAME+1];
122 /*============================================================================*/
124 /*============================================================================*/
125 extern void hs_tile_free_app(int idx);
126 extern void hs_tile_kill_app(const char *appid);
127 extern void hs_tile_set_app(int idx, const char *appid);
128 extern int hs_tile_get_index_app(const char *appid);
129 extern int hs_tile_get_index_pos(int x, int y, int w, int h);
130 extern int hs_tile_get_minchange(void);
131 extern void hs_tile_show_screen(void);
132 extern int hs_get_index_appscreendata(const char *appid);
133 extern void hs_req_ctlr_tile(void);
134 extern void hs_click_escutcheon(void);
135 extern void hs_show_onscreen(void);
136 extern void hs_hide_onscreen(void);
137 extern void hs_show_appscreen(const char *appid);
139 extern void hs_get_image_path(char *buff, int len);
140 extern void hs_get_sound_path(char *buff, int len);
141 extern void hs_get_edj_path(char *buff, int len);
142 extern void hs_get_ons_edj_path(char *buff, int len);
143 extern void hs_get_conf_path(char *buff, int len);
145 extern hs_window_data_t hs_command_tile_req[ICO_HS_APP_NUM_MAX];
146 extern hs_window_data_t hs_app_screen_window[ICO_HS_APP_NUM_MAX];
147 extern char hs_name_homescreen[ICO_UXF_MAX_PROCESS_NAME+1];
148 extern char hs_kill_appid[ICO_UXF_MAX_PROCESS_NAME];
149 extern char hs_active_onscreen[ICO_UXF_MAX_PROCESS_NAME];
151 extern int hs_snd_play(char *wav_file);
152 extern char *hs_snd_get_filename(int type);
153 extern int hs_snd_init(void);
154 #endif /* _HOME_SCREEN_H_ */
157 * End of File. (home_screen.h)