Changeset 27
- Timestamp:
- 06/28/04 00:21:34 (4 years ago)
- Files:
-
- branches/0.1/src/dwt/conversion_notes.txt (modified) (1 diff)
- branches/0.1/src/dwt/graphics/gc.d (modified) (11 diffs)
- branches/0.1/src/dwt/graphics/image.d (modified) (14 diffs)
- branches/0.1/src/dwt/internal/win32/os.d (modified) (36 diffs)
- branches/0.1/src/dwt/internal/win32/types.d (modified) (4 diffs)
- branches/0.1/src/dwt/util/string.d (modified) (4 diffs)
- branches/0.1/src/dwt/util/thread.d (modified) (1 diff)
- branches/0.1/src/dwt/widgets/display.d (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.1/src/dwt/conversion_notes.txt
r25 r27 1 1 2 ================================================================== 2 3 3 4 System.arraycopy 4 5 - implemented in dwt.util.system 5 6 7 ================================================================== 8 6 9 a instanceof b 7 10 - if ( cast(b) a ) { is instance } else { is not } 11 12 ================================================================== 13 14 classes in Java become structs in D 15 16 See LOGFONT in dwt.internal.win32.types 17 18 ================================================================== 19 20 21 22 23 24 branches/0.1/src/dwt/graphics/gc.d
r24 r27 277 277 auto byte[] bmi = new byte[BITMAPINFOHEADER.sizeof + (OS.IsWinCE ? 12 : 0)]; 278 278 BITMAPINFOHEADER* bmiHeader = cast(BITMAPINFOHEADER*) &bmi[0]; 279 bmiHeader.biSize = BITMAPINFOHEADER.size ;279 bmiHeader.biSize = BITMAPINFOHEADER.sizeof; 280 280 bmiHeader.biWidth = width; 281 281 bmiHeader.biHeight = -height; … … 671 671 void drawBitmap(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, bit simple) { 672 672 BITMAP bm; 673 OS.GetObject(srcImage.handle, BITMAP.size , &bm);673 OS.GetObject(srcImage.handle, BITMAP.sizeof, &bm); 674 674 int imgWidth = bm.bmWidth; 675 675 int imgHeight = bm.bmHeight; … … 888 888 // Set the few fields necessary to get the RGB data out 889 889 // win32 is freaking scary: the colours go right after the bitmap info header in memory 890 auto byte[] buffer = new byte[BITMAPINFOHEADER.size + numColors * 4];890 auto byte[] buffer = new byte[BITMAPINFOHEADER.sizeof + numColors * 4]; 891 891 BITMAPINFOHEADER* bmiHeader = cast(BITMAPINFOHEADER*)&buffer[0]; 892 892 893 bmiHeader.biSize = BITMAPINFOHEADER.size ;893 bmiHeader.biSize = BITMAPINFOHEADER.sizeof; 894 894 bmiHeader.biPlanes = bm.bmPlanes; 895 895 bmiHeader.biBitCount = bm.bmBitsPixel; … … 1656 1656 /* Use GradientFill if supported, only on Windows 98, 2000 and newer */ 1657 1657 if (!OS.IsWinCE) { 1658 auto byte[] pMesh = new byte[GRADIENT_RECT.size + TRIVERTEX.size* 2];1658 auto byte[] pMesh = new byte[GRADIENT_RECT.sizeof + TRIVERTEX.sizeof * 2]; 1659 1659 GRADIENT_RECT* gradientRect = cast(GRADIENT_RECT*)pMesh; 1660 TRIVERTEX* trivertex = cast(TRIVERTEX*)(&pMesh[0] + GRADIENT_RECT.size );1660 TRIVERTEX* trivertex = cast(TRIVERTEX*)(&pMesh[0] + GRADIENT_RECT.sizeof); 1661 1661 1662 1662 /*int hHeap = OS.GetProcessHeap(); … … 2040 2040 int hPen = OS.GetCurrentObject(handle, OS.OBJ_PEN); 2041 2041 LOGPEN logPen; 2042 OS.GetObject(hPen, LOGPEN.size , &logPen);2042 OS.GetObject(hPen, LOGPEN.sizeof, &logPen); 2043 2043 switch (logPen.lopnStyle) { 2044 2044 case OS.PS_SOLID: return DWT.LINE_SOLID; … … 2067 2067 int hPen = OS.GetCurrentObject(handle, OS.OBJ_PEN); 2068 2068 LOGPEN logPen; 2069 OS.GetObject(hPen, LOGPEN.size , &logPen);2069 OS.GetObject(hPen, LOGPEN.sizeof, &logPen); 2070 2070 return logPen.lopnSize.x; 2071 2071 } … … 2354 2354 int hPen = OS.GetCurrentObject(handle, OS.OBJ_PEN); 2355 2355 LOGPEN logPen; 2356 OS.GetObject(hPen, LOGPEN.size , &logPen);2356 OS.GetObject(hPen, LOGPEN.sizeof, &logPen); 2357 2357 OS.SetTextColor(handle, color.handle); 2358 2358 int newPen = OS.CreatePen(logPen.lopnStyle, logPen.lopnSize.x, color.handle); … … 2388 2388 int hPen = OS.GetCurrentObject(handle, OS.OBJ_PEN); 2389 2389 LOGPEN logPen; 2390 OS.GetObject(hPen, LOGPEN.size , &logPen);2390 OS.GetObject(hPen, LOGPEN.sizeof, &logPen); 2391 2391 if (logPen.lopnStyle == style) return; 2392 2392 OS.SetBkMode (handle, style == OS.PS_SOLID ? OS.OPAQUE : OS.TRANSPARENT); … … 2413 2413 int hPen = OS.GetCurrentObject(handle, OS.OBJ_PEN); 2414 2414 LOGPEN logPen; 2415 OS.GetObject(hPen, LOGPEN.size , &logPen);2415 OS.GetObject(hPen, LOGPEN.sizeof, &logPen); 2416 2416 if (logPen.lopnSize.x == lineWidth) return; 2417 2417 int newPen = OS.CreatePen(logPen.lopnStyle, lineWidth, logPen.lopnColor); … … 2467 2467 wchar SPACE = ' '; 2468 2468 // OS.GetTextExtentPoint32(handle, SPACE, SPACE.length(), size); 2469 OS.GetTextExtentPoint32W(handle, &SPACE, wchar.size , &size);2469 OS.GetTextExtentPoint32W(handle, &SPACE, wchar.sizeof, &size); 2470 2470 return new Point(0, size.height); 2471 2471 } else { … … 2539 2539 SIZE size; 2540 2540 // OS.GetTextExtentPoint32(handle, SPACE, SPACE.length(), size); 2541 OS.GetTextExtentPoint32W(handle, &SPACE, wchar.size , &size);2541 OS.GetTextExtentPoint32W(handle, &SPACE, wchar.sizeof, &size); 2542 2542 return new Point(0, size.height); 2543 2543 } branches/0.1/src/dwt/graphics/image.d
r24 r27 284 284 this.type = srcImage.type; 285 285 286 auto byte[] buffer = new byte[BITMAPINFOHEADER.size + uint.size* 2]; // enough room for the header and two colour entries286 auto byte[] buffer = new byte[BITMAPINFOHEADER.sizeof + uint.sizeof * 2]; // enough room for the header and two colour entries 287 287 BITMAPINFOHEADER* bmih = cast(BITMAPINFOHEADER*)&buffer[0]; 288 uint* palette = cast(uint*)&buffer[0] + BITMAPINFOHEADER.size ;289 290 bmih.biSize = BITMAPINFOHEADER.size ;288 uint* palette = cast(uint*)&buffer[0] + BITMAPINFOHEADER.sizeof; 289 290 bmih.biSize = BITMAPINFOHEADER.sizeof; 291 291 bmih.biWidth = r.width; 292 292 bmih.biHeight = r.height; … … 789 789 auto byte[] bmi; 790 790 if (isDirect) { 791 bmi = new byte[BITMAPINFOHEADER.size + (useBitfields ? 12 : 0)];791 bmi = new byte[BITMAPINFOHEADER.sizeof + (useBitfields ? 12 : 0)]; 792 792 } else { 793 bmi = new byte[BITMAPINFOHEADER.size + rgbs.length * 4];793 bmi = new byte[BITMAPINFOHEADER.sizeof + rgbs.length * 4]; 794 794 } 795 795 796 796 BITMAPINFOHEADER* bmiHeader = cast(BITMAPINFOHEADER*) &bmi[0]; 797 bmiHeader.biSize = BITMAPINFOHEADER.size ;797 bmiHeader.biSize = BITMAPINFOHEADER.sizeof; 798 798 bmiHeader.biWidth = width; 799 799 bmiHeader.biHeight = -height; … … 943 943 // Compute the background color 944 944 BITMAP bm; 945 OS.GetObject(handle, BITMAP.size , &bm);945 OS.GetObject(handle, BITMAP.sizeof, &bm); 946 946 int hdcMem = OS.CreateCompatibleDC(hDC); 947 947 int hOldObject = OS.SelectObject(hdcMem, handle); … … 1014 1014 case DWT.BITMAP: 1015 1015 BITMAP bm; 1016 OS.GetObject(handle, BITMAP.size , &bm);1016 OS.GetObject(handle, BITMAP.sizeof, &bm); 1017 1017 return new Rectangle(0, 0, bm.bmWidth, bm.bmHeight); 1018 1018 … … 1026 1026 if (hBitmap == 0) hBitmap = info.hbmMask; 1027 1027 BITMAP bm; 1028 OS.GetObject(hBitmap, BITMAP.size , &bm);1028 OS.GetObject(hBitmap, BITMAP.sizeof, &bm); 1029 1029 if (hBitmap == info.hbmMask) bm.bmHeight /= 2; 1030 1030 if (info.hbmColor != 0) OS.DeleteObject(info.hbmColor); … … 1067 1067 if (hBitmap == 0) hBitmap = info.hbmMask; 1068 1068 1069 OS.GetObject(hBitmap, BITMAP.size , &bm);1069 OS.GetObject(hBitmap, BITMAP.sizeof, &bm); 1070 1070 depth = bm.bmPlanes * bm.bmBitsPixel; 1071 1071 width = bm.bmWidth; … … 1076 1076 // Create the BITMAPINFO 1077 1077 1078 auto byte[] bmi = new byte[BITMAPINFOHEADER.size + numColors * 4];1078 auto byte[] bmi = new byte[BITMAPINFOHEADER.sizeof + numColors * 4]; 1079 1079 BITMAPINFOHEADER* bmiHeader = cast(BITMAPINFOHEADER*)&bmi[0]; 1080 bmiHeader.biSize = BITMAPINFOHEADER.size ;1080 bmiHeader.biSize = BITMAPINFOHEADER.sizeof; 1081 1081 bmiHeader.biWidth = width; 1082 1082 bmiHeader.biHeight = -height; … … 1154 1154 1155 1155 // First color black, second color white 1156 int offset = BITMAPINFOHEADER.size ;1156 int offset = BITMAPINFOHEADER.sizeof; 1157 1157 bmi[offset + 4] = bmi[offset + 5] = bmi[offset + 6] = cast(byte)0xFF; 1158 1158 bmi[offset + 7] = 0; … … 1213 1213 case DWT.BITMAP: { 1214 1214 // Get the basic BITMAP information 1215 OS.GetObject(handle, BITMAP.size , &bm);1215 OS.GetObject(handle, BITMAP.sizeof, &bm); 1216 1216 depth = bm.bmPlanes * bm.bmBitsPixel; 1217 1217 width = bm.bmWidth; … … 1250 1250 if (isDib) { 1251 1251 dib = new DIBSECTION(); 1252 OS.GetObject(handle, DIBSECTION.size , dib);1252 OS.GetObject(handle, DIBSECTION.sizeof, dib); 1253 1253 } 1254 1254 // Calculate number of colors … … 1265 1265 BITMAPINFOHEADER* bmiHeader = null; 1266 1266 if (!isDib) { 1267 bmi = new byte[BITMAPINFOHEADER.size + numColors * 4];1267 bmi = new byte[BITMAPINFOHEADER.sizeof + numColors * 4]; 1268 1268 bmiHeader = cast(BITMAPINFOHEADER*)&bmi[0]; 1269 bmiHeader.biSize = BITMAPINFOHEADER.size ;1269 bmiHeader.biSize = BITMAPINFOHEADER.sizeof; 1270 1270 bmiHeader.biWidth = width; 1271 1271 bmiHeader.biHeight = -height; … … 1557 1557 auto byte[] bmi; 1558 1558 if (i.palette.isDirect) 1559 bmi = new byte[BITMAPINFOHEADER.size + (useBitfields ? 12 : 0)];1559 bmi = new byte[BITMAPINFOHEADER.sizeof + (useBitfields ? 12 : 0)]; 1560 1560 else 1561 bmi = new byte[BITMAPINFOHEADER.size + rgbs.length * 4];1561 bmi = new byte[BITMAPINFOHEADER.sizeof + rgbs.length * 4]; 1562 1562 1563 1563 BITMAPINFOHEADER* bmiHeader = cast(BITMAPINFOHEADER*)&bmi[0]; 1564 bmiHeader.biSize = BITMAPINFOHEADER.size ;1564 bmiHeader.biSize = BITMAPINFOHEADER.sizeof; 1565 1565 bmiHeader.biWidth = i.width; 1566 1566 bmiHeader.biHeight = -i.height; … … 1572 1572 1573 1573 // Set the rgb colors into the bitmap info 1574 int offset = BITMAPINFOHEADER.size ;1574 int offset = BITMAPINFOHEADER.sizeof; 1575 1575 if (i.palette.isDirect) { 1576 1576 if (useBitfields) { … … 1934 1934 // Change the background color in the image 1935 1935 BITMAP bm; 1936 OS.GetObject(handle, BITMAP.size , &bm);1936 OS.GetObject(handle, BITMAP.sizeof, &bm); 1937 1937 int hdcMem = OS.CreateCompatibleDC(hDC); 1938 1938 OS.SelectObject(hdcMem, handle); branches/0.1/src/dwt/internal/win32/os.d
r26 r27 29 29 import dwt.internal.win32.types; 30 30 } 31 32 //version = Unicode;33 31 34 32 public class OS { … … 45 43 static int IsSP; 46 44 static int IsDBLocale; 47 48 45 const int IsUnicode = 1; 49 50 46 static int WIN32_MAJOR, WIN32_MINOR; 51 47 … … 1396 1392 static int CreateFontIndirect (int lplf) { 1397 1393 if (IsUnicode) 1398 return CreateFontIndirectW (lplf);1394 return CreateFontIndirectW (cast(LOGFONTW*)lplf); 1399 1395 else 1400 return CreateFontIndirectA (lplf);1396 return CreateFontIndirectA (cast(LOGFONTA*)lplf); 1401 1397 } 1402 1398 1403 1399 static static int CreateFontIndirect (LOGFONT* lplf) { 1404 1400 if (IsUnicode) 1405 return CreateFontIndirectW (lplf);1401 return CreateFontIndirectW (cast(LOGFONTW*)lplf); 1406 1402 else 1407 return CreateFontIndirectA (lplf);1408 } 1409 1410 1411 1412 static int CreateWindowEx (int dwExStyle, TCHAR lpClassName, TCHAR lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hWndParent, int hMenu, int hInstance, CREATESTRUCT lpParam) {1403 return CreateFontIndirectA (cast(LOGFONTA*)lplf); 1404 } 1405 1406 1407 1408 static int CreateWindowEx (int dwExStyle, TCHAR lpClassName, TCHAR lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hWndParent, int hMenu, int hInstance, CREATESTRUCT* lpParam) { 1413 1409 if (IsUnicode) { 1414 1410 return CreateWindowExW (dwExStyle, w_str(lpClassName), w_str(lpWindowName), dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); … … 1440 1436 static int DragQueryFile (int hDrop, int iFile, TCHAR lpszFile, int cch) { 1441 1437 if (IsUnicode) { 1442 char [] lpszFile1 = lpszFile == null ? null : lpszFile.chars;1438 wchar* lpszFile1 = w_str(lpszFile); 1443 1439 return DragQueryFileW (hDrop, iFile, lpszFile1, cch); 1444 1440 } 1445 byte [] lpszFile1 = lpszFile == null ? null : lpszFile.bytes;1441 char* lpszFile1 = c_str(lpszFile); 1446 1442 return DragQueryFileA (hDrop, iFile, lpszFile1, cch); 1447 1443 } … … 1497 1493 static int ExtractIconEx (TCHAR lpszFile, int nIconIndex, int [] phiconLarge, int [] phiconSmall, int nIcons) { 1498 1494 if (IsUnicode) { 1499 char [] lpszFile1 = lpszFile == null ? null : lpszFile.chars;1495 wchar* lpszFile1 = w_str(lpszFile); 1500 1496 return ExtractIconExW (lpszFile1, nIconIndex, phiconLarge, phiconSmall, nIcons); 1501 1497 } 1502 byte [] lpszFile1 = lpszFile == null ? null : lpszFile.bytes;1498 char* lpszFile1 = c_str(lpszFile); 1503 1499 return ExtractIconExA (lpszFile1, nIconIndex, phiconLarge, phiconSmall, nIcons); 1504 1500 } … … 1506 1502 static bool ExtTextOut(int hdc, int X, int Y, int fuOptions, RECT* lprc, TCHAR lpString, int cbCount, int[] lpDx) { 1507 1503 if (IsUnicode) { 1508 char [] lpString1 = lpString == null ? null : lpString.chars;1504 wchar* lpString1 = w_str(lpString); 1509 1505 return ExtTextOutW (hdc, X, Y, fuOptions, lprc, lpString1, cbCount, lpDx); 1510 1506 } 1511 byte [] lpString1 = lpString == null ? null : lpString.bytes;1507 char* lpString1 = c_str(lpString); 1512 1508 return ExtTextOutA (hdc, X, Y, fuOptions, lprc, lpString1, cbCount, lpDx); 1513 1509 } … … 1515 1511 static int FindWindow (TCHAR lpClassName, TCHAR lpWindowName) { 1516 1512 if (IsUnicode) { 1517 char [] lpClassName1 = lpClassName == null ? null : lpClassName.chars;1518 char [] lpWindowName1 = lpWindowName == null ? null : lpWindowName.chars;1513 wchar* lpClassName1 = w_str(lpClassName); 1514 wchar* lpWindowName1 = w_str(lpWindowName); 1519 1515 return FindWindowW (lpClassName1, lpWindowName1); 1520 1516 } 1521 byte [] lpClassName1 = lpClassName == null ? null : lpClassName.bytes;1522 byte [] lpWindowName1 = lpWindowName == null ? null : lpWindowName.bytes;1517 char* lpClassName1 = c_str(lpClassName); 1518 char* lpWindowName1 = c_str(lpWindowName); 1523 1519 return FindWindowA (lpClassName1, lpWindowName1); 1524 1520 } … … 1530 1526 1531 1527 1532 static int GetCharacterPlacement (int hdc, TCHAR lpString, int nCount, int nMaxExtent, GCP_RESULTS lpResults, int dwFlags) {1533 if (IsUnicode) { 1534 char [] lpString1 = lpString == null ? null : lpString.chars;1528 static int GetCharacterPlacement (int hdc, TCHAR lpString, int nCount, int nMaxExtent, GCP_RESULTS* lpResults, int dwFlags) { 1529 if (IsUnicode) { 1530 wchar* lpString1 = w_str(lpString); 1535 1531 return GetCharacterPlacementW (hdc, lpString1, nCount, nMaxExtent, lpResults, dwFlags); 1536 1532 } 1537 byte [] lpString1 = lpString == null ? null : lpString.bytes;1533 char* lpString1 = c_str(lpString); 1538 1534 return GetCharacterPlacementA (hdc, lpString1, nCount, nMaxExtent, lpResults, dwFlags); 1539 1535 } … … 1557 1553 static int GetClipboardFormatName (int format, TCHAR lpszFormatName, int cchMaxCount) { 1558 1554 if (IsUnicode) { 1559 char [] lpszFormatName1 = lpszFormatName == null ? null : lpszFormatName.chars;1555 wchar* lpszFormatName1 = w_str(lpszFormatName); 1560 1556 return GetClipboardFormatNameW (format, lpszFormatName1, cchMaxCount); 1561 1557 } 1562 byte [] lpszFormatName1 = lpszFormatName == null ? null : lpszFormatName.bytes;1558 char* lpszFormatName1 = c_str(lpszFormatName); 1563 1559 return GetClipboardFormatNameA (format, lpszFormatName1, cchMaxCount); 1564 1560 } … … 1566 1562 static int GetKeyNameText (int lParam, TCHAR lpString, int nSize) { 1567 1563 if (IsUnicode) { 1568 char [] lpString1 = lpString == null ? null : lpString.chars;1564 wchar* lpString1 = w_str(lpString); 1569 1565 return GetKeyNameTextW (lParam, lpString1, nSize); 1570 1566 } 1571 byte [] lpString1 = lpString == null ? null : lpString.bytes;1567 char* lpString1 = c_str(lpString); 1572 1568 return GetKeyNameTextA (lParam, lpString1, nSize); 1573 1569 } … … 1595 1591 static int GetModuleHandle (TCHAR lpModuleName) { 1596 1592 if (IsUnicode) { 1597 char [] lpModuleName1 = lpModuleName == null ? null : lpModuleName.chars;1593 wchar* lpModuleName1 = w_str(lpModuleName); 1598 1594 return GetModuleHandleW (lpModuleName1); 1599 1595 } 1600 byte [] lpModuleName1 = lpModuleName == null ? null : lpModuleName.bytes;1596 char* lpModuleName1 = c_str(lpModuleName); 1601 1597 return GetModuleHandleA (lpModuleName1); 1602 1598 } … … 1617 1613 } 1618 1614 1619 static int GetObject (int hgdiobj, int cbBuffer, LOGBRUSH lpvObject) {1615 static int GetObject (int hgdiobj, int cbBuffer, LOGBRUSH* lpvObject) { 1620 1616 if (IsUnicode) return GetObjectW (hgdiobj, cbBuffer, lpvObject); 1621 1617 return GetObjectA (hgdiobj, cbBuffer, lpvObject); … … 1637 1633 1638 1634 1639 static bool GetOpenFileName (OPENFILENAME lpofn) {1635 static bool GetOpenFileName (OPENFILENAME* lpofn) { 1640 1636 if (IsUnicode) return GetOpenFileNameW (lpofn); 1641 1637 return GetOpenFileNameA (lpofn); … … 1644 1640 static int GetProfileString (TCHAR lpAppName, TCHAR lpKeyName, TCHAR lpDefault, TCHAR lpReturnedString, int nSize) { 1645 1641 if (IsUnicode) { 1646 char [] lpAppName1 = lpAppName == null ? null : lpAppName.chars;1647 char [] lpKeyName1 = lpKeyName == null ? null : lpKeyName.chars;1648 char [] lpDefault1 = lpDefault == null ? null : lpDefault.chars;1649 char [] lpReturnedString1 = lpReturnedString == null ? null : lpReturnedString.chars;1642 wchar* lpAppName1 = w_str(lpAppName); 1643 wchar* lpKeyName1 = w_str(lpKeyName); 1644 wchar* lpDefault1 = w_str(lpDefault); 1645 wchar* lpReturnedString1 = w_str(lpReturnedString); 1650 1646 return GetProfileStringW (lpAppName1, lpKeyName1, lpDefault1, lpReturnedString1, nSize); 1651 1647 } 1652 byte [] lpAppName1 = lpAppName == null ? null : lpAppName.bytes;1653 byte [] lpKeyName1 = lpKeyName == null ? null : lpKeyName.bytes;1654 byte [] lpDefault1 = lpDefault == null ? null : lpDefault.bytes;1655 byte [] lpReturnedString1 = lpReturnedString == null ? null : lpReturnedString.bytes;1648 char* lpAppName1 = c_str(lpAppName); 1649 char* lpKeyName1 = c_str(lpKeyName); 1650 char* lpDefault1 = c_str(lpDefault); 1651 char* lpReturnedString1 = c_str(lpReturnedString); 1656 1652 return GetProfileStringA (lpAppName1, lpKeyName1, lpDefault1, lpReturnedString1, nSize); 1657 1653 } 1658 1654 1659 static bool GetSaveFileName (OPENFILENAME lpofn) {1655 static bool GetSaveFileName (OPENFILENAME* lpofn) { 1660 1656 if (IsUnicode) return GetSaveFileNameW (lpofn); 1661 1657 return GetSaveFileNameA (lpofn); 1662 1658 } 1663 1659 1664 static bool GetTextExtentPoint32 (int hdc, TCHAR lpString, int cbString, SIZE lpSize) {1665 if (IsUnicode) { 1666 char [] lpString1 = lpString == null ? null : lpString.chars;1660 static bool GetTextExtentPoint32 (int hdc, TCHAR lpString, int cbString, SIZE* lpSize) { 1661 if (IsUnicode) { 1662 wchar* lpString1 = w_str(lpString); 1667 1663 return GetTextExtentPoint32W (hdc, lpString1, cbString, lpSize); 1668 1664 } 1669 byte [] lpString1 = lpString == null ? null : lpString.bytes;1665 char* lpString1 = c_str(lpString); 1670 1666 return GetTextExtentPoint32A (hdc, lpString1, cbString, lpSize); 1671 1667 } … … 1854 1850 } 1855 1851 1856 static int RegEnumKeyEx (int hKey, int dwIndex, TCHAR lpName, int [] lpcName, int [] lpReserved, TCHAR lpClass, int [] lpcClass, FILETIME lpftLastWriteTime) {1857 if (IsUnicode) { 1858 char [] lpName1 = lpName == null ? null : lpName.chars;1859 char [] lpClass1 = lpClass == null ? null : lpClass.chars;1852 static int RegEnumKeyEx (int hKey, int dwIndex, TCHAR lpName, int [] lpcName, int [] lpReserved, TCHAR lpClass, int [] lpcClass, FILETIME* lpftLastWriteTime) { 1853 if (IsUnicode) { 1854 wchar* lpName1 = w_str(lpName); 1855 wchar* lpClass1 = w_str(lpClass); 1860 1856 return RegEnumKeyExW (hKey, dwIndex, lpName1, lpcName, lpReserved, lpClass1, lpcClass, lpftLastWriteTime); 1861 1857 } 1862 byte [] lpName1 = lpName == null ? null : lpName.bytes;1863 byte [] lpClass1 = lpClass == null ? null : lpClass.bytes;1858 char* lpName1 = c_str(lpName); 1859 char* lpClass1 = c_str(lpClass); 1864 1860 return RegEnumKeyExA (hKey, dwIndex, lpName1, lpcName, lpReserved, lpClass1, lpcClass, lpftLastWriteTime); 1865 1861 } … … 1872 1868 static int RegisterClipboardFormat (TCHAR lpszFormat) { 1873 1869 if (IsUnicode) { 1874 char [] lpszFormat1 = lpszFormat == null ? null : lpszFormat.chars;1870 wchar* lpszFormat1 = w_str(lpszFormat); 1875 1871 return RegisterClipboardFormatW (lpszFormat1); 1876 1872 } 1877 byte [] lpszFormat1 = lpszFormat == null ? null : lpszFormat.bytes;1873 char* lpszFormat1 = c_str(lpszFormat); 1878 1874 return RegisterClipboardFormatA (lpszFormat1); 1879 1875 } … … 1881 1877 static int RegOpenKeyEx (int hKey, TCHAR lpSubKey, int ulOptions, int samDesired, int[] phkResult) { 1882 1878 if (IsUnicode) { 1883 char [] lpSubKey1 = lpSubKey == null ? null : lpSubKey.chars;1879 wchar* lpSubKey1 = w_str(lpSubKey); 1884 1880 return RegOpenKeyExW (hKey, lpSubKey1, ulOptions, samDesired, phkResult); 1885 1881 } 1886 byte [] lpSubKey1 = lpSubKey == null ? null : lpSubKey.bytes;1882 char* lpSubKey1 = c_str(lpSubKey); 1887 1883 return RegOpenKeyExA (hKey, lpSubKey1, ulOptions, samDesired, phkResult); 1888 1884 } … … 1895 1891 static int RegQueryValueEx (int hKey, TCHAR lpValueName, int lpReserved, int[] lpType, TCHAR lpData, int[] lpcbData) { 1896 1892 if (IsUnicode) { 1897 char [] lpValueName1 = lpValueName == null ? null : lpValueName.chars;1898 char [] lpData1 = lpData == null ? null : lpData.chars;1893 wchar* lpValueName1 = w_str(lpValueName); 1894 wchar* lpData1 = w_str(lpData); 1899 1895 return RegQueryValueExW (hKey, lpValueName1, lpReserved, lpType, lpData1, lpcbData); 1900 1896 } 1901 byte [] lpValueName1 = lpValueName == null ? null : lpValueName.bytes;1902 byte [] lpData1 = lpData == null ? null : lpData.bytes;1897 char* lpValueName1 = c_str(lpValueName); 1898 char* lpData1 = c_str(lpData); 1903 1899 return RegQueryValueExA (hKey, lpValueName1, lpReserved, lpType, lpData1, lpcbData); 1904 1900 } … … 1906 1902 static int SendMessage (int hWnd, int Msg, int wParam, TCHAR lParam) { 1907 1903 if (IsUnicode) { 1908 char [] lParam1 = lParam == null ? null : lParam.chars;1904 wchar* lParam1 = w_str(lParam); 1909 1905 return SendMessageW (hWnd, Msg, wParam, lParam1); 1910 1906 } 1911 byte [] lParam1 = lParam == null ? null : lParam.bytes;1907 char* lParam1 = c_str(lParam); 1912 1908 return SendMessageA (hWnd, Msg, wParam, lParam1); 1913 1909 } … … 2015 2011 static bool SetWindowText (int hWnd, TCHAR lpString) { 2016 2012 if (IsUnicode) { 2017 char [] lpString1 = lpString == null ? null : lpString.chars;2013 wchar* lpString1 = w_str(lpString); 2018 2014 return SetWindowTextW (hWnd, lpString1); 2019 2015 } 2020 byte [] lpString1 = lpString == null ? null : lpString.bytes;2016 char* lpString1 = c_str(lpString); 2021 2017 return SetWindowTextA (hWnd, lpString1); 2022 2018 } 2023 2019 2024 2020 static int SHBrowseForFolder (BROWSEINFO* lpbi) { 2025 if (IsUnicode) return SHBrowseForFolderW(lpbi);2021 if (IsUnicode) return SHBrowseForFolderW(lpbi); 2026 2022 return SHBrowseForFolderA (lpbi); 2027 2023 } 2028 2024 2029 2025 static bool ShellExecuteEx (SHELLEXECUTEINFO* lpExecInfo) { 2030 if (IsUnicode) return ShellExecuteExW (lpExecInfo);2026 if (IsUnicode) return ShellExecuteExW(lpExecInfo); 2031 2027 return ShellExecuteExA (lpExecInfo); 2032 2028 } … … 2034 2030 static bool SHGetPathFromIDList (int pidl, TCHAR pszPath) { 2035 2031 if (IsUnicode) { 2036 char [] pszPath1 = pszPath == null ? null : pszPath.chars;2032 wchar* pszPath1 = w_str(pszPath); 2037 2033 return SHGetPathFromIDListW (pidl, pszPath1); 2038 2034 } 2039 byte [] pszPath1 = pszPath == null ? null : pszPath.bytes;2035 char* pszPath1 = c_str(pszPath); 2040 2036 return SHGetPathFromIDListA (pidl, pszPath1); 2041 2037 } 2042 2038 2043 2039 static int StartDoc (int hdc, DOCINFO* lpdi) { 2044 if (IsUnicode) return StartDocW (hdc, lpdi);2040 if (IsUnicode) return StartDocW(hdc, lpdi); 2045 2041 return StartDocA (hdc, lpdi); 2046 2042 } 2047 2043 2048 2044 static bool SystemParametersInfo (int uiAction, int uiParam, RECT* pvParam, int fWinIni) { 2049 if (IsUnicode) return SystemParametersInfoW (uiAction, uiParam, pvParam, fWinIni);2045 if (IsUnicode) return SystemParametersInfoW(uiAction, uiParam, pvParam, fWinIni); 2050 2046 return SystemParametersInfoA (uiAction, uiParam, pvParam, fWinIni); 2051 2047 } 2052 2048 2053 static bool SystemParametersInfo (int uiAction, int uiParam, NONCLIENTMETRICS pvParam, int fWinIni) {2054 if (IsUnicode) return SystemParametersInfoW (uiAction, uiParam, cast(NONCLIENTMETRICSW )pvParam, fWinIni);2055 return SystemParametersInfoA (uiAction, uiParam, cast(NONCLIENTMETRICSA )pvParam, fWinIni);2049 static bool SystemParametersInfo (int uiAction, int uiParam, NONCLIENTMETRICS* pvParam, int fWinIni) { 2050 if (IsUnicode) return SystemParametersInfoW (uiAction, uiParam, cast(NONCLIENTMETRICSW*)pvParam, fWinIni); 2051 return SystemParametersInfoA (uiAction, uiParam, cast(NONCLIENTMETRICSA*)pvParam, fWinIni); 2056 2052 } 2057 2053 … … 2068 2064 static bool UnregisterClass (TCHAR lpClassName, int hInstance) { 2069 2065 if (IsUnicode) { 2070 char [] lpClassName1 = lpClassName == null ? null : lpClassName.chars;2071 return UnregisterClassW (lpClassName1, hInstance);2072 } 2073 byte [] lpClassName1 = lpClassName == null ? null : lpClassName.bytes;2066 wchar* lpClassName1 = w_str(lpClassName); 2067 return UnregisterClassW(lpClassName1, hInstance); 2068 } 2069 char* lpClassName1 = c_str(lpClassName); 2074 2070 return UnregisterClassA (lpClassName1, hInstance); 2075 2071 } … … 2164 2160 int DispatchMessageW (MSG lpmsg); 2165 2161 int DispatchMessageA (MSG lpmsg); 2162 // int DispatchMessageW (MSG* lpmsg); 2163 // int DispatchMessageA (MSG* lpmsg); 2166 2164 bool DragDetect (int hwnd, POINT pt); 2167 2165 void DragFinish (int hDrop); 2168 int DragQueryFileA (int hDrop, int iFile, byte[]lpszFile, int cch);2169 int DragQueryFileW (int hDrop, int iFile, char[]lpszFile, int cch);2166 int DragQueryFileA (int hDrop, int iFile, char* lpszFile, int cch); 2167 int DragQueryFileW (int hDrop, int iFile, wchar* lpszFile, int cch); 2170 2168 bool DrawEdge (int hdc, RECT* qrc, int edge, int grfFlags); 2171 2169 bool DrawFocusRect (int hDC, RECT* lpRect); … … 2196 2194 int ExpandEnvironmentStringsW (wchar* lpSrc, wchar* lsDst, int nSize); 2197 2195 int ExpandEnvironmentStringsA (char* lpSrc, char* lsDst, int nSize); 2198 bool ExtTextOutW(int hdc, int X, int Y, int fuOptions, RECT* lprc, wchar []lpString, int cbCount, int[] lpDx);2199 bool ExtTextOutA(int hdc, int X, int Y, int fuOptions, RECT* lprc, char []lpString, int cbCount, int[] lpDx);2196 bool ExtTextOutW(int hdc, int X, int Y, int fuOptions, RECT* lprc, wchar* lpString, int cbCount, int[] lpDx); 2197 bool ExtTextOutA(int hdc, int X, int Y, int fuOptions, RECT* lprc, char* lpString, int cbCount, int[] lpDx); 2200 2198 int ExtractIconExW (wchar* lpszFile, int nIconIndex, int [] phiconLarge, int [] phiconSmall, int nIcons); 2201 2199 int ExtractIconExA (char* lpszFile, int nIconIndex, int [] phiconLarge, int [] phiconSmall, int nIcons); … … 2211 2209 bool GetCharABCWidthsA (int hdc, int iFirstChar, int iLastChar, int [] lpabc); 2212 2210 bool GetCharABCWidthsW (int hdc, int iFirstChar, int iLastChar, int [] lpabc); 2213 //int GetCharacterPlacementW(int hdc, char[] lpString, int nCount, int nMaxExtent, GCP_RESULTSlpResults, int dwFlags);2214 //int GetCharacterPlacementA(int hdc, byte[] lpString, int nCount, int nMaxExtent, GCP_RESULTSlpResults, int dwFlags);2211 int GetCharacterPlacementW(int hdc, wchar* lpString, int nCount, int nMaxExtent, GCP_RESULTS* lpResults, int dwFlags); 2212 int GetCharacterPlacementA(int hdc, char* lpString, int nCount, int nMaxExtent, GCP_RESULTS* lpResults, int dwFlags); 2215 2213 bool GetCharWidthA (int hdc, int iFirstChar, int iLastChar, int [] lpBuffer); 2216 2214 bool GetCharWidthW (int hdc, int iFirstChar, int iLastChar, int [] lpBuffer); … … 2219 2217 bool GetClientRect (int hWnd, RECT* lpRect); 2220 2218 int GetClipboardData (int uFormat); 2221 int GetClipboardFormatNameA (int format, byte[]lpszFormatName, int cchMaxCount);2222 int GetClipboardFormatNameW (int format, char[]lpszFormatName, int cchMaxCount);2219 int GetClipboardFormatNameA (int format, char* lpszFormatName, int cchMaxCount); 2220 int GetClipboardFormatNameW (int format, wchar* lpszFormatName, int cchMaxCount); 2223 2221 int GetClipBox (int hdc, RECT* lprc); 2224 2222 int GetClipRgn (int hdc, int hrgn); … … 2273 2271 int GetObjectA (int hgdiobj, int cbBuffer, void* lpvObject); 2274 2272 int GetObjectW (int hgdiobj, int cbBuffer, void* lpvObject); 2275 /*int GetObjectA (int hgdiobj, int cbBuffer, BITMAPlpvObject);2276 int GetObjectW (int hgdiobj, int cbBuffer, BITMAP lpvObject);2273 int GetObjectA (int hgdiobj, int cbBuffer, BITMAP* lpvObject); 2274 int GetObjectW (int hgdiobj, int cbBuffer, BITMAP* lpvObject); 2277 2275 int GetObjectA (int hgdiobj, int cbBuffer, DIBSECTION* lpvObject); 2278 2276 int GetObjectW (int hgdiobj, int cbBuffer, DIBSECTION* lpvObject); 2279 int GetObjectA (int hgdiobj, int cbBuffer, LOGBRUSH lpvObject);2280 int GetObjectW (int hgdiobj, int cbBuffer, LOGBRUSH lpvObject);2281 int GetObjectA (int hgdiobj, int cbBuffer, LOGFONTA lpvObject);2282 int GetObjectW (int hgdiobj, int cbBuffer, LOGFONTW lpvObject);2283 int GetObjectA (int hgdiobj, int cbBuffer, LOGPEN lpvObject);2284 int GetObjectW (int hgdiobj, int cbBuffer, LOGPEN lpvObject);*/2285 //bool GetOpenFileNameW (OPENFILENAME* lpofn);2286 //bool GetOpenFileNameA (OPENFILENAME* lpofn);2277 int GetObjectA (int hgdiobj, int cbBuffer, LOGBRUSH* lpvObject); 2278 int GetObjectW (int hgdiobj, int cbBuffer, LOGBRUSH* lpvObject); 2279 int GetObjectA (int hgdiobj, int cbBuffer, LOGFONTA* lpvObject); 2280 int GetObjectW (int hgdiobj, int cbBuffer, LOGFONTW* lpvObject); 2281 int GetObjectA (int hgdiobj, int cbBuffer, LOGPEN* lpvObject); 2282 int GetObjectW (int hgdiobj, int cbBuffer, LOGPEN* lpvObject); 2283 bool GetOpenFileNameW (OPENFILENAME* lpofn); 2284 bool GetOpenFileNameA (OPENFILENAME* lpofn); 2287 2285 int GetPaletteEntries (int hPalette, int iStartIndex, int nEntries, byte[] logPalette); 2288 2286 int GetParent (int hWnd); … … 2295 2293 int GetRgnBox (int hrgn, RECT* lprc); 2296 2294 int GetROP2 (int hdc); 2297 //bool GetSaveFileNameW (OPENFILENAME* lpofn);2298 //bool GetSaveFileNameA (OPENFILENAME* lpofn);2295 bool GetSaveFileNameW (OPENFILENAME* lpofn); 2296 bool GetSaveFileNameA (OPENFILENAME* lpofn); 2299 2297 bool GetScrollInfo (int hwnd, int flags, SCROLLINFO* info); 2300 2298 int GetStockObject (int fnObject); … … 2362 2360 bool ImmSetOpenStatus (int hIMC, bool fOpen); 2363 2361 void InitCommonControls (); 2364 //bool InitCommonControlsEx (INITCOMMONCONTROLSEX lpInitCtrls);2362 bool InitCommonControlsEx (INITCOMMONCONTROLSEX lpInitCtrls); 2365 2363 bool InsertMenuW (int hMenu, int uPosition, int uFlags, int uIDNewItem, wchar* lpNewItem); 2366 2364 bool InsertMenuA (int hMenu, int uPosition, int uFlags, int uIDNewItem, char* lpNewItem); … … 2485 2483 int RegisterClassW (WNDCLASS* lpWndClass); 2486 2484 int RegisterClassA (WNDCLASS* lpWndClass); 2487 //int RegEnumKeyExW (int hKey, int dwIndex, wchar* lpName, int [] lpcName, int [] lpReserved, wchar* lpClass, int [] lpcClass, FILETIMElpftLastWriteTime);2488 int RegisterClipboardFormatA ( byte[]lpszFormat);2489 int RegisterClipboardFormatW ( char[]lpszFormat);2490 int RegOpenKeyExW (int hKey, char[]lpSubKey, int ulOptions, int samDesired, int[] phkResult);2485 int RegEnumKeyExW (int hKey, int dwIndex, wchar* lpName, int [] lpcName, int [] lpReserved, wchar* lpClass, int [] lpcClass, FILETIME* lpftLastWriteTime); 2486 int RegisterClipboardFormatA (char* lpszFormat); 2487 int RegisterClipboardFormatW (wchar* lpszFormat); 2488 int RegOpenKeyExW (int hKey, wchar* lpSubKey, int ulOptions, int samDesired, int[] phkResult); 2491 2489 int RegQueryInfoKeyW (int hKey, int lpClass, int[] lpcbClass, int lpReserved, int[] lpSubKeys, int[] lpcbMaxSubKeyLen, int[] lpcbMaxClassLen, int[] lpcValues, int[] lpcbMaxValueNameLen, int[] lpcbMaxValueLen, int[] lpcbSecurityDescriptor, int lpftLastWriteTime); 2492 int RegQueryValueExW (int hKey, char[]lpValueName, int lpReserved, int[] lpType, wchar* lpData, int[] lpcbData);2493 //int RegEnumKeyExA (int hKey, int dwIndex, char* lpName, int [] lpcName, int [] lpReserved, char* lpClass, int [] lpcClass, FILETIMElpftLastWriteTime);2494 int RegOpenKeyExA (int hKey, byte[]lpSubKey, int ulOptions, int samDesired, int[] phkResult);2490 int RegQueryValueExW (int hKey, wchar* lpValueName, int lpReserved, int[] lpType, wchar* lpData, int[] lpcbData); 2491 int RegEnumKeyExA (int hKey, int dwIndex, char* lpName, int [] lpcName, int [] lpReserved, char* lpClass, int [] lpcClass, FILETIME* lpftLastWriteTime); 2492 int RegOpenKeyExA (int hKey, char* lpSubKey, int ulOptions, int samDesired, int[] phkResult); 2495 2493 int RegQueryInfoKeyA (int hKey, int lpClass, int[] lpcbClass, int lpReserved, int[] lpSubKeys, int[] lpcbMaxSubKeyLen, int[] lpcbMaxClassLen, int[] lpcValues, int[] lpcbMaxValueNameLen, int[] lpcbMaxValueLen, int[] lpcbSecurityDescriptor, int lpftLastWriteTime); 2496 int RegQueryValueExA (int hKey, byte[]lpValueName, int lpReserved, int[] lpType, char* lpData, int[] lpcbData);2494 int RegQueryValueExA (int hKey, char* lpValueName, int lpReserved, int[] lpType, char* lpData, int[] lpcbData); 2497 2495 bool ReleaseCapture (); 2498 2496 int ReleaseDC (int hWnd, int hDC); … … 2505 2503 int SelectPalette(int hDC, int hpal, bool bForceBackground); 2506 2504 2507 int SendMessageW (int hWnd, int msg, int wparam, int lparam);2508 int SendMessageA (int hWnd, int msg, int wparam, int lparam);2505 // int SendMessageW (int hWnd, int msg, int wparam, int lparam); 2506 // int SendMessageA (int hWnd, int msg, int wparam, int lparam); 2509 2507 2510 2508 // D doesn't allow extern(Windows) functions to be overloaded in this manner 2511 /*int SendMessageW (int hWnd, int Msg, int [] wParam, int [] lParam); 2509 // /* 2510 int SendMessageW (int hWnd, int Msg, int [] wParam, int [] lParam); 2512 2511 int SendMessageW (int hWnd, int Msg, int [] wParam, int lParam); 2513 2512 int SendMessageW (int hWnd, int Msg, int wParam, wchar* lParam); … … 2515 2514 int SendMessageW (int hWnd, int Msg, int wParam, short [] lParam); 2516 2515 int SendMessageW (int hWnd, int Msg, int wParam, int lParam); 2517 int SendMessageW (int hWnd, int Msg, int wParam, LVCOLUMN lParam);2516 int SendMessageW (int hWnd, int Msg, int wParam, LVCOLUMN* lParam); 2518 2517 int SendMessageW (int hWnd, int Msg, int wParam, LVHITTESTINFO* lParam); 2519 int SendMessageW (int hWnd, int Msg, int wParam, LVITEM lParam);2518 int SendMessageW (int hWnd, int Msg, int wParam, LVITEM* lParam); 2520 2519 int SendMessageW (int hWnd, int Msg, int wParam, REBARBANDINFO* lParam); 2521 2520 int SendMessageW (int hWnd, int Msg, int wParam, RECT* lParam); 2522 int SendMessageW (int hWnd, int Msg, int wParam, TBBUTTON lParam);2521 int SendMessageW (int hWnd, int Msg, int wParam, TBBUTTON* lParam); 2523 2522 int SendMessageW (int hWnd, int Msg, int wParam, TBBUTTONINFO* lParam); 2524 int SendMessageW (int hWnd, int Msg, int wParam, TCITEM lParam);2523 int SendMessageW (int hWnd, int Msg, int wParam, TCITEM* lParam); 2525 2524 int SendMessageW (int hWnd, int Msg, int wParam, TOOLINFO* lParam); 2526 2525 int SendMessageW (int hWnd, int Msg, int wParam, TVHITTESTINFO* lParam); … … 2544 2543 int SendMessageA (int hWnd, int Msg, int wParam, TVHITTESTINFO* lParam); 2545 2544 int SendMessageA (int hWnd, int Msg, int wParam, TVINSERTSTRUCT* lParam); 2546 int SendMessageA (int hWnd, int Msg, int wParam, TVITEM* lParam);*/ 2545 int SendMessageA (int hWnd, int Msg, int wParam, TVITEM* lParam); 2546 // */ 2547 2547 2548 2548 int SetActiveWindow (int hWnd); … … 2584 2584 int SetWindowsHookExW (int idHook, int lpfn, int hMod, int dwThreadId); 2585 2585 int SetWindowsHookExA (int idHook, int lpfn, int hMod, int dwThreadId); 2586 //int SHBrowseForFolderW (BROWSEINFO* lpbi);2587 //int SHBrowseForFolderA (BROWSEINFO* lpbi);2588 bool SHCreateMenuBar(SHMENUBARINFO* pmb);2586 int SHBrowseForFolderW (BROWSEINFO* lpbi); 2587 int SHBrowseForFolderA (BROWSEINFO* lpbi); 2588 //bool SHCreateMenuBar(SHMENUBARINFO* pmb); 2589 2589 //bool SHHandleWMSettingChange (int hwnd, int wParam, int lParam, SHACTIVATEINFO* psai); 2590 2590 //int SHRecognizeGesture(SHRGINFO* shrg); 2591 2591 void SHSendBackToFocusWindow (int uMsg, int wp, int lp); 2592 2592 bool SHSipPreference (int hwnd, int st); 2593 //bool ShellExecuteExW (SHELLEXECUTEINFO* lpExecInfo);2594 //bool ShellExecuteExA (SHELLEXECUTEINFO* lpExecInfo);2593 bool ShellExecuteExW (SHELLEXECUTEINFO* lpExecInfo); 2594 bool ShellExecuteExA (SHELLEXECUTEINFO* lpExecInfo); 2595 2595 int SHGetMalloc (int [] ppMalloc); 2596 2596 bool SHGetPathFromIDListW (int pidl, wchar* pszPath); … … 2602 2602 bool ShowWindow (int hWnd, int nCmdShow); 2603 2603 //bool SipGetInfo (SIPINFO* pSipInfo); 2604 //int StartDocW (int hdc, DOCINFO* lpdi);2605 //int StartDocA (int hdc, DOCINFO* lpdi);2604 int StartDocW (int hdc, DOCINFO* lpdi); 2605 int StartDocA (int hdc, DOCINFO* lpdi); 2606 2606 int StartPage (int hdc); 2607 2607 bool StretchBlt (int hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, int hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, int dwRop); … … 2610 2610 int SystemParametersInfoW(int uiAction, int uiParam, int pvParam, int fWinIni); 2611 2611 2612 /*bool SystemParametersInfoW (int uiAction, int uiParam, RECT* pvParam, int fWinIni);2612 bool SystemParametersInfoW (int uiAction, int uiParam, RECT* pvParam, int fWinIni); 2613 2613 bool SystemParametersInfoA (int uiAction, int uiParam, RECT* pvParam, int fWinIni); 2614 2614 bool SystemParametersInfoW (int uiAction, int uiParam, NONCLIENTMETRICSW* pvParam, int fWinIni); 2615 2615 bool SystemParametersInfoA (int uiAction, int uiParam, NONCLIENTMETRICSA* pvParam, int fWinIni); 2616 2616 bool SystemParametersInfoW (int uiAction, int uiParam, int[] pvParam, int fWinIni); 2617 bool SystemParametersInfoA (int uiAction, int uiParam, int[] pvParam, int fWinIni); */2617 bool SystemParametersInfoA (int uiAction, int uiParam, int[] pvParam, int fWinIni); 2618 2618 2619 2619 int ToAscii (int uVirtKey, int uScanCode, char* lpKeyState, short [] lpChar, int uFlags); branches/0.1/src/dwt/internal/win32/types.d
r26 r27 108 108 } 109 109 110 struct LOGBRUSH { 110 111 111 int lbStyle; 112 112 int lbColor; … … 391 391 } 392 392 393 394 395 396 397 398 399 400 401 402 403 404 405 393 406 struct ACCEL { 394 407 byte fVirt; … … 487 500 alias LOGFONTA LOGFONT; 488 501 } 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 489 520 490 521 struct LOGFONTA { … … 527 558 528 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 529 598 // Yay D for not sucking 530 599 alias int LRESULT; branches/0.1/src/dwt/util/string.d
r15 r27 77 77 schar[] toString(uint u) //to a string of memory 78 78 { 79 schar[uint.size * 3] buffer;79 schar[uint.sizeof * 3] buffer; 80 80 int ndigits; 81 81 schar c; … … 104 104 if(s2.length < l) 105 105 l = s2.length; 106 result = memcmp(s1, s2, l * schar.size );106
