Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
texture.h
Go to the documentation of this file.00001 /* 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 __CS_IENGINE_TEXTURE_H__ 00020 #define __CS_IENGINE_TEXTURE_H__ 00021 00028 #include "csutil/scf.h" 00029 #include "cstypes.h" 00030 00031 class csProcTexture; 00032 struct iImage; 00033 struct iTextureHandle; 00034 struct iTextureManager; 00035 struct iTextureWrapper; 00036 struct iObject; 00037 00038 SCF_VERSION (iTextureCallback, 0, 0, 1); 00039 00043 struct iTextureCallback : public iBase 00044 { 00046 virtual void UseTexture (iTextureWrapper* wrap) = 0; 00047 }; 00048 00049 SCF_VERSION (iTextureWrapper, 0, 1, 1); 00050 00078 struct iTextureWrapper : public iBase 00079 { 00081 virtual iObject *QueryObject() = 0; 00082 00084 virtual iTextureWrapper *Clone () const = 0; 00085 00090 virtual void SetImageFile (iImage *Image) = 0; 00092 virtual iImage* GetImageFile () = 0; 00093 00099 virtual void SetTextureHandle (iTextureHandle *tex) = 0; 00101 virtual iTextureHandle* GetTextureHandle () = 0; 00102 00104 virtual void SetKeyColor (int red, int green, int blue) = 0; 00106 virtual void GetKeyColor (int &red, int &green, int &blue) const = 0; 00107 00109 virtual void SetFlags (int flags) = 0; 00111 virtual int GetFlags () const = 0; 00112 00114 virtual void Register (iTextureManager *txtmng) = 0; 00115 00121 virtual void SetUseCallback (iTextureCallback* callback) = 0; 00122 00127 virtual iTextureCallback* GetUseCallback () const = 0; 00128 00134 virtual void Visit () = 0; 00135 00139 virtual bool IsVisitRequired () const = 0; 00140 00144 virtual void SetKeepImage (bool k) = 0; 00145 00151 virtual bool KeepImage () const = 0; 00152 00157 virtual void SetTextureClass (const char* className) = 0; 00162 virtual const char* GetTextureClass () = 0; 00163 }; 00164 00165 00166 SCF_VERSION (iTextureList, 0, 0, 1); 00167 00176 struct iTextureList : public iBase 00177 { 00179 virtual iTextureWrapper *NewTexture (iImage *image) = 0; 00180 00185 virtual iTextureWrapper *NewTexture (iTextureHandle *ith) = 0; 00186 00188 virtual int GetCount () const = 0; 00189 00191 virtual iTextureWrapper *Get (int n) const = 0; 00192 00194 virtual int Add (iTextureWrapper *obj) = 0; 00195 00197 virtual bool Remove (iTextureWrapper *obj) = 0; 00198 00200 virtual bool Remove (int n) = 0; 00201 00203 virtual void RemoveAll () = 0; 00204 00206 virtual int Find (iTextureWrapper *obj) const = 0; 00207 00209 virtual iTextureWrapper *FindByName (const char *Name) const = 0; 00210 }; 00211 00214 #endif // __CS_IENGINE_TEXTURE_H__
Generated for Crystal Space by doxygen 1.3.9.1