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