summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/Cocoa/CocoaEvent.mm')
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.mm25
1 files changed, 25 insertions, 0 deletions
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.mm b/Swiften/EventLoop/Cocoa/CocoaEvent.mm
new file mode 100644
index 0000000..8a90983
--- /dev/null
+++ b/Swiften/EventLoop/Cocoa/CocoaEvent.mm
@@ -0,0 +1,25 @@
+#include "Swiften/EventLoop/Cocoa/CocoaEvent.h"
+#include "Swiften/EventLoop/Event.h"
+#include "Swiften/EventLoop/Cocoa/CocoaEventLoop.h"
+
+@implementation CocoaEvent
+
+- (id) initWithEvent: (Swift::Event*) e eventLoop: (Swift::CocoaEventLoop*) el {
+ self = [super init];
+ if (self != nil) {
+ event = e;
+ eventLoop = el;
+ }
+ return self;
+}
+
+- (void) process {
+ eventLoop->handleEvent(*event);
+}
+
+- (void) dealloc {
+ delete event;
+ [super dealloc];
+}
+
+@end