graphics context additions (work in progress for cocoa integration) and merging graphics bitmap additions from Kevin O.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2008-03-05 21:19:46 +00:00
parent 6639b056d6
commit f4a7b7a39b

View File

@ -13,7 +13,11 @@
#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
// ----------------------------------------------------------------------------