| 
									
										
										
										
											2019-01-20 04:49:48 +01:00
										 |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-10 17:30:34 +02:00
										 |  |  | #include <LibCore/CEventLoop.h>
 | 
					
						
							| 
									
										
										
										
											2019-07-17 19:46:06 +02:00
										 |  |  | #include <LibCore/CoreIPCClient.h>
 | 
					
						
							| 
									
										
										
										
											2019-03-02 10:04:49 +01:00
										 |  |  | #include <LibGUI/GEvent.h>
 | 
					
						
							| 
									
										
										
										
											2019-05-28 11:53:16 +02:00
										 |  |  | #include <WindowServer/WSAPITypes.h>
 | 
					
						
							| 
									
										
										
										
											2019-01-20 04:49:48 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-02 10:04:49 +01:00
										 |  |  | class GAction; | 
					
						
							| 
									
										
										
										
											2019-04-10 17:01:54 +02:00
										 |  |  | class CObject; | 
					
						
							| 
									
										
										
										
											2019-04-10 17:35:43 +02:00
										 |  |  | class CNotifier; | 
					
						
							| 
									
										
										
										
											2019-01-20 05:48:43 +01:00
										 |  |  | class GWindow; | 
					
						
							| 
									
										
										
										
											2019-01-20 04:49:48 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-17 19:46:06 +02:00
										 |  |  | class GWindowServerConnection : public IPC::Client::Connection<WSAPI_ServerMessage, WSAPI_ClientMessage> { | 
					
						
							| 
									
										
										
										
											2019-01-20 04:49:48 +01:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2019-07-17 18:28:30 +02:00
										 |  |  |     GWindowServerConnection() | 
					
						
							| 
									
										
										
										
											2019-07-17 19:46:06 +02:00
										 |  |  |         : Connection("/tmp/wsportal") | 
					
						
							| 
									
										
										
										
											2019-07-17 18:28:30 +02:00
										 |  |  |     {} | 
					
						
							| 
									
										
										
										
											2019-02-13 17:54:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-17 18:28:30 +02:00
										 |  |  |     void handshake() override; | 
					
						
							| 
									
										
										
										
											2019-03-19 00:01:02 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-20 04:49:48 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2019-07-17 19:46:06 +02:00
										 |  |  |     void postprocess_bundles(Vector<IncomingMessageBundle>& m_unprocessed_bundles) override; | 
					
						
							| 
									
										
										
										
											2019-04-22 01:15:47 +02:00
										 |  |  |     void handle_paint_event(const WSAPI_ServerMessage&, GWindow&, const ByteBuffer& extra_data); | 
					
						
							| 
									
										
										
										
											2019-02-20 15:34:55 +01:00
										 |  |  |     void handle_resize_event(const WSAPI_ServerMessage&, GWindow&); | 
					
						
							| 
									
										
										
										
											2019-02-15 09:17:18 +01: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 10:12:19 +01:00
										 |  |  |     void handle_window_entered_or_left_event(const WSAPI_ServerMessage&, GWindow&); | 
					
						
							| 
									
										
										
										
											2019-04-04 01:44:35 +02:00
										 |  |  |     void handle_wm_event(const WSAPI_ServerMessage&, GWindow&); | 
					
						
							| 
									
										
										
										
											2019-05-03 01:38:24 +02:00
										 |  |  |     void handle_greeting(WSAPI_ServerMessage&); | 
					
						
							| 
									
										
										
										
											2019-07-17 18:28:30 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class GEventLoop final : public CEventLoop { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |     GEventLoop(); | 
					
						
							|  |  |  |     virtual ~GEventLoop() override; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     static GEventLoop& current() { return static_cast<GEventLoop&>(CEventLoop::current()); } | 
					
						
							| 
									
										
										
										
											2019-02-01 03:50:06 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-17 18:28:30 +02:00
										 |  |  |     GWindowServerConnection& connection() { return m_connection; } | 
					
						
							| 
									
										
										
										
											2019-04-22 01:15:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-17 18:28:30 +02:00
										 |  |  | private: | 
					
						
							|  |  |  |     void process_unprocessed_bundles(); | 
					
						
							|  |  |  |     GWindowServerConnection m_connection; | 
					
						
							| 
									
										
										
										
											2019-01-20 04:49:48 +01:00
										 |  |  | }; |