|
wlmaker
|
#include "lock_mgr.h"#include <libbase/libbase.h>#include <stdbool.h>#include <stdint.h>#include <stdlib.h>#include <wayland-server-core.h>#include <wayland-server-protocol.h>#include <wayland-util.h>#include <wlr/types/wlr_compositor.h>#include <wlr/types/wlr_output.h>#include <wlr/types/wlr_output_layout.h>#include <wlr/types/wlr_scene.h>#include <wlr/types/wlr_session_lock_v1.h>#include <wlr/util/box.h>#include "toolkit/toolkit.h"
Classes | |
| struct | _wlmaker_lock_mgr_t |
| struct | _wlmaker_lock_t |
| struct | _wlmaker_lock_output_t |
Typedefs | |
| typedef uint32_t(* | _wlmaker_lock_surface_configure_t) (struct wlr_session_lock_surface_v1 *lock_surface, uint32_t width, uint32_t height) |
| typedef void(* | _wlmaker_lock_send_locked_t) (struct wlr_session_lock_v1 *lock) |
| typedef struct _wlmaker_lock_t | wlmaker_lock_t |
| typedef struct _wlmaker_lock_output_t | wlmaker_lock_output_t |
Functions | |
| static void | _wlmaker_lock_mgr_handle_new_lock (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_lock_mgr_handle_destroy (struct wl_listener *listener_ptr, void *data_ptr) |
| static wlmaker_lock_t * | _wlmaker_lock_create (struct wlr_session_lock_v1 *wlr_session_lock_v1_ptr, struct wlr_output_layout *wlr_output_layout_ptr, struct wlr_seat *wlr_seat_ptr, wlmtk_root_t *root_ptr, _wlmaker_lock_surface_configure_t injected_surface_configure, _wlmaker_lock_send_locked_t injected_send_locked) |
| static void | _wlmaker_lock_destroy (wlmaker_lock_t *lock_ptr) |
| static wlmtk_element_t * | _wlmaker_lock_element (wlmaker_lock_t *lock_ptr) |
| static void | _wlmaker_lock_handle_new_surface (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_lock_handle_unlock (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_lock_handle_destroy (struct wl_listener *listener_ptr, void *data_ptr) |
| static void * | _wlmaker_lock_output_create (struct wlr_output *wlr_output_ptr, void *ud_ptr) |
| static void | _wlmaker_lock_output_update (struct wlr_output *wlr_output_ptr, void *ud_ptr, void *output_ptr) |
| static void | _wlmaker_lock_output_destroy (struct wlr_output *wlr_output_ptr, void *ud_ptr, void *output_ptr) |
| static bool | _wlmaker_lock_output_create_surface (wlmaker_lock_output_t *lock_output_ptr, struct wlr_session_lock_surface_v1 *wlr_session_lock_surface_v1_ptr, wlmaker_lock_t *lock_ptr) |
| static void | _wlmaker_lock_output_destroy_surface (wlmaker_lock_output_t *lock_output_ptr) |
| static void | _wlmaker_lock_output_handle_surface_destroy (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmaker_lock_output_handle_surface_commit (struct wl_listener *listener_ptr, void *data_ptr) |
| static bool | _wlmaker_lock_output_surface_is_committed (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
| wlmaker_lock_mgr_t * | wlmaker_lock_mgr_create (wlmaker_server_t *server_ptr) |
| void | wlmaker_lock_mgr_destroy (wlmaker_lock_mgr_t *lock_mgr_ptr) |
| void | _wlmaker_lock_if_ready (wlmaker_lock_t *lock_ptr) |
| static void | test_lock_unlock (bs_test_t *test_ptr) |
| static void | test_lock_crash (bs_test_t *test_ptr) |
| static void | test_lock_multi_output (bs_test_t *test_ptr) |
| static uint32_t | _mock_wlr_session_lock_surface_v1_configure (struct wlr_session_lock_surface_v1 *lock_surface, uint32_t width, uint32_t height) |
| static void | _mock_wlr_session_lock_v1_send_locked (struct wlr_session_lock_v1 *lock) |
| static void | _init_test_session_lock (struct wlr_session_lock_v1 *wlr_session_lock_v1_ptr) |
| static void | _init_test_surface (struct wlr_surface *wlr_surface_ptr) |
Variables | |
| const bs_test_case_t | wlmaker_lock_mgr_test_cases [] |
| const bs_test_set_t | wlmaker_lock_mgr_test_set |
| static uint32_t | _mock_configure_serial |
| static uint32_t | _mock_configure_width |
| static uint32_t | _mock_configure_height |
| static struct wlr_session_lock_surface_v1 * | _mock_configure_lock_surface |
| static struct wlr_session_lock_v1 * | _mock_send_locked_lock |
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.
| typedef void(* _wlmaker_lock_send_locked_t) (struct wlr_session_lock_v1 *lock) |
Type of wlr_session_lock_v1_send_locked().
| typedef uint32_t(* _wlmaker_lock_surface_configure_t) (struct wlr_session_lock_surface_v1 *lock_surface, uint32_t width, uint32_t height) |
Type of wlr_session_lock_surface_v1_configure().
| typedef struct _wlmaker_lock_output_t wlmaker_lock_output_t |
Forward declaration: Output.
| typedef struct _wlmaker_lock_t wlmaker_lock_t |
Forward declaration: Lock.
|
static |
Initializes the minimum required attributes of the session lock.
|
static |
Initializes the minimum required attributes of the wlr_surface.
|
static |
Mock for configure().
|
static |
Mock for send_locked().
|
static |
Creates a session lock handle.
| wlr_session_lock_v1_ptr | |
| wlr_output_layout_ptr | |
| wlr_seat_ptr | |
| root_ptr | |
| injected_surface_configure | |
| injected_send_locked |
|
static |
Destroys the session lock handle.
| lock_ptr |
|
static |
|
static |
Handler for the destroy signal of wlr_session_lock_v1: Destroy the lock.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the new_surface signal of wlr_session_lock_v1: Creates the associated surface and enables it on the screenlock container.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the unlock signal of wlr_session_lock_v1: Marks the session as unlocked.
| listener_ptr | |
| data_ptr |
| void _wlmaker_lock_if_ready | ( | wlmaker_lock_t * | lock_ptr | ) |
Locks the session, if all output surfaces are ready & not locked yet.
|
static |
Handler for the destroy signal of wlr_session_lock_manager_v1: Cleans up associated resources.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the new_lock signal of wlr_session_lock_manager_v1: creates the corresponding lock.
| listener_ptr | |
| data_ptr |
|
static |
Ctor for the lock output.
|
static |
Creates a lock surface.
| lock_output_ptr | |
| wlr_session_lock_surface_v1_ptr | |
| lock_ptr |
|
static |
Dtor for the lock output.
|
static |
Destroys the lock surface.
| lock_output_ptr |
|
static |
Handler for the commit signal of wlr_session_lock_surface_v1::surface.
Checks whether the serial is at-or-above the 'configure' serial, and reports the surface and output as locked. Once all surfaces are locked, a 'send_locked' event will be sent.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the destroy signal of wlr_session_lock_surface_v1: Destroy the surface.
| listener_ptr | |
| data_ptr |
|
static |
Iterator for wlmaker_lock_t::outputs. Is the output committed?
|
static |
Layout update: Dimensions of the surface might have changed. Update.
|
static |
Tests locking, and then the session lock going away: Must remain locked.
|
static |
Tests locking with multiple outputs. Lock only when all outputs covered.
|
static |
Tests locking & unlocking, proper sequence, single output.
| wlmaker_lock_mgr_t * wlmaker_lock_mgr_create | ( | wlmaker_server_t * | server_ptr | ) |
Creates the session lock manager.
| server_ptr |
| void wlmaker_lock_mgr_destroy | ( | wlmaker_lock_mgr_t * | lock_mgr_ptr | ) |
Destroys the session lock manager.
| lock_mgr_ptr |
|
static |
Arg of last call to _mock_wlr_session_lock_surface_v1_configure.
|
static |
Arg of last call to _mock_wlr_session_lock_surface_v1_configure.
|
static |
Return value for _mock_wlr_session_lock_surface_v1_configure.
|
static |
Arg of last call to _mock_wlr_session_lock_surface_v1_configure.
|
static |
Arg of last call to _mock_wlr_session_lock_v1_send_locked.
| const bs_test_case_t wlmaker_lock_mgr_test_cases[] |
Unit test cases.
| const bs_test_set_t wlmaker_lock_mgr_test_set |
Unit test set for wlmaker_lock_mgr_t.