From c918280fb5de6e6256cfd9a438b3578c04e3afc2 Mon Sep 17 00:00:00 2001 From: Krow Savcik Date: Tue, 6 Feb 2024 22:56:21 +0200 Subject: feautre: added undo/redo buttons The change history is kept in a ring buffer of definite size 2000. --- src/action.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/action.h') diff --git a/src/action.h b/src/action.h index 7405418..d9b7698 100644 --- a/src/action.h +++ b/src/action.h @@ -1,22 +1,25 @@ +typedef struct Action Action; + enum Actions_Types { + ACT_NULL, ACT_PIXELSCOLORS, -} - -struct act_pixcol { - long int p; /* Position */ - unsigned int c; /* Color */ }; -struct Action { - int type; - ActUnion act; +struct action_pixcol { + int x, y; /* Position */ + unsigned int c; /* Color */ }; struct ActionPixelsColors { long int cnt; - struct act_pixcol *pix; -} + struct actiton_pixcol *pix; +}; typedef union { - ActionPixelsColors px; + struct ActionPixelsColors px; } ActUnion; + +struct Action { + int type; + ActUnion act; +}; -- cgit v1.2.3