diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-05 19:36:01 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-05 19:36:01 +0100 |
commit | 44d5388e786e53c8719a9209beb38bdb0930f0b7 (patch) | |
tree | c47843ef3afa1b121b4e1b7cdeaa0f84fd79269e /Servers/WindowServer/WSMenuManager.h | |
parent | 2d18fc8052eefbbee04b61d6308b5400118209f1 (diff) | |
download | serenity-44d5388e786e53c8719a9209beb38bdb0930f0b7.zip |
WindowServer: Add basic menu applet concept
It's now possible to create a little applet window that sits inside the
system's menubar. This is done using the new CreateMenuApplet IPC call.
So far, it's possible to assign a backing store ID, and to invalidate
rects for repaint. There is no way to get the events from inside the
applet just yet.
This will allow us to move the CPU graph and audio thingy to separate
applet processes. :^)
Diffstat (limited to 'Servers/WindowServer/WSMenuManager.h')
-rw-r--r-- | Servers/WindowServer/WSMenuManager.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Servers/WindowServer/WSMenuManager.h b/Servers/WindowServer/WSMenuManager.h index 4c65d85402..69a33b7793 100644 --- a/Servers/WindowServer/WSMenuManager.h +++ b/Servers/WindowServer/WSMenuManager.h @@ -3,6 +3,7 @@ #include "WSMenu.h" #include <LibCore/CObject.h> #include <LibCore/CTimer.h> +#include <WindowServer/WSMenuApplet.h> #include <WindowServer/WSCPUMonitor.h> #include <WindowServer/WSWindow.h> @@ -33,6 +34,10 @@ public: void close_everyone_not_in_lineage(WSMenu&); void close_menu_and_descendants(WSMenu&); + void add_applet(WSMenuApplet&); + void remove_applet(WSMenuApplet&); + void invalidate_applet(WSMenuApplet&, const Rect&); + private: void close_menus(const Vector<WSMenu*>&); @@ -42,6 +47,7 @@ private: void handle_menu_mouse_event(WSMenu&, const WSMouseEvent&); void draw(); + void draw_applet(const WSMenuApplet&); void tick_clock(); RefPtr<WSWindow> m_window; @@ -55,6 +61,8 @@ private: RefPtr<GraphicsBitmap> m_muted_bitmap; RefPtr<GraphicsBitmap> m_unmuted_bitmap; + Vector<WeakPtr<WSMenuApplet>> m_applets; + OwnPtr<AClientConnection> m_audio_client; Rect m_audio_rect; |