KXStudio Website https://kx.studio/
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.

91 lines
2.4KB

  1. /*
  2. LV2 UI ... Extension
  3. Copyright 2013 Filipe Coelho <falktx@falktx.com>
  4. Permission to use, copy, modify, and/or distribute this software for any
  5. purpose with or without fee is hereby granted, provided that the above
  6. copyright notice and this permission notice appear in all copies.
  7. THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. /**
  16. @file lv2_ui_....h
  17. C header for the LV2 UI ... extension <http://kxstudio.sf.net/ns/lv2ext/configure>.
  18. */
  19. #ifndef LV2_CONFIGURE_H
  20. #define LV2_CONFIGURE_H
  21. #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
  22. #define LV2_CONFIGURE_URI "http://kxstudio.sf.net/ns/lv2ext/configure"
  23. #define LV2_CONFIGURE_PREFIX LV2_CONFIGURE_URI "#"
  24. #define LV2_CONFIGURE__Host LV2_CONFIGURE_PREFIX "Host"
  25. #define LV2_CONFIGURE__UIInterface LV2_CONFIGURE_PREFIX "UIInterface"
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. #include <stdbool.h>
  30. /**
  31. * TODO
  32. */
  33. typedef enum __Buttons {
  34. //reserve 0?
  35. kButtonOk = 1 << 0,
  36. kButtonApply = 1 << 1,
  37. kButtonCancel = 1 << 2
  38. //etc
  39. } _Buttons;
  40. /**
  41. * TODO
  42. */
  43. typedef enum __Type {
  44. k_TypeInformation,
  45. k_TypeQuestion,
  46. k_TypeWarning,
  47. k_TypeError
  48. } _Type;
  49. /**
  50. Configure extension, UI data.
  51. When the UI's extension_data is called with argument LV2_CONFIGURE__UIInterface,
  52. the UI MUST return an LV2_Configure_UI_Interface structure, which remains valid
  53. for the lifetime of the UI.
  54. */
  55. typedef struct _LV2_Configure_UI_Interface {
  56. /**
  57. * TODO
  58. */
  59. _Buttons (*msgbox)(LV2UI_Handle handle, _Type type, const char* title, const char* text, _Buttons buttons);
  60. /**
  61. * TODO
  62. */
  63. const char* (*open_file)(LV2UI_Handle handle, bool isDir, const char* title, const char* filter);
  64. /**
  65. * TODO
  66. */
  67. const char* (*save_file)(LV2UI_Handle handle, bool isDir, const char* title, const char* filter);
  68. } LV2_Configure_UI_Interface;
  69. #ifdef __cplusplus
  70. } /* extern "C" */
  71. #endif
  72. #endif /* LV2_CONFIGURE_H */