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.

67 lines
1.8KB

  1. /*
  2. * Carla application
  3. * Copyright (C) 2013-2019 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 General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or 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 doc/GPL.txt file.
  16. */
  17. #ifndef CARLA_APP_HPP_INCLUDED
  18. #define CARLA_APP_HPP_INCLUDED
  19. //---------------------------------------------------------------------------------------------------------------------
  20. // Imports (Global)
  21. #include <QtCore/QCoreApplication>
  22. #include <QtCore/QString>
  23. class QApplication;
  24. //---------------------------------------------------------------------------------------------------------------------
  25. // Imports (Custom)
  26. #include "CarlaJuceUtils.hpp"
  27. //---------------------------------------------------------------------------------------------------------------------
  28. class CarlaApplication
  29. {
  30. public:
  31. CarlaApplication(const QString appName, int& argc, char* argv[]);
  32. int exec() const
  33. {
  34. return fApp->exec();
  35. }
  36. void quit() const
  37. {
  38. fApp->quit();
  39. }
  40. QCoreApplication* getApp() const noexcept
  41. {
  42. return fApp;
  43. }
  44. private:
  45. QCoreApplication* fApp;
  46. QApplication* createApp(const QString& appName, int& argc, char* argv[]);
  47. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaApplication)
  48. };
  49. //---------------------------------------------------------------------------------------------------------------------
  50. #endif // CARLA_APP_HPP_INCLUDED