[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33669] branches/soc-2010-merwin/intern/ ghost: As-yet uncommitted changes from end of summer.

Mike Erwin significant.bit at gmail.com
Tue Dec 14 23:43:52 CET 2010


Revision: 33669
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33669
Author:   merwin
Date:     2010-12-14 23:43:52 +0100 (Tue, 14 Dec 2010)

Log Message:
-----------
As-yet uncommitted changes from end of summer. General code cleanup Mac-side, removed some unnecessary NSAutoreleasePool guards, etc. By no means complete -- just wanted to get this in and do a fresh checkout on another machine.

Modified Paths:
--------------
    branches/soc-2010-merwin/intern/ghost/GHOST_ISystem.h
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_Buttons.cpp
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.mm
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_WindowCocoa.h
    branches/soc-2010-merwin/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: branches/soc-2010-merwin/intern/ghost/GHOST_ISystem.h
===================================================================
--- branches/soc-2010-merwin/intern/ghost/GHOST_ISystem.h	2010-12-14 21:46:03 UTC (rev 33668)
+++ branches/soc-2010-merwin/intern/ghost/GHOST_ISystem.h	2010-12-14 22:43:52 UTC (rev 33669)
@@ -27,7 +27,7 @@
  */
 /**
  * @file	GHOST_ISystem.h
- * Main interface file for C++ Api with declaration of GHOST_ISystem interface
+ * Main interface file for C++ API with declaration of GHOST_ISystem interface
  * class.
  * Contains the doxygen documentation main page.
  */

Modified: branches/soc-2010-merwin/intern/ghost/intern/GHOST_Buttons.cpp
===================================================================
--- branches/soc-2010-merwin/intern/ghost/intern/GHOST_Buttons.cpp	2010-12-14 21:46:03 UTC (rev 33668)
+++ branches/soc-2010-merwin/intern/ghost/intern/GHOST_Buttons.cpp	2010-12-14 22:43:52 UTC (rev 33669)
@@ -29,7 +29,6 @@
 #include "GHOST_Buttons.h"
 
 
