2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version 2
5 * of the License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 /** \file \ingroup editors
23 #include "BLI_compiler_attrs.h"
31 struct wmOperatorType;
34 void ED_undo_push(struct bContext *C, const char *str);
35 void ED_undo_push_op(struct bContext *C, struct wmOperator *op);
36 void ED_undo_grouped_push(struct bContext *C, const char *str);
37 void ED_undo_grouped_push_op(struct bContext *C, struct wmOperator *op);
38 void ED_undo_pop_op(struct bContext *C, struct wmOperator *op);
39 void ED_undo_pop(struct bContext *C);
40 void ED_undo_redo(struct bContext *C);
41 void ED_OT_undo(struct wmOperatorType *ot);
42 void ED_OT_undo_push(struct wmOperatorType *ot);
43 void ED_OT_redo(struct wmOperatorType *ot);
44 void ED_OT_undo_redo(struct wmOperatorType *ot);
45 void ED_OT_undo_history(struct wmOperatorType *ot);
47 int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op);
48 /* convenience since UI callbacks use this mostly*/
49 void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused);
50 void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused);
52 bool ED_undo_is_valid(const struct bContext *C, const char *undoname);
54 bool ED_undo_is_memfile_compatible(const struct bContext *C);
56 void ED_undo_object_editmode_restore_helper(
58 struct Object **object_array, uint object_array_len, uint object_array_stride);
60 struct UndoStack *ED_undo_stack_get(void);
63 void ED_undo_object_set_active_or_warn(
64 struct ViewLayer *view_layer, struct Object *ob, const char *info, struct CLG_LogRef *log);
66 /* undo_system_types.c */
67 void ED_undosys_type_init(void);
68 void ED_undosys_type_free(void);
71 struct MemFile *ED_undosys_stack_memfile_get_active(struct UndoStack *ustack);
73 #endif /* __ED_UNDO_H__ */