[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53029] trunk/blender: OSX/availability: use of the numerical value instead of the symbol in the #if MAC_OS_X_VERSION_MIN_REQUIRED comparison clause : If the code is loaded on an older system that does not include the symbol definition , the comparison still works
jens verwiebe
info at jensverwiebe.de
Sat Dec 15 12:15:08 CET 2012
Revision: 53029
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53029
Author: jensverwiebe
Date: 2012-12-15 11:15:05 +0000 (Sat, 15 Dec 2012)
Log Message:
-----------
OSX/availability: use of the numerical value instead of the symbol in the #if MAC_OS_X_VERSION_MIN_REQUIRED comparison clause: If the code is loaded on an older system that does not include the symbol definition, the comparison still works
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
trunk/blender/intern/itasc/kdl/chain.hpp
trunk/blender/intern/itasc/kdl/tree.hpp
trunk/blender/source/blender/editors/space_file/fsmenu.c
trunk/blender/source/blender/quicktime/apple/qtkit_export.m
trunk/blender/source/blender/quicktime/quicktime_export.h
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2012-12-15 11:00:57 UTC (rev 53028)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2012-12-15 11:15:05 UTC (rev 53029)
@@ -56,7 +56,7 @@
#include "AssertMacros.h"
#pragma mark KeyMap, mouse converters
-#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1040
/* Keycodes not defined in Tiger */
/*
* Summary:
@@ -360,7 +360,7 @@
return (GHOST_TKey) (recvChar - 'a' + GHOST_kKeyA);
}
else {
-#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1040
KeyboardLayoutRef keyLayout;
UCKeyboardLayout *uchrData;
@@ -423,7 +423,7 @@
#pragma mark defines for 10.6 api not documented in 10.5
-#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1040
enum {
/* The following event types are available on some hardware on 10.5.2 and later */
NSEventTypeGesture = 29,
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm 2012-12-15 11:00:57 UTC (rev 53028)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm 2012-12-15 11:15:05 UTC (rev 53029)
@@ -28,7 +28,7 @@
#include <Cocoa/Cocoa.h>
-#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1050
//Use of the SetSystemUIMode function (64bit compatible)
#include <Carbon/Carbon.h>
#endif
@@ -58,7 +58,7 @@
extern void wm_draw_update(bContext *C);
};*/
@interface CocoaWindowDelegate : NSObject
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
<NSWindowDelegate>
#endif
{
@@ -115,12 +115,12 @@
- (void)windowDidResize:(NSNotification *)notification
{
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
//if (![[notification object] inLiveResize]) {
//Send event only once, at end of resize operation (when user has released mouse button)
#endif
systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, associatedWindow);
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
//}
#endif
/* Live resize ugly patch. Needed because live resize runs in a modal loop, not letting main loop run
@@ -287,7 +287,7 @@
}
}
-#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= 1040
//Cmd+key are handled differently before 10.5
- (BOOL)performKeyEquivalent:(NSEvent *)theEvent
{
@@ -578,7 +578,7 @@
setDrawingContextType(type);
updateDrawingContext();
activateDrawingContext();
-#if defined(MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7) // retina support started with 10.7.4 afaik
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 // retina support started with 10.7.4 afaik
if (m_systemCocoa->m_nativePixel) {
[m_openGLView setWantsBestResolutionOpenGLSurface:YES];
NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]];
@@ -928,7 +928,7 @@
* doesn't know view/window difference. */
m_fullScreen = true;
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
//10.6 provides Cocoa functions to autoshow menu bar, and to change a window style
//Hide menu & dock if needed
if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]]) {
@@ -987,7 +987,7 @@
m_fullScreen = false;
//Exit fullscreen
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
//Show again menu & dock if needed
if ([[m_window screen] isEqual:[NSScreen mainScreen]]) {
[NSApp setPresentationOptions:NSApplicationPresentationDefault];
Modified: trunk/blender/intern/itasc/kdl/chain.hpp
===================================================================
--- trunk/blender/intern/itasc/kdl/chain.hpp 2012-12-15 11:00:57 UTC (rev 53028)
+++ trunk/blender/intern/itasc/kdl/chain.hpp 2012-12-15 11:15:05 UTC (rev 53029)
@@ -36,7 +36,7 @@
class Chain {
private:
#if defined(__APPLE__)
-# if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
+# if MAC_OS_X_VERSION_MIN_REQUIRED <= 1050
std::vector<Segment> segments;
# else
// Eigen allocator is needed for alignment of Eigen data types
Modified: trunk/blender/intern/itasc/kdl/tree.hpp
===================================================================
--- trunk/blender/intern/itasc/kdl/tree.hpp 2012-12-15 11:00:57 UTC (rev 53028)
+++ trunk/blender/intern/itasc/kdl/tree.hpp 2012-12-15 11:15:05 UTC (rev 53029)
@@ -28,7 +28,7 @@
#include <string>
#include <map>
#if defined(__APPLE__)
-# if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
+# if MAC_OS_X_VERSION_MIN_REQUIRED <= 1050
//no include
# else
# include <Eigen/Core>
@@ -42,7 +42,7 @@
//Forward declaration
class TreeElement;
#if defined(__APPLE__)
-# if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
+# if MAC_OS_X_VERSION_MIN_REQUIRED <= 1050
typedef std::map<std::string,TreeElement> SegmentMap;
# else
// Eigen allocator is needed for alignment of Eigen data types
Modified: trunk/blender/source/blender/editors/space_file/fsmenu.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/fsmenu.c 2012-12-15 11:00:57 UTC (rev 53028)
+++ trunk/blender/source/blender/editors/space_file/fsmenu.c 2012-12-15 11:15:05 UTC (rev 53029)
@@ -350,7 +350,7 @@
#else
#ifdef __APPLE__
{
-#if (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4)
+#if (MAC_OS_X_VERSION_MIN_REQUIRED <= 1040)
OSErr err = noErr;
int i;
const char *home;
Modified: trunk/blender/source/blender/quicktime/apple/qtkit_export.m
===================================================================
--- trunk/blender/source/blender/quicktime/apple/qtkit_export.m 2012-12-15 11:00:57 UTC (rev 53028)
+++ trunk/blender/source/blender/quicktime/apple/qtkit_export.m 2012-12-15 11:15:05 UTC (rev 53029)
@@ -61,7 +61,7 @@
#import <QTKit/QTKit.h>
#include <AudioToolbox/AudioToolbox.h>
-#if (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4) || !__LP64__
+#if (MAC_OS_X_VERSION_MIN_REQUIRED <= 1040) || !__LP64__
#error 64 bit build & OSX 10.5 minimum are needed for QTKit
#endif
Modified: trunk/blender/source/blender/quicktime/quicktime_export.h
===================================================================
--- trunk/blender/source/blender/quicktime/quicktime_export.h 2012-12-15 11:00:57 UTC (rev 53028)
+++ trunk/blender/source/blender/quicktime/quicktime_export.h 2012-12-15 11:15:05 UTC (rev 53029)
@@ -87,7 +87,7 @@
-#if (defined(USE_QTKIT) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && __LP64__)
+#if (defined(USE_QTKIT) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 && __LP64__)
//Include the quicktime codec types constants that are missing in QTKitDefines.h
enum {
kRawCodecType = 'raw ',
More information about the Bf-blender-cvs
mailing list