Add more support for Event Handling.

This commit is contained in:
Kirigaya Kazuto 2017-05-08 14:17:42 +08:00
parent a33a27dbb0
commit 7cab64132d
2 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,11 @@ bool operator == (const LooperID& a,const LooperID& b)
return a._type_id==b._type_id && a._looper_cnt==b._looper_cnt ;
}
bool operator != (const LooperID& a,const LooperID& b)
{
return !(a==b);
}
Looper::Looper()
{
_update=_running=true;

View File

@ -12,6 +12,9 @@ int PushEvent(const Event& refEvent);
void PumpEvents();
bool HasEvent(decltype(Event::type) EventType);
bool HasEvent(decltype(Event::type) EventTypeMin,decltype(Event::type) EventTypeMax);
bool EnableEvent(decltype(Event::type) EventType);
bool DisableEvent(decltype(Event::type) EventType);
bool IsEventEnabled(decltype(Event::type) EventType);
typedef struct
{
@ -20,6 +23,7 @@ typedef struct
}LooperID;
bool operator == (const LooperID&,const LooperID&);
bool operator != (const LooperID&,const LooperID&);
class Looper
{