CrystalSpace

Public API Reference

iutil/eventq.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2001 by Eric Sunshine <[email protected]>
00003     Copyright (C) 2000 by Andrew Zabolotny <[email protected]>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CS_IUTIL_EVENTQ_H__
00021 #define __CS_IUTIL_EVENTQ_H__
00022 
00030 #include "csutil/scf.h"
00031 #include "iutil/eventnames.h"
00032 #include "iutil/eventhandlers.h"
00033 
00034 struct iEvent;
00035 struct iEventCord;
00036 struct iEventOutlet;
00037 struct iEventPlug;
00038 struct iEventHandler;
00039 
00040 
00056 struct iEventQueue : public virtual iBase
00057 {
00058   SCF_INTERFACE(iEventQueue, 2,0,0);
00066   virtual void Process () = 0;
00067 
00074   virtual void Dispatch (iEvent&) = 0;
00075 
00081   virtual csHandlerID RegisterListener (iEventHandler *) = 0;
00088   virtual bool Subscribe (iEventHandler *, const csEventID &ename) = 0;
00093   virtual bool Subscribe (iEventHandler *, const csEventID ename[]) = 0;
00100   virtual void Unsubscribe (iEventHandler*, const csEventID[]) = 0;
00108   virtual void Unsubscribe (iEventHandler*, const csEventID &) = 0;
00112   virtual csHandlerID RegisterListener (iEventHandler *, const csEventID &ename) = 0;
00116   virtual csHandlerID RegisterListener (iEventHandler *, const csEventID ename[]) = 0;
00122   virtual void RemoveListener (iEventHandler *) = 0;
00123 
00133   virtual csPtr<iEventOutlet> CreateEventOutlet (iEventPlug*) = 0;
00134 
00146   virtual iEventOutlet* GetEventOutlet () = 0;
00147 
00156   virtual iEventCord* GetEventCord (const csEventID &name) = 0;
00157 
00162   virtual csPtr<iEvent> CreateEvent (const csEventID &name) = 0;
00163 
00168   virtual csPtr<iEvent> CreateBroadcastEvent (const csEventID &name) = 0;
00169 
00179   virtual void Post (iEvent*) = 0;
00180 
00187   virtual csPtr<iEvent> Get () = 0;
00188 
00190   virtual void Clear () = 0;
00191 
00193   virtual bool IsEmpty () = 0;
00194 
00205   virtual void RemoveAllListeners () = 0;
00206 
00207 };
00208 
00211 #endif // __CS_IUTIL_EVENTQ_H__

Generated for Crystal Space by doxygen 1.4.7