diff --git a/libeventdisp.a b/libeventdisp.a index 2f02acb..aa57c85 100644 Binary files a/libeventdisp.a and b/libeventdisp.a differ diff --git a/source/eventy/engine.d b/source/eventy/engine.d index c96cc39..b4ca8a3 100644 --- a/source/eventy/engine.d +++ b/source/eventy/engine.d @@ -28,6 +28,19 @@ public final class Engine } + /** + * Event loop + */ + public void run() + { + while(true) + { + /* TODO: Implement me */ + + /* TODO: Add yield to stop mutex starvation on a single thread */ + } + } + /** * push(Event e) * diff --git a/source/eventy/signal.d b/source/eventy/signal.d index 7bdd74c..44b3ca1 100644 --- a/source/eventy/signal.d +++ b/source/eventy/signal.d @@ -13,10 +13,40 @@ alias EventHandler = void function(Event); public class Signal { + /* TypeIDs this signal handler associates with */ private ulong[] typeIDs; + /* Signal handler */ + private EventHandler handler; + this(ulong[] typeIDs, EventHandler handler) + { + this.typeIDs = typeIDs; + this.handler = handler; + } + + /** + * Returns true if this signal handles the given typeID + * false otherwise + */ + public bool handles(ulong typeID) + { + /* FIXME: Implement */ + return true; + } + + public void registerTypeID(ulong typeID) { } + + public void deregisterTypeID(ulong typeID) + { + + } + + public EventHandler getHandler() + { + return handler; + } } \ No newline at end of file