Cleanup: order capability flags as defined
When setting GHOST capability flags, use the order they are defined to make the code easier to follow when manually updating.
This commit is contained in:
@@ -971,14 +971,15 @@ GHOST_TCapabilityFlag GHOST_SystemCocoa::getCapabilities() const
|
||||
{
|
||||
return GHOST_TCapabilityFlag(
|
||||
GHOST_CAPABILITY_FLAG_ALL &
|
||||
/* NOTE: order the following flags as they they're declared in the source. */
|
||||
~(
|
||||
/* Cocoa has no support for a primary selection clipboard. */
|
||||
GHOST_kCapabilityPrimaryClipboard |
|
||||
/* No support yet for RGBA mouse cursors. */
|
||||
GHOST_kCapabilityRGBACursors |
|
||||
/* Cocoa doesn't define a Hyper modifier key,
|
||||
* it's possible another modifier could be optionally used in it's place. */
|
||||
GHOST_kCapabilityKeyboardHyperKey));
|
||||
GHOST_kCapabilityKeyboardHyperKey |
|
||||
/* No support yet for RGBA mouse cursors. */
|
||||
GHOST_kCapabilityRGBACursors));
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
|
||||
@@ -50,12 +50,33 @@ class GHOST_SystemHeadless : public GHOST_System {
|
||||
{
|
||||
return GHOST_TCapabilityFlag(
|
||||
GHOST_CAPABILITY_FLAG_ALL &
|
||||
/* No windowing functionality supported. */
|
||||
~(GHOST_kCapabilityWindowPosition | GHOST_kCapabilityCursorWarp |
|
||||
GHOST_kCapabilityPrimaryClipboard | GHOST_kCapabilityDesktopSample |
|
||||
GHOST_kCapabilityClipboardImages | GHOST_kCapabilityInputIME |
|
||||
GHOST_kCapabilityWindowDecorationStyles | GHOST_kCapabilityKeyboardHyperKey |
|
||||
GHOST_kCapabilityRGBACursors));
|
||||
/* No windowing functionality supported.
|
||||
* In most cases this value doesn't matter for the headless backend.
|
||||
*
|
||||
* Nevertheless, don't advertise support.
|
||||
*
|
||||
* NOTE: order the following flags as they they're declared in the source. */
|
||||
~(
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityWindowPosition |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityCursorWarp |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityPrimaryClipboard |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityClipboardImages |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityDesktopSample |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityInputIME |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityWindowDecorationStyles |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityKeyboardHyperKey |
|
||||
/* Wrap. */
|
||||
GHOST_kCapabilityRGBACursors)
|
||||
|
||||
);
|
||||
}
|
||||
char *getClipboard(bool /*selection*/) const override
|
||||
{
|
||||
|
||||
@@ -784,21 +784,22 @@ GHOST_TCapabilityFlag GHOST_SystemSDL::getCapabilities() const
|
||||
{
|
||||
return GHOST_TCapabilityFlag(
|
||||
GHOST_CAPABILITY_FLAG_ALL &
|
||||
/* 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 |
|
||||
/* This SDL back-end has not yet implemented color sampling the desktop. */
|
||||
GHOST_kCapabilityDesktopSample |
|
||||
/* This SDL back-end has not yet implemented image copy/paste. */
|
||||
GHOST_kCapabilityClipboardImages |
|
||||
/* This SDL back-end has not yet implemented color sampling the desktop. */
|
||||
GHOST_kCapabilityDesktopSample |
|
||||
/* No support yet for IME input methods. */
|
||||
GHOST_kCapabilityInputIME |
|
||||
/* No support yet for RGBA mouse cursors. */
|
||||
GHOST_kCapabilityRGBACursors |
|
||||
/* No support for window decoration styles. */
|
||||
GHOST_kCapabilityWindowDecorationStyles |
|
||||
/* No support for a Hyper modifier key. */
|
||||
GHOST_kCapabilityKeyboardHyperKey));
|
||||
GHOST_kCapabilityKeyboardHyperKey |
|
||||
/* No support yet for RGBA mouse cursors. */
|
||||
GHOST_kCapabilityRGBACursors));
|
||||
}
|
||||
|
||||
char *GHOST_SystemSDL::getClipboard(bool /*selection*/) const
|
||||
|
||||
@@ -8776,6 +8776,7 @@ GHOST_TCapabilityFlag GHOST_SystemWayland::getCapabilities() const
|
||||
|
||||
return GHOST_TCapabilityFlag(
|
||||
GHOST_CAPABILITY_FLAG_ALL &
|
||||
/* NOTE: order the following flags as they they're declared in the source. */
|
||||
~(
|
||||
/* WAYLAND doesn't support accessing the window position. */
|
||||
GHOST_kCapabilityWindowPosition |
|
||||
@@ -8796,14 +8797,15 @@ GHOST_TCapabilityFlag GHOST_SystemWayland::getCapabilities() const
|
||||
GHOST_kCapabilityGPUReadFrontBuffer |
|
||||
/* This WAYLAND back-end has not yet implemented desktop color sample. */
|
||||
GHOST_kCapabilityDesktopSample |
|
||||
/* This flag will eventually be removed when support
|
||||
* for the old track-pad protocol is dropped. */
|
||||
((has_wl_trackpad_physical_direction == 1) ?
|
||||
0 :
|
||||
GHOST_kCapabilityTrackpadPhysicalDirection) |
|
||||
/* This WAYLAND back-end doesn't have support for window decoration styles.
|
||||
* In all likelihood, this back-end will eventually need to support client-side
|
||||
* decorations, see #113795. */
|
||||
GHOST_kCapabilityWindowDecorationStyles |
|
||||
/* This flag will eventually be removed. */
|
||||
((has_wl_trackpad_physical_direction == 1) ?
|
||||
0 :
|
||||
GHOST_kCapabilityTrackpadPhysicalDirection)));
|
||||
GHOST_kCapabilityWindowDecorationStyles));
|
||||
}
|
||||
|
||||
bool GHOST_SystemWayland::cursor_grab_use_software_display_get(const GHOST_TGrabCursorMode mode)
|
||||
|
||||
@@ -610,6 +610,7 @@ GHOST_TCapabilityFlag GHOST_SystemWin32::getCapabilities() const
|
||||
{
|
||||
return GHOST_TCapabilityFlag(
|
||||
GHOST_CAPABILITY_FLAG_ALL &
|
||||
/* NOTE: order the following flags as they they're declared in the source. */
|
||||
~(
|
||||
/* WIN32 has no support for a primary selection clipboard. */
|
||||
GHOST_kCapabilityPrimaryClipboard |
|
||||
|
||||
@@ -1818,16 +1818,18 @@ GHOST_TSuccess GHOST_SystemX11::setCursorPosition(int32_t x, int32_t y)
|
||||
|
||||
GHOST_TCapabilityFlag GHOST_SystemX11::getCapabilities() const
|
||||
{
|
||||
return GHOST_TCapabilityFlag(GHOST_CAPABILITY_FLAG_ALL &
|
||||
~(
|
||||
/* No support yet for image copy/paste. */
|
||||
GHOST_kCapabilityClipboardImages |
|
||||
/* No support yet for IME input methods. */
|
||||
GHOST_kCapabilityInputIME |
|
||||
/* No support yet for RGBA mouse cursors. */
|
||||
GHOST_kCapabilityRGBACursors |
|
||||
/* No support for window decoration styles. */
|
||||
GHOST_kCapabilityWindowDecorationStyles));
|
||||
return GHOST_TCapabilityFlag(
|
||||
GHOST_CAPABILITY_FLAG_ALL &
|
||||
/* NOTE: order the following flags as they they're declared in the source. */
|
||||
~(
|
||||
/* No support yet for image copy/paste. */
|
||||
GHOST_kCapabilityClipboardImages |
|
||||
/* 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));
|
||||
}
|
||||
|
||||
void GHOST_SystemX11::addDirtyWindow(GHOST_WindowX11 *bad_wind)
|
||||
|
||||
Reference in New Issue
Block a user