summaryrefslogtreecommitdiffstats
path: root/engine/include/serial/focusable.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-25 01:11:57 +0100
committerNao Pross <naopross@thearcway.org>2019-01-25 01:11:57 +0100
commitbcd14a356cafe58808b4c2a14782ebb194c6abc5 (patch)
tree3bc95288b0a0172bb447ccf218fb59821f22501a /engine/include/serial/focusable.hpp
parentDelete bin and test/makefile update .gitignore (diff)
downloadflatland-bcd14a356cafe58808b4c2a14782ebb194c6abc5.tar.gz
flatland-bcd14a356cafe58808b4c2a14782ebb194c6abc5.zip
Rename everything under engine/ to remove `flat' and be `.hpp'
Diffstat (limited to 'engine/include/serial/focusable.hpp')
-rw-r--r--engine/include/serial/focusable.hpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/engine/include/serial/focusable.hpp b/engine/include/serial/focusable.hpp
new file mode 100644
index 0000000..008f7a3
--- /dev/null
+++ b/engine/include/serial/focusable.hpp
@@ -0,0 +1,37 @@
+#ifndef __FOCUSABLE_H__
+#define __FOCUSABLE_H__
+
+#include "core/object.hpp"
+#include "types.hpp"
+
+class task_s;
+union SDL_Event;
+
+class Focusable : virtual public flat::core::object
+{
+ bool focused;
+
+ task_s * event_trigger;
+
+protected:
+
+ /* Callback to event */
+ virtual void serial_cb(const SDL_Event*) = 0;
+
+ /* Event stack specification */
+ virtual uint32_t stackID() const = 0;
+
+public:
+
+ Focusable(bool focused = true);
+
+ virtual ~Focusable();
+
+ void setFocused(bool flag);
+
+ bool isFocused() const;
+
+ void serial_precall(void*);
+};
+
+#endif