|
texture.h00001 /* 00002 Copyright (C) 1998, 2000 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 __IENGINE_TEXTURE_H__ 00020 #define __IENGINE_TEXTURE_H__ 00021 00022 #include "csutil/scf.h" 00023 #include "cstypes.h" 00024 00025 struct iImage; 00026 struct iTextureHandle; 00027 struct iTextureManager; 00028 struct iTextureWrapper; 00029 struct iObject; 00030 00031 SCF_VERSION (iTextureCallback, 0, 0, 1); 00032 00036 struct iTextureCallback : public iBase 00037 { 00039 virtual void UseTexture (iTextureWrapper* wrap) = 0; 00040 }; 00041 00042 SCF_VERSION (iTextureWrapper, 0, 0, 4); 00043 00050 struct iTextureWrapper : public iBase 00051 { 00053 virtual iObject *QueryObject() = 0; 00054 00056 virtual iTextureWrapper *Clone () const = 0; 00057 00062 virtual void SetImageFile (iImage *Image) = 0; 00064 virtual iImage* GetImageFile () = 0; 00065 00071 virtual void SetTextureHandle (iTextureHandle *tex) = 0; 00073 virtual iTextureHandle* GetTextureHandle () = 0; 00074 00076 virtual void SetKeyColor (int red, int green, int blue) = 0; 00078 virtual void GetKeyColor (int &red, int &green, int &blue) = 0; 00079 00081 virtual void SetFlags (int flags) = 0; 00083 virtual int GetFlags () = 0; 00084 00086 virtual void Register (iTextureManager *txtmng) = 0; 00087 00093 virtual void SetUseCallback (iTextureCallback* callback) = 0; 00094 00099 virtual iTextureCallback* GetUseCallback () = 0; 00100 00106 virtual void Visit () = 0; 00107 }; 00108 00109 00110 SCF_VERSION (iTextureList, 0, 0, 1); 00111 00115 struct iTextureList : public iBase 00116 { 00118 virtual iTextureWrapper *NewTexture (iImage *image) = 0; 00119 00124 virtual iTextureWrapper *NewTexture (iTextureHandle *ith) = 0; 00125 00127 virtual int GetCount () const = 0; 00128 00130 virtual iTextureWrapper *Get (int n) const = 0; 00131 00133 virtual int Add (iTextureWrapper *obj) = 0; 00134 00136 virtual bool Remove (iTextureWrapper *obj) = 0; 00137 00139 virtual bool Remove (int n) = 0; 00140 00142 virtual void RemoveAll () = 0; 00143 00145 virtual int Find (iTextureWrapper *obj) const = 0; 00146 00148 virtual iTextureWrapper *FindByName (const char *Name) const = 0; 00149 }; 00150 00151 #endif // __IENGINE_TEXTURE_H__ Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |