blob: bd2571eb6c9797901467b351bdd8ca993dbcd0a1 [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
26#include <stdbool.h>
27
28#include "compositor.h"
29
30struct ivi_shell
31{
32 struct wl_listener destroy_listener;
33
34 struct weston_compositor *compositor;
35
36 struct wl_list ivi_surface_list; /* struct ivi_shell_surface::link */
37
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090038 struct wl_listener show_input_panel_listener;
39 struct wl_listener hide_input_panel_listener;
40 struct wl_listener update_input_panel_listener;
41
42 struct weston_layer input_panel_layer;
43
44 bool locked;
45 bool showing_input_panels;
46
47 struct {
48 struct weston_surface *surface;
49 pixman_box32_t cursor_rectangle;
50 } text_input;
51
52 struct {
53 struct wl_resource *binding;
54 struct wl_list surfaces;
55 } input_panel;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090056};
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090057
58struct weston_view *
59get_default_view(struct weston_surface *surface);
60
61int
62input_panel_setup(struct ivi_shell *shell);
63
64void
65input_panel_destroy(struct ivi_shell *shell);