2 * Copyright © 2010-2011 Intel Corporation
3 * Copyright © 2008-2011 Kristian Høgsberg
4 * Copyright © 2013 TOYOTA MOTOR CORPORATION.
6 * Permission to use, copy, modify, distribute, and sell this software and
7 * its documentation for any purpose is hereby granted without fee, provided
8 * that the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of the copyright holders not be used in
11 * advertising or publicity pertaining to distribution of the software
12 * without specific, written prior permission. The copyright holders make
13 * no representations about the suitability of this software for any
14 * purpose. It is provided "as is" without express or implied warranty.
16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
18 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
20 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
21 * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
22 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25 * @brief Public functions in ico_window_mgr Weston plugin
30 #ifndef _ICO_WINDOW_MGR_H_
31 #define _ICO_WINDOW_MGR_H_
33 /* Cleint management table */
35 struct wl_client *client; /* Wayland client */
36 int pid; /* ProcessId (pid) */
37 char appid[ICO_IVI_APPID_LENGTH]; /* ApplicationId(from AppCore AUL) */
38 char manager; /* Manager flag (Need send event) */
39 char noconfigure; /* no need configure event */
41 struct wl_resource *resource;
47 struct uifw_win_surface {
48 uint32_t id; /* UIFW SurfaceId */
49 int layer; /* LayerId */
50 struct weston_surface *surface; /* Weston surface */
51 struct shell_surface *shsurf; /* Shell(IVI-Shell) surface */
52 struct uifw_client *uclient; /* Client */
55 int width; /* Width */
56 int height; /* Height */
57 struct _uifw_win_surface_animation { /* wndow animation */
58 struct weston_animation animation; /* animation control */
59 short type; /* animation type */
60 short type_next; /* next animation type */
61 short time; /* animation time */
62 short current; /* animation current percentage */
63 char state; /* animation state */
64 char visible; /* need visible(1)/hide(2) at end of animation*/
65 char res[2]; /* (unused) */
66 uint32_t starttime; /* start time(ms) */
68 void *animadata; /* animation data */
69 struct wl_list link; /* surface link list */
70 struct uifw_win_surface *next_idhash; /* UIFW SurfaceId hash list */
71 struct uifw_win_surface *next_wshash; /* Weston SurfaceId hash list */
74 /* animation operation */
75 /* default animation */
76 #define ICO_WINDOW_MGR_ANIMATION_NONE 0 /* no animation */
78 /* return code of animation hook function*/
79 #define ICO_WINDOW_MGR_ANIMATION_RET_NOANIMA -1 /* no animation */
80 #define ICO_WINDOW_MGR_ANIMATION_RET_ANIMA 0 /* animation */
81 #define ICO_WINDOW_MGR_ANIMATION_RET_ANIMASHOW 1 /* animation with visible */
84 #define ICO_WINDOW_MGR_ANIMATION_STATE_NONE 0 /* not animation */
85 #define ICO_WINDOW_MGR_ANIMATION_STATE_IN 1 /* show(in) animation */
86 #define ICO_WINDOW_MGR_ANIMATION_STATE_OUT 2 /* hide(out) animation */
87 #define ICO_WINDOW_MGR_ANIMATION_STATE_MOVE 3 /* move animation */
88 #define ICO_WINDOW_MGR_ANIMATION_STATE_RESIZE 4 /* resize animation */
90 /* extended(plugin) animation operation */
91 #define ICO_WINDOW_MGR_ANIMATION_TYPE 0 /* convert animation name to value*/
92 #define ICO_WINDOW_MGR_ANIMATION_DESTROY 99 /* surface destroy */
93 #define ICO_WINDOW_MGR_ANIMATION_OPIN 1 /* change to show */
94 #define ICO_WINDOW_MGR_ANIMATION_OPOUT 2 /* change to hide */
95 #define ICO_WINDOW_MGR_ANIMATION_OPMOVE 3 /* surface move */
96 #define ICO_WINDOW_MGR_ANIMATION_OPRESIZE 4 /* surface resize */
97 #define ICO_WINDOW_MGR_ANIMATION_OPCANCEL 9 /* animation cancel */
99 /* Prototype for function */
100 /* get client applicationId */
101 char *ico_window_mgr_appid(struct wl_client* client);
102 /* set window animation hook */
103 void ico_window_mgr_set_animation(int (*hook_animation)(const int op, void *data));
105 #endif /*_ICO_WINDOW_MGR_H_*/