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.

66 lines
1.4KB

  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 __DGL_WINDOW_HPP__
  17. #define __DGL_WINDOW_HPP__
  18. #include "Base.hpp"
  19. START_NAMESPACE_DISTRHO
  20. // -------------------------------------------------
  21. class App;
  22. class Window
  23. {
  24. public:
  25. Window(App* app, Window* parent = nullptr);
  26. Window(App* app, intptr_t parentId);
  27. virtual ~Window();
  28. void exec();
  29. void focus();
  30. void idle();
  31. void repaint();
  32. bool isVisible();
  33. void setVisible(bool yesNo);
  34. void setWindowTitle(const char* title);
  35. intptr_t getWindowId();
  36. void show()
  37. {
  38. setVisible(true);
  39. }
  40. void hide()
  41. {
  42. setVisible(false);
  43. }
  44. private:
  45. class Private;
  46. Private* const kPrivate;
  47. };
  48. // -------------------------------------------------
  49. END_NAMESPACE_DISTRHO
  50. #endif // __DGL_WINDOW_HPP__