diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_undo_system.h')
-rw-r--r-- | source/blender/blenkernel/BKE_undo_system.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_undo_system.h b/source/blender/blenkernel/BKE_undo_system.h index 4c3b21482ea..620496864f5 100644 --- a/source/blender/blenkernel/BKE_undo_system.h +++ b/source/blender/blenkernel/BKE_undo_system.h @@ -96,6 +96,12 @@ typedef struct UndoStep { /* Over alloc 'type->struct_size'. */ } UndoStep; +typedef enum eUndoStepDir { + STEP_REDO = 1, + STEP_UNDO = -1, + STEP_INVALID = 0, +} eUndoStepDir; + typedef enum UndoPushReturn { UNDO_PUSH_RET_FAILURE = 0, UNDO_PUSH_RET_SUCCESS = (1 << 0), @@ -127,7 +133,7 @@ typedef struct UndoType { bool (*step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us); void (*step_decode)( - struct bContext *C, struct Main *bmain, UndoStep *us, int dir, bool is_final); + struct bContext *C, struct Main *bmain, UndoStep *us, const eUndoStepDir dir, bool is_final); /** * \note When freeing all steps, @@ -203,9 +209,9 @@ UndoStep *BKE_undosys_step_find_by_name_with_type(UndoStack *ustack, UndoStep *BKE_undosys_step_find_by_type(UndoStack *ustack, const UndoType *ut); UndoStep *BKE_undosys_step_find_by_name(UndoStack *ustack, const char *name); -int BKE_undosys_step_calc_direction(const UndoStack *ustack, - const UndoStep *us_target, - const UndoStep *us_reference); +eUndoStepDir BKE_undosys_step_calc_direction(const UndoStack *ustack, + const UndoStep *us_target, + const UndoStep *us_reference); bool BKE_undosys_step_load_data_ex(UndoStack *ustack, struct bContext *C, |