Nobuhiko Tanibata | 487adc4 | 2014-11-27 13:22:37 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 DENSO CORPORATION |
| 3 | * |
Bryce Harrington | af637c2 | 2015-06-11 12:55:55 -0700 | [diff] [blame] | 4 | * 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 Tanibata | 487adc4 | 2014-11-27 13:22:37 +0900 | [diff] [blame] | 11 | * |
Bryce Harrington | af637c2 | 2015-06-11 12:55:55 -0700 | [diff] [blame] | 12 | * 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 Tanibata | 487adc4 | 2014-11-27 13:22:37 +0900 | [diff] [blame] | 24 | */ |
| 25 | |
Pekka Paalanen | f72df1d | 2016-03-15 17:39:22 +0200 | [diff] [blame] | 26 | #ifndef WESTON_IVI_SHELL_H |
| 27 | #define WESTON_IVI_SHELL_H |
| 28 | |
Nobuhiko Tanibata | 487adc4 | 2014-11-27 13:22:37 +0900 | [diff] [blame] | 29 | #include <stdbool.h> |
| 30 | |
| 31 | #include "compositor.h" |
| 32 | |
| 33 | struct 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 Paalanen | aa9536a | 2015-06-24 16:09:17 +0300 | [diff] [blame] | 41 | struct text_backend *text_backend; |
| 42 | |
Nobuhiko Tanibata | 0038b73 | 2014-11-27 13:25:34 +0900 | [diff] [blame] | 43 | 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 Tanibata | 487adc4 | 2014-11-27 13:22:37 +0900 | [diff] [blame] | 61 | }; |
Nobuhiko Tanibata | 0038b73 | 2014-11-27 13:25:34 +0900 | [diff] [blame] | 62 | |
| 63 | struct weston_view * |
| 64 | get_default_view(struct weston_surface *surface); |
| 65 | |
| 66 | int |
| 67 | input_panel_setup(struct ivi_shell *shell); |
| 68 | |
| 69 | void |
| 70 | input_panel_destroy(struct ivi_shell *shell); |
Pekka Paalanen | f72df1d | 2016-03-15 17:39:22 +0200 | [diff] [blame] | 71 | |
Pekka Paalanen | 1f82193 | 2016-03-15 16:57:51 +0200 | [diff] [blame] | 72 | void |
| 73 | shell_surface_send_configure(struct weston_surface *surface, |
| 74 | int32_t width, int32_t height); |
| 75 | |
Pekka Paalanen | eaa43fc | 2016-04-12 16:06:58 +0300 | [diff] [blame^] | 76 | struct ivi_layout_surface; |
| 77 | |
| 78 | struct ivi_layout_surface * |
| 79 | shell_get_ivi_layout_surface(struct weston_surface *surface); |
| 80 | |
Pekka Paalanen | f72df1d | 2016-03-15 17:39:22 +0200 | [diff] [blame] | 81 | #endif /* WESTON_IVI_SHELL_H */ |