From f9ea19ac129deb9d3cb5ce9c7a4ea81b86e77680 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 Oct 2011 22:02:50 +0000 Subject: spaces -> tabs (only whitespace changes) --- intern/container/CTR_List.h | 20 +-- intern/container/CTR_Map.h | 248 +++++++++++++------------- intern/ghost/GHOST_Types.h | 16 +- intern/ghost/intern/GHOST_Buttons.h | 54 +++--- intern/ghost/intern/GHOST_ModifierKeys.h | 76 ++++---- intern/ghost/intern/GHOST_SystemCarbon.h | 140 +++++++-------- intern/ghost/intern/GHOST_SystemCocoa.h | 122 ++++++------- intern/ghost/intern/GHOST_SystemPathsCarbon.h | 24 +-- intern/ghost/intern/GHOST_SystemPathsCocoa.h | 18 +- intern/ghost/intern/GHOST_TaskbarWin32.h | 38 ++-- intern/ghost/intern/GHOST_Window.h | 10 +- intern/ghost/intern/GHOST_WindowCarbon.h | 66 +++---- intern/ghost/test/gears/GHOST_C-Test.c | 80 ++++----- intern/string/STR_String.h | 10 +- 14 files changed, 461 insertions(+), 461 deletions(-) (limited to 'intern') diff --git a/intern/container/CTR_List.h b/intern/container/CTR_List.h index 83252e05fae..79af9ea5abc 100644 --- a/intern/container/CTR_List.h +++ b/intern/container/CTR_List.h @@ -37,18 +37,18 @@ class CTR_Link { public: - CTR_Link( + CTR_Link( ) ; - CTR_Link( + CTR_Link( CTR_Link *next, CTR_Link *prev ) ; - + CTR_Link * getNext( ) const ; - + CTR_Link * getPrev( ) const ; @@ -76,14 +76,14 @@ public: ) ; private: - CTR_Link *m_next; - CTR_Link *m_prev; + CTR_Link *m_next; + CTR_Link *m_prev; }; class CTR_List { public: - CTR_List( + CTR_List( ) ; CTR_Link * @@ -103,10 +103,10 @@ public: addTail( CTR_Link *link ) ; - + private: - CTR_Link m_head; - CTR_Link m_tail; + CTR_Link m_head; + CTR_Link m_tail; }; #endif diff --git a/intern/container/CTR_Map.h b/intern/container/CTR_Map.h index 1991ec19e3a..08aa26eb9e2 100644 --- a/intern/container/CTR_Map.h +++ b/intern/container/CTR_Map.h @@ -37,24 +37,24 @@ template class CTR_Map { private: - struct Entry { - Entry (Entry *next, Key key, Value value) : - m_next(next), - m_key(key), - m_value(value) {} - - Entry *m_next; - Key m_key; - Value m_value; - }; - + struct Entry { + Entry (Entry *next, Key key, Value value) : + m_next(next), + m_key(key), + m_value(value) {} + + Entry *m_next; + Key m_key; + Value m_value; + }; + public: - CTR_Map(int num_buckets = 100) : m_num_buckets(num_buckets) { - m_buckets = new Entry *[num_buckets]; - for (int i = 0; i < num_buckets; ++i) { - m_buckets[i] = 0; - } - } + CTR_Map(int num_buckets = 100) : m_num_buckets(num_buckets) { + m_buckets = new Entry *[num_buckets]; + for (int i = 0; i < num_buckets; ++i) { + m_buckets[i] = 0; + } + } CTR_Map(const CTR_Map& map) { @@ -68,114 +68,114 @@ public: insert(entry->m_key, entry->m_value); } } - - int size() { - int count=0; - for (int i=0;im_next; - count++; - } - } - return count; - } - - Value* at(int index) { - int count=0; - for (int i=0;im_value; - } - bucket = bucket->m_next; - count++; - } - } - return 0; - } - - Key* getKey(int index) { - int count=0; - for (int i=0;im_key; - } - bucket = bucket->m_next; - count++; - } - } - return 0; - } - - void clear() { - for (int i = 0; i < m_num_buckets; ++i) { - Entry *entry_ptr = m_buckets[i]; - - while (entry_ptr != 0) { - Entry *tmp_ptr = entry_ptr->m_next; - delete entry_ptr; - entry_ptr = tmp_ptr; - } - m_buckets[i] = 0; - } - } - - ~CTR_Map() { - clear(); - delete [] m_buckets; - } - - void insert(const Key& key, const Value& value) { - Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets]; - while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) { - entry_ptr = entry_ptr->m_next; - } - - if (entry_ptr != 0) { - entry_ptr->m_value = value; - } - else { - Entry **bucket = &m_buckets[key.hash() % m_num_buckets]; - *bucket = new Entry(*bucket, key, value); - } - } - - void remove(const Key& key) { - Entry **entry_ptr = &m_buckets[key.hash() % m_num_buckets]; - while ((*entry_ptr != 0) && !(key == (*entry_ptr)->m_key)) { - entry_ptr = &(*entry_ptr)->m_next; - } - - if (*entry_ptr != 0) { - Entry *tmp_ptr = (*entry_ptr)->m_next; - delete *entry_ptr; - *entry_ptr = tmp_ptr; - } - } - - Value *operator[](Key key) { - Entry *bucket = m_buckets[key.hash() % m_num_buckets]; - while ((bucket != 0) && !(key == bucket->m_key)) { - bucket = bucket->m_next; - } - return bucket != 0 ? &bucket->m_value : 0; - } - + + int size() { + int count=0; + for (int i=0;im_next; + count++; + } + } + return count; + } + + Value* at(int index) { + int count=0; + for (int i=0;im_value; + } + bucket = bucket->m_next; + count++; + } + } + return 0; + } + + Key* getKey(int index) { + int count=0; + for (int i=0;im_key; + } + bucket = bucket->m_next; + count++; + } + } + return 0; + } + + void clear() { + for (int i = 0; i < m_num_buckets; ++i) { + Entry *entry_ptr = m_buckets[i]; + + while (entry_ptr != 0) { + Entry *tmp_ptr = entry_ptr->m_next; + delete entry_ptr; + entry_ptr = tmp_ptr; + } + m_buckets[i] = 0; + } + } + + ~CTR_Map() { + clear(); + delete [] m_buckets; + } + + void insert(const Key& key, const Value& value) { + Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets]; + while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) { + entry_ptr = entry_ptr->m_next; + } + + if (entry_ptr != 0) { + entry_ptr->m_value = value; + } + else { + Entry **bucket = &m_buckets[key.hash() % m_num_buckets]; + *bucket = new Entry(*bucket, key, value); + } + } + + void remove(const Key& key) { + Entry **entry_ptr = &m_buckets[key.hash() % m_num_buckets]; + while ((*entry_ptr != 0) && !(key == (*entry_ptr)->m_key)) { + entry_ptr = &(*entry_ptr)->m_next; + } + + if (*entry_ptr != 0) { + Entry *tmp_ptr = (*entry_ptr)->m_next; + delete *entry_ptr; + *entry_ptr = tmp_ptr; + } + } + + Value *operator[](Key key) { + Entry *bucket = m_buckets[key.hash() % m_num_buckets]; + while ((bucket != 0) && !(key == bucket->m_key)) { + bucket = bucket->m_next; + } + return bucket != 0 ? &bucket->m_value : 0; + } + private: - int m_num_buckets; - Entry **m_buckets; + int m_num_buckets; + Entry **m_buckets; }; #endif diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index f24ab00acd3..dd399a7aa95 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -96,14 +96,14 @@ typedef enum { } GHOST_TFireTimeConstant; typedef enum { - GHOST_kModifierKeyLeftShift = 0, - GHOST_kModifierKeyRightShift, - GHOST_kModifierKeyLeftAlt, - GHOST_kModifierKeyRightAlt, - GHOST_kModifierKeyLeftControl, - GHOST_kModifierKeyRightControl, - GHOST_kModifierKeyOS, - GHOST_kModifierKeyNumMasks + GHOST_kModifierKeyLeftShift = 0, + GHOST_kModifierKeyRightShift, + GHOST_kModifierKeyLeftAlt, + GHOST_kModifierKeyRightAlt, + GHOST_kModifierKeyLeftControl, + GHOST_kModifierKeyRightControl, + GHOST_kModifierKeyOS, + GHOST_kModifierKeyNumMasks } GHOST_TModifierKeyMask; diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h index bf5bdb19d7f..d231a254596 100644 --- a/intern/ghost/intern/GHOST_Buttons.h +++ b/intern/ghost/intern/GHOST_Buttons.h @@ -44,35 +44,35 @@ * @date May 15, 2001 */ struct GHOST_Buttons { - /** - * Constructor. - */ - GHOST_Buttons(); + /** + * Constructor. + */ + GHOST_Buttons(); virtual ~GHOST_Buttons(); - - /** - * Returns the state of a single button. - * @param mask. Key button to return. - * @return The state of the button (pressed == true). - */ - virtual bool get(GHOST_TButtonMask mask) const; - - /** - * Updates the state of a single button. - * @param mask. Button state to update. - * @param down. The new state of the button. - */ - virtual void set(GHOST_TButtonMask mask, bool down); - - /** - * Sets the state of all buttons to up. - */ - virtual void clear(); - - GHOST_TUns8 m_ButtonLeft : 1; - GHOST_TUns8 m_ButtonMiddle : 1; - GHOST_TUns8 m_ButtonRight : 1; + + /** + * Returns the state of a single button. + * @param mask. Key button to return. + * @return The state of the button (pressed == true). + */ + virtual bool get(GHOST_TButtonMask mask) const; + + /** + * Updates the state of a single button. + * @param mask. Button state to update. + * @param down. The new state of the button. + */ + virtual void set(GHOST_TButtonMask mask, bool down); + + /** + * Sets the state of all buttons to up. + */ + virtual void clear(); + + GHOST_TUns8 m_ButtonLeft : 1; + GHOST_TUns8 m_ButtonMiddle : 1; + GHOST_TUns8 m_ButtonRight : 1; }; #endif // _GHOST_BUTTONS_H_ diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h index 08fe277d55a..0109fe7b7c6 100644 --- a/intern/ghost/intern/GHOST_ModifierKeys.h +++ b/intern/ghost/intern/GHOST_ModifierKeys.h @@ -44,10 +44,10 @@ */ struct GHOST_ModifierKeys { - /** - * Constructor. - */ - GHOST_ModifierKeys(); + /** + * Constructor. + */ + GHOST_ModifierKeys(); virtual ~GHOST_ModifierKeys(); @@ -58,25 +58,25 @@ struct GHOST_ModifierKeys */ static GHOST_TKey getModifierKeyCode(GHOST_TModifierKeyMask mask); - - /** - * Returns the state of a single modifier key. - * @param mask. Key state to return. - * @return The state of the key (pressed == true). - */ - virtual bool get(GHOST_TModifierKeyMask mask) const; - - /** - * Updates the state of a single modifier key. - * @param mask. Key state to update. - * @param down. The new state of the key. - */ - virtual void set(GHOST_TModifierKeyMask mask, bool down); - - /** - * Sets the state of all modifier keys to up. - */ - virtual void clear(); + + /** + * Returns the state of a single modifier key. + * @param mask. Key state to return. + * @return The state of the key (pressed == true). + */ + virtual bool get(GHOST_TModifierKeyMask mask) const; + + /** + * Updates the state of a single modifier key. + * @param mask. Key state to update. + * @param down. The new state of the key. + */ + virtual void set(GHOST_TModifierKeyMask mask, bool down); + + /** + * Sets the state of all modifier keys to up. + */ + virtual void clear(); /** * Determines whether to modifier key states are equal. @@ -84,21 +84,21 @@ struct GHOST_ModifierKeys * @return Indication of equality. */ virtual bool equals(const GHOST_ModifierKeys& keys) const; - - /** Bitfield that stores the appropriate key state. */ - GHOST_TUns8 m_LeftShift : 1; - /** Bitfield that stores the appropriate key state. */ - GHOST_TUns8 m_RightShift : 1; - /** Bitfield that stores the appropriate key state. */ - GHOST_TUns8 m_LeftAlt : 1; - /** Bitfield that stores the appropriate key state. */ - GHOST_TUns8 m_RightAlt : 1; - /** Bitfield that stores the appropriate key state. */ - GHOST_TUns8 m_LeftControl : 1; - /** Bitfield that stores the appropriate key state. */ - GHOST_TUns8 m_RightControl : 1; - /** Bitfield that stores the appropriate key state. */ - GHOST_TUns8 m_OS : 1; + + /** Bitfield that stores the appropriate key state. */ + GHOST_TUns8 m_LeftShift : 1; + /** Bitfield that stores the appropriate key state. */ + GHOST_TUns8 m_RightShift : 1; + /** Bitfield that stores the appropriate key state. */ + GHOST_TUns8 m_LeftAlt : 1; + /** Bitfield that stores the appropriate key state. */ + GHOST_TUns8 m_RightAlt : 1; + /** Bitfield that stores the appropriate key state. */ + GHOST_TUns8 m_LeftControl : 1; + /** Bitfield that stores the appropriate key state. */ + GHOST_TUns8 m_RightControl : 1; + /** Bitfield that stores the appropriate key state. */ + GHOST_TUns8 m_OS : 1; }; #endif // _GHOST_MODIFIER_KEYS_H_ diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h index b0cf622f709..dd21d033c6f 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.h +++ b/intern/ghost/intern/GHOST_SystemCarbon.h @@ -55,16 +55,16 @@ class GHOST_EventWindow; */ class GHOST_SystemCarbon : public GHOST_System { public: - /** - * Constructor. - */ - GHOST_SystemCarbon(); - - /** - * Destructor. - */ - ~GHOST_SystemCarbon(); - + /** + * Constructor. + */ + GHOST_SystemCarbon(); + + /** + * Destructor. + */ + ~GHOST_SystemCarbon(); + /*************************************************************************************** ** Time(r) functionality ***************************************************************************************/ @@ -211,54 +211,54 @@ protected: virtual GHOST_TSuccess exit(); - /** - * Handles a tablet event. - * @param event A Mac event. - * @return Indication whether the event was handled. - */ - OSStatus handleTabletEvent(EventRef event); - /** - * Handles a mouse event. - * @param event A Mac event. - * @return Indication whether the event was handled. - */ - OSStatus handleMouseEvent(EventRef event); - - /** - * Handles a key event. - * @param event A Mac event. - * @return Indication whether the event was handled. - */ - OSStatus handleKeyEvent(EventRef event); - - /** - * Handles a window event. - * @param event A Mac event. - * @return Indication whether the event was handled. - */ - OSStatus handleWindowEvent(EventRef event); - - /** - * Handles all basic Mac application stuff for a mouse down event. - * @param event A Mac event. - * @return Indication whether the event was handled. - */ - bool handleMouseDown(EventRef event); - - /** - * Handles a Mac menu command. - * @param menuResult A Mac menu/item identifier. - * @return Indication whether the event was handled. - */ - bool handleMenuCommand(GHOST_TInt32 menuResult); - - /* callback for blender generated events */ -// static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData); - - - /** - * Callback for Carbon when it has events. - */ + /** + * Handles a tablet event. + * @param event A Mac event. + * @return Indication whether the event was handled. + */ + OSStatus handleTabletEvent(EventRef event); + /** + * Handles a mouse event. + * @param event A Mac event. + * @return Indication whether the event was handled. + */ + OSStatus handleMouseEvent(EventRef event); + + /** + * Handles a key event. + * @param event A Mac event. + * @return Indication whether the event was handled. + */ + OSStatus handleKeyEvent(EventRef event); + + /** + * Handles a window event. + * @param event A Mac event. + * @return Indication whether the event was handled. + */ + OSStatus handleWindowEvent(EventRef event); + + /** + * Handles all basic Mac application stuff for a mouse down event. + * @param event A Mac event. + * @return Indication whether the event was handled. + */ + bool handleMouseDown(EventRef event); + + /** + * Handles a Mac menu command. + * @param menuResult A Mac menu/item identifier. + * @return Indication whether the event was handled. + */ + bool handleMenuCommand(GHOST_TInt32 menuResult); + + /* callback for blender generated events */ + // static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData); + + + /** + * Callback for Carbon when it has events. + */ static OSStatus sEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData); /** Apple Event Handlers */ @@ -267,23 +267,23 @@ protected: static OSErr sAEHandlerPrintDocs(const AppleEvent *event, AppleEvent *reply, SInt32 refCon); static OSErr sAEHandlerQuit(const AppleEvent *event, AppleEvent *reply, SInt32 refCon); - /** - * Callback for Mac Timer tasks that expire. - * @param tmTask Pointer to the timer task that expired. - */ - //static void s_timerCallback(TMTaskPtr tmTask); - - /** Event handler reference. */ - EventHandlerRef m_handler; + /** + * Callback for Mac Timer tasks that expire. + * @param tmTask Pointer to the timer task that expired. + */ + //static void s_timerCallback(TMTaskPtr tmTask); + + /** Event handler reference. */ + EventHandlerRef m_handler; /** Start time at initialization. */ GHOST_TUns64 m_start_time; - /** State of the modifiers. */ - UInt32 m_modifierMask; + /** State of the modifiers. */ + UInt32 m_modifierMask; - /** Ignores window size messages (when window is dragged). */ - bool m_ignoreWindowSizedMessages; + /** Ignores window size messages (when window is dragged). */ + bool m_ignoreWindowSizedMessages; }; #endif // _GHOST_SYSTEM_CARBON_H_ diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h index d20aed63f42..fc4f02e3fd6 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.h +++ b/intern/ghost/intern/GHOST_SystemCocoa.h @@ -52,16 +52,16 @@ class GHOST_WindowCocoa; class GHOST_SystemCocoa : public GHOST_System { public: - /** - * Constructor. - */ - GHOST_SystemCocoa(); - - /** - * Destructor. - */ - ~GHOST_SystemCocoa(); - + /** + * Constructor. + */ + GHOST_SystemCocoa(); + + /** + * Destructor. + */ + ~GHOST_SystemCocoa(); + /*************************************************************************************** ** Time(r) functionality ***************************************************************************************/ @@ -92,7 +92,7 @@ public: /** * 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. @@ -107,17 +107,17 @@ public: * @return The new window (or 0 if creation failed). */ virtual GHOST_IWindow* createWindow( - const STR_String& title, - GHOST_TInt32 left, - GHOST_TInt32 top, - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - GHOST_TDrawingContextType type, - const bool stereoVisual = false, - const GHOST_TUns16 numOfAASamples = 0, - const GHOST_TEmbedderWindowID parentWindow = 0 - ); + const STR_String& title, + GHOST_TInt32 left, + GHOST_TInt32 top, + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + GHOST_TDrawingContextType type, + const bool stereoVisual = false, + const GHOST_TUns16 numOfAASamples = 0, + const GHOST_TEmbedderWindowID parentWindow = 0 + ); /*************************************************************************************** ** Event management functionality @@ -140,19 +140,19 @@ public: * 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 + * 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. - */ + * @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 @@ -207,18 +207,18 @@ public: virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const; /** - * Handles a window event. Called by GHOST_WindowCocoa window delegate - * @param eventType The type of window event + * Handles a window event. Called by GHOST_WindowCocoa window delegate + * @param eventType The type of window event * @param window The window on which the event occurred - * @return Indication whether the event was handled. - */ - GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window); + * @return Indication whether the event was handled. + */ + GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window); /** - * Handles the Cocoa event telling the application has become active (again) - * @return Indication whether the event was handled. - */ - GHOST_TSuccess handleApplicationBecomeActiveEvent(); + * Handles the Cocoa event telling the application has become active (again) + * @return Indication whether the event was handled. + */ + GHOST_TSuccess handleApplicationBecomeActiveEvent(); /** * External objects should call this when they send an event outside processEvents. @@ -239,28 +239,28 @@ protected: */ virtual GHOST_TSuccess init(); - /** - * Handles a tablet event. - * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++) + /** + * Handles a tablet event. + * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++) * @param eventType The type of the event. It needs to be passed separately as it can be either directly in the event type, or as a subtype if combined with a mouse button event - * @return Indication whether the event was handled. - */ - GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType); - + * @return Indication whether the event was handled. + */ + GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType); + + /** + * Handles a mouse event. + * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++) + * @return Indication whether the event was handled. + */ + GHOST_TSuccess handleMouseEvent(void *eventPtr); + /** - * Handles a mouse event. - * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++) - * @return Indication whether the event was handled. - */ - GHOST_TSuccess handleMouseEvent(void *eventPtr); - - /** - * Handles a key event. - * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++) - * @return Indication whether the event was handled. - */ - GHOST_TSuccess handleKeyEvent(void *eventPtr); - + * Handles a key event. + * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++) + * @return Indication whether the event was handled. + */ + GHOST_TSuccess handleKeyEvent(void *eventPtr); + /** * Performs the actual cursor position update (location in screen coordinates). * @param x The x-coordinate of the cursor. @@ -281,11 +281,11 @@ protected: /** Mouse buttons state */ GHOST_TUns32 m_pressedMouseButtons; - /** State of the modifiers. */ - GHOST_TUns32 m_modifierMask; + /** State of the modifiers. */ + GHOST_TUns32 m_modifierMask; - /** Ignores window size messages (when window is dragged). */ - bool m_ignoreWindowSizedMessages; + /** Ignores window size messages (when window is dragged). */ + bool m_ignoreWindowSizedMessages; /** Stores the mouse cursor delta due to setting a new cursor position * Needed because cocoa event delta cursor move takes setCursorPosition changes too. diff --git a/intern/ghost/intern/GHOST_SystemPathsCarbon.h b/intern/ghost/intern/GHOST_SystemPathsCarbon.h index b48ab6c033b..957300f6586 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCarbon.h +++ b/intern/ghost/intern/GHOST_SystemPathsCarbon.h @@ -50,16 +50,16 @@ */ class GHOST_SystemPathsCarbon : public GHOST_SystemPaths { public: - /** - * Constructor. - */ - GHOST_SystemPathsCarbon(); - - /** - * Destructor. - */ - ~GHOST_SystemPathsCarbon(); - + /** + * Constructor. + */ + GHOST_SystemPathsCarbon(); + + /** + * Destructor. + */ + ~GHOST_SystemPathsCarbon(); + /** * Determine the base dir in which shared resources are located. It will first try to use * "unpack and run" path, then look for properly installed path, not including versioning. @@ -78,12 +78,12 @@ public: * Determine the directory of the current binary * @return Unsigned char string pointing to the binary dir */ - virtual const GHOST_TUns8* getBinaryDir() const; + virtual const GHOST_TUns8* getBinaryDir() const; /** * Add the file to the operating system most recently used files */ - void addToSystemRecentFiles(const char* filename) const; + void addToSystemRecentFiles(const char* filename) const; }; #endif // _GHOST_SYSTEM_CARBON_H_ diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.h b/intern/ghost/intern/GHOST_SystemPathsCocoa.h index b270896a8ca..bfdf92b4274 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCocoa.h +++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.h @@ -44,15 +44,15 @@ class GHOST_SystemPathsCocoa : public GHOST_SystemPaths { public: - /** - * Constructor. - */ - GHOST_SystemPathsCocoa(); - - /** - * Destructor. - */ - ~GHOST_SystemPathsCocoa(); + /** + * Constructor. + */ + GHOST_SystemPathsCocoa(); + + /** + * Destructor. + */ + ~GHOST_SystemPathsCocoa(); /** * Determine the base dir in which shared resources are located. It will first try to use diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h index eddff8bb91b..8f301edce31 100644 --- a/intern/ghost/intern/GHOST_TaskbarWin32.h +++ b/intern/ghost/intern/GHOST_TaskbarWin32.h @@ -21,25 +21,25 @@ #define __ITaskbarList_INTERFACE_DEFINED__ extern "C" {const GUID CLSID_TaskbarList = {0x56FDF344, 0xFD6D, 0x11D0, {0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90} }; const GUID IID_ITaskbarList = {0x56FDF342, 0xFD6D, 0x11D0, {0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90} }; } - class ITaskbarList : public IUnknown - { - public: - virtual HRESULT STDMETHODCALLTYPE HrInit (void) = 0; - virtual HRESULT STDMETHODCALLTYPE AddTab (HWND hwnd) = 0; - virtual HRESULT STDMETHODCALLTYPE DeleteTab (HWND hwnd) = 0; - virtual HRESULT STDMETHODCALLTYPE ActivateTab (HWND hwnd) = 0; - virtual HRESULT STDMETHODCALLTYPE SetActiveAlt (HWND hwnd) = 0; - }; + class ITaskbarList : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE HrInit (void) = 0; + virtual HRESULT STDMETHODCALLTYPE AddTab (HWND hwnd) = 0; + virtual HRESULT STDMETHODCALLTYPE DeleteTab (HWND hwnd) = 0; + virtual HRESULT STDMETHODCALLTYPE ActivateTab (HWND hwnd) = 0; + virtual HRESULT STDMETHODCALLTYPE SetActiveAlt (HWND hwnd) = 0; + }; #endif /* ITaskbarList */ #ifndef __ITaskbarList2_INTERFACE_DEFINED__ #define __ITaskbarList2_INTERFACE_DEFINED__ extern "C" {const GUID IID_ITaskbarList2 = {0x602D4995, 0xB13A, 0x429b, {0xA6, 0x6E, 0x19, 0x35, 0xE4, 0x4F, 0x43, 0x17} }; } - class ITaskbarList2 : public ITaskbarList - { - public: - virtual HRESULT STDMETHODCALLTYPE MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen) = 0; - }; + class ITaskbarList2 : public ITaskbarList + { + public: + virtual HRESULT STDMETHODCALLTYPE MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen) = 0; + }; #endif /* ITaskbarList2 */ #ifndef __ITaskbarList3_INTERFACE_DEFINED__ @@ -51,9 +51,9 @@ typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMA #define THBN_CLICKED 0x1800 extern "C" {const GUID IID_ITaskList3 = { 0xEA1AFB91, 0x9E28, 0x4B86, {0x90, 0xE9, 0x9E, 0x9F, 0x8A, 0x5E, 0xEF, 0xAF} };} - class ITaskbarList3 : public ITaskbarList2 - { - public: + class ITaskbarList3 : public ITaskbarList2 + { + public: virtual HRESULT STDMETHODCALLTYPE SetProgressValue (HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) = 0; virtual HRESULT STDMETHODCALLTYPE SetProgressState (HWND hwnd, TBPFLAG tbpFlags) = 0; virtual HRESULT STDMETHODCALLTYPE RegisterTab (HWND hwndTab, HWND hwndMDI) = 0; @@ -62,11 +62,11 @@ typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMA virtual HRESULT STDMETHODCALLTYPE SetTabActive (HWND hwndTab, HWND hwndMDI, DWORD dwReserved) = 0; virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons (HWND hwnd, UINT cButtons, THUMBBUTTON * pButton) = 0; virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons (HWND hwnd, UINT cButtons, THUMBBUTTON * pButton) = 0; - virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList (HWND hwnd, HIMAGELIST himl) = 0; + virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList (HWND hwnd, HIMAGELIST himl) = 0; virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon (HWND hwnd, HICON hIcon, LPCWSTR pszDescription) = 0; virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip (HWND hwnd, LPCWSTR pszTip) = 0; virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip (HWND hwnd, RECT *prcClip) = 0; - }; + }; #endif /* ITaskbarList3 */ #endif /*GHOST_TASKBARWIN32_H_*/ diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 66990abb555..341c1e23463 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -339,11 +339,11 @@ protected: /** Number of samples used in anti-aliasing, set to 0 if no AA **/ GHOST_TUns16 m_numOfAASamples; - - /** Full-screen width */ - GHOST_TUns32 m_fullScreenWidth; - /** Full-screen height */ - GHOST_TUns32 m_fullScreenHeight; + + /** Full-screen width */ + GHOST_TUns32 m_fullScreenWidth; + /** Full-screen height */ + GHOST_TUns32 m_fullScreenHeight; }; diff --git a/intern/ghost/intern/GHOST_WindowCarbon.h b/intern/ghost/intern/GHOST_WindowCarbon.h index 650788d5c70..a4386ce884b 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.h +++ b/intern/ghost/intern/GHOST_WindowCarbon.h @@ -200,12 +200,12 @@ public: virtual GHOST_TSuccess activateDrawingContext(); virtual void loadCursor(bool visible, GHOST_TStandardCursor cursor) const; - - /** - * Returns the dirty state of the window when in full-screen mode. - * @return Whether it is dirty. - */ - virtual bool getFullScreenDirty(); + + /** + * Returns the dirty state of the window when in full-screen mode. + * @return Whether it is dirty. + */ + virtual bool getFullScreenDirty(); /* accessor for fullscreen window */ virtual void setMac_windowState(short value); @@ -257,24 +257,24 @@ protected: int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color); virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY); - - /** - * Converts a string object to a Mac Pascal string. - * @param in The string object to be converted. - * @param out The converted string. - */ - virtual void gen2mac(const STR_String& in, Str255 out) const; - - /** - * Converts a Mac Pascal string to a string object. - * @param in The string to be converted. - * @param out The converted string object. - */ - virtual void mac2gen(const Str255 in, STR_String& out) const; + + /** + * Converts a string object to a Mac Pascal string. + * @param in The string object to be converted. + * @param out The converted string. + */ + virtual void gen2mac(const STR_String& in, Str255 out) const; + + /** + * Converts a Mac Pascal string to a string object. + * @param in The string to be converted. + * @param out The converted string object. + */ + virtual void mac2gen(const Str255 in, STR_String& out) const; - WindowRef m_windowRef; - CGrafPtr m_grafPtr; - AGLContext m_aglCtx; + WindowRef m_windowRef; + CGrafPtr m_grafPtr; + AGLContext m_aglCtx; /** The first created OpenGL context (for sharing display lists) */ static AGLContext s_firstaglCtx; @@ -282,9 +282,9 @@ protected: Cursor* m_customCursor; GHOST_TabletData m_tablet; - - /** When running in full-screen this tells whether to refresh the window. */ - bool m_fullScreenDirty; + + /** When running in full-screen this tells whether to refresh the window. */ + bool m_fullScreenDirty; /** specific MacOs X full screen window setting as we use partially system mechanism values : 0 not maximizable default @@ -295,17 +295,17 @@ protected: in order to be unified with GHOST fullscreen/maximised settings (lukep) - **/ - + **/ + short mac_windowState; - /** - * The width/height of the size rectangle in the lower right corner of a - * Mac/Carbon window. This is also the height of the gutter area. - */ + /** + * The width/height of the size rectangle in the lower right corner of a + * Mac/Carbon window. This is also the height of the gutter area. + */ #ifdef GHOST_DRAW_CARBON_GUTTER - static const GHOST_TInt32 s_sizeRectSize; + static const GHOST_TInt32 s_sizeRectSize; #endif // GHOST_DRAW_CARBON_GUTTER }; diff --git a/intern/ghost/test/gears/GHOST_C-Test.c b/intern/ghost/test/gears/GHOST_C-Test.c index c582d205258..190857403bd 100644 --- a/intern/ghost/test/gears/GHOST_C-Test.c +++ b/intern/ghost/test/gears/GHOST_C-Test.c @@ -190,16 +190,16 @@ static void gearGL(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GL static void drawGearGL(int id) { - static GLfloat pos[4] = { 5.0f, 5.0f, 10.0f, 1.0f }; - static GLfloat ared[4] = { 0.8f, 0.1f, 0.0f, 1.0f }; - static GLfloat agreen[4] = { 0.0f, 0.8f, 0.2f, 1.0f }; - static GLfloat ablue[4] = { 0.2f, 0.2f, 1.0f, 1.0f }; + static GLfloat pos[4] = { 5.0f, 5.0f, 10.0f, 1.0f }; + static GLfloat ared[4] = { 0.8f, 0.1f, 0.0f, 1.0f }; + static GLfloat agreen[4] = { 0.0f, 0.8f, 0.2f, 1.0f }; + static GLfloat ablue[4] = { 0.2f, 0.2f, 1.0f, 1.0f }; - glLightfv(GL_LIGHT0, GL_POSITION, pos); - glEnable(GL_CULL_FACE); - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_DEPTH_TEST); + glLightfv(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); switch (id) { @@ -218,40 +218,40 @@ static void drawGearGL(int id) default: break; } - glEnable(GL_NORMALIZE); + glEnable(GL_NORMALIZE); } static void drawGL(void) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glPushMatrix(); + glPushMatrix(); - glRotatef(view_rotx, 1.0, 0.0, 0.0); - glRotatef(view_roty, 0.0, 1.0, 0.0); - glRotatef(view_rotz, 0.0, 0.0, 1.0); + glRotatef(view_rotx, 1.0, 0.0, 0.0); + glRotatef(view_roty, 0.0, 1.0, 0.0); + glRotatef(view_rotz, 0.0, 0.0, 1.0); - glPushMatrix(); - glTranslatef(-3.0, -2.0, 0.0); - glRotatef(fAngle, 0.0, 0.0, 1.0); - drawGearGL(1); - glPopMatrix(); + glPushMatrix(); + glTranslatef(-3.0, -2.0, 0.0); + glRotatef(fAngle, 0.0, 0.0, 1.0); + drawGearGL(1); + glPopMatrix(); - glPushMatrix(); - glTranslatef(3.1f, -2.0f, 0.0f); - glRotatef((float)(-2.0*fAngle-9.0), 0.0, 0.0, 1.0); - drawGearGL(2); - glPopMatrix(); + glPushMatrix(); + glTranslatef(3.1f, -2.0f, 0.0f); + glRotatef((float)(-2.0*fAngle-9.0), 0.0, 0.0, 1.0); + drawGearGL(2); + glPopMatrix(); - glPushMatrix(); - glTranslatef(-3.1f, 2.2f, -1.8f); - glRotatef(90.0f, 1.0f, 0.0f, 0.0f); - glRotatef((float)(2.0*fAngle-2.0), 0.0, 0.0, 1.0); - drawGearGL(3); - glPopMatrix(); + glPushMatrix(); + glTranslatef(-3.1f, 2.2f, -1.8f); + glRotatef(90.0f, 1.0f, 0.0f, 0.0f); + glRotatef((float)(2.0*fAngle-2.0), 0.0, 0.0, 1.0); + drawGearGL(3); + glPopMatrix(); - glPopMatrix(); + glPopMatrix(); } @@ -260,21 +260,21 @@ static void setViewPortGL(GHOST_WindowHandle hWindow) GHOST_RectangleHandle hRect = NULL; GLfloat w, h; - GHOST_ActivateWindowDrawingContext(hWindow); - hRect = GHOST_GetClientBounds(hWindow); + GHOST_ActivateWindowDrawingContext(hWindow); + hRect = GHOST_GetClientBounds(hWindow); - w = (float)GHOST_GetWidthRectangle(hRect) / (float)GHOST_GetHeightRectangle(hRect); - h = 1.0; + w = (float)GHOST_GetWidthRectangle(hRect) / (float)GHOST_GetHeightRectangle(hRect); + h = 1.0; glViewport(0, 0, GHOST_GetWidthRectangle(hRect), GHOST_GetHeightRectangle(hRect)); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glFrustum(-w, w, -h, h, 5.0, 60.0); + glFrustum(-w, w, -h, h, 5.0, 60.0); /* glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10); */ glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - glTranslatef(0.0, 0.0, -40.0); + glTranslatef(0.0, 0.0, -40.0); glClearColor(.2f,0.0f,0.0f,0.0f); glClear(GL_COLOR_BUFFER_BIT); @@ -541,8 +541,8 @@ int main(int argc, char** argv) static void gearsTimerProc(GHOST_TimerTaskHandle hTask, GHOST_TUns64 time) { GHOST_WindowHandle hWindow = NULL; - fAngle += 2.0; - view_roty += 1.0; + fAngle += 2.0; + view_roty += 1.0; hWindow = (GHOST_WindowHandle)GHOST_GetTimerTaskUserData(hTask); if (GHOST_GetFullScreen(shSystem)) { diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h index 9c687407512..2b5ba449602 100644 --- a/intern/string/STR_String.h +++ b/intern/string/STR_String.h @@ -95,11 +95,11 @@ public: STR_String& Format(const char *fmt, ...); // Set formatted text to string STR_String& FormatAdd(const char *fmt, ...); // Add formatted text to string inline void Clear() { Len = pData[0] = 0; } - inline const STR_String & Reverse() - { - for (int i1=0, i2=Len-1; i1