mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-12-03 12:41:04 +00:00
commit
6a65cf0e8d
@ -1694,7 +1694,7 @@ public:
|
||||
*
|
||||
* @param windowLimits.
|
||||
* @return WMError.
|
||||
*/
|
||||
*/
|
||||
virtual WMError GetWindowLimits(WindowLimits& windowLimits) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; }
|
||||
|
||||
/**
|
||||
@ -1702,10 +1702,10 @@ public:
|
||||
*
|
||||
* @param windowLimits.
|
||||
* @return WMError.
|
||||
*/
|
||||
*/
|
||||
virtual WMError SetWindowLimits(WindowLimits& windowLimits) { return WMError::WM_ERROR_DEVICE_NOT_SUPPORT; }
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief Register listener, if timeout(seconds) pass with no interaction, the listener will be executed.
|
||||
*
|
||||
* @param listener IWindowNoInteractionListenerSptr.
|
||||
@ -2067,13 +2067,14 @@ public:
|
||||
* @return WM_OK means set success, others means set failed
|
||||
*/
|
||||
virtual WMError AdjustKeyboardLayout(const KeyboardLayoutParams& params) { return WMError::WM_OK; }
|
||||
|
||||
/*
|
||||
* @brief Set the Dvsync Switch
|
||||
*
|
||||
* @param dvsyncSwitch bool.
|
||||
* @return * void
|
||||
*/
|
||||
virtual void SetUiDvsyncSwitch(bool dvsyncSwitch) {};
|
||||
virtual void SetUiDvsyncSwitch(bool dvsyncSwitch) {}
|
||||
|
||||
/**
|
||||
* @brief Set whether to enable immersive mode.
|
||||
|
@ -96,6 +96,8 @@ public:
|
||||
virtual WMError UpdateSessionTouchOutsideListener(int32_t& persistentId, bool haveListener);
|
||||
virtual WMError NotifyWindowExtensionVisibilityChange(int32_t pid, int32_t uid, bool visible);
|
||||
virtual WMError UpdateSessionWindowVisibilityListener(int32_t persistentId, bool haveListener);
|
||||
virtual WMError RaiseWindowToTop(int32_t persistentId);
|
||||
virtual WMError ShiftAppWindowFocus(int32_t sourcePersistentId, int32_t targetPersistentId);
|
||||
virtual void CreateAndConnectSpecificSession(const sptr<ISessionStage>& sessionStage,
|
||||
const sptr<IWindowEventChannel>& eventChannel, const std::shared_ptr<RSSurfaceNode>& surfaceNode,
|
||||
sptr<WindowSessionProperty> property, int32_t& persistentId, sptr<ISession>& session,
|
||||
@ -116,8 +118,6 @@ public:
|
||||
virtual WMError SetSessionGravity(int32_t persistentId, SessionGravity gravity, uint32_t percent);
|
||||
virtual WMError BindDialogSessionTarget(uint64_t persistentId, sptr<IRemoteObject> targetToken);
|
||||
virtual WMError RequestFocusStatus(int32_t persistentId, bool isFocused);
|
||||
virtual WMError RaiseWindowToTop(int32_t persistentId);
|
||||
virtual WMError ShiftAppWindowFocus(int32_t sourcePersistentId, int32_t targetPersistentId);
|
||||
virtual void AddExtensionWindowStageToSCB(const sptr<ISessionStage>& sessionStage,
|
||||
const sptr<IRemoteObject>& token, uint64_t surfaceNodeId);
|
||||
virtual void RemoveExtensionWindowStageFromSCB(const sptr<ISessionStage>& sessionStage,
|
||||
|
@ -438,7 +438,6 @@ private:
|
||||
static std::map<uint32_t, std::vector<sptr<WindowImpl>>> subWindowMap_;
|
||||
static std::map<uint32_t, std::vector<sptr<WindowImpl>>> appFloatingWindowMap_;
|
||||
static std::map<uint32_t, std::vector<sptr<WindowImpl>>> appDialogWindowMap_;
|
||||
static bool enableImmersiveMode_;
|
||||
sptr<WindowProperty> property_;
|
||||
WindowState state_ { WindowState::STATE_INITIAL };
|
||||
WindowState subWindowState_ {WindowState::STATE_INITIAL};
|
||||
@ -495,6 +494,7 @@ private:
|
||||
std::shared_ptr<AppExecFwk::EventHandler> handler_ = nullptr;
|
||||
bool needNotifyFocusLater_ = false;
|
||||
bool escKeyEventTriggered_ = false;
|
||||
bool enableImmersiveMode_ = false;
|
||||
std::shared_ptr<VsyncStation> vsyncStation_ = nullptr;
|
||||
|
||||
std::string restoredRouterStack_; // It was set and get in same thread, which is js thread.
|
||||
|
@ -649,6 +649,7 @@ WMError WindowAdapter::GetWindowAnimationTargets(std::vector<uint32_t> missionId
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_ERROR_SAMGR);
|
||||
return wmsProxy->GetWindowAnimationTargets(missionIds, targets);
|
||||
}
|
||||
|
||||
void WindowAdapter::SetMaximizeMode(MaximizeMode maximizeMode)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN();
|
||||
@ -695,6 +696,44 @@ WMError WindowAdapter::UpdateSessionTouchOutsideListener(int32_t& persistentId,
|
||||
wmsProxy->UpdateSessionTouchOutsideListener(persistentId, haveListener));
|
||||
}
|
||||
|
||||
WMError WindowAdapter::NotifyWindowExtensionVisibilityChange(int32_t pid, int32_t uid, bool visible)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
return static_cast<WMError>(wmsProxy->NotifyWindowExtensionVisibilityChange(pid, uid, visible));
|
||||
}
|
||||
|
||||
WMError WindowAdapter::RaiseWindowToTop(int32_t persistentId)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
return static_cast<WMError>(wmsProxy->RaiseWindowToTop(persistentId));
|
||||
}
|
||||
|
||||
WMError WindowAdapter::UpdateSessionWindowVisibilityListener(int32_t persistentId, bool haveListener)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
WSError ret = wmsProxy->UpdateSessionWindowVisibilityListener(persistentId, haveListener);
|
||||
return static_cast<WMError>(ret);
|
||||
}
|
||||
|
||||
WMError WindowAdapter::ShiftAppWindowFocus(int32_t sourcePersistentId, int32_t targetPersistentId)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
return static_cast<WMError>(
|
||||
wmsProxy->ShiftAppWindowFocus(sourcePersistentId, targetPersistentId));
|
||||
}
|
||||
|
||||
void WindowAdapter::CreateAndConnectSpecificSession(const sptr<ISessionStage>& sessionStage,
|
||||
const sptr<IWindowEventChannel>& eventChannel, const std::shared_ptr<RSSurfaceNode>& surfaceNode,
|
||||
sptr<WindowSessionProperty> property, int32_t& persistentId, sptr<ISession>& session,
|
||||
@ -786,44 +825,6 @@ WMError WindowAdapter::RequestFocusStatus(int32_t persistentId, bool isFocused)
|
||||
return static_cast<WMError>(wmsProxy->RequestFocusStatus(persistentId, isFocused));
|
||||
}
|
||||
|
||||
WMError WindowAdapter::RaiseWindowToTop(int32_t persistentId)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
return static_cast<WMError>(wmsProxy->RaiseWindowToTop(persistentId));
|
||||
}
|
||||
|
||||
WMError WindowAdapter::NotifyWindowExtensionVisibilityChange(int32_t pid, int32_t uid, bool visible)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
return static_cast<WMError>(wmsProxy->NotifyWindowExtensionVisibilityChange(pid, uid, visible));
|
||||
}
|
||||
|
||||
WMError WindowAdapter::UpdateSessionWindowVisibilityListener(int32_t persistentId, bool haveListener)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
WSError ret = wmsProxy->UpdateSessionWindowVisibilityListener(persistentId, haveListener);
|
||||
return static_cast<WMError>(ret);
|
||||
}
|
||||
|
||||
WMError WindowAdapter::ShiftAppWindowFocus(int32_t sourcePersistentId, int32_t targetPersistentId)
|
||||
{
|
||||
INIT_PROXY_CHECK_RETURN(WMError::WM_DO_NOTHING);
|
||||
|
||||
auto wmsProxy = GetWindowManagerServiceProxy();
|
||||
CHECK_PROXY_RETURN_ERROR_IF_NULL(wmsProxy, WMError::WM_DO_NOTHING);
|
||||
return static_cast<WMError>(
|
||||
wmsProxy->ShiftAppWindowFocus(sourcePersistentId, targetPersistentId));
|
||||
}
|
||||
|
||||
void WindowAdapter::AddExtensionWindowStageToSCB(const sptr<ISessionStage>& sessionStage,
|
||||
const sptr<IRemoteObject>& token, uint64_t surfaceNodeId)
|
||||
{
|
||||
|
@ -95,7 +95,6 @@ std::map<uint32_t, sptr<IDialogDeathRecipientListener>> WindowImpl::dialogDeathR
|
||||
std::recursive_mutex WindowImpl::globalMutex_;
|
||||
int g_constructorCnt = 0;
|
||||
int g_deConstructorCnt = 0;
|
||||
bool WindowImpl::enableImmersiveMode_ = true;
|
||||
WindowImpl::WindowImpl(const sptr<WindowOption>& option)
|
||||
{
|
||||
property_ = new (std::nothrow) WindowProperty();
|
||||
|
Loading…
Reference in New Issue
Block a user