CrystalSpace

Public API Reference

iengine/objwatch.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2003 by Jorrit Tyberghein
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __CS_IENGINE_OBJWATCH_H__
00020 #define __CS_IENGINE_OBJWATCH_H__
00021 
00029 #include "csutil/scf.h"
00030 
00031 struct iMovable;
00032 struct iLight;
00033 struct iSector;
00034 struct iMeshWrapper;
00035 
00040 
00041 #define CS_WATCH_NONE 0
00043 #define CS_WATCH_LIGHT_DESTROY 1
00045 #define CS_WATCH_LIGHT_MOVE 2
00047 #define CS_WATCH_LIGHT_RADIUS 3
00049 #define CS_WATCH_LIGHT_COLOR 4
00051 #define CS_WATCH_LIGHT_SECTOR 5
00053 #define CS_WATCH_MOVABLE_DESTROY 6
00055 #define CS_WATCH_MOVABLE_CHANGED 7
00057 #define CS_WATCH_LIGHT_ATTENUATION 8
00059 #define CS_WATCH_SECTOR_NEWMESH 9
00061 #define CS_WATCH_SECTOR_REMOVEMESH 10
00062 
00072 struct iObjectWatcherListener : public virtual iBase
00073 {
00074   SCF_INTERFACE (iObjectWatcherListener, 0, 0, 1);
00075 
00080   virtual void ObjectChanged (int op, iMovable* movable) = 0;
00081 
00086   virtual void ObjectChanged (int op, iLight* light) = 0;
00087 
00092   virtual void ObjectChanged (int op, iSector* sector, iMeshWrapper* mesh) = 0;
00093 };
00094 
00095 
00110 struct iObjectWatcher : public virtual iBase
00111 {
00112   SCF_INTERFACE(iObjectWatcher, 2,0,0);
00114   virtual void WatchLight (iLight* light) = 0;
00116   virtual void RemoveLight (iLight* light) = 0;
00118   virtual int GetWatchedLightCount () const = 0;
00120   virtual iLight* GetLight (int idx) = 0;
00121 
00123   virtual void WatchMovable (iMovable* movable) = 0;
00125   virtual void RemoveMovable (iMovable* movable) = 0;
00127   virtual int GetWatchedMovableCount () const = 0;
00129   virtual iMovable* GetMovable (int idx) = 0;
00130 
00132   virtual void WatchSector (iSector* sector) = 0;
00134   virtual void RemoveSector (iSector* sector) = 0;
00136   virtual int GetWatchedSectorCount () const = 0;
00138   virtual iSector* GetSector (int idx) = 0;
00139 
00141   virtual void Reset () = 0;
00142 
00154   virtual uint32 GetWatchNumber () const = 0;
00155 
00170   virtual int GetLastOperation () const = 0;
00171 
00176   virtual iLight* GetLastLight () const = 0;
00177 
00182   virtual iMovable* GetLastMovable () const = 0;
00183 
00188   virtual iSector* GetLastSector () const = 0;
00189 
00194   virtual iMeshWrapper* GetLastMeshWrapper () const = 0;
00195 
00200   virtual void AddListener (iObjectWatcherListener* cb) = 0;
00201 
00205   virtual void RemoveListener (iObjectWatcherListener* cb) = 0;
00206 };
00207 
00210 #endif // __CS_IENGINE_OBJWATCH_H__
00211 

Generated for Crystal Space by doxygen 1.4.7