42 return static_cast<Platform *
>(Platform::instance());
49 const char *name()
const override;
50 bool hasActivePopup()
const override;
52 std::shared_ptr<Core::Window> windowAt(Point globalPos)
const override;
54 int screenNumberFor(
Core::View *)
const override;
55 Size screenSizeFor(
Core::View *)
const override;
58 bool inDisallowedDragView(Point globalPos)
const override;
59 bool usesFallbackMouseGrabber()
const override;
60 void ungrabMouse()
override;
62 std::shared_ptr<Core::Screen> primaryScreen()
const override;
70 virtual void rebuildWindowOverlay();
72 void runDelayed(
int ms, Core::DelayedCall *c)
override;
74#ifdef KDDW_FLUTTER_HAS_COROUTINES
76 KDDW_QCORO_TASK tests_wait(
int ms)
const override;
77 KDDW_QCORO_TASK tests_waitForResize(
Core::View *,
int timeout)
const override;
78 KDDW_QCORO_TASK tests_waitForResize(
Core::Controller *,
int timeout)
const override;
79 KDDW_QCORO_TASK tests_waitForDeleted(
Core::Controller *,
int timeout = 5000)
const override;
80 KDDW_QCORO_TASK tests_waitForDeleted(
Core::View *,
int timeout = 5000)
const override;
81 KDDW_QCORO_TASK tests_waitForWindowActive(std::shared_ptr<Core::Window>,
int timeout)
const override;
82 KDDW_QCORO_TASK tests_waitForEvent(Core::Object *w, Event::Type type,
int timeout)
const override;
83 KDDW_QCORO_TASK tests_waitForEvent(
Core::View *, Event::Type type,
int timeout)
const override;
84 KDDW_QCORO_TASK tests_waitForEvent(std::shared_ptr<Core::Window>, Event::Type type,
int timeout)
const override;
86 void tests_doubleClickOn(Point globalPos,
Core::View *receiver)
override;
87 void tests_doubleClickOn(Point globalPos, std::shared_ptr<Core::Window> receiver)
override;
88 void tests_pressOn(Point globalPos,
Core::View *receiver)
override;
89 void tests_pressOn(Point globalPos, std::shared_ptr<Core::Window> receiver)
override;
90 KDDW_QCORO_TASK tests_releaseOn(Point globalPos,
Core::View *receiver)
override;
91 KDDW_QCORO_TASK tests_mouseMove(Point globalPos,
Core::View *receiver)
override;
92 std::shared_ptr<Core::Window> tests_createWindow()
override;
96 typedef KDDW_QCORO_TASK (*RunTestsFunc)();
97 static RunTestsFunc s_runTestsFunc;
100#ifdef DOCKS_TESTING_METHODS
101 void tests_initPlatform_impl()
override;
102 void tests_deinitPlatform_impl()
override;
104 Core::View *tests_createFocusableView(Core::CreateViewOptions,
Core::View *parent =
nullptr)
override;
107 createMainWindow(
const QString &uniqueName, Core::CreateViewOptions viewOpts,
108 MainWindowOptions options = MainWindowOption_HasCentralFrame,
111 void installMessageHandler()
override;
112 void uninstallMessageHandler()
override;
114 void pauseForDebugger()
override;
117 virtual void pauseForDartDebugger() {};
124 void resumeCoRoutines();
127 virtual void scheduleResumeCoRoutines(
int ms)
const;
129 std::optional<int> testsResult()
const;
136 std::shared_ptr<Core::View> focusedView()
const override;
138 void sendEvent(
Core::View *, Event *)
const override;
139 int screenNumberFor(std::shared_ptr<Core::Window>)
const override;
140 bool isProcessingAppQuitEvent()
const override;
141 QString applicationName()
const override;
142 void setMouseCursor(
Qt::CursorShape,
bool discardLast =
false)
override;
143 void restoreMouseCursor()
override;
144 DisplayType displayType()
const override;
145 bool isLeftMouseButtonPressed()
const override;
146 Point cursorPos()
const override;
147 void setCursorPos(Point)
override;
148 void setFocusedView(std::shared_ptr<Core::View>);