X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a4325e367b33940ec7aaf3c153246bf7c6ee268..8064223b7b1b3657363b7a635c381b9269d95e55:/src/mac/carbon/utilscocoa.mm?ds=sidebyside diff --git a/src/mac/carbon/utilscocoa.mm b/src/mac/carbon/utilscocoa.mm index b802837611..e2ac95f9e6 100644 --- a/src/mac/carbon/utilscocoa.mm +++ b/src/mac/carbon/utilscocoa.mm @@ -13,7 +13,11 @@ #include +#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 // ----------------------------------------------------------------------------