CrystalSpace

Public API Reference

ivideo/custcursor.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C)2003 by Neil Mosafi
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Lesser 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_IVIDEO_CUSTCURSOR_H__
00020 #define __CS_IVIDEO_CUSTCURSOR_H__
00021 
00026 #include "csutil/scf.h"
00027 
00028 #include "csgfx/rgbpixel.h"
00029 #include "csgeom/vector2.h"
00030 
00031 struct iConfigFile;
00032 struct iGraphics3D;
00033 struct iImage;
00034 
00035 
00037 #define CSCURSOR_Default "default"
00038 
00039 #define CSCURSOR_MouseDown "MouseDown"
00040 
00041 SCF_VERSION (iCursor, 0, 1, 0);
00042 
00052 struct iCursor : public iBase
00053 {
00054   
00060   virtual bool Setup (iGraphics3D *, bool ForceEmulation = false) = 0;
00061 
00063   virtual bool ParseConfigFile (iConfigFile*) = 0;
00064 
00071   virtual void SetCursor (const char *name, iImage *image, 
00072     csRGBcolor* keycolor = 0, csVector2 hotspot = csVector2 (0,0),
00073     uint8 transparency = 0, csRGBcolor fg = csRGBcolor (255,255,255),
00074     csRGBcolor bg = csRGBcolor (0,0,0)) = 0;
00075       
00077   virtual void SetHotSpot (const char *name, csVector2 hotspot) = 0;
00078 
00085   virtual void SetTransparency(const char *name, uint8 transparancy) = 0;
00086   
00088   virtual void SetKeyColor (const char *name, csRGBcolor) = 0;
00089 
00094   virtual void SetColor (const char *name, csRGBcolor fg, csRGBcolor bg) = 0;
00095 
00102   virtual csRef<iImage> GetCursorImage (const char *name) const = 0;
00103 
00108   virtual csVector2 GetHotSpot (const char *name) const = 0;
00109 
00115   virtual uint8 GetTransparency (const char *name) const = 0;
00116   
00122   virtual const csRGBcolor* GetKeyColor (const char *name) const = 0;
00123 
00129   virtual csRGBcolor GetFGColor (const char *name) const = 0;
00130 
00136   virtual csRGBcolor GetBGColor (const char *name) const = 0;
00137 
00139   virtual bool RemoveCursor (const char *name) = 0;
00140 
00142   virtual void RemoveAllCursors () = 0;
00143 
00151   virtual bool SwitchCursor (const char *name) = 0;
00152 };
00153 
00154 #endif //__CS_IVIDEO_CUSTCURSOR_H__

Generated for Crystal Space by doxygen 1.4.6