mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
WindowServer: Move video mode setup to WSScreen.
This commit is contained in:
parent
809266a9fb
commit
82768e7ac5
6 changed files with 47 additions and 58 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
class WSScreen {
|
||||
public:
|
||||
WSScreen(RGBA32*, unsigned width, unsigned height);
|
||||
WSScreen(unsigned width, unsigned height);
|
||||
~WSScreen();
|
||||
|
||||
void set_resolution(int width, int height);
|
||||
|
@ -21,6 +21,8 @@ public:
|
|||
Size size() const { return { width(), height() }; }
|
||||
Rect rect() const { return { 0, 0, width(), height() }; }
|
||||
|
||||
void set_y_offset(int);
|
||||
|
||||
Point cursor_location() const { return m_cursor_location; }
|
||||
bool left_mouse_button_pressed() const { return m_left_mouse_button_pressed; }
|
||||
bool right_mouse_button_pressed() const { return m_right_mouse_button_pressed; }
|
||||
|
@ -28,14 +30,12 @@ public:
|
|||
void on_receive_mouse_data(int dx, int dy, bool left_button, bool right_button);
|
||||
void on_receive_keyboard_data(KeyEvent);
|
||||
|
||||
protected:
|
||||
WSScreen(unsigned width, unsigned height);
|
||||
|
||||
private:
|
||||
RGBA32* m_framebuffer { nullptr };
|
||||
|
||||
int m_width { 0 };
|
||||
int m_height { 0 };
|
||||
int m_framebuffer_fd { -1 };
|
||||
|
||||
Point m_cursor_location;
|
||||
bool m_left_mouse_button_pressed { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue