Blender
V3.3
|
#include <string.h>
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_workspace_types.h"
#include "CLG_log.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLF_api.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "BKE_workspace.h"
#include "BLT_translation.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_event_system.h"
#include "wm_event_types.h"
Go to the source code of this file.
Classes | |
struct | wmKeyMapItemFind_Params |
Macros | |
#define | ADD_SEP |
Functions | |
Keymap Item | |
Item in a keymap, that maps from an event to an operator or modal map item. | |
static wmKeyMapItem * | wm_keymap_item_copy (wmKeyMapItem *kmi) |
static void | wm_keymap_item_free (wmKeyMapItem *kmi) |
static void | wm_keymap_item_properties_set (wmKeyMapItem *kmi) |
static void | wm_keymap_item_properties_update_ot (wmKeyMapItem *kmi) |
static void | wm_keymap_item_properties_update_ot_from_list (ListBase *km_lb) |
static bool | wm_keymap_item_equals_result (wmKeyMapItem *a, wmKeyMapItem *b) |
static bool | wm_keymap_item_equals (wmKeyMapItem *a, wmKeyMapItem *b) |
void | WM_keymap_item_properties_reset (wmKeyMapItem *kmi, struct IDProperty *properties) |
int | WM_keymap_item_map_type_get (const wmKeyMapItem *kmi) |
Keymap Diff Item | |
Item in a diff keymap, used for saving diff of keymaps in user preferences. | |
static wmKeyMapDiffItem * | wm_keymap_diff_item_copy (wmKeyMapDiffItem *kmdi) |
static void | wm_keymap_diff_item_free (wmKeyMapDiffItem *kmdi) |
Key Configuration | |
List of keymaps for all editors, modes, etc. There is a builtin default key configuration, a user key configuration, and other preset configurations. | |
wmKeyConfig * | WM_keyconfig_new (wmWindowManager *wm, const char *idname, bool user_defined) |
wmKeyConfig * | WM_keyconfig_new_user (wmWindowManager *wm, const char *idname) |
bool | WM_keyconfig_remove (wmWindowManager *wm, wmKeyConfig *keyconf) |
void | WM_keyconfig_clear (wmKeyConfig *keyconf) |
void | WM_keyconfig_free (wmKeyConfig *keyconf) |
static wmKeyConfig * | WM_keyconfig_active (wmWindowManager *wm) |
void | WM_keyconfig_set_active (wmWindowManager *wm, const char *idname) |
Keymap | |
List of keymap items for one editor, mode, modal operator. | |
static wmKeyMap * | wm_keymap_new (const char *idname, int spaceid, int regionid) |
static wmKeyMap * | wm_keymap_copy (wmKeyMap *keymap) |
void | WM_keymap_clear (wmKeyMap *keymap) |
bool | WM_keymap_remove (wmKeyConfig *keyconf, wmKeyMap *keymap) |
bool | WM_keymap_poll (bContext *C, wmKeyMap *keymap) |
static void | keymap_event_set (wmKeyMapItem *kmi, const KeyMapItem_Params *params) |
static void | keymap_item_set_id (wmKeyMap *keymap, wmKeyMapItem *kmi) |
wmKeyMapItem * | WM_keymap_add_item (wmKeyMap *keymap, const char *idname, const KeyMapItem_Params *params) |
wmKeyMapItem * | WM_keymap_add_item_copy (struct wmKeyMap *keymap, wmKeyMapItem *kmi_src) |
bool | WM_keymap_remove_item (wmKeyMap *keymap, wmKeyMapItem *kmi) |
Keymap Diff and Patch | |
Rather than saving the entire keymap for user preferences, we only save a diff so that changes in the defaults get synced. This system is not perfect but works better than overriding the keymap entirely when only few items are changed. | |
static void | wm_keymap_addon_add (wmKeyMap *keymap, wmKeyMap *addonmap) |
static wmKeyMapItem * | wm_keymap_find_item_equals (wmKeyMap *km, wmKeyMapItem *needle) |
static wmKeyMapItem * | wm_keymap_find_item_equals_result (wmKeyMap *km, wmKeyMapItem *needle) |
static void | wm_keymap_diff (wmKeyMap *diff_km, wmKeyMap *from_km, wmKeyMap *to_km, wmKeyMap *orig_km, wmKeyMap *addon_km) |
static void | wm_keymap_patch (wmKeyMap *km, wmKeyMap *diff_km) |
static wmKeyMap * | wm_keymap_patch_update (ListBase *lb, wmKeyMap *defaultmap, wmKeyMap *addonmap, wmKeyMap *usermap) |
static void | wm_keymap_diff_update (ListBase *lb, wmKeyMap *defaultmap, wmKeyMap *addonmap, wmKeyMap *km) |
Storage in WM | |
Name id's are for storing general or multiple keymaps.
| |
wmKeyMap * | WM_keymap_list_find (ListBase *lb, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_list_find_spaceid_or_empty (ListBase *lb, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_ensure (wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_find_all (wmWindowManager *wm, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_find_all_spaceid_or_empty (wmWindowManager *wm, const char *idname, int spaceid, int regionid) |
Modal Keymaps | |
Modal key-maps get linked to a running operator, and filter the keys before sending to wmOperatorType.modal callback. | |
wmKeyMap * | WM_modalkeymap_ensure (wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items) |
wmKeyMap * | WM_modalkeymap_find (wmKeyConfig *keyconf, const char *idname) |
wmKeyMapItem * | WM_modalkeymap_add_item (wmKeyMap *km, const KeyMapItem_Params *params, int value) |
wmKeyMapItem * | WM_modalkeymap_add_item_str (wmKeyMap *km, const KeyMapItem_Params *params, const char *value) |
static const wmKeyMapItem * | wm_modalkeymap_find_propvalue_iter (const wmKeyMap *km, const wmKeyMapItem *kmi, const int propvalue) |
const wmKeyMapItem * | WM_modalkeymap_find_propvalue (const wmKeyMap *km, const int propvalue) |
void | WM_modalkeymap_assign (wmKeyMap *km, const char *opname) |
static void | wm_user_modal_keymap_set_items (wmWindowManager *wm, wmKeyMap *km) |
Text from Key Events | |
static const char * | key_event_glyph_or_text (const int font_id, const char *text, const char *single_glyph) |
const char * | WM_key_event_string (const short type, const bool compact) |
int | WM_keymap_item_raw_to_string (const short shift, const short ctrl, const short alt, const short oskey, const short keymodifier, const short val, const short type, const bool compact, char *result, const int result_len) |
int | WM_keymap_item_to_string (const wmKeyMapItem *kmi, const bool compact, char *result, const int result_len) |
int | WM_modalkeymap_items_to_string (const wmKeyMap *km, const int propvalue, const bool compact, char *result, const int result_len) |
int | WM_modalkeymap_operator_items_to_string (wmOperatorType *ot, const int propvalue, const bool compact, char *result, const int result_len) |
char * | WM_modalkeymap_operator_items_to_string_buf (wmOperatorType *ot, const int propvalue, const bool compact, const int max_len, int *r_available_len, char **r_result) |
Keymap Finding Utilities | |
static wmKeyMapItem * | wm_keymap_item_find_in_keymap (wmKeyMap *keymap, const char *opname, IDProperty *properties, const bool is_strict, const struct wmKeyMapItemFind_Params *params) |
static wmKeyMapItem * | wm_keymap_item_find_handlers (const bContext *C, wmWindowManager *wm, wmWindow *win, ListBase *handlers, const char *opname, wmOperatorCallContext UNUSED(opcontext), IDProperty *properties, const bool is_strict, const struct wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap) |
static wmKeyMapItem * | wm_keymap_item_find_props (const bContext *C, const char *opname, wmOperatorCallContext opcontext, IDProperty *properties, const bool is_strict, const struct wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap) |
static wmKeyMapItem * | wm_keymap_item_find (const bContext *C, const char *opname, wmOperatorCallContext opcontext, IDProperty *properties, bool is_strict, const struct wmKeyMapItemFind_Params *params, wmKeyMap **r_keymap) |
static bool | kmi_filter_is_visible (const wmKeyMap *UNUSED(km), const wmKeyMapItem *kmi, void *UNUSED(user_data)) |
char * | WM_key_event_operator_string (const bContext *C, const char *opname, wmOperatorCallContext opcontext, IDProperty *properties, const bool is_strict, char *result, const int result_len) |
static bool | kmi_filter_is_visible_type_mask (const wmKeyMap *km, const wmKeyMapItem *kmi, void *user_data) |
wmKeyMapItem * | WM_key_event_operator (const bContext *C, const char *opname, wmOperatorCallContext opcontext, IDProperty *properties, const short include_mask, const short exclude_mask, wmKeyMap **r_keymap) |
wmKeyMapItem * | WM_key_event_operator_from_keymap (wmKeyMap *keymap, const char *opname, IDProperty *properties, const short include_mask, const short exclude_mask) |
bool | WM_keymap_item_compare (const wmKeyMapItem *k1, const wmKeyMapItem *k2) |
Event Handling | |
Handlers have pointers to the keymap in the default configuration. During event handling this function is called to get the keymap from the final configuration. | |
wmKeyMap * | WM_keymap_active (const wmWindowManager *wm, wmKeyMap *keymap) |
Keymap Editor | |
In the keymap editor the user key configuration is edited. | |
void | WM_keymap_item_restore_to_default (wmWindowManager *wm, wmKeyMap *keymap, wmKeyMapItem *kmi) |
void | WM_keymap_restore_to_default (wmKeyMap *keymap, wmWindowManager *wm) |
wmKeyMapItem * | WM_keymap_item_find_id (wmKeyMap *keymap, int id) |
const char * | WM_bool_as_string (bool test) |
Update Final Configuration | |
On load or other changes, the final user key configuration is rebuilt from the preset, add-on and user preferences keymaps. We also test if the final configuration changed and write the changes to the user preferences. | |
enum | { WM_KEYMAP_UPDATE_RECONFIGURE = (1 << 0) , WM_KEYMAP_UPDATE_OPERATORTYPE = (1 << 1) } |
static char | wm_keymap_update_flag = 0 |
void | WM_keyconfig_update_tag (wmKeyMap *keymap, wmKeyMapItem *kmi) |
void | WM_keyconfig_update_operatortype (void) |
static bool | wm_keymap_test_and_clear_update (wmKeyMap *km) |
static wmKeyMap * | wm_keymap_preset (wmWindowManager *wm, wmKeyMap *km) |
void | WM_keyconfig_update (wmWindowManager *wm) |
Configurable key-maps - add/remove/find/compare/patch...
Definition in file wm_keymap.c.
anonymous enum |
Enumerator | |
---|---|
WM_KEYMAP_UPDATE_RECONFIGURE | |
WM_KEYMAP_UPDATE_OPERATORTYPE |
Definition at line 1778 of file wm_keymap.c.
|
static |
Definition at line 1036 of file wm_keymap.c.
References BLF_has_glyph(), BLI_assert, BLI_str_utf8_as_unicode(), BLI_strlen_utf8(), and NULL.
Referenced by WM_key_event_string().
|
static |
Definition at line 462 of file wm_keymap.c.
References wmKeyMapItem::alt, BLI_assert, wmKeyMapItem::ctrl, wmKeyMapItem::direction, wmKeyMapItem::keymodifier, KM_ALT, KM_ALT_ANY, KM_ANY, KM_CTRL, KM_CTRL_ANY, KM_MOD_HELD, KM_NOTHING, KM_OSKEY, KM_OSKEY_ANY, KM_SHIFT, KM_SHIFT_ANY, wmKeyMapItem::oskey, params, wmKeyMapItem::shift, wmKeyMapItem::type, and wmKeyMapItem::val.
Referenced by WM_keymap_add_item(), WM_modalkeymap_add_item(), and WM_modalkeymap_add_item_str().
|
static |
Definition at line 494 of file wm_keymap.c.
References wmKeyMap::flag, wmKeyMapItem::id, KEYMAP_USER, and wmKeyMap::kmi_id.
Referenced by WM_keymap_add_item(), WM_keymap_add_item_copy(), wm_keymap_addon_add(), wm_keymap_patch(), WM_modalkeymap_add_item(), and WM_modalkeymap_add_item_str().
|
static |
Definition at line 1628 of file wm_keymap.c.
References IS_EVENT_ACTIONZONE, wmKeyMapItem::type, and WM_key_event_string().
Referenced by kmi_filter_is_visible_type_mask(), WM_key_event_operator(), WM_key_event_operator_from_keymap(), and WM_key_event_operator_string().
|
static |
Definition at line 1662 of file wm_keymap.c.
References kmi_filter_is_visible(), wmKeyMapItem::type, user_data, and WM_event_type_mask_test().
Referenced by WM_key_event_operator(), and WM_key_event_operator_from_keymap().
const char* WM_bool_as_string | ( | bool | test | ) |
Definition at line 2052 of file wm_keymap.c.
References IFACE_.
Referenced by applyEdgeSlide(), applyShrinkFatten(), applyVertSlide(), Bend(), edbm_bevel_update_status_text(), edbm_inset_update_header(), knife_update_header(), point_normals_update_header(), and stitch_update_header().
wmKeyMapItem* WM_key_event_operator | ( | const bContext * | C, |
const char * | opname, | ||
wmOperatorCallContext | opcontext, | ||
IDProperty * | properties, | ||
const short | include_mask, | ||
const short | exclude_mask, | ||
wmKeyMap ** | r_keymap | ||
) |
Definition at line 1672 of file wm_keymap.c.
References C, EVT_TYPE_MASK_ALL, kmi_filter_is_visible(), kmi_filter_is_visible_type_mask(), NULL, and wm_keymap_item_find().
Referenced by menu_change_shortcut(), remove_shortcut_func(), and ui_popup_context_menu_for_button().
wmKeyMapItem* WM_key_event_operator_from_keymap | ( | wmKeyMap * | keymap, |
const char * | opname, | ||
IDProperty * | properties, | ||
const short | include_mask, | ||
const short | exclude_mask | ||
) |
Definition at line 1695 of file wm_keymap.c.
References EVT_TYPE_MASK_ALL, kmi_filter_is_visible(), kmi_filter_is_visible_type_mask(), NULL, and wm_keymap_item_find_in_keymap().
char* WM_key_event_operator_string | ( | const bContext * | C, |
const char * | opname, | ||
wmOperatorCallContext | opcontext, | ||
IDProperty * | properties, | ||
const bool | is_strict, | ||
char * | result, | ||
const int | result_len | ||
) |
Definition at line 1636 of file wm_keymap.c.
References C, kmi_filter_is_visible(), NULL, result, wm_keymap_item_find(), and WM_keymap_item_to_string().
Referenced by but_shortcut_name_func(), operator_search_update_fn(), ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_operator(), ui_but_event_operator_string_from_panel(), ui_but_event_property_operator_string(), ui_tooltip_data_from_gizmo(), ui_tooltip_data_from_tool(), and uiItemMenuEnumFullO_ptr().
const char* WM_key_event_string | ( | const short | type, |
const bool | compact | ||
) |
Definition at line 1046 of file wm_keymap.c.
References BLF_default(), BLT_I18NCONTEXT_ID_WINDOWMANAGER, BLT_I18NCONTEXT_UI_EVENTS, CTX_IFACE_, EnumPropertyItem::description, EVT_BACKSPACEKEY, EVT_DOWNARROWKEY, EVT_ESCKEY, EVT_LEFTALTKEY, EVT_LEFTARROWKEY, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_OSKEY, EVT_RETKEY, EVT_RIGHTALTKEY, EVT_RIGHTARROWKEY, EVT_RIGHTCTRLKEY, EVT_RIGHTSHIFTKEY, EVT_SPACEKEY, EVT_TABKEY, EVT_UPARROWKEY, IFACE_, key_event_glyph_or_text(), EnumPropertyItem::name, NULL, rna_enum_event_type_items, RNA_enum_from_value(), and type.
Referenced by kmi_filter_is_visible(), poselib_preview_handle_event(), ui_but_update_ex(), ui_do_but_HOTKEYEVT(), ui_do_but_KEYEVT(), uiTemplateEventFromKeymapItem(), and WM_keymap_item_raw_to_string().
|
static |
Definition at line 327 of file wm_keymap.c.
References BLI_findstring(), wmWindowManager::defaultconf, and wmWindowManager::keyconfigs.
Referenced by wm_keymap_preset().
void WM_keyconfig_clear | ( | wmKeyConfig * | keyconf | ) |
Definition at line 312 of file wm_keymap.c.
References BLI_freelistN(), wmKeyConfig::keymaps, LISTBASE_FOREACH, and WM_keymap_clear().
Referenced by WM_keyconfig_free(), and WM_keyconfig_new().
void WM_keyconfig_free | ( | wmKeyConfig * | keyconf | ) |
Definition at line 321 of file wm_keymap.c.
References MEM_freeN, and WM_keyconfig_clear().
Referenced by wm_close_and_free(), and WM_keyconfig_remove().
wmKeyConfig* WM_keyconfig_new | ( | wmWindowManager * | wm, |
const char * | idname, | ||
bool | user_defined | ||
) |
Definition at line 259 of file wm_keymap.c.
References BLI_addtail(), BLI_findstring(), BLI_strncpy(), wmWindowManager::defaultconf, wmKeyConfig::flag, wmKeyConfig::idname, KEYCONF_USER, wmWindowManager::keyconfigs, wmKeyConfig::keymaps, LISTBASE_FOREACH, MEM_callocN, WM_keyconfig_clear(), and WM_keymap_clear().
Referenced by WM_keyconfig_init(), and WM_keyconfig_new_user().
wmKeyConfig* WM_keyconfig_new_user | ( | wmWindowManager * | wm, |
const char * | idname | ||
) |
Definition at line 290 of file wm_keymap.c.
References WM_keyconfig_new().
bool WM_keyconfig_remove | ( | wmWindowManager * | wm, |
wmKeyConfig * | keyconf | ||
) |
Definition at line 295 of file wm_keymap.c.
References BLI_findindex(), BLI_remlink(), BLI_strncpy(), wmWindowManager::defaultconf, wmKeyConfig::idname, wmWindowManager::keyconfigs, NULL, STREQLEN, WM_keyconfig_free(), and WM_keyconfig_update_tag().
void WM_keyconfig_set_active | ( | wmWindowManager * | wm, |
const char * | idname | ||
) |
Definition at line 341 of file wm_keymap.c.
References BLI_strncpy(), wmWindowManager::initialized, NULL, WM_KEYCONFIG_IS_INIT, WM_keyconfig_update(), and WM_keyconfig_update_tag().
void WM_keyconfig_update | ( | wmWindowManager * | wm | ) |
Definition at line 1829 of file wm_keymap.c.
References wmWindowManager::addonconf, BLI_assert, wmWindowManager::defaultconf, wmKeyMap::flag, wmWindowManager::keyconfigs, KEYMAP_DIFF, KEYMAP_MODAL, wmKeyConfig::keymaps, LISTBASE_FOREACH, wmKeyMap::modal_items, NULL, wmKeyMap::poll, wmKeyMap::poll_modal_item, wmWindowManager::userconf, WM_keyconfig_update_tag(), wm_keymap_diff_update(), wm_keymap_item_properties_set(), wm_keymap_item_properties_update_ot_from_list(), WM_keymap_list_find(), wm_keymap_patch_update(), wm_keymap_preset(), wm_keymap_test_and_clear_update(), wm_keymap_update_flag, WM_KEYMAP_UPDATE_OPERATORTYPE, WM_KEYMAP_UPDATE_RECONFIGURE, and wm_user_modal_keymap_set_items().
Referenced by menu_add_shortcut(), wm_event_do_handlers(), wm_homefile_write_exec(), WM_keyconfig_init(), WM_keyconfig_set_active(), WM_keymap_restore_to_default(), and wm_userpref_write_exec().
Definition at line 1800 of file wm_keymap.c.
References wm_keymap_update_flag, and WM_KEYMAP_UPDATE_OPERATORTYPE.
Referenced by WM_operatortype_remove_ptr().
void WM_keyconfig_update_tag | ( | wmKeyMap * | keymap, |
wmKeyMapItem * | kmi | ||
) |
Definition at line 1787 of file wm_keymap.c.
References wmKeyMapItem::flag, wmKeyMap::flag, KEYMAP_UPDATE, KMI_UPDATE, wm_keymap_update_flag, and WM_KEYMAP_UPDATE_RECONFIGURE.
Referenced by keymap_item_modified(), WM_keyconfig_init(), WM_keyconfig_remove(), WM_keyconfig_set_active(), WM_keyconfig_update(), WM_keymap_add_item(), WM_keymap_add_item_copy(), WM_keymap_ensure(), WM_keymap_item_restore_to_default(), WM_keymap_remove_item(), WM_keymap_restore_to_default(), WM_modalkeymap_add_item(), and WM_modalkeymap_add_item_str().
wmKeyMap* WM_keymap_active | ( | const wmWindowManager * | wm, |
wmKeyMap * | keymap | ||
) |
Definition at line 1943 of file wm_keymap.c.
References wmKeyMap::idname, wmKeyConfig::keymaps, NULL, wmKeyMap::regionid, wmKeyMap::spaceid, wmWindowManager::userconf, and WM_keymap_list_find().
Referenced by initTransform(), v3d_cursor_is_snap_invert(), WM_event_get_keymaps_from_handler(), wm_event_modalkeymap_begin(), wm_gizmo_keymap_uses_event_modifier(), wm_handlers_do_gizmo_handler(), WM_modalkeymap_operator_items_to_string(), and WM_window_modal_keymap_status_draw().
wmKeyMapItem* WM_keymap_add_item | ( | struct wmKeyMap * | keymap, |
const char * | idname, | ||
const KeyMapItem_Params * | params | ||
) |
Always add item.
Definition at line 505 of file wm_keymap.c.
References BLI_addtail(), BLI_strncpy(), wmKeyMapItem::idname, wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN, OP_MAX_TYPENAME, params, WM_keyconfig_update_tag(), and wm_keymap_item_properties_set().
Referenced by menu_add_shortcut(), WM_gizmogroup_keymap_template_select_ex(), WM_keymap_add_menu(), WM_keymap_add_menu_pie(), WM_keymap_add_panel(), and WM_keymap_add_tool().
wmKeyMapItem* WM_keymap_add_item_copy | ( | struct wmKeyMap * | keymap, |
wmKeyMapItem * | kmi_src | ||
) |
Definition at line 524 of file wm_keymap.c.
References BLI_addtail(), wmKeyMap::items, keymap_item_set_id(), WM_keyconfig_update_tag(), and wm_keymap_item_copy().
Definition at line 563 of file wm_keymap.c.
References BLI_addhead(), wmKeyMap::items, keymap_item_set_id(), LISTBASE_FOREACH, and wm_keymap_item_copy().
Referenced by wm_keymap_diff_update(), WM_keymap_item_restore_to_default(), and wm_keymap_patch_update().
Definition at line 405 of file wm_keymap.c.
References BLI_freelistN(), wmKeyMap::diff_items, wmKeyMap::items, LISTBASE_FOREACH, wm_keymap_diff_item_free(), and wm_keymap_item_free().
Referenced by WM_keyconfig_clear(), WM_keyconfig_new(), wm_keymap_diff_update(), WM_keymap_item_restore_to_default(), wm_keymap_patch_update(), WM_keymap_remove(), and WM_keymap_restore_to_default().
Definition at line 382 of file wm_keymap.c.
References BLI_addtail(), BLI_listbase_clear(), wmKeyMap::diff_items, wmKeyMap::flag, wmKeyMap::items, KEYMAP_EXPANDED, KEYMAP_UPDATE, LISTBASE_FOREACH, MEM_dupallocN, wmKeyMap::modal_items, wmKeyMap::poll, wmKeyMap::poll_modal_item, wm_keymap_diff_item_copy(), and wm_keymap_item_copy().
Referenced by wm_keymap_diff_update(), WM_keymap_item_restore_to_default(), and wm_keymap_patch_update().
|
static |
Definition at line 594 of file wm_keymap.c.
References wmKeyMapDiffItem::add_item, BLI_addtail(), wmKeyMap::diff_items, wmKeyMapItem::flag, wmKeyMap::items, KMI_EXPANDED, LISTBASE_FOREACH, MEM_callocN, wmKeyMapDiffItem::remove_item, wm_keymap_find_item_equals(), wm_keymap_item_copy(), wm_keymap_item_equals(), and WM_keymap_item_find_id().
Referenced by wm_keymap_diff_update().
|
static |
Definition at line 222 of file wm_keymap.c.
References wmKeyMapDiffItem::add_item, MEM_dupallocN, wmKeyMapDiffItem::next, NULL, wmKeyMapDiffItem::prev, wmKeyMapDiffItem::remove_item, and wm_keymap_item_copy().
Referenced by wm_keymap_copy().
|
static |
Definition at line 237 of file wm_keymap.c.
References wmKeyMapDiffItem::add_item, MEM_freeN, wmKeyMapDiffItem::remove_item, and wm_keymap_item_free().
Referenced by WM_keymap_clear().
|
static |
Definition at line 768 of file wm_keymap.c.
References BLI_addtail(), BLI_freelinkN(), wmKeyMap::diff_items, ListBase::first, wmKeyMap::flag, wmKeyMap::idname, KEYMAP_DIFF, KEYMAP_MODAL, MEM_freeN, wmKeyMap::regionid, wmKeyMap::spaceid, wm_keymap_addon_add(), WM_keymap_clear(), wm_keymap_copy(), wm_keymap_diff(), WM_keymap_list_find(), and wm_keymap_new().
Referenced by WM_keyconfig_update().
wmKeyMap* WM_keymap_ensure | ( | wmKeyConfig * | keyconf, |
const char * | idname, | ||
int | spaceid, | ||
int | regionid | ||
) |
Definition at line 852 of file wm_keymap.c.
References BLI_addtail(), wmKeyConfig::keymaps, NULL, WM_keyconfig_update_tag(), WM_keymap_list_find(), and wm_keymap_new().
Referenced by action_buttons_area_init(), action_channel_region_init(), action_keymap(), action_main_region_init(), buttons_keymap(), buttons_main_region_init(), clip_channels_region_init(), clip_keymap(), clip_main_region_init(), clip_preview_region_init(), clip_properties_region_init(), clip_tools_region_init(), console_keymap(), console_main_region_init(), ed_default_handlers(), ED_keymap_anim(), ED_keymap_animchannels(), ED_keymap_armature(), ED_keymap_curve(), ed_keymap_gpencil_curve_editing(), ed_keymap_gpencil_editing(), ed_keymap_gpencil_general(), ed_keymap_gpencil_painting(), ed_keymap_gpencil_painting_draw(), ed_keymap_gpencil_painting_erase(), ed_keymap_gpencil_painting_fill(), ed_keymap_gpencil_painting_tint(), ed_keymap_gpencil_sculpting(), ed_keymap_gpencil_sculptpainting_clone(), ed_keymap_gpencil_sculptpainting_grab(), ed_keymap_gpencil_sculptpainting_pinch(), ed_keymap_gpencil_sculptpainting_push(), ed_keymap_gpencil_sculptpainting_randomize(), ed_keymap_gpencil_sculptpainting_smooth(), ed_keymap_gpencil_sculptpainting_strength(), ed_keymap_gpencil_sculptpainting_thickness(), ed_keymap_gpencil_sculptpainting_twist(), ed_keymap_gpencil_vertexpainting(), ed_keymap_gpencil_vertexpainting_average(), ed_keymap_gpencil_vertexpainting_blur(), ed_keymap_gpencil_vertexpainting_draw(), ed_keymap_gpencil_vertexpainting_replace(), ed_keymap_gpencil_vertexpainting_smear(), ed_keymap_gpencil_weightpainting(), ed_keymap_gpencil_weightpainting_draw(), ED_keymap_lattice(), ED_keymap_marker(), ED_keymap_mask(), ED_keymap_mesh(), ED_keymap_metaball(), ED_keymap_object(), ED_keymap_paint(), ED_keymap_screen(), ED_keymap_ui(), ED_keymap_uvedit(), ED_keymap_view2d(), ED_region_panels_init(), file_execution_region_init(), file_header_region_init(), file_keymap(), file_main_region_init(), file_tools_region_init(), file_ui_region_init(), graph_buttons_region_init(), graph_channel_region_init(), graph_main_region_init(), graphedit_keymap(), image_buttons_region_init(), image_keymap(), image_main_region_init(), image_tools_region_init(), info_keymap(), info_main_region_init(), keymap_particle(), nla_buttons_region_init(), nla_channel_region_init(), nla_keymap(), nla_main_region_init(), blender::ed::space_node::node_buttons_region_init(), blender::ed::space_node::node_keymap(), blender::ed::space_node::node_main_region_init(), blender::ed::space_node::node_toolbar_region_init(), outliner_keymap(), outliner_main_region_init(), script_main_region_init(), sequencer_buttons_region_init(), sequencer_channel_region_init(), sequencer_keymap(), sequencer_main_region_init(), sequencer_preview_region_init(), sequencer_tools_region_init(), spreadsheet_keymap(), spreadsheet_main_region_init(), spreadsheet_sidebar_init(), text_keymap(), text_main_region_init(), text_properties_region_init(), tool_generic_create_gizmo(), topbar_main_region_init(), view3d_buttons_region_init(), view3d_header_region_init(), view3d_keymap(), view3d_main_region_init(), view3d_tools_region_init(), WM_gizmo_keymap_generic_click_drag_with_keyconfig(), WM_gizmo_keymap_generic_drag_with_keyconfig(), WM_gizmo_keymap_generic_maybe_drag_with_keyconfig(), WM_gizmo_keymap_generic_select_with_keyconfig(), WM_gizmo_keymap_generic_with_keyconfig(), WM_gizmogroup_keymap_template_select_ex(), WM_modalkeymap_ensure(), wm_window_ghostwindow_ensure(), and wm_window_keymap().
wmKeyMap* WM_keymap_find_all | ( | wmWindowManager * | wm, |
const char * | idname, | ||
int | spaceid, | ||
int | regionid | ||
) |
Definition at line 866 of file wm_keymap.c.
References wmKeyConfig::keymaps, wmWindowManager::userconf, and WM_keymap_list_find().
Referenced by WM_keymap_guess_from_context(), and WM_keymap_guess_opname().
wmKeyMap* WM_keymap_find_all_spaceid_or_empty | ( | wmWindowManager * | wm, |
const char * | idname, | ||
int | spaceid, | ||
int | regionid | ||
) |
Definition at line 871 of file wm_keymap.c.
References wmKeyConfig::keymaps, wmWindowManager::userconf, and WM_keymap_list_find_spaceid_or_empty().
|
static |
Definition at line 572 of file wm_keymap.c.
References wmKeyMap::items, LISTBASE_FOREACH, NULL, and wm_keymap_item_equals().
Referenced by wm_keymap_diff(), wm_keymap_patch(), and wm_keymap_patch_update().
|
static |
Definition at line 583 of file wm_keymap.c.
References wmKeyMap::items, LISTBASE_FOREACH, NULL, and wm_keymap_item_equals_result().
Referenced by wm_keymap_patch(), and wm_keymap_patch_update().
bool WM_keymap_item_compare | ( | const wmKeyMapItem * | k1, |
const wmKeyMapItem * | k2 | ||
) |
Definition at line 1714 of file wm_keymap.c.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, wmKeyMapItem::direction, ELEM, wmKeyMapItem::flag, wmKeyMapItem::keymodifier, KM_ANY, KM_CLICK, KM_CLICK_DRAG, KM_PRESS, KM_RELEASE, KMI_INACTIVE, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and WM_userdef_event_map().
|
static |
Definition at line 56 of file wm_keymap.c.
References PointerRNA::data, wmKeyMapItem::flag, wmKeyMapItem::idname, IDP_CopyProperty(), KMI_UPDATE, MEM_callocN, MEM_dupallocN, wmKeyMapItem::next, NULL, PointerRNA::owner_id, wmKeyMapItem::prev, wmKeyMapItem::properties, wmKeyMapItem::ptr, and WM_operator_properties_create().
Referenced by WM_keymap_add_item_copy(), wm_keymap_addon_add(), wm_keymap_copy(), wm_keymap_diff(), wm_keymap_diff_item_copy(), and wm_keymap_patch().
|
static |
Definition at line 167 of file wm_keymap.c.
References Freestyle::a, usdtokens::b(), ISKEYBOARD, KM_CLICK_DRAG, KMI_REPEAT_IGNORE, and wm_keymap_item_equals_result().
Referenced by wm_keymap_diff(), and wm_keymap_find_item_equals().
|
static |
Definition at line 159 of file wm_keymap.c.
References Freestyle::a, usdtokens::b(), G_MAIN, KMI_INACTIVE, RNA_EQ_UNSET_MATCH_NONE, RNA_struct_equals(), and STREQ.
Referenced by wm_keymap_find_item_equals_result(), and wm_keymap_item_equals().
|
static |
Definition at line 1537 of file wm_keymap.c.
References C, PointerRNA::data, wmOperatorType::flag, G, G_DEBUG_WM, wmKeyMap::idname, IDP_CopyProperty(), IDP_FreeProperty(), IDP_print(), NULL, OPTYPE_MACRO, ot, params, wmOperatorType::prop, wmKeyMapItem::ptr, RNA_pointer_create(), RNA_property_is_set(), RNA_property_unset(), wmOperatorType::srna, wm_keymap_item_find_props(), WM_keymap_item_to_string(), WM_operator_properties_default(), and WM_operatortype_find().
Referenced by WM_key_event_operator(), and WM_key_event_operator_string().
|
static |
Definition at line 1385 of file wm_keymap.c.
References C, wmEventHandler_KeymapResult::keymaps, wmEventHandler_KeymapResult::keymaps_len, LISTBASE_FOREACH, NULL, params, WM_event_get_keymaps_from_handler(), WM_HANDLER_TYPE_KEYMAP, wm_keymap_item_find_in_keymap(), and WM_keymap_poll().
Referenced by wm_keymap_item_find_props().
wmKeyMapItem* WM_keymap_item_find_id | ( | wmKeyMap * | keymap, |
int | id | ||
) |
Definition at line 2041 of file wm_keymap.c.
References wmKeyMapItem::id, wmKeyMap::items, LISTBASE_FOREACH, and NULL.
Referenced by menu_add_shortcut(), menu_add_shortcut_cancel(), wm_keymap_diff(), and WM_keymap_item_restore_to_default().
|
static |
Definition at line 1303 of file wm_keymap.c.
References IDProperty::data, G, G_DEBUG_WM, wmKeyMap::idname, IDP_CopyProperty(), IDP_EqualsProperties_ex(), IDP_FreeProperty(), IDP_print(), wmKeyMap::items, KMI_INACTIVE, LISTBASE_FOREACH, NULL, ot, params, RNA_pointer_create(), wmOperatorType::srna, STREQ, WM_keymap_item_to_string(), WM_operator_properties_default(), and WM_operatortype_find().
Referenced by WM_key_event_operator_from_keymap(), and wm_keymap_item_find_handlers().
|
static |
Definition at line 1424 of file wm_keymap.c.
References blender::compositor::area(), BKE_area_find_region_type(), C, CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), ELEM, ARegion::handlers, wmWindow::handlers, wmWindow::modalhandlers, NULL, params, ARegion::regiontype, RGN_TYPE_CHANNELS, RGN_TYPE_PREVIEW, RGN_TYPE_WINDOW, wm_keymap_item_find_handlers(), WM_OP_EXEC_REGION_CHANNELS, WM_OP_EXEC_REGION_PREVIEW, WM_OP_EXEC_REGION_WIN, WM_OP_INVOKE_REGION_CHANNELS, WM_OP_INVOKE_REGION_PREVIEW, and WM_OP_INVOKE_REGION_WIN.
Referenced by wm_keymap_item_find().
|
static |
Definition at line 81 of file wm_keymap.c.
References MEM_freeN, NULL, wmKeyMapItem::properties, wmKeyMapItem::ptr, and WM_operator_properties_free().
Referenced by WM_keymap_clear(), wm_keymap_diff_item_free(), wm_keymap_item_properties_update_ot(), and wm_keymap_patch().
int WM_keymap_item_map_type_get | ( | const wmKeyMapItem * | kmi | ) |
Definition at line 191 of file wm_keymap.c.
References ELEM, ISKEYBOARD, ISMOUSE, ISNDOF, ISTIMER, KM_TEXTINPUT, KMI_TYPE_KEYBOARD, KMI_TYPE_MOUSE, KMI_TYPE_NDOF, KMI_TYPE_TEXTINPUT, KMI_TYPE_TIMER, TABLET_ERASER, TABLET_STYLUS, and wmKeyMapItem::type.
void WM_keymap_item_properties_reset | ( | struct wmKeyMapItem * | kmi, |
struct IDProperty * | properties | ||
) |
Properties can be NULL, otherwise the arg passed is used and ownership is given to the kmi
.
Definition at line 177 of file wm_keymap.c.
References LIKELY, MEM_freeN, NULL, wmKeyMapItem::properties, wmKeyMapItem::ptr, wm_keymap_item_properties_set(), and WM_operator_properties_free().
Referenced by menu_add_shortcut(), and WM_keymap_item_restore_to_default().
|
static |
Definition at line 92 of file wm_keymap.c.
References wmKeyMapItem::idname, NULL, PointerRNA::owner_id, wmKeyMapItem::properties, wmKeyMapItem::ptr, WM_operator_properties_alloc(), and WM_operator_properties_sanitize().
Referenced by WM_keyconfig_update(), WM_keymap_add_item(), WM_keymap_item_properties_reset(), and wm_keymap_item_properties_update_ot().
|
static |
Similar to wm_keymap_item_properties_set but checks for the wmOperatorType having changed, see T38042.
Definition at line 105 of file wm_keymap.c.
References BLI_assert, PointerRNA::data, wmKeyMapItem::idname, NULL, ot, PointerRNA::owner_id, wmKeyMapItem::properties, wmKeyMapItem::ptr, wmOperatorType::srna, PointerRNA::type, wm_keymap_item_free(), wm_keymap_item_properties_set(), WM_operator_properties_create_ptr(), WM_operator_properties_sanitize(), and WM_operatortype_find().
Referenced by wm_keymap_item_properties_update_ot_from_list().
Definition at line 141 of file wm_keymap.c.
References LISTBASE_FOREACH, and wm_keymap_item_properties_update_ot().
Referenced by WM_keyconfig_update().
int WM_keymap_item_raw_to_string | ( | const short | shift, |
const short | ctrl, | ||
const short | alt, | ||
const short | oskey, | ||
const short | keymodifier, | ||
const short | val, | ||
const short | type, | ||
const bool | compact, | ||
char * | result, | ||
const int | result_len | ||
) |
Definition at line 1141 of file wm_keymap.c.
References ADD_SEP, BLI_assert, BLI_strcpy_rlen(), BLI_strncpy_utf8_rlen(), EVT_LEFTALTKEY, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_OSKEY, IFACE_, KM_ANY, KM_DBL_CLICK, result, type, and WM_key_event_string().
Referenced by WM_keymap_item_to_string().
void WM_keymap_item_restore_to_default | ( | wmWindowManager * | wm, |
wmKeyMap * | keymap, | ||
wmKeyMapItem * | kmi | ||
) |
Definition at line 1968 of file wm_keymap.c.
References wmWindowManager::addonconf, wmKeyMapItem::alt, BLI_strncpy(), wmKeyMapItem::ctrl, PointerRNA::data, wmKeyMapItem::flag, wmKeyMapItem::id, wmKeyMapItem::idname, wmKeyMap::idname, IDP_CopyProperty(), IDP_FreeProperty(), wmKeyConfig::keymaps, wmKeyMapItem::keymodifier, KMI_INACTIVE, KMI_REPEAT_IGNORE, wmKeyMapItem::maptype, MEM_freeN, NULL, wmKeyMapItem::oskey, wmKeyMapItem::properties, wmKeyMapItem::propvalue, wmKeyMapItem::ptr, wmKeyMap::regionid, wmKeyMapItem::shift, wmKeyMap::spaceid, STREQ, wmKeyMapItem::type, wmKeyMapItem::val, WM_keyconfig_update_tag(), wm_keymap_addon_add(), WM_keymap_clear(), wm_keymap_copy(), WM_keymap_item_find_id(), WM_keymap_item_properties_reset(), WM_keymap_list_find(), and wm_keymap_preset().
int WM_keymap_item_to_string | ( | const wmKeyMapItem * | kmi, |
const bool | compact, | ||
char * | result, | ||
const int | result_len | ||
) |
Definition at line 1213 of file wm_keymap.c.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, wmKeyMapItem::keymodifier, wmKeyMapItem::oskey, result, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and WM_keymap_item_raw_to_string().
Referenced by applyShrinkFatten(), keymap_handler_log_kmi_event_str(), menu_items_from_ui_create(), ui_item_with_label(), ui_tooltip_data_from_tool(), WM_key_event_operator_string(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), and WM_modalkeymap_items_to_string().
Definition at line 823 of file wm_keymap.c.
References KMAP_MAX_NAME, LISTBASE_FOREACH, NULL, and STREQLEN.
Referenced by WM_keyconfig_update(), WM_keymap_active(), wm_keymap_diff_update(), WM_keymap_ensure(), WM_keymap_find_all(), WM_keymap_item_restore_to_default(), wm_keymap_patch_update(), wm_keymap_preset(), WM_keymap_restore_to_default(), WM_modalkeymap_ensure(), and wm_user_modal_keymap_set_items().
wmKeyMap* WM_keymap_list_find_spaceid_or_empty | ( | ListBase * | lb, |
const char * | idname, | ||
int | spaceid, | ||
int | regionid | ||
) |
Definition at line 836 of file wm_keymap.c.
References ELEM, KMAP_MAX_NAME, LISTBASE_FOREACH, NULL, SPACE_EMPTY, and STREQLEN.
Referenced by wm_event_get_keymap_from_toolsystem_ex(), and WM_keymap_find_all_spaceid_or_empty().
|
static |
Definition at line 365 of file wm_keymap.c.
References BLI_strncpy(), wmKeyMap::idname, KMAP_MAX_NAME, MEM_callocN, wmKeyMap::owner_id, wmKeyMap::regionid, RNA_struct_state_owner_get(), and wmKeyMap::spaceid.
Referenced by wm_keymap_diff_update(), and WM_keymap_ensure().
If kmi_add is same as kmi_remove (can happen in some cases, typically when we got kmi_remove from wm_keymap_find_item_equals_result()), no need to add or remove anything, see T45579.
Maybe we should rather keep user-defined keymaps specific to a given base one?
Definition at line 639 of file wm_keymap.c.
References BLI_addtail(), BLI_freelinkN(), BLI_insertlinkbefore(), wmKeyMap::diff_items, wmKeyMapItem::flag, wmKeyMapItem::id, wmKeyMap::items, keymap_item_set_id(), KMI_EXPANDED, KMI_USER_MODIFIED, LISTBASE_FOREACH, NULL, wm_keymap_find_item_equals(), wm_keymap_find_item_equals_result(), wm_keymap_item_copy(), and wm_keymap_item_free().
Referenced by wm_keymap_patch_update().
|
static |
Definition at line 702 of file wm_keymap.c.
References BLI_addtail(), BLI_freelinkN(), wmKeyMap::flag, wmKeyMapItem::id, wmKeyMap::idname, wmKeyMap::items, KEYMAP_CHILDREN_EXPANDED, KEYMAP_DIFF, KEYMAP_EXPANDED, KEYMAP_UPDATE, KEYMAP_USER, KEYMAP_USER_MODIFIED, wmKeyMap::kmi_id, LISTBASE_FOREACH, wmKeyMap::regionid, wmKeyMap::spaceid, wm_keymap_addon_add(), WM_keymap_clear(), wm_keymap_copy(), wm_keymap_find_item_equals(), wm_keymap_find_item_equals_result(), WM_keymap_list_find(), and wm_keymap_patch().
Referenced by WM_keyconfig_update().
Definition at line 432 of file wm_keymap.c.
References BKE_workspace_owner_id_check(), BLI_listbase_is_empty(), BLI_str_endswith(), C, CLOG_WARN, CTX_wm_workspace(), wmKeyMap::idname, wmKeyMap::items, NULL, wmKeyMap::owner_id, wmKeyMap::poll, STREQ, UNLIKELY, and WM_LOG_KEYMAPS.
Referenced by menu_types_add_from_keymap_items(), WM_event_match_keymap_item_from_handlers(), wm_handlers_do_keymap_with_gizmo_handler(), wm_handlers_do_keymap_with_keymap_handler(), WM_keymap_guess_opname(), and wm_keymap_item_find_handlers().
|
static |
Definition at line 1818 of file wm_keymap.c.
References wmWindowManager::defaultconf, wmKeyMap::idname, wmKeyConfig::keymaps, wmKeyMap::regionid, wmKeyMap::spaceid, WM_keyconfig_active(), and WM_keymap_list_find().
Referenced by WM_keyconfig_update(), and WM_keymap_item_restore_to_default().
bool WM_keymap_remove | ( | wmKeyConfig * | keyconf, |
wmKeyMap * | keymap | ||
) |
Definition at line 419 of file wm_keymap.c.
References BLI_findindex(), BLI_remlink(), wmKeyConfig::keymaps, MEM_freeN, and WM_keymap_clear().
Referenced by WM_gizmomaptype_group_unlink().
bool WM_keymap_remove_item | ( | wmKeyMap * | keymap, |
wmKeyMapItem * | kmi | ||
) |
Definition at line 537 of file wm_keymap.c.
References BLI_findindex(), BLI_freelinkN(), wmKeyMap::items, MEM_freeN, NULL, wmKeyMapItem::ptr, WM_keyconfig_update_tag(), and WM_operator_properties_free().
Referenced by menu_add_shortcut_cancel(), and remove_shortcut_func().
void WM_keymap_restore_to_default | ( | wmKeyMap * | keymap, |
wmWindowManager * | wm | ||
) |
Definition at line 2026 of file wm_keymap.c.
References BLI_freelinkN(), wmKeyMap::idname, NULL, wmKeyMap::regionid, wmKeyMap::spaceid, WM_keyconfig_update(), WM_keyconfig_update_tag(), WM_keymap_clear(), and WM_keymap_list_find().
Definition at line 1805 of file wm_keymap.c.
References wmKeyMapItem::flag, wmKeyMap::flag, wmKeyMap::items, KEYMAP_UPDATE, KMI_UPDATE, LISTBASE_FOREACH, and update().
Referenced by WM_keyconfig_update().
wmKeyMapItem* WM_modalkeymap_add_item | ( | wmKeyMap * | km, |
const KeyMapItem_Params * | params, | ||
int | value | ||
) |
Definition at line 927 of file wm_keymap.c.
References BLI_addtail(), wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN, params, wmKeyMapItem::propvalue, and WM_keyconfig_update_tag().
Referenced by viewdolly_modal_keymap(), viewmove_modal_keymap(), viewrotate_modal_keymap(), viewzoom_modal_keymap(), and wm_gizmogroup_tweak_modal_keymap().
wmKeyMapItem* WM_modalkeymap_add_item_str | ( | wmKeyMap * | km, |
const KeyMapItem_Params * | params, | ||
const char * | value | ||
) |
Definition at line 943 of file wm_keymap.c.
References BLI_addtail(), BLI_strncpy(), wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN, params, wmKeyMapItem::propvalue_str, and WM_keyconfig_update_tag().
Definition at line 985 of file wm_keymap.c.
References CLOG_ERROR, wmOperatorType::modalkeymap, ot, WM_LOG_KEYMAPS, and WM_operatortype_find().
Referenced by bevel_modal_keymap(), curve_pen_modal_keymap(), ED_keymap_paint(), ED_keymap_transform(), eyedropper_colorband_modal_keymap(), eyedropper_modal_keymap(), fly_modal_keymap(), gesture_box_modal_keymap(), gesture_circle_modal_keymap(), gesture_lasso_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), keymap_modal_set(), knifetool_modal_keymap(), point_normals_modal_keymap(), sculpt_expand_modal_keymap(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewplace_modal_keymap(), viewrotate_modal_keymap(), viewzoom_modal_keymap(), walk_modal_keymap(), and wm_gizmogroup_tweak_modal_keymap().
wmKeyMap* WM_modalkeymap_ensure | ( | wmKeyConfig * | keyconf, |
const char * | idname, | ||
const EnumPropertyItem * | items | ||
) |
Definition at line 888 of file wm_keymap.c.
References wmWindowManager::defaultconf, wmKeyMap::flag, G_MAIN, wmKeyMap::idname, KEYMAP_MODAL, wmKeyConfig::keymaps, wmKeyMap::modal_items, wmKeyMap::poll, wmKeyMap::poll_modal_item, WM_keymap_ensure(), and WM_keymap_list_find().
Referenced by bevel_modal_keymap(), curve_pen_modal_keymap(), eyedropper_colorband_modal_keymap(), eyedropper_modal_keymap(), fly_modal_keymap(), gesture_box_modal_keymap(), gesture_circle_modal_keymap(), gesture_lasso_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), keymap_modal_set(), knifetool_modal_keymap(), paint_stroke_modal_keymap(), point_normals_modal_keymap(), sculpt_expand_modal_keymap(), transform_modal_keymap(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewplace_modal_keymap(), viewrotate_modal_keymap(), viewzoom_modal_keymap(), walk_modal_keymap(), and wm_gizmogroup_tweak_modal_keymap().
wmKeyMap* WM_modalkeymap_find | ( | wmKeyConfig * | keyconf, |
const char * | idname | ||
) |
Definition at line 914 of file wm_keymap.c.
References KEYMAP_MODAL, wmKeyConfig::keymaps, KMAP_MAX_NAME, LISTBASE_FOREACH, NULL, and STREQLEN.
Referenced by bevel_modal_keymap(), curve_pen_modal_keymap(), eyedropper_colorband_modal_keymap(), eyedropper_modal_keymap(), fly_modal_keymap(), gesture_box_modal_keymap(), gesture_circle_modal_keymap(), gesture_lasso_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), knifetool_modal_keymap(), paint_stroke_modal_keymap(), point_normals_modal_keymap(), sculpt_expand_modal_keymap(), v3d_cursor_snap_activate(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewplace_modal_keymap(), viewrotate_modal_keymap(), viewzoom_modal_keymap(), walk_modal_keymap(), and wm_gizmogroup_tweak_modal_keymap().
const wmKeyMapItem* WM_modalkeymap_find_propvalue | ( | const wmKeyMap * | km, |
const int | propvalue | ||
) |
Definition at line 980 of file wm_keymap.c.
References NULL, and wm_modalkeymap_find_propvalue_iter().
Referenced by initSeqSlide(), initShrinkFatten(), and WM_modalkeymap_items_to_string().
|
static |
Definition at line 961 of file wm_keymap.c.
References BLI_assert_msg, ListBase::first, wmKeyMap::flag, wmKeyMap::items, KEYMAP_MODAL, wmKeyMapItem::next, NULL, and wmKeyMapItem::propvalue.
Referenced by WM_modalkeymap_find_propvalue(), and WM_modalkeymap_items_to_string().
int WM_modalkeymap_items_to_string | ( | const wmKeyMap * | km, |
const int | propvalue, | ||
const bool | compact, | ||
char * | result, | ||
const int | result_len | ||
) |
Definition at line 1230 of file wm_keymap.c.
References result, WM_keymap_item_to_string(), WM_modalkeymap_find_propvalue(), and wm_modalkeymap_find_propvalue_iter().
Referenced by headerTranslation(), and WM_modalkeymap_operator_items_to_string().
int WM_modalkeymap_operator_items_to_string | ( | wmOperatorType * | ot, |
const int | propvalue, | ||
const bool | compact, | ||
char * | result, | ||
const int | result_len | ||
) |
Definition at line 1259 of file wm_keymap.c.
References G_MAIN, wmOperatorType::modalkeymap, ot, result, WM_keymap_active(), and WM_modalkeymap_items_to_string().
Referenced by WM_modalkeymap_operator_items_to_string_buf().
char* WM_modalkeymap_operator_items_to_string_buf | ( | wmOperatorType * | ot, |
const int | propvalue, | ||
const bool | compact, | ||
const int | max_len, | ||
int * | r_available_len, | ||
char ** | r_result | ||
) |
Definition at line 1270 of file wm_keymap.c.
References min_ii(), ot, ret, and WM_modalkeymap_operator_items_to_string().
Referenced by WM_window_modal_keymap_status_draw().
|
static |
Definition at line 997 of file wm_keymap.c.
References wmWindowManager::defaultconf, wmKeyMap::flag, wmKeyMap::idname, wmKeyMap::items, KEYMAP_MODAL, wmKeyConfig::keymaps, LISTBASE_FOREACH, wmKeyMap::modal_items, NULL, wmKeyMap::poll, wmKeyMap::poll_modal_item, RNA_enum_value_from_id(), and WM_keymap_list_find().
Referenced by WM_keyconfig_update().
|
static |
Definition at line 1785 of file wm_keymap.c.
Referenced by WM_keyconfig_update(), WM_keyconfig_update_operatortype(), and WM_keyconfig_update_tag().