CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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 
00028 #include "csutil/scf.h"
00029 
00030 struct iMovable;
00031 struct iLight;
00032 
00037 
00038 #define CS_WATCH_NONE 0
00039 
00040 #define CS_WATCH_LIGHT_DESTROY 1
00041 
00042 #define CS_WATCH_LIGHT_MOVE 2
00043 
00044 #define CS_WATCH_LIGHT_RADIUS 3
00045 
00046 #define CS_WATCH_LIGHT_COLOR 4
00047 
00048 #define CS_WATCH_LIGHT_SECTOR 5
00049 
00050 #define CS_WATCH_MOVABLE_DESTROY 6
00051 
00052 #define CS_WATCH_MOVABLE_CHANGED 7
00053 
00054 #define CS_WATCH_LIGHT_ATTENUATION 8
00055 
00058 SCF_VERSION (iObjectWatcherListener, 0, 0, 1);
00059 
00064 struct iObjectWatcherListener : public iBase
00065 {
00070   virtual void ObjectChanged (int op, iMovable* movable, iLight* light) = 0;
00071 };
00072 
00073 SCF_VERSION (iObjectWatcher, 0, 0, 1);
00074 
00083 struct iObjectWatcher : public iBase
00084 {
00086   virtual void WatchLight (iLight* light) = 0;
00088   virtual void RemoveLight (iLight* light) = 0;
00090   virtual int GetWatchedLightCount () const = 0;
00092   virtual iLight* GetLight (int idx) = 0;
00093 
00095   virtual void WatchMovable (iMovable* movable) = 0;
00097   virtual void RemoveMovable (iMovable* movable) = 0;
00099   virtual int GetWatchedMovableCount () const = 0;
00101   virtual iMovable* GetMovable (int idx) = 0;
00102 
00104   virtual void Reset () = 0;
00105 
00117   virtual uint32 GetWatchNumber () const = 0;
00118 
00132   virtual int GetLastOperation () const = 0;
00133 
00138   virtual iLight* GetLastLight () const = 0;
00139 
00144   virtual iMovable* GetLastMovable () const = 0;
00145 
00150   virtual void AddListener (iObjectWatcherListener* cb) = 0;
00151 
00155   virtual void RemoveListener (iObjectWatcherListener* cb) = 0;
00156 };
00157 
00160 #endif // __CS_IENGINE_OBJWATCH_H__
00161 

Generated for Crystal Space by doxygen 1.2.18