changeset 77:205350493476

Accessible linkable dummy.
author Frank Benoit <benoit@tionex.de>
date Tue, 05 Feb 2008 14:31:31 +0100
parents c390bd107089
children b00303c762ac
files doc/Common.txt dwt/accessibility/Accessible.d dwt/internal/win32/OS.d dwt/widgets/Control.d dwt/widgets/Decorations.d dwt/widgets/Menu.d dwt/widgets/MenuItem.d dwt/widgets/ProgressBar.d dwt/widgets/Sash.d dwt/widgets/Scale.d dwt/widgets/ScrollBar.d dwt/widgets/Scrollable.d dwt/widgets/Shell.d dwt/widgets/Slider.d dwt/widgets/Spinner.d dwt/widgets/TabFolder.d dwt/widgets/TabItem.d dwt/widgets/Table.d dwt/widgets/Text.d dwt/widgets/Tree.d dwt/widgets/Widget.d
diffstat 21 files changed, 165 insertions(+), 115 deletions(-) [+]
line wrap: on
line diff
--- a/doc/Common.txt	Tue Feb 05 04:03:25 2008 +0100
+++ b/doc/Common.txt	Tue Feb 05 14:31:31 2008 +0100
@@ -28,7 +28,9 @@
     DirectoryDialog
     FileDialog
 
