2019-01-20 01:49:48 -02:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-04-10 12:30:34 -03:00
|
|
|
#include <LibCore/CEventLoop.h>
|
2019-07-17 14:46:06 -03:00
|
|
|
#include <LibCore/CoreIPCClient.h>
|
2019-03-02 06:04:49 -03:00
|
|
|
#include <LibGUI/GEvent.h>
|
2019-05-28 06:53:16 -03:00
|
|
|
#include <WindowServer/WSAPITypes.h>
|
2019-01-20 01:49:48 -02:00
|
|
|
|
2019-03-02 06:04:49 -03:00
|
|
|
class GAction;
|
2019-04-10 12:01:54 -03:00
|
|
|
class CObject;
|
2019-04-10 12:35:43 -03:00
|
|
|
class CNotifier;
|
2019-01-20 02:48:43 -02:00
|
|
|
class GWindow;
|
2019-01-20 01:49:48 -02:00
|
|
|
|
2019-07-17 14:46:06 -03:00
|
|
|
class GWindowServerConnection : public IPC::Client::Connection<WSAPI_ServerMessage, WSAPI_ClientMessage> {
|
2019-09-21 05:13:34 -03:00
|
|
|
C_OBJECT(GWindowServerConnection)
|
2019-01-20 01:49:48 -02:00
|
|
|
public:
|
2019-07-17 13:28:30 -03:00
|
|
|
GWindowServerConnection()
|
2019-11-26 13:30:35 -03:00
|
|
|
: Connection("/tmp/portal/window")
|
2019-07-17 13:28:30 -03:00
|
|
|
{}
|
2019-02-13 14:54:30 -02:00
|
|
|
|
2019-07-17 13:28:30 -03:00
|
|
|
void handshake() override;
|
2019-07-17 15:57:27 -03:00
|
|
|
static GWindowServerConnection& the();
|
2019-03-18 20:01:02 -03:00
|
|
|
|
2019-01-20 01:49:48 -02:00
|
|
|
private:
|
2019-07-17 14:46:06 -03:00
|
|
|
void postprocess_bundles(Vector<IncomingMessageBundle>& m_unprocessed_bundles) override;
|
2019-04-21 20:15:47 -03:00
|
|
|
void handle_paint_event(const WSAPI_ServerMessage&, GWindow&, const ByteBuffer& extra_data);
|
2019-02-20 11:34:55 -03:00
|
|
|
void handle_resize_event(const WSAPI_ServerMessage&, GWindow&);
|
2019-02-15 06:17:18 -02:00
|
|
|
void handle_mouse_event(const WSAPI_ServerMessage&, GWindow&);
|
|
|
|
|
void handle_key_event(const WSAPI_ServerMessage&, GWindow&);
|
|
|
|
|
void handle_window_activation_event(const WSAPI_ServerMessage&, GWindow&);
|
|
|
|
|
void handle_window_close_request_event(const WSAPI_ServerMessage&, GWindow&);
|
|
|
|
|
void handle_menu_event(const WSAPI_ServerMessage&);
|
2019-02-20 06:12:19 -03:00
|
|
|
void handle_window_entered_or_left_event(const WSAPI_ServerMessage&, GWindow&);
|
2019-04-03 20:44:35 -03:00
|
|
|
void handle_wm_event(const WSAPI_ServerMessage&, GWindow&);
|
2019-05-02 20:38:24 -03:00
|
|
|
void handle_greeting(WSAPI_ServerMessage&);
|
2019-07-17 13:28:30 -03:00
|
|
|
};
|