Blender V2.61 - r43446
|
#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 "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_window.h"
#include "wm_event_system.h"
#include "wm_event_types.h"
Go to the source code of this file.
Functions | |
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 int | wm_keymap_item_equals_result (wmKeyMapItem *a, wmKeyMapItem *b) |
static int | wm_keymap_item_equals (wmKeyMapItem *a, wmKeyMapItem *b) |
void | WM_keymap_properties_reset (wmKeyMapItem *kmi, struct IDProperty *properties) |
static wmKeyMapDiffItem * | wm_keymap_diff_item_copy (wmKeyMapDiffItem *kmdi) |
static void | wm_keymap_diff_item_free (wmKeyMapDiffItem *kmdi) |
wmKeyConfig * | WM_keyconfig_new (wmWindowManager *wm, const char *idname) |
wmKeyConfig * | WM_keyconfig_new_user (wmWindowManager *wm, const char *idname) |
void | WM_keyconfig_remove (wmWindowManager *wm, wmKeyConfig *keyconf) |
void | WM_keyconfig_free (wmKeyConfig *keyconf) |
static wmKeyConfig * | wm_keyconfig_list_find (ListBase *lb, char *idname) |
static wmKeyConfig * | WM_keyconfig_active (wmWindowManager *wm) |
void | WM_keyconfig_set_active (wmWindowManager *wm, const char *idname) |
static wmKeyMap * | wm_keymap_new (const char *idname, int spaceid, int regionid) |
static wmKeyMap * | wm_keymap_copy (wmKeyMap *keymap) |
void | WM_keymap_free (wmKeyMap *keymap) |
static void | keymap_event_set (wmKeyMapItem *kmi, short type, short val, int modifier, short keymodifier) |
static void | keymap_item_set_id (wmKeyMap *keymap, wmKeyMapItem *kmi) |
wmKeyMapItem * | WM_keymap_verify_item (wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier) |
wmKeyMapItem * | WM_keymap_add_item (wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier) |
wmKeyMapItem * | WM_keymap_add_menu (wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier) |
void | WM_keymap_remove_item (wmKeyMap *keymap, wmKeyMapItem *kmi) |
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) |
wmKeyMap * | WM_keymap_list_find (ListBase *lb, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_find (wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_find_all (const bContext *C, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_modalkeymap_add (wmKeyConfig *keyconf, const char *idname, EnumPropertyItem *items) |
wmKeyMap * | WM_modalkeymap_get (wmKeyConfig *keyconf, const char *idname) |
wmKeyMapItem * | WM_modalkeymap_add_item (wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value) |
void | WM_modalkeymap_assign (wmKeyMap *km, const char *opname) |
const char * | WM_key_event_string (short type) |
char * | WM_keymap_item_to_string (wmKeyMapItem *kmi, char *str, int len) |
static wmKeyMapItem * | wm_keymap_item_find_handlers (const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext), IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) |
static wmKeyMapItem * | wm_keymap_item_find_props (const bContext *C, const char *opname, int opcontext, IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) |
static wmKeyMapItem * | wm_keymap_item_find (const bContext *C, const char *opname, int opcontext, IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r) |
char * | WM_key_event_operator_string (const bContext *C, const char *opname, int opcontext, IDProperty *properties, const short sloppy, char *str, int len) |
int | WM_key_event_operator_id (const bContext *C, const char *opname, int opcontext, IDProperty *properties, int hotkey, wmKeyMap **keymap_r) |
int | WM_keymap_item_compare (wmKeyMapItem *k1, wmKeyMapItem *k2) |
void | WM_keyconfig_update_tag (wmKeyMap *km, wmKeyMapItem *kmi) |
static int | wm_keymap_test_and_clear_update (wmKeyMap *km) |
static wmKeyMap * | wm_keymap_preset (wmWindowManager *wm, wmKeyMap *km) |
void | WM_keyconfig_update (wmWindowManager *wm) |
wmKeyMap * | WM_keymap_active (wmWindowManager *wm, wmKeyMap *keymap) |
void | WM_keymap_restore_item_to_default (bContext *C, wmKeyMap *keymap, wmKeyMapItem *kmi) |
void | WM_keymap_restore_to_default (wmKeyMap *keymap, bContext *C) |
wmKeyMapItem * | WM_keymap_item_find_id (wmKeyMap *keymap, int id) |
wmKeyMap * | WM_keymap_guess_opname (const bContext *C, const char *opname) |
Variables | |
static int | WM_KEYMAP_UPDATE = 0 |
Definition in file wm_keymap.c.
static void keymap_event_set | ( | wmKeyMapItem * | kmi, |
short | type, | ||
short | val, | ||
int | modifier, | ||
short | keymodifier | ||
) | [static] |
Definition at line 306 of file wm_keymap.c.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, FALSE, wmKeyMapItem::keymodifier, KM_ALT, KM_ALT2, KM_ANY, KM_CTRL, KM_CTRL2, KM_MOD_FIRST, KM_MOD_SECOND, KM_OSKEY, KM_OSKEY2, KM_SHIFT, KM_SHIFT2, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and simple_enum_gen::val.
Referenced by WM_keymap_add_item(), WM_keymap_verify_item(), and WM_modalkeymap_add_item().
static void keymap_item_set_id | ( | wmKeyMap * | keymap, |
wmKeyMapItem * | kmi | ||
) | [static] |
Definition at line 323 of file wm_keymap.c.
References wmKeyMap::flag, wmKeyMapItem::id, KEYMAP_USER, and wmKeyMap::kmi_id.
Referenced by WM_keymap_add_item(), wm_keymap_addon_add(), wm_keymap_patch(), WM_keymap_verify_item(), and WM_modalkeymap_add_item().
int WM_key_event_operator_id | ( | const bContext * | C, |
const char * | opname, | ||
int | opcontext, | ||
IDProperty * | properties, | ||
int | hotkey, | ||
wmKeyMap ** | keymap_r | ||
) |
Definition at line 879 of file wm_keymap.c.
References wmKeyMapItem::id, TRUE, and wm_keymap_item_find().
Referenced by menu_change_shortcut(), remove_shortcut_func(), and ui_but_menu().
char* WM_key_event_operator_string | ( | const bContext * | C, |
const char * | opname, | ||
int | opcontext, | ||
IDProperty * | properties, | ||
const short | sloppy, | ||
char * | str, | ||
int | len | ||
) |
Definition at line 867 of file wm_keymap.c.
References NULL, str, wm_keymap_item_find(), and WM_keymap_item_to_string().
Referenced by but_shortcut_name_func(), operator_search_cb(), ui_menu_block_set_keymaps(), and ui_tooltip_create().
const char* WM_key_event_string | ( | short | type | ) |
Definition at line 724 of file wm_keymap.c.
References event_type_items, wmJob::name, NULL, and RNA_enum_name().
Referenced by ui_check_but(), ui_do_but_HOTKEYEVT(), ui_do_but_KEYEVT(), wm_keymap_item_find_handlers(), and WM_keymap_item_to_string().
static wmKeyConfig* WM_keyconfig_active | ( | wmWindowManager * | wm | ) | [static] |
Definition at line 227 of file wm_keymap.c.
References wmWindowManager::defaultconf, wmWindowManager::keyconfigs, UserDef::keyconfigstr, U, and wm_keyconfig_list_find().
Referenced by wm_keymap_preset().
void WM_keyconfig_free | ( | wmKeyConfig * | keyconf | ) |
Definition at line 204 of file wm_keymap.c.
References BLI_freelinkN(), ListBase::first, wmKeyConfig::keymaps, MEM_freeN(), and WM_keymap_free().
Referenced by wm_close_and_free(), and WM_keyconfig_remove().
static wmKeyConfig* wm_keyconfig_list_find | ( | ListBase * | lb, |
char * | idname | ||
) | [static] |
Definition at line 216 of file wm_keymap.c.
References ListBase::first, wmKeyConfig::idname, KMAP_MAX_NAME, wmKeyConfig::next, and NULL.
Referenced by WM_keyconfig_active().
wmKeyConfig* WM_keyconfig_new | ( | wmWindowManager * | wm, |
const char * | idname | ||
) |
Definition at line 171 of file wm_keymap.c.
References BLI_addtail(), BLI_strncpy(), wmKeyConfig::idname, wmWindowManager::keyconfigs, and MEM_callocN().
Referenced by WM_keyconfig_new_user(), and WM_keymap_init().
wmKeyConfig* WM_keyconfig_new_user | ( | wmWindowManager * | wm, |
const char * | idname | ||
) |
Definition at line 182 of file wm_keymap.c.
References wmKeyConfig::flag, KEYCONF_USER, and WM_keyconfig_new().
void WM_keyconfig_remove | ( | wmWindowManager * | wm, |
wmKeyConfig * | keyconf | ||
) |
Definition at line 191 of file wm_keymap.c.
References BLI_remlink(), BLI_strncpy(), wmWindowManager::defaultconf, wmKeyConfig::idname, wmWindowManager::keyconfigs, UserDef::keyconfigstr, NULL, U, WM_keyconfig_free(), and WM_keyconfig_update_tag().
void WM_keyconfig_set_active | ( | wmWindowManager * | wm, |
const char * | idname | ||
) |
Definition at line 240 of file wm_keymap.c.
References BLI_strncpy(), UserDef::keyconfigstr, NULL, U, WM_keyconfig_update(), and WM_keyconfig_update_tag().
void WM_keyconfig_update | ( | wmWindowManager * | wm | ) |
Definition at line 977 of file wm_keymap.c.
References wmKeyMapDiffItem::add_item, wmWindowManager::addonconf, wmWindowManager::defaultconf, wmKeyMap::diff_items, ListBase::first, wmKeyMap::flag, G, wmKeyMap::idname, wmKeyMap::items, KEYMAP_DIFF, KEYMAP_MODAL, wmKeyConfig::keymaps, wmKeyMap::modal_items, wmKeyMapItem::next, wmKeyMapDiffItem::next, wmKeyMap::next, NULL, wmKeyMap::poll, wmKeyMap::regionid, wmKeyMapDiffItem::remove_item, wmKeyMap::spaceid, U, UserDef::user_keymaps, wmWindowManager::userconf, WM_keyconfig_update(), WM_keyconfig_update_tag(), wm_keymap_diff_update(), wm_keymap_item_properties_set(), WM_keymap_list_find(), wm_keymap_patch_update(), wm_keymap_preset(), and wm_keymap_test_and_clear_update().
Referenced by menu_add_shortcut(), wm_event_do_handlers(), WM_keyconfig_set_active(), WM_keyconfig_update(), WM_keymap_init(), WM_keymap_restore_to_default(), and WM_write_homefile().
void WM_keyconfig_update_tag | ( | wmKeyMap * | km, |
wmKeyMapItem * | kmi | ||
) |
Definition at line 938 of file wm_keymap.c.
References wmKeyMapItem::flag, wmKeyMap::flag, KEYMAP_UPDATE, and KMI_UPDATE.
Referenced by keymap_item_modified(), WM_keyconfig_remove(), WM_keyconfig_set_active(), WM_keyconfig_update(), WM_keymap_add_item(), WM_keymap_find(), WM_keymap_init(), WM_keymap_remove_item(), WM_keymap_restore_item_to_default(), WM_keymap_restore_to_default(), and WM_modalkeymap_add_item().
wmKeyMap* WM_keymap_active | ( | wmWindowManager * | wm, |
wmKeyMap * | keymap | ||
) |
Definition at line 1050 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(), wm_event_modalkeymap(), wm_handlers_do(), and wm_keymap_item_find_handlers().
wmKeyMapItem* WM_keymap_add_item | ( | wmKeyMap * | keymap, |
const char * | idname, | ||
int | type, | ||
int | val, | ||
int | modifier, | ||
int | keymodifier | ||
) |
Definition at line 356 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, WM_keyconfig_update_tag(), and wm_keymap_item_properties_set().
Referenced by action_keymap_keyframes(), buttons_keymap(), clip_keymap(), console_keymap(), ED_keymap_anim(), ED_keymap_animchannels(), ED_keymap_armature(), ED_keymap_curve(), ED_keymap_gpencil(), ED_keymap_mesh(), ED_keymap_metaball(), ED_keymap_object(), ED_keymap_paint(), ed_keymap_paint_brush_radial_control(), ed_keymap_paint_brush_size(), ed_keymap_paint_brush_switch(), ED_keymap_screen(), ED_keymap_uvedit(), ED_marker_keymap(), ED_marker_keymap_animedit_conflictfree(), ED_object_generic_keymap(), file_keymap(), graphedit_keymap(), graphedit_keymap_keyframes(), image_keymap(), info_keymap(), keymap_particle(), logic_keymap(), menu_add_shortcut(), nla_keymap(), nla_keymap_channels(), nla_keymap_main(), node_keymap(), outliner_keymap(), script_keymap(), sequencer_keymap(), text_keymap(), time_keymap(), transform_keymap_for_space(), UI_view2d_keymap(), view3d_keymap(), WM_keymap_add_menu(), and wm_window_keymap().
wmKeyMapItem* WM_keymap_add_menu | ( | wmKeyMap * | keymap, |
const char * | idname, | ||
int | type, | ||
int | val, | ||
int | modifier, | ||
int | keymodifier | ||
) |
Definition at line 374 of file wm_keymap.c.
References wmKeyMapItem::ptr, RNA_string_set(), and WM_keymap_add_item().
Referenced by clip_keymap(), ED_keymap_armature(), ED_keymap_curve(), ED_keymap_mesh(), ED_keymap_object(), ED_keymap_uvedit(), keymap_particle(), logic_keymap(), node_keymap(), sequencer_keymap(), text_keymap(), view3d_keymap(), and wm_window_keymap().
Definition at line 400 of file wm_keymap.c.
References BLI_addhead(), ListBase::first, wmKeyMap::items, keymap_item_set_id(), wmKeyMapItem::next, and wm_keymap_item_copy().
Referenced by wm_keymap_diff_update(), wm_keymap_patch_update(), and WM_keymap_restore_item_to_default().
Definition at line 267 of file wm_keymap.c.
References BLI_addtail(), wmKeyMap::diff_items, ListBase::first, wmKeyMap::flag, wmKeyMap::items, KEYMAP_EXPANDED, KEYMAP_UPDATE, ListBase::last, MEM_dupallocN(), wmKeyMap::modal_items, wmKeyMapItem::next, wmKeyMapDiffItem::next, NULL, wmKeyMap::poll, wm_keymap_diff_item_copy(), and wm_keymap_item_copy().
Referenced by wm_keymap_diff_update(), wm_keymap_patch_update(), and WM_keymap_restore_item_to_default().
static void wm_keymap_diff | ( | wmKeyMap * | diff_km, |
wmKeyMap * | from_km, | ||
wmKeyMap * | to_km, | ||
wmKeyMap * | orig_km, | ||
wmKeyMap * | addon_km | ||
) | [static] |
Definition at line 433 of file wm_keymap.c.
References wmKeyMapDiffItem::add_item, BLI_addtail(), wmKeyMap::diff_items, ListBase::first, wmKeyMapItem::flag, wmKeyMapItem::id, wmKeyMap::items, KMI_EXPANDED, MEM_callocN(), wmKeyMapItem::next, 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 wmKeyMapDiffItem* wm_keymap_diff_item_copy | ( | wmKeyMapDiffItem * | kmdi | ) | [static] |
Definition at line 142 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 void wm_keymap_diff_item_free | ( | wmKeyMapDiffItem * | kmdi | ) | [static] |
Definition at line 155 of file wm_keymap.c.
References wmKeyMapDiffItem::add_item, MEM_freeN(), wmKeyMapDiffItem::remove_item, and wm_keymap_item_free().
Referenced by WM_keymap_free().
static void wm_keymap_diff_update | ( | ListBase * | lb, |
wmKeyMap * | defaultmap, | ||
wmKeyMap * | addonmap, | ||
wmKeyMap * | km | ||
) | [static] |
Definition at line 578 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_copy(), wm_keymap_diff(), WM_keymap_free(), WM_keymap_list_find(), and wm_keymap_new().
Referenced by WM_keyconfig_update().
wmKeyMap* WM_keymap_find | ( | wmKeyConfig * | keyconf, |
const char * | idname, | ||
int | spaceid, | ||
int | regionid | ||
) |
Definition at line 638 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_channel_area_init(), action_keymap(), action_main_area_init(), buttons_keymap(), buttons_main_area_init(), clip_keymap(), clip_main_area_init(), clip_preview_area_init(), clip_properties_area_init(), console_keymap(), console_main_area_init(), ed_default_handlers(), ED_keymap_anim(), ED_keymap_animchannels(), ED_keymap_armature(), ED_keymap_curve(), ED_keymap_gpencil(), ED_keymap_mesh(), ED_keymap_metaball(), ED_keymap_object(), ED_keymap_paint(), ED_keymap_screen(), ED_keymap_uvedit(), ED_marker_keymap(), ED_region_panels_init(), file_channel_area_init(), file_header_area_init(), file_keymap(), file_main_area_init(), file_ui_area_init(), graph_buttons_area_init(), graph_channel_area_init(), graph_main_area_init(), graphedit_keymap(), image_buttons_area_init(), image_keymap(), image_main_area_init(), image_scope_area_init(), info_keymap(), info_main_area_init(), keymap_particle(), logic_buttons_area_init(), logic_keymap(), logic_main_area_init(), nla_buttons_area_init(), nla_channel_area_init(), nla_keymap(), nla_main_area_init(), node_buttons_area_init(), node_keymap(), node_main_area_init(), outliner_keymap(), outliner_main_area_init(), script_keymap(), script_main_area_init(), sequencer_keymap(), sequencer_main_area_init(), sequencer_preview_area_init(), text_keymap(), text_main_area_init(), time_keymap(), time_main_area_init(), UI_view2d_keymap(), view3d_buttons_area_init(), view3d_header_area_init(), view3d_keymap(), view3d_main_area_init(), view3d_tools_area_init(), WM_modalkeymap_add(), wm_window_add_ghostwindows(), and wm_window_keymap().
Definition at line 652 of file wm_keymap.c.
References CTX_wm_manager(), wmKeyConfig::keymaps, wmWindowManager::userconf, and WM_keymap_list_find().
Referenced by WM_keymap_guess_opname().
static wmKeyMapItem* wm_keymap_find_item_equals | ( | wmKeyMap * | km, |
wmKeyMapItem * | needle | ||
) | [static] |
Definition at line 411 of file wm_keymap.c.
References ListBase::first, wmKeyMap::items, wmKeyMapItem::next, NULL, and wm_keymap_item_equals().
Referenced by wm_keymap_diff(), wm_keymap_patch(), and wm_keymap_patch_update().
static wmKeyMapItem* wm_keymap_find_item_equals_result | ( | wmKeyMap * | km, |
wmKeyMapItem * | needle | ||
) | [static] |
Definition at line 422 of file wm_keymap.c.
References ListBase::first, wmKeyMap::items, wmKeyMapItem::next, NULL, and wm_keymap_item_equals_result().
Referenced by wm_keymap_patch(), and wm_keymap_patch_update().
void WM_keymap_free | ( | wmKeyMap * | keymap | ) |
Definition at line 291 of file wm_keymap.c.
References BLI_freelistN(), wmKeyMap::diff_items, ListBase::first, wmKeyMap::items, wmKeyMapDiffItem::next, wmKeyMapItem::next, wm_keymap_diff_item_free(), and wm_keymap_item_free().
Referenced by WM_keyconfig_free(), wm_keymap_diff_update(), wm_keymap_patch_update(), WM_keymap_restore_item_to_default(), and WM_keymap_restore_to_default().
Definition at line 1160 of file wm_keymap.c.
References CTX_data_mode_enum(), CTX_wm_space_data(), NULL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, wmKeyMap::poll, SPACE_ACTION, SPACE_IMAGE, SPACE_IPO, SPACE_NLA, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, SpaceLink::spacetype, and WM_keymap_find_all().
Referenced by menu_add_shortcut(), and ui_but_menu().
int WM_keymap_item_compare | ( | wmKeyMapItem * | k1, |
wmKeyMapItem * | k2 | ||
) |
Definition at line 889 of file wm_keymap.c.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, ELEM3, wmKeyMapItem::flag, wmKeyMapItem::keymodifier, KM_ANY, KM_CLICK, KM_PRESS, KM_RELEASE, KMI_INACTIVE, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and WM_userdef_event_map().
static wmKeyMapItem* wm_keymap_item_copy | ( | wmKeyMapItem * | kmi | ) | [static] |
Definition at line 66 of file wm_keymap.c.
References PointerRNA::data, wmKeyMapItem::flag, wmKeyMapItem::idname, IDP_CopyProperty(), KMI_UPDATE, MEM_callocN(), MEM_dupallocN(), wmKeyMapItem::next, NULL, wmKeyMapItem::prev, wmKeyMapItem::properties, wmKeyMapItem::ptr, and WM_operator_properties_create().
Referenced by wm_keymap_addon_add(), wm_keymap_copy(), wm_keymap_diff(), wm_keymap_diff_item_copy(), and wm_keymap_patch().
static int wm_keymap_item_equals | ( | wmKeyMapItem * | a, |
wmKeyMapItem * | b | ||
) | [static] |
Definition at line 114 of file wm_keymap.c.
References wmKeyMapItem::alt, wmKeyMapItem::ctrl, wmKeyMapItem::keymodifier, wmKeyMapItem::maptype, wmKeyMapItem::oskey, wmKeyMapItem::shift, wmKeyMapItem::type, wmKeyMapItem::val, and wm_keymap_item_equals_result().
Referenced by wm_keymap_diff(), and wm_keymap_find_item_equals().
static int wm_keymap_item_equals_result | ( | wmKeyMapItem * | a, |
wmKeyMapItem * | b | ||
) | [static] |
Definition at line 99 of file wm_keymap.c.
References PointerRNA::data, wmKeyMapItem::flag, wmKeyMapItem::idname, IDP_EqualsProperties(), KMI_INACTIVE, NULL, wmKeyMapItem::propvalue, and wmKeyMapItem::ptr.
Referenced by wm_keymap_find_item_equals_result(), and wm_keymap_item_equals().
static wmKeyMapItem* wm_keymap_item_find | ( | const bContext * | C, |
const char * | opname, | ||
int | opcontext, | ||
IDProperty * | properties, | ||
const short | hotkey, | ||
const short | sloppy, | ||
wmKeyMap ** | keymap_r | ||
) | [static] |
Definition at line 857 of file wm_keymap.c.
References NULL, and wm_keymap_item_find_props().
Referenced by WM_key_event_operator_id(), and WM_key_event_operator_string().
static wmKeyMapItem* wm_keymap_item_find_handlers | ( | const bContext * | C, |
ListBase * | handlers, | ||
const char * | opname, | ||
int | UNUSEDopcontext, | ||
IDProperty * | properties, | ||
int | compare_props, | ||
int | hotkey, | ||
wmKeyMap ** | keymap_r | ||
) | [static] |
Definition at line 770 of file wm_keymap.c.
References CTX_wm_manager(), PointerRNA::data, ListBase::first, wmKeyMapItem::idname, IDP_EqualsProperties(), ISHOTKEY, wmKeyMap::items, wmEventHandler::keymap, wmKeyMapItem::next, wmEventHandler::next, NULL, wmKeyMap::poll, wmKeyMapItem::ptr, wmKeyMapItem::type, WM_key_event_string(), and WM_keymap_active().
Referenced by wm_keymap_item_find_props().
wmKeyMapItem* WM_keymap_item_find_id | ( | wmKeyMap * | keymap, |
int | id | ||
) |
Definition at line 1145 of file wm_keymap.c.
References ListBase::first, wmKeyMapItem::id, wmKeyMap::items, wmKeyMapItem::next, and NULL.
Referenced by menu_add_shortcut(), menu_change_shortcut(), remove_shortcut_func(), ui_but_menu(), wm_keymap_diff(), and WM_keymap_restore_item_to_default().
static wmKeyMapItem* wm_keymap_item_find_props | ( | const bContext * | C, |
const char * | opname, | ||
int | opcontext, | ||
IDProperty * | properties, | ||
int | compare_props, | ||
int | hotkey, | ||
wmKeyMap ** | keymap_r | ||
) | [static] |
Definition at line 809 of file wm_keymap.c.
References BKE_area_find_region_type(), CTX_wm_area(), CTX_wm_region(), CTX_wm_window(), ELEM, ARegion::handlers, ScrArea::handlers, wmWindow::handlers, NULL, ARegion::regiontype, RGN_TYPE_CHANNELS, RGN_TYPE_PREVIEW, RGN_TYPE_WINDOW, wmJob::win, 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 void wm_keymap_item_free | ( | wmKeyMapItem * | kmi | ) | [static] |
Definition at line 84 of file wm_keymap.c.
References MEM_freeN(), wmKeyMapItem::ptr, and WM_operator_properties_free().
Referenced by wm_keymap_diff_item_free(), WM_keymap_free(), and wm_keymap_patch().
static void wm_keymap_item_properties_set | ( | wmKeyMapItem * | kmi | ) | [static] |
Definition at line 93 of file wm_keymap.c.
References wmKeyMapItem::idname, wmKeyMapItem::properties, wmKeyMapItem::ptr, WM_operator_properties_alloc(), and WM_operator_properties_sanitize().
Referenced by WM_keyconfig_update(), WM_keymap_add_item(), WM_keymap_properties_reset(), and WM_keymap_verify_item().
char* WM_keymap_item_to_string | ( | wmKeyMapItem * | kmi, |
char * | str, | ||
int | len | ||
) |
Definition at line 733 of file wm_keymap.c.
References wmKeyMapItem::alt, BLI_strncpy(), wmKeyMapItem::ctrl, wmKeyMapItem::keymodifier, KM_ANY, wmKeyMapItem::oskey, wmKeyMapItem::shift, str, wmKeyMapItem::type, and WM_key_event_string().
Referenced by ui_item_with_label(), and WM_key_event_operator_string().
Definition at line 626 of file wm_keymap.c.
References ListBase::first, wmKeyMap::idname, KMAP_MAX_NAME, wmKeyMap::next, NULL, wmKeyMap::regionid, and wmKeyMap::spaceid.
Referenced by WM_keyconfig_update(), WM_keymap_active(), wm_keymap_diff_update(), WM_keymap_find(), WM_keymap_find_all(), wm_keymap_patch_update(), wm_keymap_preset(), WM_keymap_restore_item_to_default(), WM_keymap_restore_to_default(), and WM_modalkeymap_add().
static wmKeyMap* wm_keymap_new | ( | const char * | idname, |
int | spaceid, | ||
int | regionid | ||
) | [static] |
Definition at line 256 of file wm_keymap.c.
References BLI_strncpy(), wmKeyMap::idname, KMAP_MAX_NAME, MEM_callocN(), wmKeyMap::regionid, and wmKeyMap::spaceid.
Referenced by wm_keymap_diff_update(), and WM_keymap_find().
Definition at line 479 of file wm_keymap.c.
References wmKeyMapDiffItem::add_item, BLI_addtail(), BLI_freelinkN(), BLI_insertlinkbefore(), wmKeyMap::diff_items, ListBase::first, wmKeyMapItem::flag, wmKeyMapItem::id, wmKeyMap::items, keymap_item_set_id(), KMI_EXPANDED, KMI_USER_MODIFIED, wmKeyMapDiffItem::next, NULL, wmKeyMapDiffItem::remove_item, 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 wmKeyMap* wm_keymap_patch_update | ( | ListBase * | lb, |
wmKeyMap * | defaultmap, | ||
wmKeyMap * | addonmap, | ||
wmKeyMap * | usermap | ||
) | [static] |
Definition at line 521 of file wm_keymap.c.
References BLI_addtail(), BLI_freelinkN(), ListBase::first, 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, wmKeyMapItem::next, wmKeyMap::regionid, wmKeyMap::spaceid, wm_keymap_addon_add(), wm_keymap_copy(), wm_keymap_find_item_equals(), wm_keymap_find_item_equals_result(), WM_keymap_free(), WM_keymap_list_find(), and wm_keymap_patch().
Referenced by WM_keyconfig_update().
static wmKeyMap* wm_keymap_preset | ( | wmWindowManager * | wm, |
wmKeyMap * | km | ||
) | [static] |
Definition at line 965 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_restore_item_to_default().
void WM_keymap_properties_reset | ( | wmKeyMapItem * | kmi, |
struct IDProperty * | properties | ||
) |
Definition at line 128 of file wm_keymap.c.
References 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_restore_item_to_default().
void WM_keymap_remove_item | ( | wmKeyMap * | keymap, |
wmKeyMapItem * | kmi | ||
) |
Definition at line 381 of file wm_keymap.c.
References BLI_findindex(), BLI_freelinkN(), wmKeyMap::items, MEM_freeN(), wmKeyMapItem::ptr, WM_keyconfig_update_tag(), and WM_operator_properties_free().
Referenced by remove_shortcut_func().
void WM_keymap_restore_item_to_default | ( | bContext * | C, |
wmKeyMap * | keymap, | ||
wmKeyMapItem * | kmi | ||
) |
Definition at line 1069 of file wm_keymap.c.
References wmWindowManager::addonconf, wmKeyMapItem::alt, BLI_strncpy(), wmKeyMapItem::ctrl, CTX_wm_manager(), PointerRNA::data, wmKeyMapItem::id, wmKeyMapItem::idname, wmKeyMap::idname, IDP_CopyProperty(), IDP_FreeProperty(), wmKeyConfig::keymaps, wmKeyMapItem::keymodifier, wmKeyMapItem::maptype, MEM_freeN(), NULL, wmKeyMapItem::oskey, wmKeyMapItem::properties, wmKeyMapItem::propvalue, wmKeyMapItem::ptr, wmKeyMap::regionid, wmKeyMapItem::shift, wmKeyMap::spaceid, wmKeyMapItem::type, wmKeyMapItem::val, WM_keyconfig_update_tag(), wm_keymap_addon_add(), wm_keymap_copy(), WM_keymap_free(), WM_keymap_item_find_id(), WM_keymap_list_find(), wm_keymap_preset(), and WM_keymap_properties_reset().
Definition at line 1128 of file wm_keymap.c.
References BLI_freelinkN(), CTX_wm_manager(), wmKeyMap::idname, NULL, wmKeyMap::regionid, wmKeyMap::spaceid, U, UserDef::user_keymaps, WM_keyconfig_update(), WM_keyconfig_update_tag(), WM_keymap_free(), and WM_keymap_list_find().
static int wm_keymap_test_and_clear_update | ( | wmKeyMap * | km | ) | [static] |
Definition at line 949 of file wm_keymap.c.
References ListBase::first, wmKeyMapItem::flag, wmKeyMap::flag, wmKeyMap::items, KEYMAP_UPDATE, KMI_UPDATE, wmKeyMapItem::next, and update().
Referenced by WM_keyconfig_update().
wmKeyMapItem* WM_keymap_verify_item | ( | wmKeyMap * | keymap, |
const char * | idname, | ||
int | type, | ||
int | val, | ||
int | modifier, | ||
int | keymodifier | ||
) |
Definition at line 334 of file wm_keymap.c.
References BLI_addtail(), BLI_strncpy(), ListBase::first, wmKeyMapItem::idname, wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN(), wmKeyMapItem::next, NULL, OP_MAX_TYPENAME, and wm_keymap_item_properties_set().
Referenced by ED_keymap_anim(), ED_keymap_armature(), ED_keymap_object(), ED_keymap_paint(), ED_keymap_screen(), ED_marker_keymap(), file_keymap(), info_keymap(), keymap_particle(), outliner_keymap(), view3d_keymap(), and wm_window_keymap().
wmKeyMap* WM_modalkeymap_add | ( | wmKeyConfig * | keyconf, |
const char * | idname, | ||
EnumPropertyItem * | items | ||
) |
Definition at line 663 of file wm_keymap.c.
References wmWindowManager::defaultconf, wmKeyMap::flag, G, wmKeyMap::idname, KEYMAP_MODAL, wmKeyConfig::keymaps, wmKeyMap::modal_items, wmKeyMap::poll, WM_keymap_find(), and WM_keymap_list_find().
Referenced by fly_modal_keymap(), gesture_border_modal_keymap(), gesture_circle_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), keymap_modal_set(), transform_modal_keymap(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewrotate_modal_keymap(), and viewzoom_modal_keymap().
wmKeyMapItem* WM_modalkeymap_add_item | ( | wmKeyMap * | km, |
int | type, | ||
int | val, | ||
int | modifier, | ||
int | keymodifier, | ||
int | value | ||
) |
Definition at line 696 of file wm_keymap.c.
References BLI_addtail(), wmKeyMap::items, keymap_event_set(), keymap_item_set_id(), MEM_callocN(), wmKeyMapItem::propvalue, and WM_keyconfig_update_tag().
Referenced by fly_modal_keymap(), gesture_border_modal_keymap(), gesture_circle_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), keymap_modal_set(), transform_modal_keymap(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewrotate_modal_keymap(), and viewzoom_modal_keymap().
void WM_modalkeymap_assign | ( | wmKeyMap * | km, |
const char * | opname | ||
) |
Definition at line 712 of file wm_keymap.c.
References wmOperatorType::modalkeymap, and WM_operatortype_find().
Referenced by fly_modal_keymap(), gesture_border_modal_keymap(), gesture_circle_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), keymap_modal_set(), transform_keymap_for_space(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewrotate_modal_keymap(), and viewzoom_modal_keymap().
wmKeyMap* WM_modalkeymap_get | ( | wmKeyConfig * | keyconf, |
const char * | idname | ||
) |
Definition at line 683 of file wm_keymap.c.
References ListBase::first, wmKeyMap::flag, wmKeyMap::idname, KEYMAP_MODAL, wmKeyConfig::keymaps, KMAP_MAX_NAME, and wmKeyMap::next.
Referenced by fly_modal_keymap(), gesture_border_modal_keymap(), gesture_circle_modal_keymap(), gesture_straightline_modal_keymap(), gesture_zoom_border_modal_keymap(), transform_modal_keymap(), viewdolly_modal_keymap(), viewmove_modal_keymap(), viewrotate_modal_keymap(), and viewzoom_modal_keymap().
int WM_KEYMAP_UPDATE = 0 [static] |
Definition at line 936 of file wm_keymap.c.