Corresponding to TizenIVI3.0 M14.3,
[profile/ivi/ico-uxf-homescreen.git] / include / ico_syc_winctl.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 Window Control API
11  *          for privilege applications
12  *
13  * @date    Feb-21-2014
14  */
15
16 #ifndef _ICO_SYC_WINCTL_H_
17 #define _ICO_SYC_WINCTL_H_
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /*============================================================================*/
24 /* enum                                                                       */
25 /*============================================================================*/
26 /*
27  * showing window
28  * @ICO_SYC_WIN_SHOW_ALL: show all of the application windows
29  */
30 typedef enum _window_show {
31     ICO_SYC_WIN_SHOW_ALL = -1
32 } ico_syc_win_show_e;
33
34 /*============================================================================*/
35 /* structure                                                                  */
36 /*============================================================================*/
37 /*
38  * animation information
39  */
40 #define ICO_SYC_WIN_SURF_RAISE      0x01000000
41 #define ICO_SYC_WIN_SURF_LOWER      0x02000000
42 #define ICO_SYC_WIN_SURF_NOCHANGE   0x04000000
43 #define ICO_SYC_WIN_SURF_NORESCTL   0x40000000
44 #define ICO_SYC_WIN_SURF_ONESHOT    0x10000000
45 #define ICO_SYC_WIN_SURF_FLAGS      0xff000000
46 typedef struct _animation_info {
47     char *name;     /* name of animation (ex. fade,slide,zoom etc..) */
48     int  time;      /* millisecond time to show the transition's animation */
49 } ico_syc_animation_t;
50
51 /*============================================================================*/
52 /* functions                                                                  */
53 /*============================================================================*/
54 /*--------------------------------------------------------------------------*/
55 /**
56  * @brief   ico_syc_show
57  *          Show the application window with animation.
58  *          If user sets argument surface "ICO_SYC_WIN_SHOW_ALL",
59  *          show all of the application windows.
60  *
61  * @param[in]   appid                   application id
62  * @param[in]   surface                 window's surface id
63  * @param[in]   animation               animation information
64  * @return      result
65  * @retval      0                       success
66  * @retval      not 0                   error
67  * @see         ico_syc_win_show_e
68  */
69 /*--------------------------------------------------------------------------*/
70 int ico_syc_show(const char *appid, int surface,
71                  const ico_syc_animation_t *animation);
72
73 /*--------------------------------------------------------------------------*/
74 /**
75  * @brief   ico_syc_hide
76  *          Hide the application window with animation.
77  *
78  * @param[in]   appid                   application id
79  * @param[in]   surface                 window's surface id
80  * @param[in]   animation               animation information
81  * @return      result
82  * @retval      0                       success
83  * @retval      not 0                   error
84  */
85 /*--------------------------------------------------------------------------*/
86 int ico_syc_hide(const char *appid, int surface,
87                  const ico_syc_animation_t *animation);
88
89 /*--------------------------------------------------------------------------*/
90 /**
91  * @brief   ico_syc_move
92  *          Move the application window with animation.
93  *
94  * @param[in]   appid                   application id
95  * @param[in]   surface                 window's surface id
96  * @param[in]   move                    move information (zone/position/size)
97  * @param[in]   animation               animation information
98  * @return      result
99  * @retval      0                       success
100  * @retval      not 0                   error
101  */
102 /*--------------------------------------------------------------------------*/
103 int ico_syc_move(const char *appid, int surface,
104                  const ico_syc_win_move_t *move,
105                  const ico_syc_animation_t *animation);
106
107 /*--------------------------------------------------------------------------*/
108 /**
109  * @brief   ico_syc_change_active
110  *          Change the active window which receives the input-event notification
111  *          from System Controller.
112  *
113  * @param[in]   appid                   application id
114  * @param[in]   surface                 window's surface id
115  * @return      result
116  * @retval      0                       success
117  * @retval      not 0                   error
118  */
119 /*--------------------------------------------------------------------------*/
120 int ico_syc_change_active(const char *appid, int surface);
121
122 /*--------------------------------------------------------------------------*/
123 /**
124  * @brief   ico_syc_change_layer
125  *          Change the window's layer.
126  *
127  * @param[in]   appid                   application id
128  * @param[in]   surface                 window's surface id
129  * @param[in]   layer                   window's layer id
130  * @return      result
131  * @retval      0                       success
132  * @retval      not 0                   error
133  */
134 /*--------------------------------------------------------------------------*/
135 int ico_syc_change_layer(const char *appid, int surface, int layer);
136
137 /*--------------------------------------------------------------------------*/
138 /**
139  * @brief   ico_syc_map_get
140  *          Get surface image pixel to the file.
141  *
142  * @param[in]   surface                 window's surface id
143  * @param[in]   filepath                pixel image file path
144  * @return      result
145  * @retval      0                       success
146  * @retval      not 0                   error
147  */
148 /*--------------------------------------------------------------------------*/
149 int ico_syc_map_get(int surface, const char *filepath);
150
151 /*--------------------------------------------------------------------------*/
152 /**
153  * @brief   ico_syc_map_thumb
154  *          Map the thumbnail data
155  *
156  * @param[in]   surface                 window's surface id
157  * @param[in]   framerate               notify cycle [frames par sec]
158  * @param[in]   filepath                pixel image file path
159  * @return      result
160  * @retval      0                       success
161  * @retval      not 0                   error
162  */
163 /*--------------------------------------------------------------------------*/
164 int ico_syc_map_thumb(int surface, int framerate, const char *filepath);
165
166 /*--------------------------------------------------------------------------*/
167 /**
168  * @brief   ico_syc_unmap_thumb
169  *          Unmap the thumbnail data.
170  *          User calls this API when receiving the notification that
171  *          terminated the application.
172  *
173  * @param[in]   surface                 window's surface id
174  * @return      result
175  * @retval      0                       success
176  * @retval      not 0                   error
177  */
178 /*--------------------------------------------------------------------------*/
179 int ico_syc_unmap_thumb(int surface);
180
181 /*--------------------------------------------------------------------------*/
182 /**
183  * @brief   ico_syc_show_layer
184  *          Show the layer.
185  *
186  * @param[in]   layer                   window's layer id
187  * @return      result
188  * @retval      0                       success
189  * @retval      not 0                   error
190  */
191 /*--------------------------------------------------------------------------*/
192 int ico_syc_show_layer(int layer);
193
194 /*--------------------------------------------------------------------------*/
195 /**
196  * @brief   ico_syc_hide_layer
197  *          Hide the layer.
198  *
199  * @param[in]   layer                   window's layer id
200  * @return      result
201  * @retval      0                       success
202  * @retval      not 0                   error
203  */
204 /*--------------------------------------------------------------------------*/
205 int ico_syc_hide_layer(int layer);
206
207
208 #ifdef __cplusplus
209 }
210 #endif
211 #endif /*_ICO_SYC_WINCTL_H_*/
212 /* vim:set expandtab ts=4 sw=4: */