DISTRHO Plugin Framework
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.

170 lines
5.2KB

  1. /*
  2. * DISTRHO Plugin Framework (DPF)
  3. * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. * or without fee is hereby granted, provided that the above copyright notice and this
  7. * permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  10. * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  11. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  12. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  13. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /**
  17. The plugin name.@n
  18. This is used to identify your plugin before a Plugin instance can be created.
  19. @note This macro is required.
  20. */
  21. #define DISTRHO_PLUGIN_NAME "CairoUI"
  22. /**
  23. Number of audio inputs the plugin has.
  24. @note This macro is required.
  25. */
  26. #define DISTRHO_PLUGIN_NUM_INPUTS 1
  27. /**
  28. Number of audio outputs the plugin has.
  29. @note This macro is required.
  30. */
  31. #define DISTRHO_PLUGIN_NUM_OUTPUTS 1
  32. /**
  33. The plugin URI when exporting in LV2 format.
  34. @note This macro is required.
  35. */
  36. #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/CairoUI"
  37. /**
  38. The AudioUnit manufacturer for a plugin.
  39. This is a 4-character symbol with at least one non-lower case character.
  40. Plugins from the same brand/maker should use the same symbol.
  41. @note This macro is required when building AU plugins
  42. */
  43. #define DISTRHO_PLUGIN_BRAND_ID Dstr
  44. /**
  45. The AudioUnit subtype for a plugin.
  46. This is a 4-character symbol which identifies a plugin.
  47. It must be unique within a manufacturer's plugins, but different manufacturers can use the same subtype.
  48. @note This macro is required when building AU plugins
  49. */
  50. #define DISTRHO_PLUGIN_UNIQUE_ID dCai
  51. /**
  52. The plugin id when exporting in CLAP format, in reverse URI form.
  53. @note This macro is required when building CLAP plugins
  54. */
  55. #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.cairo-ui"
  56. /**
  57. Wherever the plugin has a custom %UI.
  58. @see DISTRHO_UI_USE_NANOVG
  59. @see UI
  60. */
  61. #define DISTRHO_PLUGIN_HAS_UI 1
  62. /**
  63. Wherever the plugin processing is realtime-safe.@n
  64. TODO - list rtsafe requirements
  65. */
  66. #define DISTRHO_PLUGIN_IS_RT_SAFE 1
  67. /**
  68. Wherever the plugin is a synth.@n
  69. @ref DISTRHO_PLUGIN_WANT_MIDI_INPUT is automatically enabled when this is too.
  70. @see DISTRHO_PLUGIN_WANT_MIDI_INPUT
  71. */
  72. #define DISTRHO_PLUGIN_IS_SYNTH 0
  73. /**
  74. Enable direct access between the %UI and plugin code.
  75. @see UI::getPluginInstancePointer()
  76. @note DO NOT USE THIS UNLESS STRICTLY NECESSARY!!
  77. Try to avoid it at all costs!
  78. */
  79. #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0
  80. /**
  81. Wherever the plugin introduces latency during audio or midi processing.
  82. @see Plugin::setLatency(uint32_t)
  83. */
  84. #define DISTRHO_PLUGIN_WANT_LATENCY 0
  85. /**
  86. Wherever the plugin wants MIDI input.@n
  87. This is automatically enabled if @ref DISTRHO_PLUGIN_IS_SYNTH is true.
  88. */
  89. #define DISTRHO_PLUGIN_WANT_MIDI_INPUT 0
  90. /**
  91. Wherever the plugin wants MIDI output.
  92. @see Plugin::writeMidiEvent(const MidiEvent&)
  93. */
  94. #define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 0
  95. /**
  96. Wherever the plugin provides its own internal programs.
  97. @see Plugin::initProgramName(uint32_t, String&)
  98. @see Plugin::loadProgram(uint32_t)
  99. */
  100. #define DISTRHO_PLUGIN_WANT_PROGRAMS 0
  101. /**
  102. Wherever the plugin uses internal non-parameter data.
  103. @see Plugin::initState(uint32_t, String&, String&)
  104. @see Plugin::setState(const char*, const char*)
  105. */
  106. #define DISTRHO_PLUGIN_WANT_STATE 0
  107. /**
  108. Wherever the plugin wants time position information from the host.
  109. @see Plugin::getTimePosition()
  110. */
  111. #define DISTRHO_PLUGIN_WANT_TIMEPOS 0
  112. /**
  113. Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n
  114. When enabled your %UI instance will subclass @ref NanoWidget instead of @ref Widget.
  115. */
  116. #define DISTRHO_UI_USE_NANOVG 0
  117. /**
  118. Default UI width to use when creating initial and temporary windows.@n
  119. Setting this macro allows to skip a temporary UI from being created in certain VST2 and VST3 hosts.
  120. (which would normally be done for knowing the UI size before host creates a window for it)
  121. Value must match 1x scale factor.
  122. When this macro is defined, the companion DISTRHO_UI_DEFAULT_HEIGHT macro must be defined as well.
  123. */
  124. #define DISTRHO_UI_DEFAULT_WIDTH 200
  125. /**
  126. Default UI height to use when creating initial and temporary windows.@n
  127. Setting this macro allows to skip a temporary UI from being created in certain VST2 and VST3 hosts.
  128. (which would normally be done for knowing the UI size before host creates a window for it)
  129. Value must match 1x scale factor.
  130. When this macro is defined, the companion DISTRHO_UI_DEFAULT_WIDTH macro must be defined as well.
  131. */
  132. #define DISTRHO_UI_DEFAULT_HEIGHT 200
  133. // TODO document this
  134. #define DISTRHO_UI_USE_CAIRO 1
  135. // TODO document this
  136. #define DISTRHO_UI_FILE_BROWSER 0
  137. enum Parameters {
  138. kParameterKnob,
  139. kParameterTriState,
  140. kParameterButton,
  141. kParameterCount
  142. };