2 * Copyright © 2010-2011 Intel Corporation
3 * Copyright © 2008-2011 Kristian Høgsberg
4 * Copyright © 2013-2014 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_PRIVATE_H_
31 #define _ICO_IVI_SHELL_PRIVATE_H_
33 #include "ico_window_mgr-server-protocol.h"
38 enum shell_surface_type {
40 SHELL_SURFACE_TOPLEVEL,
42 SHELL_SURFACE_XWAYLAND
45 /* weston layer type */
46 #define LAYER_TYPE_UNKNOWN 0
47 #define LAYER_TYPE_BACKGROUND (ICO_WINDOW_MGR_LAYERTYPE_BACKGROUND >> 12)
48 #define LAYER_TYPE_PANEL (ICO_WINDOW_MGR_LAYERTYPE_NORMAL >> 12)
49 #define LAYER_TYPE_FULLSCREEN (ICO_WINDOW_MGR_LAYERTYPE_FULLSCREEN >> 12)
50 #define LAYER_TYPE_INPUTPANEL (ICO_WINDOW_MGR_LAYERTYPE_INPUTPANEL >> 12)
51 #define LAYER_TYPE_TOUCH (ICO_WINDOW_MGR_LAYERTYPE_TOUCH >> 12)
52 #define LAYER_TYPE_CURSOR (ICO_WINDOW_MGR_LAYERTYPE_CURSOR >> 12)
53 #define LAYER_TYPE_LOCK 0xe
54 #define LAYER_TYPE_FADE 0xf
56 /* fullscreen surface control */
57 enum shell_fullscreen_control {
58 SHELL_FULLSCREEN_ISTOP,
60 SHELL_FULLSCREEN_UNSET,
61 SHELL_FULLSCREEN_CONF,
62 SHELL_FULLSCREEN_HIDEALL
65 /* Prototype for get/set function */
66 struct weston_layer *ico_ivi_shell_weston_layer(void);
67 void ico_ivi_shell_set_toplevel(struct shell_surface *shsurf);
68 int ico_ivi_shell_get_surfacetype(struct shell_surface *shsurf);
69 void ico_ivi_shell_set_surface_type(struct shell_surface *shsurf);
70 void ico_ivi_shell_send_configure(struct weston_surface *surface,
71 const uint32_t edges, const int width, const int height);
72 void ico_ivi_shell_startup(void *shell);
73 int ico_ivi_shell_layertype(struct weston_surface *surface);
74 void ivi_shell_set_default_display(struct weston_output *inputpanel);
76 /* Prototypr for hook routine */
77 void ico_ivi_shell_hook_bind(void (*hook_bind)(struct wl_client *client, void *shell));
78 void ico_ivi_shell_hook_unbind(void (*hook_unbind)(struct wl_client *client));
79 void ico_ivi_shell_hook_create(void (*hook_create)(int layertype,
80 struct weston_surface *surface,
81 struct wl_client *client, struct shell_surface *shsurf));
82 void ico_ivi_shell_hook_destroy(void (*hook_destroy)(struct weston_surface *surface));
83 void ico_ivi_shell_hook_map(void (*hook_map)(struct weston_surface *surface,
84 int32_t *width, int32_t *height, int32_t *sx, int32_t *sy));
85 void ico_ivi_shell_hook_configure(void (*hook_configure)(struct weston_surface *surface));
86 void ico_ivi_shell_hook_select(void (*hook_select)(struct weston_surface *surface));
87 void ico_ivi_shell_hook_title(char *(*hook_title)(struct weston_surface *surface,
89 void ico_ivi_shell_hook_move(void (*hook_move)(struct weston_surface *surface,
91 void ico_ivi_shell_hook_show_layer(void (*hook_show)(int layertype, int show, void *data));
92 void ico_ivi_shell_hook_fullscreen(int (*hook_fullscreen)
93 (int event, struct weston_surface *surface));
94 struct weston_view *ico_input_panel_get_view(void *ipsurf);
97 extern void (*shell_hook_bind)(struct wl_client *client, void *shell);
98 extern void (*shell_hook_unbind)(struct wl_client *client);
99 extern void (*shell_hook_create)(int layertype, struct weston_surface *surface,
100 struct wl_client *client,
101 struct shell_surface *shsurf);
102 extern void (*shell_hook_destroy)(struct weston_surface *surface);
103 extern void (*shell_hook_map)(struct weston_surface *surface, int32_t *width,
104 int32_t *height, int32_t *sx, int32_t *sy);
105 extern void (*shell_hook_configure)(struct weston_surface *surface);
106 extern void (*shell_hook_select)(struct weston_surface *surface);
107 extern char *(*shell_hook_title)(struct weston_surface *surface, const char *title);
108 extern void (*shell_hook_move)(struct weston_surface *surface, int *dx, int *dy);
109 extern void (*shell_hook_show_layer)(int layertype, int show, void *data);
110 extern int (*shell_hook_fullscreen)(int event, struct weston_surface *surface);
112 #endif /*_ICO_IVI_SHELL_PRIVATE_H_*/