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