[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30712] branches/soc-2010-merwin/intern/ ghost/intern/GHOST_NDOFManagerCocoa.cpp: removing Mac C++ file ( contents same as Obj-C++ file), since TortoiseSVN's 'rename' forgot to do it

Mike Erwin significant.bit at gmail.com
Sun Jul 25 10:38:14 CEST 2010


Revision: 30712
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30712
Author:   merwin
Date:     2010-07-25 10:38:13 +0200 (Sun, 25 Jul 2010)

Log Message:
-----------
removing Mac C++ file (contents same as Obj-C++ file), since TortoiseSVN's 'rename' forgot to do it

Removed Paths:
-------------
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_NDOFManagerCocoa.cpp

Deleted: branches/soc-2010-merwin/intern/ghost/intern/GHOST_NDOFManagerCocoa.cpp
===================================================================
--- branches/soc-2010-merwin/intern/ghost/intern/GHOST_NDOFManagerCocoa.cpp	2010-07-25 08:12:06 UTC (rev 30711)
+++ branches/soc-2010-merwin/intern/ghost/intern/GHOST_NDOFManagerCocoa.cpp	2010-07-25 08:38:13 UTC (rev 30712)
@@ -1,113 +0,0 @@
-/*
- * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
- 
-#include "GHOST_NDOFManagerCocoa.h"
-#include "GHOST_SystemCocoa.h"
-
-extern "C" {
-	#include <3DconnexionClient/ConnexionClientAPI.h>
-	#include <stdio.h>
-	}
-
-static void SpaceNavAdded(io_connect_t connection)
-	{
-	printf("SpaceNav added\n");
-	}
-
-static void SpaceNavRemoved(io_connect_t connection)
-	{
-	printf("SpaceNav removed\n");
-	}
-
-static void SpaceNavEvent(io_connect_t connection, natural_t messageType, void *messageArgument)
-	{
-	GHOST_SystemCocoa* system = (GHOST_SystemCocoa*) GHOST_ISystem::getSystem();
-	GHOST_NDOFManager* manager = system->getNDOFManager();
-	switch (messageType)
-		{
-		case kConnexionMsgDeviceState:
-			{
-			ConnexionDeviceState* s = (ConnexionDeviceState*)messageArgument;
-			switch (s->command)
-				{
-				case kConnexionCmdHandleAxis:
-					manager->updateTranslation(s->axis, s->time);
-					manager->updateRotation(s->axis + 3, s->time);
-					system->notifyExternalEventProcessed();
-					break;
-
-				case kConnexionCmdHandleButtons:
-					manager->updateButtons(s->buttons, s->time);
-					system->notifyExternalEventProcessed();
-					break;
-				}
-			break;
-			}
-		case kConnexionMsgPrefsChanged:
-			printf("prefs changed\n"); // this includes app switches
-			break;
-		case kConnexionMsgDoAction:
-			printf("do action\n"); // no idea what this means
-			// 'calibrate device' in System Prefs sends this
-			break;
-		default:
-			printf("<!> mystery event\n");
-		}
-	}
-
-GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(GHOST_System& sys)
-	: GHOST_NDOFManager(sys)
-	{
-	if (available())
-		{
-		OSErr error = InstallConnexionHandlers(SpaceNavEvent, SpaceNavAdded, SpaceNavRemoved);
-		if (error)
-			{
-			printf("<!> error = %d\n", error);
-			return;
-			}
-
-		// Pascal string *and* a four-letter constant. How old-skool.
-		m_clientID = RegisterConnexionClient('blnd', (UInt8*) "\pBlender",
-			kConnexionClientModeTakeOver, kConnexionMaskAll);
-
-		printf("client id = %d\n", m_clientID);
-		}
-	else
-		{
-		printf("<!> SpaceNav driver not found\n");
-		// This isn't a hard error, just means the user doesn't have a SpaceNavigator.
-		}
-	}
-
-GHOST_NDOFManagerCocoa::~GHOST_NDOFManagerCocoa()
-	{
-	UnregisterConnexionClient(m_clientID);
-	CleanupConnexionHandlers();
-	}
-
-bool GHOST_NDOFManagerCocoa::available()
-	{
-//	extern OSErr InstallConnexionHandlers() __attribute__((weak_import));
-// ^-- not needed since the entire framework is weak-linked
-	return InstallConnexionHandlers != NULL;
-	}





More information about the Bf-blender-cvs mailing list