]> git.saurik.com Git - wxWidgets.git/commitdiff
graphics context additions (work in progress for cocoa integration) and merging graph...
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 5 Mar 2008 21:19:46 +0000 (21:19 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 5 Mar 2008 21:19:46 +0000 (21:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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
 // ----------------------------------------------------------------------------