]>
Commit | Line | Data |
---|---|---|
5c6eb3a8 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/mac/corefoundation/private.h | |
3 | // Purpose: Private declarations: as this header is only included by | |
4 | // wxWidgets itself, it may contain identifiers which don't start | |
5 | // with "wx". | |
6 | // Author: Stefan Csomor | |
7 | // Modified by: | |
8 | // Created: 1998-01-01 | |
9 | // RCS-ID: $Id: private.h 53819 2008-05-29 14:11:45Z SC $ | |
10 | // Copyright: (c) Stefan Csomor | |
11 | // Licence: wxWindows licence | |
12 | ///////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef _WX_PRIVATE_H_ | |
15 | #define _WX_PRIVATE_H_ | |
16 | ||
17 | #include "wx/defs.h" | |
18 | ||
19 | #include <CoreFoundation/CoreFoundation.h> | |
20 | ||
21 | #include "wx/mac/corefoundation/cfstring.h" | |
22 | #include "wx/mac/corefoundation/cfdataref.h" | |
23 | ||
24 | #if wxUSE_GUI | |
25 | ||
26 | #include <CoreGraphics/CoreGraphics.h> | |
27 | ||
28 | class WXDLLIMPEXP_CORE wxMacCGContextStateSaver | |
29 | { | |
30 | DECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver) | |
31 | ||
32 | public: | |
33 | wxMacCGContextStateSaver( CGContextRef cg ) | |
34 | { | |
35 | m_cg = cg; | |
36 | CGContextSaveGState( cg ); | |
37 | } | |
38 | ~wxMacCGContextStateSaver() | |
39 | { | |
40 | CGContextRestoreGState( m_cg ); | |
41 | } | |
42 | private: | |
43 | CGContextRef m_cg; | |
44 | }; | |
45 | ||
46 | ||
47 | // Quartz | |
48 | ||
49 | WXDLLIMPEXP_CORE CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap ); | |
50 | ||
51 | WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithCFData( CFDataRef data ); | |
52 | WXDLLIMPEXP_CORE CGDataConsumerRef wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data ); | |
53 | WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf ); | |
54 | ||
55 | CGColorSpaceRef WXDLLIMPEXP_CORE wxMacGetGenericRGBColorSpace(void); | |
56 | ||
57 | #endif // wxUSE_GUI | |
58 | ||
59 | //--------------------------------------------------------------------------- | |
60 | // cocoa bridging utilities | |
61 | //--------------------------------------------------------------------------- | |
62 | ||
63 | bool wxMacInitCocoa(); | |
64 | ||
65 | class WXDLLIMPEXP_CORE wxMacAutoreleasePool | |
66 | { | |
67 | public : | |
68 | wxMacAutoreleasePool(); | |
69 | ~wxMacAutoreleasePool(); | |
70 | private : | |
71 | void* m_pool; | |
72 | }; | |
73 | ||
74 | // NSObject | |
75 | ||
76 | void wxMacCocoaRelease( void* obj ); | |
77 | void wxMacCocoaAutorelease( void* obj ); | |
78 | void wxMacCocoaRetain( void* obj ); | |
79 | ||
80 | ||
81 | #endif | |
82 | // _WX_PRIVATE_H_ |