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_ivi_shell Weston plugin
30 #ifndef _ICO_IVI_SHELL_H_
31 #define _ICO_IVI_SHELL_H_
33 #include "ico_window_mgr-server-protocol.h"
38 enum shell_surface_type {
40 SHELL_SURFACE_TOPLEVEL,
41 SHELL_SURFACE_TRANSIENT,
42 SHELL_SURFACE_FULLSCREEN,
43 SHELL_SURFACE_MAXIMIZED,
45 SHELL_SURFACE_XWAYLAND
48 /* weston layer type */
49 #define LAYER_TYPE_UNKNOWN 0
50 #define LAYER_TYPE_BACKGROUND (ICO_WINDOW_MGR_LAYERTYPE_BACKGROUND >> 12)
51 #define LAYER_TYPE_PANEL (ICO_WINDOW_MGR_LAYERTYPE_NORMAL >> 12)
52 #define LAYER_TYPE_FULLSCREEN (ICO_WINDOW_MGR_LAYERTYPE_FULLSCREEN >> 12)
53 #define LAYER_TYPE_INPUTPANEL (ICO_WINDOW_MGR_LAYERTYPE_INPUTPANEL >> 12)
54 #define LAYER_TYPE_TOUCH (ICO_WINDOW_MGR_LAYERTYPE_TOUCH >> 12)
55 #define LAYER_TYPE_CURSOR (ICO_WINDOW_MGR_LAYERTYPE_CURSOR >> 12)
56 #define LAYER_TYPE_LOCK 0xe
57 #define LAYER_TYPE_FADE 0xf
59 /* fullscreen surface control */
60 enum shell_fullscreen_control {
61 SHELL_FULLSCREEN_ISTOP,
63 SHELL_FULLSCREEN_STACK,
64 SHELL_FULLSCREEN_CONF,
65 SHELL_FULLSCREEN_HIDEALL
68 /* Prototype for get/set function */
69 struct weston_layer *ico_ivi_shell_weston_layer(void);
70 void ico_ivi_shell_set_toplevel(struct shell_surface *shsurf);
71 int ico_ivi_shell_get_surfacetype(struct shell_surface *shsurf);
72 void ico_ivi_shell_set_surface_type(struct shell_surface *shsurf);
73 void ico_ivi_shell_send_configure(struct weston_surface *surface,
74 const uint32_t edges, const int width, const int height);
75 void ico_ivi_shell_startup(void *shell);
76 int ico_ivi_shell_layertype(struct weston_surface *surface);
77 void ivi_shell_set_surface_initial_position(struct weston_surface *surface);
78 void ivi_shell_set_default_display(struct weston_output *inputpanel);
80 /* Prototypr for hook routine */
81 void ico_ivi_shell_hook_bind(void (*hook_bind)(struct wl_client *client, void *shell));
82 void ico_ivi_shell_hook_unbind(void (*hook_unbind)(struct wl_client *client));
83 void ico_ivi_shell_hook_create(void (*hook_create)(int layertype, struct wl_client *client,
84 struct wl_resource *resource, struct weston_surface *surface,
85 struct shell_surface *shsurf));
86 void ico_ivi_shell_hook_destroy(void (*hook_destroy)(struct weston_surface *surface));
87 void ico_ivi_shell_hook_map(void (*hook_map)(struct weston_surface *surface,
88 int32_t *width, int32_t *height, int32_t *sx, int32_t *sy));
89 void ico_ivi_shell_hook_configure(void (*hook_configure)(struct weston_surface *surface));
90 void ico_ivi_shell_hook_select(void (*hook_select)(struct weston_surface *surface));
91 void ico_ivi_shell_hook_title(void (*hook_title)(struct weston_surface *surface,
93 void ico_ivi_shell_hook_move(void (*hook_move)(struct weston_surface *surface,
95 void ico_ivi_shell_hook_show_layer(void (*hook_show)(int layertype, int show, void *data));
96 void ico_ivi_shell_hook_fullscreen(int (*hook_fullscreen)
97 (int event, struct weston_surface *surface));
99 #endif /*_ICO_IVI_SHELL_H_*/