| 1 | /* |
| 2 | * Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/> |
| 3 | * (C) 2025 Vladimir Sadovnikov <[email protected]> |
| 4 | * (C) 2025 Marvin Edeler <[email protected]> |
| 5 | * |
| 6 | * This file is part of lsp-ws-lib |
| 7 | * Created on: 16 June 2025 |
| 8 | * |
| 9 | * lsp-ws-lib is free software: you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU Lesser General Public License as published by |
| 11 | * the Free Software Foundation, either version 3 of the License, or |
| 12 | * any later version. |
| 13 | * |
| 14 | * lsp-ws-lib is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU Lesser General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU Lesser General Public License |
| 20 | * along with lsp-ws-lib. If not, see <https://www.gnu.org/licenses/>. |
| 21 | */ |
| 22 | |
| 23 | #ifndef LSP_PLUG_IN_WS_COCOA_DECODE_H_ |
| 24 | #define LSP_PLUG_IN_WS_COCOA_DECODE_H_ |
| 25 | |
| 26 | #include <lsp-plug.in/ws/version.h> |
| 27 | #include <lsp-plug.in/ws/types.h> |
| 28 | |
| 29 | #ifdef PLATFORM_MACOSX |
| 30 | |
| 31 | #include <Cocoa/Cocoa.h> |
| 32 | |
| 33 | namespace lsp |
| 34 | { |
| 35 | namespace ws |
| 36 | { |
| 37 | namespace cocoa |
| 38 | { |
| 39 | mcb_t decode_mcb(const NSEvent *event); |
| 40 | |
| 41 | mcd_t decode_mcd(const NSEvent *event); |
| 42 | |
| 43 | size_t decode_modifier(const NSEvent *event); |
| 44 | |
| 45 | code_t decode_keycode(unsigned long code); |
| 46 | |
| 47 | } /* namespace cocoa */ |
| 48 | } /* namespace ws */ |
| 49 | } /* namespace lsp */ |
| 50 | |
| 51 | #endif /* PLATFORM_MACOSX */ |
| 52 | |
| 53 | #endif /* LSP_PLUG_IN_WS_COCOA_DECODE_H_ */ |