events: create an EventHandlerData struct

It simplifies the EventHandlerFunc creation and allows to insert user's
data.
This commit is contained in:
Pierre Tachoire
2024-06-19 17:03:40 +02:00
parent 522b293149
commit 1924f136c6
4 changed files with 107 additions and 59 deletions

View File

@@ -73,9 +73,9 @@ pub const EventTarget = struct {
self,
alloc,
eventType,
cbk,
capture orelse false,
EventHandler,
.{ .cbk = cbk },
capture orelse false,
);
}