In REALplugin.h we have:
#if defined(COCOA) && COCOA
#if defined(__OBJC__)
#import <Cocoa/Cocoa.h>
#else
struct NSWindow;
struct NSView;
#endif
#define TARGET_COCOA 1
#endif
In REALplugin_deprecated.h we have:
[code]#if TARGET_COCOA
REAL_DEPRECATED NSView *REALGetControlHandle(REALcontrolInstance control);
#elif TARGET_WIN32
REAL_DEPRECATED HWND REALGetControlHandle(REALcontrolInstance control);
#elif X_WINDOW
REAL_DEPRECATED unsigned long REALGetControlHandle(REALcontrolInstance control);
#endif
#if TARGET_COCOA
REAL_DEPRECATED NSWindow *REALGetWindowHandle(REALwindow window);
#endif
[/code]
Can this be changed to:
#if defined(COCOA) && COCOA
#if defined(__OBJC__)
#import <Cocoa/Cocoa.h>
#define TARGET_COCOA 1
#endif
and
[code]#if TARGET_COCOA
#if defined(OBJC)
REAL_DEPRECATED NSView *REALGetControlHandle(REALcontrolInstance control);
#endif
#elif TARGET_WIN32
REAL_DEPRECATED HWND REALGetControlHandle(REALcontrolInstance control);
#elif X_WINDOW
REAL_DEPRECATED unsigned long REALGetControlHandle(REALcontrolInstance control);
#endif
#if TARGET_COCOA
#if defined(OBJC)
REAL_DEPRECATED NSWindow *REALGetWindowHandle(REALwindow window);
#endif
#endif
[/code]
If a c-file can only be compiled as C, not C++, the compiler will tell that in REALplugin_deprecated.h NSView* and NSWindow* need to be called with a tag. It suggests to precede the call with struct, but that does not cut it. Since NSView, NSWindow have no meaning without being in OBJC, why not make these changes?