-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: falkTX <[email protected]>
- Loading branch information
Showing
17 changed files
with
336 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* DISTRHO Plugin Framework (DPF) | ||
* Copyright (C) 2012-2022 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2023 Filipe Coelho <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | ||
* or without fee is hereby granted, provided that the above copyright notice and this | ||
|
@@ -62,55 +62,87 @@ enum Modifier { | |
*/ | ||
enum Key { | ||
// Convenience symbols for ASCII control characters | ||
kKeyBackspace = 0x08, | ||
kKeyEscape = 0x1B, | ||
kKeyDelete = 0x7F, | ||
kKeyBackspace = 0x00000008U, ///< Backspace | ||
kKeyEnter = 0x0000000DU, ///< Enter | ||
kKeyEscape = 0x0000001BU, ///< Escape | ||
kKeyDelete = 0x0000007FU, ///< Delete | ||
kKeySpace = 0x00000020U, ///< Space | ||
|
||
// Unicode Private Use Area | ||
kKeyF1 = 0x0000E000U, ///< F1 | ||
kKeyF2, ///< F2 | ||
kKeyF3, ///< F3 | ||
kKeyF4, ///< F4 | ||
kKeyF5, ///< F5 | ||
kKeyF6, ///< F6 | ||
kKeyF7, ///< F7 | ||
kKeyF8, ///< F8 | ||
kKeyF9, ///< F9 | ||
kKeyF10, ///< F10 | ||
kKeyF11, ///< F11 | ||
kKeyF12, ///< F12 | ||
kKeyPageUp = 0xE031, ///< Page Up | ||
kKeyPageDown, ///< Page Down | ||
kKeyEnd, ///< End | ||
kKeyHome, ///< Home | ||
kKeyLeft, ///< Left | ||
kKeyUp, ///< Up | ||
kKeyRight, ///< Right | ||
kKeyDown, ///< Down | ||
kKeyPrintScreen = 0xE041U, ///< Print Screen | ||
kKeyInsert, ///< Insert | ||
kKeyPause, ///< Pause/Break | ||
kKeyMenu, ///< Menu | ||
kKeyNumLock, ///< Num Lock | ||
kKeyScrollLock, ///< Scroll Lock | ||
kKeyCapsLock, ///< Caps Lock | ||
kKeyShiftL = 0xE051U, ///< Left Shift, | ||
kKeyShiftR, ///< Right Shift | ||
kKeyControlL, ///< Left Control | ||
kKeyControlR, ///< Right Control | ||
kKeyAltL, ///< Left Alt | ||
kKeyAltR, ///< Right Alt / AltGr | ||
kKeySuperL, ///< Left Super | ||
kKeySuperR, ///< Right Super | ||
kKeyPad0 = 0xE060U, ///< Keypad 0 | ||
kKeyPad1, ///< Keypad 1 | ||
kKeyPad2, ///< Keypad 2 | ||
kKeyPad3, ///< Keypad 3 | ||
kKeyPad4, ///< Keypad 4 | ||
kKeyPad5, ///< Keypad 5 | ||
kKeyPad6, ///< Keypad 6 | ||
kKeyPad7, ///< Keypad 7 | ||
kKeyPad8, ///< Keypad 8 | ||
kKeyPad9, ///< Keypad 9 | ||
kKeyPadEnter, ///< Keypad Enter | ||
kKeyPadPageUp = 0xE071U, ///< Keypad Page Up | ||
kKeyPadPageDown, ///< Keypad Page Down | ||
kKeyPadEnd, ///< Keypad End | ||
kKeyPadHome, ///< Keypad Home | ||
kKeyPadLeft, ///< Keypad Left | ||
kKeyPadUp, ///< Keypad Up | ||
kKeyPadRight, ///< Keypad Right | ||
kKeyPadDown, ///< Keypad Down | ||
kKeyPadClear = 0xE09DU, ///< Keypad Clear/Begin | ||
kKeyPadInsert, ///< Keypad Insert | ||
kKeyPadDelete, ///< Keypad Delete | ||
kKeyPadEqual, ///< Keypad Equal | ||
kKeyPadMultiply = 0xE0AAU, ///< Keypad Multiply | ||
kKeyPadAdd, ///< Keypad Add | ||
kKeyPadSeparator, ///< Keypad Separator | ||
kKeyPadSubtract, ///< Keypad Subtract | ||
kKeyPadDecimal, ///< Keypad Decimal | ||
kKeyPadDivide, ///< Keypad Divide | ||
|
||
// Backwards compatibility with old DPF | ||
kCharBackspace DISTRHO_DEPRECATED_BY("kKeyBackspace") = kKeyBackspace, | ||
kCharEscape DISTRHO_DEPRECATED_BY("kKeyEscape") = kKeyEscape, | ||
kCharDelete DISTRHO_DEPRECATED_BY("kKeyDelete") = kKeyDelete, | ||
|
||
// Unicode Private Use Area | ||
kKeyF1 = 0xE000, | ||
kKeyF2, | ||
kKeyF3, | ||
kKeyF4, | ||
kKeyF5, | ||
kKeyF6, | ||
kKeyF7, | ||
kKeyF8, | ||
kKeyF9, | ||
kKeyF10, | ||
kKeyF11, | ||
kKeyF12, | ||
kKeyLeft, | ||
kKeyUp, | ||
kKeyRight, | ||
kKeyDown, | ||
kKeyPageUp, | ||
kKeyPageDown, | ||
kKeyHome, | ||
kKeyEnd, | ||
kKeyInsert, | ||
kKeyShift, | ||
kKeyShiftL = kKeyShift, | ||
kKeyShiftR, | ||
kKeyControl, | ||
kKeyControlL = kKeyControl, | ||
kKeyControlR, | ||
kKeyAlt, | ||
kKeyAltL = kKeyAlt, | ||
kKeyAltR, | ||
kKeySuper, | ||
kKeySuperL = kKeySuper, | ||
kKeySuperR, | ||
kKeyMenu, | ||
kKeyCapsLock, | ||
kKeyScrollLock, | ||
kKeyNumLock, | ||
kKeyPrintScreen, | ||
kKeyPause | ||
kKeyShift DISTRHO_DEPRECATED_BY("kKeyShiftL") = kKeyShiftL, | ||
kKeyControl DISTRHO_DEPRECATED_BY("kKeyControlL") = kKeyControlL, | ||
kKeyAlt DISTRHO_DEPRECATED_BY("kKeyAltL") = kKeyAltL, | ||
kKeySuper DISTRHO_DEPRECATED_BY("kKeySuperL") = kKeySuperL, | ||
}; | ||
|
||
/** | ||
|
@@ -159,15 +191,20 @@ enum MouseButton { | |
This is a portable subset of mouse cursors that exist on X11, MacOS, and Windows. | ||
*/ | ||
enum MouseCursor { | ||
kMouseCursorArrow, ///< Default pointing arrow | ||
kMouseCursorCaret, ///< Caret (I-Beam) for text entry | ||
kMouseCursorCrosshair, ///< Cross-hair | ||
kMouseCursorHand, ///< Hand with a pointing finger | ||
kMouseCursorNotAllowed, ///< Operation not allowed | ||
kMouseCursorLeftRight, ///< Left/right arrow for horizontal resize | ||
kMouseCursorUpDown, ///< Up/down arrow for vertical resize | ||
kMouseCursorDiagonal, ///< Top-left to bottom-right arrow for diagonal resize | ||
kMouseCursorAntiDiagonal ///< Bottom-left to top-right arrow for diagonal resize | ||
kMouseCursorArrow, ///< Default pointing arrow | ||
kMouseCursorCaret, ///< Caret (I-Beam) for text entry | ||
kMouseCursorCrosshair, ///< Cross-hair | ||
kMouseCursorHand, ///< Hand with a pointing finger | ||
kMouseCursorNotAllowed, ///< Operation not allowed | ||
kMouseCursorLeftRight, ///< Left/right arrow for horizontal resize | ||
kMouseCursorUpDown, ///< Up/down arrow for vertical resize | ||
kMouseCursorUpLeftDownRight, ///< Diagonal arrow for down/right resize | ||
kMouseCursorUpRightDownLeft, ///< Diagonal arrow for down/left resize | ||
kMouseCursorAllScroll, ///< Omnidirectional "arrow" for scrolling | ||
|
||
// Backwards compatibility with old DPF | ||
kMouseCursorDiagonal DISTRHO_DEPRECATED_BY("kMouseCursorUpLeftDownRight") = kMouseCursorUpLeftDownRight, | ||
kMouseCursorAntiDiagonal DISTRHO_DEPRECATED_BY("kMouseCursorUpRightDownLeft") = kMouseCursorUpRightDownLeft | ||
}; | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* DISTRHO Plugin Framework (DPF) | ||
* Copyright (C) 2012-2021 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2023 Filipe Coelho <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | ||
* or without fee is hereby granted, provided that the above copyright notice and this | ||
|
@@ -47,7 +47,7 @@ static bool isThisTheMainThread(const d_ThreadHandle mainThreadHandle) noexcept | |
|
||
const char* Application::getClassName() const noexcept | ||
{ | ||
return puglGetClassName(pData->world); | ||
return puglGetWorldString(pData->world, PUGL_CLASS_NAME); | ||
} | ||
|
||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
@@ -68,9 +68,9 @@ Application::PrivateData::PrivateData(const bool standalone) | |
|
||
puglSetWorldHandle(world, this); | ||
#ifdef __EMSCRIPTEN__ | ||
puglSetClassName(world, "canvas"); | ||
puglSetWorldString(world, PUGL_CLASS_NAME, "canvas"); | ||
#else | ||
puglSetClassName(world, DISTRHO_MACRO_AS_STRING(DGL_NAMESPACE)); | ||
puglSetWorldString(world, PUGL_CLASS_NAME, DISTRHO_MACRO_AS_STRING(DGL_NAMESPACE)); | ||
#endif | ||
} | ||
|
||
|
@@ -168,7 +168,7 @@ void Application::PrivateData::setClassName(const char* const name) | |
DISTRHO_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',); | ||
|
||
if (world != nullptr) | ||
puglSetClassName(world, name); | ||
puglSetWorldString(world, PUGL_CLASS_NAME, "canvas"); | ||
} | ||
|
||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* DISTRHO Plugin Framework (DPF) | ||
* Copyright (C) 2012-2023 Filipe Coelho <[email protected]> | ||
* Copyright (C) 2012-2022 Filipe Coelho <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | ||
* or without fee is hereby granted, provided that the above copyright notice and this | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.