Updated package changelog.
[profile/ivi/ico-uxf-homescreen.git] / include / home_screen.h
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
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
7  *
8  */
9 /**
10  * @brief   header file of homescreen application
11  *
12  * @date    Feb-15-2013
13  */
14
15 #ifndef _HOME_SCREEN_H_
16 #define _HOME_SCREEN_H_
17
18 #include "ico_uxf.h"
19
20 /*============================================================================*/
21 /* definition                                                                 */
22 /*============================================================================*/
23 #define ICO_HS_OK               (0)
24 #define ICO_HS_ERR              (-1)
25
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)
30
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)
36
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)
40
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"
45
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"
51
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"
55
56 #define ICO_HS_CONFIG_WS_PORT       "wsport"
57 #define ICO_HS_CONFIG_ORIENTAION    "orientation"
58
59 #define ICO_HS_CONFIG_BG            "bgimage"
60
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 */
66
67 #define ICO_HS_GROUP_SPECIAL        "menu"
68
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"
74
75 #define ICO_HS_WS_PORT              (10001)
76
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)
81
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)
94
95 #define ICO_HS_SIZE_SB_HEIGHT        (64)
96 #define ICO_HS_SIZE_LAYOUT_WIDTH     (768)
97 #define ICO_HS_SIZE_LAYOUT_HEIGHT    (1024)
98
99 /* define for sound configuration */
100 #define ICO_HS_SND_TYPE_DEFAULT      (1)
101
102 #define ICO_HS_SND_CNAME_DEFAULT     "sound_default"
103 #define ICO_HS_SND_FNAME_DEFAULT     "default.wav"
104
105 /*============================================================================*/
106 /* definition                                                                 */
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];
112     int terminate;
113     int visible;
114     int raise;
115     int resize_w;
116     int resize_h;
117     int move_x;
118     int move_y;
119     int category;
120 };
121
122 /*============================================================================*/
123 /* functions                                                                  */
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);
138
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);
144
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];
150
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_ */
155
156 /**
157  * End of File. (home_screen.h)
158  */