summaryrefslogtreecommitdiff
path: root/LibCore
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-10 16:56:55 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-10 16:56:55 +0200
commitb8062f69d86e0dee9990cbffe627091faf7cc0ba (patch)
tree558d8ebbc5a2fdb6b6eea955b272c24b675cad06 /LibCore
parent696ada2810948ff6df7ef286ba5346c1d82c1d8c (diff)
downloadserenity-b8062f69d86e0dee9990cbffe627091faf7cc0ba.zip
LibCore: Add CEvent and make LibGUI/GEvent inherit from it.
Diffstat (limited to 'LibCore')
-rw-r--r--LibCore/CEvent.cpp12
-rw-r--r--LibCore/Makefile5
2 files changed, 14 insertions, 3 deletions
diff --git a/LibCore/CEvent.cpp b/LibCore/CEvent.cpp
new file mode 100644
index 0000000000..5b5d143721
--- /dev/null
+++ b/LibCore/CEvent.cpp
@@ -0,0 +1,12 @@
+#include <LibCore/CEvent.h>
+#include <LibGUI/GObject.h>
+
+CChildEvent::CChildEvent(Type type, GObject& child)
+ : CEvent(type)
+ , m_child(child.make_weak_ptr())
+{
+}
+
+CChildEvent::~CChildEvent()
+{
+}
diff --git a/LibCore/Makefile b/LibCore/Makefile
index 97af9c2fad..7815597924 100644
--- a/LibCore/Makefile
+++ b/LibCore/Makefile
@@ -1,7 +1,6 @@
OBJS = \
- CElapsedTimer.o
-
-LIBS =
+ CElapsedTimer.o \
+ CEvent.o
LIBRARY = libcore.a
STANDARD_FLAGS = -std=c++17 -Wno-sized-deallocation