summaryrefslogtreecommitdiffstats
path: root/engine/include/serial/focusable.h
diff options
context:
space:
mode:
Diffstat (limited to 'engine/include/serial/focusable.h')
-rw-r--r--engine/include/serial/focusable.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/engine/include/serial/focusable.h b/engine/include/serial/focusable.h
new file mode 100644
index 0000000..325f84b
--- /dev/null
+++ b/engine/include/serial/focusable.h
@@ -0,0 +1,36 @@
+#ifndef __FOCUSABLE_H__
+#define __FOCUSABLE_H__
+
+#include "types.h"
+
+class task_s;
+union SDL_Event;
+
+class Focusable
+{
+ bool focused;
+
+ task_s * event_trigger;
+
+protected:
+
+ /* Callback to event */
+ virtual void serial_cb(const SDL_Event*) = 0;
+
+ /* Event stack specification */
+ virtual Uint32 stackID() const = 0;
+
+public:
+
+ Focusable(bool focused = true);
+
+ virtual ~Focusable();
+
+ void setFocused(bool flag);
+
+ bool isFocused() const;
+
+ void serial_precall(void*);
+};
+
+#endif