summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/EventLoop/Cocoa')
m---------Swiften0
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.h20
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEvent.mm25
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEventLoop.h14
-rw-r--r--Swiften/EventLoop/Cocoa/CocoaEventLoop.mm21
5 files changed, 0 insertions, 80 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.h b/Swiften/EventLoop/Cocoa/CocoaEvent.h
deleted file mode 100644
index 0ff4453..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEvent.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-
-#include <Cocoa/Cocoa.h>
-
-namespace Swift {
- class Event;
- class CocoaEventLoop;
-}
-
-@interface CocoaEvent : NSObject {
- Swift::Event* event;
- Swift::CocoaEventLoop* eventLoop;
-}
-
-// Takes ownership of event
-- (id) initWithEvent: (Swift::Event*) e eventLoop: (Swift::CocoaEventLoop*) el;
-- (void) process;
-- (void) dealloc;
-
-@end
diff --git a/Swiften/EventLoop/Cocoa/CocoaEvent.mm b/Swiften/EventLoop/Cocoa/CocoaEvent.mm
deleted file mode 100644
index 8a90983..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEvent.mm
+++ /dev/null
@@ -1,25 +0,0 @@
-#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
diff --git a/Swiften/EventLoop/Cocoa/CocoaEventLoop.h b/Swiften/EventLoop/Cocoa/CocoaEventLoop.h
deleted file mode 100644
index ad8e456..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEventLoop.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-#include "Swiften/EventLoop/EventLoop.h"
-
-namespace Swift {
- class CocoaEventLoop : public EventLoop {
- public:
- CocoaEventLoop();
-
- virtual void post(const Event& event);
-
- using EventLoop::handleEvent;
- };
-}
diff --git a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm b/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm
deleted file mode 100644
index b90f3c6..0000000
--- a/Swiften/EventLoop/Cocoa/CocoaEventLoop.mm
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "Swiften/EventLoop/Cocoa/CocoaEventLoop.h"
-#include "Swiften/EventLoop/Cocoa/CocoaEvent.h"
-
-#pragma GCC diagnostic ignored "-Wold-style-cast"
-
-namespace Swift {
-
-CocoaEventLoop::CocoaEventLoop() {
-}
-
-void CocoaEventLoop::post(const Event& event) {
- Event* eventCopy = new Event(event);
- CocoaEvent* cocoaEvent = [[CocoaEvent alloc] initWithEvent: eventCopy eventLoop: this];
- [cocoaEvent
- performSelectorOnMainThread:@selector(process)
- withObject: nil
- waitUntilDone: NO];
- [cocoaEvent release];
-}
-
-}