diff options
Diffstat (limited to 'src/canvas.h')
-rw-r--r-- | src/canvas.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/canvas.h b/src/canvas.h index 104f130..bc96ab9 100644 --- a/src/canvas.h +++ b/src/canvas.h @@ -1,5 +1,10 @@ +/* Should include action.h before it */ + +/* TODO: move to config.h */ +#define HISTLENGTH 2000 + struct Layer { - unsigned int *pix; + unsigned int *pix; }; struct Canvas { @@ -10,8 +15,11 @@ struct Canvas { struct Layer **layers; int x, y; void *back, *pres, *half_pres; - void *temp_pix; + struct action_pixcol *temp_pix; + int temp_cnt; uint *pres_pix; + Action history[HISTLENGTH]; + int hist_s, hist_e, hist_i, hist_isend; }; typedef struct Layer Layer; @@ -38,3 +46,5 @@ void canvas_move_y(Canvas *, long int); void canvas_refresh(Canvas *); unsigned char canvas_save(Canvas *, const char *, short int); unsigned char canvas_export_png(Canvas *, const char *, void *); +void action_undo(Canvas *); +void action_redo(Canvas *); |