[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24067] branches/bmesh/blender: files missing from recent merge
Joseph Eagar
joeedh at gmail.com
Sat Oct 24 07:43:28 CEST 2009
Revision: 24067
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24067
Author: joeedh
Date: 2009-10-24 07:43:27 +0200 (Sat, 24 Oct 2009)
Log Message:
-----------
files missing from recent merge
Modified Paths:
--------------
branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
Added Paths:
-----------
branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
branches/bmesh/blender/intern/ghost/intern/GHOST_SystemCocoa.h
branches/bmesh/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
branches/bmesh/blender/intern/ghost/intern/GHOST_WindowCocoa.h
branches/bmesh/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
branches/bmesh/blender/source/blender/gpu/gpu_buffers.h
branches/bmesh/blender/source/blender/gpu/intern/gpu_buffers.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_action_api.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_image_api.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_material_api.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_pose_api.c
branches/bmesh/blender/source/gameengine/Converter/BL_ArmatureActuator.cpp
branches/bmesh/blender/source/gameengine/Converter/BL_ArmatureActuator.h
branches/bmesh/blender/source/gameengine/Converter/BL_ArmatureChannel.cpp
branches/bmesh/blender/source/gameengine/Converter/BL_ArmatureChannel.h
branches/bmesh/blender/source/gameengine/Converter/BL_ArmatureConstraint.cpp
branches/bmesh/blender/source/gameengine/Converter/BL_ArmatureConstraint.h
branches/bmesh/blender/source/gameengine/GameLogic/SCA_BasicEventManager.cpp
branches/bmesh/blender/source/gameengine/GameLogic/SCA_BasicEventManager.h
branches/bmesh/blender/source/gameengine/Ketsji/KX_ArmatureSensor.cpp
branches/bmesh/blender/source/gameengine/Ketsji/KX_ArmatureSensor.h
Added: branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.h (rev 0)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.h 2009-10-24 05:43:27 UTC (rev 24067)
@@ -0,0 +1,106 @@
+/**
+ * $Id: GHOST_DisplayManagerCocoa.h 23603 2009-10-02 07:20:33Z damien78 $
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+/**
+ * @file GHOST_DisplayManagerCocoa.h
+ * Declaration of GHOST_DisplayManagerCocoa class.
+ */
+
+#ifndef _GHOST_DISPLAY_MANAGER_COCOA_H_
+#define _GHOST_DISPLAY_MANAGER_COCOA_H_
+
+#ifndef __APPLE__
+#error Apple only!
+#endif // __APPLE__
+
+#include "GHOST_DisplayManager.h"
+
+/**
+ * Manages system displays (Mac OSX/Cocoa implementation).
+ * @see GHOST_DisplayManager
+ * @author Maarten Gribnau
+ * @date September 21, 2001
+ */
+class GHOST_DisplayManagerCocoa : public GHOST_DisplayManager
+{
+public:
+ /**
+ * Constructor.
+ */
+ GHOST_DisplayManagerCocoa(void);
+
+ /**
+ * Returns the number of display devices on this system.
+ * @param numDisplays The number of displays on this system.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getNumDisplays(GHOST_TUns8& numDisplays) const;
+
+ /**
+ * Returns the number of display settings for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param setting The number of settings of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const;
+
+ /**
+ * Returns the current setting for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param index The setting index to be returned.
+ * @param setting The setting of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const;
+
+ /**
+ * Returns the current setting for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param setting The current setting of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const;
+
+ /**
+ * Changes the current setting for this display device.
+ * @param display The index of the display to query with 0 <= display < getNumDisplays().
+ * @param setting The current setting of the display device with this index.
+ * @return Indication of success.
+ */
+ virtual GHOST_TSuccess setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting);
+
+protected:
+ //Do not cache values as OS X supports screen hot plug
+ /** Cached number of displays. */
+ //CGDisplayCount m_numDisplays;
+ /** Cached display id's for each display. */
+ //CGDirectDisplayID* m_displayIDs;
+};
+
+
+#endif // _GHOST_DISPLAY_MANAGER_COCOA_H_
+
Property changes on: branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
___________________________________________________________________
Name: svn:eol-style
+ native
Added: branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm (rev 0)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm 2009-10-24 05:43:27 UTC (rev 24067)
@@ -0,0 +1,168 @@
+/**
+ * $Id: GHOST_DisplayManagerCocoa.mm 23603 2009-10-02 07:20:33Z damien78 $
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Maarten Gribnau 09/2001
+ Damien Plisson 10/2009
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <Cocoa/Cocoa.h>
+
+#include "GHOST_DisplayManagerCocoa.h"
+#include "GHOST_Debug.h"
+
+// We do not support multiple monitors at the moment
+
+
+GHOST_DisplayManagerCocoa::GHOST_DisplayManagerCocoa(void)
+{
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getNumDisplays(GHOST_TUns8& numDisplays) const
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ numDisplays = (GHOST_TUns8) [[NSScreen screens] count];
+
+ [pool drain];
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const
+{
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getNumDisplaySettings(): only main display is supported");
+
+ numSettings = (GHOST_TInt32)3; //Width, Height, BitsPerPixel
+
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const
+{
+ //Note that only current display setting is available
+ NSScreen *askedDisplay;
+
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getDisplaySetting(): only main display is supported");
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ if (display == kMainDisplay) //Screen #0 may not be the main one
+ askedDisplay = [NSScreen mainScreen];
+ else
+ askedDisplay = [[NSScreen screens] objectAtIndex:display];
+
+ if(askedDisplay == nil) {
+ [pool drain];
+ return GHOST_kFailure;
+ }
+
+ NSRect frame = [askedDisplay visibleFrame];
+ setting.xPixels = frame.size.width;
+ setting.yPixels = frame.size.height;
+
+ setting.bpp = NSBitsPerPixelFromDepth([askedDisplay depth]);
+
+ setting.frequency = 0; //No more CRT display...
+
+#ifdef GHOST_DEBUG
+ printf("display mode: width=%d, height=%d, bpp=%d, frequency=%d\n", setting.xPixels, setting.yPixels, setting.bpp, setting.frequency);
+#endif // GHOST_DEBUG
+
+ [pool drain];
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const
+{
+ NSScreen *askedDisplay;
+
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(): only main display is supported");
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ if (display == kMainDisplay) //Screen #0 may not be the main one
+ askedDisplay = [NSScreen mainScreen];
+ else
+ askedDisplay = [[NSScreen screens] objectAtIndex:display];
+
+ if(askedDisplay == nil) {
+ [pool drain];
+ return GHOST_kFailure;
+ }
+
+ NSRect frame = [askedDisplay visibleFrame];
+ setting.xPixels = frame.size.width;
+ setting.yPixels = frame.size.height;
+
+ setting.bpp = NSBitsPerPixelFromDepth([askedDisplay depth]);
+
+ setting.frequency = 0; //No more CRT display...
+
+#ifdef GHOST_DEBUG
+ printf("current display mode: width=%d, height=%d, bpp=%d, frequency=%d\n", setting.xPixels, setting.yPixels, setting.bpp, setting.frequency);
+#endif // GHOST_DEBUG
+
+ [pool drain];
+ return GHOST_kSuccess;
+}
+
+
+GHOST_TSuccess GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting)
+{
+ GHOST_ASSERT((display==kMainDisplay), "GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): only main display is supported");
+
+#ifdef GHOST_DEBUG
+ printf("GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): requested settings:\n");
+ printf(" setting.xPixels=%d\n", setting.xPixels);
+ printf(" setting.yPixels=%d\n", setting.yPixels);
+ printf(" setting.bpp=%d\n", setting.bpp);
+ printf(" setting.frequency=%d\n", setting.frequency);
+#endif // GHOST_DEBUG
+
+ //Display configuration is no more available in 10.6
+
+/* CFDictionaryRef displayModeValues = ::CGDisplayBestModeForParametersAndRefreshRate(
+ m_displayIDs[display],
+ (size_t)setting.bpp,
+ (size_t)setting.xPixels,
+ (size_t)setting.yPixels,
+ (CGRefreshRate)setting.frequency,
+ NULL);*/
+
+#ifdef GHOST_DEBUG
+ printf("GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(): switching to:\n");
+ printf(" setting.xPixels=%d\n", getValue(displayModeValues, kCGDisplayWidth));
+ printf(" setting.yPixels=%d\n", getValue(displayModeValues, kCGDisplayHeight));
+ printf(" setting.bpp=%d\n", getValue(displayModeValues, kCGDisplayBitsPerPixel));
+ printf(" setting.frequency=%d\n", getValue(displayModeValues, kCGDisplayRefreshRate));
+#endif // GHOST_DEBUG
+
+ //CGDisplayErr err = ::CGDisplaySwitchToMode(m_displayIDs[display], displayModeValues);
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list