mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:17:44 +00:00
WindowServer: Rename the two painting phases.
Work now happens in terms of two messages: - WM_ClientWantsToPaint - WM_ClientFinishedPaint This feels fairly obvious compared to the old Paint/Invalidate.
This commit is contained in:
parent
244d5bcce1
commit
9fa8d4e22f
6 changed files with 39 additions and 39 deletions
|
@ -9,18 +9,18 @@ class WSMessage {
|
|||
public:
|
||||
enum Type {
|
||||
Invalid = 0,
|
||||
Paint,
|
||||
WM_ClientWantsToPaint,
|
||||
WM_ClientFinishedPaint,
|
||||
WM_SetWindowTitle,
|
||||
WM_SetWindowRect,
|
||||
WM_DeferredCompose,
|
||||
MouseMove,
|
||||
MouseDown,
|
||||
MouseUp,
|
||||
KeyDown,
|
||||
KeyUp,
|
||||
WM_Compose,
|
||||
WM_Invalidate,
|
||||
WindowActivated,
|
||||
WindowDeactivated,
|
||||
WM_SetWindowTitle,
|
||||
WM_SetWindowRect,
|
||||
};
|
||||
|
||||
WSMessage() { }
|
||||
|
@ -31,16 +31,16 @@ public:
|
|||
|
||||
bool is_mouse_event() const { return m_type == MouseMove || m_type == MouseDown || m_type == MouseUp; }
|
||||
bool is_key_event() const { return m_type == KeyUp || m_type == KeyDown; }
|
||||
bool is_paint_event() const { return m_type == Paint; }
|
||||
bool is_paint_event() const { return m_type == WM_ClientWantsToPaint; }
|
||||
|
||||
private:
|
||||
Type m_type { Invalid };
|
||||
};
|
||||
|
||||
class WSWindowInvalidationEvent final : public WSMessage {
|
||||
class WSClientFinishedPaintMessage final : public WSMessage {
|
||||
public:
|
||||
explicit WSWindowInvalidationEvent(const Rect& rect = Rect())
|
||||
: WSMessage(WSMessage::WM_Invalidate)
|
||||
explicit WSClientFinishedPaintMessage(const Rect& rect = Rect())
|
||||
: WSMessage(WSMessage::WM_ClientFinishedPaint)
|
||||
, m_rect(rect)
|
||||
{
|
||||
}
|
||||
|
@ -50,9 +50,9 @@ private:
|
|||
Rect m_rect;
|
||||
};
|
||||
|
||||
class WSSetWindowTitle final : public WSMessage {
|
||||
class WSSetWindowTitleMessage final : public WSMessage {
|
||||
public:
|
||||
explicit WSSetWindowTitle(String&& title)
|
||||
explicit WSSetWindowTitleMessage(String&& title)
|
||||
: WSMessage(WSMessage::WM_SetWindowTitle)
|
||||
, m_title(move(title))
|
||||
{
|
||||
|
@ -64,9 +64,9 @@ private:
|
|||
String m_title;
|
||||
};
|
||||
|
||||
class WSSetWindowRect final : public WSMessage {
|
||||
class WSSetWindowRectMessage final : public WSMessage {
|
||||
public:
|
||||
explicit WSSetWindowRect(const Rect& rect)
|
||||
explicit WSSetWindowRectMessage(const Rect& rect)
|
||||
: WSMessage(WSMessage::WM_SetWindowRect)
|
||||
, m_rect(rect)
|
||||
{
|
||||
|
@ -78,10 +78,10 @@ private:
|
|||
Rect m_rect;
|
||||
};
|
||||
|
||||
class WSPaintEvent final : public WSMessage {
|
||||
class WSClientWantsToPaintMessage final : public WSMessage {
|
||||
public:
|
||||
explicit WSPaintEvent(const Rect& rect = Rect())
|
||||
: WSMessage(WSMessage::Paint)
|
||||
explicit WSClientWantsToPaintMessage(const Rect& rect = Rect())
|
||||
: WSMessage(WSMessage::WM_ClientWantsToPaint)
|
||||
, m_rect(rect)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue