aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-21 23:32:21 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-21 23:32:21 +0200
commit76f67e43cbf20122be7e82adecd35a316afcc38d (patch)
treed6494f0dcd9bfa3dff6827ba48c7823674f60fca /src
parent3312c849325d171984c9d32a0f093cd6a2e330c6 (diff)
downloadcherry-76f67e43cbf20122be7e82adecd35a316afcc38d.tar.gz
cherry-76f67e43cbf20122be7e82adecd35a316afcc38d.zip
Change the signature for a cherry event
Diffstat (limited to 'src')
-rw-r--r--src/window.c2
-rw-r--r--src/window.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index 131244f..2d14292 100644
--- a/src/window.c
+++ b/src/window.c
@@ -147,7 +147,7 @@ cherry_window_set_visible(CherryWindow *w, int visible)
void
cherry_window_set_listener(CherryWindow *w,
- int (*listener)(struct CherryWindow *, int))
+ int (*listener)(struct CherryWindow *, CherryEvent))
{
w->listener = listener;
}
diff --git a/src/window.h b/src/window.h
index b3cfd19..6906c04 100644
--- a/src/window.h
+++ b/src/window.h
@@ -4,6 +4,7 @@
#define __CHERRY_WINDOW_H__
#include "dimension.h"
+#include "event.h"
typedef struct CherryWindow {
char *title;
@@ -15,7 +16,7 @@ typedef struct CherryWindow {
Window window_handler;
GC gc;
- int (*listener)(struct CherryWindow *, int);
+ int (*listener)(struct CherryWindow *, CherryEvent);
} CherryWindow;
CherryWindow *cherry_window_new(void);
@@ -25,6 +26,6 @@ void cherry_window_set_title(CherryWindow *, char *);
void cherry_window_set_dimension(CherryWindow *, int, int);
void cherry_window_set_position(CherryWindow *, int, int);
void cherry_window_set_visible(CherryWindow *, int);
-void cherry_window_set_listener(CherryWindow *, int (*listener)(struct CherryWindow *, int));
+void cherry_window_set_listener(CherryWindow *, int (*listener)(struct CherryWindow *, CherryEvent));
#endif /* __CHERRY_WINDOW_H__ */