aboutsummaryrefslogtreecommitdiff
path: root/src/action.h
diff options
context:
space:
mode:
authorKrow Savcik <krow@savcik.xyz>2024-02-06 22:56:21 +0200
committerKrow Savcik <krow@savcik.xyz>2024-02-06 22:56:21 +0200
commitc918280fb5de6e6256cfd9a438b3578c04e3afc2 (patch)
treeba72e1464c487b61d4376647769c93cdbccf7a21 /src/action.h
parent009a890482edfb2247da1d69b86f4d193699e3cb (diff)
feautre: added undo/redo buttons
The change history is kept in a ring buffer of definite size 2000.
Diffstat (limited to 'src/action.h')
-rw-r--r--src/action.h25
1 files changed, 14 insertions, 11 deletions
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;
+};