blob: ba7388439933ace754b1e80ac83813520bb29cdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#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];
}
}
|