CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ivideo/custcursor.h

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 
00022 #include "csgfx/rgbpixel.h"
00023 #include "csutil/scf.h"
00024 #include "csgeom/cspoint.h"
00025 #include "igraphic/image.h"
00026 
00027 struct iGraphics3D;
00028 
00030 #define CSCURSOR_Default "default"
00031 
00032 #define CSCURSOR_MouseDown "MouseDown"
00033 
00034 SCF_VERSION (iCursor, 0, 0, 1);
00035 
00042 struct iCursor : public iBase
00043 {
00044   
00050   virtual bool Setup (iGraphics3D *, bool ForceEmulation = false) = 0;
00051 
00053   virtual bool ParseConfigFile (const char *) = 0;
00054 
00061   virtual void SetCursor (const char *name, iImage *image, csRGBcolor keycolor, 
00062                           csPoint hotspot = csPoint (0,0),
00063                             uint8 transparency = 0, 
00064                           csRGBcolor fg = csRGBcolor (255,255,255),
00065                           csRGBcolor bg = csRGBcolor (0,0,0)) = 0;
00066       
00068   virtual void SetHotSpot (const char *name, csPoint hotspot) = 0;
00069 
00076   virtual void SetTransparency(const char *name, uint8 transparancy) = 0;
00077   
00079   virtual void SetKeyColor (const char *name, csRGBcolor) = 0;
00080 
00085   virtual void SetColor (const char *name, csRGBcolor fg, csRGBcolor bg) = 0;
00086 
00093   virtual csRef<iImage> GetCursorImage (const char *name) const = 0;
00094 
00099   virtual csPoint GetHotSpot (const char *name) const = 0;
00100 
00106   virtual uint8 GetTransparency (const char *name) const = 0;
00107   
00112   virtual csRGBcolor GetKeyColor (const char *name) const = 0;
00113 
00119   virtual csRGBcolor GetFGColor (const char *name) const = 0;
00120 
00126   virtual csRGBcolor GetBGColor (const char *name) const = 0;
00127 
00129   virtual bool RemoveCursor (const char *name) = 0;
00130 
00132   virtual void RemoveAllCursors () = 0;
00133 
00141   virtual bool SwitchCursor (const char *name) = 0;
00142 };
00143 
00144 #endif //__CS_IVIDEO_CUSTCURSOR_H__

Generated for Crystal Space by doxygen 1.2.18