diff dwt/widgets/Widget.d @ 107:a378481be65f

Adding "static if" where necessary
author John Reimer <terminal.node@gmail.com
date Sun, 10 Feb 2008 16:54:57 -0800
parents 3926f6c95d6f
children 0a02d6d3466b
line wrap: on
line diff
--- a/dwt/widgets/Widget.d	Mon Feb 11 00:56:33 2008 +0100
+++ b/dwt/widgets/Widget.d	Sun Feb 10 16:54:57 2008 -0800
@@ -390,7 +390,7 @@
 }
 
 HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags){
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         /*
         * Feature in Windows.  On Windows CE, DeferWindowPos always causes
         * a WM_SIZE message, even when the new size is the same as the old
@@ -1252,7 +1252,7 @@
 }
 
 bool SetWindowPos (HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         /*
         * Feature in Windows.  On Windows CE, SetWindowPos() always causes
         * a WM_SIZE message, even when the new size is the same as the old
@@ -1346,7 +1346,7 @@
     * NOTE: This only happens on WM2003.  Previous WinCE versions did
     * not support WM_CONTEXTMENU.
     */
-    if (OS.IsWinCE) return LRESULT.NULL;
+    static if (OS.IsWinCE) return LRESULT.NULL;
 
     /*
     * Feature in Windows.  When the user presses  WM_NCRBUTTONUP,
@@ -1429,7 +1429,7 @@
     * both virtual and ASCII are a special case.
     */
     int mapKey = 0;
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         switch (wParam) {
             case OS.VK_BACK: mapKey = DWT.BS; break;
             case OS.VK_RETURN: mapKey = DWT.CR; break;
@@ -1623,7 +1623,7 @@
     Display display = this.display;
 
     /* Check for hardware keys */
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         if (OS.VK_APP1 <= wParam && wParam <= OS.VK_APP6) {
             display.lastKey = display.lastAscii = 0;
             display.lastVirtual = display.lastNull = display.lastDead = false;
@@ -1658,7 +1658,7 @@
     * both virtual and ASCII are a special case.
     */
     int mapKey = 0;
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         switch (wParam) {
             case OS.VK_BACK: mapKey = DWT.BS; break;
             case OS.VK_RETURN: mapKey = DWT.CR; break;
@@ -1779,7 +1779,7 @@
     bool dragging = false, mouseDown = true;
     int count = display.getClickCount (DWT.MouseDown, 1, hwnd, lParam);
     if (count is 1 && (state & DRAG_DETECT) !is 0 && hooks (DWT.DragDetect)) {
-        if (!OS.IsWinCE) {
+        static if (!OS.IsWinCE) {
             /*
             * Feature in Windows.  It's possible that the drag
             * operation will not be started while the mouse is
@@ -1979,7 +1979,7 @@
     Display display = this.display;
     int pos = OS.GetMessagePos ();
     if (pos !is display.lastMouse || display.captureChanged) {
-        if (!OS.IsWinCE) {
+        static if (!OS.IsWinCE) {
             bool trackMouse = (state & TRACK_MOUSE) !is 0;
             bool mouseEnter = hooks (DWT.MouseEnter) || display.filters (DWT.MouseEnter);
             bool mouseExit = hooks (DWT.MouseExit) || display.filters (DWT.MouseExit);
@@ -2059,7 +2059,7 @@
 
     /* Issue a paint event */
     LRESULT result = LRESULT.NULL;
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         RECT rect;
         OS.GetUpdateRect (hwnd, &rect, false);
         result = callWindowProc (hwnd, OS.WM_PAINT, wParam, lParam);
@@ -2330,7 +2330,7 @@
     * both virtual and ASCII are a special case.
     */
     int mapKey = 0;
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         switch (wParam) {
             case OS.VK_BACK: mapKey = DWT.BS; break;
             case OS.VK_RETURN: mapKey = DWT.CR; break;