EditorWidget.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*****************************************************************************
  2. Copyright (C) 2016-2017 by Colin Edwards.
  3. Additional Code Copyright (C) 2016-2017 by c3r1c3 <[email protected]>
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. *****************************************************************************/
  15. #ifndef OBS_STUDIO_EDITORDIALOG_H
  16. #define OBS_STUDIO_EDITORDIALOG_H
  17. #include <QWidget>
  18. #if defined(_WIN32)
  19. #include <QWindow>
  20. #include <Windows.h>
  21. #elif defined(__linux__)
  22. #include <QWindow>
  23. #include <xcb/xcb.h>
  24. #endif
  25. #include "aeffectx.h"
  26. #include "VSTPlugin.h"
  27. class VSTPlugin;
  28. class VstRect {
  29. public:
  30. short top;
  31. short left;
  32. short bottom;
  33. short right;
  34. };
  35. class EditorWidget : public QWidget {
  36. VSTPlugin *plugin;
  37. #if defined(__APPLE__)
  38. QWidget *cocoaViewContainer = NULL;
  39. #elif defined(_WIN32)
  40. HWND windowHandle = NULL;
  41. #endif
  42. public:
  43. EditorWidget(QWidget *parent, VSTPlugin *plugin);
  44. void buildEffectContainer(AEffect *effect);
  45. void closeEvent(QCloseEvent *event) override;
  46. void handleResizeRequest(int width, int height);
  47. };
  48. #endif // OBS_STUDIO_EDITORDIALOG_H