19 #ifndef _COMMON_RT_EVENTS_H_
20 #define _COMMON_RT_EVENTS_H_
33 return m_object.get<rtString>(
"name");
35 rtObjectRef object()
const
39 Event(rtObjectRef o) : m_object(o)
43 Event(
const char* eventName) : m_object(new rtMapObject)
45 m_object.set(
"name", eventName);
61 g_source_remove(m_timeoutId);
64 rtError setListener(
const char* eventName, rtIFunction* f)
66 return m_emit->addListener(eventName, f);
68 rtError delListener(
const char* eventName, rtIFunction* f)
70 return m_emit->delListener(eventName, f);
72 rtError send(
Event&& event);
75 std::queue<rtObjectRef> m_eventQueue;