Skip to content

Commit bc0136f

Browse files
committed
Refactor window manager hook methods on all platforms
Replaces InvokeWillShowHook and InvokeWillHideHook with HasWillShowHook, HasWillHideHook, HandleWillShow, and HandleWillHide methods in Android, iOS, and OHOS window manager implementations. This change improves clarity and consistency in hook handling interfaces.
1 parent 95bf390 commit bc0136f

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

src/platform/android/window_manager_android.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,19 @@ void WindowManager::SetWillHideHook(std::optional<WindowWillHideHook> hook) {
114114
// Empty implementation
115115
}
116116

117-
void WindowManager::InvokeWillShowHook(WindowId id) {
117+
bool WindowManager::HasWillShowHook() const {
118+
return false;
119+
}
120+
121+
bool WindowManager::HasWillHideHook() const {
122+
return false;
123+
}
124+
125+
void WindowManager::HandleWillShow(WindowId id) {
118126
// Empty implementation
119127
}
120128

121-
void WindowManager::InvokeWillHideHook(WindowId id) {
129+
void WindowManager::HandleWillHide(WindowId id) {
122130
// Empty implementation
123131
}
124132

src/platform/ios/window_manager_ios.mm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,19 @@
4545
// Empty implementation
4646
}
4747

48-
void WindowManager::InvokeWillShowHook(WindowId id) {
48+
bool WindowManager::HasWillShowHook() const {
49+
return false;
50+
}
51+
52+
bool WindowManager::HasWillHideHook() const {
53+
return false;
54+
}
55+
56+
void WindowManager::HandleWillShow(WindowId id) {
4957
// Empty implementation
5058
}
5159

52-
void WindowManager::InvokeWillHideHook(WindowId id) {
60+
void WindowManager::HandleWillHide(WindowId id) {
5361
// Empty implementation
5462
}
5563

src/platform/ohos/window_manager_ohos.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,19 @@ void WindowManager::SetWillHideHook(std::optional<WindowWillHideHook> hook) {
110110
// Empty implementation
111111
}
112112

113-
void WindowManager::InvokeWillShowHook(WindowId id) {
113+
bool WindowManager::HasWillShowHook() const {
114+
return false;
115+
}
116+
117+
bool WindowManager::HasWillHideHook() const {
118+
return false;
119+
}
120+
121+
void WindowManager::HandleWillShow(WindowId id) {
114122
// Empty implementation
115123
}
116124

117-
void WindowManager::InvokeWillHideHook(WindowId id) {
125+
void WindowManager::HandleWillHide(WindowId id) {
118126
// Empty implementation
119127
}
120128

0 commit comments

Comments
 (0)