Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CAT/CATTypes.h Source File

CATTypes.h

Go to the documentation of this file.
00001 /// \file CATTypes.h
00002 /// \brief CAT Type definitions
00003 /// \ingroup CAT
00004 ///
00005 /// These types are meant to provide for an easy layer to abstract basic types
00006 /// for later port efforts.  For a single platform, I know, it's a pain, but the
00007 /// plan is to port the core to everywhere possible.
00008 ///
00009 /// Copyright (c) 2007-2008 by Michael Ellison.
00010 /// See COPYING.txt for the \ref gaslicense License (MIT License).
00011 ///
00012 // $Author: mikeellison $
00013 // $Date: 2008-01-25 05:11:25 -0600 (Fri, 25 Jan 2008) $
00014 // $Revision:   $
00015 // $NoKeywords: $
00016 
00017 #ifndef _CATTypes_H_
00018 #define _CATTypes_H_
00019 
00020 #include "CATConfig.h"
00021 
00022 #ifdef CAT_CONFIG_WIN32
00023     #define CATFONT          HFONT
00024     #define CATWND           HWND
00025     #define CATDRAWCONTEXT   HDC
00026     #define CATOSCURSOR      HCURSOR
00027     #define CATINSTANCE      HINSTANCE
00028     #define CATOSIMAGE       HBITMAP
00029     #define CATOSREGION      HRGN
00030     #define CATICON          HICON
00031 
00032     // WIN32 / MSVC compatible definitions
00033     typedef unsigned __int64 CATUInt64;     ///< 64-bit unsigned integer
00034     typedef __int64          CATInt64;      ///< 64-bit signed   integer
00035     typedef unsigned __int32 CATUInt32;     ///< 32-bit unsigned integer
00036     typedef __int32          CATInt32;      ///< 32-bit signed   integer
00037     typedef unsigned __int16 CATUInt16;     ///< 16-bit unsigned integer
00038     typedef __int16          CATInt16;      ///< 16-bit signed   integer
00039     typedef unsigned __int8  CATUInt8;      ///< 8-bit  unsigned integer
00040     typedef __int8           CATInt8;       ///< 8-bit  signed   integer
00041 
00042     typedef wchar_t          CATWChar;      ///< 16-bit Character
00043     typedef char             CATChar;       ///< 8-bit  Character
00044 
00045     typedef double           CATFloat64;    ///< 64-bit Float
00046     typedef float            CATFloat32;    ///< 32-bit Float
00047     typedef bool             CATBool;       ///< Boolean
00048 
00049 #pragma pack(push)
00050 #pragma pack(1)
00051 struct CATFileOffsetSplit
00052 {
00053     CATUInt32 lowOffset;
00054     CATUInt32 highOffset;
00055 };
00056 
00057 union CATFileOffset
00058 {
00059     CATInt64            qOffset;
00060     CATFileOffsetSplit  dOffset;
00061 };
00062 #pragma pack(pop)
00063 
00064     // --
00065 #else
00066     #pragma message("WARNING: Platform not defined. Check CATConfig.h")
00067 #endif // CAT_CONFIG_WIN32
00068 
00069 
00070 /// Key modifiers for mouse movements.
00071 enum
00072 {
00073     CATMODKEY_NONE  = 0,
00074     CATMODKEY_SHIFT = 1,
00075     CATMODKEY_CTRL  = 2,
00076     CATMODKEY_ALT   = 4
00077 };
00078 
00079 typedef CATInt32 CATMODKEY; ///< Modifier keys for mouse/actions
00080 
00081 
00082 #endif // _CATTypes_H_

Generated on Mon Feb 11 04:09:49 2008 for Game Accessibility Suite by doxygen 1.5.4