diff options
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index aa380928082..7959c3d6f0b 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -242,11 +242,12 @@ void WM_window_set_dpi(const wmWindow *win); bool WM_stereo3d_enabled(struct wmWindow *win, bool only_fullscreen_test); -/* files */ +/* wm_files.c */ + void WM_file_autoexec_init(const char *filepath); bool WM_file_read(struct bContext *C, const char *filepath, struct ReportList *reports); -void WM_autosave_init(struct wmWindowManager *wm); -bool WM_recover_last_session(struct bContext *C, struct ReportList *reports); +void WM_file_autosave_init(struct wmWindowManager *wm); +bool WM_file_recover_last_session(struct bContext *C, struct ReportList *reports); void WM_file_tag_modified(void); /** @@ -615,7 +616,8 @@ bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, sho /** * For running operators with frozen context (modal handlers, menus). * - * \param store: Store settings for re-use. + * \param store: Store properties for re-use when an operator has finished + * (unless #PROP_SKIP_SAVE is set). * * \warning do not use this within an operator to call itself! T29537. */ @@ -644,19 +646,29 @@ bool WM_operator_is_repeat(const struct bContext *C, const struct wmOperator *op bool WM_operator_name_poll(struct bContext *C, const char *opstring); /** * Invokes operator in context. + * + * \param event: Optionally pass in an event to use when context uses one of the + * `WM_OP_INVOKE_*` values. When left unset the #wmWindow.eventstate will be used, + * this can cause problems for operators that read the events type - for example, + * storing the key that was pressed so as to be able to detect it's release. + * In these cases it's necessary to forward the current event being handled. */ int WM_operator_name_call_ptr(struct bContext *C, struct wmOperatorType *ot, wmOperatorCallContext context, - struct PointerRNA *properties); + struct PointerRNA *properties, + const wmEvent *event); +/** See #WM_operator_name_call_ptr */ int WM_operator_name_call(struct bContext *C, const char *opstring, wmOperatorCallContext context, - struct PointerRNA *properties); + struct PointerRNA *properties, + const wmEvent *event); int WM_operator_name_call_with_properties(struct bContext *C, const char *opstring, wmOperatorCallContext context, - struct IDProperty *properties); + struct IDProperty *properties, + const wmEvent *event); /** * Similar to #WM_operator_name_call called with #WM_OP_EXEC_DEFAULT context. * @@ -675,6 +687,7 @@ void WM_operator_name_call_ptr_with_depends_on_cursor(struct bContext *C, wmOperatorType *ot, wmOperatorCallContext opcontext, PointerRNA *properties, + const wmEvent *event, const char *drawstr); /** @@ -1453,6 +1466,9 @@ bool WM_cursor_test_motion_and_update(const int mval[2]) ATTR_NONNULL(1) ATTR_WA int WM_event_drag_threshold(const struct wmEvent *event); bool WM_event_drag_test(const struct wmEvent *event, const int prev_xy[2]); bool WM_event_drag_test_with_delta(const struct wmEvent *event, const int delta[2]); +void WM_event_drag_start_mval(const wmEvent *event, const ARegion *region, int r_mval[2]); +void WM_event_drag_start_mval_fl(const wmEvent *event, const ARegion *region, float r_mval[2]); +void WM_event_drag_start_xy(const wmEvent *event, int r_xy[2]); /** * Event map that takes preferences into account. |