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