libbls-dev-list team mailing list archive
-
libbls-dev-list team
-
Mailing list archive
-
Message #00010
Proposed API change for bless_buffer_can_undo
In the current (0.2.0) API we have the 'bless_buffer_can_undo' and
'bless_buffer_can_redo' functions to get whether there are any actions
to undo/redo.
I think it would be better to change this API to replace the
aforementioned functions with something like 'bless_buffer_get_{undo,redo}_count'
which will return the number of actions that can currently be
undone/redone. It has the same functions signature as before but with
more capabilities.
It may be useful to later add a bless_buffer_get_undo_info() api
which will return information about the actions: eg
size_t n = bless_buffer_get_undo_count();
struct bless_buffer_action_info *info = malloc(n * sizeof (struct bless_buffer_action_info));
bless_buffer_get_undo_info(buf, &info, n);
--
Alexandros
Follow ups