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:
authorCampbell Barton <ideasman42@gmail.com>2019-02-02 07:14:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-02 07:23:55 +0300
commit141c6073ca39f0d59c67ebef89b094395b903a4a (patch)
tree372d9246e92117f7d74ef7688848b28710e906fd /source/blender/windowmanager/WM_api.h
parent99b8eef6a534c2c9846b48736cb9eb007c120ec7 (diff)
WM: Event simulation support for Python
This feature is intended only for testing, to automate simulating user input. - Enabled by '--enable-event-simulate'. - Disables handling all real input events. - Access by calling `Window.event_simulate(..)` - Disabling `bpy.app.use_event_simulate` to allow handling real events (can only disable). Currently only mouse & keyboard events work well, NDOF, IME... etc could be added as needed. See D4286 for example usage.
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 613374dc1df..7d8f5c1c0b2 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -616,6 +616,9 @@ bool WM_event_is_tablet(const struct wmEvent *event);
bool WM_event_is_ime_switch(const struct wmEvent *event);
#endif
+/* For testing only 'G_FLAG_EVENT_SIMULATE' */
+struct wmEvent *WM_event_add_simulate(struct wmWindow *win, const struct wmEvent *event_to_add);
+
const char *WM_window_cursor_keymap_status_get(const struct wmWindow *win, int button_index, int type_index);
void WM_window_cursor_keymap_status_refresh(struct bContext *C, struct wmWindow *win);