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 Window Control API
11 * for privilege applications
16 #ifndef _ICO_SYC_WINCTL_H_
17 #define _ICO_SYC_WINCTL_H_
19 #include <ico-uxf-weston-plugin/ico_window_mgr-client-protocol.h>
25 /*============================================================================*/
27 /*============================================================================*/
30 * @ICO_SYC_WIN_SHOW_ALL: show all of the application windows
32 typedef enum _window_show {
33 ICO_SYC_WIN_SHOW_ALL = -1
36 /*============================================================================*/
38 /*============================================================================*/
40 * animation information
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;
53 /*============================================================================*/
55 /*============================================================================*/
56 /*--------------------------------------------------------------------------*/
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.
63 * @param[in] appid application id
64 * @param[in] surface window's surface id
65 * @param[in] animation animation information
69 * @see ico_syc_win_show_e
71 /*--------------------------------------------------------------------------*/
72 int ico_syc_show(const char *appid, int surface,
73 const ico_syc_animation_t *animation);
75 /*--------------------------------------------------------------------------*/
78 * Hide the application window with animation.
80 * @param[in] appid application id
81 * @param[in] surface window's surface id
82 * @param[in] animation animation information
87 /*--------------------------------------------------------------------------*/
88 int ico_syc_hide(const char *appid, int surface,
89 const ico_syc_animation_t *animation);
91 /*--------------------------------------------------------------------------*/
94 * Move the application window with animation.
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
102 * @retval not 0 error
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);
109 /*--------------------------------------------------------------------------*/
111 * @brief ico_syc_set_animation
112 * Set the application window animation.
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
120 * @retval not 0 error
122 /*--------------------------------------------------------------------------*/
123 int ico_syc_set_animation(const char *appid, int surface, int type,
124 const ico_syc_animation_t *animation);
126 /*--------------------------------------------------------------------------*/
128 * @brief ico_syc_change_active
129 * Change the active window which receives the input-event notification
130 * from System Controller.
132 * @param[in] appid application id
133 * @param[in] surface window's surface id
136 * @retval not 0 error
138 /*--------------------------------------------------------------------------*/
139 int ico_syc_change_active(const char *appid, int surface);
141 /*--------------------------------------------------------------------------*/
143 * @brief ico_syc_change_layer
144 * Change the window's layer.
146 * @param[in] appid application id
147 * @param[in] surface window's surface id
148 * @param[in] layer window's layer id
151 * @retval not 0 error
153 /*--------------------------------------------------------------------------*/
154 int ico_syc_change_layer(const char *appid, int surface, int layer);
156 /*--------------------------------------------------------------------------*/
158 * @brief ico_syc_map_get
159 * Get surface image pixel to the file.
161 * @param[in] surface window's surface id
162 * @param[in] filepath pixel image file path
165 * @retval not 0 error
167 /*--------------------------------------------------------------------------*/
168 int ico_syc_map_get(int surface, const char *filepath);
170 /*--------------------------------------------------------------------------*/
172 * @brief ico_syc_map_thumb
173 * Map the thumbnail data
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
180 * @retval not 0 error
182 /*--------------------------------------------------------------------------*/
183 int ico_syc_map_thumb(int surface, int framerate, const char *filepath);
185 /*--------------------------------------------------------------------------*/
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.
192 * @param[in] surface window's surface id
195 * @retval not 0 error
197 /*--------------------------------------------------------------------------*/
198 int ico_syc_unmap_thumb(int surface);
200 /*--------------------------------------------------------------------------*/
202 * @brief ico_syc_show_layer
205 * @param[in] layer window's layer id
208 * @retval not 0 error
210 /*--------------------------------------------------------------------------*/
211 int ico_syc_show_layer(int layer);
213 /*--------------------------------------------------------------------------*/
215 * @brief ico_syc_hide_layer
218 * @param[in] layer window's layer id
221 * @retval not 0 error
223 /*--------------------------------------------------------------------------*/
224 int ico_syc_hide_layer(int layer);
230 #endif /*_ICO_SYC_WINCTL_H_*/
231 /* vim:set expandtab ts=4 sw=4: */