blob: e35f75f230065f5a27f4bb574d40dcfcdbd588ce [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>
Jussi Kukkonen649bbce2016-07-19 14:16:27 +030030#include <stdint.h>
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090031
32#include "compositor.h"
33
34struct ivi_shell
35{
36 struct wl_listener destroy_listener;
37
38 struct weston_compositor *compositor;
39
40 struct wl_list ivi_surface_list; /* struct ivi_shell_surface::link */
41
Pekka Paalanenaa9536a2015-06-24 16:09:17 +030042 struct text_backend *text_backend;
43
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090044 struct wl_listener show_input_panel_listener;
45 struct wl_listener hide_input_panel_listener;
46 struct wl_listener update_input_panel_listener;
47
48 struct weston_layer input_panel_layer;
49
50 bool locked;
51 bool showing_input_panels;
52
53 struct {
54 struct weston_surface *surface;
55 pixman_box32_t cursor_rectangle;
56 } text_input;
57
58 struct {
59 struct wl_resource *binding;
60 struct wl_list surfaces;
61 } input_panel;
Nobuhiko Tanibata487adc42014-11-27 13:22:37 +090062};
Nobuhiko Tanibata0038b732014-11-27 13:25:34 +090063
64struct weston_view *
65get_default_view(struct weston_surface *surface);
66
67int
68input_panel_setup(struct ivi_shell *shell);
69
70void
71input_panel_destroy(struct ivi_shell *shell);
Pekka Paalanenf72df1d2016-03-15 17:39:22 +020072
Pekka Paalanen1f821932016-03-15 16:57:51 +020073void
74shell_surface_send_configure(struct weston_surface *surface,
75 int32_t width, int32_t height);
76
Pekka Paalaneneaa43fc2016-04-12 16:06:58 +030077struct ivi_layout_surface;
78
79struct ivi_layout_surface *
80shell_get_ivi_layout_surface(struct weston_surface *surface);
81
Pekka Paalanenf72df1d2016-03-15 17:39:22 +020082#endif /* WESTON_IVI_SHELL_H */