aboutsummaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index b7cbe14..c6eb5fd 100644
--- a/src/window.c
+++ b/src/window.c
@@ -16,6 +16,7 @@ cherry_window_new(void)
w->dimension = cherry_dimension_new();
w->x = 0;
w->y = 0;
+ w->listener = NULL;
CherryApplication *app = cherry_application_get_running_app();
@@ -107,3 +108,10 @@ cherry_window_set_visible(CherryWindow *w, int visible)
XMapRaised(app->display, w->window_handler);
}
}
+
+void
+cherry_window_set_listener(CherryWindow *w,
+ int (*listener)(struct CherryWindow *, int))
+{
+ w->listener = listener;
+}