refactor(undo): switch oakundo to refcounted value handles, migrate consumers

- OakUndoCommand/OakUndoStack become neutral by-value handles
  {ctx, addref, release, abi_version}; a handle is a shared_ptr
  equivalent at the ABI level, internals untouched (box owns/observes
  flag; containers adopt, boxes created by factories own)
- oaknode command factories and undoable variants return/write value
  handles; timeline command classes hold value handles; task import
  take_command returns a value handle
- tests updated everywhere; suites green: oakundo 22, oaktimeline 117,
  oaktask 106, oaknode 96, oakrender 44, oakcodec 18, oakcommon 193,
  oakaudio 36
This commit is contained in:
2026-08-07 15:48:34 +08:00
parent da2ab512c6
commit 295ea1bfe5
41 changed files with 837 additions and 684 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ int oaktimeline_workarea_set_range(OakTimelineWorkArea *w, int in_num,
* The old range must be supplied by the caller (facade knows what it
* changed from). Owned; free with oakundo_command_free().
*/
OakUndoCommand *oaktimeline_workarea_set_range_command(
OakUndoCommand oaktimeline_workarea_set_range_command(
OakTimelineWorkArea *w, int in_num, int in_den, int out_num,
int out_den, int old_in_num, int old_in_den, int old_out_num,
int old_out_den);
@@ -68,7 +68,7 @@ OakUndoCommand *oaktimeline_workarea_set_range_command(
/**
* @brief Create a set-enabled command (olive::WorkareaSetEnabledCommand).
*/
OakUndoCommand *oaktimeline_workarea_set_enabled_command(
OakUndoCommand oaktimeline_workarea_set_enabled_command(
OakTimelineWorkArea *w, int enabled);
/**