Cleanup: use snake case for GHOST's can_invert_color argument
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user