delete weston

Signed-off-by: zhangpengcheng <zhangpengcheng31@huawei.com>
Change-Id: I8f42f2d16910b5a32e47bd398a3572bf3ebde159
This commit is contained in:
zhangpengcheng 2022-02-26 10:35:25 +00:00
parent d51934cf8f
commit 03535ab106
12 changed files with 0 additions and 118 deletions

View File

@ -79,8 +79,6 @@ public:
int32_t GetMaxWidth();
int32_t GetMaxHeight();
void ChangeWindowType(int32_t id, WindowType type);
void RegistOnTouchCb(int id, funcOnTouch cb);
void RegistOnKeyCb(int id, funcOnKey cb);
void RegistWindowInfoChangeCb(int id, funcWindowInfoChange cb);
void RegistOnWindowCreateCb(int32_t id, void(* cb)(uint32_t pid));
void SendWindowCreate(uint32_t pid);

4
frameworks/wm/include/window_impl.h Normal file → Executable file
View File

@ -75,10 +75,6 @@ public:
virtual GSError ExitPIPMode() override;
virtual GSError OnPIPModeChange(WindowPIPModeChangeFunc func) override;
// listener
virtual GSError OnTouch(OnTouchFunc cb) override;
virtual GSError OnKey(OnKeyFunc cb) override;
private:
WindowImpl() = default;
virtual ~WindowImpl() override;

View File

@ -369,19 +369,6 @@ Window::~Window()
LayerControllerClient::GetInstance()->DestroyWindow(m_windowid);
}
void Window::RegistOnTouchCb(funcOnTouch cb)
{
WMLOG_I("Window::RegistOnTouchCb start, windowid %{public}d", this->m_windowid);
LayerControllerClient::GetInstance()->RegistOnTouchCb(m_windowid, cb);
WMLOG_I("Window::RegistOnTouchCb end windowid %{public}d", this->m_windowid);
}
void Window::RegistOnKeyCb(funcOnKey cb)
{
WMLOG_I("Window::RegistOnKeyCb start");
LayerControllerClient::GetInstance()->RegistOnKeyCb(m_windowid, cb);
WMLOG_I("Window::RegistOnKeyCb end");
}
void Window::Move(int32_t x, int32_t y)
{
WMLOG_I("Window::Move start");

View File

@ -329,34 +329,6 @@ InnerWindowInfo *LayerControllerClient::CreateSubWindow(int32_t subid, int32_t p
return GetInnerWindowInfoFromId(subid);
}
void LayerControllerClient::RegistOnTouchCb(int id, funcOnTouch cb)
{
LOCK(mutex);
WMLOG_I("LayerControllerClient::%{public}s", __func__);
if (cb) {
WMLOG_I("LayerControllerClient::RegistOnTouchCb OK");
InnerWindowInfo *windowInfo = LayerControllerClient::GetInstance()->GetInnerWindowInfoFromId((uint32_t)id);
if (windowInfo == nullptr) {
WMLOGFE("id: %{public}d, window info is nullptr", id);
return;
}
}
}
void LayerControllerClient::RegistOnKeyCb(int id, funcOnKey cb)
{
LOCK(mutex);
WMLOG_I("LayerControllerClient::RegistOnKeyCb start");
if (cb) {
WMLOG_I("LayerControllerClient::RegistOnKeyCb OK");
InnerWindowInfo *windowInfo = LayerControllerClient::GetInstance()->GetInnerWindowInfoFromId((uint32_t)id);
if (windowInfo == nullptr) {
WMLOGFE("id: %{public}d, window info is nullptr", id);
return;
}
}
}
void LayerControllerClient::RegistWindowInfoChangeCb(int id, funcWindowInfoChange cb)
{
LOCK(mutex);

12
frameworks/wm/src/window_impl.cpp Normal file → Executable file
View File

@ -487,18 +487,6 @@ void WindowImpl::OnBeforeFrameSubmit(BeforeFrameSubmitFunc func)
onBeforeFrameSubmitFunc = func;
}
GSError WindowImpl::OnTouch(OnTouchFunc cb)
{
CHECK_DESTROY(GSERROR_DESTROYED_OBJECT);
return GSERROR_OK;
}
GSError WindowImpl::OnKey(OnKeyFunc cb)
{
CHECK_DESTROY(GSERROR_DESTROYED_OBJECT);
return GSERROR_OK;
}
void WindowImpl::OnWlBufferRelease(struct wl_buffer *wbuffer, int32_t fence)
{
ScopedBytrace bytrace("OnWlBufferRelease");

View File

@ -73,16 +73,6 @@ AutoLoadService INativeTest::GetAutoLoadService() const
return AutoLoadService::Null;
}
bool INativeTest::OnKey(const KeyEvent &event)
{
return false;
}
bool INativeTest::OnTouch(const TouchEvent &event)
{
return false;
}
void INativeTest::GetToken()
{
if (token == nullptr) {

View File

@ -23,9 +23,7 @@
#include <vector>
#include <ipc_object_stub.h>
#include <key_event_handler.h>
#include <multimodal_event_handler.h>
#include <touch_event_handler.h>
#include <vsync_helper.h>
#include <window_manager.h>
#include <window_manager_service_client.h>
@ -66,8 +64,6 @@ public:
sptr<IWindowManagerService> windowManagerService = nullptr;
// input
virtual bool OnKey(const KeyEvent &event);
virtual bool OnTouch(const TouchEvent &event);
int32_t ListenWindowKeyEvent(int32_t windowID);
int32_t ListenWindowTouchEvent(int32_t windowID);
void ListenWindowInputEvent(int32_t windowID); // key and touch

View File

@ -112,9 +112,5 @@ private:
sptr<Window> freeWindow = nullptr;
sptr<NativeTestSync> freeWindowSync = nullptr;
BufferRequestConfig config = {};
double downX = 0;
double downY = 0;
double backupX = 0;
double backupY = 0;
} g_autoload;
} // namespace

View File

@ -31,7 +31,6 @@ namespace {
class WMClientNativeTest32Ability : public INativeTest {
public:
virtual void Draw(uint32_t *vaddr, uint32_t width, uint32_t height, uint32_t count) = 0;
virtual bool OnTouchPublic(const TouchEvent &event) = 0;
void Run(int32_t argc, const char **argv) override;
@ -41,12 +40,6 @@ protected:
private:
sptr<NativeTestSync> windowSync = nullptr;
BufferRequestConfig rconfig = {};
bool isClick = true;
double downX = 0;
double downY = 0;
double backupX = 0;
double backupY = 0;
};
class WMClientNativeTest32 : public WMClientNativeTest32Ability {
@ -95,26 +88,6 @@ public:
}
}
bool OnKey(const KeyEvent &event) override
{
if (window->GetPIPMode()) {
return false;
}
if (event.IsKeyDown() == true && event.GetKeyCode() == OHOS::KeyEventEnum::KEY_BACK) {
int32_t x = window->GetWidth() / 0x4, y = window->GetHeight() / 0x4;
int32_t w = window->GetWidth() / 0x2, h = window->GetHeight() / 0x2;
window->EnterPIPMode(x, y, w, h);
}
return true;
}
bool OnTouchPublic(const TouchEvent &event) override
{
window->ExitPIPMode();
return true;
}
private:
DrawFunc drawptr = NativeTestDraw::FlushDraw;
} g_autoload;

