blob: 9a05eb2a217d99fdcf608ecab7b12846b002943e [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
Pekka Paalanenaa9536a2015-06-24 16:09:17 +030038 struct text_backend *text_backend;
39
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090040 struct wl_listener show_input_panel_listener;
41 struct wl_listener hide_input_panel_listener;
42 struct wl_listener update_input_panel_listener;
43
44 struct weston_layer input_panel_layer;
45
46 bool locked;
47 bool showing_input_panels;
48
49 struct {
50 struct weston_surface *surface;
51 pixman_box32_t cursor_rectangle;
52 } text_input;
53
54 struct {
55 struct wl_resource *binding;
56 struct wl_list surfaces;
57 } input_panel;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090058};
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090059
60struct weston_view *
61get_default_view(struct weston_surface *surface);
62
63int
64input_panel_setup(struct ivi_shell *shell);
65
66void
67input_panel_destroy(struct ivi_shell *shell);