Collection of tools useful for audio production
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.

62 lines
1.5KB

  1. /*
  2. * Carla bridge code
  3. * Copyright (C) 2011-2012 Filipe Coelho <falktx@gmail.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the COPYING file
  16. */
  17. #ifndef CARLA_BRIDGE_TOOLKIT_H
  18. #define CARLA_BRIDGE_TOOLKIT_H
  19. #include "carla_bridge.h"
  20. #include <cstdlib>
  21. #include <cstring>
  22. CARLA_BRIDGE_START_NAMESPACE
  23. class CarlaBridgeToolkit
  24. {
  25. public:
  26. CarlaBridgeToolkit(const char* const title)
  27. {
  28. Q_ASSERT(title);
  29. m_title = strdup(title);
  30. m_client = nullptr;
  31. }
  32. virtual ~CarlaBridgeToolkit()
  33. {
  34. free(m_title);
  35. }
  36. virtual void init() = 0;
  37. virtual void exec(CarlaBridgeClient* const client) = 0;
  38. virtual void quit() = 0;
  39. virtual void show() = 0;
  40. virtual void hide() = 0;
  41. virtual void resize(int width, int height) = 0;
  42. static CarlaBridgeToolkit* createNew(const char* const title);
  43. protected:
  44. char* m_title;
  45. CarlaBridgeClient* m_client;
  46. };
  47. CARLA_BRIDGE_END_NAMESPACE
  48. #endif // CARLA_BRIDGE_TOOLKIT_H