WindowObserver_mac.h 841 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <objc/objc.h>
  10. #include <QObject>
  11. class QWindow;
  12. namespace Editor
  13. {
  14. class WindowObserver
  15. : public QObject
  16. {
  17. Q_OBJECT
  18. public:
  19. explicit WindowObserver(QWindow* window, QObject* parent);
  20. virtual ~WindowObserver();
  21. public slots:
  22. void setWindowIsMoving(bool isMoving);
  23. void setWindowIsResizing(bool isResizing);
  24. signals:
  25. void windowIsMovingOrResizingChanged(bool isMovingOrResizing);
  26. private:
  27. bool m_windowIsMoving;
  28. bool m_windowIsResizing;
  29. id m_windowObserver;
  30. };
  31. } // namespace editor