View File

@ -62,8 +62,6 @@ public:
void ChangeWindowType(WindowType type);
void ReSize(int32_t width, int32_t height);
void Rotate(rotateType type);
void RegistOnTouchCb(funcOnTouch cb);
void RegistOnKeyCb(funcOnKey cb);
void RegistOnWindowCreateCb(void(* cb)(uint32_t pid));
};

View File

@ -77,10 +77,6 @@ public:
{
return GSERROR_NOT_SUPPORT;
}
// listener
virtual GSError OnTouch(OnTouchFunc cb) = 0;
virtual GSError OnKey(OnKeyFunc cb) = 0;
};
} // namespace OHOS

8
interfaces/innerkits/wmclient/wm_common.h Normal file → Executable file
View File

@ -131,16 +131,8 @@ struct WindowInfo {
};
#ifdef __cplusplus
class TouchEvent;
class KeyEvent;
using funcWindowInfoChange = std::function<void(WindowInfo &info)>;
using funcOnKey = std::function<bool(KeyEvent)>;
using funcOnTouch = std::function<bool(TouchEvent)>;
using OnKeyFunc = std::function<bool(KeyEvent)>;
using OnTouchFunc = std::function<bool(TouchEvent)>;
using WindowPositionChangeFunc = std::function<void(int32_t x, int32_t y)>;
using WindowSizeChangeFunc = std::function<void(uint32_t width, uint32_t height)>;
using WindowVisibilityChangeFunc = std::function<void(bool visibility)>;