1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +00:00

WindowServer: Port WindowServer to LibCore.

This was pretty straightforward thanks to the work I did separating out
LibCore from LibGUI already. :^)

- WSMessageLoop now inherits from CEventLoop.
- WSMessage now inherits from CEvent.
- WSMessageReceiver goes away.

Now there is only one event loop in Serenity. Very nice!
This commit is contained in:
Andreas Kling 2019-04-14 05:15:22 +02:00
parent 4132f645ee
commit de184d0999
20 changed files with 170 additions and 320 deletions

View file

@ -5,7 +5,7 @@
#include <AK/WeakPtr.h>
#include <SharedGraphics/Rect.h>
#include <WindowServer/WSMenuItem.h>
#include <WindowServer/WSMessageReceiver.h>
#include <LibCore/CObject.h>
class WSClientConnection;
class WSMenuBar;
@ -13,7 +13,7 @@ class WSMessage;
class WSWindow;
class Font;
class WSMenu final : public WSMessageReceiver {
class WSMenu final : public CObject {
public:
WSMenu(WSClientConnection*, int menu_id, String&& name);
virtual ~WSMenu() override;
@ -77,7 +77,7 @@ public:
void popup(const Point&);
private:
virtual void on_message(const WSMessage&) override;
virtual void event(CEvent&) override;
int padding_between_text_and_shortcut() const { return 50; }
void did_activate(WSMenuItem&);