From 4e3b58423ca1ff06ef36bcca3a93abc91f372204 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 18 Jul 2025 12:53:32 +1000 Subject: [PATCH] Cleanup: use snake case for GHOST's can_invert_color argument --- intern/ghost/GHOST_C-api.h | 4 ++-- intern/ghost/GHOST_IWindow.hh | 2 +- intern/ghost/intern/GHOST_C-api.cc | 4 ++-- intern/ghost/intern/GHOST_Window.cc | 4 ++-- intern/ghost/intern/GHOST_Window.hh | 4 ++-- intern/ghost/intern/GHOST_WindowCocoa.hh | 2 +- intern/ghost/intern/GHOST_WindowCocoa.mm | 4 ++-- intern/ghost/intern/GHOST_WindowNULL.hh | 2 +- intern/ghost/intern/GHOST_WindowSDL.cc | 2 +- intern/ghost/intern/GHOST_WindowSDL.hh | 2 +- intern/ghost/intern/GHOST_WindowWayland.cc | 4 ++-- intern/ghost/intern/GHOST_WindowWayland.hh | 2 +- intern/ghost/intern/GHOST_WindowWin32.cc | 2 +- intern/ghost/intern/GHOST_WindowWin32.hh | 2 +- intern/ghost/intern/GHOST_WindowX11.cc | 2 +- intern/ghost/intern/GHOST_WindowX11.hh | 2 +- 16 files changed, 22 insertions(+), 22 deletions(-) diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 951ca6999f5..3f10222b2d5 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -334,7 +334,7 @@ extern GHOST_TSuccess GHOST_HasCursorShape(GHOST_WindowHandle windowhandle, * \param mask: The mask for 1bpp cursor, nullptr if RGBA cursor. * \param size: The width & height of the cursor. * \param hot_spot: The X,Y coordinates of the cursor hot-spot. - * \param canInvertColor: Let macOS invert cursor color to match platform convention. + * \param can_invert_color: Let macOS invert cursor color to match platform convention. * \return Indication of success. */ extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle, @@ -342,7 +342,7 @@ extern GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor); + bool can_invert_color); /** * Set a cursor "generator", allowing the GHOST back-end to dynamically * generate cursors at different sizes as needed, depending on the monitor DPI. diff --git a/intern/ghost/GHOST_IWindow.hh b/intern/ghost/GHOST_IWindow.hh index 7be92220fbf..d11f9d6f89a 100644 --- a/intern/ghost/GHOST_IWindow.hh +++ b/intern/ghost/GHOST_IWindow.hh @@ -330,7 +330,7 @@ class GHOST_IWindow { const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) = 0; + bool can_invert_color) = 0; /** * Set the cursor generator. diff --git a/intern/ghost/intern/GHOST_C-api.cc b/intern/ghost/intern/GHOST_C-api.cc index d5da44f4eba..81023424944 100644 --- a/intern/ghost/intern/GHOST_C-api.cc +++ b/intern/ghost/intern/GHOST_C-api.cc @@ -299,10 +299,10 @@ GHOST_TSuccess GHOST_SetCustomCursorShape(GHOST_WindowHandle windowhandle, const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) + bool can_invert_color) { GHOST_IWindow *window = (GHOST_IWindow *)windowhandle; - return window->setCustomCursorShape(bitmap, mask, size, hot_spot, canInvertColor); + return window->setCustomCursorShape(bitmap, mask, size, hot_spot, can_invert_color); } GHOST_TSuccess GHOST_SetCustomCursorGenerator(GHOST_WindowHandle windowhandle, diff --git a/intern/ghost/intern/GHOST_Window.cc b/intern/ghost/intern/GHOST_Window.cc index 50113d3f70c..3d09e696df6 100644 --- a/intern/ghost/intern/GHOST_Window.cc +++ b/intern/ghost/intern/GHOST_Window.cc @@ -238,9 +238,9 @@ GHOST_TSuccess GHOST_Window::setCustomCursorShape(const uint8_t *bitmap, const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) + bool can_invert_color) { - if (setWindowCustomCursorShape(bitmap, mask, size, hot_spot, canInvertColor)) { + if (setWindowCustomCursorShape(bitmap, mask, size, hot_spot, can_invert_color)) { m_cursorShape = GHOST_kStandardCursorCustom; return GHOST_kSuccess; } diff --git a/intern/ghost/intern/GHOST_Window.hh b/intern/ghost/intern/GHOST_Window.hh index c1736dbb26f..a35cc113c88 100644 --- a/intern/ghost/intern/GHOST_Window.hh +++ b/intern/ghost/intern/GHOST_Window.hh @@ -117,7 +117,7 @@ class GHOST_Window : public GHOST_IWindow { const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) override; + bool can_invert_color) override; /** \copydoc #GHOST_IWindow::setCustomCursorGenerator */ GHOST_TSuccess setCustomCursorGenerator(GHOST_CursorGenerator *cursor_generator) override; @@ -294,7 +294,7 @@ class GHOST_Window : public GHOST_IWindow { const uint8_t *mask, const int size[2], const int hot_size[2], - bool canInvertColor) = 0; + bool can_invert_color) = 0; /** \copydoc #GHOST_IWindow::setWindowCustomCursorGenerator */ virtual GHOST_TSuccess setWindowCustomCursorGenerator(GHOST_CursorGenerator *cursor_generator) { diff --git a/intern/ghost/intern/GHOST_WindowCocoa.hh b/intern/ghost/intern/GHOST_WindowCocoa.hh index 55b3ef73053..7f2b580241e 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.hh +++ b/intern/ghost/intern/GHOST_WindowCocoa.hh @@ -295,7 +295,7 @@ class GHOST_WindowCocoa : public GHOST_Window { const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) override; + bool can_invert_color) override; /** The window containing the view */ BlenderWindow *m_window; diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 09a9d1332f6..83cbd1c41b6 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -1250,7 +1250,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(const uint8_t *bitm const uint8_t *mask, const int size[2], const int hot_spot[2], - const bool canInvertColor) + const bool can_invert_color) { @autoreleasepool { if (m_customCursor) { @@ -1284,7 +1284,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(const uint8_t *bitm /* Flip white cursor with black outline to black cursor with white outline * to match macOS platform conventions. */ - if (canInvertColor) { + if (can_invert_color) { cursorBitmap[y] = ~cursorBitmap[y]; } } diff --git a/intern/ghost/intern/GHOST_WindowNULL.hh b/intern/ghost/intern/GHOST_WindowNULL.hh index a6e5367927b..de2b0d6c87e 100644 --- a/intern/ghost/intern/GHOST_WindowNULL.hh +++ b/intern/ghost/intern/GHOST_WindowNULL.hh @@ -56,7 +56,7 @@ class GHOST_WindowNULL : public GHOST_Window { const uint8_t * /*mask*/, const int /*size*/[2], const int /*hot_spot*/[2], - bool /*canInvertColor*/) override + bool /*can_invert_color*/) override { return GHOST_kSuccess; } diff --git a/intern/ghost/intern/GHOST_WindowSDL.cc b/intern/ghost/intern/GHOST_WindowSDL.cc index 240888e5cd8..2e6c8b198b2 100644 --- a/intern/ghost/intern/GHOST_WindowSDL.cc +++ b/intern/ghost/intern/GHOST_WindowSDL.cc @@ -620,7 +620,7 @@ GHOST_TSuccess GHOST_WindowSDL::setWindowCustomCursorShape(const uint8_t *bitmap const uint8_t *mask, const int size[2], const int hot_spot[2], - bool /*canInvertColor*/) + bool /*can_invert_color*/) { if (m_sdl_custom_cursor) { SDL_FreeCursor(m_sdl_custom_cursor); diff --git a/intern/ghost/intern/GHOST_WindowSDL.hh b/intern/ghost/intern/GHOST_WindowSDL.hh index f57955a96d0..ab9000d2713 100644 --- a/intern/ghost/intern/GHOST_WindowSDL.hh +++ b/intern/ghost/intern/GHOST_WindowSDL.hh @@ -87,7 +87,7 @@ class GHOST_WindowSDL : public GHOST_Window { const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) override; + bool can_invert_color) override; GHOST_TSuccess setWindowCursorVisibility(bool visible) override; diff --git a/intern/ghost/intern/GHOST_WindowWayland.cc b/intern/ghost/intern/GHOST_WindowWayland.cc index efc8bce3a8a..d91a28b494e 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cc +++ b/intern/ghost/intern/GHOST_WindowWayland.cc @@ -2280,7 +2280,7 @@ GHOST_TSuccess GHOST_WindowWayland::setWindowCustomCursorShape(const uint8_t *bi const uint8_t *mask, const int size[2], const int hot_spot[2], - const bool canInvertColor) + const bool can_invert_color) { /* This is no longer needed as all cursors are generated on demand. */ GHOST_ASSERT(false, "All cursors must be generated!"); @@ -2288,7 +2288,7 @@ GHOST_TSuccess GHOST_WindowWayland::setWindowCustomCursorShape(const uint8_t *bi (void)mask; (void)size; (void)hot_spot; - (void)canInvertColor; + (void)can_invert_color; return GHOST_kFailure; } diff --git a/intern/ghost/intern/GHOST_WindowWayland.hh b/intern/ghost/intern/GHOST_WindowWayland.hh index f317a981f9a..4395f47db7d 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.hh +++ b/intern/ghost/intern/GHOST_WindowWayland.hh @@ -101,7 +101,7 @@ class GHOST_WindowWayland : public GHOST_Window { const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) override; + bool can_invert_color) override; bool getCursorGrabUseSoftwareDisplay() override; GHOST_TSuccess getCursorBitmap(GHOST_CursorBitmapRef *bitmap) override; diff --git a/intern/ghost/intern/GHOST_WindowWin32.cc b/intern/ghost/intern/GHOST_WindowWin32.cc index 5c7c1254cc4..ceedd79ab08 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cc +++ b/intern/ghost/intern/GHOST_WindowWin32.cc @@ -1074,7 +1074,7 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(const uint8_t *bitm const uint8_t *mask, const int size[2], const int hot_spot[2], - bool /*canInvertColor*/) + bool /*can_invert_color*/) { if (mask) { /* Old 1bpp XBitMap bitmap and mask. */ diff --git a/intern/ghost/intern/GHOST_WindowWin32.hh b/intern/ghost/intern/GHOST_WindowWin32.hh index 2fbf3986218..3b4629c7d41 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.hh +++ b/intern/ghost/intern/GHOST_WindowWin32.hh @@ -362,7 +362,7 @@ class GHOST_WindowWin32 : public GHOST_Window { const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor); + bool can_invert_color); /* Registration of the AppModel Properties that govern the taskbar button and jump lists. */ void registerWindowAppUserModelProperties(); diff --git a/intern/ghost/intern/GHOST_WindowX11.cc b/intern/ghost/intern/GHOST_WindowX11.cc index e7e64bc42e4..7c7c718b97c 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cc +++ b/intern/ghost/intern/GHOST_WindowX11.cc @@ -1458,7 +1458,7 @@ GHOST_TSuccess GHOST_WindowX11::setWindowCustomCursorShape(const uint8_t *bitmap const uint8_t *mask, const int size[2], const int hot_spot[2], - bool /*canInvertColor*/) + bool /*can_invert_color*/) { Colormap colormap = DefaultColormap(m_display, m_visualInfo->screen); Pixmap bitmap_pix, mask_pix; diff --git a/intern/ghost/intern/GHOST_WindowX11.hh b/intern/ghost/intern/GHOST_WindowX11.hh index 48e984834ed..b7f77e10ad9 100644 --- a/intern/ghost/intern/GHOST_WindowX11.hh +++ b/intern/ghost/intern/GHOST_WindowX11.hh @@ -192,7 +192,7 @@ class GHOST_WindowX11 : public GHOST_Window { const uint8_t *mask, const int size[2], const int hot_spot[2], - bool canInvertColor) override; + bool can_invert_color) override; private: /* Force use of public constructor. */