diff --git a/include/application.h b/include/application.h
index 76e391b..b425917 100644
--- a/include/application.h
+++ b/include/application.h
@@ -10,6 +10,9 @@ void application_finish(struct swappy_state *state);
void keypress_handler(GtkWidget *widget, GdkEventKey *event,
struct swappy_state *state);
+void undo_clicked_handler(GtkWidget *widget, struct swappy_state *state);
+void redo_clicked_handler(GtkWidget *widget, struct swappy_state *state);
+
gboolean draw_area_handler(GtkWidget *widget, cairo_t *cr,
struct swappy_state *state);
gboolean draw_area_configure_handler(GtkWidget *widget,
diff --git a/include/paint.h b/include/paint.h
index 844b213..0f63912 100644
--- a/include/paint.h
+++ b/include/paint.h
@@ -9,3 +9,4 @@ void paint_commit_temporary(struct swappy_state *state);
void paint_free(gpointer data);
void paint_free_all(struct swappy_state *state);
+void paint_free_list(GSList **list);
diff --git a/include/swappy.h b/include/swappy.h
index aa52e28..26cdc2b 100644
--- a/include/swappy.h
+++ b/include/swappy.h
@@ -64,7 +64,15 @@ struct swappy_box {
int32_t height;
};
-struct swappy_state_ui_painting {
+struct swappy_state_ui {
+ GtkWindow *window;
+ GtkWidget *area;
+
+ // Undo / Redo
+ GtkButton *undo;
+ GtkButton *redo;
+
+ // Painting Area
GtkRadioButton *brush;
GtkRadioButton *text;
GtkRadioButton *rectangle;
@@ -76,10 +84,7 @@ struct swappy_state {
GResource *resource;
GtkApplication *app;
- GtkWindow *window;
- GtkWidget *area;
-
- struct swappy_state_ui_painting *popover;
+ struct swappy_state_ui *ui;
cairo_surface_t *cairo_surface;
@@ -105,6 +110,7 @@ struct swappy_state {
struct swappy_box *geometry;
GSList *paints;
+ GSList *redo_paints;
struct swappy_paint *temp_paint;
int argc;
diff --git a/res/style/popover.css b/res/style/swappy.css
similarity index 100%
rename from res/style/popover.css
rename to res/style/swappy.css
diff --git a/res/swappy.gresource.xml b/res/swappy.gresource.xml
index 7ffacae..2a313ed 100644
--- a/res/swappy.gresource.xml
+++ b/res/swappy.gresource.xml
@@ -1,7 +1,7 @@
- style/popover.css
+ style/swappy.css
swappy.ui
\ No newline at end of file
diff --git a/res/swappy.ui b/res/swappy.ui
index c556d31..20659f7 100644
--- a/res/swappy.ui
+++ b/res/swappy.ui
@@ -2,12 +2,13 @@
-