Changeset 115:640928daee8c

Show
Ignore:
Timestamp:
02/10/08 22:05:55 (1 year ago)
Author:
Frank Benoit <benoit@tionex.de>
Children:

116:a0366718e047 117:25f88bf5a6df

branch:
default
Message:

Revert the reverting changes
Backed out changeset f353be82b6be

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/graphics/Cursor.d

    r113 r115  
    232232        if (width is 32 && height is 32) { 
    233233            auto hInst = OS.GetModuleHandle(null); 
    234             static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     234            if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    235235            handle = OS.CreateCursor(hInst, 5, 0, 32, 32, HAND_SOURCE.ptr, HAND_MASK.ptr); 
    236236 
     
    302302    /* Create the cursor */ 
    303303    auto hInst = OS.GetModuleHandle(null); 
    304     static if (OS.IsWinCE) DWT.error (DWT.ERROR_NOT_IMPLEMENTED); 
     304    if (OS.IsWinCE) DWT.error (DWT.ERROR_NOT_IMPLEMENTED); 
    305305    handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, sourceData.ptr, maskData.ptr); 
    306306    if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES); 
     
    397397        * put the flag back in. 
    398398        */ 
    399         static if (!OS.IsWinCE) OS.DestroyCursor(handle); 
     399        if (!OS.IsWinCE) OS.DestroyCursor(handle); 
    400400    } 
    401401    handle = null; 
  • dwt/graphics/Device.d

    r113 r115  
    196196void checkGDIP() { 
    197197    if (gdipToken) return; 
    198     static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     198    if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    199199    int oldErrorMode = OS.SetErrorMode (OS.SEM_FAILCRITICALERRORS); 
    200200    try { 
     
    674674protected void init () { 
    675675    if (debug_) { 
    676         static if (!OS.IsWinCE) OS.GdiSetBatchLimit(1); 
     676        if (!OS.IsWinCE) OS.GdiSetBatchLimit(1); 
    677677    } 
    678678 
    679679    /* Initialize scripts list */ 
    680     static if (!OS.IsWinCE) { 
     680    if (!OS.IsWinCE) { 
    681681        SCRIPT_PROPERTIES** ppSp; 
    682682        int piNumScripts; 
     
    703703    int numEntries = OS.GetDeviceCaps (hDC, OS.SIZEPALETTE); 
    704704 
    705     static if (OS.IsWinCE) { 
     705    if (OS.IsWinCE) { 
    706706        /* 
    707707        * Feature on WinCE.  For some reason, certain 8 bit WinCE 
  • dwt/graphics/GC.d

    r113 r115  
    554554        * BitBlt and invalidate the appropriate source area. 
    555555        */ 
    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) { 
     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); 
    563568                        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                         } 
     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); 
    577575                    } 
    578576                } 
     
    771769    * Polyline. 
    772770    */ 
    773     static if (OS.IsWinCE) { 
     771    if (OS.IsWinCE) { 
    774772        /* compute arc with a simple linear interpolation */ 
    775773        if (arcAngle < 0) { 
     
    10601058    /* Get the icon info */ 
    10611059    ICONINFO srcIconInfo; 
    1062     static if (OS.IsWinCE) { 
     1060    if (OS.IsWinCE) { 
    10631061        Image.GetIconInfo(srcImage, &srcIconInfo); 
    10641062    } else { 
     
    11121110            bool stretch = !simple && (srcWidth !is destWidth || srcHeight !is destHeight); 
    11131111            if (stretch) { 
    1114                 static if (!OS.IsWinCE) OS.SetStretchBltMode(dstHdc, OS.COLORONCOLOR); 
     1112                if (!OS.IsWinCE) OS.SetStretchBltMode(dstHdc, OS.COLORONCOLOR); 
    11151113                OS.StretchBlt(dstHdc, 0, 0, destWidth, destHeight, srcHdc, srcX, srcColorY, srcWidth, srcHeight, OS.SRCCOPY); 
    11161114            } else { 
     
    13391337        auto oldTempBitmap = OS.SelectObject(tempHdc, tempDib); 
    13401338        if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { 
    1341             static if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); 
     1339            if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); 
    13421340            OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); 
    13431341        } else { 
     
    13501348    } else { 
    13511349        if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { 
    1352             static if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); 
     1350            if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc, OS.COLORONCOLOR); 
    13531351            OS.StretchBlt(memHdc, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); 
    13541352        } else { 
     
    14151413    OS.SelectClipRgn(handle, rgn); 
    14161414    int rop2 = 0; 
    1417     static if (!OS.IsWinCE) { 
     1415    if (!OS.IsWinCE) { 
    14181416        rop2 = OS.GetROP2(handle); 
    14191417    } else { 
     
    14241422    if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { 
    14251423        int mode = 0; 
    1426         static if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); 
     1424        if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); 
    14271425        OS.StretchBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, dwRop); 
    1428         static if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); 
     1426        if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); 
    14291427    } else { 
    14301428        OS.BitBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, dwRop); 
     
    14611459    if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { 
    14621460        int mode = 0; 
    1463         static if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); 
     1461        if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); 
    14641462        OS.StretchBlt(destHdc, x, y, destWidth, destHeight, srcHdc, srcX, srcColorY, srcWidth, srcHeight, OS.SRCINVERT); 
    14651463        OS.SelectObject(srcHdc, srcMask); 
     
    14671465        OS.SelectObject(srcHdc, srcColor); 
    14681466        OS.StretchBlt(destHdc, x, y, destWidth, destHeight, srcHdc, srcX, srcColorY, srcWidth, srcHeight, OS.SRCINVERT); 
    1469         static if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); 
     1467        if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); 
    14701468    } else { 
    14711469        OS.BitBlt(destHdc, x, y, destWidth, destHeight, srcHdc, srcX, srcColorY, OS.SRCINVERT); 
     
    15011499        if (isDib) { 
    15021500            /* Palette-based DIBSECTION */ 
    1503             static if (OS.IsWinCE) { 
     1501            if (OS.IsWinCE) { 
    15041502                byte* pBits = cast(byte*)bm.bmBits; 
    15051503                //OS.MoveMemory(pBits, bm.bmBits, 1); 
     
    15521550            byte[] bmi = new byte[BITMAPINFOHEADER.sizeof + numColors * 4]; 
    15531551            bmi[] = (cast(byte*)&bmiHeader)[ 0 .. BITMAPINFOHEADER.sizeof ]; 
    1554             static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1552            if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    15551553            OS.GetDIBits(srcHdc, srcImage.handle, 0, 0, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    15561554            int offset = BITMAPINFOHEADER.sizeof + 4 * srcImage.transparentPixel; 
     
    16131611            OS.BitBlt(tempHdc, 0, 0, destWidth, destHeight, handle, destX, destY, OS.SRCCOPY); 
    16141612            if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { 
    1615                 static if (!OS.IsWinCE) OS.SetStretchBltMode(tempHdc, OS.COLORONCOLOR); 
     1613                if (!OS.IsWinCE) OS.SetStretchBltMode(tempHdc, OS.COLORONCOLOR); 
    16161614                OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, OS.SRCINVERT); 
    16171615                OS.StretchBlt(tempHdc, 0, 0, destWidth, destHeight, maskHdc, srcX, srcY, srcWidth, srcHeight, OS.SRCAND); 
     
    16401638    auto oldSrcBitmap = OS.SelectObject(srcHdc, srcImage.handle); 
    16411639    int rop2 = 0; 
    1642     static if (!OS.IsWinCE) { 
     1640    if (!OS.IsWinCE) { 
    16431641        rop2 = OS.GetROP2(handle); 
    16441642    } else { 
     
    16491647    if (!simple && (srcWidth !is destWidth || srcHeight !is destHeight)) { 
    16501648        int mode = 0; 
    1651         static if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); 
     1649        if (!OS.IsWinCE) mode = OS.SetStretchBltMode(handle, OS.COLORONCOLOR); 
    16521650        OS.StretchBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, srcWidth, srcHeight, dwRop); 
    1653         static if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); 
     1651        if (!OS.IsWinCE) OS.SetStretchBltMode(handle, mode); 
    16541652    } else { 
    16551653        OS.BitBlt(handle, destX, destY, destWidth, destHeight, srcHdc, srcX, srcY, dwRop); 
     
    16881686        } 
    16891687    } 
    1690     static if (OS.IsWinCE) { 
     1688    if (OS.IsWinCE) { 
    16911689        int [] points = [x1, y1, x2, y2]; 
    16921690        OS.Polyline (handle, cast(POINT*)points.ptr, points.length / 2); 
     
    19881986        if (data.lineWidth !is 0 && data.lineWidth % 2 is 0) x--; 
    19891987    } 
    1990     static if (OS.IsWinCE) { 
     1988    if (OS.IsWinCE) { 
    19911989        /* 
    19921990        * Bug in WinCE PPC.  On certain devices, RoundRect does not draw 
     
    21792177    } 
    21802178    int rop2 = 0; 
    2181     static if (OS.IsWinCE) { 
     2179    if (OS.IsWinCE) { 
    21822180        rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); 
    21832181        OS.SetROP2(handle, rop2); 
     
    24032401    } 
    24042402    int rop2 = 0; 
    2405     static if (OS.IsWinCE) { 
     2403    if (OS.IsWinCE) { 
    24062404        rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); 
    24072405        OS.SetROP2(handle, rop2); 
     
    25202518    * WinCE SDK.  The fix is to emulate it by using Polygon. 
    25212519    */ 
    2522     static if (OS.IsWinCE) { 
     2520    if (OS.IsWinCE) { 
    25232521        /* compute arc with a simple linear interpolation */ 
    25242522        if (arcAngle < 0) { 
     
    26542652    */ 
    26552653    int rop2 = 0; 
    2656     static if (OS.IsWinCE) { 
     2654    if (OS.IsWinCE) { 
    26572655        rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); 
    26582656        OS.SetROP2(handle, rop2); 
     
    28242822    } 
    28252823    int rop2 = 0; 
    2826     static if (OS.IsWinCE) { 
     2824    if (OS.IsWinCE) { 
    28272825        rop2 = OS.SetROP2(handle, OS.R2_COPYPEN); 
    28282826        OS.SetROP2(handle, rop2); 
     
    32703268public int getFillRule() { 
    32713269    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    3272     static if (OS.IsWinCE) return DWT.FILL_EVEN_ODD; 
     3270    if (OS.IsWinCE) return DWT.FILL_EVEN_ODD; 
    32733271    return OS.GetPolyFillMode(handle) is OS.WINDING ? DWT.FILL_WINDING : DWT.FILL_EVEN_ODD; 
    32743272} 
     
    36163614    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    36173615    int rop2 = 0; 
    3618     static if (OS.IsWinCE) { 
     3616    if (OS.IsWinCE) { 
    36193617        rop2 = OS.SetROP2 (handle, OS.R2_COPYPEN); 
    36203618        OS.SetROP2 (handle, rop2); 
     
    36943692        } 
    36953693        POINT pt; 
    3696         static if (!OS.IsWinCE) OS.GetWindowOrgEx (handle, &pt); 
     3694        if (!OS.IsWinCE) OS.GetWindowOrgEx (handle, &pt); 
    36973695        return Gdip.Matrix_new(-1, 0, 0, 1, width + 2 * pt.x, 0); 
    36983696    } 
     
    41514149public void setFillRule(int rule) { 
    41524150    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    4153     static if (OS.IsWinCE) return; 
     4151    if (OS.IsWinCE) return; 
    41544152    int mode = OS.ALTERNATE; 
    41554153    switch (rule) { 
  • dwt/graphics/Image.d

    r113 r115  
    269269                    break; 
    270270                case DWT.ICON: 
    271                     static if (OS.IsWinCE) { 
     271                    if (OS.IsWinCE) { 
    272272                        init(device, srcImage.data); 
    273273                    } else { 
     
    984984            */ 
    985985            ICONINFO iconInfo; 
    986             static if (OS.IsWinCE) { 
     986            if (OS.IsWinCE) { 
    987987                GetIconInfo(this, &iconInfo); 
    988988            } else { 
     
    10541054    if (memGC !is null) memGC.dispose(); 
    10551055    if (type is DWT.ICON) { 
    1056         static if (OS.IsWinCE) data = null; 
     1056        if (OS.IsWinCE) data = null; 
    10571057        OS.DestroyIcon (handle); 
    10581058    } else { 
     
    11141114    int red = 0, green = 0, blue = 0; 
    11151115    if (bm.bmBitsPixel <= 8)  { 
    1116         static if (OS.IsWinCE) { 
     1116        if (OS.IsWinCE) { 
    11171117            byte[1] pBits; 
    11181118            OS.MoveMemory(pBits.ptr, bm.bmBits, 1); 
     
    11861186            return new Rectangle(0, 0, width = bm.bmWidth, height = bm.bmHeight); 
    11871187        case DWT.ICON: 
    1188             static if (OS.IsWinCE) { 
     1188            if (OS.IsWinCE) { 
    11891189                return new Rectangle(0, 0, width = data.width, height = data.height); 
    11901190            } else { 
     
    12261226    switch (type) { 
    12271227        case DWT.ICON: { 
    1228             static if (OS.IsWinCE) return data; 
     1228            if (OS.IsWinCE) return data; 
    12291229            ICONINFO info; 
    1230             static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1230            if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    12311231            OS.GetIconInfo(handle, &info); 
    12321232            /* Get the basic BITMAP information */ 
     
    12691269            int imageSize; 
    12701270            /* Call with null lpBits to get the image size */ 
    1271             static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1271            if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    12721272            OS.GetDIBits(hBitmapDC, hBitmap, 0, height, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    12731273            OS.MoveMemory(&bmiHeader, bmi.ptr, BITMAPINFOHEADER.sizeof); 
     
    12781278            auto lpvBits = cast(byte*) OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize); 
    12791279            if (lpvBits is null) DWT.error(DWT.ERROR_NO_HANDLES); 
    1280             static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1280            if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    12811281            OS.GetDIBits(hBitmapDC, hBitmap, 0, height, lpvBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    12821282            OS.MoveMemory(data.ptr, lpvBits, imageSize); 
     
    13051305            if (info.hbmColor is null) { 
    13061306                /* Do the bottom half of the mask */ 
    1307                 static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1307                if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    13081308                OS.GetDIBits(hBitmapDC, hBitmap, height, height, lpvBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    13091309                OS.MoveMemory(maskData.ptr, lpvBits, imageSize); 
     
    13271327                OS.SelectObject(hBitmapDC, info.hbmMask); 
    13281328                /* Call with null lpBits to get the image size */ 
    1329                 static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1329                if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    13301330                OS.GetDIBits(hBitmapDC, info.hbmMask, 0, height, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    13311331                OS.MoveMemory(&bmiHeader, bmi.ptr, BITMAPINFOHEADER.sizeof); 
     
    13341334                auto lpvMaskBits = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize); 
    13351335                if (lpvMaskBits is null) DWT.error(DWT.ERROR_NO_HANDLES); 
    1336                 static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1336                if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    13371337                OS.GetDIBits(hBitmapDC, info.hbmMask, 0, height, lpvMaskBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    13381338                OS.MoveMemory(maskData.ptr, lpvMaskBits, imageSize); 
     
    13891389            */ 
    13901390            auto handle = this.handle; 
    1391             static if (OS.IsWinCE) { 
     1391            if (OS.IsWinCE) { 
    13921392                if (!isDib) { 
    13931393                    bool mustRestore = false; 
     
    14541454            } else { 
    14551455                /* Call with null lpBits to get the image size */ 
    1456                 static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1456                if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    14571457                OS.GetDIBits(hBitmapDC, handle, 0, height, null, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    14581458                OS.MoveMemory(&bmiHeader, bmi.ptr, BITMAPINFOHEADER.sizeof); 
     
    14621462            /* Get the bitmap data */ 
    14631463            if (isDib) { 
    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                     } 
     1464                if (OS.IsWinCE && this.handle !is handle) { 
     1465                    /* get image data from the temporary DIB */ 
     1466                    OS.MoveMemory(data.ptr, dib.bmBits, imageSize); 
    14691467                } else { 
    14701468                    OS.MoveMemory(data.ptr, bm.bmBits, imageSize); 
     
    14741472                auto lpvBits = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize); 
    14751473                if (lpvBits is null) DWT.error(DWT.ERROR_NO_HANDLES); 
    1476                 static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     1474                if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    14771475                OS.GetDIBits(hBitmapDC, handle, 0, height, lpvBits, cast(BITMAPINFO*)bmi.ptr, OS.DIB_RGB_COLORS); 
    14781476                OS.MoveMemory(data.ptr, lpvBits, imageSize); 
     
    14841482                RGB[] rgbs = new RGB[numColors]; 
    14851483                if (isDib) { 
    1486                     static if (OS.IsWinCE) { 
     1484                    if (OS.IsWinCE) { 
    14871485                        /* 
    14881486                        * Feature on WinCE.  GetDIBColorTable is not supported. 
     
    15391537                OS.RealizePalette(hBitmapDC); 
    15401538            } 
    1541             static if (OS.IsWinCE) { 
     1539            if (OS.IsWinCE) { 
    15421540                if (handle !is this.handle) { 
    15431541                    /* free temporary DIB */ 
     
    16201618    bmiHeader.biPlanes = 1; 
    16211619    bmiHeader.biBitCount = cast(short)depth; 
    1622     static if (OS.IsWinCE) bmiHeader.biCompression = OS.BI_BITFIELDS; 
     1620    if (OS.IsWinCE) bmiHeader.biCompression = OS.BI_BITFIELDS; 
    16231621    else bmiHeader.biCompression = OS.BI_RGB; 
    16241622    byte[] bmi = new byte[BITMAPINFOHEADER.sizeof + (OS.IsWinCE ? 12 : 0)]; 
    16251623    OS.MoveMemory(bmi.ptr, &bmiHeader, BITMAPINFOHEADER.sizeof); 
    16261624    /* Set the rgb colors into the bitmap info */ 
    1627     static if (OS.IsWinCE) { 
     1625    if (OS.IsWinCE) { 
    16281626        int redMask = 0xFF00; 
    16291627        int greenMask = 0xFF0000; 
     
    18751873            image.handle = hIcon; 
    18761874            image.type = DWT.ICON; 
    1877             static if (OS.IsWinCE) image.data = i; 
     1875            if (OS.IsWinCE) image.data = i; 
    18781876        } 
    18791877    } else { 
     
    20882086    * Note.  Not implemented on WinCE. 
    20892087    */ 
    2090     static if (OS.IsWinCE) return; 
     2088    if (OS.IsWinCE) return; 
    20912089    if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    20922090    if (color is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
     
    21042102    int maxColors = 1 << bm.bmBitsPixel; 
    21052103    byte[] colors = new byte[maxColors * 4]; 
    2106     static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     2104    if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    21072105    int numColors = OS.GetDIBColorTable(hdcMem, 0, maxColors, cast(RGBQUAD*)colors.ptr); 
    21082106    int offset = transparentPixel * 4; 
     
    21102108    colors[offset + 1] = cast(byte)color.getGreen(); 
    21112109    colors[offset + 2] = cast(byte)color.getRed(); 
    2112     static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     2110    if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    21132111    OS.SetDIBColorTable(hdcMem, 0, numColors, cast(RGBQUAD*)colors.ptr); 
    21142112    OS.DeleteDC(hdcMem); 
  • dwt/graphics/Region.d

    r113 r115  
    120120    if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    121121    if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
    122     static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     122    if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    123123    auto polyRgn = OS.CreatePolygonRgn(cast(POINT*)pointArray.ptr, pointArray.length / 2, OS.ALTERNATE); 
    124124    OS.CombineRgn (handle, handle, polyRgn, OS.RGN_OR); 
     
    468468    if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    469469    if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
    470     static if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
     470    if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    471471    auto polyRgn = OS.CreatePolygonRgn(cast(POINT*)pointArray.ptr, pointArray.length / 2, OS.ALTERNATE); 
    472472    OS.CombineRgn (handle, handle, polyRgn, OS.RGN_DIFF); 
  • dwt/internal/ImageList.d

    r113 r115  
    3535    this.style = style; 
    3636    int flags = OS.ILC_MASK; 
    37     static if (OS.IsWinCE) { 
     37    if (OS.IsWinCE) { 
    3838        flags |= OS.ILC_COLOR; 
    3939    } else { 
     
    120120        //OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof); 
    121121        /* Set the rgb colors into the bitmap info */ 
    122         static if (OS.IsWinCE) { 
     122        if (OS.IsWinCE) { 
    123123            int redMask = 0xFF00; 
    124124            int greenMask = 0xFF0000; 
     
    146146    OS.SelectObject (hdc2, hBitmap); 
    147147    if (width !is bm.bmWidth || height !is bm.bmHeight) { 
    148         static if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); 
     148        if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); 
    149149        OS.StretchBlt (hdc2, 0, 0, width, height, hdc1, 0, 0, bm.bmWidth, bm.bmHeight, OS.SRCCOPY); 
    150150    } else { 
     
    242242        auto memHdc2 = OS.CreateCompatibleDC (hdc); 
    243243        auto oldMemBitmap2 = OS.SelectObject (memHdc2, memDib2); 
    244         static if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc2, OS.COLORONCOLOR); 
     244        if (!OS.IsWinCE) OS.SetStretchBltMode(memHdc2, OS.COLORONCOLOR); 
    245245        OS.StretchBlt (memHdc2, 0, 0, destWidth, destHeight, memHdc, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); 
    246246        OS.SelectObject (memHdc2, oldMemBitmap2); 
     
    280280        auto hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null); 
    281281        OS.SelectObject (hdc2, hMask2); 
    282         static if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); 
     282        if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); 
    283283        OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); 
    284284        OS.DeleteDC (hdc1); 
     
    331331        OS.SelectObject (hdc2, hMask); 
    332332        if (destWidth !is srcWidth || destHeight !is srcHeight) { 
    333             static if (!OS.IsWinCE) OS.SetStretchBltMode (hdc2, OS.COLORONCOLOR); 
     333            if (!OS.IsWinCE) OS.SetStretchBltMode (hdc2, OS.COLORONCOLOR); 
    334334            OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); 
    335335        } else { 
     
    448448        } 
    449449        case DWT.ICON: { 
    450             static if (OS.IsWinCE) { 
     450            if (OS.IsWinCE) { 
    451451                OS.ImageList_ReplaceIcon (handle, index is count ? -1 : index, hImage); 
    452452            } else { 
  • dwt/ole/win32/OleFrame.d

    r113 r115  
    244244                        case OS.WM_KEYDOWN: 
    245245                        case OS.WM_SYSKEYDOWN: { 
    246                             static if (!OS.IsWinCE) { 
     246                            if (!OS.IsWinCE) { 
    247247                                switch (msg.wParam) { 
    248248                                    case OS.VK_SHIFT: 
  • dwt/widgets/Canvas.d

    r113 r115  
    198198    OS.GetClientRect (handle, &clientRect); 
    199199    if (OS.IntersectRect (&clientRect, &sourceRect, &clientRect)) { 
    200         static if (OS.IsWinCE) { 
     200        if (OS.IsWinCE) { 
    201201            OS.UpdateWindow (handle); 
    202202        } else { 
     
    207207    int deltaX = destX - x, deltaY = destY - y; 
    208208    if (findImageControl () !is null) { 
    209         static if (OS.IsWinCE) { 
     209        if (OS.IsWinCE) { 
    210210            OS.InvalidateRect (handle, &sourceRect, true); 
    211211        } else { 
     
    215215        } 
    216216        OS.OffsetRect (&sourceRect, deltaX, deltaY); 
    217         static if (OS.IsWinCE) { 
     217        if (OS.IsWinCE) { 
    218218            OS.InvalidateRect (handle, &sourceRect, true); 
    219219        } else { 
  • dwt/widgets/Combo.d

    r113 r115  
    16091609public void setOrientation (int orientation) { 
    16101610    checkWidget(); 
    1611     static if (OS.IsWinCE) return; 
     1611    if (OS.IsWinCE) return; 
    16121612    if (OS.WIN32_VERSION < OS.VERSION (4, 10)) return; 
    16131613    int flags = DWT.RIGHT_TO_LEFT | DWT.LEFT_TO_RIGHT; 
     
    21732173        LRESULT result = super.WM_SIZE (wParam, lParam); 
    21742174        if (OS.IsWindowVisible (handle)) { 
    2175             static if (OS.IsWinCE) { 
     2175            if (OS.IsWinCE) { 
    21762176                auto hwndText = OS.GetDlgItem (handle, CBID_EDIT); 
    21772177                if (hwndText !is null) OS.InvalidateRect (hwndText, null, true); 
  • dwt/widgets/Composite.d

    r113 r115  
    761761        if (processID is OS.GetCurrentProcessId ()) { 
    762762            if (display.msgHook is null) { 
    763                 static if (!OS.IsWinCE) { 
     763                if (!OS.IsWinCE) { 
    764764                    //display.getMsgCallback = new Callback (display, "getMsgProc", 3); 
    765765                    //display.getMsgProc = display.getMsgCallback.getAddress (); 
     
    11381138    /* Set the clipping bits */ 
    11391139    int oldBits = 0, newBits = 0; 
    1140     static if (!OS.IsWinCE) { 
     1140    if (!OS.IsWinCE) { 
    11411141        oldBits = OS.GetWindowLong (handle, OS.GWL_STYLE); 
    11421142        newBits = oldBits | OS.WS_CLIPSIBLINGS | OS.WS_CLIPCHILDREN; 
     
    14481448    * redraw the non-client area. 
    14491449    */ 
    1450     static if (!OS.IsWinCE) { 
     1450    if (!OS.IsWinCE) { 
    14511451        int cmd = wParam & 0xFFF0; 
    14521452        switch (cmd) { 
     
    15031503 
    15041504override LRESULT wmNotify (NMHDR* hdr, int wParam, int lParam) { 
    1505     static if (!OS.IsWinCE) { 
     1505    if (!OS.IsWinCE) { 
    15061506        switch (hdr.code) { 
    15071507            /* 
  • dwt/widgets/CoolBar.d

    r113 r115  
    761761    */ 
    762762    if (!OS.IsWindowVisible (handle)) return; 
    763     static if (OS.IsWinCE) { 
     763    if (OS.IsWinCE) { 
    764764        OS.InvalidateRect (handle, null, true); 
    765765    } else { 
  • dwt/widgets/Decorations.d

    r113 r115  
    183183void _setMaximized (bool maximized) { 
    184184    swFlags = maximized ? OS.SW_SHOWMAXIMIZED : OS.SW_RESTORE; 
    185     static if (OS.IsWinCE) { 
     185    if (OS.IsWinCE) { 
    186186        /* 
    187187        * Note: WinCE does not support SW_SHOWMAXIMIZED and SW_RESTORE. The 
     
    213213 
    214214void _setMinimized (bool minimized) { 
    215     static if (OS.IsWinCE) return; 
     215    if (OS.IsWinCE) return; 
    216216    swFlags = minimized ? OS.SW_SHOWMINNOACTIVE : OS.SW_RESTORE; 
    217217    if (!OS.IsWindowVisible (handle)) return; 
     
    261261        style &= ~(DWT.CLOSE | DWT.TITLE | DWT.MIN | DWT.MAX | DWT.RESIZE | DWT.BORDER); 
    262262    } 
    263     static if (OS.IsWinCE) { 
     263    if (OS.IsWinCE) { 
    264264        /* 
    265265        * Feature in WinCE PPC.  WS_MINIMIZEBOX or WS_MAXIMIZEBOX 
     
    457457    */ 
    458458    if ((state & FOREIGN_HANDLE) is 0) { 
    459         static if (!OS.IsWinCE) { 
     459        if (!OS.IsWinCE) { 
    460460            auto hIcon = OS.LoadIcon (null, cast(wchar*)OS.IDI_APPLICATION); 
    461461            OS.SendMessage (handle, OS.WM_SETICON, OS.ICON_SMALL, hIcon); 
     
    521521override public Rectangle getBounds () { 
    522522    checkWidget (); 
    523     static if (!OS.IsWinCE) { 
     523    if (!OS.IsWinCE) { 
    524524        if (OS.IsIconic (handle)) { 
    525525            WINDOWPLACEMENT lpwndpl; 
     
    665665override public Point getLocation () { 
    666666    checkWidget (); 
    667     static if (!OS.IsWinCE) { 
     667    if (!OS.IsWinCE) { 
    668668        if (OS.IsIconic (handle)) { 
    669669            WINDOWPLACEMENT lpwndpl; 
     
    868868 
    869869override void setBounds (int x, int y, int width, int height, int flags, bool defer) { 
    870     static if (OS.IsWinCE) { 
     870    if (OS.IsWinCE) { 
    871871        swFlags = OS.SW_RESTORE; 
    872872    } else { 
     
    989989    * On WinCE PPC, icons in windows are not displayed. 
    990990    */ 
    991     static if (OS.IsWinCE) return; 
     991    if (OS.IsWinCE) return; 
    992992    if (smallImage !is null) smallImage.dispose (); 
    993993    if (largeImage !is null) largeImage.dispose (); 
     
    10661066    * The fix is to force a redraw. 
    10671067    */ 
    1068     static if (!OS.IsWinCE) { 
     1068    if (!OS.IsWinCE) { 
    10691069        if (hSmallIcon is null && hLargeIcon is null && (style & DWT.BORDER) !is 0) { 
    10701070            int flags = OS.RDW_FRAME | OS.RDW_INVALIDATE; 
  • dwt/widgets/Display.d

    r113 r115  
    654654 
    655655int asciiKey (int key) { 
    656     static if (OS.IsWinCE) return 0; 
     656    if (OS.IsWinCE) return 0; 
    657657 
    658658    /* Get the current keyboard. */ 
     
    11031103        auto hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null); 
    11041104        OS.SelectObject (hdc2, hMask2); 
    1105         static if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); 
     1105        if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR); 
    11061106        OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY); 
    11071107        OS.DeleteDC (hdc1); 
     
    23182318    if (systemFont !is null) return systemFont; 
    23192319    HFONT hFont; 
    2320     static if (!OS.IsWinCE) { 
     2320    if (!OS.IsWinCE) { 
    23212321        NONCLIENTMETRICS info; 
    23222322        info.cbSize = NONCLIENTMETRICS.sizeof; 
     
    24022402    checkDevice (); 
    24032403    if (tray !is null) return tray; 
    2404     static if (!OS.IsWinCE) tray = new Tray (this, DWT.NONE); 
     2404    if (!OS.IsWinCE) tray = new Tray (this, DWT.NONE); 
    24052405    return tray; 
    24062406} 
     
    28772877                    case OS.WM_KEYDOWN: 
    28782878                    case OS.WM_SYSKEYDOWN: { 
    2879                         static if (!OS.IsWinCE) { 
     2879                        if (!OS.IsWinCE) { 
    28802880                            switch (keyMsg.wParam) { 
    28812881                                case OS.VK_SHIFT: 
     
    32493249                    case DWT.LF: return false; 
    32503250                    default: { 
    3251                         static if (OS.IsWinCE) { 
     3251                        if (OS.IsWinCE) { 
    32523252                            inputs.wVk = cast(int)OS.CharUpper (cast(wchar*) key); 
    32533253                        } else { 
     
    34933493 
    34943494    /* Unhook the idle hook */ 
    3495     static if (!OS.IsWinCE) { 
     3495    if (!OS.IsWinCE) { 
    34963496        if (idleHook !is null) OS.UnhookWindowsHookEx (idleHook); 
    34973497        idleHook = null; 
     
    38693869    } 
    38703870    if (systemFont !is null) { 
    3871         static if (!OS.IsWinCE) { 
     3871        if (!OS.IsWinCE) { 
    38723872            NONCLIENTMETRICS info; 
    38733873            info.cbSize = NONCLIENTMETRICS.sizeof; 
     
    41384138 
    41394139int shiftedKey (int key) { 
    4140     static if (OS.IsWinCE) return 0; 
     4140    if (OS.IsWinCE) return 0; 
    41414141 
    41424142    /* Clear the virtual keyboard and press the shift key */ 
     
    44034403 
    44044404void wakeThread () { 
    4405     static if (OS.IsWinCE) { 
     4405