/***************************************************************************\ [*] ___ ____ ____ __ __ ____ [*] ROGUE: ROM With Attitude [*] [*] /#/ ) /#/ ) /#/ ) /#/ /#/ /#/ [*] All rights reserved [*] [*] /#/ < /#/ / /#/ _ /#/ /#/ /#/-- [*] Copyright(C) 2000-2001 [*] [*] /#/ \(#(__/ (#(__/ (#(__/#/ (#(___ [*] Kenneth Conley (Mendanbar) [*] [*] Expression of Digital Creativity.. [*] roguemud@yahoogroups.com [*] [-]---------------------------------------+-+-----------------------------[-] [*] File: event.h [*] [*] Usage: Primary code for events [*] \***************************************************************************/ #ifndef __EVENT_H__ #define __EVENT_H__ #include "stl.llist.h" class QueueElement; class EventData { public: EventData(void) { }; virtual ~EventData(void) { }; }; #define EVENTFUNC(name) SInt32 (name)(Ptr event_obj, Event *event) class Event { public: Event(EVENTFUNC(*function), Ptr event_obj, UInt32 when); ~Event(void); SInt32 Run(void); void Cancel(void); UInt32 Time(void); EVENTFUNC(*func); Ptr event_obj; QueueElement * queue; bool running; }; void InitEvents(void); void ProcessEvents(void); void FreeAllEvents(void); Event *FindEventFunc(LList<Event *> & list, EVENTFUNC(*func)); #endif