Changeset 40

Show
Ignore:
Timestamp:
08/20/04 01:01:57 (4 years ago)
Author:
andy
Message:

Added some libraries and dwt/events/ to SConstruct.

Changed lots of win32 function arguments to pointer arguments, changed the MoveMemory? stuff around. (TODO: eradicate MoveMemory?)

IT *LIVES*!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/SConstruct

    r36 r40  
    77 
    88SRC = ( 
    9     glob('dwt/*.d') +  
     9    glob('dwt/*.d') + 
    1010    glob('dwt/accessibility/*.d') + 
    1111    glob('dwt/internal/win32/*.d') + 
     
    1313    glob('dwt/util/*.d') + 
    1414    glob('dwt/graphics/*.d') + 
    15     glob('dwt/widgets/*.d')  
     15    glob('dwt/events/*.d') + 
     16    glob('dwt/widgets/*.d') 
    1617) 
    1718 
     
    1920 
    2021if 'win32' in sys.platform: 
     22    env.Append(LIBS=['gdi32', 'imm32', 'msimg32', 'Advapi32', 'comctl32']) 
    2123    env.Append(DVERSIONS=['Win32','Unicode']) 
     24    #env.Append(DLINKFLAGS='-L/exet:nt/su:windows:4.0') 
    2225    SRC += glob('dwt/*/win32/*.d') # ooo 
    2326 
    2427 
    2528elif 'linux' in sys.platform: 
    26     env.Append(DVERSIONS=['unix', 'linux'])  
     29    env.Append(DVERSIONS=['unix', 'linux']) 
    2730    SRC += glob('dwt/*/gtk/*.d') 
    2831 
    29 env.Program(SRC) 
     32env.Program('HelloDWT', SRC) 
  • trunk/src/dwt/events/armevent.d

    r38 r40  
    1212 
    1313private import dwt.events.typedevent; 
     14private import dwt.widgets.event; 
    1415 
    1516/** 
     
    2223public final class ArmEvent : TypedEvent { 
    2324 
    24     private import dwt.widgets.event; 
    2525     
    2626/** 
  • trunk/src/dwt/events/helplistener.d

    r38 r40  
    1212 
    1313private import dwt.internal.dwteventlistener; 
     14private import dwt.events.helpevent; 
    1415 
    1516/** 
     
    3031public interface HelpListener : DWTEventListener { 
    3132 
    32     private import dwt.events.helpevent; 
    3333 
    3434/** 
  • trunk/src/dwt/events/mouselistener.d

    r38 r40  
    1111module dwt.events.mouselistener; 
    1212 
    13 private import dwt.internal.dwteventlistener; 
     13private { 
     14    import dwt.internal.dwteventlistener; 
     15    import dwt.events.mouseevent; 
     16
    1417 
    1518/** 
     
    3033 */ 
    3134public interface MouseListener : DWTEventListener { 
    32  
    33     private import dwt.events.mouseevent; 
    3435 
    3536/** 
  • trunk/src/dwt/events/verifyevent.d

    r38 r40  
    1212 
    1313private import dwt.events.keyevent; 
     14private import dwt.widgets.event; 
     15private import dwt.util.util; 
    1416 
    1517/** 
     
    2022 */ 
    2123public final class VerifyEvent : KeyEvent { 
    22  
    23     private import dwt.widgets.event; 
    24     private import dwt.util.util; 
    2524     
    2625    /** 
  • trunk/src/dwt/graphics/cursor.d

    r33 r40  
    6666    private import dwt.internal.win32.os; 
    6767    private import dwt.internal.win32.types; 
    68          
     68 
    6969    /** 
    7070     * the handle to the OS cursor resource 
     
    205205 * @see SWT#CURSOR_HAND 
    206206 */ 
     207 
    207208public this(Device device, int style) { 
    208209    if (device == null) device = Device.getDevice(); 
     
    247248            int hInst = OS.GetModuleHandle(null); 
    248249            if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    249             handle = OS.CreateCursor(hInst, 5, 0, 32, 32, &HAND_SOURCE, &HAND_MASK); 
     250            handle = OS.CreateCursor(hInst, 5, 0, 32, 32, HAND_SOURCE, HAND_MASK); 
    250251 
    251252        } 
     
    313314    int hInst = OS.GetModuleHandle(null); 
    314315    if (OS.IsWinCE) DWT.error(DWT.ERROR_NOT_IMPLEMENTED); 
    315     handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, &source.data, &mask.data); 
     316    handle = OS.CreateCursor(hInst, hotspotX, hotspotY, source.width, source.height, source.data, mask.data); 
    316317    if (handle == 0) DWT.error(DWT.ERROR_NO_HANDLES); 
    317318    if (device.tracking) device.new_Object(this); 
     
    346347 */ 
    347348public this(Device device, ImageData source, int hotspotX, int hotspotY) { 
    348     if (device == null) device = Device.getDevice(); 
     349    /+if (device == null) device = Device.getDevice(); 
    349350    if (device == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
    350351    this.device = device; 
     
    360361    int hMask = result[1]; 
    361362    /* Create the icon */ 
     363    +/ 
    362364    ICONINFO info; 
    363365    info.fIcon = true; 
    364     info.hbmColor = hBitmap; 
     366    /+info.hbmColor = hBitmap; 
    365367    info.hbmMask = hMask; 
    366368    handle = OS.CreateIconIndirect(&info); 
     
    369371    OS.DeleteObject(hMask); 
    370372    isIcon = true; 
    371     if (device.tracking) device.new_Object(this); 
     373    if (device.tracking) device.new_Object(this);+/ 
    372374} 
    373375 
  • trunk/src/dwt/internal/win32/func.d

    r38 r40  
    4545 
    4646    int CreateCompatibleDC (int hdc); 
    47     int CreateCursor (int hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte[]* pvANDPlane, byte[]* pvXORPlane); 
     47    int CreateCursor (int hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte* pvANDPlane, byte* pvXORPlane); 
    4848    int CreateDCW (wchar* lpszDriver, wchar* lpszDevice, int lpszOutput, int lpInitData); 
    4949    int CreateDCA (char* lpszDriver, char* lpszDevice, int lpszOutput, int lpInitData); 
     
    5353    int CreateIconIndirect (ICONINFO* lplf); 
    5454    int CreateMenu (); 
    55     int CreatePalette (byte[] logPalette); 
     55    int CreatePalette (byte* logPalette); 
    5656    int CreatePatternBrush (int colorRef); 
    5757    int CreatePen (int fnPenStyle, int nWidth, int crColor); 
    58     int CreatePolygonRgn(int[] lppt, int cPoints, int fnPolyFillMode); 
     58    int CreatePolygonRgn(int* lppt, int cPoints, int fnPolyFillMode); 
    5959    int CreatePopupMenu (); 
    6060    int CreateRectRgn (int left, int top, int right, int bottom); 
    6161    int CreateSolidBrush (int colorRef); 
    62     int CreateStreamOnHGlobal(int hGlobal, BOOL fDeleteOnRelease, int[] ppstm); 
     62    int CreateStreamOnHGlobal(int hGlobal, BOOL fDeleteOnRelease, int* ppstm); 
    6363    int CreateWindowExW (int dwExStyle, wchar* lpClassName, wchar* lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hWndParent, int hMenu, int hInstance, CREATESTRUCT* lpParam); 
    6464    int CreateWindowExA (int dwExStyle, char* lpClassName, char* lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hWndParent, int hMenu, int hInstance, CREATESTRUCT* lpParam); 
     
    113113    int ExpandEnvironmentStringsW (wchar* lpSrc, wchar* lsDst, int nSize); 
    114114    int ExpandEnvironmentStringsA (char* lpSrc, char* lsDst, int nSize); 
    115     BOOL ExtTextOutW(int hdc, int X, int Y, int fuOptions, RECT* lprc, wchar* lpString, int cbCount, int[] lpDx); 
    116     BOOL ExtTextOutA(int hdc, int X, int Y, int fuOptions, RECT* lprc, char* lpString, int cbCount, int[] lpDx); 
    117     int ExtractIconExW (wchar* lpszFile, int nIconIndex, int [] phiconLarge, int [] phiconSmall, int nIcons); 
    118     int ExtractIconExA (char* lpszFile, int nIconIndex, int [] phiconLarge, int [] phiconSmall, int nIcons); 
     115    BOOL ExtTextOutW(int hdc, int X, int Y, int fuOptions, RECT* lprc, wchar* lpString, int cbCount, int* lpDx); 
     116    BOOL ExtTextOutA(int hdc, int X, int Y, int fuOptions, RECT* lprc, char* lpString, int cbCount, int* lpDx); 
     117    int ExtractIconExW (wchar* lpszFile, int nIconIndex, int* phiconLarge, int* phiconSmall, int nIcons); 
     118    int ExtractIconExA (char* lpszFile, int nIconIndex, int* phiconLarge, int* phiconSmall, int nIcons); 
    119119    int FillRect(int hDC, RECT* lprc, int hbr); 
    120120    int FindWindowA (char* lpClassName, char* lpWindowName); 
     
    126126    int GetCapture (); 
    127127    BOOL GetCaretPos (POINT* lpPoint); 
    128     BOOL GetCharABCWidthsA (int hdc, int iFirstChar, int iLastChar, int [] lpabc); 
    129     BOOL GetCharABCWidthsW (int hdc, int iFirstChar, int iLastChar, int [] lpabc); 
     128    BOOL GetCharABCWidthsA (int hdc, int iFirstChar, int iLastChar, int* lpabc); 
     129    BOOL GetCharABCWidthsW (int hdc, int iFirstChar, int iLastChar, int* lpabc); 
    130130    int GetCharacterPlacementW(int hdc, wchar* lpString, int nCount, int nMaxExtent, GCP_RESULTS* lpResults, int dwFlags); 
    131131    int GetCharacterPlacementA(int hdc, char* lpString, int nCount, int nMaxExtent, GCP_RESULTS* lpResults, int dwFlags); 
    132     BOOL GetCharWidthA (int hdc, int iFirstChar, int iLastChar, int [] lpBuffer); 
    133     BOOL GetCharWidthW (int hdc, int iFirstChar, int iLastChar, int [] lpBuffer); 
     132    BOOL GetCharWidthA (int hdc, int iFirstChar, int iLastChar, int* lpBuffer); 
     133    BOOL GetCharWidthW (int hdc, int iFirstChar, int iLastChar, int* lpBuffer); 
    134134    BOOL GetClassInfoW (int hInstance, wchar* lpClassName, WNDCLASS* lpWndClass); 
    135135    BOOL GetClassInfoA (int hInstance, char* lpClassName, WNDCLASS* lpWndClass); 
     
    158158    int GetFontLanguageInfo(int hdc); 
    159159    BOOL GetIconInfo (int hIcon, ICONINFO* piconinfo); 
    160     int GetKeyboardLayoutList(int nBuff, int[] lpList); 
     160    int GetKeyboardLayoutList(int nBuff, int* lpList); 
    161161    int GetKeyboardLayout(int idThread);short GetKeyState (int nVirtKey); 
    162162    BOOL GetKeyboardState (char* lpKeyState); 
     
    167167    int GetLayout (int hdc); 
    168168    /* returns the instance handle to the swt library */ 
    169     int GetLibraryHandle (); 
     169    //int GetLibraryHandle (); 
    170170    int GetLocaleInfoW (int Locale, int LCType, wchar* lpLCData, int cchData); 
    171171    int GetLocaleInfoA (int Locale, int LCType, char* lpLCData, int cchData); 
     
    202202    BOOL GetOpenFileNameW (OPENFILENAME* lpofn); 
    203203    BOOL GetOpenFileNameA (OPENFILENAME* lpofn); 
    204     int GetPaletteEntries (int hPalette, int iStartIndex, int nEntries, byte[] logPalette); 
     204    int GetPaletteEntries (int hPalette, int iStartIndex, int nEntries, byte* logPalette); 
    205205    int GetParent (int hWnd); 
    206206    int GetPixel (int hdc, int x, int y); 
    207     int GetProcAddress (int hModule, char[]* lpProcName); 
     207    int GetProcAddress (int hModule, char* lpProcName); 
    208208    int GetProcessHeap (); 
    209209    int GetProfileStringW (wchar* lpAppName, wchar* lpKeyName, wchar* lpDefault, wchar* lpReturnedString, int nSize); 
    210210    int GetProfileStringA (char* lpAppName, char* lpKeyName, char* lpDefault, char* lpReturnedString, int nSize); 
    211     int GetRegionData (int hRgn, int dwCount, int [] lpRgnData); 
     211    int GetRegionData (int hRgn, int dwCount, int* lpRgnData); 
    212212    int GetRgnBox (int hrgn, RECT* lprc); 
    213213    int GetROP2 (int hdc); 
     
    220220    int GetSystemMenu (int hWnd, BOOL bRevert); 
    221221    int GetSystemMetrics (int nIndex); 
    222     int GetSystemPaletteEntries(int hdc, int iStartIndex, int nEntries, byte[] lppe); 
     222    int GetSystemPaletteEntries(int hdc, int iStartIndex, int nEntries, byte* lppe); 
    223223    int GetTextColor (int hDC); 
    224224    BOOL GetTextExtentPoint32W (int hdc, wchar* lpString, int cbString, SIZE* lpSize); 
     
    240240    int GetWindowTextLengthW (int hWnd); 
    241241    int GetWindowTextLengthA (int hWnd); 
    242     int GetWindowThreadProcessId (int hWnd, int [] lpdwProcessId); 
     242    int GetWindowThreadProcessId (int hWnd, int* lpdwProcessId); 
    243243    int GlobalAlloc (int uFlags, int dwBytes); 
    244244    int GlobalFree (int hMem); 
     
    255255    BOOL ImageList_Destroy (int himl); 
    256256    int ImageList_GetIcon (int himl, int i, int flags); 
    257     BOOL ImageList_GetIconSize (int himl, int [] cx, int [] cy); 
     257    BOOL ImageList_GetIconSize (int himl, int* cx, int* cy); 
    258258    int ImageList_GetImageCount (int himl); 
    259259    BOOL ImageList_Remove (int himl, int i); 
     
    262262    BOOL ImageList_SetIconSize (int himl, int cx, int cy); 
    263263    int ImmAssociateContext (int hWnd, int hIMC); 
    264     int ImmCreateContext (); 
     264    int ImmCreateContext () { assert(false); return 0; } 
    265265    BOOL ImmDestroyContext (int hIMC); 
    266     BOOL ImmGetCompositionFontW (int hIMC, LOGFONTW* lplf); 
    267     BOOL ImmGetCompositionFontA (int hIMC, LOGFONTA* lplf); 
    268     int ImmGetCompositionStringW (int hIMC, int dwIndex, wchar* lpBuf, int dwBufLen); 
    269     int ImmGetCompositionStringA (int hIMC, int dwIndex, char* lpBuf, int dwBufLen); 
     266    BOOL ImmGetCompositionFontW (int hIMC, LOGFONTW* lplf) { assert(false); return 0; } 
     267    BOOL ImmGetCompositionFontA (int hIMC, LOGFONTA* lplf) { assert(false); return 0; } 
     268    int ImmGetCompositionStringW (int hIMC, int dwIndex, wchar* lpBuf, int dwBufLen)  { assert(false); return 0; } 
     269    int ImmGetCompositionStringA (int hIMC, int dwIndex, char* lpBuf, int dwBufLen)  { assert(false); return 0; } 
    270270    int ImmGetContext (int hWnd); 
    271     BOOL ImmGetConversionStatus (int hIMC, int [] lpfdwConversion, int [] lpfdwSentence); 
     271    BOOL ImmGetConversionStatus (int hIMC, int* lpfdwConversion, int* lpfdwSentence); 
    272272    int ImmGetDefaultIMEWnd (int hWnd); 
    273273    BOOL ImmGetOpenStatus (int hIMC); 
    274     BOOL ImmReleaseContext (int hWnd, int hIMC); 
     274    BOOL ImmReleaseContext (int hWnd, int hIMC) { assert(false); return 0; } 
    275275    BOOL ImmSetCompositionFontW (int hIMC, LOGFONTW* lplf); 
    276276    BOOL ImmSetCompositionFontA (int hIMC, LOGFONTA* lplf); 
    277     BOOL ImmSetCompositionWindow (int hIMC, COMPOSITIONFORM lpCompForm); 
     277    BOOL ImmSetCompositionWindow (int hIMC, COMPOSITIONFORM* lpCompForm); 
    278278    BOOL ImmSetConversionStatus (int hIMC, int fdwConversion, int dwSentence); 
    279279    BOOL ImmSetOpenStatus (int hIMC, BOOL fOpen); 
     
    319319     +/ 
    320320 
    321     // :P 
    322     //void MoveMemory(void* destination, void* source, int length); 
    323  
    324     void MoveMemory (char[] Destination, int SourcePtr, int Length); 
     321/* 
     322    void MoveMemory (void* destination, void* source, int length); 
     323    void MoveMemory (char* Destination, int SourcePtr, int Length); 
    325324    void MoveMemory (char* Destination, int Source, int Length); 
    326325    void MoveMemory (char* Destination, ACCEL Source, int Length); 
    327326    void MoveMemory (char* Destination, BITMAPINFOHEADER Source, int Length); 
    328     void MoveMemory (int [] Destination, int Source, int Length); 
    329     void MoveMemory (int Destination, byte[] Source, int Length); 
     327    void MoveMemory (int* Destination, int Source, int Length); 
     328    void MoveMemory (int Destination, byte* Source, int Length); 
    330329//    void MoveMemory (int Destination, char* Source, int Length); 
    331330    void MoveMemory (int Destination, wchar* Source, int Length); 
    332     void MoveMemory (int Destination, int [] Source, int Length); 
     331    void MoveMemory (int Destination, int* Source, int Length); 
    333332    void MoveMemory (int Destination, GRADIENT_RECT Source, int Length); 
    334333    void MoveMemory (int Destination, LOGFONTW Source, int Length); 
     
    367366    void MoveMemory (MSG Destination, int Source, int Length); 
    368367    //void MoveMemory(int Destination, DROPFILES Source, int Length); 
    369     void MoveMemory(double[] Destination, int SourcePtr, int Length); 
    370     void MoveMemory(float[] Destination, int SourcePtr, int Length); 
    371     void MoveMemory(short[] Destination, int SourcePtr, int Length); 
    372     void MoveMemory(int DestinationPtr, double[] Source, int Length); 
    373     void MoveMemory(int DestinationPtr, float[] Source, int Length); 
    374     void MoveMemory(int DestinationPtr, short[] Source, int Length); 
    375  
     368    void MoveMemory(double* Destination, int SourcePtr, int Length); 
     369    void MoveMemory(float* Destination, int SourcePtr, int Length); 
     370    void MoveMemory(short* Destination, int SourcePtr, int Length); 
     371    void MoveMemory(int DestinationPtr, double* Source, int Length); 
     372    void MoveMemory(int DestinationPtr, float* Source, int Length); 
     373    void MoveMemory(int DestinationPtr, short* Source, int Length); 
     374*/ 
    376375 
    377376    BOOL MoveToEx (int hdc,int x1, int x2, int lPoint); 
     
    386385    BOOL PeekMessageA (MSG* lpMsg, int hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg); 
    387386    BOOL Pie (int hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nXStartArc, int nYStartArc, int nXEndArc, int nYEndArc); 
    388     BOOL Polygon (int hdc, int [] points, int nPoints); 
    389     BOOL Polyline (int hdc,int[] points, int nPoints); 
     387    BOOL Polygon (int hdc, int* points, int nPoints); 
     388    BOOL Polyline (int hdc,int* points, int nPoints); 
    390389    BOOL PostMessageW (int hWnd, int Msg, int wParam, int lParam); 
    391390    BOOL PostMessageA (int hWnd, int Msg, int wParam, int lParam); 
     
    394393    BOOL PrintDlgW (PRINTDLG lppd); 
    395394    BOOL PrintDlgA (PRINTDLG lppd); 
    396     BOOL PtInRect (RECT* rect, POINT* pt); 
     395    BOOL PtInRect (RECT* rect, POINT pt); 
    397396    BOOL PtInRegion (int hrgn, int X, int Y); 
    398397    int RealizePalette(int hDC); 
     
    403402    int RegisterClassW (WNDCLASS* lpWndClass); 
    404403    int RegisterClassA (WNDCLASS* lpWndClass); 
    405     int RegEnumKeyExW (int hKey, int dwIndex, wchar* lpName, int [] lpcName, int [] lpReserved, wchar* lpClass, int [] lpcClass, FILETIME* lpftLastWriteTime); 
     404    int RegEnumKeyExW (int hKey, int dwIndex, wchar* lpName, int* lpcName, int* lpReserved, wchar* lpClass, int* lpcClass, FILETIME* lpftLastWriteTime); 
    406405    int RegisterClipboardFormatA (char* lpszFormat); 
    407406    int RegisterClipboardFormatW (wchar* lpszFormat); 
    408     int RegOpenKeyExW (int hKey, wchar* lpSubKey, int ulOptions, int samDesired, int[] phkResult); 
    409     int RegQueryInfoKeyW (int hKey, int lpClass, int[] lpcbClass, int lpReserved, int[] lpSubKeys, int[] lpcbMaxSubKeyLen, int[] lpcbMaxClassLen, int[] lpcValues, int[] lpcbMaxValueNameLen, int[] lpcbMaxValueLen, int[] lpcbSecurityDescriptor, int lpftLastWriteTime); 
    410     int RegQueryValueExW (int hKey, wchar* lpValueName, int lpReserved, int[] lpType, wchar* lpData, int[] lpcbData); 
    411     int RegEnumKeyExA (int hKey, int dwIndex, char* lpName, int [] lpcName, int [] lpReserved, char* lpClass, int [] lpcClass, FILETIME* lpftLastWriteTime); 
    412     int RegOpenKeyExA (int hKey, char* lpSubKey, int ulOptions, int samDesired, int[] phkResult); 
    413     int RegQueryInfoKeyA (int hKey, int lpClass, int[] lpcbClass, int lpReserved, int[] lpSubKeys, int[] lpcbMaxSubKeyLen, int[] lpcbMaxClassLen, int[] lpcValues, int[] lpcbMaxValueNameLen, int[] lpcbMaxValueLen, int[] lpcbSecurityDescriptor, int lpftLastWriteTime); 
    414     int RegQueryValueExA (int hKey, char* lpValueName, int lpReserved, int[] lpType, char* lpData, int[] lpcbData); 
     407    int RegOpenKeyExW (int hKey, wchar* lpSubKey, int ulOptions, int samDesired, int* phkResult); 
     408    int RegQueryInfoKeyW (int hKey, int lpClass, int* lpcbClass, int lpReserved, int* lpSubKeys, int* lpcbMaxSubKeyLen, int* lpcbMaxClassLen, int* lpcValues, int* lpcbMaxValueNameLen, int* lpcbMaxValueLen, int* lpcbSecurityDescriptor, int lpftLastWriteTime); 
     409    int RegQueryValueExW (int hKey, wchar* lpValueName, int lpReserved, int* lpType, wchar* lpData, int* lpcbData); 
     410    int RegEnumKeyExA (int hKey, int dwIndex, char* lpName, int* lpcName, int* lpReserved, char* lpClass, int* lpcClass, FILETIME* lpftLastWriteTime); 
     411    int RegOpenKeyExA (int hKey, char* lpSubKey, int ulOptions, int samDesired, int* phkResult); 
     412    int RegQueryInfoKeyA (int hKey, int lpClass, int* lpcbClass, int lpReserved, int* lpSubKeys, int* lpcbMaxSubKeyLen, int* lpcbMaxClassLen, int* lpcValues, int* lpcbMaxValueNameLen, int* lpcbMaxValueLen, int* lpcbSecurityDescriptor, int lpftLastWriteTime); 
     413    int RegQueryValueExA (int hKey, char* lpValueName, int lpReserved, int* lpType, char* lpData, int* lpcbData); 
    415414    BOOL ReleaseCapture (); 
    416415    int ReleaseDC (int hWnd, int hDC); 
     
    423422    int SelectPalette(int hDC, int hpal, BOOL bForceBackground); 
    424423 
    425 //    int SendMessageW (int hWnd, int msg, int wparam, int lparam); 
    426 //    int SendMessageA (int hWnd, int msg, int wparam, int lparam); 
     424    int SendMessageW (int hWnd, int msg, int wparam, int lparam); 
     425    int SendMessageA (int hWnd, int msg, int wparam, int lparam); 
    427426 
    428427    // D doesn't allow extern(Windows) functions to be overloaded in this manner 
    429 //    /
    430     int SendMessageW (int hWnd, int Msg, int [] wParam, int [] lParam); 
    431     int SendMessageW (int hWnd, int Msg, int [] wParam, int lParam); 
     428/
     429    int SendMessageW (int hWnd, int Msg, int* wParam, int* lParam); 
     430    int SendMessageW (int hWnd, int Msg, int* wParam, int lParam); 
    432431    int SendMessageW (int hWnd, int Msg, int wParam, wchar* lParam); 
    433     int SendMessageW (int hWnd, int Msg, int wParam, int [] lParam); 
    434     int SendMessageW (int hWnd, int Msg, int wParam, short [] lParam); 
     432    int SendMessageW (int hWnd, int Msg, int wParam, int* lParam); 
     433    int SendMessageW (int hWnd, int Msg, int wParam, short* lParam); 
    435434    int SendMessageW (int hWnd, int Msg, int wParam, int lParam); 
    436435    int SendMessageW (int hWnd, int Msg, int wParam, LVCOLUMN* lParam); 
     
    446445    int SendMessageW (int hWnd, int Msg, int wParam, TVINSERTSTRUCT* lParam); 
    447446    int SendMessageW (int hWnd, int Msg, int wParam, TVITEM* lParam); 
    448     int SendMessageA (int hWnd, int Msg, int [] wParam, int [] lParam); 
    449     int SendMessageA (int hWnd, int Msg, int [] wParam, int lParam); 
     447    int SendMessageA (int hWnd, int Msg, int* wParam, int* lParam); 
     448    int SendMessageA (int hWnd, int Msg, int* wParam, int lParam); 
    450449    int SendMessageA (int hWnd, int Msg, int wParam, char* lParam); 
    451     int SendMessageA (int hWnd, int Msg, int wParam, int [] lParam); 
    452     int SendMessageA (int hWnd, int Msg, int wParam, short [] lParam); 
     450    int SendMessageA (int hWnd, int Msg, int wParam, int* lParam); 
     451    int SendMessageA (int hWnd, int Msg, int wParam, short* lParam); 
    453452    int SendMessageA (int hWnd, int Msg, int wParam, int lParam); 
    454453    int SendMessageA (int hWnd, int Msg, int wParam, LVCOLUMN* lParam); 
     
    464463    int SendMessageA (int hWnd, int Msg, int wParam, TVINSERTSTRUCT* lParam); 
    465464    int SendMessageA (int hWnd, int Msg, int wParam, TVITEM* lParam); 
    466 //    */ 
     465*/ 
    467466 
    468467    int SetActiveWindow (int hWnd); 
     
    474473    int SetCursor (int hCursor); 
    475474    BOOL SetCursorPos (int X, int Y); 
    476     int SetDIBColorTable (int hdc, int uStartIndex, int cEntries, byte[] pColors); 
     475    int SetDIBColorTable (int hdc, int uStartIndex, int cEntries, byte* pColors); 
    477476    int SetErrorMode (int uMode); 
    478477    int SetFocus (int hWnd); 
     
    484483    BOOL SetMenuItemInfoW (int hMenu, int uItem, BOOL fByPosition, MENUITEMINFO* lpmii); 
    485484    BOOL SetMenuItemInfoA (int hMenu, int uItem, BOOL fByPosition, MENUITEMINFO* lpmii); 
    486     int SetPaletteEntries (int hPal, int iStart, int cEntries, byte[] lppe); 
     485    int SetPaletteEntries (int hPal, int iStart, int cEntries, byte* lppe); 
    487486    int SetParent (int hWndChild, int hWndNewParent); 
    488487    int SetPixel (int hdc, int X, int Y, int crColor); 
     
    504503    int SetWindowsHookExW (int idHook, int lpfn,  int hMod,  int dwThreadId); 
    505504    int SetWindowsHookExA (int idHook, int lpfn,  int hMod,  int dwThreadId); 
     505    BOOL ShellExecuteExW (SHELLEXECUTEINFO* lpExecInfo); 
     506    BOOL ShellExecuteExA (SHELLEXECUTEINFO* lpExecInfo); 
     507    int SHGetMalloc (int* ppMalloc); 
     508    BOOL SHGetPathFromIDListW (int pidl, wchar* pszPath); 
     509    BOOL SHGetPathFromIDListA (int pidl, char* pszPath); 
     510    BOOL SHSetAppKeyWndAssoc(byte bVk, int hwnd); 
    506511    int SHBrowseForFolderW (BROWSEINFO* lpbi); 
    507512    int SHBrowseForFolderA (BROWSEINFO* lpbi); 
    508     BOOL SHCreateMenuBar(SHMENUBARINFO* pmb); 
     513    version (none) BOOL SHCreateMenuBar(SHMENUBARINFO* pmb); 
    509514    BOOL SHHandleWMSettingChange (int hwnd, int wParam, int lParam, SHACTIVATEINFO* psai); 
    510515    int SHRecognizeGesture(SHRGINFO* shrg); 
    511516    void SHSendBackToFocusWindow (int uMsg, int wp, int lp); 
    512     BOOL SHSipPreference (int hwnd, int st); 
    513     BOOL ShellExecuteExW (SHELLEXECUTEINFO* lpExecInfo); 
    514     BOOL ShellExecuteExA (SHELLEXECUTEINFO* lpExecInfo); 
    515     int SHGetMalloc (int [] ppMalloc); 
    516     BOOL SHGetPathFromIDListW (int pidl, wchar* pszPath); 
    517     BOOL SHGetPathFromIDListA (int pidl, char* pszPath); 
    518     BOOL SHSetAppKeyWndAssoc(byte bVk, int hwnd); 
    519517    BOOL ShowCaret (int hWnd); 
    520518    BOOL ShowOwnedPopups (int hWnd, BOOL fShow); 
    521519    BOOL ShowScrollBar (int hWnd, int wBar, BOOL bShow); 
    522520    BOOL ShowWindow (int hWnd, int nCmdShow); 
    523     BOOL SipGetInfo (SIPINFO* pSipInfo); 
     521 
     522    version (WindowsCE) { 
     523        BOOL SHSipPreference (int hwnd, int st); 
     524        BOOL SipGetInfo (SIPINFO* pSipInfo); 
     525    } 
     526 
    524527    int StartDocW (int hdc, DOCINFO* lpdi); 
    525528    int StartDocA (int hdc, DOCINFO* lpdi); 
     
    534537    BOOL SystemParametersInfoW (int uiAction, int uiParam, NONCLIENTMETRICSW* pvParam, int fWinIni); 
    535538    BOOL SystemParametersInfoA (int uiAction, int uiParam, NONCLIENTMETRICSA* pvParam, int fWinIni); 
    536     BOOL SystemParametersInfoW (int uiAction, int uiParam, int[] pvParam, int fWinIni); 
    537     BOOL SystemParametersInfoA (int uiAction, int uiParam, int[] pvParam, int fWinIni); 
    538  
    539     int ToAscii(int uVirtKey, int uScanCode, byte[]* lpKeyState, char[]* lpChar, int uFlags); 
    540     int ToUnicode(int wVirtKey, int wScanCode, byte[]* lpKeyState, wchar* pwszBuff, int cchBuff, int wFlags); 
     539    BOOL SystemParametersInfoW (int uiAction, int uiParam, int* pvParam, int fWinIni); 
     540    BOOL SystemParametersInfoA (int uiAction, int uiParam, int* pvParam, int fWinIni); 
     541 
     542    int ToAscii(int uVirtKey, int uScanCode, byte* lpKeyState, char* lpChar, int uFlags); 
     543    int ToUnicode(int wVirtKey, int wScanCode, byte* lpKeyState, wchar* pwszBuff, int cchBuff, int wFlags); 
    541544    BOOL TrackMouseEvent(TRACKMOUSEEVENT* lpEventTrack); 
    542545    BOOL TrackPopupMenu (int hMenu, int uFlags, int x, int y, int nReserved, int hWnd, RECT* prcRect); 
    543     int TranslateAcceleratorW (int hWnd, int hAccTable, MSG lpMsg); 
    544     int TranslateAcceleratorA (int hWnd, int hAccTable, MSG lpMsg); 
    545     BOOL TranslateCharsetInfo(int lpSrc, int [] lpCs, int dwFlags); 
    546     BOOL TranslateMDISysAccel (int hWndClient, MSG lpMsg); 
     546    int TranslateAcceleratorW (int hWnd, int hAccTable, MSG* lpMsg); 
     547    int TranslateAcceleratorA (int hWnd, int hAccTable, MSG* lpMsg); 
     548    BOOL TranslateCharsetInfo(int lpSrc, int* lpCs, int dwFlags); 
     549    BOOL TranslateMDISysAccel (int hWndClient, MSG* lpMsg); 
    547550    BOOL TranslateMessage(MSG* lpmsg); 
    548551    BOOL TransparentImage (int hdcDest, int DstX, int DstY, int DstCx, int DstCy,int hSrc, int SrcX, int SrcY, int SrcCx, int SrcCy, int TransparentColor);BOOL UnhookWindowsHookEx(int hhk); 
     
    555558    int VtblCall (int ppVtbl, int fnNumber, int arg0); 
    556559    BOOL WaitMessage (); 
    557     int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, char* lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL [] lpUsedDefaultChar); 
    558     int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, int lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL [] lpUsedDefaultChar); 
     560    int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, char* lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL* lpUsedDefaultChar); 
     561    int WideCharToMultiByte (int CodePage, int dwFlags, wchar* lpWideCharStr, int cchWideChar, int lpMultiByteStr, int cchMultiByte, char* lpDefaultChar, BOOL* lpUsedDefaultChar); 
    559562    int WindowFromDC (int lpPoint); 
    560563    int WindowFromPoint (POINT lpPoint); 
  • trunk/src/dwt/internal/win32/os.d

    r38 r40  
    2424    import dwt.internal.win32.tchar; 
    2525    import dwt.internal.win32.types; 
    26    
     26
    2727     
    2828public class OS { 
     
    3636    const int IsWinNT = 1; 
    3737    const int IsWinCE = 0; 
    38     static int IsPPC
    39     static int IsHPC
    40     static int IsSP
    41     static int IsDBLocale
     38    const int IsPPC = 0
     39    const int IsHPC = 0
     40    const int IsSP = 0
     41    static int IsDBLocale = 0
    4242    const int IsUnicode = 1; 
    4343    static int WIN32_MAJOR, WIN32_MINOR; 
     
    5454    * Initialize the Windows flags 
    5555    */ 
    56 version (NO
     56version (none
    5757{ 
    5858    static this () { 
     
    107107 
    108108    this() { 
    109         IsUnicode = 1; 
    110  
    111         IsWin32s = 0; //info.dwPlatformId == VER_PLATFORM_WIN32s; 
    112         IsWin95 = 0; //info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS; 
    113         IsWinNT = 1; //info.dwPlatformId == VER_PLATFORM_WIN32_NT; 
    114         IsWinCE = 0; //info.dwPlatformId == VER_PLATFORM_WIN32_CE; 
    115         IsSP = IsSP(); 
    116         IsPPC = IsPPC(); 
    117         IsHPC = IsWinCE && !IsPPC && !IsSP; 
    118     //  WIN32_MAJOR = info.dwMajorVersion; 
    119     //  WIN32_MINOR = info.dwMinorVersion; 
    120  
    121     /+ 
    122         // TEMPORARY CODE 
    123         if (MBCS != null) { 
    124             IsUnicode = false; 
    125             System.out.println ("*** DWT - Warning: Unicode disabled"); //$NON-NLS-1$ 
    126         } else { 
    127             IsUnicode = !IsWin32s && !IsWin95; 
    128         } 
    129  
    130         /* Get the DBCS flag */ 
    131         int index = 0; 
    132         while (index <= 0xFF) { 
    133             if (OS.IsDBCSLeadByte ((byte) index)) break; 
    134             index++; 
    135         } 
    136         IsDBLocale = index <= 0xFF; 
    137  
    138     +/ 
    139  
    140     } // end this() ctor 
     109        IsUnicode = 1; 
     110 
     111        IsWin32s = 0; //info.dwPlatformId == VER_PLATFORM_WIN32s; 
     112        IsWin95 = 0; //info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS; 
     113        IsWinNT = 1; //info.dwPlatformId == VER_PLATFORM_WIN32_NT; 
     114        //IsWinCE = info.dwPlatformId == VER_PLATFORM_WIN32_CE; 
     115        IsSP = IsSP(); 
     116        IsPPC = IsPPC(); 
     117        IsHPC = IsWinCE && !IsPPC && !IsSP; 
     118        //WIN32_MAJOR = info.dwMajorVersion; 
     119        //WIN32_MINOR = info.dwMinorVersion; 
     120 
     121        /+ 
     122         
     123        // TEMPORARY CODE 
     124        if (MBCS != null) { 
     125            IsUnicode = false; 
     126            System.out.println ("*** DWT - Warning: Unicode disabled"); //$NON-NLS-1$ 
     127        } else { 
     128            IsUnicode = !IsWin32s && !IsWin95; 
     129        } 
     130 
     131        /* Get the DBCS flag */ 
     132        int index = 0; 
     133        while (index <= 0xFF) { 
     134            if (OS.IsDBCSLeadByte ((byte) index)) break; 
     135            index++; 
     136        } 
     137        IsDBLocale = index <= 0xFF; 
     138 
     139        +/ 
     140 
     141    } // end this() ctor 
    141142} 
    142143 
     
    146147 
    147148    /* Flag used on WinCE */ 
    148     const int SYS_COLOR_INDEX_FLAG = IsWinCE ? 0x40000000 : 0x0; 
     149    version (WindowsCE) { 
     150        const int SYS_COLOR_INDEX_FLAG = 0x40000000; 
     151    } else { 
     152        const int SYS_COLOR_INDEX_FLAG = 0x0; 
     153    } 
    149154 
    150155    /* 
     
    939944    public const int SW_MINIMIZE = 0x6; 
    940945    public const int SW_PARENTOPENING = 0x3; 
    941     public const int SW_RESTORE = IsWinCE ? 0xd : 0x9; 
     946    version (WindowsCE) { 
     947        public const int SW_RESTORE = 0xD; 
     948        public const int SW_SHOWMAXIMIZED = 0xb; 
     949        public const int WS_MAXIMIZEBOX = 0x20000; 
     950        public const int WS_MINIMIZEBOX = 0x10000; 
     951        public const int WS_OVERLAPPED = WS_BORDER | WS_CAPTION; 
     952    } else { 
     953        public const int SW_RESTORE = 0x9; 
     954        public const int SW_SHOWMAXIMIZED = 0x3; 
     955        public const int WS_MAXIMIZEBOX = 0x10000; 
     956        public const int WS_MINIMIZEBOX = 0x20000; 
     957        public const int WS_OVERLAPPED = 0x0; 
     958    } 
    942959    public const int SW_SCROLLCHILDREN = 0x1; 
    943960    public const int SW_SHOW = 0x5; 
    944     public const int SW_SHOWMAXIMIZED = IsWinCE ? 0xb : 0x3; 
    945961    public const int SW_SHOWMINIMIZED = 0x2; 
    946962    public const int SW_SHOWMINNOACTIVE = 0x7; 
     
    13291345    public const int WS_EX_TRANSPARENT = 0x20; 
    13301346    public const int WS_HSCROLL = 0x100000; 
    1331     public const int WS_MAXIMIZEBOX = IsWinCE ? 0x20000 : 0x10000; 
    1332     public const int WS_MINIMIZEBOX = IsWinCE ? 0x10000 : 0x20000; 
    1333     public const int WS_OVERLAPPED = IsWinCE ? WS_BORDER | WS_CAPTION : 0x0; 
    13341347    public const int WS_OVERLAPPEDWINDOW = 0xcf0000; 
    13351348    public const int WS_POPUP = cast(int)0x80000000; 
     
    18001813} 
    18011814 
    1802 static void MoveMemory (void* Destination, TCHAR Source, int Length) { 
    1803 //static void MoveMemory (int Destination, TCHAR Source, int Length) { 
    1804     if (IsUnicode) { 
    1805         wchar* Source1 = w_str(Source); 
    1806             (cast(wchar*)Destination)[0..Length] = Source1[0..Length]; 
    1807         //MoveMemory(Destination, Source1, Length); 
     1815static void MoveMemory (void* destination, TCHAR source, int length) { 
     1816//static void MoveMemory (int destination, TCHAR source, int length) { 
     1817    if (IsUnicode) { 
     1818       wchar* Source1 = w_str(source); 
     1819       //(cast(wchar*)destination)[0..length] = Source1[0..length]; 
     1820       MoveMemory(destination, Source1, length); 
    18081821    } else { 
    1809             char* Source1 = c_str(Source); 
    1810             (cast(char*)Destination)[0..Length] = Source1[0..Length]; 
    1811             //MoveMemory(Destination, Source1, Length); 
    1812     } 
    1813 } 
    1814  
    1815 static void MoveMemory (TCHAR Destination, void* Source, int Length) { 
    1816     if (IsUnicode) { 
    1817         wchar* Destination1 = w_str(Destination); 
    1818         Destination1 = (cast(wchar*)Source)[0..Length]; 
     1822       char* Source1 = c_str(source); 
     1823       //(cast(char*)destination)[0..length] = Source1[0..length]; 
     1824       MoveMemory(destination, Source1, length); 
     1825    } 
     1826} 
     1827 
     1828static void MoveMemory (TCHAR destination, void* source, int length) { 
     1829    if (IsUnicode) { 
     1830        wchar* Destination1 = w_str(destination); 
     1831        Destination1 = (cast(wchar*)source)[0..length]; 
    18191832    } else { 
    1820         char* Destination1 = c_str(Destination); 
    1821                 Destination1 = (cast(char*)Source)[0..Length]; 
    1822     } 
    1823 
    1824  
    1825 static void MoveMemory (int Destination, LOGFONT* Source, int Length) { 
    1826     (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 
    1827 
    1828  
    1829 static void MoveMemory (LOGFONT* Destination, int Source, int Length) { 
    1830     (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 
    1831 
    1832  
    1833 static void MoveMemory (int Destination, NMTTDISPINFO* Source, int Length) { 
    1834     (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 
    1835 
    1836  
    1837 static void MoveMemory (NMTTDISPINFO* Destination, int Source, int Length) { 
    1838     (cast(byte*)Destination)[0..Length] = (cast(byte*)Source)[0..Length]; 
    1839 
     1833        char* Destination1 = c_str(destination); 
     1834        Destination1 = (cast(char*)source)[0..length]; 
     1835    } 
     1836
     1837 
     1838 
     1839static void MoveMemory (void* destination, void* source, int length) { 
     1840    destination[0 .. length] = source[0 .. length]; 
     1841
     1842 
     1843static void MoveMemory (void* destination, int source, int length) { 
     1844    MoveMemory(destination, cast(void*)source, length); 
     1845
     1846 
     1847static void MoveMemory (int destination, void* source, int length) { 
     1848    MoveMemory(cast(void*)destination, source, length); 
     1849
     1850 
     1851/*static void MoveMemory (void* destination, LOGFONT* source, int length) { 
     1852    (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 
     1853
     1854 
     1855static void MoveMemory (LOGFONT* destination, void* source, int length) { 
     1856    (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 
     1857
     1858 
     1859static void MoveMemory (void* destination, NMTTDISPINFO* source, int length) { 
     1860    (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 
     1861
     1862 
     1863static void MoveMemory (NMTTDISPINFO* destination, int source, int length) { 
     1864    (cast(void*)destination)[0..length] = (cast(void*)source)[0..length]; 
     1865}*/ 
    18401866 
    18411867// added to call proper win32 specific functions 
    18421868 
    1843 static void MoveMemory (DRAWITEMSTRUCT Destination, int Source, int Length) { 
    1844     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1845 } 
    1846  
    1847 static void MoveMemory (NMHDR* Destination, int Source, int Length) { 
    1848     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1849 } 
    1850  
    1851 static void MoveMemory (NMTTDISPINFOA Destination, int Source, int Length) { 
    1852     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1853 } 
    1854  
    1855 static void MoveMemory (NMTTDISPINFOW Destination, int Source, int Length) { 
    1856     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1857 } 
    1858  
    1859 static void MoveMemory (int Destination, NMTTDISPINFOW Source, int Length) { 
    1860     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1861 } 
    1862  
    1863 static void MoveMemory (HELPINFO* Destination, int Source, int Length) { 
    1864     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1865 } 
    1866  
    1867 static void MoveMemory (MEASUREITEMSTRUCT Destination, int Source, int Length) { 
    1868     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1869 } 
    1870  
    1871 static void MoveMemory (char* Destination, ACCEL Source, int Length) { 
    1872     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1873 } 
    1874  
    1875 static void MoveMemory (WINDOWPOS* Destination, int Source, int Length) { 
    1876     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1877 } 
    1878  
    1879 static void MoveMemory(int Destination, WINDOWPOS* Source, int Length) { 
    1880     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1881 } 
    1882  
    1883 static void MoveMemory(MSG Destination, int Source, int Length) { 
    1884     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1885 } 
    1886  
    1887 static void MoveMemory(int Destination, MEASUREITEMSTRUCT Source, int Length) { 
    1888     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1889 } 
    1890  
    1891 static void MoveMemory(int Destination, byte[] Source, int Length) { 
    1892     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1893 } 
    1894  
    1895 static void MoveMemory(int Destination, wchar* Source, int Length) { 
    1896     dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
    1897 } 
     1869static void MoveMemory (out DRAWITEMSTRUCT destination, int source, int length) { 
     1870    MoveMemory(&destination, cast(void*)source, length); 
     1871} 
     1872 
     1873/*static void MoveMemory (NMHDR* destination, void* source, int length) { 
     1874    internal.win32.func.MoveMemory(destination, source, length); 
     1875}*/ 
     1876 
     1877static void MoveMemory (out NMTTDISPINFOA destination, int source, int length) { 
     1878    MoveMemory(&destination, cast(void*)source, length); 
     1879} 
     1880 
     1881/*static void MoveMemory (NMTTDISPINFOW destination, int source, int length) { 
     1882    MoveMemory(&destination, cast(void*)source, length); 
     1883}*/ 
     1884 
     1885static void MoveMemory (void* destination, NMTTDISPINFOW source, int length) { 
     1886    MoveMemory(destination, &source, length); 
     1887} 
     1888 
     1889/*static void MoveMemory (HELPINFO* destination, void* source, int length) { 
     1890    dwt.internal.win32.func.MoveMemory(destination, source, length); 
     1891}*/ 
     1892 
     1893static void MoveMemory (out MEASUREITEMSTRUCT destination, int source, int length) { 
     1894    MoveMemory(&destination, source, length); 
     1895} 
     1896 
     1897static void MoveMemory (char* destination, ACCEL source, int length) { 
     1898    MoveMemory(destination, &source, length); 
     1899} 
     1900 
     1901/*static void MoveMemory (WINDOWPOS* destination, void* source, int length) { 
     1902    dwt.internal.win32.func.MoveMemory(destination, source, length); 
     1903} 
     1904 
     1905static void MoveMemory(void* destination, WINDOWPOS* source, int length) { 
     1906    dwt.internal.win32.func.MoveMemory(destination, source, length); 
     1907}*/ 
     1908 
     1909static void MoveMemory(out MSG destination, int source, int length) { 
     1910    MoveMemory(&destination, cast(void*)source, length); 
     1911} 
     1912 
     1913static void MoveMemory(void* destination, MEASUREITEMSTRUCT source, int length) { 
     1914    MoveMemory(destination, &source, length); 
     1915} 
     1916 
     1917/*static void MoveMemory(void* destination, byte[] source, int length) { 
     1918    MoveMemory(destination, source, length); 
     1919} 
     1920 
     1921static void MoveMemory(void* destination, wchar* source, int length) { 
     1922    dwt.internal.win32.func.MoveMemory(destination, source, length); 
     1923}*/ 
    18981924// ----------------------------- 
    18991925 
     
    19721998} 
    19731999 
     2000static int SendMessage (int hWnd, int Msg, int wParam, int lParam) { 
     2001    if (IsUnicode) { 
     2002        return SendMessageW(hWnd, Msg, wParam, lParam); 
     2003    } else { 
     2004        return SendMessageA(hWnd, Msg, wParam, lParam); 
     2005    } 
     2006} 
     2007 
     2008static int SendMessage (int hWnd, int Msg, int wParam, void* lParam) { 
     2009    return SendMessage(hWnd, Msg, wParam, cast(int)lParam); 
     2010} 
     2011 
     2012static int SendMessage (int hWnd, int Msg, void* wParam, int lParam) { 
     2013    return SendMessage(hWnd, Msg, cast(int)wParam, lParam); 
     2014} 
     2015 
     2016static int SendMessage (int hWnd, int Msg, void* wParam, void* lParam) { 
     2017    return SendMessage(hWnd, Msg, cast(int)wParam, cast(int)lParam); 
     2018} 
     2019 
    19742020static int SendMessage (int hWnd, int Msg, int wParam, TCHAR lParam) { 
    19752021    if (IsUnicode) { 
    19762022        wchar* lParam1 = w_str(lParam); 
    1977         return SendMessageW (hWnd, Msg, wParam, lParam1); 
     2023        return SendMessageW (hWnd, Msg, wParam, cast(int)lParam1); 
    19782024    } 
    19792025    char* lParam1 = c_str(lParam); 
    1980     return SendMessageA (hWnd, Msg, wParam, lParam1); 
    1981 
    1982  
     2026    return SendMessageA (hWnd, Msg, wParam, cast(int)lParam1); 
     2027
     2028 
     2029/+ 
    19832030static int SendMessage (int hWnd, int Msg, int [] wParam, int [] lParam) { 
    1984     if (IsUnicode) return SendMessageW (hWnd, Msg, wParam, lParam); 
    1985     return SendMessageA (hWnd, Msg, wParam, lParam); 
     2031    return SendMessageW (hWnd, Msg, &wParam[0], &lParam[0]); 
    19862032} 
    19872033 
     
    20652111    return SendMessageA (hWnd, Msg, wParam, lParam); 
    20662112} 
     2113+/ 
    20672114 
    20682115static bool SetMenuItemInfo (int hMenu, int uItem, bool fByPosition, MENUITEMINFO* lpmii) { 
     
    20972144 
    20982145static bool ShellExecuteEx (SHELLEXECUTEINFO* lpExecInfo) { 
    2099     if (IsUnicode)  
     2146    if (IsUnicode) { 
    21002147        return (ShellExecuteExW(lpExecInfo) == 0) ? false : true; 
    2101     return (ShellExecuteExA (lpExecInfo) == 0) ? false : true; 
     2148    } else { 
     2149        return (ShellExecuteExA(lpExecInfo) == 0) ? false : true; 
     2150    } 
    21022151} 
    21032152