summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Application/CocoaApplication.mm')
-rw-r--r--Swiften/Application/CocoaApplication.mm24
1 files changed, 24 insertions, 0 deletions
diff --git a/Swiften/Application/CocoaApplication.mm b/Swiften/Application/CocoaApplication.mm
new file mode 100644
index 0000000..c5b3335
--- /dev/null
+++ b/Swiften/Application/CocoaApplication.mm
@@ -0,0 +1,24 @@
+#include "Swiften/Application/CocoaApplication.h"
+
+#include <AppKit/AppKit.h>
+#include <Cocoa/Cocoa.h>
+
+namespace Swift {
+
+class CocoaApplication::Private {
+ public:
+ NSAutoreleasePool* autoReleasePool_;
+};
+
+CocoaApplication::CocoaApplication() {
+ d = new CocoaApplication::Private();
+ NSApplicationLoad();
+ d->autoReleasePool_ = [[NSAutoreleasePool alloc] init];
+}
+
+CocoaApplication::~CocoaApplication() {
+ [d->autoReleasePool_ release];
+ delete d;
+}
+
+}