mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 22:37:36 +00:00
Hook up the Keyboard device to the AbstractScreen.
Basic text editing in a TextBox works. How very cool :^)
This commit is contained in:
parent
a3c39ea9d6
commit
b95aa18315
4 changed files with 63 additions and 1 deletions
|
@ -3,9 +3,10 @@
|
|||
#include "Object.h"
|
||||
#include "Rect.h"
|
||||
#include "Size.h"
|
||||
#include "Keyboard.h"
|
||||
#include "PS2MouseDevice.h"
|
||||
|
||||
class AbstractScreen : public Object, public MouseClient {
|
||||
class AbstractScreen : public Object, public KeyboardClient, public MouseClient {
|
||||
public:
|
||||
virtual ~AbstractScreen();
|
||||
|
||||
|
@ -30,6 +31,9 @@ private:
|
|||
// ^MouseClient
|
||||
virtual void did_receive_mouse_data(int dx, int dy, bool left_button, bool right_button) final;
|
||||
|
||||
// ^KeyboardClient
|
||||
virtual void on_key_pressed(Keyboard::Key) final;
|
||||
|
||||
int m_width { 0 };
|
||||
int m_height { 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue