mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:07:35 +00:00
LibCore: Add CEvent and make LibGUI/GEvent inherit from it.
This commit is contained in:
parent
696ada2810
commit
b8062f69d8
31 changed files with 98 additions and 159 deletions
|
@ -4,9 +4,9 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <AK/Weakable.h>
|
||||
|
||||
class GEvent;
|
||||
class GChildEvent;
|
||||
class GTimerEvent;
|
||||
class CEvent;
|
||||
class CChildEvent;
|
||||
class CTimerEvent;
|
||||
|
||||
class GObject : public Weakable<GObject> {
|
||||
public:
|
||||
|
@ -15,7 +15,7 @@ public:
|
|||
|
||||
virtual const char* class_name() const { return "GObject"; }
|
||||
|
||||
virtual void event(GEvent&);
|
||||
virtual void event(CEvent&);
|
||||
|
||||
Vector<GObject*>& children() { return m_children; }
|
||||
|
||||
|
@ -39,8 +39,8 @@ public:
|
|||
virtual bool is_window() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual void timer_event(GTimerEvent&);
|
||||
virtual void child_event(GChildEvent&);
|
||||
virtual void timer_event(CTimerEvent&);
|
||||
virtual void child_event(CChildEvent&);
|
||||
|
||||
private:
|
||||
GObject* m_parent { nullptr };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue