diff dwt/widgets/Decorations.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 3afcd4ddcf90
line wrap: on
line diff
--- a/dwt/widgets/Decorations.d	Mon Feb 11 04:05:55 2008 +0100
+++ b/dwt/widgets/Decorations.d	Mon Feb 11 04:18:24 2008 +0100
@@ -182,7 +182,7 @@
 
 void _setMaximized (bool maximized) {
     swFlags = maximized ? OS.SW_SHOWMAXIMIZED : OS.SW_RESTORE;
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         /*
         * Note: WinCE does not support SW_SHOWMAXIMIZED and SW_RESTORE. The
         * workaround is to resize the window to fit the parent client area.
@@ -212,7 +212,7 @@
 }
 
 void _setMinimized (bool minimized) {
-    if (OS.IsWinCE) return;
+    static if (OS.IsWinCE) return;
     swFlags = minimized ? OS.SW_SHOWMINNOACTIVE : OS.SW_RESTORE;
     if (!OS.IsWindowVisible (handle)) return;
     if (minimized is OS.IsIconic (handle)) return;
@@ -260,7 +260,7 @@
     if ((style & DWT.NO_TRIM) !is 0) {
         style &= ~(DWT.CLOSE | DWT.TITLE | DWT.MIN | DWT.MAX | DWT.RESIZE | DWT.BORDER);
     }
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         /*
         * Feature in WinCE PPC.  WS_MINIMIZEBOX or WS_MAXIMIZEBOX
         * are not supposed to be used.  If they are, the result
@@ -456,7 +456,7 @@
     * process exits.
     */
     if ((state & FOREIGN_HANDLE) is 0) {
-        if (!OS.IsWinCE) {
+        static if (!OS.IsWinCE) {
             auto hIcon = OS.LoadIcon (null, cast(wchar*)OS.IDI_APPLICATION);
             OS.SendMessage (handle, OS.WM_SETICON, OS.ICON_SMALL, hIcon);
         }
@@ -520,7 +520,7 @@
 
 override public Rectangle getBounds () {
     checkWidget ();
-    if (!OS.IsWinCE) {
+    static if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) {
             WINDOWPLACEMENT lpwndpl;
             lpwndpl.length = WINDOWPLACEMENT.sizeof;
@@ -664,7 +664,7 @@
 
 override public Point getLocation () {
     checkWidget ();
-    if (!OS.IsWinCE) {
+    static if (!OS.IsWinCE) {
         if (OS.IsIconic (handle)) {
             WINDOWPLACEMENT lpwndpl;
             lpwndpl.length = WINDOWPLACEMENT.sizeof;
@@ -867,7 +867,7 @@
 }
 
 override void setBounds (int x, int y, int width, int height, int flags, bool defer) {
-    if (OS.IsWinCE) {
+    static if (OS.IsWinCE) {
         swFlags = OS.SW_RESTORE;
     } else {
         if (OS.IsIconic (handle)) {
@@ -988,7 +988,7 @@
     *
     * On WinCE PPC, icons in windows are not displayed.
     */
-    if (OS.IsWinCE) return;
+    static if (OS.IsWinCE) return;
     if (smallImage !is null) smallImage.dispose ();
     if (largeImage !is null) largeImage.dispose ();
     smallImage = largeImage = null;
@@ -1065,7 +1065,7 @@
     * trimmings do not redraw to hide the previous icon.
     * The fix is to force a redraw.
     */
-    if (!OS.IsWinCE) {
+    static if (!OS.IsWinCE) {
         if (hSmallIcon is null && hLargeIcon is null && (style & DWT.BORDER) !is 0) {
             int flags = OS.RDW_FRAME | OS.RDW_INVALIDATE;
             OS.RedrawWindow (handle, null, null, flags);