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
path: root/source
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2016-02-29 19:40:19 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-02-29 19:46:22 +0300
commit84b1d67b64c507c31d5020eabbf8742d294de01e (patch)
treee85cb2425e39a063ed137b14bcdb434f2d307722 /source
parente61588c5a5446fe8b0d7c974c7619268d5900031 (diff)
Add User Interface keymap (no items yet)
Needed to allow modal UI keymaps, but I'm sure we'll need this more often in future. First item will be modal eyedropper keymap coming in a following commit.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/include/UI_interface.h3
-rw-r--r--source/blender/editors/interface/interface_ops.c10
-rw-r--r--source/blender/editors/space_api/spacetypes.c1
3 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 11dc88d615d..051400b5e3f 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -62,6 +62,7 @@ struct uiFontStyle;
struct uiWidgetColors;
struct Image;
struct ImageUser;
+struct wmKeyConfig;
struct wmOperatorType;
struct uiWidgetColors;
struct MTex;
@@ -1004,6 +1005,8 @@ typedef struct uiDragColorHandle {
} uiDragColorHandle;
void ED_button_operatortypes(void);
+void ED_keymap_ui(struct wmKeyConfig *keyconf);
+
void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop);
int UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event);
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index c707ac9eb52..5fa77352b52 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -1108,3 +1108,13 @@ void ED_button_operatortypes(void)
WM_operatortype_append(UI_OT_eyedropper_id);
WM_operatortype_append(UI_OT_eyedropper_depth);
}
+
+/**
+ * \brief User Interface Keymap
+ *
+ * For now only modal maps here, since UI uses special ui-handlers instead of operators.
+ */
+void ED_keymap_ui(wmKeyConfig *keyconf)
+{
+ WM_keymap_find(keyconf, "User Interface", 0, 0);
+}
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index 590bf5d702e..4cb6c9d8fa1 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -188,6 +188,7 @@ void ED_spacetypes_keymap(wmKeyConfig *keyconf)
ED_keymap_marker(keyconf);
ED_keymap_view2d(keyconf);
+ ED_keymap_ui(keyconf);
spacetypes = BKE_spacetypes_list();
for (stype = spacetypes->first; stype; stype = stype->next) {