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> |
Jussi Kukkonen | 649bbce | 2016-07-19 14:16:27 +0300 | [diff] [blame^] | 30 | #include <stdint.h> |
Nobuhiko Tanibata | 487adc4 | 2014-11-27 13:22:37 +0900 | [diff] [blame] | 31 | |
| 32 | #include "compositor.h" |
| 33 | |
| 34 | struct 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 Paalanen | aa9536a | 2015-06-24 16:09:17 +0300 | [diff] [blame] | 42 | struct text_backend *text_backend; |
| 43 | |
Nobuhiko Tanibata | 0038b73 | 2014-11-27 13:25:34 +0900 | [diff] [blame] | 44 | 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 Tanibata | 487adc4 | 2014-11-27 13:22:37 +0900 | [diff] [blame] | 62 | }; |
Nobuhiko Tanibata | 0038b73 | 2014-11-27 13:25:34 +0900 | [diff] [blame] | 63 | |
| 64 | struct weston_view * |
| 65 | get_default_view(struct weston_surface *surface); |
| 66 | |
| 67 | int |
| 68 | input_panel_setup(struct ivi_shell *shell); |
| 69 | |
| 70 | void |
| 71 | input_panel_destroy(struct ivi_shell *shell); |
Pekka Paalanen | f72df1d | 2016-03-15 17:39:22 +0200 | [diff] [blame] | 72 | |
Pekka Paalanen | 1f82193 | 2016-03-15 16:57:51 +0200 | [diff] [blame] | 73 | void |
| 74 | shell_surface_send_configure(struct weston_surface *surface, |
| 75 | int32_t width, int32_t height); |
| 76 | |
Pekka Paalanen | eaa43fc | 2016-04-12 16:06:58 +0300 | [diff] [blame] | 77 | struct ivi_layout_surface; |
| 78 | |
| 79 | struct ivi_layout_surface * |
| 80 | shell_get_ivi_layout_surface(struct weston_surface *surface); |
| 81 | |
Pekka Paalanen | f72df1d | 2016-03-15 17:39:22 +0200 | [diff] [blame] | 82 | #endif /* WESTON_IVI_SHELL_H */ |