wlmaker
|
#include "action.h"
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <xkbcommon/xkbcommon-keysyms.h>
#include <xkbcommon/xkbcommon.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_keyboard.h>
#include "backend/backend.h"
#include "cursor.h"
#include "default_configuration.h"
#include "idle.h"
#include "keyboard.h"
#include "root_menu.h"
#include "server.h"
#include "toolkit/toolkit.h"
Classes | |
struct | _wlmaker_action_handle_t |
struct | _wlmaker_action_binding_t |
Functions | |
static bool | _wlmaker_keybindings_parse (const char *string_ptr, uint32_t *modifiers_ptr, xkb_keysym_t *keysym_ptr) |
static bool | _wlmaker_keybindings_bind_item (const char *key_ptr, bspl_object_t *object_ptr, void *userdata_ptr) |
static bool | _wlmaker_action_bound_callback (const wlmaker_key_combo_t *binding_ptr) |
wlmaker_action_handle_t * | wlmaker_action_bind_keys (wlmaker_server_t *server_ptr, bspl_dict_t *keybindings_dict_ptr) |
void | wlmaker_action_unbind_keys (wlmaker_action_handle_t *handle_ptr) |
void | wlmaker_action_execute (wlmaker_server_t *server_ptr, wlmaker_action_t action, void *arg_ptr) |
static void | test_keybindings_parse (bs_test_t *test_ptr) |
static void | test_default_keybindings (bs_test_t *test_ptr) |
Variables | |
const char * | wlmaker_action_config_dict_key = "KeyBindings" |
static const bspl_enum_desc_t | _wlmaker_keybindings_modifiers [] |
const bspl_enum_desc_t | wlmaker_action_desc [] |
const bs_test_case_t | wlmaker_action_test_cases [] |
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 |
Callback for when the bound key is triggered: Executes the corresponding action.
key_combo_ptr |
|
static |
Binds an action for one item of the 'KeyBindings' dict.
key_ptr | Name of the action to bind the key to. |
object_ptr | Configuration object, must be a string and contain a parse-able modifier + keysym. |
userdata_ptr | Points to wlmaker_server_t. |
|
static |
Parses a keybinding string: Tokenizes into modifiers and keysym.
string_ptr | |
modifiers_ptr | |
keysym_ptr |
|
static |
Tests the default configuration's 'KeyBindings' section.
|
static |
Tests _wlmaker_keybindings_parse.
wlmaker_action_handle_t * wlmaker_action_bind_keys | ( | wlmaker_server_t * | server_ptr, |
bspl_dict_t * | keybindings_dict_ptr | ||
) |
Binds the actions specified in the config dictionary.
server_ptr | |
keybindings_dict_ptr |
void wlmaker_action_execute | ( | wlmaker_server_t * | server_ptr, |
wlmaker_action_t | action, | ||
void * | arg_ptr | ||
) |
Executes the given action on wlmaker.
server_ptr | |
action | |
arg_ptr |
void wlmaker_action_unbind_keys | ( | wlmaker_action_handle_t * | handle_ptr | ) |
Unbinds actions previously bound by wlmaker_action_bind_keys.
handle_ptr |
|
static |
Supported modifiers for key bindings.
const char* wlmaker_action_config_dict_key = "KeyBindings" |
Key to lookup the dict from the config dictionary.
const bspl_enum_desc_t wlmaker_action_desc[] |
The actions that can be bound.
const bs_test_case_t wlmaker_action_test_cases[] |
Test cases for key bindings.