iengine/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 00029 #include "csutil/scf.h" 00030 00031 struct iImage; 00032 struct iObject; 00033 struct iTextureHandle; 00034 struct iTextureManager; 00035 struct iTextureWrapper; 00036 00043 struct iTextureCallback : public virtual iBase 00044 { 00045 SCF_INTERFACE(iTextureCallback, 2,0,0); 00047 virtual void UseTexture (iTextureWrapper* wrap) = 0; 00048 }; 00049 00073 struct iTextureWrapper : public virtual iBase 00074 { 00075 SCF_INTERFACE(iTextureWrapper, 2,0,0); 00077 virtual iObject *QueryObject() = 0; 00078 00080 virtual iTextureWrapper *Clone () const = 0; 00081 00086 virtual void SetImageFile (iImage *Image) = 0; 00088 virtual iImage* GetImageFile () = 0; 00089 00095 virtual void SetTextureHandle (iTextureHandle *tex) = 0; 00102 virtual iTextureHandle* GetTextureHandle () = 0; 00103 00105 virtual void SetKeyColor (int red, int green, int blue) = 0; 00107 virtual void GetKeyColor (int &red, int &green, int &blue) const = 0; 00108 00110 virtual void SetFlags (int flags) = 0; 00112 virtual int GetFlags () const = 0; 00113 00118 virtual void Register (iTextureManager *txtmng) = 0; 00119 00125 virtual void SetUseCallback (iTextureCallback* callback) = 0; 00126 00131 virtual iTextureCallback* GetUseCallback () const = 0; 00132 00138 virtual void Visit () = 0; 00139 00143 virtual bool IsVisitRequired () const = 0; 00144 00148 virtual void SetKeepImage (bool k) = 0; 00149 00155 virtual bool KeepImage () const = 0; 00156 00161 virtual void SetTextureClass (const char* className) = 0; 00166 virtual const char* GetTextureClass () = 0; 00167 }; 00168 00169 00176 struct iTextureList : public virtual iBase 00177 { 00178 SCF_INTERFACE (iTextureList, 1, 0, 0); 00179 00181 virtual iTextureWrapper *NewTexture (iImage *image) = 0; 00182 00187 virtual iTextureWrapper *NewTexture (iTextureHandle *ith) = 0; 00188 00190 virtual int GetCount () const = 0; 00191 00193 virtual iTextureWrapper *Get (int n) const = 0; 00194 00196 virtual int Add (iTextureWrapper *obj) = 0; 00197 00199 virtual bool Remove (iTextureWrapper *obj) = 0; 00200 00202 virtual bool Remove (int n) = 0; 00203 00205 virtual void RemoveAll () = 0; 00206 00208 virtual int Find (iTextureWrapper *obj) const = 0; 00209 00211 virtual iTextureWrapper *FindByName (const char *Name) const = 0; 00212 }; 00213 00216 #endif // __CS_IENGINE_TEXTURE_H__
Generated for Crystal Space 1.2 by doxygen 1.4.7