|
wlmaker
|
#include "manager.h"#include <inttypes.h>#include <libbase/libbase.h>#include <libbase/plist.h>#include <stdlib.h>#include <toolkit/toolkit.h>#include <wayland-server-protocol.h>#include <wlr/backend.h>#include <wlr/types/wlr_input_device.h>#include <wlr/types/wlr_keyboard.h>#include <wlr/types/wlr_seat.h>#include <xkbcommon/xkbcommon-keysyms.h>#include "cursor.h"#include "keyboard.h"#include "pointer.h"
Classes | |
| struct | _wlmim_t |
| struct | wlmim_device |
| struct | _wlmim_keybinding_t |
| struct | _wlmim_process_arg |
Functions | |
| static void | _wlmim_handle_new_input_device (struct wl_listener *listener_ptr, void *data_ptr) |
| static void | _wlmim_handle_destroy_input_device (struct wl_listener *listener_ptr, void *data_ptr) |
| static bool | _wlmim_device_register (wlmim_t *input_manager_ptr, struct wlr_input_device *wlr_input_device_ptr, void *handle_ptr) |
| static void | _wlmim_device_unregister (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
| static void | _wlmim_device_update_capabilities (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
| static bool | _wlmim_process_keybinding (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
| static void | _wlmim_unbind_node (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
| wlmim_t * | wlmim_input_manager_create (struct wlr_backend *wlr_backend_ptr, struct wlr_output_layout *wlr_output_layout_ptr, struct wlr_seat *wlr_seat_ptr, bspl_dict_t *config_dict_ptr, const struct wlmim_cursor_style *cursor_style_ptr, wlmtk_root_t *root_ptr) |
| void | wlmim_input_manager_destroy (wlmim_t *input_manager_ptr) |
| struct wlmim_events * | wlmim_events (wlmim_t *input_manager_ptr) |
| struct wlr_cursor * | wlmim_wlr_cursor (wlmim_t *input_manager_ptr) |
| void | wlmim_report_activity (wlmim_t *input_manager_ptr) |
| void | wlmim_set_keyboard_group_index (wlmim_t *input_manager_ptr, uint32_t index) |
| uint32_t | wlmim_get_keyboard_group_index (wlmim_t *input_manager_ptr) |
| wlmim_keybinding_t * | wlmim_bind_key (wlmim_t *input_manager_ptr, const struct wlmim_keybinding_combo *keybinding_combo_ptr, wlmim_keybinding_callback_t callback) |
| void | wlmim_unbind_key (wlmim_t *input_manager_ptr, wlmim_keybinding_t *keybinding_ptr) |
| bool | wlmim_process_key (wlmim_t *im_ptr, xkb_keysym_t keysym, uint32_t modifiers) |
| static void | _wlmim_test_bind (bs_test_t *test_ptr) |
| bool | _wlmim_test_binding_callback (const struct wlmim_keybinding_combo *keybinding_combo_ptr) |
Variables | |
| const uint32_t | wlmim_modifiers_default_mask |
| static const bs_test_case_t | _wlmim_test_cases [] |
| const bs_test_set_t | wlmim_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.
|
static |
Creates and registers the device node.
| input_manager_ptr | |
| wlr_input_device_ptr | |
| handle_ptr |
|
static |
Unregisters and destroys the device node.
| dlnode_ptr | |
| ud_ptr |
|
static |
Updates the capabilities bitmask. Iterator for bs_dllist_for_each.
| dlnode_ptr | |
| ud_ptr | Points to a uint32_t capabilities bitmask. |
|
static |
Handler for the destroy signal raised by wlr_input_device.
| listener_ptr | |
| data_ptr |
|
static |
Handler for the new_input signal raised by wlr_backend.
| listener_ptr | |
| data_ptr |
|
static |
Process one keybinding, as iterator to bs_dllist_all.
| dlnode_ptr | |
| ud_ptr |
|
static |
Tests key bindings.
| bool _wlmim_test_binding_callback | ( | const struct wlmim_keybinding_combo * | keybinding_combo_ptr | ) |
Test helper: Callback for a keybinding.
|
static |
Unbinds keybinding at the node, as iterator to bs_dllist_for_each.
| wlmim_keybinding_t * wlmim_bind_key | ( | wlmim_t * | input_manager_ptr, |
| const struct wlmim_keybinding_combo * | key_combo_ptr, | ||
| wlmim_keybinding_callback_t | callback | ||
| ) |
Binds a particular key combination to a callback.
| input_manager_ptr | |
| key_combo_ptr | |
| callback |
| struct wlmim_events * wlmim_events | ( | wlmim_t * | input_manager_ptr | ) |
| uint32_t wlmim_get_keyboard_group_index | ( | wlmim_t * | input_manager_ptr | ) |
| wlmim_t * wlmim_input_manager_create | ( | struct wlr_backend * | wlr_backend_ptr, |
| struct wlr_output_layout * | wlr_output_layout_ptr, | ||
| struct wlr_seat * | wlr_seat_ptr, | ||
| bspl_dict_t * | config_dict_ptr, | ||
| const struct wlmim_cursor_style * | cursor_style_ptr, | ||
| wlmtk_root_t * | root_ptr | ||
| ) |
Creates an input manager: Registers input devices and ensures event routing will be set up as desired.
| wlr_backend_ptr | |
| wlr_output_layout_ptr | |
| wlr_seat_ptr | |
| config_dict_ptr | |
| cursor_style_ptr | |
| root_ptr |
| void wlmim_input_manager_destroy | ( | wlmim_t * | input_manager_ptr | ) |
Destroys the input manager.
| input_manager_ptr |
| bool wlmim_process_key | ( | wlmim_t * | input_manager_ptr, |
| xkb_keysym_t | keysym, | ||
| uint32_t | modifiers | ||
| ) |
Processes key combo: Call back if a matching binding is found.
| input_manager_ptr | |
| keysym | |
| modifiers |
| void wlmim_report_activity | ( | wlmim_t * | input_manager_ptr | ) |
Reports input activity. Used to reset idle timers.
| input_manager_ptr |
| void wlmim_set_keyboard_group_index | ( | wlmim_t * | input_manager_ptr, |
| uint32_t | index | ||
| ) |
| void wlmim_unbind_key | ( | wlmim_t * | input_manager_ptr, |
| wlmim_keybinding_t * | keybinding_ptr | ||
| ) |
| struct wlr_cursor * wlmim_wlr_cursor | ( | wlmim_t * | input_manager_ptr | ) |
|
static |
Test cases for the input manager.
| const uint32_t wlmim_modifiers_default_mask |
All modifiers to use by default.
| const bs_test_set_t wlmim_test_set |
Unit test set.