Changeset 39206 in vbox for trunk/include/VBox
- Timestamp:
- Nov 4, 2011 3:16:16 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 74719
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxCocoa.h
r31665 r39206 1 1 /** @file 2 *3 2 * VBoxCocoa Helper 4 3 */ 5 4 6 5 /* 7 * Copyright (C) 2009-201 0Oracle Corporation6 * Copyright (C) 2009-2011 Oracle Corporation 8 7 * 9 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 25 24 */ 26 25 27 #ifndef __ VBoxCocoa_h__28 #define __ VBoxCocoa_h__26 #ifndef ___VBox_VBoxCocoa_h 27 #define ___VBox_VBoxCocoa_h 29 28 30 /* Macro which add a typedef of the given Cocoa class in an appropriate form29 /** Macro which add a typedef of the given Cocoa class in an appropriate form 31 30 * for the current context. This means void* in the C/CPP context and 32 31 * NSWhatever* in the ObjC/ObjCPP context. Use … … 35 34 * right type in the Cocoa context. */ 36 35 #ifdef __OBJC__ 37 # define ADD_COCOA_NATIVE_REF(CocoaClass) \38 @class CocoaClass; \39 typedef CocoaClass *Native##CocoaClass##Ref; \40 typedef const CocoaClass *ConstNative##CocoaClass##Ref41 #else /*__OBJC__ */42 # define ADD_COCOA_NATIVE_REF(CocoaClass) \43 typedef void *Native##CocoaClass##Ref; \44 typedef const void *ConstNative##CocoaClass##Ref45 #endif /* __OBJC__ */36 # define ADD_COCOA_NATIVE_REF(CocoaClass) \ 37 @class CocoaClass; \ 38 typedef CocoaClass *Native##CocoaClass##Ref; \ 39 typedef const CocoaClass *ConstNative##CocoaClass##Ref 40 #else /* !__OBJC__ */ 41 # define ADD_COCOA_NATIVE_REF(CocoaClass) \ 42 typedef void *Native##CocoaClass##Ref; \ 43 typedef const void *ConstNative##CocoaClass##Ref 44 #endif /* !__OBJC__ */ 46 45 47 /* Check for OBJC++ */ 46 47 /* 48 * Objective-C++ Helpers. 49 */ 48 50 #if defined(__OBJC__) && defined (__cplusplus) 49 51 50 52 /* Global includes */ 51 # import <Foundation/NSAutoreleasePool.h>53 # import <Foundation/NSAutoreleasePool.h> 52 54 53 /* Helper class for automatic creation & destroying of a cocoa auto release54 pool. */55 /** Helper class for automatic creation & destroying of a cocoa auto release 56 * pool. */ 55 57 class CocoaAutoreleasePool 56 58 { … … 69 71 }; 70 72 71 #endif /* __OBJC__ */73 #endif /* __OBJC__ && __cplusplus */ 72 74 73 #endif /* __VBoxCocoa_h__*/75 #endif /* !___VBox_VBoxCocoa_h */ 74 76
Note:
See TracChangeset
for help on using the changeset viewer.