Commit: a5ab9062cbfecc220e232f315784fbb386c33f77 Author: Nicholas Rishel Date: Mon Jul 5 10:10:20 2021 -0700 Branches: fixed_width_integers https://developer.blender.org/rBa5ab9062cbfecc220e232f315784fbb386c33f77
Replace Ghost integral types with standard fixed width integers. Also replace integer with bool in Ghost API when only used as boolean, and replace uint8* with char* in Ghost API when variable is a string. Reviewed By: brecht Differential Revision: https://developer.blender.org/D11617 =================================================================== M intern/ghost/GHOST_C-api.h M intern/ghost/GHOST_IEvent.h M intern/ghost/GHOST_ISystem.h M intern/ghost/GHOST_ISystemPaths.h M intern/ghost/GHOST_IWindow.h M intern/ghost/GHOST_Path-api.h M intern/ghost/GHOST_Rect.h M intern/ghost/GHOST_Types.h M intern/ghost/intern/GHOST_Buttons.h M intern/ghost/intern/GHOST_C-api.cpp M intern/ghost/intern/GHOST_DisplayManager.cpp M intern/ghost/intern/GHOST_DisplayManager.h M intern/ghost/intern/GHOST_DisplayManagerCocoa.h M intern/ghost/intern/GHOST_DisplayManagerCocoa.mm M intern/ghost/intern/GHOST_DisplayManagerNULL.h M intern/ghost/intern/GHOST_DisplayManagerSDL.cpp M intern/ghost/intern/GHOST_DisplayManagerSDL.h M intern/ghost/intern/GHOST_DisplayManagerWin32.cpp M intern/ghost/intern/GHOST_DisplayManagerWin32.h M intern/ghost/intern/GHOST_DisplayManagerX11.cpp M intern/ghost/intern/GHOST_DisplayManagerX11.h M intern/ghost/intern/GHOST_DropTargetWin32.cpp M intern/ghost/intern/GHOST_DropTargetX11.cpp M intern/ghost/intern/GHOST_Event.h M intern/ghost/intern/GHOST_EventButton.h M intern/ghost/intern/GHOST_EventCursor.h M intern/ghost/intern/GHOST_EventDragnDrop.h M intern/ghost/intern/GHOST_EventKey.h M intern/ghost/intern/GHOST_EventManager.cpp M intern/ghost/intern/GHOST_EventManager.h M intern/ghost/intern/GHOST_EventNDOF.h M intern/ghost/intern/GHOST_EventPrinter.cpp M intern/ghost/intern/GHOST_EventString.h M intern/ghost/intern/GHOST_EventTrackpad.h M intern/ghost/intern/GHOST_EventWheel.h M intern/ghost/intern/GHOST_ImeWin32.h M intern/ghost/intern/GHOST_ModifierKeys.h M intern/ghost/intern/GHOST_NDOFManager.cpp M intern/ghost/intern/GHOST_NDOFManager.h M intern/ghost/intern/GHOST_NDOFManagerCocoa.mm M intern/ghost/intern/GHOST_NDOFManagerUnix.cpp M intern/ghost/intern/GHOST_Path-api.cpp M intern/ghost/intern/GHOST_Rect.cpp M intern/ghost/intern/GHOST_System.cpp M intern/ghost/intern/GHOST_System.h M intern/ghost/intern/GHOST_SystemCocoa.h M intern/ghost/intern/GHOST_SystemCocoa.mm M intern/ghost/intern/GHOST_SystemNULL.h M intern/ghost/intern/GHOST_SystemPaths.h M intern/ghost/intern/GHOST_SystemPathsCocoa.h M intern/ghost/intern/GHOST_SystemPathsCocoa.mm M intern/ghost/intern/GHOST_SystemPathsUnix.cpp M intern/ghost/intern/GHOST_SystemPathsUnix.h M intern/ghost/intern/GHOST_SystemPathsWin32.cpp M intern/ghost/intern/GHOST_SystemPathsWin32.h M intern/ghost/intern/GHOST_SystemSDL.cpp M intern/ghost/intern/GHOST_SystemSDL.h M intern/ghost/intern/GHOST_SystemWayland.cpp M intern/ghost/intern/GHOST_SystemWayland.h M intern/ghost/intern/GHOST_SystemWin32.cpp M intern/ghost/intern/GHOST_SystemWin32.h M intern/ghost/intern/GHOST_SystemX11.cpp M intern/ghost/intern/GHOST_SystemX11.h M intern/ghost/intern/GHOST_TimerManager.cpp M intern/ghost/intern/GHOST_TimerManager.h M intern/ghost/intern/GHOST_TimerTask.h M intern/ghost/intern/GHOST_Window.cpp M intern/ghost/intern/GHOST_Window.h M intern/ghost/intern/GHOST_WindowCocoa.h M intern/ghost/intern/GHOST_WindowCocoa.mm M intern/ghost/intern/GHOST_WindowNULL.h M intern/ghost/intern/GHOST_WindowSDL.cpp M intern/ghost/intern/GHOST_WindowSDL.h M intern/ghost/intern/GHOST_WindowWayland.cpp M intern/ghost/intern/GHOST_WindowWayland.h M intern/ghost/intern/GHOST_WindowWin32.cpp M intern/ghost/intern/GHOST_WindowWin32.h M intern/ghost/intern/GHOST_WindowX11.cpp M intern/ghost/intern/GHOST_WindowX11.h M intern/ghost/intern/GHOST_Wintab.h M intern/ghost/intern/GHOST_XrAction.cpp M intern/ghost/intern/GHOST_XrAction.h M intern/ghost/intern/GHOST_XrSession.cpp M intern/ghost/intern/GHOST_XrSession.h M intern/ghost/test/gears/GHOST_C-Test.c M intern/ghost/test/gears/GHOST_Test.cpp M intern/ghost/test/multitest/EventToBuf.c M intern/ghost/test/multitest/MultiTest.c M source/blender/blenkernel/intern/appdir.c M source/blender/windowmanager/intern/wm_cursors.c M source/blender/windowmanager/intern/wm_playanim.c M source/blender/windowmanager/intern/wm_window.c =================================================================== diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 6e22d4ca3a5..0feb6f4c6cb 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -96,7 +96,7 @@ extern GHOST_TSuccess GHOST_DisposeEventConsumer(GHOST_EventConsumerHandle consu * \param systemhandle: The handle to the system. * \return The number of milliseconds. */ -extern GHOST_TUns64 GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle); +extern uint64_t GHOST_GetMilliSeconds(GHOST_SystemHandle systemhandle); /** * Installs a timer. @@ -110,8 +110,8 @@ 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, + uint64_t delay, + uint64_t interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData); @@ -133,7 +133,7 @@ extern GHOST_TSuccess GHOST_RemoveTimer(GHOST_SystemHandle systemhandle, * \param systemhandle: The handle to the system. * \return The number of displays. */ -extern GHOST_TUns8 GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle); +extern uint8_t GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle); /** * Returns the dimensions of the main display on this system. @@ -142,8 +142,8 @@ extern GHOST_TUns8 GHOST_GetNumDisplays(GHOST_SystemHandle systemhandle); * \param height: A pointer the height gets put in. */ extern void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle, - GHOST_TUns32 *width, - GHOST_TUns32 *height); + uint32_t *width, + uint32_t *height); /** * Returns the dimensions of all displays combine @@ -154,8 +154,8 @@ extern void GHOST_GetMainDisplayDimensions(GHOST_SystemHandle systemhandle, * \param height: A pointer the height gets put in. */ extern void GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle, - GHOST_TUns32 *width, - GHOST_TUns32 *height); + uint32_t *width, + uint32_t *height); /** * Create a new window. @@ -178,10 +178,10 @@ extern void GHOST_GetAllDisplayDimensions(GHOST_SystemHandle systemhandle, extern GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle, GHOST_WindowHandle parent_windowhandle, const char *title, - GHOST_TInt32 left, - GHOST_TInt32 top, - GHOST_TUns32 width, - GHOST_TUns32 height, + int32_t left, + int32_t top, + uint32_t width, + uint32_t height, GHOST_TWindowState state, bool is_dialog, GHOST_TDrawingContextType type, @@ -360,13 +360,13 @@ extern GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle, * \return Indication of success. */ extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle, - GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, + uint8_t *bitmap, + uint8_t *mask, int sizex, int sizey, int hotX, int hotY, - GHOST_TUns8 canInvertColor); + bool canInvertColor); /** * Returns the visibility state of the cursor. @@ -391,8 +391,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); + int32_t *x, + int32_t *y); /** * Updates the location of the cursor (location in screen coordinates). @@ -403,8 +403,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); + int32_t x, + int32_t y); /** * Grabs the cursor for a modal operation, to keep receiving @@ -467,7 +467,7 @@ extern void GHOST_setNDOFDeadZone(float deadzone); /** * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop */ -extern void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, GHOST_TInt8 canAccept); +extern void GHOST_setAcceptDragOperation(GHOST_WindowHandle windowhandle, bool canAccept); /** * Returns the event type. @@ -481,7 +481,7 @@ extern GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle); * \param eventhandle: The handle to the event. * \return The event generation time. */ -extern GHOST_TUns64 GHOST_GetEventTime(GHOST_EventHandle eventhandle); +extern uint64_t GHOST_GetEventTime(GHOST_EventHandle eventhandle); /** * Returns the window this event was generated on, @@ -595,7 +595,7 @@ void GHOST_DisposeRectangle(GHOST_RectangleHandle rectanglehandle); * \param width: The new width of the client area of the window. * \return Indication of success. */ -extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, GHOST_TUns32 width); +extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, uint32_t width); /** * Resizes client rectangle height. @@ -603,7 +603,7 @@ extern GHOST_TSuccess GHOST_SetClientWidth(GHOST_WindowHandle windowhandle, GHOS * \param height: The new height of the client area of the window. * \return Indication of success. */ -extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, GHOST_TUns32 height); +extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, uint32_t height); /** * Resizes client rectangle. @@ -613,8 +613,8 @@ extern GHOST_TSuccess GHOST_SetClientHeight(GHOST_WindowHandle windowhandle, GHO * \return Indication of success. */ extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle, - GHOST_TUns32 width, - GHOST_TUns32 height); + uint32_t width, + uint32_t height); /** * Converts a point in screen coordinates to client rectangle coordinates @@ -624,11 +624,8 @@ extern GHOST_TSuccess GHOST_SetClientSize(GHOST_WindowHandle windowhandle, * \param outX: The x-coordinate in the client rectangle. * \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); +extern void GHOST_ScreenToClient( + GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY); /** * Converts a point in screen coordinates to client rectangle coordinates @@ -638,11 +635,8 @@ extern void GHOST_ScreenToClient(GHOST_WindowHandle windowhandle, * \param outX: The x-coordinate on the screen. * \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); +extern void GHOST_ClientToScreen( + GHOST_WindowHandle windowhandle, int32_t inX, int32_t inY, int32_t *outX, int32_t *outY); /** * Returns the state of the window (normal, minimized, maximized). @@ -667,7 +661,7 @@ extern GHOST_TSuccess GHOST_SetWindowState(GHOST_WindowHandle windowhandle, * \return Indication of success. */ extern GHOST_TSuccess GHOST_SetWindowModifiedState(GHOST_WindowHandle windowhandle, - GHOST_TUns8 isUnsavedChanges); + bool isUnsavedChanges); /** * Sets the order of the window (bottom, top). @@ -758,14 +752,14 @@ extern void GHOST_SetTabletAPI(GHOST_SystemHandle systemhandle, GHOST_TTabletAPI * \param rectanglehandle: The handle to the rectangle. * \return width of the rectangle */ -extern GHOST_TInt32 GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle); +extern int32_t GHOST_GetWidthRectangle(GHOST_RectangleHandle rectanglehandle); /** * Access to rectangle height. * \param rectanglehandle: The handle to the rectangle. * \return heig @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
