Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2009-11-16 23:50:02 +0300
committerMartin Poirier <theeth@yahoo.com>2009-11-16 23:50:02 +0300
commit98d4a56d5517be497c4628ad8bf67082d21767f2 (patch)
tree0e3c013e6d2d7dab2c78cef6cd08e0274762b320 /source/blender/windowmanager/intern/wm_keymap.c
parent6ed0686fccb9bf5804acfb4be25a4fccf9de9f83 (diff)
Fixing keymap export:
- Didn't support new userdef keymaps (new "active" rna function to get the active version of a keymap) - Didn't support modal keymaps (new "modal" param to add_keymap function, new "add_modal_item" function on keymaps (both functions now make sure the keymap is of the right type))
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index a9cace65206..0ab9eb83f96 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -263,7 +263,7 @@ wmKeyMap *WM_modalkeymap_get(wmKeyConfig *keyconf, char *idname)
}
-void WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value)
+wmKeyMapItem *WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value)
{
wmKeyMapItem *kmi= MEM_callocN(sizeof(wmKeyMapItem), "keymap entry");
@@ -271,6 +271,8 @@ void WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modifier, int
kmi->propvalue= value;
keymap_event_set(kmi, type, val, modifier, keymodifier);
+
+ return kmi;
}
void WM_modalkeymap_assign(wmKeyMap *km, char *opname)