Changeset 113:f353be82b6be
- Timestamp:
- 02/10/08 21:42:25
(1 year ago)
- Author:
- John Reimer <terminal.node@gmail.com
- Children:
114:aa406905e538 115:640928daee8c
- branch:
- default
- Message:
More "static if" changes
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r48 |
r113 |
|
| 232 | 232 | if (width is 32 && height is 32) { |
|---|
| 233 | 233 | auto hInst = OS.GetModuleHandle(null); |
|---|
| 234 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 234 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 235 | 235 | handle = OS.CreateCursor(hInst, 5, 0, 32, 32, HAND_SOURCE.ptr, HAND_MASK.ptr); |
|---|
| 236 | 236 | |
|---|
| … | … | |
| 302 | 302 | /* Create the cursor */ |
|---|
| 303 | 303 | auto hInst = OS.GetModuleHandle(null); |
|---|
| 304 | | if (OS.IsWinCE) DWT.error (DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 304 | static if (OS.IsWinCE) DWT.error (DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 305 | 305 | handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, sourceData.ptr, maskData.ptr); |
|---|
| 306 | 306 | if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES); |
|---|
| … | … | |
| 397 | 397 | * put the flag back in. |
|---|
| 398 | 398 | */ |
|---|
| 399 | | if (!OS.IsWinCE) OS.DestroyCursor(handle); |
|---|
| | 399 | static if (!OS.IsWinCE) OS.DestroyCursor(handle); |
|---|
| 400 | 400 | } |
|---|
| 401 | 401 | handle = null; |
|---|
| r84 |
r113 |
|
| 196 | 196 | void checkGDIP() { |
|---|
| 197 | 197 | if (gdipToken) return; |
|---|
| 198 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 198 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 199 | 199 | int oldErrorMode = OS.SetErrorMode (OS.SEM_FAILCRITICALERRORS); |
|---|
| 200 | 200 | try { |
|---|
| … | … | |
| 674 | 674 | protected void init () { |
|---|
| 675 | 675 | if (debug_) { |
|---|
| 676 | | if (!OS.IsWinCE) OS.GdiSetBatchLimit(1); |
|---|
| | 676 | static if (!OS.IsWinCE) OS.GdiSetBatchLimit(1); |
|---|
| 677 | 677 | } |
|---|
| 678 | 678 | |
|---|
| 679 | 679 | /* Initialize scripts list */ |
|---|
| 680 | | if (!OS.IsWinCE) { |
|---|
| | 680 | static if (!OS.IsWinCE) { |
|---|
| 681 | 681 | SCRIPT_PROPERTIES** ppSp; |
|---|
| 682 | 682 | int piNumScripts; |
|---|
| … | … | |
| 703 | 703 | int numEntries = OS.GetDeviceCaps (hDC, OS.SIZEPALETTE); |
|---|
| 704 | 704 | |
|---|
| 705 | | if (OS.IsWinCE) { |
|---|
| | 705 | static if (OS.IsWinCE) { |
|---|
| 706 | 706 | /* |
|---|
| 707 | 707 | * Feature on WinCE. For some reason, certain 8 bit WinCE |
|---|
| r81 |
r113 |
|
| 554 | 554 | * BitBlt and invalidate the appropriate source area. |
|---|
| 555 | 555 | */ |
|---|
| 556 | | if (res is 0 && OS.IsWinCE) { |
|---|
| 557 | | OS.BitBlt(handle, destX, destY, width, height, handle, srcX, srcY, OS.SRCCOPY); |
|---|
| 558 | | if (paint) { |
|---|
| 559 | | int deltaX = destX - srcX, deltaY = destY - srcY; |
|---|
| 560 | | bool disjoint = (destX + width < srcX) || (srcX + width < destX) || (destY + height < srcY) || (srcY + height < destY); |
|---|
| 561 | | if (disjoint) { |
|---|
| 562 | | OS.InvalidateRect(hwnd, &lprcScroll, true); |
|---|
| 563 | | } else { |
|---|
| 564 | | if (deltaX !is 0) { |
|---|
| 565 | | int newX = destX - deltaX; |
|---|
| 566 | | if (deltaX < 0) newX = destX + width; |
|---|
| 567 | | OS.SetRect(&lprcScroll, newX, srcY, newX + Math.abs(deltaX), srcY + height); |
|---|
| | 556 | static if (OS.IsWinCE) { |
|---|
| | 557 | if (res is 0) { |
|---|
| | 558 | OS.BitBlt(handle, destX, destY, width, height, handle, srcX, srcY, OS.SRCCOPY); |
|---|
| | 559 | if (paint) { |
|---|
| | 560 | int deltaX = destX - srcX, deltaY = destY - srcY; |
|---|
| | 561 | bool disjoint = (destX + width < srcX) || (srcX + width < destX) || (destY + height < srcY) || (srcY + height < destY); |
|---|
| | 562 | if (disjoint) { |
|---|
| 568 | 563 | OS.InvalidateRect(hwnd, &lprcScroll, true); |
|---|
| 569 | | } |
|---|
| 570 | | if (deltaY !is 0) { |
|---|
| 571 | | int newY = destY - deltaY; |
|---|
| 572 | | if (deltaY < 0) newY = destY + height; |
|---|
| 573 | | OS.SetRect(&lprcScroll, srcX, newY, srcX + width, newY + Math.abs(deltaY)); |
|---|
| 574 | | OS.InvalidateRect(hwnd, &lprcScroll, true); |
|---|
| | 564 | } else { |
|---|
| | 565 | if (deltaX !is 0) { |
|---|
| | 566 | int newX = destX - deltaX; |
|---|
| | 567 | if (deltaX < 0) newX = destX + width; |
|---|
| | 568 | OS.SetRect(&lprcScroll, newX, srcY, newX + Math.abs(deltaX), srcY + height); |
|---|
| | 569 | OS.InvalidateRect(hwnd, &lprcScroll, true); |
|---|
| | 570 | } |
|---|
| | 571 | if (deltaY !is 0) { |
|---|
| | 572 | int newY = destY - deltaY; |
|---|
| | 573 | if (deltaY < 0) newY = destY + height; |
|---|
| | 574 | OS.SetRect(&lprcScroll, srcX, newY, srcX + width, newY + Math.abs(deltaY)); |
|---|
| | 575 | OS.InvalidateRect(hwnd, &lprcScroll, true); |
|---|
| | 576 | } |
|---|
| 575 | 577 | } |
|---|
| 576 | 578 | } |
|---|
| … | … | |
| 769 | 771 | * Polyline. |
|---|
| 770 | 772 | */ |
|---|
| 771 | | if (OS.IsWinCE) { |
|---|
| | 773 | static if (OS.IsWinCE) { |
|---|
| 772 | 774 | /* compute arc with a simple linear interpolation */ |
|---|
| 773 | 775 | if (arcAngle < 0) { |
|---|
| … | … | |
| 1058 | 1060 | /* Get the icon info */ |
|---|
| 1059 | 1061 | ICONINFO srcIconInfo; |
|---|
| 1060 | | if (OS.IsWinCE) { |
|---|
| | 1062 | static if (OS.IsWinCE) { |
|---|
| 1061 | 1063 | Image.GetIconInfo(srcImage, &srcIconInfo); |
|---|
| 1062 | 1064 | } else { |
|---|
| … | … | |
| 1110 | 1112 | bool stretch = !simple && (srcWidth !is destWidth || srcHeight !is destHeight); |
|---|
| 1111 | 1113 | if (stretch) { |
|---|
| 1112 | | if (!OS.IsWinCE) OS.SetStretchBltMode(dstHdc, OS.COLORONCOLOR); |
|---|
| | 1114 | static if (!OS.IsWinCE) OS.SetStretchBltMode(dstHdc, OS.COLORONCOLOR); |
|---|
| 1113 | 1115 | OS.StretchBlt(dstHdc, 0, 0, destWidth, destHeight, srcHdc, srcX, srcColorY, srcWidth, srcHeight, OS.SRCCOPY); |
|---|
| 1114 | 1116 | } else { |
|---|
| … | … | |
| 1337 | 1339 | auto oldTempBitmap = OS.SelectObject(tempHdc, tempDib); |
|---|
| 1338 | 1340 | if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { |
|---|
| 1339 | | if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); |
|---|
| | 1341 | static if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); |
|---|
| 1340 | 1342 | OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); |
|---|
| 1341 | 1343 | } else { |
|---|
| … | … | |
| 1348 | 1350 | } else { |
|---|
| 1349 | 1351 | if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { |
|---|
| 1350 | | if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); |
|---|
| | 1352 | static if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); |
|---|
| 1351 | 1353 | OS.StretchBlt(memHdc, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); |
|---|
| 1352 | 1354 | } else { |
|---|
| … | … | |
| 1413 | 1415 | OS.SelectClipRgn(handle, rgn); |
|---|
| 1414 | 1416 | int rop2 = 0; |
|---|
| 1415 | | if (!OS.IsWinCE) { |
|---|
| | 1417 | static if (!OS.IsWinCE) { |
|---|
| 1416 | 1418 | rop2 = OS.GetROP2(handle); |
|---|
| 1417 | 1419 | } else { |
|---|
| … | … | |
| 1422 | 1424 | if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { |
|---|
| 1423 | 1425 | int mode = 0; |
|---|
| 1424 | | if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); |
|---|
| | 1426 | static if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); |
|---|
| 1425 | 1427 | OS.StretchBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, dwRop); |
|---|
| 1426 | | if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); |
|---|
| | 1428 | static if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); |
|---|
| 1427 | 1429 | } else { |
|---|
| 1428 | 1430 | OS.BitBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, dwRop); |
|---|
| … | … | |
| 1459 | 1461 | if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { |
|---|
| 1460 | 1462 | int mode = 0; |
|---|
| 1461 | | if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); |
|---|
| | 1463 | static if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); |
|---|
| 1462 | 1464 | OS.StretchBlt(destHdc, x, y, destWidth, destHeight, srcHdc, srcX, srcColorY, srcWidth, srcHeight, OS.SRCINVERT); |
|---|
| 1463 | 1465 | OS.SelectObject(srcHdc, srcMask); |
|---|
| … | … | |
| 1465 | 1467 | OS.SelectObject(srcHdc, srcColor); |
|---|
| 1466 | 1468 | OS.StretchBlt(destHdc, x, y, destWidth, destHeight, srcHdc, srcX, srcColorY, srcWidth, srcHeight, OS.SRCINVERT); |
|---|
| 1467 | | if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); |
|---|
| | 1469 | static if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); |
|---|
| 1468 | 1470 | } else { |
|---|
| 1469 | 1471 | OS.BitBlt(destHdc, x, y, destWidth, destHeight, srcHdc, srcX, srcColorY, OS.SRCINVERT); |
|---|
| … | … | |
| 1499 | 1501 | if (isDib) { |
|---|
| 1500 | 1502 | /* Palette-based DIBSECTION */ |
|---|
| 1501 | | if (OS.IsWinCE) { |
|---|
| | 1503 | static if (OS.IsWinCE) { |
|---|
| 1502 | 1504 | byte* pBits = cast(byte*)bm.bmBits; |
|---|
| 1503 | 1505 | //OS.MoveMemory(pBits, bm.bmBits, 1); |
|---|
| … | … | |
| 1550 | 1552 | byte[] bmi = new byte[BITMAPINFOHEADER.sizeof + numColors * 4]; |
|---|
| 1551 | 1553 | bmi[] = (cast(byte*)&bmiHeader)[ 0 .. BITMAPINFOHEADER.sizeof ]; |
|---|
| 1552 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1554 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1553 | 1555 | OS.GetDIBits(srcHdc, srcImage.handle, 0, 0, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1554 | 1556 | int offset = BITMAPINFOHEADER.sizeof + 4 * srcImage.transparentPixel; |
|---|
| … | … | |
| 1611 | 1613 | OS.BitBlt(tempHdc, 0, 0, destWidth, destHeight, handle, destX, destY, OS.SRCCOPY); |
|---|
| 1612 | 1614 | if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { |
|---|
| 1613 | | if (!OS.IsWinCE) OS.SetStretchBltMode(tempHdc, OS.COLORONCOLOR); |
|---|
| | 1615 | static if (!OS.IsWinCE) OS.SetStretchBltMode(tempHdc, OS.COLORONCOLOR); |
|---|
| 1614 | 1616 | OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, OS.SRCINVERT); |
|---|
| 1615 | 1617 | OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, maskHdc, srcX, srcY, srcWidth, srcHeight, OS.SRCAND); |
|---|
| … | … | |
| 1638 | 1640 | auto oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle); |
|---|
| 1639 | 1641 | int rop2 = 0; |
|---|
| 1640 | | if (!OS.IsWinCE) { |
|---|
| | 1642 | static if (!OS.IsWinCE) { |
|---|
| 1641 | 1643 | rop2 = OS.GetROP2(handle); |
|---|
| 1642 | 1644 | } else { |
|---|
| … | … | |
| 1647 | 1649 | if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { |
|---|
| 1648 | 1650 | int mode = 0; |
|---|
| 1649 | | if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); |
|---|
| | 1651 | static if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); |
|---|
| 1650 | 1652 | OS.StretchBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, dwRop); |
|---|
| 1651 | | if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); |
|---|
| | 1653 | static if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); |
|---|
| 1652 | 1654 | } else { |
|---|
| 1653 | 1655 | OS.BitBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, dwRop); |
|---|
| … | … | |
| 1686 | 1688 | } |
|---|
| 1687 | 1689 | } |
|---|
| 1688 | | if (OS.IsWinCE) { |
|---|
| | 1690 | static if (OS.IsWinCE) { |
|---|
| 1689 | 1691 | int [] points = [x1, y1, x2, y2]; |
|---|
| 1690 | 1692 | OS.Polyline (handle, cast(POINT*)points.ptr, points.length / 2); |
|---|
| … | … | |
| 1986 | 1988 | if (data.lineWidth !is 0 && data.lineWidth % 2 is 0) x--; |
|---|
| 1987 | 1989 | } |
|---|
| 1988 | | if (OS.IsWinCE) { |
|---|
| | 1990 | static if (OS.IsWinCE) { |
|---|
| 1989 | 1991 | /* |
|---|
| 1990 | 1992 | * Bug in WinCE PPC. On certain devices, RoundRect does not draw |
|---|
| … | … | |
| 2177 | 2179 | } |
|---|
| 2178 | 2180 | int rop2 = 0; |
|---|
| 2179 | | if (OS.IsWinCE) { |
|---|
| | 2181 | static if (OS.IsWinCE) { |
|---|
| 2180 | 2182 | rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); |
|---|
| 2181 | 2183 | OS.SetROP2(handle, rop2); |
|---|
| … | … | |
| 2401 | 2403 | } |
|---|
| 2402 | 2404 | int rop2 = 0; |
|---|
| 2403 | | if (OS.IsWinCE) { |
|---|
| | 2405 | static if (OS.IsWinCE) { |
|---|
| 2404 | 2406 | rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); |
|---|
| 2405 | 2407 | OS.SetROP2(handle, rop2); |
|---|
| … | … | |
| 2518 | 2520 | * WinCE SDK. The fix is to emulate it by using Polygon. |
|---|
| 2519 | 2521 | */ |
|---|
| 2520 | | if (OS.IsWinCE) { |
|---|
| | 2522 | static if (OS.IsWinCE) { |
|---|
| 2521 | 2523 | /* compute arc with a simple linear interpolation */ |
|---|
| 2522 | 2524 | if (arcAngle < 0) { |
|---|
| … | … | |
| 2652 | 2654 | */ |
|---|
| 2653 | 2655 | int rop2 = 0; |
|---|
| 2654 | | if (OS.IsWinCE) { |
|---|
| | 2656 | static if (OS.IsWinCE) { |
|---|
| 2655 | 2657 | rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); |
|---|
| 2656 | 2658 | OS.SetROP2(handle, rop2); |
|---|
| … | … | |
| 2822 | 2824 | } |
|---|
| 2823 | 2825 | int rop2 = 0; |
|---|
| 2824 | | if (OS.IsWinCE) { |
|---|
| | 2826 | static if (OS.IsWinCE) { |
|---|
| 2825 | 2827 | rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); |
|---|
| 2826 | 2828 | OS.SetROP2(handle, rop2); |
|---|
| … | … | |
| 3268 | 3270 | public int getFillRule() { |
|---|
| 3269 | 3271 | if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 3270 | | if (OS.IsWinCE) return DWT.FILL_EVEN_ODD; |
|---|
| | 3272 | static if (OS.IsWinCE) return DWT.FILL_EVEN_ODD; |
|---|
| 3271 | 3273 | return OS.GetPolyFillMode(handle) is OS.WINDING ? DWT.FILL_WINDING : DWT.FILL_EVEN_ODD; |
|---|
| 3272 | 3274 | } |
|---|
| … | … | |
| 3614 | 3616 | if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 3615 | 3617 | int rop2 = 0; |
|---|
| 3616 | | if (OS.IsWinCE) { |
|---|
| | 3618 | static if (OS.IsWinCE) { |
|---|
| 3617 | 3619 | rop2 = OS.SetROP2 (handle, OS.R2_COPYPEN); |
|---|
| 3618 | 3620 | OS.SetROP2 (handle, rop2); |
|---|
| … | … | |
| 3692 | 3694 | } |
|---|
| 3693 | 3695 | POINT pt; |
|---|
| 3694 | | if (!OS.IsWinCE) OS.GetWindowOrgEx (handle, &pt); |
|---|
| | 3696 | static if (!OS.IsWinCE) OS.GetWindowOrgEx (handle, &pt); |
|---|
| 3695 | 3697 | return Gdip.Matrix_new(-1, 0, 0, 1, width + 2 * pt.x, 0); |
|---|
| 3696 | 3698 | } |
|---|
| … | … | |
| 4149 | 4151 | public void setFillRule(int rule) { |
|---|
| 4150 | 4152 | if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 4151 | | if (OS.IsWinCE) return; |
|---|
| | 4153 | static if (OS.IsWinCE) return; |
|---|
| 4152 | 4154 | int mode = OS.ALTERNATE; |
|---|
| 4153 | 4155 | switch (rule) { |
|---|
| r95 |
r113 |
|
| 269 | 269 | break; |
|---|
| 270 | 270 | case DWT.ICON: |
|---|
| 271 | | if (OS.IsWinCE) { |
|---|
| | 271 | static if (OS.IsWinCE) { |
|---|
| 272 | 272 | init(device, srcImage.data); |
|---|
| 273 | 273 | } else { |
|---|
| … | … | |
| 984 | 984 | */ |
|---|
| 985 | 985 | ICONINFO iconInfo; |
|---|
| 986 | | if (OS.IsWinCE) { |
|---|
| | 986 | static if (OS.IsWinCE) { |
|---|
| 987 | 987 | GetIconInfo(this, &iconInfo); |
|---|
| 988 | 988 | } else { |
|---|
| … | … | |
| 1054 | 1054 | if (memGC !is null) memGC.dispose(); |
|---|
| 1055 | 1055 | if (type is DWT.ICON) { |
|---|
| 1056 | | if (OS.IsWinCE) data = null; |
|---|
| | 1056 | static if (OS.IsWinCE) data = null; |
|---|
| 1057 | 1057 | OS.DestroyIcon (handle); |
|---|
| 1058 | 1058 | } else { |
|---|
| … | … | |
| 1114 | 1114 | int red = 0, green = 0, blue = 0; |
|---|
| 1115 | 1115 | if (bm.bmBitsPixel <= 8) { |
|---|
| 1116 | | if (OS.IsWinCE) { |
|---|
| | 1116 | static if (OS.IsWinCE) { |
|---|
| 1117 | 1117 | byte[1] pBits; |
|---|
| 1118 | 1118 | OS.MoveMemory(pBits.ptr, bm.bmBits, 1); |
|---|
| … | … | |
| 1186 | 1186 | return new Rectangle(0, 0, width = bm.bmWidth, height = bm.bmHeight); |
|---|
| 1187 | 1187 | case DWT.ICON: |
|---|
| 1188 | | if (OS.IsWinCE) { |
|---|
| | 1188 | static if (OS.IsWinCE) { |
|---|
| 1189 | 1189 | return new Rectangle(0, 0, width = data.width, height = data.height); |
|---|
| 1190 | 1190 | } else { |
|---|
| … | … | |
| 1226 | 1226 | switch (type) { |
|---|
| 1227 | 1227 | case DWT.ICON: { |
|---|
| 1228 | | if (OS.IsWinCE) return data; |
|---|
| | 1228 | static if (OS.IsWinCE) return data; |
|---|
| 1229 | 1229 | ICONINFO info; |
|---|
| 1230 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1230 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1231 | 1231 | OS.GetIconInfo(handle, &info); |
|---|
| 1232 | 1232 | /* Get the basic BITMAP information */ |
|---|
| … | … | |
| 1269 | 1269 | int imageSize; |
|---|
| 1270 | 1270 | /* Call with null lpBits to get the image size */ |
|---|
| 1271 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1271 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1272 | 1272 | OS.GetDIBits(hBitmapDC, hBitmap, 0, height, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1273 | 1273 | OS.MoveMemory(&bmiHeader, bmi.ptr, BITMAPINFOHEADER.sizeof); |
|---|
| … | … | |
| 1278 | 1278 | auto lpvBits = cast(byte*) OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize); |
|---|
| 1279 | 1279 | if (lpvBits is null) DWT.error(DWT.ERROR_NO_HANDLES); |
|---|
| 1280 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1280 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1281 | 1281 | OS.GetDIBits(hBitmapDC, hBitmap, 0, height, lpvBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1282 | 1282 | OS.MoveMemory(data.ptr, lpvBits, imageSize); |
|---|
| … | … | |
| 1305 | 1305 | if (info.hbmColor is null) { |
|---|
| 1306 | 1306 | /* Do the bottom half of the mask */ |
|---|
| 1307 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1307 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1308 | 1308 | OS.GetDIBits(hBitmapDC, hBitmap, height, height, lpvBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1309 | 1309 | OS.MoveMemory(maskData.ptr, lpvBits, imageSize); |
|---|
| … | … | |
| 1327 | 1327 | OS.SelectObject(hBitmapDC, info.hbmMask); |
|---|
| 1328 | 1328 | /* Call with null lpBits to get the image size */ |
|---|
| 1329 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1329 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1330 | 1330 | OS.GetDIBits(hBitmapDC, info.hbmMask, 0, height, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1331 | 1331 | OS.MoveMemory(&bmiHeader, bmi.ptr, BITMAPINFOHEADER.sizeof); |
|---|
| … | … | |
| 1334 | 1334 | auto lpvMaskBits = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize); |
|---|
| 1335 | 1335 | if (lpvMaskBits is null) DWT.error(DWT.ERROR_NO_HANDLES); |
|---|
| 1336 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1336 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1337 | 1337 | OS.GetDIBits(hBitmapDC, info.hbmMask, 0, height, lpvMaskBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1338 | 1338 | OS.MoveMemory(maskData.ptr, lpvMaskBits, imageSize); |
|---|
| … | … | |
| 1389 | 1389 | */ |
|---|
| 1390 | 1390 | auto handle = this.handle; |
|---|
| 1391 | | if (OS.IsWinCE) { |
|---|
| | 1391 | static if (OS.IsWinCE) { |
|---|
| 1392 | 1392 | if (!isDib) { |
|---|
| 1393 | 1393 | bool mustRestore = false; |
|---|
| … | … | |
| 1454 | 1454 | } else { |
|---|
| 1455 | 1455 | /* Call with null lpBits to get the image size */ |
|---|
| 1456 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1456 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1457 | 1457 | OS.GetDIBits(hBitmapDC, handle, 0, height, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1458 | 1458 | OS.MoveMemory(&bmiHeader, bmi.ptr, BITMAPINFOHEADER.sizeof); |
|---|
| … | … | |
| 1462 | 1462 | /* Get the bitmap data */ |
|---|
| 1463 | 1463 | if (isDib) { |
|---|
| 1464 | | if (OS.IsWinCE && this.handle !is handle) { |
|---|
| 1465 | | /* get image data from the temporary DIB */ |
|---|
| 1466 | | OS.MoveMemory(data.ptr, dib.bmBits, imageSize); |
|---|
| | 1464 | if (OS.IsWinCE) { |
|---|
| | 1465 | if (this.handle !is handle) { |
|---|
| | 1466 | /* get image data from the temporary DIB */ |
|---|
| | 1467 | OS.MoveMemory(data.ptr, dib.bmBits, imageSize); |
|---|
| | 1468 | } |
|---|
| 1467 | 1469 | } else { |
|---|
| 1468 | 1470 | OS.MoveMemory(data.ptr, bm.bmBits, imageSize); |
|---|
| … | … | |
| 1472 | 1474 | auto lpvBits = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize); |
|---|
| 1473 | 1475 | if (lpvBits is null) DWT.error(DWT.ERROR_NO_HANDLES); |
|---|
| 1474 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 1476 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 1475 | 1477 | OS.GetDIBits(hBitmapDC, handle, 0, height, lpvBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); |
|---|
| 1476 | 1478 | OS.MoveMemory(data.ptr, lpvBits, imageSize); |
|---|
| … | … | |
| 1482 | 1484 | RGB[] rgbs = new RGB[numColors]; |
|---|
| 1483 | 1485 | if (isDib) { |
|---|
| 1484 | | if (OS.IsWinCE) { |
|---|
| | 1486 | static if (OS.IsWinCE) { |
|---|
| 1485 | 1487 | /* |
|---|
| 1486 | 1488 | * Feature on WinCE. GetDIBColorTable is not supported. |
|---|
| … | … | |
| 1537 | 1539 | OS.RealizePalette(hBitmapDC); |
|---|
| 1538 | 1540 | } |
|---|
| 1539 | | if (OS.IsWinCE) { |
|---|
| | 1541 | static if (OS.IsWinCE) { |
|---|
| 1540 | 1542 | if (handle !is this.handle) { |
|---|
| 1541 | 1543 | /* free temporary DIB */ |
|---|
| … | … | |
| 1618 | 1620 | bmiHeader.biPlanes = 1; |
|---|
| 1619 | 1621 | bmiHeader.biBitCount = cast(short)depth; |
|---|
| 1620 | | if (OS.IsWinCE) bmiHeader.biCompression = OS.BI_BITFIELDS; |
|---|
| | 1622 | static if (OS.IsWinCE) bmiHeader.biCompression = OS.BI_BITFIELDS; |
|---|
| 1621 | 1623 | else bmiHeader.biCompression = OS.BI_RGB; |
|---|
| 1622 | 1624 | byte[] bmi = new byte[BITMAPINFOHEADER.sizeof + (OS.IsWinCE ? 12 : 0)]; |
|---|
| 1623 | 1625 | OS.MoveMemory(bmi.ptr, &bmiHeader, BITMAPINFOHEADER.sizeof); |
|---|
| 1624 | 1626 | /* Set the rgb colors into the bitmap info */ |
|---|
| 1625 | | if (OS.IsWinCE) { |
|---|
| | 1627 | static if (OS.IsWinCE) { |
|---|
| 1626 | 1628 | int redMask = 0xFF00; |
|---|
| 1627 | 1629 | int greenMask = 0xFF0000; |
|---|
| … | … | |
| 1873 | 1875 | image.handle = hIcon; |
|---|
| 1874 | 1876 | image.type = DWT.ICON; |
|---|
| 1875 | | if (OS.IsWinCE) image.data = i; |
|---|
| | 1877 | static if (OS.IsWinCE) image.data = i; |
|---|
| 1876 | 1878 | } |
|---|
| 1877 | 1879 | } else { |
|---|
| … | … | |
| 2086 | 2088 | * Note. Not implemented on WinCE. |
|---|
| 2087 | 2089 | */ |
|---|
| 2088 | | if (OS.IsWinCE) return; |
|---|
| | 2090 | static if (OS.IsWinCE) return; |
|---|
| 2089 | 2091 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 2090 | 2092 | if (color is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| … | … | |
| 2102 | 2104 | int maxColors = 1 << bm.bmBitsPixel; |
|---|
| 2103 | 2105 | byte[] colors = new byte[maxColors * 4]; |
|---|
| 2104 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 2106 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 2105 | 2107 | int numColors = OS.GetDIBColorTable(hdcMem, 0, maxColors, cast(RGBQUAD*)colors.ptr); |
|---|
| 2106 | 2108 | int offset = transparentPixel * 4; |
|---|
| … | … | |
| 2108 | 2110 | colors[offset + 1] = cast(byte)color.getGreen(); |
|---|
| 2109 | 2111 | colors[offset + 2] = cast(byte)color.getRed(); |
|---|
| 2110 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 2112 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 2111 | 2113 | OS.SetDIBColorTable(hdcMem, 0, numColors, cast(RGBQUAD*)colors.ptr); |
|---|
| 2112 | 2114 | OS.DeleteDC(hdcMem); |
|---|
| r48 |
r113 |
|
| 120 | 120 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 121 | 121 | if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 122 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 122 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 123 | 123 | auto polyRgn = OS.CreatePolygonRgn(cast(POINT*)pointArray.ptr, pointArray.length / 2, OS.ALTERNATE); |
|---|
| 124 | 124 | OS.CombineRgn (handle, handle, polyRgn, OS.RGN_OR); |
|---|
| … | … | |
| 468 | 468 | if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
|---|
| 469 | 469 | if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |
|---|
| 470 | | if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| | 470 | static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); |
|---|
| 471 | 471 | auto polyRgn = OS.CreatePolygonRgn(cast(POINT*)pointArray.ptr, pointArray.length / 2, OS.ALTERNATE); |
|---|
| 472 | 472 | OS.CombineRgn (handle, handle, polyRgn, OS.RGN_DIFF); |
|---|
| r33 |
r113 |
|
| 35 | 35 | this.style = style; |
|---|
| 36 | 36 | int flags = OS.ILC_MASK; |
|---|
| 37 | | if (OS.IsWinCE) { |
|---|
| | 37 | static if (OS.IsWinCE) { |
|---|
| 38 | 38 | flags |= OS.ILC_COLOR; |
|---|
| 39 | 39 | } else { |
|---|
| … | … | |
| 120 | 120 | //OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof); |
|---|
| 121 | 121 | /* Set the rgb colors into the bitmap info */ |
|---|
| 122 | | if (OS.IsWinCE) { |
|---|
| | 122 | static if (OS.IsWinCE) { |
|---|
| 123 | 123 | int redMask = 0xFF00; |
|---|
| 124 | 124 | int greenMask = 0xFF0000; |
|---|
| … | … | |
| 146 | 146 | OS.SelectObject (hdc2, hBitmap); |
|---|
| 147 | 147 | if (width !is bm.bmWidth || height !is bm.bmHeight) { |
|---|
| 148 | | if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); |
|---|
| | 148 | static if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); |
|---|
| 149 | 149 | OS.StretchBlt (hdc2, 0, 0, width, height, hdc1, 0, 0, bm.bmWidth, bm.bmHeight, OS.SRCCOPY); |
|---|
| 150 | 150 | } else { |
|---|
| … | … | |
| 242 | 242 | auto memHdc2 = OS.CreateCompatibleDC (hdc); |
|---|
| 243 | 243 | auto oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2); |
|---|
| 244 | | if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc2, OS.COLORONCOLOR); |
|---|
| | 244 | static if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc2, OS.COLORONCOLOR); |
|---|
| 245 | 245 | OS.StretchBlt (memHdc2, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); |
|---|
| 246 | 246 | OS.SelectObject (memHdc2, oldMemBitmap2); |
|---|
| … | … | |
| 280 | 280 | auto hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null); |
|---|
| 281 | 281 | OS.SelectObject (hdc2, hMask2); |
|---|
| 282 | | if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); |
|---|
| | 282 | static if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); |
|---|
| 283 | 283 | OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); |
|---|
| 284 | 284 | OS.DeleteDC (hdc1); |
|---|
| … | … | |
| 331 | 331 | OS.SelectObject (hdc2, hMask); |
|---|
| 332 | 332 | if (destWidth !is srcWidth || destHeight !is srcHeight) { |
|---|
| 333 | | if (!OS.IsWinCE) OS.SetStretchBltMode (hdc2, OS.COLORONCOLOR); |
|---|
| | 333 | static if (!OS.IsWinCE) OS.SetStretchBltMode (hdc2, OS.COLORONCOLOR); |
|---|
| 334 | 334 | OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); |
|---|
| 335 | 335 | } else { |
|---|
| … | … | |
| 448 | 448 | } |
|---|
| 449 | 449 | case DWT.ICON: { |
|---|
| 450 | | if (OS.IsWinCE) { |
|---|
| | 450 | static if (OS.IsWinCE) { |
|---|
| 451 | 451 | OS.ImageList_ReplaceIcon (handle, index is count ? -1 : index, hImage); |
|---|
| 452 | 452 | } else { |
|---|
| r98 |
r113 |
|
| 244 | 244 | case OS.WM_KEYDOWN: |
|---|
| 245 | 245 | case OS.WM_SYSKEYDOWN: { |
|---|
| 246 | | if (!OS.IsWinCE) { |
|---|
| | 246 | static if (!OS.IsWinCE) { |
|---|
| 247 | 247 | switch (msg.wParam) { |
|---|
| 248 | 248 | case OS.VK_SHIFT: |
|---|
| r108 |
r113 |
|
| 198 | 198 | OS.GetClientRect (handle, &clientRect); |
|---|
| 199 | 199 | if (OS.IntersectRect (&clientRect, &sourceRect, &clientRect)) { |
|---|
| 200 | | if (OS.IsWinCE) { |
|---|
| | 200 | static if (OS.IsWinCE) { |
|---|
| 201 | 201 | OS.UpdateWindow (handle); |
|---|
| 202 | 202 | } else { |
|---|
| … | … | |
| 207 | 207 | int deltaX = destX - x, deltaY = destY - y; |
|---|
| 208 | 208 | if (findImageControl () !is null) { |
|---|
| 209 | | if (OS.IsWinCE) { |
|---|
| | 209 | static if (OS.IsWinCE) { |
|---|
| 210 | 210 | OS.InvalidateRect (handle, &sourceRect, true); |
|---|
| 211 | 211 | } else { |
|---|
| … | … | |
| 215 | 215 | } |
|---|
| 216 | 216 | OS.OffsetRect (&sourceRect, deltaX, deltaY); |
|---|
| 217 | | if (OS.IsWinCE) { |
|---|
| | 217 | static if (OS.IsWinCE) { |
|---|
| 218 | 218 | OS.InvalidateRect (handle, &sourceRect, true); |
|---|
| 219 | 219 | } else { |
|---|
| r108 |
r113 |
|
| 1609 | 1609 | public void setOrientation (int orientation) { |
|---|
| 1610 | 1610 | checkWidget(); |
|---|
| 1611 | | if (OS.IsWinCE) return; |
|---|
| | 1611 | static if (OS.IsWinCE) return; |
|---|
| 1612 | 1612 | if (OS.WIN32_VERSION < OS.VERSION (4, 10)) return; |
|---|
| 1613 | 1613 | int flags = DWT.RIGHT_TO_LEFT | DWT.LEFT_TO_RIGHT; |
|---|
| … | … | |
| 2173 | 2173 | LRESULT result = super.WM_SIZE (wParam, lParam); |
|---|
| 2174 | 2174 | if (OS.IsWindowVisible (handle)) { |
|---|
| 2175 | | if (OS.IsWinCE) { |
|---|
| | 2175 | static if (OS.IsWinCE) { |
|---|
| 2176 | 2176 | auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); |
|---|
| 2177 | 2177 | if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); |
|---|
| r108 |
r113 |
|
| 761 | 761 | if (processID is OS.GetCurrentProcessId ()) { |
|---|
| 762 | 762 | if (display.msgHook is null) { |
|---|
| 763 | | if (!OS.IsWinCE) { |
|---|
| | 763 | static if (!OS.IsWinCE) { |
|---|
| 764 | 764 | //display.getMsgCallback = new Callback (display, "getMsgProc", 3); |
|---|
| 765 | 765 | //display.getMsgProc = display.getMsgCallback.getAddress (); |
|---|
| … | … | |
| 1138 | 1138 | /* Set the clipping bits */ |
|---|
| 1139 | 1139 | int oldBits = 0, newBits = 0; |
|---|
| 1140 | | if (!OS.IsWinCE) { |
|---|
| | 1140 | static if (!OS.IsWinCE) { |
|---|
| 1141 | 1141 | oldBits = OS.GetWindowLong (handle, OS.GWL_STYLE); |
|---|
| 1142 | 1142 | newBits = oldBits | OS.WS_CLIPSIBLINGS | OS.WS_CLIPCHILDREN; |
|---|
| … | … | |
| 1448 | 1448 | * redraw the non-client area. |
|---|
| 1449 | 1449 | */ |
|---|
| 1450 | | if (!OS.IsWinCE) { |
|---|
| | 1450 | static if (!OS.IsWinCE) { |
|---|
| 1451 | 1451 | int cmd = wParam & 0xFFF0; |
|---|
| 1452 | 1452 | switch (cmd) { |
|---|
| … | … | |
| 1503 | 1503 | |
|---|
| 1504 | 1504 | override LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { |
|---|
| 1505 | | if (!OS.IsWinCE) { |
|---|
| | 1505 | static if (!OS.IsWinCE) { |
|---|
| 1506 | 1506 | switch (hdr.code) { |
|---|
| 1507 | 1507 | /* |
|---|
| r108 |
r113 |
|
| 761 | 761 | */ |
|---|
| 762 | 762 | if (!OS.IsWindowVisible (handle)) return; |
|---|
| 763 | | if (OS.IsWinCE) { |
|---|
| | 763 | static if (OS.IsWinCE) { |
|---|
| 764 | 764 | OS.InvalidateRect (handle, null, true); |
|---|
| 765 | 765 | } else { |
|---|
| r108 |
r113 |
|
| 183 | 183 | void _setMaximized (bool maximized) { |
|---|
| 184 | 184 | swFlags = maximized ? OS.SW_SHOWMAXIMIZED : OS.SW_RESTORE; |
|---|
| 185 | | if (OS.IsWinCE) { |
|---|
| | 185 | static if (OS.IsWinCE) { |
|---|
| 186 | 186 | /* |
|---|
| 187 | 187 | * Note: WinCE does not support SW_SHOWMAXIMIZED and SW_RESTORE. The |
|---|
| … | … | |
| 213 | 213 | |
|---|
| 214 | 214 | void _setMinimized (bool minimized) { |
|---|
| 215 | | if (OS.IsWinCE) return; |
|---|
| | 215 | static if (OS.IsWinCE) return; |
|---|
| 216 | 216 | swFlags = minimized ? OS.SW_SHOWMINNOACTIVE : OS.SW_RESTORE; |
|---|
| 217 | 217 | if (!OS.IsWindowVisible (handle)) return; |
|---|
| … | … | |
| 261 | 261 | style &= ~(DWT.CLOSE | DWT.TITLE | DWT.MIN | DWT.MAX | DWT.RESIZE | DWT.BORDER); |
|---|
| 262 | 262 | } |
|---|
| 263 | | if (OS.IsWinCE) { |
|---|
| | 263 | static if (OS.IsWinCE) { |
|---|
| 264 | 264 | /* |
|---|
| 265 | 265 | * Feature in WinCE PPC. WS_MINIMIZEBOX or WS_MAXIMIZEBOX |
|---|
| … | … | |
| 457 | 457 | */ |
|---|
| 458 | 458 | if ((state & FOREIGN_HANDLE) is 0) { |
|---|
| 459 | | if (!OS.IsWinCE) { |
|---|
| | 459 | static if (!OS.IsWinCE) { |
|---|
| 460 | 460 | auto hIcon = OS.LoadIcon (null, cast(wchar*)OS.IDI_APPLICATION); |
|---|
| 461 | 461 | OS.SendMessage (handle, OS.WM_SETICON, OS.ICON_SMALL, hIcon); |
|---|
| … | … | |
| 521 | 521 | override public Rectangle getBounds () { |
|---|
| 522 | 522 | checkWidget (); |
|---|
| 523 | | if (!OS.IsWinCE) { |
|---|
| | 523 | static if (!OS.IsWinCE) { |
|---|
| 524 | 524 | if (OS.IsIconic (handle)) { |
|---|
| 525 | 525 | WINDOWPLACEMENT lpwndpl; |
|---|
| … | … | |
| 665 | 665 | override public Point getLocation () { |
|---|
| 666 | 666 | checkWidget (); |
|---|
| 667 | | if (!OS.IsWinCE) { |
|---|
| | 667 | static if (!OS.IsWinCE) { |
|---|
| 668 | 668 | if (OS.IsIconic (handle)) { |
|---|
| 669 | 669 | WINDOWPLACEMENT lpwndpl; |
|---|
| … | … | |
| 868 | 868 | |
|---|
| 869 | 869 | override void setBounds (int x, int y, int width, int height, int flags, bool defer) { |
|---|
| 870 | | if (OS.IsWinCE) { |
|---|
| | 870 | static if (OS.IsWinCE) { |
|---|
| 871 | 871 | swFlags = OS.SW_RESTORE; |
|---|
| 872 | 872 | } else { |
|---|
| … | … | |
| 989 | 989 | * On WinCE PPC, icons in windows are not displayed. |
|---|
| 990 | 990 | */ |
|---|
| 991 | | if (OS.IsWinCE) return; |
|---|
| | 991 | static if (OS.IsWinCE) return; |
|---|
| 992 | 992 | if (smallImage !is null) smallImage.dispose (); |
|---|
| 993 | 993 | if (largeImage !is null) largeImage.dispose (); |
|---|
| … | … | |
| 1066 | 1066 | * The fix is to force a redraw. |
|---|
| 1067 | 1067 | */ |
|---|
| 1068 | | if (!OS.IsWinCE) { |
|---|
| | 1068 | static if (!OS.IsWinCE) { |
|---|
| 1069 | 1069 | if (hSmallIcon is null && hLargeIcon is null && (style & DWT.BORDER) !is 0) { |
|---|
| 1070 | 1070 | int flags = OS.RDW_FRAME | OS.RDW_INVALIDATE; |
|---|
| r82 |
r113 |
|
| 654 | 654 | |
|---|
| 655 | 655 | int asciiKey (int key) { |
|---|
| 656 | | if (OS.IsWinCE) return 0; |
|---|
| | 656 | static if (OS.IsWinCE) return 0; |
|---|
| 657 | 657 | |
|---|
| 658 | 658 | /* Get the current keyboard. */ |
|---|
| … | … | |
| 1103 | 1103 | auto hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null); |
|---|
| 1104 | 1104 | OS.SelectObject (hdc2, hMask2); |
|---|
| 1105 | | if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); |
|---|
| | 1105 | static if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); |
|---|
| 1106 | 1106 | OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); |
|---|
| 1107 | 1107 | OS.DeleteDC (hdc1); |
|---|
| … | … | |
| 2318 | 2318 | if (systemFont !is null) return systemFont; |
|---|
| 2319 | 2319 | HFONT hFont; |
|---|
| 2320 | | if (!OS.IsWinCE) { |
|---|
| | 2320 | static if (!OS.IsWinCE) { |
|---|
| 2321 | 2321 | NONCLIENTMETRICS info; |
|---|
| 2322 | 2322 | info.cbSize = NONCLIENTMETRICS.sizeof; |
|---|
| … | … | |
| 2402 | 2402 | checkDevice (); |
|---|
| 2403 | 2403 | if (tray !is null) return tray; |
|---|
| 2404 | | if (!OS.IsWinCE) tray = new Tray (this, DWT.NONE); |
|---|
| | 2404 | static if (!OS.IsWinCE) tray = new Tray (this, DWT.NONE); |
|---|
| 2405 | 2405 | return tray; |
|---|
| 2406 | 2406 | } |
|---|
| … | … | |
| 2877 | 2877 | case OS.WM_KEYDOWN: |
|---|
| 2878 | 2878 | case OS.WM_SYSKEYDOWN: { |
|---|
| 2879 | | if (!OS.IsWinCE) { |
|---|
| | 2879 | static if (!OS.IsWinCE) { |
|---|
| 2880 | 2880 | switch (keyMsg.wParam) { |
|---|
| 2881 | 2881 | case OS.VK_SHIFT: |
|---|
| … | … | |
| 3249 | 3249 | case DWT.LF: return false; |
|---|
| 3250 | 3250 | default: { |
|---|
| 3251 | | if (OS.IsWinCE) { |
|---|
| | 3251 | static if (OS.IsWinCE) { |
|---|
| 3252 | 3252 | inputs.wVk = cast(int)OS.CharUpper (cast(wchar*) key); |
|---|
| 3253 | 3253 | } else { |
|---|
| … | … | |
| 3493 | 3493 | |
|---|
| 3494 | 3494 | /* Unhook the idle hook */ |
|---|
| 3495 | | if (!OS.IsWinCE) { |
|---|
| | 3495 | static if (!OS.IsWinCE) { |
|---|
| 3496 | 3496 | if (idleHook !is null) OS.UnhookWindowsHookEx (idleHook); |
|---|
| 3497 | 3497 | idleHook = null; |
|---|
| … | … | |
| 3869 | 3869 | } |
|---|
| 3870 | 3870 | if (systemFont !is null) { |
|---|
| 3871 | | if (!OS.IsWinCE) { |
|---|
| | 3871 | static if (!OS.IsWinCE) { |
|---|
| 3872 | 3872 | NONCLIENTMETRICS info; |
|---|
| 3873 | 3873 | info.cbSize = NONCLIENTMETRICS.sizeof; |
|---|
| … | … | |
| 4138 | 4138 | |
|---|
| 4139 | 4139 | int shiftedKey (int key) { |
|---|
| 4140 | | if (OS.IsWinCE) return 0; |
|---|
| | 4140 | static if (OS.IsWinCE) return 0; |
|---|
| 4141 | 4141 | |
|---|
| 4142 | 4142 | /* Clear the virtual keyboard and press the shift key */ |
|---|
| … | … | |
| 4403 | 4403 | |
|---|
| 4404 | 4404 | void wakeThread () { |
|---|
| 4405 | | if (OS.IsWinCE) { |
|---|
| | 4405 | static if (OS.IsWinCE) { |
|---|
| 4406 | 4406 | OS.PostMessage (hwndM |
|---|