Blender V2.61 - r43446
|
#include "DNA_windowmanager_types.h"
Go to the source code of this file.
Functions | |
wmKeyConfig * | WM_keyconfig_new (struct wmWindowManager *wm, const char *idname) |
wmKeyConfig * | WM_keyconfig_new_user (struct wmWindowManager *wm, const char *idname) |
void | WM_keyconfig_remove (struct wmWindowManager *wm, struct wmKeyConfig *keyconf) |
void | WM_keyconfig_free (struct wmKeyConfig *keyconf) |
void | WM_keyconfig_set_active (struct wmWindowManager *wm, const char *idname) |
void | WM_keyconfig_update (struct wmWindowManager *wm) |
void | WM_keyconfig_update_tag (struct wmKeyMap *keymap, struct wmKeyMapItem *kmi) |
void | WM_keymap_init (struct bContext *C) |
void | WM_keymap_free (struct wmKeyMap *keymap) |
wmKeyMapItem * | WM_keymap_verify_item (struct wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier) |
wmKeyMapItem * | WM_keymap_add_item (struct wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier) |
wmKeyMapItem * | WM_keymap_add_menu (struct wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier) |
void | WM_keymap_remove_item (struct wmKeyMap *keymap, struct wmKeyMapItem *kmi) |
char * | WM_keymap_item_to_string (wmKeyMapItem *kmi, char *str, int len) |
wmKeyMap * | WM_keymap_list_find (ListBase *lb, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_find (struct wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_find_all (const struct bContext *C, const char *idname, int spaceid, int regionid) |
wmKeyMap * | WM_keymap_active (struct wmWindowManager *wm, struct wmKeyMap *keymap) |
wmKeyMap * | WM_keymap_guess_opname (const struct bContext *C, const char *opname) |
wmKeyMapItem * | WM_keymap_item_find_id (struct wmKeyMap *keymap, int id) |
int | WM_keymap_item_compare (struct wmKeyMapItem *k1, struct wmKeyMapItem *k2) |
wmKeyMap * | WM_modalkeymap_add (struct wmKeyConfig *keyconf, const char *idname, struct EnumPropertyItem *items) |
wmKeyMap * | WM_modalkeymap_get (struct wmKeyConfig *keyconf, const char *idname) |
wmKeyMapItem * | WM_modalkeymap_add_item (struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value) |
void | WM_modalkeymap_assign (struct wmKeyMap *km, const char *opname) |
void | WM_keymap_restore_to_default (struct wmKeyMap *keymap, struct bContext *C) |
void | WM_keymap_properties_reset (struct wmKeyMapItem *kmi, struct IDProperty *properties) |
void | WM_keymap_restore_item_to_default (struct bContext *C, struct wmKeyMap *keymap, struct wmKeyMapItem *kmi) |
const char * | WM_key_event_string (short type) |
int | WM_key_event_operator_id (const struct bContext *C, const char *opname, int opcontext, struct IDProperty *properties, int hotkey, struct wmKeyMap **keymap_r) |
char * | WM_key_event_operator_string (const struct bContext *C, const char *opname, int opcontext, struct IDProperty *properties, const short sloppy, char *str, int len) |
Definition in file WM_keymap.h.
int WM_key_event_operator_id | ( | const struct bContext * | C, |
const char * | opname, | ||
int | opcontext, | ||
struct IDProperty * | properties, | ||
int | hotkey, | ||
struct wmKeyMap ** | keymap_r | ||
) |
char* WM_key_event_operator_string | ( | const struct bContext * | C, |
const char * | opname, | ||
int | opcontext, | ||
struct IDProperty * | properties, | ||
const short | sloppy, | ||
char * | str, | ||
int | len | ||
) |
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().
void WM_keyconfig_free | ( | struct 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().
wmKeyConfig* WM_keyconfig_new | ( | struct 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 | ( | struct 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 | ( | struct wmWindowManager * | wm, |
struct 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 | ( | struct 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 | ( | struct 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 | ( | struct wmKeyMap * | keymap, |
struct 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 | ( | struct wmWindowManager * | wm, |
struct 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 | ( | struct 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 | ( | struct 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().
wmKeyMap* WM_keymap_find | ( | struct 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().
wmKeyMap* WM_keymap_find_all | ( | const struct bContext * | C, |
const char * | idname, | ||
int | spaceid, | ||
int | regionid | ||
) |
void WM_keymap_free | ( | struct wmKeyMap * | keymap | ) |
Definition at line 291 of file wm_keymap.c.
References BLI_freelistN(), wmKeyMap::diff_items, ListBase::first, wmKeyMap::items, wmKeyMapItem::next, wmKeyMapDiffItem::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().
void WM_keymap_init | ( | struct bContext * | C | ) |
Definition at line 207 of file wm.c.
References wmWindowManager::addonconf, CTX_py_init_get(), CTX_wm_manager(), wmWindowManager::defaultconf, ED_spacetypes_keymap(), wmKeyConfig::flag, wmWindowManager::initialized, KEYCONF_INIT_DEFAULT, NULL, wmWindowManager::userconf, WM_INIT_KEYMAP, WM_keyconfig_new(), WM_keyconfig_update(), WM_keyconfig_update_tag(), and wm_window_keymap().
Referenced by main(), and WM_check().
int WM_keymap_item_compare | ( | struct wmKeyMapItem * | k1, |
struct 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().
wmKeyMapItem* WM_keymap_item_find_id | ( | struct 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().
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().
void WM_keymap_properties_reset | ( | struct 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 | ( | struct wmKeyMap * | keymap, |
struct 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 | ( | struct bContext * | C, |
struct wmKeyMap * | keymap, | ||
struct 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().
wmKeyMapItem* WM_keymap_verify_item | ( | struct 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 | ( | struct wmKeyConfig * | keyconf, |
const char * | idname, | ||
struct 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 | ( | struct 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 | ( | struct 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 | ( | struct 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().