mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
WindowServer+LibGUI: Add per-window progress
Each window now has an associated progress integer that can be updated via the SetWindowProgress IPC call. This can be used by clients to indicate the progress of ongoing tasks. Any number in the range 0 through 100 indicate a progress percentage. Any other number means "no progress"
This commit is contained in:
parent
8449f0a15b
commit
1d6ec51bee
12 changed files with 47 additions and 4 deletions
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
class WMWindowStateChangedEvent : public WMEvent {
|
||||
public:
|
||||
WMWindowStateChangedEvent(int client_id, int window_id, const StringView& title, const Gfx::Rect& rect, bool is_active, WindowType window_type, bool is_minimized, bool is_frameless)
|
||||
WMWindowStateChangedEvent(int client_id, int window_id, const StringView& title, const Gfx::Rect& rect, bool is_active, WindowType window_type, bool is_minimized, bool is_frameless, int progress)
|
||||
: WMEvent(Event::Type::WM_WindowStateChanged, client_id, window_id)
|
||||
, m_title(title)
|
||||
, m_rect(rect)
|
||||
|
@ -119,6 +119,7 @@ public:
|
|||
, m_active(is_active)
|
||||
, m_minimized(is_minimized)
|
||||
, m_frameless(is_frameless)
|
||||
, m_progress(progress)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -128,6 +129,7 @@ public:
|
|||
WindowType window_type() const { return m_window_type; }
|
||||
bool is_minimized() const { return m_minimized; }
|
||||
bool is_frameless() const { return m_frameless; }
|
||||
int progress() const { return m_progress; }
|
||||
|
||||
private:
|
||||
String m_title;
|
||||
|
@ -136,6 +138,7 @@ private:
|
|||
bool m_active;
|
||||
bool m_minimized;
|
||||
bool m_frameless;
|
||||
int m_progress;
|
||||
};
|
||||
|
||||
class WMWindowRectChangedEvent : public WMEvent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue