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 00056 SCF_VERSION (iObjectWatcherListener, 0, 0, 1); 00057 00062 struct iObjectWatcherListener : public iBase 00063 { 00068 virtual void ObjectChanged (int op, iMovable* movable, iLight* light) = 0; 00069 }; 00070 00071 SCF_VERSION (iObjectWatcher, 0, 0, 1); 00072 00081 struct iObjectWatcher : public iBase 00082 { 00084 virtual void WatchLight (iLight* light) = 0; 00086 virtual void RemoveLight (iLight* light) = 0; 00088 virtual int GetWatchedLightCount () const = 0; 00090 virtual iLight* GetLight (int idx) = 0; 00091 00093 virtual void WatchMovable (iMovable* movable) = 0; 00095 virtual void RemoveMovable (iMovable* movable) = 0; 00097 virtual int GetWatchedMovableCount () const = 0; 00099 virtual iMovable* GetMovable (int idx) = 0; 00100 00102 virtual void Reset () = 0; 00103 00115 virtual uint32 GetWatchNumber () const = 0; 00116 00130 virtual int GetLastOperation () const = 0; 00131 00136 virtual iLight* GetLastLight () const = 0; 00137 00142 virtual iMovable* GetLastMovable () const = 0; 00143 00148 virtual void AddListener (iObjectWatcherListener* cb) = 0; 00149 00153 virtual void RemoveListener (iObjectWatcherListener* cb) = 0; 00154 }; 00155 00158 #endif // __CS_IENGINE_OBJWATCH_H__ 00159
Generated for Crystal Space by doxygen 1.2.18