blob: 369e5f80a9cb6db0ac66f96b05a87726a2c0f554 [file] [log] [blame]
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +09001/*
2 * Copyright (C) 2013 DENSO CORPORATION
3 *
Bryce Harringtonaf637c22015-06-11 12:55:55 -07004 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090011 *
Bryce Harringtonaf637c22015-06-11 12:55:55 -070012 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial
14 * portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090024 */
25
Pekka Paalanenf72df1d2016-03-15 17:39:22 +020026#ifndef WESTON_IVI_SHELL_H
27#define WESTON_IVI_SHELL_H
28
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090029#include <stdbool.h>
30
31#include "compositor.h"
32
33struct ivi_shell
34{
35 struct wl_listener destroy_listener;
36
37 struct weston_compositor *compositor;
38
39 struct wl_list ivi_surface_list; /* struct ivi_shell_surface::link */
40
Pekka Paalanenaa9536a2015-06-24 16:09:17 +030041 struct text_backend *text_backend;
42
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090043 struct wl_listener show_input_panel_listener;
44 struct wl_listener hide_input_panel_listener;
45 struct wl_listener update_input_panel_listener;
46
47 struct weston_layer input_panel_layer;
48
49 bool locked;
50 bool showing_input_panels;
51
52 struct {
53 struct weston_surface *surface;
54 pixman_box32_t cursor_rectangle;
55 } text_input;
56
57 struct {
58 struct wl_resource *binding;
59 struct wl_list surfaces;
60 } input_panel;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090061};
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090062
63struct weston_view *
64get_default_view(struct weston_surface *surface);
65
66int
67input_panel_setup(struct ivi_shell *shell);
68
69void
70input_panel_destroy(struct ivi_shell *shell);
Pekka Paalanenf72df1d2016-03-15 17:39:22 +020071
Pekka Paalanen1f821932016-03-15 16:57:51 +020072void
73shell_surface_send_configure(struct weston_surface *surface,
74 int32_t width, int32_t height);
75
Pekka Paalaneneaa43fc2016-04-12 16:06:58 +030076struct ivi_layout_surface;
77
78struct ivi_layout_surface *
79shell_get_ivi_layout_surface(struct weston_surface *surface);
80
Pekka Paalanenf72df1d2016-03-15 17:39:22 +020081#endif /* WESTON_IVI_SHELL_H */