2 * Don't #include any of the AppKit, etc stuff directly since it will
3 * pollute the X11 namespace.
6 #ifndef _XQ_SANITIZED_COCOA_H_
7 #define _XQ_SANITIZED_COCOA_H_
9 // QuickDraw in ApplicationServices has the following conflicts with
10 // the basic X server headers. Use QD_<name> to use the QuickDraw
11 // definition of any of these symbols, or the normal name for the
13 #define Cursor QD_Cursor
14 #define WindowPtr QD_WindowPtr
15 #define Picture QD_Picture
17 #define EventType HIT_EventType
19 #import <Cocoa/Cocoa.h>
20 #import <Foundation/Foundation.h>
29 #define __has_feature(x) 0 // Compatibility with non-clang compilers.
32 #ifndef NS_RETURNS_RETAINED
33 #if __has_feature(attribute_ns_returns_retained)
34 #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
36 #define NS_RETURNS_RETAINED
40 #ifndef NS_RETURNS_NOT_RETAINED
41 #if __has_feature(attribute_ns_returns_not_retained)
42 #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
44 #define NS_RETURNS_NOT_RETAINED
48 #ifndef CF_RETURNS_RETAINED
49 #if __has_feature(attribute_cf_returns_retained)
50 #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
52 #define CF_RETURNS_RETAINED
56 #ifndef CF_RETURNS_NOT_RETAINED
57 #if __has_feature(attribute_cf_returns_not_retained)
58 #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained))
60 #define CF_RETURNS_NOT_RETAINED
64 #endif /* _XQ_SANITIZED_COCOA_H_ */