+    Accessible
+
+    dnd/*
+    custom/*
 
 
-
-
--- a/dwt/accessibility/Accessible.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/accessibility/Accessible.d	Tue Feb 05 14:31:31 2008 +0100
@@ -20,57 +20,65 @@
 import dwt.accessibility.AccessibleTextListener;
 import dwt.widgets.Control;
 class  Accessible {
-    public static Accessible internal_new_Accessible(Control control) ;
-    int AddRef();
-    int Release();
-    int QueryInterface(int, int);
-    void checkWidget();
-    void setFocus(int);
-    void internal_dispose_Accessible();
-    int internal_WM_GETOBJECT(int, int);
-    bool isValidThread();
-    int Next(int, int, int);
-    int Skip(int);
-    void addAccessibleListener(AccessibleListener);
-    void addAccessibleControlListener(AccessibleControlListener);
-    void addAccessibleTextListener(AccessibleTextListener);
-    void removeAccessibleListener(AccessibleListener);
-    void removeAccessibleControlListener(AccessibleControlListener);
-    void removeAccessibleTextListener(AccessibleTextListener);
-    int childIDToOs(int);
-    void textCaretMoved(int);
-    void textChanged(int, int, int);
-    void textSelectionChanged();
-    int accDoDefaultAction(int);
-    int accHitTest(int, int, int);
-    int accLocation(int, int, int, int, int);
-    int osToChildID(int);
-    int accNavigate(int, int, int);
-    int accSelect(int, int);
-    int get_accChild(int, int);
-    int get_accChildCount(int);
-    int get_accDefaultAction(int, int);
-    int get_accDescription(int, int);
-    int get_accFocus(int);
-    int get_accHelp(int, int);
-    int get_accHelpTopic(int, int, int);
-    int get_accKeyboardShortcut(int, int);
-    int get_accName(int, int);
-    int get_accParent(int);
-    int get_accRole(int, int);
-    int osToRole(int);
-    int roleToOs(int);
-    int get_accSelection(int);
-    int get_accState(int, int);
-    int osToState(int);
-    int stateToOs(int);
-    int get_accValue(int, int);
-    int put_accName(int, int);
-    int put_accValue(int, int);
-    int Clone(int);
-    Control getControl();
-    void selectionChanged();
-    int Reset();
+    public static Accessible internal_new_Accessible(Control control) {
+        return new Accessible;
+    }
+//     int AddRef();
+//     int Release();
+//     int QueryInterface(int, int);
+//     void checkWidget();
+//     void setFocus(int);
+    void internal_dispose_Accessible(){
+    }
+    int internal_WM_GETOBJECT(int, int){
+        assert(false);
+        return 0;
+    }
+//     bool isValidThread();
+//     int Next(int, int, int);
+//     int Skip(int);
+    void addAccessibleListener(AccessibleListener){
+    }
+    void addAccessibleControlListener(AccessibleControlListener){
+    }
+//     void addAccessibleTextListener(AccessibleTextListener);
+//     void removeAccessibleListener(AccessibleListener);
+//     void removeAccessibleControlListener(AccessibleControlListener);
+//     void removeAccessibleTextListener(AccessibleTextListener);
+//     int childIDToOs(int);
+//     void textCaretMoved(int);
+//     void textChanged(int, int, int);
+//     void textSelectionChanged();
+//     int accDoDefaultAction(int);
+//     int accHitTest(int, int, int);
+//     int accLocation(int, int, int, int, int);
+//     int osToChildID(int);
+//     int accNavigate(int, int, int);
+//     int accSelect(int, int);
+//     int get_accChild(int, int);
+//     int get_accChildCount(int);
+//     int get_accDefaultAction(int, int);
+//     int get_accDescription(int, int);
+//     int get_accFocus(int);
+//     int get_accHelp(int, int);
+//     int get_accHelpTopic(int, int, int);
+//     int get_accKeyboardShortcut(int, int);
+//     int get_accName(int, int);
+//     int get_accParent(int);
+//     int get_accRole(int, int);
+//     int osToRole(int);
+//     int roleToOs(int);
+//     int get_accSelection(int);
+//     int get_accState(int, int);
+//     int osToState(int);
+//     int stateToOs(int);
+//     int get_accValue(int, int);
+//     int put_accName(int, int);
+//     int put_accValue(int, int);
+//     int Clone(int);
+//     Control getControl();
+//     void selectionChanged();
+//     int Reset();
     //int refCount;
     //int enumIndex;
     //COMObject objIAccessible;
--- a/dwt/internal/win32/OS.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/internal/win32/OS.d	Tue Feb 05 14:31:31 2008 +0100
@@ -37,6 +37,23 @@
 }
 
 
+/*
+Compile time versions
+    ANSI
+    WinCE
+
+    OS.IsUnicode
+    OS.IsWinCE
+
+    OS.IsHPC
+
+    OS.IsSP
+    OS.IsPPC
+    OS.IsWin95
+    OS.IsWinNT
+
+*/
+
 
 
 public class OS : C {
@@ -65,18 +82,19 @@
     public static BOOL IsWin95;
     public static BOOL IsWinNT;
 
-    version(WinCE){
+    version(WinCE) {
         public const static BOOL IsWinCE = true;
-        public static const BOOL IsHPC = false; //todo
-    }else{
+        public static const BOOL IsHPC   = false; //todo
+    }
+    else {
         public const static BOOL IsWinCE = false;
-        public static const BOOL IsHPC = false;
+        public static const BOOL IsHPC   = false;
     }
 
-    public static const BOOL IsPPC_ = false;
+    public static const BOOL IsPPC = false;
 
     // PORTING_FIXME, is it Windows WFSP?
-    public static const BOOL IsSP_ = false;
+    public static const BOOL IsSP = false;
 
     public static const BOOL IsDBLocale;
 
--- a/dwt/widgets/Control.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Control.d	Tue Feb 05 14:31:31 2008 +0100
@@ -3364,7 +3364,7 @@
             * using the VK_UP and VK_DOWN keys, not with VK_LEFT
             * or VK_RIGHT.
             */
-            if (OS.IsSP_) {
+            if (OS.IsSP) {
                 if (key is OS.VK_LEFT || key is OS.VK_RIGHT) return false;
             }
             lastVirtual = true;
@@ -3617,7 +3617,7 @@
 
 int widgetExtStyle () {
     int bits = 0;
-    if (!OS.IsPPC_) {
+    if (!OS.IsPPC) {
         if ((style & DWT.BORDER) !is 0) bits |= OS.WS_EX_CLIENTEDGE;
     }
 //  if ((style & DWT.BORDER) !is 0) {
@@ -3646,7 +3646,7 @@
 //  if ((style & DWT.BORDER) !is 0) {
 //      if ((style & DWT.FLAT) !is 0) bits |= OS.WS_BORDER;
 //  }
-    if (OS.IsPPC_) {
+    if (OS.IsPPC) {
         if ((style & DWT.BORDER) !is 0) bits |= OS.WS_BORDER;
     }
     return bits;
--- a/dwt/widgets/Decorations.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Decorations.d	Tue Feb 05 14:31:31 2008 +0100
@@ -191,7 +191,7 @@
             RECT rect;
             OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, &rect, 0);
             int width = rect.right - rect.left, height = rect.bottom - rect.top;
-            if (OS.IsPPC_) {
+            if (OS.IsPPC) {
                 /* Leave space for the menu bar */
                 if (menuBar !is null) {
                     auto hwndCB = menuBar.hwndCB;
@@ -395,10 +395,10 @@
     int maxAccel = 0;
     MenuItem [] items = display.items;
     if (menuBar is null || items is null) {
-        if (!OS.IsPPC_) return;
+        if (!OS.IsPPC) return;
         maxAccel = 1;
     } else {
-        maxAccel = OS.IsPPC_ ? items.length + 1 : items.length;
+        maxAccel = OS.IsPPC ? items.length + 1 : items.length;
     }
     ACCEL accel;
     byte [] buffer1 = new byte [ACCEL.sizeof];
@@ -423,7 +423,7 @@
             }
         }
     }
-    if (OS.IsPPC_) {
+    if (OS.IsPPC) {
         /*
         * Note on WinCE PPC.  Close the shell when user taps CTRL-Q.
         * IDOK represents the "Done Button" which also closes the shell.
@@ -1172,7 +1172,7 @@
                 }
             }
         } else {
-            if (OS.IsPPC_) {
+            if (OS.IsPPC) {
                 /*
                 * Note in WinCE PPC.  The menu bar is a separate popup window.
                 * If the shell is full screen, resize its window to leave
@@ -1554,7 +1554,7 @@
     int bits = super.widgetExtStyle () | OS.WS_EX_MDICHILD;
     bits &= ~OS.WS_EX_CLIENTEDGE;
     if ((style & DWT.NO_TRIM) !is 0) return bits;
-    if (OS.IsPPC_) {
+    if (OS.IsPPC) {
         if ((style & DWT.CLOSE) !is 0) bits |= OS.WS_EX_CAPTIONOKBTN;
     }
     if ((style & DWT.RESIZE) !is 0) return bits;
@@ -1591,13 +1591,13 @@
         * the Shell according to the state of the IME.
         * It does not set the WS_THICKFRAME style.
         */
-        if (!OS.IsPPC_) bits |= OS.WS_THICKFRAME;
+        if (!OS.IsPPC) bits |= OS.WS_THICKFRAME;
     } else {
         if ((style & DWT.BORDER) is 0) bits |= OS.WS_BORDER;
     }
 
     /* Set the system menu and close box bits */
-    if (!OS.IsPPC_ && !OS.IsSP_) {
+    if (!OS.IsPPC && !OS.IsSP) {
         if ((style & DWT.CLOSE) !is 0) bits |= OS.WS_SYSMENU;
     }
 
@@ -1686,7 +1686,7 @@
     LRESULT result = super.WM_HOTKEY (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
     static if( OS.IsWinCE ){
-        if (OS.IsSP_) {
+        if (OS.IsSP) {
             /*
             * Feature on WinCE SP.  The Back key is either used to close
             * the foreground Dialog or used as a regular Back key in an EDIT
--- a/dwt/widgets/Menu.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Menu.d	Tue Feb 05 14:31:31 2008 +0100
@@ -351,7 +351,7 @@
         * DWT.BAR | DWT.BUTTON1 | DWT.BUTTON2: creates a SoftBar with
         *    2 buttons
         */
-        static if (OS.IsSP_) {
+        static if (OS.IsSP) {
             /* Determine type of menubar */
             int nToolBarId;
             if ((style & DWT.BUTTON1) !is 0) {
@@ -445,8 +445,8 @@
     if (!(0 <= index && index <= count)) error (DWT.ERROR_INVALID_RANGE);
     display.addMenuItem (item);
     bool success = false;
-    if ((OS.IsPPC_ || OS.IsSP_) && hwndCB !is null) {
-        if (OS.IsSP_) return;
+    if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
+        if (OS.IsSP) return;
         TBBUTTON lpButton;
         lpButton.idCommand = item.id;
         lpButton.fsStyle = cast(byte) OS.TBSTYLE_AUTOSIZE;
@@ -541,8 +541,8 @@
 
 void destroyItem (MenuItem item) {
     if (OS.IsWinCE) {
-        if ((OS.IsPPC_ || OS.IsSP_) && hwndCB !is null) {
-            if (OS.IsSP_) {
+        if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
+            if (OS.IsSP) {
                 redraw();
                 return;
             }
@@ -771,14 +771,14 @@
 public MenuItem getItem (int index) {
     checkWidget ();
     int id = 0;
-    if ((OS.IsPPC_ || OS.IsSP_) && hwndCB !is null) {
-        static if (OS.IsPPC_) {
+    if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
+        static if (OS.IsPPC) {
             TBBUTTON lpButton;
             int result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, &lpButton);
             if (result is 0) error (DWT.ERROR_CANNOT_GET_ITEM);
             id = lpButton.idCommand;
         }
-        if (OS.IsSP_) {
+        if (OS.IsSP) {
             if (!(0 <= index && index <= 1)) error (DWT.ERROR_CANNOT_GET_ITEM);
             id = index is 0 ? id0 : id1;
         }
@@ -827,8 +827,8 @@
  */
 public MenuItem [] getItems () {
     checkWidget ();
-    if ((OS.IsPPC_ || OS.IsSP_) && hwndCB !is null) {
-        if (OS.IsSP_) {
+    if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
+        if (OS.IsSP) {
             MenuItem [] result = new MenuItem [2];
             result[0] = display.getMenuItem (id0);
             result[1] = display.getMenuItem (id1);
@@ -867,8 +867,8 @@
 
 int GetMenuItemCount (HANDLE handle) {
     if (OS.IsWinCE) {
-        if ((OS.IsPPC_ || OS.IsSP_) && hwndCB !is null) {
-            return OS.IsSP_ ? 2 : OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
+        if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
+            return OS.IsSP ? 2 : OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
         }
         int count = 0;
         MENUITEMINFO info;
@@ -1040,11 +1040,11 @@
     if (item is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (item.isDisposed()) error(DWT.ERROR_INVALID_ARGUMENT);
     if (item.parent !is this) return -1;
-    if ((OS.IsPPC_ || OS.IsSP_) && hwndCB !is null) {
-        if (OS.IsPPC_) {
+    if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
+        if (OS.IsPPC) {
             return OS.SendMessage (hwndCB, OS.TB_COMMANDTOINDEX, item.id, 0);
         }
-        if (OS.IsSP_) {
+        if (OS.IsSP) {
             if (item.id is id0) return 0;
             if (item.id is id1) return 1;
             return -1;
@@ -1124,7 +1124,7 @@
     for (int i=0; i<items.length; i++) {
         MenuItem item = items [i];
         if (item !is null && !item.isDisposed ()) {
-            if (OS.IsPPC_ && hwndCB !is null) {
+            if (OS.IsPPC && hwndCB !is null) {
                 item.dispose ();
             } else {
                 item.release (false);
@@ -1154,7 +1154,7 @@
     backgroundImage = null;
     if (hBrush is null) OS.DeleteObject (hBrush);
     hBrush = null;
-    if (OS.IsPPC_ && hwndCB !is null) {
+    if (OS.IsPPC && hwndCB !is null) {
         if (imageList !is null) {
             OS.SendMessage (hwndCB, OS.TB_SETIMAGELIST, 0, 0);
             display.releaseToolImageList (imageList);
@@ -1437,7 +1437,7 @@
 }
 
 void update () {
-    if (OS.IsPPC_ || OS.IsSP_) return;
+    if (OS.IsPPC || OS.IsSP) return;
     static if (OS.IsHPC) {
         /*
         * Each time a menu has been modified, the command menu bar
--- a/dwt/widgets/MenuItem.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/MenuItem.d	Tue Feb 05 14:31:31 2008 +0100
@@ -398,7 +398,7 @@
  */
 public bool getEnabled () {
     checkWidget ();
-    if ((OS.IsPPC_ || OS.IsSP_) && parent.hwndCB !is null) {
+    if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) {
         auto hwndCB = parent.hwndCB;
         TBBUTTONINFO info;
         info.cbSize = TBBUTTONINFO.sizeof;
@@ -478,7 +478,7 @@
 public bool getSelection () {
     checkWidget ();
     if ((style & (DWT.CHECK | DWT.RADIO)) is 0) return false;
-    if ((OS.IsPPC_ || OS.IsSP_) && parent.hwndCB !is null) return false;
+    if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) return false;
     auto hMenu = parent.handle;
     MENUITEMINFO info;
     info.cbSize = MENUITEMINFO.sizeof;
@@ -522,7 +522,7 @@
 }
 
 void releaseMenu () {
-    if (!OS.IsSP_) setMenu (null);
+    if (!OS.IsSP) setMenu (null);
     menu = null;
 }
 
@@ -663,7 +663,7 @@
  */
 public void setEnabled (bool enabled) {
     checkWidget ();
-    if ((OS.IsPPC_ || OS.IsSP_) && parent.hwndCB !is null) {
+    if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) {
         auto hwndCB = parent.hwndCB;
         TBBUTTONINFO info;
         info.cbSize = TBBUTTONINFO.sizeof;
@@ -733,7 +733,7 @@
     if ((style & DWT.SEPARATOR) !is 0) return;
     super.setImage (image);
     static if (OS.IsWinCE) {
-        if ((OS.IsPPC_ || OS.IsSP_) && parent.hwndCB !is null) {
+        if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) {
             int hwndCB = parent.hwndCB;
             TBBUTTONINFO info;
             info.cbSize = TBBUTTONINFO.sizeof;
@@ -811,13 +811,13 @@
     this.menu = menu;
 
     /* Assign the new menu in the OS */
-    if ((OS.IsPPC_ || OS.IsSP_) && parent.hwndCB !is null) {
-        if (OS.IsPPC_) {
+    if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) {
+        if (OS.IsPPC) {
             HWND hwndCB = parent.hwndCB;
             HMENU hMenu = menu is null ? null : menu.handle;
             OS.SendMessage (hwndCB, OS.SHCMBM_SETSUBMENU, id, hMenu);
         }
-        if (OS.IsSP_) error (DWT.ERROR_CANNOT_SET_MENU);
+        if (OS.IsSP) error (DWT.ERROR_CANNOT_SET_MENU);
     } else {
         /*
         * Feature in Windows.  When SetMenuItemInfo () is used to
@@ -951,7 +951,7 @@
 public void setSelection (bool selected) {
     checkWidget ();
     if ((style & (DWT.CHECK | DWT.RADIO)) is 0) return;
-    if ((OS.IsPPC_ || OS.IsSP_) && parent.hwndCB !is null) return;
+    if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) return;
     auto hMenu = parent.handle;
     if (OS.IsWinCE) {
         int index = parent.indexOf (this);
@@ -1030,7 +1030,7 @@
     auto hHeap = OS.GetProcessHeap ();
     TCHAR* pszText;
     bool success = false;
-    if ((OS.IsPPC_ || OS.IsSP_) && parent.hwndCB !is null) {
+    if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) {
         /*
         * Bug in WinCE PPC.  Tool items on the menubar don't resize
         * correctly when the character '&' is used (even when it
--- a/dwt/widgets/ProgressBar.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/ProgressBar.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.ProgressBar;
 
--- a/dwt/widgets/Sash.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Sash.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.Sash;
 
--- a/dwt/widgets/Scale.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Scale.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.Scale;
 
--- a/dwt/widgets/ScrollBar.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/ScrollBar.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.ScrollBar;
 
--- a/dwt/widgets/Scrollable.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Scrollable.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.Scrollable;
 
--- a/dwt/widgets/Shell.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Shell.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.Shell;
 
@@ -583,7 +585,7 @@
         int flags = OS.SWP_DRAWFRAME | OS.SWP_NOMOVE | OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_NOACTIVATE;
         SetWindowPos (handle, null, 0, 0, 0, 0, flags);
         static if (OS.IsWinCE) _setMaximized (true);
-        static if (OS.IsPPC_) {
+        static if (OS.IsPPC) {
             psai = new SHACTIVATEINFO ();
             psai.cbSize = SHACTIVATEINFO.sizeof;
         }
@@ -1747,7 +1749,7 @@
 }
 
 override char[] windowClass () {
-    static if (OS.IsSP_) return DialogClass;
+    static if (OS.IsSP) return DialogClass;
     if ((style & DWT.TOOL) !is 0) {
         int trim = DWT.TITLE | DWT.CLOSE | DWT.MIN | DWT.MAX | DWT.BORDER | DWT.RESIZE;
         if ((style & trim) is 0) return TCHARzToStr( display.windowShadowClass );
@@ -1757,7 +1759,7 @@
 
 override int windowProc () {
     if (windowProc_ !is null) return cast(int) windowProc_;
-    static if (OS.IsSP_) return cast(int) DialogProc;
+    static if (OS.IsSP) return cast(int) DialogProc;
     if ((style & DWT.TOOL) !is 0) {
         int trim = DWT.TITLE | DWT.CLOSE | DWT.MIN | DWT.MAX | DWT.BORDER | DWT.RESIZE;
         if ((style & trim) is 0) super.windowProc ();
@@ -1831,7 +1833,7 @@
 }
 
 override LRESULT WM_ACTIVATE (int wParam, int lParam) {
-    static if (OS.IsPPC_) {
+    static if (OS.IsPPC) {
         /*
         * Note: this does not work when we get WM_ACTIVATE prior
         * to adding a listener.
@@ -1879,7 +1881,7 @@
 }
 
 override LRESULT WM_COMMAND (int wParam, int lParam) {
-    static if (OS.IsPPC_) {
+    static if (OS.IsPPC) {
         /*
         * Note in WinCE PPC:  Close the Shell when the "Done Button" has
         * been pressed. lParam is either 0 (PocketPC 2002) or the handle
@@ -1901,7 +1903,7 @@
     * of the WM_COMMAND and set lParam to zero to pretend that the message
     * came from a real Windows menu, not a tool bar.
     */
-    static if (OS.IsPPC_ || OS.IsSP_) {
+    static if (OS.IsPPC || OS.IsSP) {
         if (menuBar !is null) {
             auto hwndCB = menuBar.hwndCB;
             if (lParam !is 0 && hwndCB !is null) {
@@ -2212,7 +2214,7 @@
 override LRESULT WM_SETTINGCHANGE (int wParam, int lParam) {
     LRESULT result = super.WM_SETTINGCHANGE (wParam, lParam);
     if (result !is LRESULT.NULL) return result;
-    static if (OS.IsPPC_) {
+    static if (OS.IsPPC) {
         if (wParam is OS.SPI_SETSIPINFO) {
             /*
             * The SIP is in a new state.  Cache its new value.
--- a/dwt/widgets/Slider.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Slider.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.Slider;
 
--- a/dwt/widgets/Spinner.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Spinner.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.Spinner;
 
--- a/dwt/widgets/TabFolder.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/TabFolder.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.TabFolder;
 
@@ -181,7 +183,7 @@
     * When the DWT.TOP style has not been set, force the
     * tabs to be on the bottom for tab folders on PPC.
     */
-    if (OS.IsPPC_) {
+    if (OS.IsPPC) {
         if ((style & DWT.TOP) is 0) style |= DWT.BOTTOM;
     }
     style = checkBits (style, DWT.TOP, DWT.BOTTOM, 0, 0, 0, 0);
@@ -267,7 +269,7 @@
     state &= ~(CANVAS | THEME_BACKGROUND);
 
     /* Enable the flat look for tab folders on PPC */
-    if (OS.IsPPC_) {
+    if (OS.IsPPC) {
         OS.SendMessage (handle, OS.CCM_SETVERSION, 0x020c /*COMCTL32_VERSION*/, 0);
     }
 
--- a/dwt/widgets/TabItem.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/TabItem.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.TabItem;
 
--- a/dwt/widgets/Table.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Table.d	Tue Feb 05 14:31:31 2008 +0100
@@ -6116,13 +6116,13 @@
             * TRUE when receiving the Pocket PC 2002 specific NM_RECOGNIZEGESTURE
             * message.
             */
-            if (OS.IsPPC_) {
+            if (OS.IsPPC) {
                 bool hasMenu = menu !is null && !menu.isDisposed ();
                 if (!hasMenu && !hooks (DWT.MenuDetect)) return LRESULT.ONE;
             }
             break;
         case OS.GN_CONTEXTMENU:
-            if (OS.IsPPC_) {
+            if (OS.IsPPC) {
                 bool hasMenu = menu !is null && !menu.isDisposed ();
                 if (hasMenu || hooks (DWT.MenuDetect)) {
                     NMRGINFO* nmrg = cast(NMRGINFO*)lParam;
--- a/dwt/widgets/Text.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Text.d	Tue Feb 05 14:31:31 2008 +0100
@@ -2117,7 +2117,7 @@
     * tab keys.  The fix is to return the value which is normally
     * returned by the text window proc on other versions of Windows.
     */
-    if (OS.IsPPC_) {
+    if (OS.IsPPC) {
         if ((style & DWT.MULTI) !is 0 && (style & DWT.READ_ONLY) is 0 && lParam is 0) {
             return cast(LRESULT) (OS.DLGC_HASSETSEL | OS.DLGC_WANTALLKEYS | OS.DLGC_WANTCHARS);
         }
@@ -2214,7 +2214,7 @@
 
 override LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {
     static if( OS.IsWinCE )
-    if (OS.IsPPC_) {
+    if (OS.IsPPC) {
         LRESULT result = LRESULT.NULL;
         Display display = this.display;
         display.captureChanged = false;
--- a/dwt/widgets/Tree.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Tree.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7190,14 +7190,14 @@
             * TRUE when receiving the Pocket PC 2002 specific NM_RECOGNIZEGESTURE
             * message.
             */
-            if (OS.IsPPC_) {
+            if (OS.IsPPC) {
                 bool hasMenu = menu !is null && !menu.isDisposed ();
                 if (!hasMenu && !hooks (DWT.MenuDetect)) return LRESULT.ONE;
             }
             break;
         }
         case OS.GN_CONTEXTMENU: {
-            if (OS.IsPPC_) {
+            if (OS.IsPPC) {
                 bool hasMenu = menu !is null && !menu.isDisposed ();
                 if (hasMenu || hooks (DWT.MenuDetect)) {
                     NMRGINFO* nmrg = cast(NMRGINFO*)lParam;
--- a/dwt/widgets/Widget.d	Tue Feb 05 04:03:25 2008 +0100
+++ b/dwt/widgets/Widget.d	Tue Feb 05 14:31:31 2008 +0100
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Port to the D programming language:
+ *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
 module dwt.widgets.Widget;
 
@@ -1780,7 +1782,7 @@
         result = LRESULT.ZERO;
     }
     static if( OS.IsWinCE ){
-        if (OS.IsPPC_) {
+        if (OS.IsPPC) {
             /*
             * Note: On WinCE PPC, only attempt to recognize the gesture for
             * a context menu when the control contains a valid menu or there