[Bf-committers] Cocoa code for 10.6 and later

Ton Roosendaal ton at blender.org
Wed Jan 9 12:35:59 CET 2013


Hi,

I think I have it now.

For the record, the correct syntax for mapping new function calls in Cocoa is:

#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
@interface NSView (NSOpenGLSurfaceResolution)
- (BOOL)wantsBestResolutionOpenGLSurface;
- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag;
- (NSRect)convertRectToBacking:(NSRect)bounds;
@end
#endif

-Ton-

------------------------------------------------------------------------
Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands

On 8 Jan, 2013, at 20:19, Ton Roosendaal wrote:

> Hi,
> 
> I'm a noob in this Cocoa ObjC stuff... 
> 
> Previous commit from Jens makes compiling on 10.8 with 10.6 Deploy target the HiDPI feature not work.
> 
> This does work:
> 
> http://projects.blender.org/scm/viewvc.php/trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm?root=bf-blender&r1=53663&r2=53662&pathrev=53663
> 
> But now it doesnt compile in 10.6 natively.
> 
> I probably need two more changes;
> 
> Add this in the @interface section
> - (NSRect)convertRectToBacking;
> 
> And/or make the interface section like:
> @interface CocoaOpenGLView (NSOpenGLSurfaceResolution)
> 
> -Ton-
> 
> ------------------------------------------------------------------------
> Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
> Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list