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.

DistrhoUIOpenGL.hpp 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * DISTRHO Plugin Toolkit (DPT)
  3. * Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * For a full copy of the license see the LGPL.txt file
  15. */
  16. #ifndef __DISTRHO_UI_OPENGL_HPP__
  17. #define __DISTRHO_UI_OPENGL_HPP__
  18. #include "DistrhoUI.hpp"
  19. #include "dgl/Widget.hpp"
  20. USE_NAMESPACE_DGL
  21. START_NAMESPACE_DISTRHO
  22. // -------------------------------------------------
  23. // OpenGL UI
  24. class OpenGLUI : public UI,
  25. public Widget
  26. {
  27. public:
  28. OpenGLUI();
  29. virtual ~OpenGLUI();
  30. protected:
  31. // ---------------------------------------------
  32. // Information
  33. virtual unsigned int d_width() const = 0;
  34. virtual unsigned int d_height() const = 0;
  35. // ---------------------------------------------
  36. // DSP Callbacks
  37. virtual void d_parameterChanged(uint32_t index, float value) = 0;
  38. #if DISTRHO_PLUGIN_WANT_PROGRAMS
  39. virtual void d_programChanged(uint32_t index) = 0;
  40. #endif
  41. #if DISTRHO_PLUGIN_WANT_STATE
  42. virtual void d_stateChanged(const char* key, const char* value) = 0;
  43. #endif
  44. #if DISTRHO_PLUGIN_IS_SYNTH
  45. virtual void d_noteReceived(bool onOff, uint8_t channel, uint8_t note, uint8_t velocity) = 0;
  46. #endif
  47. // ---------------------------------------------
  48. // UI Callbacks
  49. virtual void d_uiIdle() {}
  50. private:
  51. friend class UIInternal;
  52. };
  53. // -------------------------------------------------
  54. END_NAMESPACE_DISTRHO
  55. #endif // __DISTRHO_UI_OPENGL_HPP__