Files
oak-editor/src/undo/c_api/commandhandle.h
T
Mike-Solar c50017127b refactor(undo): de-Qt oakundo and wrap it in a pure C ABI
- strip QAbstractItemModel/QAction/signals-slots from UndoStack (UI
  concerns belong to the app layer), index_changed becomes a
  std::function callback
- decouple UndoCommand from Project via an optional modified-flag
  callback pair
- add pure C ABI in include/undo + src/undo/c_api (oakundo_ prefix,
  vtable-based command wrapper, OAKUNDO_E_* error codes)
- fix three engine-side defects: jump(0) infinite loop,
  MultiUndoCommand child leak, push_pre_executed not undoable
- add gtest suites (22 cases) and a standalone build driver
2026-08-05 18:02:24 +08:00

42 lines
1.2 KiB
C

/***
Oak Video Editor - Non-Linear Video Editor
Copyright (C) 2026 Oak Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef OAK_UNDO_COMMANDHANDLE_H
#define OAK_UNDO_COMMANDHANDLE_H
#include "undo/undocommand.h"
#include "../src/undocommand.h"
/**
* @brief Internal layout of the OakUndoCommand handle, shared between the
* c_api translation units.
*
* `owned` is true for handles created by oakundo_command_init() /
* oakundo_command_init_multi() and false for borrowed wrappers handed out
* by oakundo_command_multi_child().
*/
struct OakUndoCommand {
olive::UndoCommand *command;
bool owned;
};
#endif // OAK_UNDO_COMMANDHANDLE_H