diff dwt/widgets/Display.d @ 117:25f88bf5a6df

Only one file was damaged Backed out changeset 640928daee8c
author Frank Benoit <benoit@tionex.de>
date Mon, 11 Feb 2008 04:18:24 +0100
parents 640928daee8c
children 07e8963537b7
line wrap: on
line diff
--- a/dwt/widgets/Display.d	Mon Feb 11 04:05:55 2008 +0100
+++ b/dwt/widgets/Display.d	Mon Feb 11 04:18:24 2008 +0100
@@ -653,7 +653,7 @@
 }
 
 int asciiKey (int key) {
-    if (OS.IsWinCE) return 0;
+    static if (OS.IsWinCE) return 0;
 
     /* Get the current keyboard. */
     for (int i=0; i<keyboard.length; i++) keyboard [i] = 0;
@@ -1102,7 +1102,7 @@
         auto hdc2 = OS.CreateCompatibleDC (hdc);
         auto hMask2 = OS.CreateBitmap (destWidth, destHeight, 1, 1, null);
         OS.SelectObject (hdc2, hMask2);
-        if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR);
+        static if (!OS.IsWinCE) OS.SetStretchBltMode(hdc2, OS.COLORONCOLOR);
         OS.StretchBlt (hdc2, 0, 0, destWidth, destHeight, hdc1, 0, 0, srcWidth, srcHeight, OS.SRCCOPY);
         OS.DeleteDC (hdc1);
         OS.DeleteDC (hdc2);
@@ -2317,7 +2317,7 @@
     checkDevice ();
     if (systemFont !is null) return systemFont;
     HFONT hFont;
-    if (!OS.IsWinCE) {
+    static if (!OS.IsWinCE) {
         NONCLIENTMETRICS info;
         info.cbSize = NONCLIENTMETRICS.sizeof;
         if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, &info, 0)) {
@@ -2401,7 +2401,7 @@
 public Tray getSystemTray () {
     checkDevice ();
     if (tray !is null) return tray;
-    if (!OS.IsWinCE) tray = new Tray (this, DWT.NONE);
+    static if (!OS.IsWinCE) tray = new Tray (this, DWT.NONE);
     return tray;
 }
 
@@ -2876,7 +2876,7 @@
                 switch (keyMsg.message) {
                     case OS.WM_KEYDOWN:
                     case OS.WM_SYSKEYDOWN: {
-                        if (!OS.IsWinCE) {
+                        static if (!OS.IsWinCE) {
                             switch (keyMsg.wParam) {
                                 case OS.VK_SHIFT:
                                 case OS.VK_MENU:
@@ -3248,7 +3248,7 @@
 //                  case DWT.LF: inputs.wVk = cast(short) OS.VK_RETURN; break;
                     case DWT.LF: return false;
                     default: {
-                        if (OS.IsWinCE) {
+                        static if (OS.IsWinCE) {
                             inputs.wVk = cast(int)OS.CharUpper (cast(wchar*) key);
                         } else {
                             inputs.wVk = OS.VkKeyScan (cast(short) wcsToMbcs (key, 0));
@@ -3492,7 +3492,7 @@
     }
 
     /* Unhook the idle hook */
-    if (!OS.IsWinCE) {
+    static if (!OS.IsWinCE) {
         if (idleHook !is null) OS.UnhookWindowsHookEx (idleHook);
         idleHook = null;
         //foregroundIdleCallback.dispose ();
@@ -3868,7 +3868,7 @@
         resources = newResources;
     }
     if (systemFont !is null) {
-        if (!OS.IsWinCE) {
+        static if (!OS.IsWinCE) {
             NONCLIENTMETRICS info;
             info.cbSize = NONCLIENTMETRICS.sizeof;
             if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, &info, 0)) {
@@ -4137,7 +4137,7 @@
 }
 
 int shiftedKey (int key) {
-    if (OS.IsWinCE) return 0;
+    static if (OS.IsWinCE) return 0;
 
     /* Clear the virtual keyboard and press the shift key */
     for (int i=0; i<keyboard.length; i++) keyboard [i] = 0;
@@ -4402,7 +4402,7 @@
 }
 
 void wakeThread () {
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         OS.PostMessage (hwndMessage, OS.WM_NULL, 0, 0);
     } else {
         OS.PostThreadMessage (threadId, OS.WM_NULL, 0, 0);