From 112b1a0779d0e570f8b6726b2d3deb4f45d784a5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 19 May 2012 09:23:08 +0000 Subject: [PATCH] style cleanup: ghost headers --- intern/ghost/GHOST_C-api.h | 202 +++++++++--------- intern/ghost/GHOST_IEvent.h | 10 +- intern/ghost/GHOST_IEventConsumer.h | 2 +- intern/ghost/GHOST_ISystem.h | 94 ++++---- intern/ghost/GHOST_ISystemPaths.h | 24 ++- intern/ghost/GHOST_ITimerTask.h | 8 +- intern/ghost/GHOST_IWindow.h | 44 ++-- intern/ghost/GHOST_Path-api.h | 14 +- intern/ghost/GHOST_Rect.h | 33 +-- intern/ghost/GHOST_Types.h | 86 ++++---- intern/ghost/intern/GHOST_Buttons.h | 6 +- .../intern/GHOST_CallbackEventConsumer.h | 10 +- .../ghost/intern/GHOST_DisplayManagerCarbon.h | 2 +- .../ghost/intern/GHOST_DisplayManagerNULL.h | 2 +- intern/ghost/intern/GHOST_DisplayManagerSDL.h | 4 +- intern/ghost/intern/GHOST_DropTargetWin32.h | 51 +++-- intern/ghost/intern/GHOST_Event.h | 6 +- intern/ghost/intern/GHOST_EventButton.h | 2 +- intern/ghost/intern/GHOST_EventCursor.h | 2 +- intern/ghost/intern/GHOST_EventDragnDrop.h | 14 +- intern/ghost/intern/GHOST_EventKey.h | 8 +- intern/ghost/intern/GHOST_EventManager.h | 36 ++-- intern/ghost/intern/GHOST_EventNDOF.h | 41 ++-- intern/ghost/intern/GHOST_EventPrinter.h | 4 +- intern/ghost/intern/GHOST_EventString.h | 7 +- intern/ghost/intern/GHOST_EventTrackpad.h | 2 +- intern/ghost/intern/GHOST_EventWheel.h | 2 +- intern/ghost/intern/GHOST_ModifierKeys.h | 3 +- intern/ghost/intern/GHOST_NDOFManager.h | 10 +- intern/ghost/intern/GHOST_System.h | 98 ++++----- intern/ghost/intern/GHOST_SystemCarbon.h | 46 ++-- intern/ghost/intern/GHOST_SystemCocoa.h | 58 ++--- intern/ghost/intern/GHOST_SystemNULL.h | 26 +-- intern/ghost/intern/GHOST_SystemPaths.h | 30 +-- intern/ghost/intern/GHOST_SystemPathsCarbon.h | 18 +- intern/ghost/intern/GHOST_SystemPathsCocoa.h | 14 +- intern/ghost/intern/GHOST_SystemPathsWin32.h | 6 +- intern/ghost/intern/GHOST_SystemSDL.h | 2 +- intern/ghost/intern/GHOST_SystemWin32.h | 62 +++--- intern/ghost/intern/GHOST_TaskbarWin32.h | 76 +++---- intern/ghost/intern/GHOST_TimerManager.h | 12 +- intern/ghost/intern/GHOST_TimerTask.h | 10 +- intern/ghost/intern/GHOST_Window.h | 56 ++--- intern/ghost/intern/GHOST_WindowCarbon.h | 72 ++++--- intern/ghost/intern/GHOST_WindowCocoa.h | 58 ++--- intern/ghost/intern/GHOST_WindowManager.h | 28 +-- intern/ghost/intern/GHOST_WindowNULL.h | 32 +-- intern/ghost/intern/GHOST_WindowSDL.h | 22 +- intern/ghost/intern/GHOST_WindowWin32.h | 96 +++++---- 49 files changed, 798 insertions(+), 753 deletions(-) diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 3add5ccb60a..7f33f2bdcde 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -30,7 +30,7 @@ * \brief GHOST C-API function and type declarations. */ -#ifndef __GHOST_C_API_H__ +#ifndef __GHOST_C_API_H__ #define __GHOST_C_API_H__ #include "GHOST_Types.h" @@ -113,10 +113,10 @@ extern GHOST_TUns64 GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle); * @return A timer task (0 if timer task installation failed). */ extern GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, - GHOST_TUns64 delay, - GHOST_TUns64 interval, - GHOST_TimerProcPtr timerProc, - GHOST_TUserDataPtr userData); + GHOST_TUns64 delay, + GHOST_TUns64 interval, + GHOST_TimerProcPtr timerProc, + GHOST_TUserDataPtr userData); /** * Removes a timer. @@ -125,11 +125,11 @@ extern GHOST_TimerTaskHandle GHOST_InstallTimer(GHOST_SystemHandle systemhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle, - GHOST_TimerTaskHandle timertaskhandle); + GHOST_TimerTaskHandle timertaskhandle); /*************************************************************************************** - ** Display/window management functionality - ***************************************************************************************/ +** Display/window management functionality +***************************************************************************************/ /** * Returns the number of displays on this system. @@ -146,8 +146,8 @@ extern GHOST_TUns8 GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle); * @return void. */ extern void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle, - GHOST_TUns32* width, - GHOST_TUns32* height); + GHOST_TUns32 *width, + GHOST_TUns32 *height); /** * Create a new window. @@ -166,15 +166,15 @@ extern void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle, * @return A handle to the new window ( == NULL if creation failed). */ extern GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle, - const char* title, - GHOST_TInt32 left, - GHOST_TInt32 top, - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - GHOST_TDrawingContextType type, - const int stereoVisual, - const GHOST_TUns16 numOfAASamples); + const char *title, + GHOST_TInt32 left, + GHOST_TInt32 top, + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + GHOST_TDrawingContextType type, + const int stereoVisual, + const GHOST_TUns16 numOfAASamples); /** * Returns the window user data. @@ -189,7 +189,7 @@ extern GHOST_TUserDataPtr GHOST_GetWindowUserData(GHOST_WindowHandle windowhandl * @param data The window user data. */ extern void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, - GHOST_TUserDataPtr userdata); + GHOST_TUserDataPtr userdata); /** * Dispose a window. @@ -198,7 +198,7 @@ extern void GHOST_SetWindowUserData(GHOST_WindowHandle windowhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle, - GHOST_WindowHandle windowhandle); + GHOST_WindowHandle windowhandle); /** * Returns whether a window is valid. @@ -207,7 +207,7 @@ extern GHOST_TSuccess GHOST_DisposeWindow(GHOST_SystemHandle systemhandle, * @return Indication of validity. */ extern int GHOST_ValidWindow(GHOST_SystemHandle systemhandle, - GHOST_WindowHandle windowhandle); + GHOST_WindowHandle windowhandle); /** * Begins full screen mode. @@ -217,8 +217,8 @@ extern int GHOST_ValidWindow(GHOST_SystemHandle systemhandle, * This window is invalid after full screen has been ended. */ extern GHOST_WindowHandle GHOST_BeginFullScreen(GHOST_SystemHandle systemhandle, - GHOST_DisplaySetting* setting, - const int stereoVisual); + GHOST_DisplaySetting *setting, + const int stereoVisual); /** * Ends full screen mode. @@ -235,8 +235,8 @@ extern GHOST_TSuccess GHOST_EndFullScreen(GHOST_SystemHandle systemhandle); extern int GHOST_GetFullScreen(GHOST_SystemHandle systemhandle); /*************************************************************************************** - ** Event management functionality - ***************************************************************************************/ +** Event management functionality +***************************************************************************************/ /** * Retrieves events from the system and stores them in the queue. @@ -261,7 +261,7 @@ extern int GHOST_DispatchEvents(GHOST_SystemHandle systemhandle); * @return Indication of success. */ extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, - GHOST_EventConsumerHandle consumerhandle); + GHOST_EventConsumerHandle consumerhandle); /** * Remove the given event consumer to our list. @@ -270,11 +270,11 @@ extern GHOST_TSuccess GHOST_AddEventConsumer(GHOST_SystemHandle systemhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle, - GHOST_EventConsumerHandle consumerhandle); + GHOST_EventConsumerHandle consumerhandle); /*************************************************************************************** - ** Progress bar functionality - ***************************************************************************************/ +** Progress bar functionality +***************************************************************************************/ /** * Sets the progress bar value displayed in the window/application icon @@ -290,8 +290,8 @@ extern GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle, floa extern GHOST_TSuccess GHOST_EndProgressBar(GHOST_WindowHandle windowhandle); /*************************************************************************************** - ** Cursor management functionality - ***************************************************************************************/ +** Cursor management functionality +***************************************************************************************/ /** * Returns the current cursor shape. @@ -307,7 +307,7 @@ extern GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandl * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle, - GHOST_TStandardCursor cursorshape); + GHOST_TStandardCursor cursorshape); /** * Set the shape of the cursor to a custom cursor. @@ -319,10 +319,10 @@ extern GHOST_TSuccess GHOST_SetCursorShape(GHOST_WindowHandle windowhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle, - GHOST_TUns8 bitmap[16][2], - GHOST_TUns8 mask[16][2], - int hotX, - int hotY); + GHOST_TUns8 bitmap[16][2], + GHOST_TUns8 mask[16][2], + int hotX, + int hotY); /** * Set the shape of the cursor to a custom cursor of specified size. * @param windowhandle The handle to the window @@ -333,13 +333,13 @@ extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle * @param hotY The Y coordinate of the cursor hotspot. * @param fg_color, bg_color Colors of the cursor * @return Indication of success. - */ + */ extern GHOST_TSuccess GHOST_SetCustomCursorShapeEx(GHOST_WindowHandle windowhandle, - GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, - int sizex, int sizey, - int hotX, int hotY, - int fg_color, int bg_color ); + GHOST_TUns8 *bitmap, + GHOST_TUns8 *mask, + int sizex, int sizey, + int hotX, int hotY, + int fg_color, int bg_color); /** * Returns the visibility state of the cursor. @@ -355,7 +355,7 @@ extern int GHOST_GetCursorVisibility(GHOST_WindowHandle windowhandle); * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, - int visible); + int visible); /** * Returns the current location of the cursor (location in screen coordinates) @@ -365,8 +365,8 @@ extern GHOST_TSuccess GHOST_SetCursorVisibility(GHOST_WindowHandle windowhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_GetCursorPosition(GHOST_SystemHandle systemhandle, - GHOST_TInt32* x, - GHOST_TInt32* y); + GHOST_TInt32 *x, + GHOST_TInt32 *y); /** * Updates the location of the cursor (location in screen coordinates). @@ -377,8 +377,8 @@ extern GHOST_TSuccess GHOST_GetCursorPosition(GHOST_SystemHandle systemhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle, - GHOST_TInt32 x, - GHOST_TInt32 y); + GHOST_TInt32 x, + GHOST_TInt32 y); /** * Grabs the cursor for a modal operation, to keep receiving @@ -390,12 +390,12 @@ extern GHOST_TSuccess GHOST_SetCursorPosition(GHOST_SystemHandle systemhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle, - GHOST_TGrabCursorMode mode, - int* bounds); + GHOST_TGrabCursorMode mode, + int *bounds); /*************************************************************************************** - ** Access to mouse button and keyboard states. - ***************************************************************************************/ +** Access to mouse button and keyboard states. +***************************************************************************************/ /** * Returns the state of a modifier key (ouside the message queue). @@ -405,8 +405,8 @@ extern GHOST_TSuccess GHOST_SetCursorGrab(GHOST_WindowHandle windowhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle, - GHOST_TModifierKeyMask mask, - int* isDown); + GHOST_TModifierKeyMask mask, + int *isDown); /** * Returns the state of a mouse button (ouside the message queue). @@ -416,13 +416,13 @@ extern GHOST_TSuccess GHOST_GetModifierKeyState(GHOST_SystemHandle systemhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle, - GHOST_TButtonMask mask, - int* isDown); + GHOST_TButtonMask mask, + int *isDown); /*************************************************************************************** - ** Drag'n'drop operations - ***************************************************************************************/ +** Drag'n'drop operations +***************************************************************************************/ /** * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop @@ -472,7 +472,7 @@ extern GHOST_TimerProcPtr GHOST_GetTimerProc(GHOST_TimerTaskHandle timertaskhand * @param timerProc The timer callback. */ extern void GHOST_SetTimerProc(GHOST_TimerTaskHandle timertaskhandle, - GHOST_TimerProcPtr timerProc); + GHOST_TimerProcPtr timerProc); /** * Returns the timer user data. @@ -487,7 +487,7 @@ extern GHOST_TUserDataPtr GHOST_GetTimerTaskUserData(GHOST_TimerTaskHandle timer * @param data The timer user data. */ extern void GHOST_SetTimerTaskUserData(GHOST_TimerTaskHandle timertaskhandle, - GHOST_TUserDataPtr userData); + GHOST_TUserDataPtr userData); /** * Returns indication as to whether the window is valid. @@ -510,7 +510,7 @@ extern GHOST_TDrawingContextType GHOST_GetDrawingContextType(GHOST_WindowHandle * @return Indication as to whether installation has succeeded. */ extern GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandle, - GHOST_TDrawingContextType type); + GHOST_TDrawingContextType type); /** * Sets the title displayed in the title bar. @@ -518,7 +518,7 @@ extern GHOST_TSuccess GHOST_SetDrawingContextType(GHOST_WindowHandle windowhandl * @param title The title to display in the title bar. */ extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle, - const char* title); + const char *title); /** * Returns the title displayed in the title bar. The title @@ -527,7 +527,7 @@ extern void GHOST_SetTitle(GHOST_WindowHandle windowhandle, * @param windowhandle The handle to the window * @return The title, free with free(). */ -extern char* GHOST_GetTitle(GHOST_WindowHandle windowhandle); +extern char *GHOST_GetTitle(GHOST_WindowHandle windowhandle); /** * Returns the window rectangle dimensions. @@ -558,7 +558,7 @@ void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle); * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, - GHOST_TUns32 width); + GHOST_TUns32 width); /** * Resizes client rectangle height. @@ -567,7 +567,7 @@ extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, - GHOST_TUns32 height); + GHOST_TUns32 height); /** * Resizes client rectangle. @@ -577,8 +577,8 @@ extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle, - GHOST_TUns32 width, - GHOST_TUns32 height); + GHOST_TUns32 width, + GHOST_TUns32 height); /** * Converts a point in screen coordinates to client rectangle coordinates @@ -589,10 +589,10 @@ extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle, * @param outY The y-coordinate in the client rectangle. */ extern void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle, - GHOST_TInt32 inX, - GHOST_TInt32 inY, - GHOST_TInt32* outX, - GHOST_TInt32* outY); + GHOST_TInt32 inX, + GHOST_TInt32 inY, + GHOST_TInt32 *outX, + GHOST_TInt32 *outY); /** * Converts a point in screen coordinates to client rectangle coordinates @@ -603,10 +603,10 @@ extern void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle, * @param outY The y-coordinate on the screen. */ extern void GHOST_ClientToScreen(GHOST_WindowHandle windowhandle, - GHOST_TInt32 inX, - GHOST_TInt32 inY, - GHOST_TInt32* outX, - GHOST_TInt32* outY); + GHOST_TInt32 inX, + GHOST_TInt32 inY, + GHOST_TInt32 *outX, + GHOST_TInt32 *outY); /** * Returns the state of the window (normal, minimized, maximized). @@ -622,7 +622,7 @@ extern GHOST_TWindowState GHOST_GetWindowState(GHOST_WindowHandle windowhandle); * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle, - GHOST_TWindowState state); + GHOST_TWindowState state); /** @@ -632,7 +632,7 @@ extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle, * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, - GHOST_TUns8 isUnsavedChanges); + GHOST_TUns8 isUnsavedChanges); /** * Sets the order of the window (bottom, top). @@ -641,7 +641,7 @@ extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhand * @return Indication of success. */ extern GHOST_TSuccess GHOST_SetWindowOrder(GHOST_WindowHandle windowhandle, - GHOST_TWindowOrder order); + GHOST_TWindowOrder order); /** * Swaps front and back buffers of a window. @@ -694,10 +694,10 @@ extern GHOST_TInt32 GHOST_GetHeightRectangle(GHOST_RectangleHandle rectanglehand * @param b Pointer to return bottom coordinate in. */ extern void GHOST_GetRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_TInt32* l, - GHOST_TInt32* t, - GHOST_TInt32* r, - GHOST_TInt32* b); + GHOST_TInt32 *l, + GHOST_TInt32 *t, + GHOST_TInt32 *r, + GHOST_TInt32 *b); /** * Sets all members of the rectangle. @@ -708,10 +708,10 @@ extern void GHOST_GetRectangle(GHOST_RectangleHandle rectanglehandle, * @param b requested bottom coordinate of the rectangle */ extern void GHOST_SetRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_TInt32 l, - GHOST_TInt32 t, - GHOST_TInt32 r, - GHOST_TInt32 b); + GHOST_TInt32 l, + GHOST_TInt32 t, + GHOST_TInt32 r, + GHOST_TInt32 b); /** * Returns whether this rectangle is empty. @@ -736,7 +736,7 @@ extern GHOST_TSuccess GHOST_IsValidRectangle(GHOST_RectangleHandle rectanglehand * @param i The amount of offset given to each extreme (negative values shrink the rectangle). */ extern void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_TInt32 i); + GHOST_TInt32 i); /** * Does a union of the rectangle given and this rectangle. @@ -745,7 +745,7 @@ extern void GHOST_InsetRectangle(GHOST_RectangleHandle rectanglehandle, * @param r The rectangle that is input for the union operation. */ extern void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_RectangleHandle anotherrectanglehandle); + GHOST_RectangleHandle anotherrectanglehandle); /** * Grows the rectangle to included a point. @@ -754,8 +754,8 @@ extern void GHOST_UnionRectangle(GHOST_RectangleHandle rectanglehandle, * @param y The y-coordinate of the point. */ extern void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_TInt32 x, - GHOST_TInt32 y); + GHOST_TInt32 x, + GHOST_TInt32 y); /** * Returns whether the point is inside this rectangle. @@ -766,8 +766,8 @@ extern void GHOST_UnionPointRectangle(GHOST_RectangleHandle rectanglehandle, * @return intean value (true if point is inside). */ extern GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_TInt32 x, - GHOST_TInt32 y); + GHOST_TInt32 x, + GHOST_TInt32 y); /** * Returns whether the rectangle is inside this rectangle. @@ -776,7 +776,7 @@ extern GHOST_TSuccess GHOST_IsInsideRectangle(GHOST_RectangleHandle rectanglehan * @return visibility (not, partially or fully visible). */ extern GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rectanglehandle, - GHOST_RectangleHandle anotherrectanglehandle); + GHOST_RectangleHandle anotherrectanglehandle); /** * Sets rectangle members. @@ -786,8 +786,8 @@ extern GHOST_TVisibility GHOST_GetRectangleVisibility(GHOST_RectangleHandle rect * @param cy requested center y-coordinate of the rectangle */ extern void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_TInt32 cx, - GHOST_TInt32 cy); + GHOST_TInt32 cx, + GHOST_TInt32 cy); /** * Sets rectangle members. @@ -800,10 +800,10 @@ extern void GHOST_SetCenterRectangle(GHOST_RectangleHandle rectanglehandle, * @param h requested height of the rectangle */ extern void GHOST_SetRectangleCenter(GHOST_RectangleHandle rectanglehandle, - GHOST_TInt32 cx, - GHOST_TInt32 cy, - GHOST_TInt32 w, - GHOST_TInt32 h); + GHOST_TInt32 cx, + GHOST_TInt32 cy, + GHOST_TInt32 w, + GHOST_TInt32 h); /** * Clips a rectangle. @@ -814,14 +814,14 @@ extern void GHOST_SetRectangleCenter(GHOST_RectangleHandle rectanglehandle, * @return whether clipping has occurred */ extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, - GHOST_RectangleHandle anotherrectanglehandle); + GHOST_RectangleHandle anotherrectanglehandle); /** * Return the data from the clipboad * @param return the selection instead, X11 only feature * @return clipboard data */ -extern GHOST_TUns8* GHOST_getClipboard(int selection); +extern GHOST_TUns8 *GHOST_getClipboard(int selection); /** * Put data to the Clipboard diff --git a/intern/ghost/GHOST_IEvent.h b/intern/ghost/GHOST_IEvent.h index 05bd3553e01..3c3111a2e6d 100644 --- a/intern/ghost/GHOST_IEvent.h +++ b/intern/ghost/GHOST_IEvent.h @@ -77,7 +77,7 @@ public: * or NULL if it is a 'system' event. * @return The generating window. */ - virtual GHOST_IWindow* getWindow() = 0; + virtual GHOST_IWindow *getWindow() = 0; /** * Returns the event data. @@ -87,8 +87,12 @@ public: #ifdef WITH_CXX_GUARDEDALLOC public: - void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IEvent"); } - void operator delete( void *mem ) { MEM_freeN(mem); } + void *operator new(size_t num_bytes) { + return MEM_mallocN(num_bytes, "GHOST:GHOST_IEvent"); + } + void operator delete(void *mem) { + MEM_freeN(mem); + } #endif }; diff --git a/intern/ghost/GHOST_IEventConsumer.h b/intern/ghost/GHOST_IEventConsumer.h index 043cb27d1b2..d437f219f8d 100644 --- a/intern/ghost/GHOST_IEventConsumer.h +++ b/intern/ghost/GHOST_IEventConsumer.h @@ -61,7 +61,7 @@ public: * @param event The event that can be handled or ignored. * @return Indication as to whether the event was handled. */ - virtual bool processEvent(GHOST_IEvent* event) = 0; + virtual bool processEvent(GHOST_IEvent *event) = 0; #ifdef WITH_CXX_GUARDEDALLOC public: diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index 890917f9822..bd4f3aed5aa 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -129,12 +129,12 @@ class GHOST_IEventConsumer; * There should be only one system class in an application. * Therefore, the routines to create and dispose the system are static. * Provides: - * -# Time(r) management. - * -# Display/window management (windows are only created on the main display). - * -# Event management. - * -# Cursor shape management (no custom cursors for now). - * -# Access to the state of the mouse buttons and the keyboard. - * -# Menus for windows with events generated when they are accessed (this is + * -# Time(r) management. + * -# Display/window management (windows are only created on the main display). + * -# Event management. + * -# Cursor shape management (no custom cursors for now). + * -# Access to the state of the mouse buttons and the keyboard. + * -# Menus for windows with events generated when they are accessed (this is * work in progress). * @author Maarten Gribnau * @date May 30, 2001 @@ -158,25 +158,27 @@ public: * Returns a pointer to the one and only system (nil if it hasn't been created). * @return A pointer to the system. */ - static GHOST_ISystem* getSystem(); + static GHOST_ISystem *getSystem(); protected: /** * Constructor. * Protected default constructor to force use of static createSystem member. */ - GHOST_ISystem() {} + GHOST_ISystem() { + } /** * Destructor. * Protected default constructor to force use of static dispose member. */ - virtual ~GHOST_ISystem() {} + virtual ~GHOST_ISystem() { + } public: /*************************************************************************************** - ** Time(r) functionality - ***************************************************************************************/ + ** Time(r) functionality + ***************************************************************************************/ /** * Returns the system time. @@ -196,7 +198,7 @@ public: * @param userData Placeholder for user data. * @return A timer task (0 if timer task installation failed). */ - virtual GHOST_ITimerTask* installTimer(GHOST_TUns64 delay, + virtual GHOST_ITimerTask *installTimer(GHOST_TUns64 delay, GHOST_TUns64 interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData = 0) = 0; @@ -206,17 +208,17 @@ public: * @param timerTask Timer task to be removed. * @return Indication of success. */ - virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask* timerTask) = 0; + virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask *timerTask) = 0; /*************************************************************************************** - ** Display/window management functionality - ***************************************************************************************/ + ** Display/window management functionality + ***************************************************************************************/ /** * Returns the number of displays on this system. * @return The number of displays. */ - virtual GHOST_TUns8 getNumDisplays() const = 0; + virtual GHOST_TUns8 getNumDisplays() const = 0; /** * Returns the dimensions of the main display on this system. @@ -237,30 +239,30 @@ public: * @param type The type of drawing context installed in this window. * @param stereoVisual Create a stereo visual for quad buffered stereo. * @param numOfAASamples Number of samples used for AA (zero if no AA) - * @param parentWindow Parent (embedder) window + * @param parentWindow Parent (embedder) window * @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) = 0; + 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) = 0; /** * Dispose a window. * @param window Pointer to the window to be disposed. * @return Indication of success. */ - virtual GHOST_TSuccess disposeWindow(GHOST_IWindow* window) = 0; + virtual GHOST_TSuccess disposeWindow(GHOST_IWindow *window) = 0; /** * Returns whether a window is valid. * @param window Pointer to the window to be checked. * @return Indication of validity. */ - virtual bool validWindow(GHOST_IWindow* window) = 0; + virtual bool validWindow(GHOST_IWindow *window) = 0; /** * Begins full screen mode. @@ -269,8 +271,8 @@ public: * This window is invalid after full screen has been ended. * @return Indication of success. */ - virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0) = 0; + virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window, + const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0) = 0; /** * Updates the resolution while in fullscreen mode. @@ -279,7 +281,7 @@ public: * * @return Indication of success. */ - virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window) = 0; + virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window) = 0; /** * Ends full screen mode. @@ -294,8 +296,8 @@ public: virtual bool getFullScreen(void) = 0; /*************************************************************************************** - ** Event management functionality - ***************************************************************************************/ + ** Event management functionality + ***************************************************************************************/ /** * Retrieves events from the system and stores them in the queue. @@ -315,18 +317,18 @@ public: * @param consumer The event consumer to add. * @return Indication of success. */ - virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer* consumer) = 0; + virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer *consumer) = 0; /** * Removes the given event consumer to our list. * @param consumer The event consumer to remove. * @return Indication of success. */ - virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer* consumer) = 0; + virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer *consumer) = 0; /*************************************************************************************** - ** Cursor management functionality - ***************************************************************************************/ + ** Cursor management functionality + ***************************************************************************************/ /** * Returns the current location of the cursor (location in screen coordinates) @@ -346,8 +348,8 @@ public: virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) = 0; /*************************************************************************************** - ** Access to mouse button and keyboard states. - ***************************************************************************************/ + ** Access to mouse button and keyboard states. + ***************************************************************************************/ /** * Returns the state of a modifier key (ouside the message queue). @@ -377,15 +379,15 @@ public: virtual int toggleConsole(int action) = 0; /*************************************************************************************** - ** Access to clipboard. - ***************************************************************************************/ + ** Access to clipboard. + ***************************************************************************************/ /** * Returns the selection buffer * @return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer * */ - virtual GHOST_TUns8* getClipboard(bool selection) const = 0; + virtual GHOST_TUns8 *getClipboard(bool selection) const = 0; /** * Put data to the Clipboard @@ -396,7 +398,7 @@ public: * Confirms quitting he program when there is just one window left open * in the application */ - virtual int confirmQuit(GHOST_IWindow * window) const = 0; + virtual int confirmQuit(GHOST_IWindow *window) const = 0; protected: /** * Initialize the system. @@ -411,12 +413,16 @@ protected: virtual GHOST_TSuccess exit() = 0; /** The one and only system */ - static GHOST_ISystem* m_system; + static GHOST_ISystem *m_system; #ifdef WITH_CXX_GUARDEDALLOC public: - void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_ISystem"); } - void operator delete( void *mem ) { MEM_freeN(mem); } + void *operator new(size_t num_bytes) { + return MEM_mallocN(num_bytes, "GHOST:GHOST_ISystem"); + } + void operator delete(void *mem) { + MEM_freeN(mem); + } #endif }; diff --git a/intern/ghost/GHOST_ISystemPaths.h b/intern/ghost/GHOST_ISystemPaths.h index dea5436c485..f610fde4582 100644 --- a/intern/ghost/GHOST_ISystemPaths.h +++ b/intern/ghost/GHOST_ISystemPaths.h @@ -52,20 +52,22 @@ public: * Returns a pointer to the one and only system (nil if it hasn't been created). * @return A pointer to the system. */ - static GHOST_ISystemPaths* get(); + static GHOST_ISystemPaths *get(); protected: /** * Constructor. * Protected default constructor to force use of static createSystem member. */ - GHOST_ISystemPaths() {} + GHOST_ISystemPaths() { + } /** * Destructor. * Protected default constructor to force use of static dispose member. */ - virtual ~GHOST_ISystemPaths() {} + virtual ~GHOST_ISystemPaths() { + } public: /** @@ -73,29 +75,29 @@ public: * "unpack and run" path, then look for properly installed path, not including versioning. * @return Unsigned char string pointing to system dir (eg /usr/share/blender/). */ - virtual const GHOST_TUns8* getSystemDir() const = 0; + virtual const GHOST_TUns8 *getSystemDir() const = 0; /** * Determine the base dir in which user configuration is stored, not including versioning. * If needed, it will create the base directory. * @return Unsigned char string pointing to user dir (eg ~/.blender/). */ - virtual const GHOST_TUns8* getUserDir() const = 0; + virtual const GHOST_TUns8 *getUserDir() const = 0; /** - * Determine the directory of the current binary - * @return Unsigned char string pointing to the binary dir - */ - virtual const GHOST_TUns8* getBinaryDir() const = 0; + * Determine the directory of the current binary + * @return Unsigned char string pointing to the binary dir + */ + virtual const GHOST_TUns8 *getBinaryDir() const = 0; /** * Add the file to the operating system most recently used files */ - virtual void addToSystemRecentFiles(const char* filename) const = 0; + virtual void addToSystemRecentFiles(const char *filename) const = 0; private: /** The one and only system paths*/ - static GHOST_ISystemPaths* m_systemPaths; + static GHOST_ISystemPaths *m_systemPaths; }; #endif diff --git a/intern/ghost/GHOST_ITimerTask.h b/intern/ghost/GHOST_ITimerTask.h index bae41cf84d4..bb4a81be5f8 100644 --- a/intern/ghost/GHOST_ITimerTask.h +++ b/intern/ghost/GHOST_ITimerTask.h @@ -86,8 +86,12 @@ public: #ifdef WITH_CXX_GUARDEDALLOC public: - void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_ITimerTask"); } - void operator delete( void *mem ) { MEM_freeN(mem); } + void *operator new(size_t num_bytes) { + return MEM_mallocN(num_bytes, "GHOST:GHOST_ITimerTask"); + } + void operator delete(void *mem) { + MEM_freeN(mem); + } #endif }; diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 4ce8800fef6..e754883504d 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -70,13 +70,13 @@ public: * Returns indication as to whether the window is valid. * @return The validity of the window. */ - virtual bool getValid() const = 0; + virtual bool getValid() const = 0; /** * Returns the associated OS object/handle * @return The associated OS object/handle */ - virtual void* getOSWindow() const = 0; + virtual void *getOSWindow() const = 0; /** * Returns the type of drawing context used in this window. @@ -108,33 +108,33 @@ public: * These are screen coordinates. * @param bounds The bounding rectangle of the window. */ - virtual void getWindowBounds(GHOST_Rect& bounds) const = 0; + virtual void getWindowBounds(GHOST_Rect& bounds) const = 0; /** * Returns the client rectangle dimensions. * The left and top members of the rectangle are always zero. * @param bounds The bounding rectangle of the client area of the window. */ - virtual void getClientBounds(GHOST_Rect& bounds) const = 0; + virtual void getClientBounds(GHOST_Rect& bounds) const = 0; /** * Resizes client rectangle width. * @param width The new width of the client area of the window. */ - virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width) = 0; + virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width) = 0; /** * Resizes client rectangle height. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height) = 0; + virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height) = 0; /** * Resizes client rectangle. * @param width The new width of the client area of the window. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) = 0; + virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) = 0; /** * Converts a point in screen coordinates to client rectangle coordinates @@ -143,7 +143,7 @@ public: * @param outX The x-coordinate in the client rectangle. * @param outY The y-coordinate in the client rectangle. */ - virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; + virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; /** * Converts a point in screen coordinates to client rectangle coordinates @@ -152,7 +152,7 @@ public: * @param outX The x-coordinate on the screen. * @param outY The y-coordinate on the screen. */ - virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; + virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; /** * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop @@ -232,14 +232,14 @@ public: * Returns the tablet data (pressure etc). * @return The tablet data (pressure etc). */ - virtual const GHOST_TabletData* GetTabletData() = 0; + virtual const GHOST_TabletData *GetTabletData() = 0; /*************************************************************************************** - ** Progress bar functionality - ***************************************************************************************/ + ** Progress bar functionality + ***************************************************************************************/ /** - * Sets the progress bar value displayed in the window/application icon + * Sets the progress bar value displayed in the window/application icon * @param progress The progress % */ virtual GHOST_TSuccess setProgressBar(float progress) = 0; @@ -250,8 +250,8 @@ public: virtual GHOST_TSuccess endProgressBar() = 0; /*************************************************************************************** - ** Cursor management functionality - ***************************************************************************************/ + ** Cursor management functionality + ***************************************************************************************/ /** * Returns the current cursor shape. @@ -275,15 +275,15 @@ public: * @return Indication of success. */ virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 bitmap[16][2], - GHOST_TUns8 mask[16][2], - int hotX, - int hotY) = 0; + GHOST_TUns8 mask[16][2], + int hotX, + int hotY) = 0; virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, - int sizex, int sizey, - int hotX, int hotY, - int fg_color, int bg_color) = 0; + GHOST_TUns8 *mask, + int sizex, int sizey, + int hotX, int hotY, + int fg_color, int bg_color) = 0; /** * Returns the visibility state of the cursor. diff --git a/intern/ghost/GHOST_Path-api.h b/intern/ghost/GHOST_Path-api.h index f1b79a98082..811f39bb023 100644 --- a/intern/ghost/GHOST_Path-api.h +++ b/intern/ghost/GHOST_Path-api.h @@ -30,7 +30,7 @@ */ -#ifndef __GHOST_PATH_API_H__ +#ifndef __GHOST_PATH_API_H__ #define __GHOST_PATH_API_H__ #include "GHOST_Types.h" @@ -58,25 +58,25 @@ extern GHOST_TSuccess GHOST_DisposeSystemPaths(void); * "unpack and run" path, then look for properly installed path, not including versioning. * @return Unsigned char string pointing to system dir (eg /usr/share/blender/). */ -extern const GHOST_TUns8* GHOST_getSystemDir(void); +extern const GHOST_TUns8 *GHOST_getSystemDir(void); /** * Determine the base dir in which user configuration is stored, not including versioning. * @return Unsigned char string pointing to user dir (eg ~). */ -extern const GHOST_TUns8* GHOST_getUserDir(void); +extern const GHOST_TUns8 *GHOST_getUserDir(void); /** * Determine the dir in which the binary file is found. * @return Unsigned char string pointing to binary dir (eg ~/usr/local/bin/). */ -extern const GHOST_TUns8* GHOST_getBinaryDir(void); +extern const GHOST_TUns8 *GHOST_getBinaryDir(void); /** -* Add the file to the operating system most recently used files -*/ -extern void GHOST_addToSystemRecentFiles(const char* filename); + * Add the file to the operating system most recently used files + */ +extern void GHOST_addToSystemRecentFiles(const char *filename); #ifdef __cplusplus } diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h index 30d9d16b701..90678c6dfa2 100644 --- a/intern/ghost/GHOST_Rect.h +++ b/intern/ghost/GHOST_Rect.h @@ -55,20 +55,23 @@ public: * @param r requested right coordinate of the rectangle * @param b requested bottom coordinate of the rectangle */ - GHOST_Rect(GHOST_TInt32 l=0, GHOST_TInt32 t=0, GHOST_TInt32 r=0, GHOST_TInt32 b=0) - : m_l(l), m_t(t), m_r(r), m_b(b) {} + GHOST_Rect(GHOST_TInt32 l = 0, GHOST_TInt32 t = 0, GHOST_TInt32 r = 0, GHOST_TInt32 b = 0) + : m_l(l), m_t(t), m_r(r), m_b(b) + {} /** * Copy constructor. * @param r rectangle to copy */ GHOST_Rect(const GHOST_Rect& r) - : m_l(r.m_l), m_t(r.m_t), m_r(r.m_r), m_b(r.m_b) {} + : m_l(r.m_l), m_t(r.m_t), m_r(r.m_r), m_b(r.m_b) + {} /** * Destructor. */ - virtual ~GHOST_Rect() {}; + virtual ~GHOST_Rect() + {}; /** * Access to rectangle width. @@ -155,7 +158,7 @@ public: * @param cx requested center x-coordinate of the rectangle * @param cy requested center y-coordinate of the rectangle */ - virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy); + virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy); /** * Sets rectangle members. @@ -166,7 +169,7 @@ public: * @param w requested width of the rectangle * @param h requested height of the rectangle */ - virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h); + virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h); /** * Clips a rectangle. @@ -175,7 +178,7 @@ public: * @param r the rectangle to clip * @return whether clipping has occurred */ - virtual bool clip(GHOST_Rect& r) const; + virtual bool clip(GHOST_Rect& r) const; /** Left coordinate of the rectangle */ GHOST_TInt32 m_l; @@ -209,7 +212,7 @@ inline void GHOST_Rect::set(GHOST_TInt32 l, GHOST_TInt32 t, GHOST_TInt32 r, GHOS m_l = l; m_t = t; m_r = r; m_b = b; } -inline bool GHOST_Rect::isEmpty() const +inline bool GHOST_Rect::isEmpty() const { return (getWidth() == 0) || (getHeight() == 0); } @@ -237,18 +240,18 @@ inline void GHOST_Rect::unionPoint(GHOST_TInt32 x, GHOST_TInt32 y) #include inline void GHOST_Rect::wrapPoint(GHOST_TInt32 &x, GHOST_TInt32 &y, GHOST_TInt32 ofs) { - GHOST_TInt32 w= getWidth(); - GHOST_TInt32 h= getHeight(); + GHOST_TInt32 w = getWidth(); + GHOST_TInt32 h = getHeight(); /* highly unlikely but avoid eternal loop */ - if (w-ofs*2 <= 0 || h-ofs*2 <= 0) { + if (w - ofs * 2 <= 0 || h - ofs * 2 <= 0) { return; } - while(x-ofs < m_l) x+= w-(ofs*2); - while(y-ofs < m_t) y+= h-(ofs*2); - while(x+ofs > m_r) x-= w-(ofs*2); - while(y+ofs > m_b) y-= h-(ofs*2); + while (x - ofs < m_l) x += w - (ofs * 2); + while (y - ofs < m_t) y += h - (ofs * 2); + while (x + ofs > m_r) x -= w - (ofs * 2); + while (y + ofs > m_b) y -= h - (ofs * 2); } inline bool GHOST_Rect::isInside(GHOST_TInt32 x, GHOST_TInt32 y) const diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 583bfdf1f84..7614cb80e00 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -39,22 +39,22 @@ #define GHOST_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name -typedef char GHOST_TInt8; -typedef unsigned char GHOST_TUns8; -typedef short GHOST_TInt16; -typedef unsigned short GHOST_TUns16; -typedef int GHOST_TInt32; -typedef unsigned int GHOST_TUns32; +typedef char GHOST_TInt8; +typedef unsigned char GHOST_TUns8; +typedef short GHOST_TInt16; +typedef unsigned short GHOST_TUns16; +typedef int GHOST_TInt32; +typedef unsigned int GHOST_TUns32; #if defined(WIN32) && !defined(FREE_WINDOWS) -typedef __int64 GHOST_TInt64; -typedef unsigned __int64 GHOST_TUns64; +typedef __int64 GHOST_TInt64; +typedef unsigned __int64 GHOST_TUns64; #else -typedef long long GHOST_TInt64; -typedef unsigned long long GHOST_TUns64; +typedef long long GHOST_TInt64; +typedef unsigned long long GHOST_TUns64; #endif -typedef void* GHOST_TUserDataPtr; +typedef void *GHOST_TUserDataPtr; typedef enum { @@ -77,9 +77,9 @@ typedef enum { typedef struct GHOST_TabletData { GHOST_TTabletMode Active; /* 0=None, 1=Stylus, 2=Eraser */ - float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */ - float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */ - float Ytilt; /* as above */ + float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */ + float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */ + float Ytilt; /* as above */ } GHOST_TabletData; @@ -152,14 +152,14 @@ typedef enum { typedef enum { GHOST_kEventUnknown = 0, - GHOST_kEventCursorMove, /// Mouse move event - GHOST_kEventButtonDown, /// Mouse button event - GHOST_kEventButtonUp, /// Mouse button event - GHOST_kEventWheel, /// Mouse wheel event - GHOST_kEventTrackpad, /// Trackpad event + GHOST_kEventCursorMove, /// Mouse move event + GHOST_kEventButtonDown, /// Mouse button event + GHOST_kEventButtonUp, /// Mouse button event + GHOST_kEventWheel, /// Mouse wheel event + GHOST_kEventTrackpad, /// Trackpad event - GHOST_kEventNDOFMotion, /// N degree of freedom device motion event - GHOST_kEventNDOFButton, /// N degree of freedom device button event + GHOST_kEventNDOFMotion, /// N degree of freedom device motion event + GHOST_kEventNDOFButton, /// N degree of freedom device button event GHOST_kEventKeyDown, GHOST_kEventKeyUp, @@ -289,8 +289,8 @@ typedef enum { GHOST_kKeyRightControl, GHOST_kKeyLeftAlt, GHOST_kKeyRightAlt, - GHOST_kKeyOS, // Command key on Apple, Windows key(s) on Windows - GHOST_kKeyGrLess , // German PC only! + GHOST_kKeyOS, // Command key on Apple, Windows key(s) on Windows + GHOST_kKeyGrLess, // German PC only! GHOST_kKeyCapsLock, GHOST_kKeyNumLock, @@ -363,13 +363,13 @@ typedef enum { } GHOST_TKey; typedef enum { - GHOST_kGrabDisable = 0, /* grab not set */ - GHOST_kGrabNormal, /* no cursor adjustments */ - GHOST_kGrabWrap, /* wrap the mouse location to prevent limiting screen bounds */ - GHOST_kGrabHide, /* hide the mouse while grabbing and restore the original location on release (numbuts) */ + GHOST_kGrabDisable = 0, /* grab not set */ + GHOST_kGrabNormal, /* no cursor adjustments */ + GHOST_kGrabWrap, /* wrap the mouse location to prevent limiting screen bounds */ + GHOST_kGrabHide, /* hide the mouse while grabbing and restore the original location on release (numbuts) */ } GHOST_TGrabCursorMode; -typedef void* GHOST_TEventDataPtr; +typedef void *GHOST_TEventDataPtr; typedef struct { /** The x-coordinate of the cursor position. */ @@ -389,7 +389,7 @@ typedef struct { } GHOST_TEventWheelData; typedef enum { - GHOST_kTrackpadEventUnknown =0, + GHOST_kTrackpadEventUnknown = 0, GHOST_kTrackpadEventScroll, GHOST_kTrackpadEventRotate, GHOST_kTrackpadEventSwipe, /* Reserved, not used for now */ @@ -412,7 +412,7 @@ typedef struct { typedef enum { - GHOST_kDragnDropTypeUnknown =0, + GHOST_kDragnDropTypeUnknown = 0, GHOST_kDragnDropTypeFilenames, /*Array of strings representing file names (full path) */ GHOST_kDragnDropTypeString, /* Unformatted text UTF-8 string */ GHOST_kDragnDropTypeBitmap /*Bitmap image data */ @@ -440,7 +440,7 @@ typedef enum { GHOST_kInProgress, GHOST_kFinishing, GHOST_kFinished - } GHOST_TProgress; +} GHOST_TProgress; typedef struct { /** N-degree of freedom device data v3 [GSoC 2010] */ @@ -448,14 +448,14 @@ typedef struct { // These use blender standard view coordinates, with positive rotations being CCW about the axis. float tx, ty, tz; // translation float rx, ry, rz; // rotation: - // axis = (rx,ry,rz).normalized - // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] + // axis = (rx,ry,rz).normalized + // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg] float dt; // time since previous NDOF Motion event GHOST_TProgress progress; // Starting, InProgress or Finishing (for modal handlers) } GHOST_TEventNDOFMotionData; typedef enum { GHOST_kPress, GHOST_kRelease } GHOST_TButtonAction; - // good for mouse or other buttons too, hmmm? +// good for mouse or other buttons too, hmmm? typedef struct { GHOST_TButtonAction action; @@ -464,7 +464,7 @@ typedef struct { typedef struct { /** The key code. */ - GHOST_TKey key; + GHOST_TKey key; /* ascii / utf8: both should always be set when possible, * - ascii may be '\0' however if the user presses a non ascii key @@ -476,20 +476,20 @@ typedef struct { * use ascii, unicode is ignored - campbell. */ /** The ascii code for the key event ('\0' if none). */ - char ascii; + char ascii; /** The unicode character. if the length is 6, not NULL terminated if all 6 are set */ - char utf8_buf[6]; + char utf8_buf[6]; } GHOST_TEventKeyData; typedef struct { /** Number of pixels on a line. */ - GHOST_TUns32 xPixels; + GHOST_TUns32 xPixels; /** Number of lines. */ - GHOST_TUns32 yPixels; + GHOST_TUns32 yPixels; /** Numberof bits per pixel. */ - GHOST_TUns32 bpp; + GHOST_TUns32 bpp; /** Refresh rate (in Hertz). */ - GHOST_TUns32 frequency; + GHOST_TUns32 frequency; } GHOST_DisplaySetting; @@ -509,10 +509,10 @@ typedef int GHOST_TEmbedderWindowID; */ #ifdef __cplusplus class GHOST_ITimerTask; -typedef void (*GHOST_TimerProcPtr)(GHOST_ITimerTask* task, GHOST_TUns64 time); +typedef void (*GHOST_TimerProcPtr)(GHOST_ITimerTask *task, GHOST_TUns64 time); #else struct GHOST_TimerTaskHandle__; -typedef void (*GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__* task, GHOST_TUns64 time); +typedef void (*GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__ *task, GHOST_TUns64 time); #endif #endif // __GHOST_TYPES_H__ diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h index ea1cce574b8..edcf0102201 100644 --- a/intern/ghost/intern/GHOST_Buttons.h +++ b/intern/ghost/intern/GHOST_Buttons.h @@ -69,9 +69,9 @@ struct GHOST_Buttons { */ virtual void clear(); - GHOST_TUns8 m_ButtonLeft : 1; - GHOST_TUns8 m_ButtonMiddle : 1; - GHOST_TUns8 m_ButtonRight : 1; + 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_CallbackEventConsumer.h b/intern/ghost/intern/GHOST_CallbackEventConsumer.h index e7a1aed507d..61aef742a48 100644 --- a/intern/ghost/intern/GHOST_CallbackEventConsumer.h +++ b/intern/ghost/intern/GHOST_CallbackEventConsumer.h @@ -51,8 +51,8 @@ public: * @param userData The data passed back though the call-back routine. */ GHOST_CallbackEventConsumer( - GHOST_EventCallbackProcPtr eventCallback, - GHOST_TUserDataPtr userData); + GHOST_EventCallbackProcPtr eventCallback, + GHOST_TUserDataPtr userData); /** * Destructor. @@ -66,13 +66,13 @@ public: * @param event The event that can be handled or ignored. * @return Indication as to whether the event was handled. */ - virtual bool processEvent(GHOST_IEvent* event); + virtual bool processEvent(GHOST_IEvent *event); protected: /** The call-back routine invoked. */ - GHOST_EventCallbackProcPtr m_eventCallback; + GHOST_EventCallbackProcPtr m_eventCallback; /** The data passed back though the call-back routine. */ - GHOST_TUserDataPtr m_userData; + GHOST_TUserDataPtr m_userData; }; #endif // __GHOST_CALLBACKEVENTCONSUMER_H__ diff --git a/intern/ghost/intern/GHOST_DisplayManagerCarbon.h b/intern/ghost/intern/GHOST_DisplayManagerCarbon.h index 93467b8f462..d9af12ba13f 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerCarbon.h +++ b/intern/ghost/intern/GHOST_DisplayManagerCarbon.h @@ -108,7 +108,7 @@ protected: /** Cached number of displays. */ CGDisplayCount m_numDisplays; /** Cached display id's for each display. */ - CGDirectDisplayID* m_displayIDs; + CGDirectDisplayID *m_displayIDs; }; diff --git a/intern/ghost/intern/GHOST_DisplayManagerNULL.h b/intern/ghost/intern/GHOST_DisplayManagerNULL.h index 31fb9faf0cf..eb116e30d2d 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerNULL.h +++ b/intern/ghost/intern/GHOST_DisplayManagerNULL.h @@ -43,7 +43,7 @@ public: GHOST_TSuccess getCurrentDisplaySetting( GHOST_TUns8 display, GHOST_DisplaySetting& setting ) const { return getDisplaySetting(display,GHOST_TInt32(0),setting); } GHOST_TSuccess setCurrentDisplaySetting( GHOST_TUns8 display, const GHOST_DisplaySetting& setting ){ return GHOST_kSuccess; } -private : +private: GHOST_SystemNULL * m_system; }; diff --git a/intern/ghost/intern/GHOST_DisplayManagerSDL.h b/intern/ghost/intern/GHOST_DisplayManagerSDL.h index bfd8d1a77e6..2139e2d5e7b 100644 --- a/intern/ghost/intern/GHOST_DisplayManagerSDL.h +++ b/intern/ghost/intern/GHOST_DisplayManagerSDL.h @@ -68,8 +68,8 @@ public: setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting); -private : - GHOST_SystemSDL * m_system; +private: + GHOST_SystemSDL *m_system; SDL_DisplayMode m_mode; }; diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h index 9f80b82436e..88a4032ac23 100644 --- a/intern/ghost/intern/GHOST_DropTargetWin32.h +++ b/intern/ghost/intern/GHOST_DropTargetWin32.h @@ -47,22 +47,22 @@ public: * inherited, directly or indirectly, from IUnknown. Therefore, the three * methods in IUnknown are the first entries in the VTable for every interface. */ - HRESULT __stdcall QueryInterface (REFIID riid, void ** ppvObj); - ULONG __stdcall AddRef (void); - ULONG __stdcall Release (void); + HRESULT __stdcall QueryInterface(REFIID riid, void **ppvObj); + ULONG __stdcall AddRef(void); + ULONG __stdcall Release(void); /* IDropTarget implementation - + The IDropTarget interface is one of the interfaces you implement to - provide drag-and-drop operations in your application. It contains methods - used in any application that can be a target for data during a - drag-and-drop operation. A drop-target application is responsible for: + * + The IDropTarget interface is one of the interfaces you implement to + * provide drag-and-drop operations in your application. It contains methods + * used in any application that can be a target for data during a + * drag-and-drop operation. A drop-target application is responsible for: * - * - Determining the effect of the drop on the target application. - * - Incorporating any valid dropped data when the drop occurs. - * - Communicating target feedback to the source so the source application + * - Determining the effect of the drop on the target application. + * - Incorporating any valid dropped data when the drop occurs. + * - Communicating target feedback to the source so the source application * can provide appropriate visual feedback such as setting the cursor. - * - Implementing drag scrolling. - * - Registering and revoking its application windows as drop targets. + * - Implementing drag scrolling. + * - Registering and revoking its application windows as drop targets. * * The IDropTarget interface contains methods that handle all these * responsibilities except registering and revoking the application window @@ -70,10 +70,10 @@ public: * RevokeDragDrop functions. */ - HRESULT __stdcall DragEnter (IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect); - HRESULT __stdcall DragOver (DWORD grfKeyState, POINTL pt, DWORD * pdwEffect); - HRESULT __stdcall DragLeave (void); - HRESULT __stdcall Drop (IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect); + HRESULT __stdcall DragEnter(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + HRESULT __stdcall DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + HRESULT __stdcall DragLeave(void); + HRESULT __stdcall Drop(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); /** * Constructor @@ -83,7 +83,7 @@ public: * @param window The window to register as drop target. * @param system The associated system. */ - GHOST_DropTargetWin32(GHOST_WindowWin32 * window, GHOST_SystemWin32 * system); + GHOST_DropTargetWin32(GHOST_WindowWin32 *window, GHOST_SystemWin32 *system); /** * Destructor @@ -107,7 +107,7 @@ private: * @param pDataObject Pointer to the DataObject. * @return GHOST data type. */ - GHOST_TDragnDropTypes getGhostType(IDataObject * pDataObject); + GHOST_TDragnDropTypes getGhostType(IDataObject *pDataObject); /** * Get data to pass in event. @@ -115,21 +115,21 @@ private: * @param pDataObject Pointer to the DataObject. * @return Pointer to data. */ - void * getGhostData(IDataObject * pDataObject); + void *getGhostData(IDataObject *pDataObject); /** * Allocate data as file array to pass in event. * @param pDataObject Pointer to the DataObject. * @return Pointer to data. */ - void * getDropDataAsFilenames(IDataObject * pDataObject); + void *getDropDataAsFilenames(IDataObject *pDataObject); /** * Allocate data as string to pass in event. * @param pDataObject Pointer to the DataObject. * @return Pointer to data. */ - void * getDropDataAsString(IDataObject * pDataObject); + void *getDropDataAsString(IDataObject *pDataObject); /** * Convert Unicode to ANSI, replacing unconvertable chars with '?'. @@ -143,16 +143,15 @@ private: /* Private member variables */ /* COM reference count. */ - LONG m_cRef; + LONG m_cRef; /* Handle of the associated window. */ - HWND m_hWnd; + HWND m_hWnd; /* The associated GHOST_WindowWin32. */ - GHOST_WindowWin32 * m_window; + GHOST_WindowWin32 *m_window; /* The System. */ - GHOST_SystemWin32 * m_system; + GHOST_SystemWin32 *m_system; /* Data type of the dragged object */ GHOST_TDragnDropTypes m_draggedObjectType; - }; #endif // __GHOST_DROPTARGETWIN32_H__ diff --git a/intern/ghost/intern/GHOST_Event.h b/intern/ghost/intern/GHOST_Event.h index c7f86f2502d..6e12a34d149 100644 --- a/intern/ghost/intern/GHOST_Event.h +++ b/intern/ghost/intern/GHOST_Event.h @@ -50,7 +50,7 @@ public: * @param type The type of this event. * @param window The generating window (or NULL if system event). */ - GHOST_Event(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow* window) + GHOST_Event(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow *window) : m_type(type), m_time(msec), m_window(window), m_data(0) { } @@ -78,7 +78,7 @@ public: * or NULL if it is a 'system' event. * @return The generating window. */ - virtual GHOST_IWindow* getWindow() + virtual GHOST_IWindow *getWindow() { return m_window; } @@ -98,7 +98,7 @@ protected: /** The time this event was generated. */ GHOST_TUns64 m_time; /** Pointer to the generating window. */ - GHOST_IWindow* m_window; + GHOST_IWindow *m_window; /** Pointer to the event data. */ GHOST_TEventDataPtr m_data; }; diff --git a/intern/ghost/intern/GHOST_EventButton.h b/intern/ghost/intern/GHOST_EventButton.h index 7c869190b16..7ad840bb964 100644 --- a/intern/ghost/intern/GHOST_EventButton.h +++ b/intern/ghost/intern/GHOST_EventButton.h @@ -51,7 +51,7 @@ public: * @param y The y-coordinate of the location the cursor was at at the time of the event. * @param buttons The state of the buttons was at at the time of the event. */ - GHOST_EventButton(GHOST_TUns64 time, GHOST_TEventType type, GHOST_IWindow* window, GHOST_TButtonMask button) + GHOST_EventButton(GHOST_TUns64 time, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TButtonMask button) : GHOST_Event(time, type, window) { m_buttonEventData.button = button; diff --git a/intern/ghost/intern/GHOST_EventCursor.h b/intern/ghost/intern/GHOST_EventCursor.h index 749bd8a6922..0ff703ba254 100644 --- a/intern/ghost/intern/GHOST_EventCursor.h +++ b/intern/ghost/intern/GHOST_EventCursor.h @@ -50,7 +50,7 @@ public: * @param x The x-coordinate of the location the cursor was at at the time of the event. * @param y The y-coordinate of the location the cursor was at at the time of the event. */ - GHOST_EventCursor(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow* window, GHOST_TInt32 x, GHOST_TInt32 y) + GHOST_EventCursor(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TInt32 x, GHOST_TInt32 y) : GHOST_Event(msec, type, window) { m_cursorEventData.x = x; diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h index 4e256a386c0..1a05a4b9b68 100644 --- a/intern/ghost/intern/GHOST_EventDragnDrop.h +++ b/intern/ghost/intern/GHOST_EventDragnDrop.h @@ -83,8 +83,8 @@ public: GHOST_EventDragnDrop(GHOST_TUns64 time, GHOST_TEventType type, GHOST_TDragnDropTypes dataType, - GHOST_IWindow* window, - int x, int y, GHOST_TEventDataPtr data) + GHOST_IWindow *window, + int x, int y, GHOST_TEventDataPtr data) : GHOST_Event(time, type, window) { m_dragnDropEventData.x = x; @@ -102,22 +102,22 @@ public: switch (m_dragnDropEventData.dataType) { case GHOST_kDragnDropTypeBitmap: - IMB_freeImBuf((ImBuf*)m_dragnDropEventData.data); + IMB_freeImBuf((ImBuf *)m_dragnDropEventData.data); break; case GHOST_kDragnDropTypeFilenames: { - GHOST_TStringArray *strArray = (GHOST_TStringArray*)m_dragnDropEventData.data; + GHOST_TStringArray *strArray = (GHOST_TStringArray *)m_dragnDropEventData.data; int i; - for (i=0;icount;i++) + for (i = 0; i < strArray->count; i++) free(strArray->strings[i]); free(strArray); } - break; + break; case GHOST_kDragnDropTypeString: free(m_dragnDropEventData.data); - break; + break; default: break; diff --git a/intern/ghost/intern/GHOST_EventKey.h b/intern/ghost/intern/GHOST_EventKey.h index ae3ef374431..66817576f0f 100644 --- a/intern/ghost/intern/GHOST_EventKey.h +++ b/intern/ghost/intern/GHOST_EventKey.h @@ -51,13 +51,13 @@ public: */ GHOST_EventKey(GHOST_TUns64 msec, GHOST_TEventType type, - GHOST_IWindow* window, + GHOST_IWindow *window, GHOST_TKey key) : GHOST_Event(msec, type, window) { m_keyEventData.key = key; m_keyEventData.ascii = '\0'; - m_keyEventData.utf8_buf[0]= '\0'; + m_keyEventData.utf8_buf[0] = '\0'; m_data = &m_keyEventData; } @@ -70,7 +70,7 @@ public: */ GHOST_EventKey(GHOST_TUns64 msec, GHOST_TEventType type, - GHOST_IWindow* window, + GHOST_IWindow *window, GHOST_TKey key, char ascii, const char utf8_buf[6]) @@ -79,7 +79,7 @@ public: m_keyEventData.key = key; m_keyEventData.ascii = ascii; if (utf8_buf) memcpy(m_keyEventData.utf8_buf, utf8_buf, sizeof(m_keyEventData.utf8_buf)); - else m_keyEventData.utf8_buf[0]= '\0'; + else m_keyEventData.utf8_buf[0] = '\0'; m_data = &m_keyEventData; } diff --git a/intern/ghost/intern/GHOST_EventManager.h b/intern/ghost/intern/GHOST_EventManager.h index bc43a5c5d07..f941dac9fb4 100644 --- a/intern/ghost/intern/GHOST_EventManager.h +++ b/intern/ghost/intern/GHOST_EventManager.h @@ -64,21 +64,21 @@ public: * Returns the number of events currently on the stack. * @return The number of events on the stack. */ - virtual GHOST_TUns32 getNumEvents(); + virtual GHOST_TUns32 getNumEvents(); /** * Returns the number of events of a certain type currently on the stack. * @param type The type of events to be counted. * @return The number of events on the stack of this type. */ - virtual GHOST_TUns32 getNumEvents(GHOST_TEventType type); + virtual GHOST_TUns32 getNumEvents(GHOST_TEventType type); /** * Return the event at the top of the stack without removal. * Do not delete the event! * @return The event at the top of the stack. */ - virtual GHOST_IEvent* peekEvent(); + virtual GHOST_IEvent *peekEvent(); /** * Pushes an event on the stack. @@ -86,13 +86,13 @@ public: * Do not delete the event! * @param event The event to push on the stack. */ - virtual GHOST_TSuccess pushEvent(GHOST_IEvent* event); + virtual GHOST_TSuccess pushEvent(GHOST_IEvent *event); /** * Dispatches the given event directly, bypassing the event stack. * @return Indication as to whether any of the consumers handled the event. */ - virtual bool dispatchEvent(GHOST_IEvent* event); + virtual bool dispatchEvent(GHOST_IEvent *event); /** * Dispatches the event at the back of the stack. @@ -113,23 +113,23 @@ public: * @param consumer The consumer added to the list. * @return Indication as to whether addition has succeeded. */ - virtual GHOST_TSuccess addConsumer(GHOST_IEventConsumer* consumer); + virtual GHOST_TSuccess addConsumer(GHOST_IEventConsumer *consumer); /** * Removes a consumer from the list of event consumers. * @param consumer The consumer removed from the list. * @return Indication as to whether removal has succeeded. */ - virtual GHOST_TSuccess removeConsumer(GHOST_IEventConsumer* consumer); + virtual GHOST_TSuccess removeConsumer(GHOST_IEventConsumer *consumer); /** * Removes all events for a window from the stack. * @param window The window to remove events for. */ - virtual void + virtual void removeWindowEvents( - GHOST_IWindow* window - ); + GHOST_IWindow *window + ); /** * Removes all events of a certain type from the stack. @@ -138,11 +138,11 @@ public: * @param type The type of events to be removed. * @param window The window to remove the events for. */ - virtual void + virtual void removeTypeEvents( - GHOST_TEventType type, - GHOST_IWindow* window = 0 - ); + GHOST_TEventType type, + GHOST_IWindow *window = 0 + ); protected: /** @@ -150,7 +150,7 @@ protected: * Delete the event after use! * @return The event at the top of the stack. */ - virtual GHOST_IEvent* popEvent(); + virtual GHOST_IEvent *popEvent(); /** * Removes all events from the stack. @@ -158,13 +158,13 @@ protected: virtual void disposeEvents(); /** A stack with events. */ - typedef std::deque TEventStack; + typedef std::deque TEventStack; /** The event stack. */ - std::deque m_events; + std::deque m_events; /** A vector with event consumers. */ - typedef std::vector TConsumerVector; + typedef std::vector TConsumerVector; /** The list with event consumers. */ TConsumerVector m_consumers; diff --git a/intern/ghost/intern/GHOST_EventNDOF.h b/intern/ghost/intern/GHOST_EventNDOF.h index f256f343823..b4037896b93 100644 --- a/intern/ghost/intern/GHOST_EventNDOF.h +++ b/intern/ghost/intern/GHOST_EventNDOF.h @@ -32,31 +32,30 @@ class GHOST_EventNDOFMotion : public GHOST_Event +{ +protected: + GHOST_TEventNDOFMotionData m_axisData; + +public: + GHOST_EventNDOFMotion(GHOST_TUns64 time, GHOST_IWindow *window) + : GHOST_Event(time, GHOST_kEventNDOFMotion, window) { - protected: - GHOST_TEventNDOFMotionData m_axisData; - - public: - GHOST_EventNDOFMotion(GHOST_TUns64 time, GHOST_IWindow* window) - : GHOST_Event(time, GHOST_kEventNDOFMotion, window) - { - m_data = &m_axisData; - } - }; + m_data = &m_axisData; + } +}; class GHOST_EventNDOFButton : public GHOST_Event - { - protected: - GHOST_TEventNDOFButtonData m_buttonData; - - public: - GHOST_EventNDOFButton(GHOST_TUns64 time, GHOST_IWindow* window) - : GHOST_Event(time, GHOST_kEventNDOFButton, window) - { - m_data = &m_buttonData; - } - }; +{ +protected: + GHOST_TEventNDOFButtonData m_buttonData; +public: + GHOST_EventNDOFButton(GHOST_TUns64 time, GHOST_IWindow *window) + : GHOST_Event(time, GHOST_kEventNDOFButton, window) + { + m_data = &m_buttonData; + } +}; #endif // __GHOST_EVENTNDOF_H__ diff --git a/intern/ghost/intern/GHOST_EventPrinter.h b/intern/ghost/intern/GHOST_EventPrinter.h index 7c2378db301..f5fe303f9bc 100644 --- a/intern/ghost/intern/GHOST_EventPrinter.h +++ b/intern/ghost/intern/GHOST_EventPrinter.h @@ -49,7 +49,7 @@ public: * @param event The event that can be handled or not. * @return Indication as to whether the event was handled. */ - virtual bool processEvent(GHOST_IEvent* event); + virtual bool processEvent(GHOST_IEvent *event); protected: /** @@ -57,7 +57,7 @@ protected: * @param key The GHOST key code to convert. * @param str The GHOST key code converted to a readable string. */ - void getKeyString(GHOST_TKey key, char str[32]) const; + void getKeyString(GHOST_TKey key, char str[32]) const; }; #endif // __GHOST_EVENTPRINTER_H__ diff --git a/intern/ghost/intern/GHOST_EventString.h b/intern/ghost/intern/GHOST_EventString.h index 90e914e3b5c..8611944197d 100644 --- a/intern/ghost/intern/GHOST_EventString.h +++ b/intern/ghost/intern/GHOST_EventString.h @@ -51,9 +51,10 @@ public: * @param window The generating window (or NULL if system event). * @param data_ptr Pointer to the (unformatted) data associated with the event */ - GHOST_EventString(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow* window, GHOST_TEventDataPtr data_ptr) - : GHOST_Event(msec, type, window) { - m_data = data_ptr; + GHOST_EventString(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TEventDataPtr data_ptr) + : GHOST_Event(msec, type, window) + { + m_data = data_ptr; } ~GHOST_EventString() diff --git a/intern/ghost/intern/GHOST_EventTrackpad.h b/intern/ghost/intern/GHOST_EventTrackpad.h index 9a3456bbb57..ab576fb9ec3 100644 --- a/intern/ghost/intern/GHOST_EventTrackpad.h +++ b/intern/ghost/intern/GHOST_EventTrackpad.h @@ -51,7 +51,7 @@ public: * @param y The y-delta of the pan event. */ GHOST_EventTrackpad(GHOST_TUns64 msec, - GHOST_IWindow* window, + GHOST_IWindow *window, GHOST_TTrackpadEventSubTypes subtype, GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 deltaX, GHOST_TInt32 deltaY) diff --git a/intern/ghost/intern/GHOST_EventWheel.h b/intern/ghost/intern/GHOST_EventWheel.h index 1b7468dbc6e..7d6137af575 100644 --- a/intern/ghost/intern/GHOST_EventWheel.h +++ b/intern/ghost/intern/GHOST_EventWheel.h @@ -51,7 +51,7 @@ public: * @param type The type of this event. * @param z The displacement of the mouse wheel. */ - GHOST_EventWheel(GHOST_TUns64 msec, GHOST_IWindow* window, GHOST_TInt32 z) + GHOST_EventWheel(GHOST_TUns64 msec, GHOST_IWindow *window, GHOST_TInt32 z) : GHOST_Event(msec, GHOST_kEventWheel, window) { m_wheelEventData.z = z; diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h index 0b690323022..064af8d2e6c 100644 --- a/intern/ghost/intern/GHOST_ModifierKeys.h +++ b/intern/ghost/intern/GHOST_ModifierKeys.h @@ -41,8 +41,7 @@ * @author Maarten Gribnau * @date May 17, 2001 */ -struct GHOST_ModifierKeys -{ +struct GHOST_ModifierKeys { /** * Constructor. */ diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h index 5e16c3fc54c..2baf0f6fa42 100644 --- a/intern/ghost/intern/GHOST_NDOFManager.h +++ b/intern/ghost/intern/GHOST_NDOFManager.h @@ -44,7 +44,7 @@ typedef enum { NDOF_Spaceball5000, NDOF_SpaceTraveler - } NDOF_DeviceT; +} NDOF_DeviceT; // NDOF device button event types typedef enum { @@ -100,7 +100,7 @@ typedef enum { NDOF_BUTTON_C, // the end NDOF_BUTTON_LAST - } NDOF_ButtonT; +} NDOF_ButtonT; class GHOST_NDOFManager { @@ -149,13 +149,13 @@ protected: GHOST_System& m_system; private: - void sendButtonEvent(NDOF_ButtonT, bool press, GHOST_TUns64 time, GHOST_IWindow*); - void sendKeyEvent(GHOST_TKey, bool press, GHOST_TUns64 time, GHOST_IWindow*); + void sendButtonEvent(NDOF_ButtonT, bool press, GHOST_TUns64 time, GHOST_IWindow *); + void sendKeyEvent(GHOST_TKey, bool press, GHOST_TUns64 time, GHOST_IWindow *); NDOF_DeviceT m_deviceType; int m_buttonCount; int m_buttonMask; - const NDOF_ButtonT* m_hidMap; + const NDOF_ButtonT *m_hidMap; short m_translation[3]; short m_rotation[3]; diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index 15a7cf1fdd9..b25f24e653c 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -76,8 +76,8 @@ protected: public: /*************************************************************************************** - ** Time(r) functionality - ***************************************************************************************/ + ** Time(r) functionality + ***************************************************************************************/ /** * Returns the system time. @@ -97,7 +97,7 @@ public: * @param userData Placeholder for user data. * @return A timer task (0 if timer task installation failed). */ - virtual GHOST_ITimerTask* installTimer(GHOST_TUns64 delay, + virtual GHOST_ITimerTask *installTimer(GHOST_TUns64 delay, GHOST_TUns64 interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData = 0); @@ -107,11 +107,11 @@ public: * @param timerTask Timer task to be removed. * @return Indication of success. */ - virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask* timerTask); + virtual GHOST_TSuccess removeTimer(GHOST_ITimerTask *timerTask); /*************************************************************************************** - ** Display/window management functionality - ***************************************************************************************/ + ** Display/window management functionality + ***************************************************************************************/ /** * Inherited from GHOST_ISystem but left pure virtual @@ -126,14 +126,14 @@ public: * @param window Pointer to the window to be disposed. * @return Indication of success. */ - virtual GHOST_TSuccess disposeWindow(GHOST_IWindow* window); + virtual GHOST_TSuccess disposeWindow(GHOST_IWindow *window); /** * Returns whether a window is valid. * @param window Pointer to the window to be checked. * @return Indication of validity. */ - virtual bool validWindow(GHOST_IWindow* window); + virtual bool validWindow(GHOST_IWindow *window); /** * Begins full screen mode. @@ -143,8 +143,8 @@ public: * This window is invalid after full screen has been ended. * @return Indication of success. */ - virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0); + virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window, + const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0); /** * Updates the resolution while in fullscreen mode. @@ -153,7 +153,7 @@ public: * * @return Indication of success. */ - virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window); + virtual GHOST_TSuccess updateFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow **window); /** * Ends full screen mode. @@ -169,13 +169,13 @@ public: /*************************************************************************************** - ** Event management functionality - ***************************************************************************************/ + ** Event management functionality + ***************************************************************************************/ /** * Inherited from GHOST_ISystem but left pure virtual * - * virtual bool processEvents(bool waitForEvent) = 0; + * virtual bool processEvents(bool waitForEvent) = 0; */ @@ -192,18 +192,18 @@ public: * @param consumer The event consumer to add. * @return Indication of success. */ - virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer* consumer); + virtual GHOST_TSuccess addEventConsumer(GHOST_IEventConsumer *consumer); /** * Remove the given event consumer to our list. * @param consumer The event consumer to remove. * @return Indication of success. */ - virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer* consumer); + virtual GHOST_TSuccess removeEventConsumer(GHOST_IEventConsumer *consumer); /*************************************************************************************** - ** Cursor management functionality - ***************************************************************************************/ + ** Cursor management functionality + ***************************************************************************************/ /** Inherited from GHOST_ISystem but left pure virtual * GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const = 0; @@ -211,8 +211,8 @@ public: */ /*************************************************************************************** - ** Access to mouse button and keyboard states. - ***************************************************************************************/ + ** Access to mouse button and keyboard states. + ***************************************************************************************/ /** * Returns the state of a modifier key (ouside the message queue). @@ -231,8 +231,8 @@ public: virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const; /*************************************************************************************** - ** Other (internal) functionality. - ***************************************************************************************/ + ** Other (internal) functionality. + ***************************************************************************************/ /** * Pushes an event on the stack. @@ -240,32 +240,32 @@ public: * Do not delete the event! * @param event The event to push on the stack. */ - virtual GHOST_TSuccess pushEvent(GHOST_IEvent* event); + virtual GHOST_TSuccess pushEvent(GHOST_IEvent *event); /** * Returns the timer manager. * @return The timer manager. */ - inline virtual GHOST_TimerManager* getTimerManager() const; + inline virtual GHOST_TimerManager *getTimerManager() const; /** * Returns a pointer to our event manager. * @return A pointer to our event manager. */ - virtual inline GHOST_EventManager* getEventManager() const; + virtual inline GHOST_EventManager *getEventManager() const; /** * Returns a pointer to our window manager. * @return A pointer to our window manager. */ - virtual inline GHOST_WindowManager* getWindowManager() const; + virtual inline GHOST_WindowManager *getWindowManager() const; #ifdef WITH_INPUT_NDOF /** * Returns a pointer to our n-degree of freedeom manager. * @return A pointer to our n-degree of freedeom manager. */ - virtual inline GHOST_NDOFManager* getNDOFManager() const; + virtual inline GHOST_NDOFManager *getNDOFManager() const; #endif /** @@ -285,23 +285,23 @@ public: /** * Returns the selection buffer * @param selection Only used on X11 - * @return Returns the clipboard data + * @return Returns the clipboard data * */ - virtual GHOST_TUns8* getClipboard(bool selection) const = 0; + virtual GHOST_TUns8 *getClipboard(bool selection) const = 0; - /** - * Put data to the Clipboard - * @param buffer The buffer to copy to the clipboard - * @param selection The clipboard to copy too only used on X11 - */ - virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0; + /** + * Put data to the Clipboard + * @param buffer The buffer to copy to the clipboard + * @param selection The clipboard to copy too only used on X11 + */ + virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0; - /** + /** * Confirms quitting he program when there is just one window left open * in the application */ - virtual int confirmQuit(GHOST_IWindow * window) const; + virtual int confirmQuit(GHOST_IWindow *window) const; @@ -323,52 +323,52 @@ protected: * @param window The window created. * @return Indication of success. */ - virtual GHOST_TSuccess createFullScreenWindow(GHOST_Window** window, - const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0); + virtual GHOST_TSuccess createFullScreenWindow(GHOST_Window **window, + const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0); /** The display manager (platform dependant). */ - GHOST_DisplayManager* m_displayManager; + GHOST_DisplayManager *m_displayManager; /** The timer manager. */ - GHOST_TimerManager* m_timerManager; + GHOST_TimerManager *m_timerManager; /** The window manager. */ - GHOST_WindowManager* m_windowManager; + GHOST_WindowManager *m_windowManager; /** The event manager. */ - GHOST_EventManager* m_eventManager; + GHOST_EventManager *m_eventManager; #ifdef WITH_INPUT_NDOF /** The N-degree of freedom device manager */ - GHOST_NDOFManager* m_ndofManager; + GHOST_NDOFManager *m_ndofManager; #endif /** Prints all the events. */ #ifdef GHOST_DEBUG - GHOST_EventPrinter* m_eventPrinter; + GHOST_EventPrinter *m_eventPrinter; #endif // GHOST_DEBUG /** Settings of the display before the display went fullscreen. */ GHOST_DisplaySetting m_preFullScreenSetting; }; -inline GHOST_TimerManager* GHOST_System::getTimerManager() const +inline GHOST_TimerManager *GHOST_System::getTimerManager() const { return m_timerManager; } -inline GHOST_EventManager* GHOST_System::getEventManager() const +inline GHOST_EventManager *GHOST_System::getEventManager() const { return m_eventManager; } -inline GHOST_WindowManager* GHOST_System::getWindowManager() const +inline GHOST_WindowManager *GHOST_System::getWindowManager() const { return m_windowManager; } #ifdef WITH_INPUT_NDOF -inline GHOST_NDOFManager* GHOST_System::getNDOFManager() const +inline GHOST_NDOFManager *GHOST_System::getNDOFManager() const { return m_ndofManager; } diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h index cda09480788..2415c57e094 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.h +++ b/intern/ghost/intern/GHOST_SystemCarbon.h @@ -84,7 +84,7 @@ public: * Returns the number of displays on this system. * @return The number of displays. */ - virtual GHOST_TUns8 getNumDisplays() const; + virtual GHOST_TUns8 getNumDisplays() const; /** * Returns the dimensions of the main display on this system. @@ -103,29 +103,29 @@ public: * @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 parentWindow Parent (embedder) window + * @param parentWindow Parent (embedder) window * @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, - const GHOST_TUns16 numOfAASamples = 0, - const GHOST_TEmbedderWindowID parentWindow = 0 - ); + 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, + const GHOST_TUns16 numOfAASamples = 0, + const GHOST_TEmbedderWindowID parentWindow = 0 + ); virtual GHOST_TSuccess beginFullScreen( - const GHOST_DisplaySetting& setting, - GHOST_IWindow** window, - const bool stereoVisual - ); + const GHOST_DisplaySetting& setting, + GHOST_IWindow **window, + const bool stereoVisual + ); - virtual GHOST_TSuccess endFullScreen( void ); + virtual GHOST_TSuccess endFullScreen(void); /*************************************************************************************** ** Event management functionality @@ -181,7 +181,7 @@ public: * @param selection Indicate which buffer to return * @return Returns the selected buffer */ - virtual GHOST_TUns8* getClipboard(bool selection) const; + virtual GHOST_TUns8 *getClipboard(bool selection) const; /** * Puts buffer to system clipboard @@ -193,7 +193,9 @@ public: /** * @see GHOST_ISystem */ - int toggleConsole(int action) { return 0; } + int toggleConsole(int action) { + return 0; + } protected: /** @@ -258,7 +260,7 @@ protected: /** * Callback for Carbon when it has events. */ - static OSStatus sEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData); + static OSStatus sEventHandlerProc(EventHandlerCallRef handler, EventRef event, void *userData); /** Apple Event Handlers */ static OSErr sAEHandlerLaunch(const AppleEvent *event, AppleEvent *reply, SInt32 refCon); diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h index ce7677aee7a..47a7a6a9a73 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.h +++ b/intern/ghost/intern/GHOST_SystemCocoa.h @@ -62,8 +62,8 @@ public: ~GHOST_SystemCocoa(); /*************************************************************************************** - ** Time(r) functionality - ***************************************************************************************/ + ** Time(r) functionality + ***************************************************************************************/ /** * Returns the system time. @@ -74,14 +74,14 @@ public: virtual GHOST_TUns64 getMilliSeconds() const; /*************************************************************************************** - ** Display/window management functionality - ***************************************************************************************/ + ** Display/window management functionality + ***************************************************************************************/ /** * Returns the number of displays on this system. * @return The number of displays. */ - virtual GHOST_TUns8 getNumDisplays() const; + virtual GHOST_TUns8 getNumDisplays() const; /** * Returns the dimensions of the main display on this system. @@ -102,25 +102,25 @@ public: * @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 + * @param parentWindow Parent (embedder) window * @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 - ); + 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 + ); /*************************************************************************************** - ** Event management functionality - ***************************************************************************************/ + ** Event management functionality + ***************************************************************************************/ /** * Gets events from the system and stores them in the queue. @@ -151,11 +151,11 @@ public: * @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 - ***************************************************************************************/ + ** Cursor management functionality + ***************************************************************************************/ /** * Returns the current location of the cursor (location in screen coordinates) @@ -174,8 +174,8 @@ public: virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y); /*************************************************************************************** - ** Access to mouse button and keyboard states. - ***************************************************************************************/ + ** Access to mouse button and keyboard states. + ***************************************************************************************/ /** * Returns the state of all modifier keys. @@ -196,7 +196,7 @@ public: * @param selection Indicate which buffer to return * @return Returns the selected buffer */ - virtual GHOST_TUns8* getClipboard(bool selection) const; + virtual GHOST_TUns8 *getClipboard(bool selection) const; /** * Puts buffer to system clipboard @@ -211,7 +211,7 @@ public: * @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); + GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa *window); /** * Handles the Cocoa event telling the application has become active (again) @@ -227,7 +227,9 @@ public: /** * @see GHOST_ISystem */ - int toggleConsole(int action) { return 0; } + int toggleConsole(int action) { + return 0; + } protected: diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h index be16a8286d5..63e3b5bc828 100644 --- a/intern/ghost/intern/GHOST_SystemNULL.h +++ b/intern/ghost/intern/GHOST_SystemNULL.h @@ -66,19 +66,19 @@ public: return GHOST_kFailure; } - 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, - bool stereoVisual, - const GHOST_TUns16 numOfAASamples, - const GHOST_TEmbedderWindowID parentWindow - ) { - return new GHOST_WindowNULL (this, title, left, top, width, height, state, parentWindow, type, stereoVisual, 1); + 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, + bool stereoVisual, + const GHOST_TUns16 numOfAASamples, + const GHOST_TEmbedderWindowID parentWindow) + { + return new GHOST_WindowNULL(this, title, left, top, width, height, state, parentWindow, type, stereoVisual, 1); } }; diff --git a/intern/ghost/intern/GHOST_SystemPaths.h b/intern/ghost/intern/GHOST_SystemPaths.h index 472d6369282..a8c43ff7e09 100644 --- a/intern/ghost/intern/GHOST_SystemPaths.h +++ b/intern/ghost/intern/GHOST_SystemPaths.h @@ -40,13 +40,13 @@ protected: * Constructor. * Protected default constructor to force use of static createSystem member. */ - GHOST_SystemPaths(){}; + GHOST_SystemPaths() {}; /** * Destructor. * Protected default constructor to force use of static dispose member. */ - virtual ~GHOST_SystemPaths(){}; + virtual ~GHOST_SystemPaths() {}; public: @@ -55,25 +55,25 @@ public: * "unpack and run" path, then look for properly installed path, not including versioning. * @return Unsigned char string pointing to system dir (eg /usr/share/blender/). */ - virtual const GHOST_TUns8* getSystemDir() const = 0; - - /** - * Determine the base dir in which user configuration is stored, not including versioning. - * If needed, it will create the base directory. - * @return Unsigned char string pointing to user dir (eg ~/.blender/). - */ - virtual const GHOST_TUns8* getUserDir() const = 0; + virtual const GHOST_TUns8 *getSystemDir() const = 0; /** - * Determine the directory of the current binary - * @return Unsigned char string pointing to the binary dir - */ - virtual const GHOST_TUns8* getBinaryDir() const = 0; + * Determine the base dir in which user configuration is stored, not including versioning. + * If needed, it will create the base directory. + * @return Unsigned char string pointing to user dir (eg ~/.blender/). + */ + virtual const GHOST_TUns8 *getUserDir() const = 0; + + /** + * Determine the directory of the current binary + * @return Unsigned char string pointing to the binary dir + */ + virtual const GHOST_TUns8 *getBinaryDir() const = 0; /** * Add the file to the operating system most recently used files */ - virtual void addToSystemRecentFiles(const char* filename) const = 0; + virtual void addToSystemRecentFiles(const char *filename) const = 0; }; diff --git a/intern/ghost/intern/GHOST_SystemPathsCarbon.h b/intern/ghost/intern/GHOST_SystemPathsCarbon.h index 4a1f68e9ba7..c005f373726 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCarbon.h +++ b/intern/ghost/intern/GHOST_SystemPathsCarbon.h @@ -63,25 +63,25 @@ public: * "unpack and run" path, then look for properly installed path, not including versioning. * @return Unsigned char string pointing to system dir (eg /usr/share/blender/). */ - virtual const GHOST_TUns8* getSystemDir() const; + virtual const GHOST_TUns8 *getSystemDir() const; /** * Determine the base dir in which user configuration is stored, not including versioning. * If needed, it will create the base directory. * @return Unsigned char string pointing to user dir (eg ~/.blender/). */ - virtual const GHOST_TUns8* getUserDir() const; + virtual const GHOST_TUns8 *getUserDir() const; /** - * Determine the directory of the current binary - * @return Unsigned char string pointing to the binary dir - */ - virtual const GHOST_TUns8* getBinaryDir() const; + * Determine the directory of the current binary + * @return Unsigned char string pointing to the binary dir + */ + virtual const GHOST_TUns8 *getBinaryDir() const; /** - * Add the file to the operating system most recently used files - */ - void addToSystemRecentFiles(const char* filename) const; + * Add the file to the operating system most recently used files + */ + void addToSystemRecentFiles(const char *filename) const; }; #endif // __GHOST_SYSTEMPATHSCARBON_H__ diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.h b/intern/ghost/intern/GHOST_SystemPathsCocoa.h index 1936d705945..77efbf2dd1b 100644 --- a/intern/ghost/intern/GHOST_SystemPathsCocoa.h +++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.h @@ -57,25 +57,25 @@ public: * "unpack and run" path, then look for properly installed path, not including versioning. * @return Unsigned char string pointing to system dir (eg /usr/share/blender/). */ - virtual const GHOST_TUns8* getSystemDir() const; + virtual const GHOST_TUns8 *getSystemDir() const; /** * Determine the base dir in which user configuration is stored, not including versioning. * If needed, it will create the base directory. * @return Unsigned char string pointing to user dir (eg ~/.blender/). */ - virtual const GHOST_TUns8* getUserDir() const; + virtual const GHOST_TUns8 *getUserDir() const; /** - * Determine the directory of the current binary - * @return Unsigned char string pointing to the binary dir - */ - virtual const GHOST_TUns8* getBinaryDir() const; + * Determine the directory of the current binary + * @return Unsigned char string pointing to the binary dir + */ + 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_SYSTEMPATHSCOCOA_H__ diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.h b/intern/ghost/intern/GHOST_SystemPathsWin32.h index f53b33da756..133aa2cacab 100644 --- a/intern/ghost/intern/GHOST_SystemPathsWin32.h +++ b/intern/ghost/intern/GHOST_SystemPathsWin32.h @@ -67,20 +67,20 @@ public: * "unpack and run" path, then look for properly installed path, not including versioning. * @return Unsigned char string pointing to system dir (eg /usr/share/). */ - const GHOST_TUns8* getSystemDir() const; + const GHOST_TUns8 *getSystemDir() const; /** * Determine the base dir in which user configuration is stored, not including versioning. * If needed, it will create the base directory. * @return Unsigned char string pointing to user dir (eg ~/). */ - const GHOST_TUns8* getUserDir() const; + const GHOST_TUns8 *getUserDir() const; /** * Determine the directory of the current binary * @return Unsigned char string pointing to the binary dir */ - const GHOST_TUns8* getBinaryDir() const; + const GHOST_TUns8 *getBinaryDir() const; /** * Add the file to the operating system most recently used files diff --git a/intern/ghost/intern/GHOST_SystemSDL.h b/intern/ghost/intern/GHOST_SystemSDL.h index 7610c594665..43c9129fdd8 100644 --- a/intern/ghost/intern/GHOST_SystemSDL.h +++ b/intern/ghost/intern/GHOST_SystemSDL.h @@ -110,7 +110,7 @@ private: ); /* SDL specific */ - GHOST_WindowSDL * findGhostWindow(SDL_Window *sdl_win); + GHOST_WindowSDL *findGhostWindow(SDL_Window *sdl_win); bool generateWindowExposeEvents(); diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h index bc2044e549d..f63ad38d0cc 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.h +++ b/intern/ghost/intern/GHOST_SystemWin32.h @@ -45,7 +45,7 @@ #include "GHOST_System.h" #if defined(__CYGWIN32__) -# define __int64 long long +# define __int64 long long #endif class GHOST_EventButton; @@ -93,7 +93,7 @@ public: * Returns the number of displays on this system. * @return The number of displays. */ - virtual GHOST_TUns8 getNumDisplays() const; + virtual GHOST_TUns8 getNumDisplays() const; /** * Returns the dimensions of the main display on this system. @@ -114,16 +114,16 @@ public: * @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 + * @param parentWindow Parent (embedder) window * @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 ); + 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); /*************************************************************************************** ** Event management functionality @@ -180,7 +180,7 @@ public: * @param selection Used by X11 only * @return Returns the Clipboard */ - virtual GHOST_TUns8* getClipboard(bool selection) const; + virtual GHOST_TUns8 *getClipboard(bool selection) const; /** * Puts buffer to system clipboard @@ -199,13 +199,13 @@ public: * @param window The window on which the event occurred * @return Indication whether the event was handled. */ - static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,GHOST_IWindow* window, int mouseX, int mouseY, void* data); + static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_IWindow *window, int mouseX, int mouseY, void *data); /** * Confirms quitting he program when there is just one window left open * in the application */ - virtual int confirmQuit(GHOST_IWindow * window) const; + virtual int confirmQuit(GHOST_IWindow *window) const; protected: /** @@ -239,7 +239,7 @@ protected: * @param vk Pointer to virtual key * @return The GHOST key (GHOST_kKeyUnknown if no match). */ - virtual GHOST_TKey hardKey(GHOST_IWindow *window, RAWINPUT const& raw, int * keyDown, char * vk); + virtual GHOST_TKey hardKey(GHOST_IWindow *window, RAWINPUT const& raw, int *keyDown, char *vk); /** * Creates modifier key event(s) and updates the key data stored locally (m_modifierKeys). @@ -248,7 +248,7 @@ protected: * events generated for both keys. * @param window The window receiving the event (the active window). */ - GHOST_EventKey* processModifierKeys(GHOST_IWindow *window); + GHOST_EventKey *processModifierKeys(GHOST_IWindow *window); /** * Creates mouse button event. @@ -257,7 +257,7 @@ protected: * @param mask The button mask of this event. * @return The event created. */ - static GHOST_EventButton* processButtonEvent(GHOST_TEventType type, GHOST_IWindow *window, GHOST_TButtonMask mask); + static GHOST_EventButton *processButtonEvent(GHOST_TEventType type, GHOST_IWindow *window, GHOST_TButtonMask mask); /** * Creates cursor event. @@ -265,7 +265,7 @@ protected: * @param window The window receiving the event (the active window). * @return The event created. */ - static GHOST_EventCursor* processCursorEvent(GHOST_TEventType type, GHOST_IWindow *Iwindow); + static GHOST_EventCursor *processCursorEvent(GHOST_TEventType type, GHOST_IWindow *Iwindow); /** * Creates a mouse wheel event. @@ -273,7 +273,7 @@ protected: * @param wParam The wParam from the wndproc * @param lParam The lParam from the wndproc */ - static GHOST_EventWheel* processWheelEvent(GHOST_IWindow *window, WPARAM wParam, LPARAM lParam); + static GHOST_EventWheel *processWheelEvent(GHOST_IWindow *window, WPARAM wParam, LPARAM lParam); /** * Creates a key event and updates the key data stored locally (m_modifierKeys). @@ -282,7 +282,7 @@ protected: * @param window The window receiving the event (the active window). * @param raw RawInput structure with detailed info about the key event */ - static GHOST_EventKey* processKeyEvent(GHOST_IWindow *window, RAWINPUT const& raw); + static GHOST_EventKey *processKeyEvent(GHOST_IWindow *window, RAWINPUT const& raw); /** * Process special keys (VK_OEM_*), to see if current key layout @@ -299,13 +299,13 @@ protected: * @param window The window receiving the event (the active window). * @return The event created. */ - static GHOST_Event* processWindowEvent(GHOST_TEventType type, GHOST_IWindow* window); + static GHOST_Event *processWindowEvent(GHOST_TEventType type, GHOST_IWindow *window); /** * Handles minimum window size. * @param minmax The MINMAXINFO structure. */ - static void processMinMaxInfo(MINMAXINFO * minmax); + static void processMinMaxInfo(MINMAXINFO *minmax); #ifdef WITH_INPUT_NDOF /** @@ -342,14 +342,14 @@ protected: static LRESULT WINAPI s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); /** - * Toggles console - * @action 0 - Hides - * 1 - Shows - * 2 - Toggles - * 3 - Hides if it runs not from command line - * * - Does nothing - * @return current status (1 -visible, 0 - hidden) - */ + * Toggles console + * @action 0 - Hides + * 1 - Shows + * 2 - Toggles + * 3 - Hides if it runs not from command line + * * - Does nothing + * @return current status (1 -visible, 0 - hidden) + */ int toggleConsole(int action); /** The current state of the modifier keys. */ @@ -390,12 +390,12 @@ inline void GHOST_SystemWin32::handleKeyboardChange(void) // save the language identifier. m_langId = LOWORD(m_keylayout); - for(m_hasAltGr = false, i = 32; i < 256; ++i) { + for (m_hasAltGr = false, i = 32; i < 256; ++i) { s = VkKeyScanEx((char)i, m_keylayout); // s == -1 means no key that translates passed char code // high byte contains shift state. bit 2 ctrl pressed, bit 4 alt pressed // if both are pressed, we have AltGr keycombo on keylayout - if(s!=-1 && (s & 0x600) == 0x600) { + if (s != -1 && (s & 0x600) == 0x600) { m_hasAltGr = true; break; } diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h index a5d6fdc745f..34908a59b3a 100644 --- a/intern/ghost/intern/GHOST_TaskbarWin32.h +++ b/intern/ghost/intern/GHOST_TaskbarWin32.h @@ -19,54 +19,54 @@ // GHOST_WindowWin32 #ifndef __ITaskbarList_INTERFACE_DEFINED__ #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; - }; -#endif /* ITaskbarList */ +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; +}; +#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; - }; -#endif /* ITaskbarList2 */ +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; +}; +#endif /* ITaskbarList2 */ #ifndef __ITaskbarList3_INTERFACE_DEFINED__ #define __ITaskbarList3_INTERFACE_DEFINED__ typedef enum THUMBBUTTONFLAGS {THBF_ENABLED = 0, THBF_DISABLED = 0x1, THBF_DISMISSONCLICK = 0x2, THBF_NOBACKGROUND = 0x4, THBF_HIDDEN = 0x8, THBF_NONINTERACTIVE = 0x10} THUMBBUTTONFLAGS; typedef enum THUMBBUTTONMASK {THB_BITMAP = 0x1, THB_ICON = 0x2, THB_TOOLTIP = 0x4, THB_FLAGS = 0x8} THUMBBUTTONMASK; typedef struct THUMBBUTTON {THUMBBUTTONMASK dwMask; UINT iId; UINT iBitmap; HICON hIcon; WCHAR szTip[260]; THUMBBUTTONFLAGS dwFlags; } THUMBBUTTON; -typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMAL = 0x2, TBPF_ERROR = 0x4, TBPF_PAUSED = 0x8 } TBPFLAG; +typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMAL = 0x2, TBPF_ERROR = 0x4, TBPF_PAUSED = 0x8 } TBPFLAG; #define THBN_CLICKED 0x1800 - extern "C" {const GUID IID_ITaskList3 = { 0xEA1AFB91, 0x9E28, 0x4B86, {0x90, 0xE9, 0x9E, 0x9F, 0x8A, 0x5E, 0xEF, 0xAF} };} +extern "C" {const GUID IID_ITaskList3 = { 0xEA1AFB91, 0x9E28, 0x4B86, {0x90, 0xE9, 0x9E, 0x9F, 0x8A, 0x5E, 0xEF, 0xAF} }; } - 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; - virtual HRESULT STDMETHODCALLTYPE UnregisterTab (HWND hwndTab) = 0; - virtual HRESULT STDMETHODCALLTYPE SetTabOrder (HWND hwndTab, HWND hwndInsertBefore) = 0; - 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 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 */ +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; + virtual HRESULT STDMETHODCALLTYPE UnregisterTab(HWND hwndTab) = 0; + virtual HRESULT STDMETHODCALLTYPE SetTabOrder(HWND hwndTab, HWND hwndInsertBefore) = 0; + 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 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_TimerManager.h b/intern/ghost/intern/GHOST_TimerManager.h index ce4983ca105..0b189cf3aa9 100644 --- a/intern/ghost/intern/GHOST_TimerManager.h +++ b/intern/ghost/intern/GHOST_TimerManager.h @@ -64,13 +64,13 @@ public: * Returns the number of timer tasks. * @return The number of events on the stack. */ - virtual GHOST_TUns32 getNumTimers(); + virtual GHOST_TUns32 getNumTimers(); /** * Returns whther this timer task ins in our list. * @return Indication of presence. */ - virtual bool getTimerFound(GHOST_TimerTask* timer); + virtual bool getTimerFound(GHOST_TimerTask *timer); /** * Adds a timer task to the list. @@ -78,7 +78,7 @@ public: * @param timer The timer task added to the list. * @return Indication as to whether addition has succeeded. */ - virtual GHOST_TSuccess addTimer(GHOST_TimerTask* timer); + virtual GHOST_TSuccess addTimer(GHOST_TimerTask *timer); /** * Removes a timer task from the list. @@ -86,7 +86,7 @@ public: * @param timer The timer task to be removed from the list. * @return Indication as to whether removal has succeeded. */ - virtual GHOST_TSuccess removeTimer(GHOST_TimerTask* timer); + virtual GHOST_TSuccess removeTimer(GHOST_TimerTask *timer); /** * Finds the soonest time the next timer would fire. @@ -108,7 +108,7 @@ public: * @param task The timer task to check and optionally fire. * @return True if the timer fired. */ - virtual bool fireTimer(GHOST_TUns64 time, GHOST_TimerTask* task); + virtual bool fireTimer(GHOST_TUns64 time, GHOST_TimerTask *task); protected: /** @@ -116,7 +116,7 @@ protected: */ void disposeTimers(); - typedef std::vector TTimerVector; + typedef std::vector TTimerVector; /** The list with event consumers. */ TTimerVector m_timers; }; diff --git a/intern/ghost/intern/GHOST_TimerTask.h b/intern/ghost/intern/GHOST_TimerTask.h index e15082ac1ba..d74d705d511 100644 --- a/intern/ghost/intern/GHOST_TimerTask.h +++ b/intern/ghost/intern/GHOST_TimerTask.h @@ -56,11 +56,11 @@ public: GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData = 0) : m_start(start), - m_interval(interval), - m_next(start), - m_timerProc(timerProc), - m_userData(userData), - m_auxData(0) + m_interval(interval), + m_next(start), + m_timerProc(timerProc), + m_userData(userData), + m_auxData(0) { } diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 23f1b044b60..91a974bde19 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -83,12 +83,12 @@ public: * @param numOfAASamples Number of samples used for AA (zero if no AA) */ GHOST_Window( - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, - const bool stereoVisual = false, - const GHOST_TUns16 numOfAASamples = 0); + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, + const bool stereoVisual = false, + const GHOST_TUns16 numOfAASamples = 0); /** * @section Interface inherited from GHOST_IWindow left for derived class @@ -121,7 +121,7 @@ public: * Returns the associated OS object/handle * @return The associated OS object/handle */ - virtual void* getOSWindow() const; + virtual void *getOSWindow() const; /** * Returns the current cursor shape. @@ -145,15 +145,15 @@ public: * @return Indication of success. */ virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 bitmap[16][2], - GHOST_TUns8 mask[16][2], - int hotX, - int hotY); + GHOST_TUns8 mask[16][2], + int hotX, + int hotY); virtual GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, - int sizex, int sizey, - int hotX, int hotY, - int fg_color, int bg_color); + GHOST_TUns8 *mask, + int sizex, int sizey, + int hotX, int hotY, + int fg_color, int bg_color); /** * Returns the visibility state of the cursor. @@ -187,15 +187,19 @@ public: virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect& bounds); /** - * Sets the progress bar value displayed in the window/application icon + * Sets the progress bar value displayed in the window/application icon * @param progress The progress % (0.0 to 1.0) */ - virtual GHOST_TSuccess setProgressBar(float progress) {return GHOST_kFailure;}; + virtual GHOST_TSuccess setProgressBar(float progress) { + return GHOST_kFailure; + }; /** * Hides the progress bar in the icon */ - virtual GHOST_TSuccess endProgressBar() {return GHOST_kFailure;}; + virtual GHOST_TSuccess endProgressBar() { + return GHOST_kFailure; + }; /** * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop @@ -278,7 +282,9 @@ protected: * Sets the cursor grab on the window using * native window system calls. */ - virtual GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) { return GHOST_kSuccess; }; + virtual GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) { + return GHOST_kSuccess; + }; /** * Sets the cursor shape on the window using @@ -295,7 +301,7 @@ protected: int hotX, int hotY) = 0; virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, - int szx, int szy, int hotX, int hotY, int fg, int bg) = 0; + int szx, int szy, int hotX, int hotY, int fg, int bg) = 0; /** The the of drawing context installed in this window. */ GHOST_TDrawingContextType m_drawingContextType; @@ -365,8 +371,8 @@ inline GHOST_TGrabCursorMode GHOST_Window::getCursorGrabMode() const inline bool GHOST_Window::getCursorGrabModeIsWarp() const { - return (m_cursorGrab == GHOST_kGrabWrap) || - (m_cursorGrab == GHOST_kGrabHide); + return (m_cursorGrab == GHOST_kGrabWrap) || + (m_cursorGrab == GHOST_kGrabHide); } inline void GHOST_Window::getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) const @@ -377,14 +383,14 @@ inline void GHOST_Window::getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) inline void GHOST_Window::getCursorGrabAccum(GHOST_TInt32 &x, GHOST_TInt32 &y) const { - x= m_cursorGrabAccumPos[0]; - y= m_cursorGrabAccumPos[1]; + x = m_cursorGrabAccumPos[0]; + y = m_cursorGrabAccumPos[1]; } inline void GHOST_Window::setCursorGrabAccum(GHOST_TInt32 x, GHOST_TInt32 y) { - m_cursorGrabAccumPos[0]= x; - m_cursorGrabAccumPos[1]= y; + m_cursorGrabAccumPos[0] = x; + m_cursorGrabAccumPos[1] = y; } inline GHOST_TStandardCursor GHOST_Window::getCursorShape() const diff --git a/intern/ghost/intern/GHOST_WindowCarbon.h b/intern/ghost/intern/GHOST_WindowCarbon.h index 2c1c827510a..1291fb1a2c4 100644 --- a/intern/ghost/intern/GHOST_WindowCarbon.h +++ b/intern/ghost/intern/GHOST_WindowCarbon.h @@ -73,16 +73,16 @@ public: * @param stereoVisual Stereo visual for quad buffered stereo. */ GHOST_WindowCarbon( - const STR_String& title, - GHOST_TInt32 left, - GHOST_TInt32 top, - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, - const bool stereoVisual = false, - const GHOST_TUns16 numOfAASamples = 0 - ); + const STR_String& title, + GHOST_TInt32 left, + GHOST_TInt32 top, + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, + const bool stereoVisual = false, + const GHOST_TUns16 numOfAASamples = 0 + ); /** * Destructor. @@ -94,7 +94,7 @@ public: * Returns indication as to whether the window is valid. * @return The validity of the window. */ - virtual bool getValid() const; + virtual bool getValid() const; /** * Sets the title displayed in the title bar. @@ -113,33 +113,33 @@ public: * The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. * @param bounds The bounding rectangle of the window. */ - virtual void getWindowBounds(GHOST_Rect& bounds) const; + virtual void getWindowBounds(GHOST_Rect& bounds) const; /** * Returns the client rectangle dimensions. * The left and top members of the rectangle are always zero. * @param bounds The bounding rectangle of the cleient area of the window. */ - virtual void getClientBounds(GHOST_Rect& bounds) const; + virtual void getClientBounds(GHOST_Rect& bounds) const; /** * Resizes client rectangle width. * @param width The new width of the client area of the window. */ - virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width); + virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width); /** * Resizes client rectangle height. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height); + virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height); /** * Resizes client rectangle. * @param width The new width of the client area of the window. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height); + virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height); /** * Returns the state of the window (normal, minimized, maximized). @@ -154,7 +154,7 @@ public: * @param outX The x-coordinate in the client rectangle. * @param outY The y-coordinate in the client rectangle. */ - virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; + virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; /** * Converts a point in screen coordinates to client rectangle coordinates @@ -163,7 +163,7 @@ public: * @param outX The x-coordinate on the screen. * @param outY The y-coordinate on the screen. */ - virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; + virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; /** * Sets the state of the window (normal, minimized, maximized). @@ -206,16 +206,20 @@ public: */ virtual bool getFullScreenDirty(); - /* accessor for fullscreen window */ + /* accessor for fullscreen window */ virtual void setMac_windowState(short value); virtual short getMac_windowState(); - const GHOST_TabletData* GetTabletData() - { return &m_tablet; } + const GHOST_TabletData *GetTabletData() + { + return &m_tablet; + } GHOST_TabletData& GetCarbonTabletData() - { return m_tablet; } + { + return m_tablet; + } protected: /** * Tries to install a rendering context in this window. @@ -232,7 +236,7 @@ protected: /** * Invalidates the contents of this window. - * @return Indication of success. + * @return Indication of success. */ virtual GHOST_TSuccess invalidate(); @@ -253,7 +257,7 @@ protected: * native window system calls. */ virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, - int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color); + 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); @@ -278,7 +282,7 @@ protected: /** The first created OpenGL context (for sharing display lists) */ static AGLContext s_firstaglCtx; - Cursor* m_customCursor; + Cursor *m_customCursor; GHOST_TabletData m_tablet; @@ -286,15 +290,15 @@ protected: bool m_fullScreenDirty; /** specific MacOs X full screen window setting as we use partially system mechanism - values : 0 not maximizable default - 1 normal state - 2 maximized state - - this will be reworked when rebuilding GHOST carbon to use new OS X apis - in order to be unified with GHOST fullscreen/maximised settings - - (lukep) - **/ + * values : 0 not maximizable default + * 1 normal state + * 2 maximized state + * + * this will be reworked when rebuilding GHOST carbon to use new OS X apis + * in order to be unified with GHOST fullscreen/maximised settings + * + * (lukep) + **/ short mac_windowState; diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h index fec97c2af97..d53dfa71d95 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.h +++ b/intern/ghost/intern/GHOST_WindowCocoa.h @@ -74,17 +74,17 @@ public: * @param numOfAASamples Number of samples used for AA (zero if no AA) */ GHOST_WindowCocoa( - GHOST_SystemCocoa *systemCocoa, - const STR_String& title, - GHOST_TInt32 left, - GHOST_TInt32 bottom, - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, - const bool stereoVisual = false, - const GHOST_TUns16 numOfAASamples = 0 - ); + GHOST_SystemCocoa *systemCocoa, + const STR_String& title, + GHOST_TInt32 left, + GHOST_TInt32 bottom, + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, + const bool stereoVisual = false, + const GHOST_TUns16 numOfAASamples = 0 + ); /** * Destructor. @@ -96,13 +96,13 @@ public: * Returns indication as to whether the window is valid. * @return The validity of the window. */ - virtual bool getValid() const; + virtual bool getValid() const; /** * Returns the associated NSWindow object * @return The associated NSWindow object */ - virtual void* getOSWindow() const; + virtual void *getOSWindow() const; /** * Sets the title displayed in the title bar. @@ -121,33 +121,33 @@ public: * The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. * @param bounds The bounding rectangle of the window. */ - virtual void getWindowBounds(GHOST_Rect& bounds) const; + virtual void getWindowBounds(GHOST_Rect& bounds) const; /** * Returns the client rectangle dimensions. * The left and top members of the rectangle are always zero. * @param bounds The bounding rectangle of the cleient area of the window. */ - virtual void getClientBounds(GHOST_Rect& bounds) const; + virtual void getClientBounds(GHOST_Rect& bounds) const; /** * Resizes client rectangle width. * @param width The new width of the client area of the window. */ - virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width); + virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width); /** * Resizes client rectangle height. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height); + virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height); /** * Resizes client rectangle. * @param width The new width of the client area of the window. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height); + virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height); /** * Returns the state of the window (normal, minimized, maximized). @@ -169,7 +169,7 @@ public: * @param outX The x-coordinate in the client rectangle. * @param outY The y-coordinate in the client rectangle. */ - virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; + virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; /** * Converts a point in screen coordinates to client rectangle coordinates @@ -178,7 +178,7 @@ public: * @param outX The x-coordinate on the screen. * @param outY The y-coordinate on the screen. */ - virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; + virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; /** * Converts a point in screen coordinates to client rectangle coordinates @@ -204,7 +204,7 @@ public: * Gets the screen the window is displayed in * @return The NSScreen object */ - NSScreen* getScreen(); + NSScreen *getScreen(); /** * Sets the state of the window (normal, minimized, maximized). @@ -242,11 +242,15 @@ public: virtual void loadCursor(bool visible, GHOST_TStandardCursor cursor) const; - const GHOST_TabletData* GetTabletData() - { return &m_tablet; } + const GHOST_TabletData *GetTabletData() + { + return &m_tablet; + } GHOST_TabletData& GetCocoaTabletData() - { return m_tablet; } + { + return m_tablet; + } /** * Sets the progress bar value displayed in the window/application icon @@ -274,7 +278,7 @@ protected: /** * Invalidates the contents of this window. - * @return Indication of success. + * @return Indication of success. */ virtual GHOST_TSuccess invalidate(); @@ -301,7 +305,7 @@ protected: * native window system calls. */ virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, - int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color); + 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); @@ -320,7 +324,7 @@ protected: /** The first created OpenGL context (for sharing display lists) */ static NSOpenGLContext *s_firstOpenGLcontext; - NSCursor* m_customCursor; + NSCursor *m_customCursor; GHOST_TabletData m_tablet; }; diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h index cf27a3bde49..47931347ed6 100644 --- a/intern/ghost/intern/GHOST_WindowManager.h +++ b/intern/ghost/intern/GHOST_WindowManager.h @@ -63,40 +63,40 @@ public: * @param window Pointer to the window to be added. * @return Indication of success. */ - virtual GHOST_TSuccess addWindow(GHOST_IWindow* window); + virtual GHOST_TSuccess addWindow(GHOST_IWindow *window); /** * Remove a window from our list. * @param window Pointer to the window to be removed. * @return Indication of success. */ - virtual GHOST_TSuccess removeWindow(const GHOST_IWindow* window); + virtual GHOST_TSuccess removeWindow(const GHOST_IWindow *window); /** * Returns whether the window is in our list. * @param window Pointer to the window to query. * @return A boolean indicator. */ - virtual bool getWindowFound(const GHOST_IWindow* window) const; + virtual bool getWindowFound(const GHOST_IWindow *window) const; /** * Returns whether one of the windows is fullscreen. * @return A boolean indicator. */ - virtual bool getFullScreen(void) const; + virtual bool getFullScreen(void) const; /** * Returns pointer to the full-screen window. * @return The fll-screen window (0 if not in full-screen). */ - virtual GHOST_IWindow* getFullScreenWindow(void) const; + virtual GHOST_IWindow *getFullScreenWindow(void) const; /** * Activates fullscreen mode for a window. * @param window The window displayed fullscreen. * @return Indication of success. */ - virtual GHOST_TSuccess beginFullScreen(GHOST_IWindow* window, const bool stereoVisual); + virtual GHOST_TSuccess beginFullScreen(GHOST_IWindow *window, const bool stereoVisual); /** * Closes fullscreen mode down. @@ -109,21 +109,21 @@ public: * There can be only one window active which should be in the current window list. * @param window The new active window. */ - virtual GHOST_TSuccess setActiveWindow(GHOST_IWindow* window); + virtual GHOST_TSuccess setActiveWindow(GHOST_IWindow *window); /** * Returns the active window (the window receiving events). * There can be only one window active which should be in the current window list. * @return window The active window (or NULL if there is none). */ - virtual GHOST_IWindow* getActiveWindow(void) const; + virtual GHOST_IWindow *getActiveWindow(void) const; /** * Set this window to be inactive (not receiving events). * @param window The window to decativate. */ - virtual void setWindowInactive(const GHOST_IWindow* window); + virtual void setWindowInactive(const GHOST_IWindow *window); /** @@ -140,7 +140,7 @@ public: * @param osWindow The OS window object/handle * @return The associated window, null if none corresponds */ - virtual GHOST_IWindow* getWindowAssociatedWithOSWindow(void* osWindow); + virtual GHOST_IWindow *getWindowAssociatedWithOSWindow(void *osWindow); /** * Return true if any windows has a modified status @@ -150,16 +150,16 @@ public: protected: /** The list of windows managed */ - std::vector m_windows; + std::vector m_windows; /** Window in fullscreen state. There can be only one of this which is not in or window list. */ - GHOST_IWindow* m_fullScreenWindow; + GHOST_IWindow *m_fullScreenWindow; /** The active window. */ - GHOST_IWindow* m_activeWindow; + GHOST_IWindow *m_activeWindow; /** Window that was active before entering fullscreen state. */ - GHOST_IWindow* m_activeWindowBeforeFullScreen; + GHOST_IWindow *m_activeWindowBeforeFullScreen; #ifdef WITH_CXX_GUARDEDALLOC public: diff --git a/intern/ghost/intern/GHOST_WindowNULL.h b/intern/ghost/intern/GHOST_WindowNULL.h index 49f6d14552d..cde2cb0ba76 100644 --- a/intern/ghost/intern/GHOST_WindowNULL.h +++ b/intern/ghost/intern/GHOST_WindowNULL.h @@ -41,20 +41,20 @@ public: const GHOST_TabletData* GetTabletData() { return NULL; } GHOST_WindowNULL( - GHOST_SystemNULL *system, - const STR_String& title, - GHOST_TInt32 left, - GHOST_TInt32 top, - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - const GHOST_TEmbedderWindowID parentWindow, - GHOST_TDrawingContextType type, - const bool stereoVisual, - const GHOST_TUns16 numOfAASamples - ) : - GHOST_Window(width,height,state,type,stereoVisual,numOfAASamples), - m_system (system) + GHOST_SystemNULL *system, + const STR_String& title, + GHOST_TInt32 left, + GHOST_TInt32 top, + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + const GHOST_TEmbedderWindowID parentWindow, + GHOST_TDrawingContextType type, + const bool stereoVisual, + const GHOST_TUns16 numOfAASamples + ) : + GHOST_Window(width, height, state, type, stereoVisual, numOfAASamples), + m_system(system) { setTitle(title); } @@ -87,8 +87,8 @@ protected: GHOST_TSuccess setOrder(GHOST_TWindowOrder order) { return GHOST_kSuccess; } -private : - GHOST_SystemNULL * m_system; +private: + GHOST_SystemNULL *m_system; }; diff --git a/intern/ghost/intern/GHOST_WindowSDL.h b/intern/ghost/intern/GHOST_WindowSDL.h index e984aafc733..a39d9878ddd 100644 --- a/intern/ghost/intern/GHOST_WindowSDL.h +++ b/intern/ghost/intern/GHOST_WindowSDL.h @@ -44,17 +44,19 @@ class STR_String; class GHOST_WindowSDL : public GHOST_Window { -private : - GHOST_SystemSDL * m_system; - bool m_invalid_window; +private: + GHOST_SystemSDL *m_system; + bool m_invalid_window; - SDL_Window * m_sdl_win; - SDL_GLContext m_sdl_glcontext; - SDL_Cursor * m_sdl_custom_cursor; + SDL_Window *m_sdl_win; + SDL_GLContext m_sdl_glcontext; + SDL_Cursor *m_sdl_custom_cursor; public: - const GHOST_TabletData* GetTabletData() { return NULL; } + const GHOST_TabletData *GetTabletData() { + return NULL; + } GHOST_WindowSDL(GHOST_SystemSDL *system, const STR_String& title, @@ -158,7 +160,11 @@ protected: GHOST_TWindowState getState() const; - GHOST_TSuccess setOrder(GHOST_TWindowOrder order) { return GHOST_kSuccess; } // TODO + GHOST_TSuccess setOrder(GHOST_TWindowOrder order) + { + // TODO + return GHOST_kSuccess; + } }; diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index c8e88c8d844..28ba470f75a 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -46,18 +46,18 @@ #include -#define PACKETDATA (PK_BUTTONS | PK_NORMAL_PRESSURE | PK_ORIENTATION | PK_CURSOR) -#define PACKETMODE PK_BUTTONS +#define PACKETDATA (PK_BUTTONS | PK_NORMAL_PRESSURE | PK_ORIENTATION | PK_CURSOR) +#define PACKETMODE PK_BUTTONS #include class GHOST_SystemWin32; class GHOST_DropTargetWin32; // typedefs for WinTab functions to allow dynamic loading -typedef UINT (API * GHOST_WIN32_WTInfo) ( UINT, UINT, LPVOID ); -typedef HCTX (API * GHOST_WIN32_WTOpen) (HWND, LPLOGCONTEXTA, BOOL); -typedef BOOL (API * GHOST_WIN32_WTClose) (HCTX); -typedef BOOL (API * GHOST_WIN32_WTPacket) (HCTX, UINT, LPVOID); +typedef UINT (API * GHOST_WIN32_WTInfo)(UINT, UINT, LPVOID); +typedef HCTX (API * GHOST_WIN32_WTOpen)(HWND, LPLOGCONTEXTA, BOOL); +typedef BOOL (API * GHOST_WIN32_WTClose)(HCTX); +typedef BOOL (API * GHOST_WIN32_WTPacket)(HCTX, UINT, LPVOID); /** * GHOST window on M$ Windows OSs. @@ -81,20 +81,20 @@ public: * @param numOfAASamples Number of samples used for AA (zero if no AA) */ GHOST_WindowWin32( - GHOST_SystemWin32 * system, - const STR_String& title, - GHOST_TInt32 left, - GHOST_TInt32 top, - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, - const bool stereoVisual = false, - const GHOST_TUns16 numOfAASamples = 0, - GHOST_TEmbedderWindowID parentWindowHwnd=0, - GHOST_TSuccess msEnabled = GHOST_kFailure, - int msPixelFormat = 0 - ); + GHOST_SystemWin32 *system, + const STR_String& title, + GHOST_TInt32 left, + GHOST_TInt32 top, + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, + const bool stereoVisual = false, + const GHOST_TUns16 numOfAASamples = 0, + GHOST_TEmbedderWindowID parentWindowHwnd = 0, + GHOST_TSuccess msEnabled = GHOST_kFailure, + int msPixelFormat = 0 + ); /** * Destructor. @@ -113,7 +113,7 @@ public: * Returns indication as to whether the window is valid. * @return The validity of the window. */ - virtual bool getValid() const; + virtual bool getValid() const; /** * Access to the handle of the window. @@ -138,33 +138,33 @@ public: * The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. * @param bounds The bounding rectangle of the window. */ - virtual void getWindowBounds(GHOST_Rect& bounds) const; + virtual void getWindowBounds(GHOST_Rect& bounds) const; /** * Returns the client rectangle dimensions. * The left and top members of the rectangle are always zero. * @param bounds The bounding rectangle of the cleient area of the window. */ - virtual void getClientBounds(GHOST_Rect& bounds) const; + virtual void getClientBounds(GHOST_Rect& bounds) const; /** * Resizes client rectangle width. * @param width The new width of the client area of the window. */ - virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width); + virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width); /** * Resizes client rectangle height. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height); + virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height); /** * Resizes client rectangle. * @param width The new width of the client area of the window. * @param height The new height of the client area of the window. */ - virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height); + virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height); /** * Returns the state of the window (normal, minimized, maximized). @@ -179,7 +179,7 @@ public: * @param outX The x-coordinate in the client rectangle. * @param outY The y-coordinate in the client rectangle. */ - virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; + virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; /** * Converts a point in screen coordinates to client rectangle coordinates @@ -188,7 +188,7 @@ public: * @param outX The x-coordinate on the screen. * @param outY The y-coordinate on the screen. */ - virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; + virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; /** * Sets the state of the window (normal, minimized, maximized). @@ -222,7 +222,7 @@ public: virtual GHOST_TSuccess invalidate(); /** - * Sets the progress bar value displayed in the window/application icon + * Sets the progress bar value displayed in the window/application icon * @param progress The progress % */ virtual GHOST_TSuccess setProgressBar(float progress); @@ -236,7 +236,9 @@ public: * Returns the name of the window class. * @return The name of the window class. */ - static wchar_t* getWindowClassName() { return s_windowClassName; } + static wchar_t *getWindowClassName() { + return s_windowClassName; + } /** * Register a mouse click event (should be called @@ -264,8 +266,10 @@ public: */ void loadCursor(bool visible, GHOST_TStandardCursor cursorShape) const; - const GHOST_TabletData* GetTabletData() - { return m_tabletData; } + const GHOST_TabletData *GetTabletData() + { + return m_tabletData; + } void processWin32TabletInitEvent(); void processWin32TabletEvent(WPARAM wParam, LPARAM lParam); @@ -314,20 +318,20 @@ protected: int hotX, int hotY); virtual GHOST_TSuccess setWindowCustomCursorShape( - GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, - int sizex, - int sizey, - int hotX, - int hotY, - int fg_color, - int bg_color - ); + GHOST_TUns8 *bitmap, + GHOST_TUns8 *mask, + int sizex, + int sizey, + int hotX, + int hotY, + int fg_color, + int bg_color + ); /** Pointer to system */ - GHOST_SystemWin32 * m_system; + GHOST_SystemWin32 *m_system; /** Pointer to COM IDropTarget implementor */ - GHOST_DropTargetWin32 * m_dropTarget; + GHOST_DropTargetWin32 *m_dropTarget; /** Window handle. */ HWND m_hWnd; /** Device context handle. */ @@ -349,16 +353,16 @@ protected: HCURSOR m_customCursor; /** ITaskbarList3 structure for progress bar*/ - ITaskbarList3 * m_Bar; + ITaskbarList3 *m_Bar; - static wchar_t* s_windowClassName; + static wchar_t *s_windowClassName; static const int s_maxTitleLength; /** WinTab dll handle */ HMODULE m_wintab; /** Tablet data for GHOST */ - GHOST_TabletData* m_tabletData; + GHOST_TabletData *m_tabletData; /** Stores the Tablet context if detected Tablet features using WinTab.dll */ HCTX m_tablet;