|
wlmaker
|
#include "layer_panel.h"#include <inttypes.h>#include <libbase/libbase.h>#include <stdbool.h>#include <stdlib.h>#include <wayland-server-core.h>#include <wayland-server-protocol.h>#include <wlr/types/wlr_compositor.h>#include <wlr/types/wlr_layer_shell_v1.h>#include <wlr/util/edges.h>#include "toolkit/toolkit.h"#include "wlr-layer-shell-unstable-v1-protocol.h"#include "xdg_popup.h"
Classes | |
| struct | _wlmaker_layer_panel_t |
Functions | |
| wlmaker_layer_panel_t * | _wlmaker_layer_panel_create_from_surface (struct wlr_layer_surface_v1 *wlr_layer_surface_v1_ptr, wlmaker_server_t *server_ptr, wlmtk_surface_t *wlmtk_surface_ptr) |
| static void | _wlmaker_layer_panel_destroy (wlmaker_layer_panel_t *layer_panel_ptr) |
| static void | _wlmaker_layer_panel_element_destroy (wlmtk_element_t *element_ptr) |
| static bool | _wlmaker_layer_panel_apply_keyboard (wlmaker_layer_panel_t *layer_panel_ptr, enum zwlr_layer_surface_v1_keyboard_interactivity interactivity, enum zwlr_layer_shell_v1_layer zwlr_layer) |
| static bool | _wlmaker_layer_panel_apply_layer (wlmaker_layer_panel_t *layer_panel_ptr, enum zwlr_layer_shell_v1_layer zwlr_layer) |
| static uint32_t | _wlmaker_layer_panel_request_size (wlmtk_panel_t *panel_ptr, int width, int height) |
| static void | _wlmaker_layer_panel_handle_surface_commit (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_layer_panel_handle_surface_map (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_layer_panel_handle_surface_unmap (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_layer_panel_handle_destroy (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_layer_panel_handle_new_popup (struct wl_listener *listener_ptr, void *data_ptr) |
| wlmaker_layer_panel_t * | wlmaker_layer_panel_create (struct wlr_layer_surface_v1 *wlr_layer_surface_v1_ptr, wlmaker_server_t *server_ptr) |
| wlmtk_workspace_layer_t | _wlmaker_layer_from_zwlr_layer (enum zwlr_layer_shell_v1_layer zwlr_layer) |
| static void | test_create_destroy (bs_test_t *test_ptr) |
Variables | |
| static const wlmtk_panel_vmt_t | _wlmaker_layer_panel_vmt |
| static const wlmtk_element_vmt_t | _wlmaker_layer_panel_element_vmt |
| static const bs_test_case_t | wlmaker_layer_panel_test_cases [] |
| const bs_test_set_t | wlmaker_layer_panel_test_set |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| wlmtk_workspace_layer_t _wlmaker_layer_from_zwlr_layer | ( | enum zwlr_layer_shell_v1_layer | zwlr_layer | ) |
|
static |
Applies the requested keyboard setting.
Supports 'NONE' and 'EXCLUSIVE' interactivity, but the latter only on top and overlay layers.
TODO(kaese.nosp@m.r@gu.nosp@m.bbe.c.nosp@m.h): Implement full support, once layer elements have a means to organically obtain and release keyboard focus (eg. through pointer button clicks).
| layer_panel_ptr | |
| interactivity | |
| zwlr_layer |
|
static |
Updates the layer this panel is part of. Posts an error if invalid.
| wlmaker_layer_panel_t * _wlmaker_layer_panel_create_from_surface | ( | struct wlr_layer_surface_v1 * | wlr_layer_surface_v1_ptr, |
| wlmaker_server_t * | server_ptr, | ||
| wlmtk_surface_t * | wlmtk_surface_ptr | ||
| ) |
Constructor for the layer panel, with already-created surface.
| wlr_layer_surface_v1_ptr | |
| server_ptr | |
| wlmtk_surface_ptr |
|
static |
Destroys the layer panel and frees up all associated resources.
| layer_panel_ptr |
|
static |
Implements wlmtk_element_vmt_t::destroy, forwards to _wlmaker_layer_panel_destroy.
| element_ptr |
|
static |
Handler for the destroy signal of the wlr_layer_surface_v1: Destroys the panel.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the new_popup signal of the wlr_layer_surface_v1: Creates a new popup for this panel.
| listener_ptr | |
| data_ptr | Points to the new struct wlr_xdg_popup. |
|
static |
Handler for the commit signal of wlr_surface.
Updates positioning and layer of the panel, as required.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the map signal of wlmtk_surface_t: Maps the panel to layer.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the unmap signal of wlmtk_surface_t: Unmaps the panel.
| listener_ptr | |
| data_ptr |
|
static |
Implements wlmtk_panel_vmt_t::request_size.
|
static |
Exercises creation and teardown.
| wlmaker_layer_panel_t * wlmaker_layer_panel_create | ( | struct wlr_layer_surface_v1 * | wlr_layer_surface_v1_ptr, |
| wlmaker_server_t * | server_ptr | ||
| ) |
Creates a layer panel for the given layer surface.
A layer panel is the implementation of a WLroots layer shell surface.
| wlr_layer_surface_v1_ptr | |
| server_ptr |
wlr_layer_surface_v1_ptr is destroyed.
|
static |
Virtual method table for the layer panel's superclass element.
|
static |
Virtual method table for the layer panel.
|
static |
Unit test cases.
| const bs_test_set_t wlmaker_layer_panel_test_set |
Unit test set of layer panel.