Changeset 23
- Timestamp:
- 02/18/08 18:21:35 (7 months ago)
- Files:
-
- trunk/win32/dfl/application.d (modified) (1 diff)
- trunk/win32/dfl/internal/_stdcwindows.d (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/win32/dfl/application.d
r7 r23 128 128 MENU_092 = 0x1, // Adding to menus is the old way. 129 129 CONTROL_RECREATE_095 = 0x2, // Controls don't recreate automatically when necessary. 130 CONTROL_KEYEVENT_096 = 0x4, // Key events don't propagate up the control hierarchy when they are not handled.130 CONTROL_KEYEVENT_096 = 0x4, // Nothing. 131 131 FORM_DIALOGRESULT_096 = 0x8, // When a Form is in showDialog, changing the dialogResult from NONE doesn't close the form. 132 132 } trunk/win32/dfl/internal/_stdcwindows.d
r5 r23 138 138 } 139 139 140 WORD HIWORD(int l) { return cast(WORD)((l >> 16) & 0xFFFF); } 141 WORD LOWORD(int l) { return cast(WORD)l; } 142 int FAILED(int status) { return status < 0; } 143 int SUCCEEDED(int Status) { return Status >= 0; } 140 extern(D) // These are macros anyway. 141 { 142 WORD HIWORD(int l) { return cast(WORD)((l >> 16) & 0xFFFF); } 143 WORD LOWORD(int l) { return cast(WORD)l; } 144 int FAILED(int status) { return status < 0; } 145 int SUCCEEDED(int Status) { return Status >= 0; } 146 } 144 147 145 148 enum : int … … 242 245 } 243 246 244 const DWORD MAILSLOT_NO_MESSAGE = cast(DWORD)-1; 245 const DWORD MAILSLOT_WAIT_FOREVER = cast(DWORD)-1; 247 extern(D) 248 { 249 const DWORD MAILSLOT_NO_MESSAGE = cast(DWORD)-1; 250 const DWORD MAILSLOT_WAIT_FOREVER = cast(DWORD)-1; 251 } 246 252 247 253 enum : uint … … 266 272 } 267 273 268 const HANDLE INVALID_HANDLE_VALUE = cast(HANDLE)-1; 269 const DWORD INVALID_SET_FILE_POINTER = cast(DWORD)-1; 270 const DWORD INVALID_FILE_SIZE = cast(DWORD)0xFFFFFFFF; 274 extern(D) 275 { 276 const HANDLE INVALID_HANDLE_VALUE = cast(HANDLE)-1; 277 const DWORD INVALID_SET_FILE_POINTER = cast(DWORD)-1; 278 const DWORD INVALID_FILE_SIZE = cast(DWORD)0xFFFFFFFF; 279 } 271 280 272 281 struct OVERLAPPED { … … 420 429 // 421 430 422 const int REG_CREATED_NEW_KEY = 0x00000001; // New Registry Key created 423 const int REG_OPENED_EXISTING_KEY = 0x00000002; // Existing Key opened 431 extern(D) 432 { 433 const int REG_CREATED_NEW_KEY = 0x00000001; // New Registry Key created 434 const int REG_OPENED_EXISTING_KEY = 0x00000002; // Existing Key opened 435 } 424 436 425 437 … … 509 521 int MessageBoxExA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType, WORD wLanguageId); 510 522 511 const HKEY HKEY_CLASSES_ROOT = cast(HKEY)(0x80000000); 512 const HKEY HKEY_CURRENT_USER = cast(HKEY)(0x80000001); 513 const HKEY HKEY_LOCAL_MACHINE = cast(HKEY)(0x80000002); 514 const HKEY HKEY_USERS = cast(HKEY)(0x80000003); 515 const HKEY HKEY_PERFORMANCE_DATA = cast(HKEY)(0x80000004); 516 517 const HKEY HKEY_CURRENT_CONFIG = cast(HKEY)(0x80000005); 518 const HKEY HKEY_DYN_DATA = cast(HKEY)(0x80000006); 523 extern(D) 524 { 525 const HKEY HKEY_CLASSES_ROOT = cast(HKEY)(0x80000000); 526 const HKEY HKEY_CURRENT_USER = cast(HKEY)(0x80000001); 527 const HKEY HKEY_LOCAL_MACHINE = cast(HKEY)(0x80000002); 528 const HKEY HKEY_USERS = cast(HKEY)(0x80000003); 529 const HKEY HKEY_PERFORMANCE_DATA = cast(HKEY)(0x80000004); 530 531 const HKEY HKEY_CURRENT_CONFIG = cast(HKEY)(0x80000005); 532 const HKEY HKEY_DYN_DATA = cast(HKEY)(0x80000006); 533 } 519 534 520 535 enum … … 2022 2037 } 2023 2038 2024 const LPSTR IDI_APPLICATION = cast(LPSTR)(32512); 2025 2026 const LPSTR IDC_ARROW = cast(LPSTR)(32512); 2027 const LPSTR IDC_CROSS = cast(LPSTR)(32515); 2039 extern(D) 2040 { 2041 const LPSTR IDI_APPLICATION = cast(LPSTR)(32512); 2042 2043 const LPSTR IDC_ARROW = cast(LPSTR)(32512); 2044 const LPSTR IDC_CROSS = cast(LPSTR)(32515); 2045 } 2028 2046 2029 2047 /* … … 2077 2095 } 2078 2096 2079 const int CW_USEDEFAULT = cast(int)0x80000000; 2080 /* 2081 * Special value for CreateWindow, et al. 2082 */ 2083 const HWND HWND_DESKTOP = (cast(HWND)0); 2097 extern(D) 2098 { 2099 const int CW_USEDEFAULT = cast(int)0x80000000; 2100 /* 2101 * Special value for CreateWindow, et al. 2102 */ 2103 const HWND HWND_DESKTOP = (cast(HWND)0); 2104 } 2084 2105 2085 2106 … … 2101 2122 2102 2123 2124 /+ 2103 2125 HWND CreateWindowA( 2104 2126 LPCSTR lpClassName, … … 2116 2138 return CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); 2117 2139 } 2140 +/ 2141 HWND CreateWindowA( 2142 LPCSTR lpClassName, 2143 LPCSTR lpWindowName, 2144 DWORD dwStyle, 2145 int X, 2146 int Y, 2147 int nWidth, 2148 int nHeight, 2149 HWND hWndParent , 2150 HMENU hMenu, 2151 HINSTANCE hInstance, 2152 LPVOID lpParam); 2153 2118 2154 2119 2155 /* … … 2516 2552 export HBITMAP LoadBitmapW(HINSTANCE hInstance, LPCWSTR lpBitmapName); 2517 2553 2518 LPSTR MAKEINTRESOURCEA(int i) { return cast(LPSTR)(cast(DWORD)(cast(WORD)(i))); } 2554 extern(D) // This is a macro anyway 2555 LPSTR MAKEINTRESOURCEA(int i) { return cast(LPSTR)(cast(DWORD)(cast(WORD)(i))); } 2519 2556 2520 2557 export HFONT CreateFontIndirectA(LOGFONTA *); … … 2672 2709 export BOOL CreateScalableFontResourceW(DWORD, LPCWSTR, LPCWSTR, LPCWSTR); 2673 2710 2711 extern(D) // This is a macro anyway. 2674 2712 COLORREF RGB(int r, int g, int b) 2675 2713 { … … 2707 2745 export int wsprintfW(LPWSTR, LPCWSTR, ...); 2708 2746 2709 const uint INFINITE = uint.max; 2710 const uint WAIT_OBJECT_0 = 0; 2747 extern(D) 2748 { 2749 const uint INFINITE = uint.max; 2750 const uint WAIT_OBJECT_0 = 0; 2751 } 2711 2752 2712 2753 export HANDLE CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCTSTR lpName);
