Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
2.3KB

  1. /*
  2. Copyright 2014 David Robillard <http://drobilla.net>
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted, provided that the above
  5. copyright notice and this permission notice appear in all copies.
  6. THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  7. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  8. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  9. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  10. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  11. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  12. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  13. */
  14. #ifndef PUGL_COMMON_H_INCLUDED
  15. #define PUGL_COMMON_H_INCLUDED
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /**
  20. @addtogroup pugl
  21. @{
  22. */
  23. /**
  24. A Pugl view.
  25. */
  26. typedef struct PuglViewImpl PuglView;
  27. /**
  28. A native window handle.
  29. On X11, this is a Window.
  30. On OSX, this is an NSView*.
  31. On Windows, this is a HWND.
  32. */
  33. typedef intptr_t PuglNativeWindow;
  34. /**
  35. Handle for opaque user data.
  36. */
  37. typedef void* PuglHandle;
  38. /**
  39. Return status code.
  40. */
  41. typedef enum {
  42. PUGL_SUCCESS = 0
  43. } PuglStatus;
  44. /**
  45. Drawing context type.
  46. */
  47. typedef enum {
  48. PUGL_GL,
  49. PUGL_CAIRO
  50. } PuglContextType;
  51. /**
  52. Convenience symbols for ASCII control characters.
  53. */
  54. typedef enum {
  55. PUGL_CHAR_BACKSPACE = 0x08,
  56. PUGL_CHAR_ESCAPE = 0x1B,
  57. PUGL_CHAR_DELETE = 0x7F
  58. } PuglChar;
  59. /**
  60. Keyboard modifier flags.
  61. */
  62. typedef enum {
  63. PUGL_MOD_SHIFT = 1, /**< Shift key */
  64. PUGL_MOD_CTRL = 1 << 1, /**< Control key */
  65. PUGL_MOD_ALT = 1 << 2, /**< Alt/Option key */
  66. PUGL_MOD_SUPER = 1 << 3 /**< Mod4/Command/Windows key */
  67. } PuglMod;
  68. /**
  69. Special (non-Unicode) keyboard keys.
  70. */
  71. typedef enum {
  72. PUGL_KEY_F1 = 1,
  73. PUGL_KEY_F2,
  74. PUGL_KEY_F3,
  75. PUGL_KEY_F4,
  76. PUGL_KEY_F5,
  77. PUGL_KEY_F6,
  78. PUGL_KEY_F7,
  79. PUGL_KEY_F8,
  80. PUGL_KEY_F9,
  81. PUGL_KEY_F10,
  82. PUGL_KEY_F11,
  83. PUGL_KEY_F12,
  84. PUGL_KEY_LEFT,
  85. PUGL_KEY_UP,
  86. PUGL_KEY_RIGHT,
  87. PUGL_KEY_DOWN,
  88. PUGL_KEY_PAGE_UP,
  89. PUGL_KEY_PAGE_DOWN,
  90. PUGL_KEY_HOME,
  91. PUGL_KEY_END,
  92. PUGL_KEY_INSERT,
  93. PUGL_KEY_SHIFT,
  94. PUGL_KEY_CTRL,
  95. PUGL_KEY_ALT,
  96. PUGL_KEY_SUPER
  97. } PuglKey;
  98. /**
  99. @}
  100. */
  101. #ifdef __cplusplus
  102. } /* extern "C" */
  103. #endif
  104. #endif /* PUGL_COMMON_H_INCLUDED */