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.

80 lines
2.3KB

  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. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  22. # pragma GCC diagnostic push
  23. # pragma GCC diagnostic ignored "-Wconversion"
  24. # pragma GCC diagnostic ignored "-Weffc++"
  25. # pragma GCC diagnostic ignored "-Wsign-conversion"
  26. #endif
  27. #include <QtCore/QCoreApplication>
  28. #include <QtCore/QString>
  29. #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  30. # pragma GCC diagnostic pop
  31. #endif
  32. //---------------------------------------------------------------------------------------------------------------------
  33. class QApplication;
  34. //---------------------------------------------------------------------------------------------------------------------
  35. // Imports (Custom)
  36. #include "CarlaJuceUtils.hpp"
  37. //---------------------------------------------------------------------------------------------------------------------
  38. class CarlaApplication
  39. {
  40. public:
  41. CarlaApplication(const QString appName, int& argc, char* argv[]);
  42. int exec() const
  43. {
  44. return fApp->exec();
  45. }
  46. void quit() const
  47. {
  48. fApp->quit();
  49. }
  50. QCoreApplication* getApp() const noexcept
  51. {
  52. return fApp;
  53. }
  54. private:
  55. QCoreApplication* fApp;
  56. QApplication* createApp(const QString& appName, int& argc, char* argv[]);
  57. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaApplication)
  58. };
  59. //---------------------------------------------------------------------------------------------------------------------
  60. #endif // CARLA_APP_HPP_INCLUDED