-
 GHOST_Buttons::GHOST_Buttons()
 {
 	clear();
@@ -39,37 +38,37 @@
 
 bool GHOST_Buttons::get(GHOST_TButtonMask mask) const
 {
-    switch (mask) {
-    case GHOST_kButtonMaskLeft:
-        return m_ButtonLeft;
-    case GHOST_kButtonMaskMiddle:
-        return m_ButtonMiddle;
-    case GHOST_kButtonMaskRight:
-        return m_ButtonRight;
-    default:
-        return false;
-    }
+	switch (mask) {
+		case GHOST_kButtonMaskLeft:
+			return m_ButtonLeft;
+		case GHOST_kButtonMaskMiddle:
+			return m_ButtonMiddle;
+		case GHOST_kButtonMaskRight:
+			return m_ButtonRight;
+		default:
+			return false;
+	}
 }
 
 void GHOST_Buttons::set(GHOST_TButtonMask mask, bool down)
 {
-    switch (mask) {
-    case GHOST_kButtonMaskLeft:
-        m_ButtonLeft = down; break;
-    case GHOST_kButtonMaskMiddle:
-        m_ButtonMiddle = down; break;
-    case GHOST_kButtonMaskRight:
-        m_ButtonRight = down; break;
-    default:
-        break;
-    }
+	switch (mask) {
+		case GHOST_kButtonMaskLeft:
+			m_ButtonLeft = down; break;
+		case GHOST_kButtonMaskMiddle:
+			m_ButtonMiddle = down; break;
+		case GHOST_kButtonMaskRight:
+			m_ButtonRight = down; break;
+		default:
+			break;
+	}
 }
 
 void GHOST_Buttons::clear()
 {
-    m_ButtonLeft = false;
-    m_ButtonMiddle = false;
-    m_ButtonRight = false;
+	m_ButtonLeft = false;
+	m_ButtonMiddle = false;
+	m_ButtonRight = false;
 }
 
 bool GHOST_Buttons::anyDown() const

Modified: branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h
===================================================================
--- branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h	2010-12-14 21:46:03 UTC (rev 33668)
+++ branches/soc-2010-merwin/intern/ghost/intern/GHOST_SystemCocoa.h	2010-12-14 22:43:52 UTC (rev 33669)
@@ -21,13 +21,14 @@
  *
  * The Original Code is: all of this file.
  *
- * Contributor(s):	Maarten Gribnau 05/2001
- *					Damien Plisson 09/2009
+ * Contributor(s): Maarten Gribnau 05/2001
+ *                 Damien Plisson 09/2009
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
 /**
- * @file	GHOST_SystemCocoa.h
+ * @file GHOST_SystemCocoa.h
  * Declaration of GHOST_SystemCocoa class.
  */
 
@@ -44,20 +45,20 @@
 class GHOST_EventKey;
 class GHOST_EventWindow;
 class GHOST_WindowCocoa;
+class NSAutoreleasePool; // actually Obj-C, but GHOST_ISystem.cpp doesn't understand @class syntax
 
-
 class GHOST_SystemCocoa : public GHOST_System {
 public:
-    /**
-     * Constructor.
-     */
-    GHOST_SystemCocoa();
-    
-    /** 
-     * Destructor.
-     */
-    ~GHOST_SystemCocoa();
-    
+	/**
+	 * Constructor.
+	 */
+	GHOST_SystemCocoa();
+	
+	/** 
+	 * Destructor.
+	 */
+	~GHOST_SystemCocoa();
+
 	/***************************************************************************************
 	 ** Time(r) functionality
 	 ***************************************************************************************/
@@ -68,7 +69,7 @@
 	 * Based on ANSI clock() routine.
 	 * @return The number of milliseconds.
 	 */
-	virtual GHOST_TUns64 getMilliSeconds() const;
+	GHOST_TUns64 getMilliSeconds() const;
 
 	/***************************************************************************************
 	 ** Display/window management functionality
@@ -78,31 +79,30 @@
 	 * Returns the number of displays on this system.
 	 * @return The number of displays.
 	 */
-	virtual	GHOST_TUns8 getNumDisplays() const;
+	GHOST_TUns8 getNumDisplays() const;
 
 	/**
 	 * Returns the dimensions of the main display on this system.
-	 * @return The dimension of the main display.
 	 */
-	virtual void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const;
-	
+	void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const;
+
 	/**
 	 * Create a new window.
-	 * The new window is added to the list of windows managed. 
+	 * The new window is added to the list of windows managed.
 	 * Never explicitly delete the window, use disposeWindow() instead.
-	 * @param	title			The name of the window (displayed in the title bar of the window if the OS supports it).
-	 * @param	left			The coordinate of the left edge of the window.
-	 * @param	top				The coordinate of the top edge of the window.
-	 * @param	width			The width the window.
-	 * @param	height			The height the window.
-	 * @param	state			The state of the window when opened.
-	 * @param	type			The type of drawing context installed in this window.
-	 * @param	stereoVisual	Stereo visual for quad buffered stereo.
-	 * @param	numOfAASamples	Number of samples used for AA (zero if no AA)
-	 * @param	parentWindow 	Parent (embedder) window
-	 * @return	The new window (or 0 if creation failed).
+	 * @param title          The name of the window (displayed in the title bar of the window if the OS supports it).
+	 * @param left           The coordinate of the left edge of the window.
+	 * @param top            The coordinate of the top edge of the window.
+	 * @param width          The width the window.
+	 * @param height         The height the window.
+	 * @param state          The state of the window when opened.
+	 * @param type           The type of drawing context installed in this window.
+	 * @param stereoVisual   Stereo visual for quad buffered stereo.
+	 * @param numOfAASamples Number of samples used for AA (zero if no AA)
+	 * @param parentWindow   Parent (embedder) window
+	 * @return               The new window (or 0 if creation failed).
 	 */
-	virtual GHOST_IWindow* createWindow(
+	GHOST_IWindow* createWindow(
 		const STR_String& title,
 		GHOST_TInt32 left,
 		GHOST_TInt32 top,
@@ -114,166 +114,166 @@
 		const GHOST_TUns16 numOfAASamples = 0,
 		const GHOST_TEmbedderWindowID parentWindow = 0 
 	);
-	
-	virtual GHOST_TSuccess beginFullScreen(
+
+	GHOST_TSuccess beginFullScreen(
 		const GHOST_DisplaySetting& setting, 
 		GHOST_IWindow** window,
 		const bool stereoVisual
 	);
-	
-	virtual GHOST_TSuccess endFullScreen( void );
-	
+
+	GHOST_TSuccess endFullScreen( void );
+
 	/***************************************************************************************
 	 ** Event management functionality
 	 ***************************************************************************************/
 
 	/**
 	 * Gets events from the system and stores them in the queue.
-	 * @param waitForEvent Flag to wait for an event (or return immediately).
-	 * @return Indication of the presence of events.
+	 * @param waitForEvent  Flag to wait for an event (or return immediately).
+	 * @return              Indication of the presence of events.
 	 */
-	virtual bool processEvents(bool waitForEvent);
-	
+	bool processEvents(bool waitForEvent);
+
 	/**
 	 * Handle User request to quit, from Menu bar Quit, and Cmd+Q
 	 * Display alert panel if changes performed since last save
 	 */
 	GHOST_TUns8 handleQuitRequest();
-	
+
 	/**
 	 * Handle Cocoa openFile event
 	 * Display confirmation request panel if changes performed since last save
 	 */
-	bool handleOpenDocumentRequest(void *filepathStr);	
-	
+	bool handleOpenDocumentRequest(void *filepathStr);
+
 	/**
-     * Handles a drag'n'drop destination event. Called by GHOST_WindowCocoa window subclass
-     * @param eventType The type of drag'n'drop event
-	 * @param draggedObjectType The type object concerned (currently array of file names, string, TIFF image)
-	 * @param mouseX x mouse coordinate (in cocoa base window coordinates)
-	 * @param mouseY y mouse coordinate
-	 * @param window The window on which the event occurred
-     * @return Indication whether the event was handled. 
-     */
+	 * Handles a drag'n'drop destination event. Called by GHOST_WindowCocoa window subclass
+	 * @param eventType          The type of drag'n'drop event
+	 * @param draggedObjectType  The type object concerned (currently array of file names, string, TIFF image)
+	 * @param mouseX             x mouse coordinate (in cocoa base window coordinates)
+	 * @param mouseY             y mouse coordinate
+	 * @param window             The window on which the event occurred
+	 * @return                   Indication whether the event was handled.
+	 */
 	GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,
-									   GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data);
-	
+		GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data);
+
 	/***************************************************************************************
 	 ** Cursor management functionality
 	 ***************************************************************************************/
 
 	/**
 	 * Returns the current location of the cursor (location in screen coordinates)
-	 * @param x			The x-coordinate of the cursor.
-	 * @param y			The y-coordinate of the cursor.
-	 * @return			Indication of success.
+	 * @param x  The x-coordinate of the cursor.
+	 * @param y  The y-coordinate of the cursor.
+	 * @return   Indication of success.
 	 */
-	virtual GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const;
+	GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const;
 
 	/**
 	 * Updates the location of the cursor (location in screen coordinates).
-	 * @param x			The x-coordinate of the cursor.
-	 * @param y			The y-coordinate of the cursor.
-	 * @return			Indication of success.
+	 * @param x  The x-coordinate of the cursor.
+	 * @param y  The y-coordinate of the cursor.
+	 * @return   Indication of success.
 	 */
-	virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
-	

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list