diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 1943aa51ea6..8d09d337e02 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -926,7 +926,7 @@ extern GHOST_TSuccess GHOST_ClipRectangle(GHOST_RectangleHandle rectanglehandle, /** * Return the data from the clipboard * \param selection: Boolean to return the selection instead. - * The capability flag: #GHOST_kCapabilityPrimaryClipboard can be used to check for supported. + * The capability flag: #GHOST_kCapabilityClipboardPrimary can be used to check for supported. * \return clipboard data */ extern char *GHOST_getClipboard(bool selection); diff --git a/intern/ghost/GHOST_ISystem.hh b/intern/ghost/GHOST_ISystem.hh index 2d4997b5677..2a10e1b3581 100644 --- a/intern/ghost/GHOST_ISystem.hh +++ b/intern/ghost/GHOST_ISystem.hh @@ -452,7 +452,7 @@ class GHOST_ISystem { * Return the clipboard buffer or null. * * \param selection: Use the "primary" selection. - * Check the #GHOST_kCapabilityPrimaryClipboard for backends that support this. + * Check the #GHOST_kCapabilityClipboardPrimary for backends that support this. * \return Returns the clipboard data as a null terminated string or null when unavailable. */ virtual char *getClipboard(bool selection) const = 0; diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 2765d98d7cf..e22f53bdbcc 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -99,7 +99,7 @@ typedef enum { * Set when a separate primary clipboard is supported. * This is a convention for X11/WAYLAND, select text & MMB to paste (without an explicit copy). */ - GHOST_kCapabilityPrimaryClipboard = (1 << 2), + GHOST_kCapabilityClipboardPrimary = (1 << 2), /** * Support for reading the front-buffer. */ @@ -107,7 +107,7 @@ typedef enum { /** * Set when there is support for system clipboard copy/paste. */ - GHOST_kCapabilityClipboardImages = (1 << 4), + GHOST_kCapabilityClipboardImage = (1 << 4), /** * Support for sampling a color outside of the Blender windows. */ @@ -132,7 +132,7 @@ typedef enum { * Support for creation of RGBA mouse cursors. This flag is likely * to be temporary as our intention is to implement on all platforms. */ - GHOST_kCapabilityRGBACursors = (1 << 10), + GHOST_kCapabilityCursorRGBA = (1 << 10), } GHOST_TCapabilityFlag; @@ -142,11 +142,10 @@ typedef enum { */ #define GHOST_CAPABILITY_FLAG_ALL \ (GHOST_kCapabilityCursorWarp | GHOST_kCapabilityWindowPosition | \ - GHOST_kCapabilityPrimaryClipboard | GHOST_kCapabilityGPUReadFrontBuffer | \ - GHOST_kCapabilityClipboardImages | GHOST_kCapabilityDesktopSample | \ - GHOST_kCapabilityInputIME | GHOST_kCapabilityTrackpadPhysicalDirection | \ - GHOST_kCapabilityWindowDecorationStyles | GHOST_kCapabilityKeyboardHyperKey | \ - GHOST_kCapabilityRGBACursors) + GHOST_kCapabilityClipboardPrimary | GHOST_kCapabilityGPUReadFrontBuffer | \ + GHOST_kCapabilityClipboardImage | GHOST_kCapabilityDesktopSample | GHOST_kCapabilityInputIME | \ + GHOST_kCapabilityTrackpadPhysicalDirection | GHOST_kCapabilityWindowDecorationStyles | \ + GHOST_kCapabilityKeyboardHyperKey | GHOST_kCapabilityCursorRGBA) /* Xtilt and Ytilt represent how much the pen is tilted away from * vertically upright in either the X or Y direction, with X and Y the diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 48c0e037a1f..440830a355b 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -974,12 +974,12 @@ GHOST_TCapabilityFlag GHOST_SystemCocoa::getCapabilities() const /* NOTE: order the following flags as they they're declared in the source. */ ~( /* Cocoa has no support for a primary selection clipboard. */ - GHOST_kCapabilityPrimaryClipboard | + GHOST_kCapabilityClipboardPrimary | /* Cocoa doesn't define a Hyper modifier key, * it's possible another modifier could be optionally used in it's place. */ GHOST_kCapabilityKeyboardHyperKey | /* No support yet for RGBA mouse cursors. */ - GHOST_kCapabilityRGBACursors)); + GHOST_kCapabilityCursorRGBA)); } /* -------------------------------------------------------------------- diff --git a/intern/ghost/intern/GHOST_SystemHeadless.hh b/intern/ghost/intern/GHOST_SystemHeadless.hh index 0ed14d338a9..b44f1252363 100644 --- a/intern/ghost/intern/GHOST_SystemHeadless.hh +++ b/intern/ghost/intern/GHOST_SystemHeadless.hh @@ -62,9 +62,9 @@ class GHOST_SystemHeadless : public GHOST_System { /* Wrap. */ GHOST_kCapabilityCursorWarp | /* Wrap. */ - GHOST_kCapabilityPrimaryClipboard | + GHOST_kCapabilityClipboardPrimary | /* Wrap. */ - GHOST_kCapabilityClipboardImages | + GHOST_kCapabilityClipboardImage | /* Wrap. */ GHOST_kCapabilityDesktopSample | /* Wrap. */ @@ -74,7 +74,7 @@ class GHOST_SystemHeadless : public GHOST_System { /* Wrap. */ GHOST_kCapabilityKeyboardHyperKey | /* Wrap. */ - GHOST_kCapabilityRGBACursors) + GHOST_kCapabilityCursorRGBA) ); } diff --git a/intern/ghost/intern/GHOST_SystemSDL.cc b/intern/ghost/intern/GHOST_SystemSDL.cc index f0fbd3e1da3..677657d787c 100644 --- a/intern/ghost/intern/GHOST_SystemSDL.cc +++ b/intern/ghost/intern/GHOST_SystemSDL.cc @@ -787,9 +787,9 @@ GHOST_TCapabilityFlag GHOST_SystemSDL::getCapabilities() const /* NOTE: order the following flags as they they're declared in the source. */ ~( /* This SDL back-end has not yet implemented primary clipboard. */ - GHOST_kCapabilityPrimaryClipboard | + GHOST_kCapabilityClipboardPrimary | /* This SDL back-end has not yet implemented image copy/paste. */ - GHOST_kCapabilityClipboardImages | + GHOST_kCapabilityClipboardImage | /* This SDL back-end has not yet implemented color sampling the desktop. */ GHOST_kCapabilityDesktopSample | /* No support yet for IME input methods. */ @@ -799,7 +799,7 @@ GHOST_TCapabilityFlag GHOST_SystemSDL::getCapabilities() const /* No support for a Hyper modifier key. */ GHOST_kCapabilityKeyboardHyperKey | /* No support yet for RGBA mouse cursors. */ - GHOST_kCapabilityRGBACursors)); + GHOST_kCapabilityCursorRGBA)); } char *GHOST_SystemSDL::getClipboard(bool /*selection*/) const diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc index a5df0b8f577..e03bd12d540 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cc +++ b/intern/ghost/intern/GHOST_SystemWin32.cc @@ -613,7 +613,7 @@ GHOST_TCapabilityFlag GHOST_SystemWin32::getCapabilities() const /* NOTE: order the following flags as they they're declared in the source. */ ~( /* WIN32 has no support for a primary selection clipboard. */ - GHOST_kCapabilityPrimaryClipboard | + GHOST_kCapabilityClipboardPrimary | /* WIN32 doesn't define a Hyper modifier key, * it's possible another modifier could be optionally used in it's place. */ GHOST_kCapabilityKeyboardHyperKey)); diff --git a/intern/ghost/intern/GHOST_SystemX11.cc b/intern/ghost/intern/GHOST_SystemX11.cc index 47365b457a0..aa6ec7f83e8 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cc +++ b/intern/ghost/intern/GHOST_SystemX11.cc @@ -1823,13 +1823,13 @@ GHOST_TCapabilityFlag GHOST_SystemX11::getCapabilities() const /* NOTE: order the following flags as they they're declared in the source. */ ~( /* No support yet for image copy/paste. */ - GHOST_kCapabilityClipboardImages | + GHOST_kCapabilityClipboardImage | /* No support yet for IME input methods. */ GHOST_kCapabilityInputIME | /* No support for window decoration styles. */ GHOST_kCapabilityWindowDecorationStyles | /* No support yet for RGBA mouse cursors. */ - GHOST_kCapabilityRGBACursors)); + GHOST_kCapabilityCursorRGBA)); } void GHOST_SystemX11::addDirtyWindow(GHOST_WindowX11 *bad_wind) diff --git a/source/blender/editors/curve/editfont.cc b/source/blender/editors/curve/editfont.cc index c392b397be6..b48b8243dbf 100644 --- a/source/blender/editors/curve/editfont.cc +++ b/source/blender/editors/curve/editfont.cc @@ -464,7 +464,7 @@ static void font_select_update_primary_clipboard(Object *obedit) return; } - if ((WM_capabilities_flag() & WM_CAPABILITY_PRIMARY_CLIPBOARD) == 0) { + if ((WM_capabilities_flag() & WM_CAPABILITY_CLIPBOARD_PRIMARY) == 0) { return; } char *buf = font_select_to_buffer(obedit); diff --git a/source/blender/editors/space_console/console_ops.cc b/source/blender/editors/space_console/console_ops.cc index 2cda68b21eb..2cbeb3e3d20 100644 --- a/source/blender/editors/space_console/console_ops.cc +++ b/source/blender/editors/space_console/console_ops.cc @@ -90,7 +90,7 @@ static char *console_select_to_buffer(SpaceConsole *sc) static void console_select_update_primary_clipboard(SpaceConsole *sc) { - if ((WM_capabilities_flag() & WM_CAPABILITY_PRIMARY_CLIPBOARD) == 0) { + if ((WM_capabilities_flag() & WM_CAPABILITY_CLIPBOARD_PRIMARY) == 0) { return; } if (sc->sel_start == sc->sel_end) { diff --git a/source/blender/editors/space_text/text_ops.cc b/source/blender/editors/space_text/text_ops.cc index caa70926c99..0c83002b212 100644 --- a/source/blender/editors/space_text/text_ops.cc +++ b/source/blender/editors/space_text/text_ops.cc @@ -226,7 +226,7 @@ BLI_INLINE int space_text_pixel_x_to_column(const SpaceText *st, const int x) static void text_select_update_primary_clipboard(const Text *text) { - if ((WM_capabilities_flag() & WM_CAPABILITY_PRIMARY_CLIPBOARD) == 0) { + if ((WM_capabilities_flag() & WM_CAPABILITY_CLIPBOARD_PRIMARY) == 0) { return; } if (!txt_has_sel(text)) { diff --git a/source/blender/python/intern/bpy.cc b/source/blender/python/intern/bpy.cc index 5db433ae72a..3db202b84fc 100644 --- a/source/blender/python/intern/bpy.cc +++ b/source/blender/python/intern/bpy.cc @@ -627,9 +627,9 @@ static PyObject *bpy_wm_capabilities(PyObject *self) SetFlagItem(CURSOR_WARP); SetFlagItem(WINDOW_POSITION); - SetFlagItem(PRIMARY_CLIPBOARD); + SetFlagItem(CLIPBOARD_PRIMARY); SetFlagItem(GPU_FRONT_BUFFER_READ); - SetFlagItem(CLIPBOARD_IMAGES); + SetFlagItem(CLIPBOARD_IMAGE); SetFlagItem(DESKTOP_SAMPLE); SetFlagItem(INPUT_IME); SetFlagItem(TRACKPAD_PHYSICAL_DIRECTION); diff --git a/source/blender/windowmanager/WM_api.hh b/source/blender/windowmanager/WM_api.hh index 67ee1b6d7a2..4f1d8bc4ed9 100644 --- a/source/blender/windowmanager/WM_api.hh +++ b/source/blender/windowmanager/WM_api.hh @@ -184,13 +184,13 @@ enum eWM_CapabilitiesFlag { * The windowing system supports a separate primary clipboard * (typically set when interactively selecting text). */ - WM_CAPABILITY_PRIMARY_CLIPBOARD = (1 << 2), + WM_CAPABILITY_CLIPBOARD_PRIMARY = (1 << 2), /** * Reading from the back-buffer is supported. */ WM_CAPABILITY_GPU_FRONT_BUFFER_READ = (1 << 3), /** Ability to copy/paste system clipboard images. */ - WM_CAPABILITY_CLIPBOARD_IMAGES = (1 << 4), + WM_CAPABILITY_CLIPBOARD_IMAGE = (1 << 4), /** Ability to sample a color outside of Blender windows. */ WM_CAPABILITY_DESKTOP_SAMPLE = (1 << 5), /** Support for IME input methods. */ @@ -202,7 +202,7 @@ enum eWM_CapabilitiesFlag { /** Support for the "Hyper" modifier key. */ WM_CAPABILITY_KEYBOARD_HYPER_KEY = (1 << 9), /** Support for RGBA Cursors. */ - WM_CAPABILITY_RGBA_CURSORS = (1 << 10), + WM_CAPABILITY_CURSOR_RGBA = (1 << 10), /** The initial value, indicates the value needs to be set by inspecting GHOST. */ WM_CAPABILITY_INITIALIZED = (1u << 31), }; @@ -1872,7 +1872,7 @@ void WM_job_main_thread_lock_release(wmJob *wm_job); /** * Return text from the clipboard. - * \param selection: Use the "primary" clipboard, see: #WM_CAPABILITY_PRIMARY_CLIPBOARD. + * \param selection: Use the "primary" clipboard, see: #WM_CAPABILITY_CLIPBOARD_PRIMARY. * \param ensure_utf8: Ensure the resulting string does not contain invalid UTF8 encoding. */ char *WM_clipboard_text_get(bool selection, bool ensure_utf8, int *r_len); diff --git a/source/blender/windowmanager/intern/wm_cursors.cc b/source/blender/windowmanager/intern/wm_cursors.cc index b3b42727240..bc20b17f8a6 100644 --- a/source/blender/windowmanager/intern/wm_cursors.cc +++ b/source/blender/windowmanager/intern/wm_cursors.cc @@ -225,7 +225,7 @@ static bool window_set_custom_cursor(wmWindow *win, const BCursor &cursor) const bool use_only_1bpp_cursors = false; const bool use_rgba = !use_only_1bpp_cursors && - (WM_capabilities_flag() & WM_CAPABILITY_RGBA_CURSORS); + (WM_capabilities_flag() & WM_CAPABILITY_CURSOR_RGBA); const int max_size = use_rgba ? 128 : 32; const int size = std::min(cursor_size(), max_size); diff --git a/source/blender/windowmanager/intern/wm_draw.cc b/source/blender/windowmanager/intern/wm_draw.cc index e73dfcae8dc..b390239d3f4 100644 --- a/source/blender/windowmanager/intern/wm_draw.cc +++ b/source/blender/windowmanager/intern/wm_draw.cc @@ -261,7 +261,7 @@ static void wm_software_cursor_draw_bitmap(const int event_xy[2], * * NOTE: *technically* if a window spans two output of different scales, * we should scale to the output. This use case is currently not accounted for. */ - const int scale = (WM_capabilities_flag() & WM_CAPABILITY_RGBA_CURSORS) ? + const int scale = (WM_capabilities_flag() & WM_CAPABILITY_CURSOR_RGBA) ? 1 : std::max(1, round_fl_to_int(system_scale)); diff --git a/source/blender/windowmanager/intern/wm_window.cc b/source/blender/windowmanager/intern/wm_window.cc index fef743b930a..a3d3ff10da2 100644 --- a/source/blender/windowmanager/intern/wm_window.cc +++ b/source/blender/windowmanager/intern/wm_window.cc @@ -2209,14 +2209,14 @@ eWM_CapabilitiesFlag WM_capabilities_flag() if (ghost_flag & GHOST_kCapabilityWindowPosition) { flag |= WM_CAPABILITY_WINDOW_POSITION; } - if (ghost_flag & GHOST_kCapabilityPrimaryClipboard) { - flag |= WM_CAPABILITY_PRIMARY_CLIPBOARD; + if (ghost_flag & GHOST_kCapabilityClipboardPrimary) { + flag |= WM_CAPABILITY_CLIPBOARD_PRIMARY; } if (ghost_flag & GHOST_kCapabilityGPUReadFrontBuffer) { flag |= WM_CAPABILITY_GPU_FRONT_BUFFER_READ; } - if (ghost_flag & GHOST_kCapabilityClipboardImages) { - flag |= WM_CAPABILITY_CLIPBOARD_IMAGES; + if (ghost_flag & GHOST_kCapabilityClipboardImage) { + flag |= WM_CAPABILITY_CLIPBOARD_IMAGE; } if (ghost_flag & GHOST_kCapabilityDesktopSample) { flag |= WM_CAPABILITY_DESKTOP_SAMPLE; @@ -2233,8 +2233,8 @@ eWM_CapabilitiesFlag WM_capabilities_flag() if (ghost_flag & GHOST_kCapabilityKeyboardHyperKey) { flag |= WM_CAPABILITY_KEYBOARD_HYPER_KEY; } - if (ghost_flag & GHOST_kCapabilityRGBACursors) { - flag |= WM_CAPABILITY_RGBA_CURSORS; + if (ghost_flag & GHOST_kCapabilityCursorRGBA) { + flag |= WM_CAPABILITY_CURSOR_RGBA; } return flag;