alt_windows.h

00001 //some common "things" that windows.h would normally declare that we need, but would rather not pull in windows.h which pollutes the namespace badly.
00002 
00003 #pragma once
00004 
00005 //some types and pseudo types
00006 #ifndef WINGDIAPI
00007     #define WINGDIAPI
00008 #endif
00009 
00010 #ifndef APIENTRY
00011     #define APIENTRY __stdcall
00012 #endif
00013 
00014 #ifndef CALLBACK
00015     #define CALLBACK __stdcall
00016 #endif
00017 
00018 #ifndef WINAPI
00019     #define WINAPI __stdcall
00020 #endif
00021 
00022 #ifndef DECLSPEC_IMPORT
00023     #define DECLSPEC_IMPORT __declspec(dllimport)
00024 #endif
00025 
00026 #ifndef WINUSERAPI
00027     #define WINUSERAPI DECLSPEC_IMPORT
00028 #endif
00029 
00030 struct HWND__ { int unused; }; typedef struct HWND__ *HWND;
00031 
00032 typedef unsigned int UINT;
00033 typedef unsigned char BYTE;
00034 typedef BYTE *PBYTE;
00035 
00036 //functions
00037 extern "C" WINUSERAPI bool WINAPI GetKeyboardState(PBYTE lpKeyState);
00038 
00039 //message constants
00040 #ifndef WM_CHAR
00041     #define WM_CHAR 0x102
00042     #define WM_KEYDOWN 0x100
00043     #define WM_KEYUP 0x101
00044     #define WM_MOUSEMOVE 0x200
00045     #define WM_LBUTTONDOWN 0x201
00046     #define WM_LBUTTONUP 0x202
00047     #define WM_MBUTTONDOWN 0x207
00048     #define WM_MBUTTONUP 0x208
00049     #define WM_RBUTTONDOWN 0x204
00050     #define WM_RBUTTONUP 0x205
00051     #define WM_XBUTTONDOWN 0x20B
00052     #define WM_XBUTTONUP 0x20C
00053     #define WM_MOUSEWHEEL 0x20A
00054 #endif
00055 
00056 //key constants
00057 #ifndef VK_BACK
00058     #define VK_BACK 0x08
00059     #define VK_TAB 0x09
00060     #define VK_CLEAR 0x0C
00061     #define VK_RETURN 0x0D
00062     #define VK_ESCAPE 0x1B
00063     #define VK_SPACE 0x20
00064     #define VK_PRIOR 0x21
00065     #define VK_NEXT 0x22
00066     #define VK_END 0x23
00067     #define VK_HOME 0x24
00068     #define VK_LEFT 0x25
00069     #define VK_UP 0x26
00070     #define VK_RIGHT 0x27
00071     #define VK_DOWN 0x28
00072     #define VK_INSERT 0x2D
00073     #define VK_DELETE 0x2E
00074     #define VK_NUMPAD0 0x60
00075     #define VK_NUMPAD1 0x61
00076     #define VK_NUMPAD2 0x62
00077     #define VK_NUMPAD3 0x63 
00078     #define VK_NUMPAD4 0x64
00079     #define VK_NUMPAD5 0x65
00080     #define VK_NUMPAD6 0x66
00081     #define VK_NUMPAD7 0x67
00082     #define VK_NUMPAD8 0x68
00083     #define VK_NUMPAD9 0x69
00084     #define VK_MULTIPLY 0x6A
00085     #define VK_ADD 0x6B
00086     #define VK_SEPARATOR 0x6C
00087     #define VK_SUBTRACT 0x6D
00088     #define VK_DECIMAL 0x6E
00089     #define VK_DIVIDE 0x6F
00090     #define VK_F1 0x70
00091     #define VK_F2 0x71
00092     #define VK_F3 0x72
00093     #define VK_F4 0x73
00094     #define VK_F5 0x74
00095     #define VK_F6 0x75
00096     #define VK_F7 0x76
00097     #define VK_F8 0x77
00098     #define VK_F9 0x78
00099     #define VK_F10 0x79
00100     #define VK_F11 0x7A
00101     #define VK_F12 0x7B
00102     #define VK_LSHIFT 0xA0
00103     #define VK_RSHIFT 0xA1
00104     #define VK_LCONTROL 0xA2
00105     #define VK_RCONTROL 0xA3
00106     #define VK_LMENU 0xA4
00107     #define VK_RMENU 0xA5
00108     #define VK_OEM_PLUS 0xBB
00109     #define VK_OEM_COMMA 0xBC
00110     #define VK_OEM_MINUS 0xBD
00111     #define VK_OEM_PERIOD 0xBE
00112     #define VK_OEM_1 0xBA
00113     #define VK_OEM_2 0xBF
00114     #define VK_OEM_3 0xC0
00115     #define VK_OEM_4 0xDB
00116     #define VK_OEM_5 0xDC
00117     #define VK_OEM_6 0xDD
00118     #define VK_OEM_7 0xDE
00119     #define VK_NUMPAD0 0x60
00120     #define VK_NUMPAD1 0x61
00121     #define VK_NUMPAD2 0x62
00122     #define VK_NUMPAD3 0x63 
00123     #define VK_NUMPAD4 0x64
00124     #define VK_NUMPAD5 0x65
00125     #define VK_NUMPAD6 0x66
00126     #define VK_NUMPAD7 0x67
00127     #define VK_NUMPAD8 0x68
00128     #define VK_NUMPAD9 0x69
00129 
00130     #define XBUTTON1 1
00131     #define XBUTTON2 2
00132 #endif

Generated on Sat Aug 9 15:05:05 2008 for MPMA Framework by  doxygen 1.5.6