blob: bb57f50852b7f452ebc1b96b065cbef294925c6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibIPC/ServerConnection.h>
#include <WindowServer/WindowClientEndpoint.h>
#include <WindowServer/WindowServerEndpoint.h>
namespace GUI {
class WindowServerConnection
: public IPC::ServerConnection<WindowClientEndpoint, WindowServerEndpoint>
, public WindowClientEndpoint {
C_OBJECT(WindowServerConnection)
public:
WindowServerConnection()
: IPC::ServerConnection<WindowClientEndpoint, WindowServerEndpoint>(*this, "/tmp/portal/window")
{
handshake();
}
virtual void handshake() override;
static WindowServerConnection& the();
private:
virtual void handle(const Messages::WindowClient::Paint&) override;
virtual void handle(const Messages::WindowClient::MouseMove&) override;
virtual void handle(const Messages::WindowClient::MouseDown&) override;
virtual void handle(const Messages::WindowClient::MouseDoubleClick&) override;
virtual void handle(const Messages::WindowClient::MouseUp&) override;
virtual void handle(const Messages::WindowClient::MouseWheel&) override;
virtual void handle(const Messages::WindowClient::WindowEntered&) override;
virtual void handle(const Messages::WindowClient::WindowLeft&) override;
virtual void handle(const Messages::WindowClient::KeyDown&) override;
virtual void handle(const Messages::WindowClient::KeyUp&) override;
virtual void handle(const Messages::WindowClient::WindowActivated&) override;
virtual void handle(const Messages::WindowClient::WindowDeactivated&) override;
virtual void handle(const Messages::WindowClient::WindowInputEntered&) override;
virtual void handle(const Messages::WindowClient::WindowInputLeft&) override;
virtual void handle(const Messages::WindowClient::WindowCloseRequest&) override;
virtual void handle(const Messages::WindowClient::WindowResized&) override;
virtual void handle(const Messages::WindowClient::MenuItemActivated&) override;
virtual void handle(const Messages::WindowClient::MenuItemEntered&) override;
virtual void handle(const Messages::WindowClient::MenuItemLeft&) override;
virtual void handle(const Messages::WindowClient::MenuVisibilityDidChange&) override;
virtual void handle(const Messages::WindowClient::ScreenRectChanged&) override;
virtual void handle(const Messages::WindowClient::AsyncSetWallpaperFinished&) override;
virtual void handle(const Messages::WindowClient::DragDropped&) override;
virtual void handle(const Messages::WindowClient::DragAccepted&) override;
virtual void handle(const Messages::WindowClient::DragCancelled&) override;
virtual void handle(const Messages::WindowClient::UpdateSystemTheme&) override;
virtual void handle(const Messages::WindowClient::WindowStateChanged&) override;
virtual void handle(const Messages::WindowClient::DisplayLinkNotification&) override;
virtual void handle(const Messages::WindowClient::Ping&) override;
bool m_display_link_notification_pending { false };
};
}
|