]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/utilscocoa.mm
splitted wxApp docs in wxApp+wxAppConsole docs; fix the signature of the documented...
[wxWidgets.git] / src / mac / carbon / utilscocoa.mm
index b802837611c435db2252af9956775f948a540333..e2ac95f9e6e4ebc9d0b3ff129742c9d1648aed8a 100644 (file)
 
 #include <Cocoa/Cocoa.h>
 
+#ifdef __WXMAC__
 #include "wx/mac/private.h"
+#endif
+
+#ifdef __WXMAC__
 
 bool wxMacInitCocoa()
 {
@@ -32,6 +36,19 @@ wxMacAutoreleasePool::~wxMacAutoreleasePool()
     [(NSAutoreleasePool*)m_pool release];
 }
 
+#endif
+
+#ifdef __WXCOCOCA__
+
+CGContextRef wxMacGetContextFromCurrentNSContext()
+{
+    CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext]
+                                          graphicsPort];
+    return context;
+}
+
+#endif
+
 // ----------------------------------------------------------------------------
 // NSObject Utils
 // ----------------------------------------------------------------------------