Changeset 38

Show
Ignore:
Timestamp:
08/12/04 19:00:44 (4 years ago)
Author:
jjr
Message:

1) Typedlistener still causes infinite loop in compiler (imported in eventtable.d)
2) Undefined Symbols still present during link phase
3) MoveMemory? needs appropriate replacement/overriding within OS.d

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/dwt/graphics/device.d

    r36 r38  
    2222module dwt.graphics.device; 
    2323 
     24/+ 
     25import org.eclipse.swt.internal.*; 
     26import org.eclipse.swt.internal.win32.*; 
     27import org.eclipse.swt.*; 
     28+/ 
    2429 
    2530private import dwt.graphics.IDrawable; 
  • trunk/src/dwt/graphics/font.d

    r33 r38  
    2727+/ 
    2828 
     29/** 
     30 * Instances of this class manage operating system resources that 
     31 * define how text looks when it is displayed. Fonts may be constructed 
     32 * by providing a device and either name, size and style information 
     33 * or a <code>FontData</code> object which encapsulates this data. 
     34 * <p> 
     35 * Application code must explicitly invoke the <code>Font.dispose()</code> 
     36 * method to release the operating system resources managed by each instance 
     37 * when those instances are no longer required. 
     38 * </p> 
     39 * 
     40 * @see FontData 
     41 */ 
     42 
     43public final class Font { 
     44 
    2945private import dwt.dwt; 
    3046private import dwt.graphics.device; 
     
    3349private import dwt.internal.win32.types; 
    3450//private import std.string; 
    35  
    36  
    37 /** 
    38  * Instances of this class manage operating system resources that 
    39  * define how text looks when it is displayed. Fonts may be constructed 
    40  * by providing a device and either name, size and style information 
    41  * or a <code>FontData</code> object which encapsulates this data. 
    42  * <p> 
    43  * Application code must explicitly invoke the <code>Font.dispose()</code> 
    44  * method to release the operating system resources managed by each instance 
    45  * when those instances are no longer required. 
    46  * </p> 
    47  * 
    48  * @see FontData 
    49  */ 
    50  
    51 public final class Font { 
    5251 
    5352    /** 
     
    256255public char[] toString () { 
    257256    if (isDisposed()) return "Font {*DISPOSED*}"; 
    258     return "Font {" ~ std.string.toString(handle) ~ "}"; 
     257//  return "Font {" ~ std.string.toString(handle) ~ "}"; 
     258    return "Font {"; 
    259259} 
    260260 
  • trunk/src/dwt/graphics/fontdata.d

    r33 r38  
    2727import org.eclipse.swt.*; 
    2828+/ 
    29  
    30 private import dwt.dwt; 
    31  
    32 private import dwt.internal.callback; 
    33  
    34 private import dwt.internal.win32.os; 
    35 private import dwt.internal.win32.tchar; 
    36 private import dwt.internal.win32.types; 
    37  
    38 private import dwt.util.string; 
    39 //private import dwt.util.util; 
    40  
    41 private import std.string; 
    42 private import std.utf; 
    43  
    4429 
    4530/** 
     
    7055 
    7156public final class FontData { 
     57 
     58 
     59private import dwt.dwt; 
     60 
     61private import dwt.internal.callback; 
     62 
     63private import dwt.internal.win32.os; 
     64private import dwt.internal.win32.tchar; 
     65private import dwt.internal.win32.types; 
     66 
     67private import dwt.util.string; 
     68//private import dwt.util.util; 
     69 
     70private import std.string; 
     71private import std.utf; 
    7272 
    7373    /** 
     
    591591 */ 
    592592public char[] toString() { 
     593/+ 
    593594    char[] fontDescription = "1|" ~ std.utf.toUTF8(getName()) ~ "|" 
    594595        ~ .toString(getHeight()) ~ "|" 
     
    609610        ~ .toUTF8(getName()); 
    610611        return fontDescription; 
     612      +/ 
     613        return "fontDescription"; 
    611614} 
    612615 
  • trunk/src/dwt/graphics/fontmetrics.d

    r33 r38  
    2626+/ 
    2727 
    28 private import dwt.internal.win32.types; 
    29  
    3028/** 
    3129 * Instances of this class provide measurement information 
     
    3937 
    4038public final class FontMetrics { 
     39 
     40private import dwt.internal.win32.types; 
    4141 
    4242    /** 
  • trunk/src/dwt/graphics/gc.d

    r33 r38  
    2727import org.eclipse.swt.*; 
    2828+/ 
     29 
     30/** 
     31 * Class <code>GC</code> is where all of the drawing capabilities that are 
     32 * supported by DWT are located. Instances are used to draw on either an 
     33 * <code>Image</code>, a <code>Control</code>, or directly on a <code>Display</code>. 
     34 * <dl> 
     35 * <dt><b>Styles:</b></dt> 
     36 * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> 
     37 * </dl> 
     38 * 
     39 * <p> 
     40 * Application code must explicitly invoke the <code>GC.dispose()</code> 
     41 * method to release the operating system resources managed by each instance 
     42 * when those instances are no longer required. This is <em>particularly</em> 
     43 * important on Windows95 and Windows98 where the operating system has a limited 
     44 * number of device contexts available. 
     45 * </p> 
     46 * 
     47 * <p> 
     48 * Note: Only one of LEFT_TO_RIGHT and RIGHT_TO_LEFT may be specified. 
     49 * </p> 
     50 * 
     51 * @see org.eclipse.swt.events.PaintEvent 
     52 */ 
     53 
     54public final class GC { 
    2955 
    3056private 
     
    5682//  import std.string; 
    5783} 
    58  
    59 /** 
    60  * Class <code>GC</code> is where all of the drawing capabilities that are 
    61  * supported by DWT are located. Instances are used to draw on either an 
    62  * <code>Image</code>, a <code>Control</code>, or directly on a <code>Display</code>. 
    63  * <dl> 
    64  * <dt><b>Styles:</b></dt> 
    65  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> 
    66  * </dl> 
    67  * 
    68  * <p> 
    69  * Application code must explicitly invoke the <code>GC.dispose()</code> 
    70  * method to release the operating system resources managed by each instance 
    71  * when those instances are no longer required. This is <em>particularly</em> 
    72  * important on Windows95 and Windows98 where the operating system has a limited 
    73  * number of device contexts available. 
    74  * </p> 
    75  * 
    76  * <p> 
    77  * Note: Only one of LEFT_TO_RIGHT and RIGHT_TO_LEFT may be specified. 
    78  * </p> 
    79  * 
    80  * @see org.eclipse.swt.events.PaintEvent 
    81  */ 
    82  
    83 public final class GC { 
    8484 
    8585    /** 
     
    781781    /* Scale the foreground pixels with alpha */ 
    782782    //OS.MoveMemory(dibBM.bmBits, srcData, sizeInBytes); 
    783         dibBM.bmBits[] = srcData[]; 
     783    // TODO: Make sure this is correct!! -JJR 
     784        dibBM.bmBits = srcData[0 .. sizeInBytes].dup; 
    784785    /* 
    785786    * Bug in WinCE and Win98.  StretchBlt does not correctly stretch when 
     
    16881689        //OS.MoveMemory(pVertex + TRIVERTEX.sizeof, trivertex, TRIVERTEX.sizeof); 
    16891690 
    1690         bit success = OS.GradientFill(handle, trivertex, 2, gradientRect, 1, 
    1691             vertical ? OS.GRADIENT_FILL_RECT_V : OS.GRADIENT_FILL_RECT_H)
     1691        bit success = (OS.GradientFill(handle, trivertex, 2, gradientRect, 1, 
     1692            vertical ? OS.GRADIENT_FILL_RECT_V : OS.GRADIENT_FILL_RECT_H) == 0) ? false : true
    16921693        //OS.HeapFree(hHeap, 0, pMesh); 
    16931694        if (success) return; 
     
    25612562public char[] toString () { 
    25622563    if (isDisposed()) return "GC {*DISPOSED*}"; 
    2563     return "GC {" ~ std.string.toString(handle) ~ "}"; 
     2564//  return "GC {" ~ std.string.toString(handle) ~ "}"; 
     2565    return "GC {"; 
    25642566} 
    25652567 
  • trunk/src/dwt/graphics/gcdata.d

    r33 r38  
    2626+/ 
    2727 
    28 private import dwt.internal.win32.types; 
    29  
    30  
    3128/** 
    3229 * Instances of this class are descriptions of GCs in terms 
     
    4138 
    4239public final class GCData { 
     40 
     41    private import dwt.internal.win32.types; 
    4342    private import dwt.graphics.device; 
    4443    private import dwt.graphics.image; 
     44 
    4545    public Device device; 
    4646    public int style; 
  • trunk/src/dwt/graphics/image.d

    r33 r38  
    2828+/ 
    2929 
    30 private 
    31 { 
    32     import dwt.dwt; 
    33     import dwt.graphics.device; 
    34     import dwt.graphics.IDrawable; 
    35     import dwt.graphics.gc; 
    36     import dwt.graphics.gcdata; 
    37     import dwt.graphics.rectangle; 
    38     import dwt.graphics.color; 
    39     import dwt.graphics.imagedata; 
    40     import dwt.graphics.palettedata; 
    41     import dwt.graphics.rgb; 
    42  
    43     import dwt.internal.win32.os; 
    44     import dwt.internal.win32.types; 
    45  
    46 //  import std.string; 
    47 } 
    4830 
    4931/** 
     
    9476 * @see ImageLoader 
    9577 */ 
     78private import dwt.graphics.IDrawable; 
    9679 
    9780public final class Image : IDrawable { 
    9881 
     82private 
     83{ 
     84    import dwt.dwt; 
     85    import dwt.graphics.device; 
     86    import dwt.graphics.gc; 
     87    import dwt.graphics.gcdata; 
     88    import dwt.graphics.rectangle; 
     89    import dwt.graphics.color; 
     90    import dwt.graphics.imagedata; 
     91    import dwt.graphics.palettedata; 
     92    import dwt.graphics.rgb; 
     93 
     94    import dwt.internal.win32.os; 
     95    import dwt.internal.win32.types; 
     96 
     97//  import std.string; 
     98} 
    9999    /** 
    100100     * specifies whether the receiver is a bitmap or an icon 
     
    19631963public char[] toString () { 
    19641964    if (isDisposed()) return "Image {*DISPOSED*}"; 
    1965     return "Image {" ~ std.string.toString(handle) ~ "}"; 
     1965//  return "Image {" ~ std.string.toString(handle) ~ "}"; 
     1966    return "Image {"; 
    19661967} 
    19671968 
  • trunk/src/dwt/graphics/palettedata.d

    r33 r38  
    2020 
    2121module dwt.graphics.palettedata; 
    22  
    23 private 
    24 { 
    25     import dwt.dwt; 
    26     import dwt.graphics.rgb; 
    27 } 
    2822 
    2923/** 
     
    6862final class PaletteData { 
    6963 
     64private 
     65{ 
     66    import dwt.dwt; 
     67    import dwt.graphics.rgb; 
     68} 
     69 
    7070    /** 
    7171     * true if the receiver is a direct palette, 
  • trunk/src/dwt/graphics/region.d

    r33 r38  
    2727+/ 
    2828 
    29 private 
    30 { 
    31     import dwt.dwt; 
    32  
    33     import dwt.graphics.device; 
    34     import dwt.graphics.rectangle; 
    35     import dwt.graphics.point; 
    36  
    37     import dwt.internal.win32.os; 
    38     import dwt.internal.win32.types; 
    39  
    40 //  import dwt.util.string; 
    41  
    42 } 
    4329 
    4430/** 
     
    5541public final class Region { 
    5642 
     43private 
     44{ 
     45    import dwt.dwt; 
     46 
     47    import dwt.graphics.device; 
     48    import dwt.graphics.rectangle; 
     49    import dwt.graphics.point; 
     50 
     51    import dwt.internal.win32.os; 
     52    import dwt.internal.win32.types; 
     53 
     54//  import dwt.util.string; 
     55 
     56} 
    5757    /** 
    5858     * the OS resource for the region 
     
    202202public bit contains (int x, int y) { 
    203203    if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    204     return OS.PtInRegion (handle, x, y)
     204    return (OS.PtInRegion (handle, x, y) == 0) ? false : true
    205205} 
    206206 
     
    362362    RECT r; 
    363363    OS.SetRect (&r, x, y, x + width, y + height); 
    364     return OS.RectInRegion (handle, &r)
     364    return (OS.RectInRegion (handle, &r) == 0) ? false : true
    365365} 
    366366 
  • trunk/src/dwt/graphics/rgb.d

    r33 r38  
    2727+/ 
    2828 
    29 private 
    30 { 
    31     import dwt.dwt; 
    32     import dwt.internal.serializablecompatibility; 
    33     import std.string; 
    34 } 
    35  
    3629/** 
    3730 * Instances of this class are descriptions of colors in 
     
    5346public struct RGB { 
    5447 
     48 
     49private 
     50{ 
     51    import dwt.dwt; 
     52    import dwt.internal.serializablecompatibility; 
     53    import std.string; 
     54} 
    5555    /** 
    5656     * the red component of the RGB 
     
    128128 */ 
    129129public char[] toString () { 
     130/+ 
    130131    return "RGB {" ~ .toString(red) ~ ", "  
    131132    ~ .toString(green) ~ ", "  
    132133    ~ .toString(blue) ~ "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ 
     134+/ 
     135    return "RGB"; 
    133136} 
    134137 
  • trunk/src/dwt/internal/library.d

    r33 r38  
    2222module dwt.internal.library; 
    2323 
     24public class Library { 
     25 
    2426private import dwt.internal.platform; 
    25  
    26 public class Library { 
    2727 
    2828    /* DWT Version - Mmmm (M=major, mmm=minor) */ 
  • trunk/src/dwt/internal/win32/os.d

    r36 r38  
    1818 *******************************************************************************/ 
    1919 
    20  
    21  
    2220module dwt.internal.win32.os; 
    23  
    24 private 
    25 
     21  
     22private { 
    2623    import dwt.internal.library; 
    27  
    2824    import dwt.internal.win32.tchar; 
    2925    import dwt.internal.win32.types; 
    30 
    31  
     26   
     27     
    3228public class OS { 
    33  
     29    private import dwt.internal.win32.func; 
     30     
    3431    /* 
    3532     * DWT Windows flags. 
     
    14471444 
    14481445static bool DrawState (int hdc, int hbr, int lpOutputFunc, int lData, int wData, int x, int y, int cx, int cy, int fuFlags) { 
    1449     if (IsUnicode) return DrawStateW (hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy, fuFlags); 
    1450     return DrawStateA (hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy, fuFlags); 
     1446    if (IsUnicode)  
     1447        return (DrawStateW (hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy, fuFlags) == 0) ? false : true; 
     1448    return (DrawStateA(hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy, fuFlags) == 0) ? false : true ; 
    14511449} 
    14521450 
     
    14721470static bool EnumSystemLocales (void* lpLocaleEnumProc, int dwFlags) { 
    14731471    if (IsUnicode) 
    1474         return EnumSystemLocalesW (lpLocaleEnumProc, dwFlags)
     1472        return (EnumSystemLocalesW(lpLocaleEnumProc, dwFlags) == 0) ? false : true
    14751473    else 
    1476         return EnumSystemLocalesA (lpLocaleEnumProc, dwFlags)
     1474        return (EnumSystemLocalesA (lpLocaleEnumProc, dwFlags) == 0) ? false : true
    14771475} 
    14781476 
    14791477 
    14801478static bool EnumSystemLanguageGroups (int pLangGroupEnumProc, int dwFlags, int lParam) { 
    1481     if (IsUnicode) return EnumSystemLanguageGroupsW (pLangGroupEnumProc, dwFlags, lParam); 
    1482     return EnumSystemLanguageGroupsA (pLangGroupEnumProc, dwFlags, lParam); 
     1479    if (IsUnicode)  
     1480        return (EnumSystemLanguageGroupsW (pLangGroupEnumProc, dwFlags, lParam) == 0) ? false : true; 
     1481    return (EnumSystemLanguageGroupsA (pLangGroupEnumProc, dwFlags, lParam) == 0) ? false : true; 
    14831482} 
    14841483 
     
    15061505    if (IsUnicode) { 
    15071506        wchar* lpString1 = w_str(lpString); 
    1508         return ExtTextOutW (hdc, X, Y, fuOptions, lprc, lpString1, cbCount, lpDx)
     1507        return (ExtTextOutW (hdc, X, Y, fuOptions, lprc, lpString1, cbCount, lpDx) == 0) ? false : true
    15091508    } 
    15101509    char* lpString1 = c_str(lpString); 
    1511     return ExtTextOutA (hdc, X, Y, fuOptions, lprc, lpString1, cbCount, lpDx)
     1510    return (ExtTextOutA (hdc, X, Y, fuOptions, lprc, lpString1, cbCount, lpDx) == 0 ) ? false : true
    15121511} 
    15131512 
     
    15241523 
    15251524static bool GetCharABCWidths (int hdc, int iFirstChar, int iLastChar, int [] lpabc) { 
    1526     if (IsUnicode) return GetCharABCWidthsW (hdc,iFirstChar, iLastChar, lpabc); 
    1527     return GetCharABCWidthsA (hdc,iFirstChar, iLastChar, lpabc); 
     1525    if (IsUnicode)  
     1526        return (GetCharABCWidthsW (hdc,iFirstChar, iLastChar, lpabc) == 0) ? false : true; 
     1527    return (GetCharABCWidthsA (hdc,iFirstChar, iLastChar, lpabc) == 0) ? false : true; 
    15281528} 
    15291529 
     
    15391539 
    15401540static bool GetCharWidth (int hdc, int iFirstChar, int iLastChar, int [] lpabc) { 
    1541     if (IsUnicode) return GetCharWidthW (hdc,iFirstChar, iLastChar, lpabc); 
    1542     return GetCharWidthA (hdc,iFirstChar, iLastChar, lpabc); 
     1541    if (IsUnicode)  
     1542        return (GetCharWidthW (hdc,iFirstChar, iLastChar, lpabc) == 0) ? false : true; 
     1543    return (GetCharWidthA (hdc,iFirstChar, iLastChar, lpabc) == 0) ? false : true; 
    15431544} 
    15441545 
     
    15461547    if (IsUnicode) { 
    15471548        wchar* lpClassName1 = w_str(lpClassName); 
    1548         return GetClassInfoW (hInstance, lpClassName1, lpWndClass)
     1549        return (GetClassInfoW (hInstance, lpClassName1, lpWndClass) == 0) ? false : true
    15491550    } 
    15501551        char* lpClassName1 = c_str(lpClassName); 
    1551     return GetClassInfoA (hInstance, lpClassName1, lpWndClass)
     1552    return (GetClassInfoA (hInstance, lpClassName1, lpWndClass) == 0) ? false : true
    15521553} 
    15531554 
     
    15831584 
    15841585static bool GetMenuItemInfo (int hMenu, int uItem, bool fByPosition, MENUITEMINFO* lpmii) { 
    1585     if (IsUnicode) return GetMenuItemInfoW (hMenu, uItem, fByPosition, lpmii); 
    1586     return GetMenuItemInfoA (hMenu, uItem, fByPosition, lpmii); 
     1586    if (IsUnicode)  
     1587        return (GetMenuItemInfoW (hMenu, uItem, fByPosition, lpmii) == 0) ? false : true; 
     1588    return (GetMenuItemInfoA (hMenu, uItem, fByPosition, lpmii) == 0) ? false : true; 
    15871589} 
    15881590 
    15891591static bool GetMessage (MSG lpMsg, int hWnd, int wMsgFilterMin, int wMsgFilterMax) { 
    1590     if (IsUnicode) return GetMessageW (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); 
    1591     return GetMessageA (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); 
     1592    if (IsUnicode)  
     1593        return (GetMessageW (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax) == 0) ? false : true; 
     1594    return (GetMessageA (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax) == 0) ? false : true; 
    15921595} 
    15931596 
     
    16021605 
    16031606static bool GetMonitorInfo (int hmonitor, MONITORINFO* lpmi) { 
    1604     if (IsUnicode) return GetMonitorInfoW (hmonitor, lpmi); 
    1605     return GetMonitorInfoA (hmonitor, lpmi); 
     1607    if (IsUnicode)  
     1608        return (GetMonitorInfoW (hmonitor, lpmi) == 0) ? false : true; 
     1609    return (GetMonitorInfoA (hmonitor, lpmi) == 0) ? false : true; 
    16061610} 
    16071611 
     
    16371641 
    16381642static bool GetOpenFileName (OPENFILENAME* lpofn) { 
    1639     if (IsUnicode) return GetOpenFileNameW (lpofn); 
    1640     return GetOpenFileNameA (lpofn); 
     1643    if (IsUnicode)  
     1644        return (GetOpenFileNameW (lpofn) == 0) ? false : true; 
     1645    return (GetOpenFileNameA (lpofn) == 0) ? false : true; 
    16411646} 
    16421647 
     
    16571662 
    16581663static bool GetSaveFileName (OPENFILENAME* lpofn) { 
    1659     if (IsUnicode) return GetSaveFileNameW (lpofn); 
    1660     return GetSaveFileNameA (lpofn); 
     1664    if (IsUnicode)  
     1665        return (GetSaveFileNameW (lpofn) == 0) ? false : true; 
     1666    return (GetSaveFileNameA (lpofn) == 0) ? false : true; 
    16611667} 
    16621668 
     
    16641670    if (IsUnicode) { 
    16651671        wchar* lpString1 = w_str(lpString); 
    1666         return GetTextExtentPoint32W (hdc, lpString1, cbString, lpSize)
     1672        return (GetTextExtentPoint32W (hdc, lpString1, cbString, lpSize) == 0) ? false : true
    16671673    } 
    16681674    char* lpString1 = c_str(lpString); 
    1669     return GetTextExtentPoint32A (hdc, lpString1, cbString, lpSize)
     1675    return (GetTextExtentPoint32A (hdc, lpString1, cbString, lpSize) == 0) ? false : true
    16701676} 
    16711677 
    16721678 
    16731679static bool GetTextMetrics (int hdc, TEXTMETRIC* lptm) { 
    1674     if (IsUnicode) return GetTextMetricsW (hdc, cast(TEXTMETRICW*)lptm); 
    1675     return GetTextMetricsA (hdc, cast(TEXTMETRICA*)lptm); 
     1680    if (IsUnicode)  
     1681        return (GetTextMetricsW (hdc, cast(TEXTMETRICW*)lptm) == 0) ? false : true; 
     1682    return (GetTextMetricsA (hdc, cast(TEXTMETRICA*)lptm) == 0) ? false : true; 
    16761683} 
    16771684 
     
    16791686static bool GetVersionEx (OSVERSIONINFO* lpVersionInfo) { 
    16801687    if (IsUnicode) 
    1681         return GetVersionExW (cast(OSVERSIONINFOW*)lpVersionInfo)
     1688        return (GetVersionExW (cast(OSVERSIONINFOW*)lpVersionInfo) == 0) ? false : true
    16821689    else 
    1683         return GetVersionExA (cast(OSVERSIONINFOA*)lpVersionInfo)
     1690        return (GetVersionExA (cast(OSVERSIONINFOA*)lpVersionInfo) == 0) ? false : true
    16841691} 
    16851692 
     
    17081715static bool ImmGetCompositionFont (int hIMC, LOGFONT* lplf) { 
    17091716    if (IsUnicode) 
    1710         return ImmGetCompositionFontW (hIMC, cast(LOGFONTW*)lplf)
     1717        return (ImmGetCompositionFontW (hIMC, cast(LOGFONTW*)lplf) == 0) ? false : true
    17111718    else 
    1712         return ImmGetCompositionFontA (hIMC, cast(LOGFONTA*)lplf)
     1719        return (ImmGetCompositionFontA (hIMC, cast(LOGFONTA*)lplf) == 0) ? false : true
    17131720} 
    17141721 
    17151722static bool ImmSetCompositionFont (int hIMC, LOGFONT* lplf) { 
    17161723    if (IsUnicode) 
    1717         return ImmSetCompositionFontW (hIMC, cast(LOGFONTW*)lplf)
     1724        return (ImmSetCompositionFontW (hIMC, cast(LOGFONTW*)lplf) == 0) ? false : true
    17181725    else 
    1719         return ImmSetCompositionFontA (hIMC, cast(LOGFONTA*)lplf)
     1726        return (ImmSetCompositionFontA (hIMC, cast(LOGFONTA*)lplf) == 0) ? false : true
    17201727} 
    17211728 
     
    17331740    if (IsUnicode) { 
    17341741        wchar* lpNewItem1 = w_str(lpNewItem); 
    1735         return InsertMenuW (hMenu, uPosition, uFlags, uIDNewItem, lpNewItem1)
     1742        return (InsertMenuW (hMenu, uPosition, uFlags, uIDNewItem, lpNewItem1) == 0) ? false : true
    17361743    } else { 
    17371744        char* lpNewItem1 = lpNewItem is null ? cast(char*)null : lpNewItem.bytes; 
    1738         return InsertMenuA (hMenu, uPosition, uFlags, uIDNewItem, lpNewItem1)
     1745        return (InsertMenuA (hMenu, uPosition, uFlags, uIDNewItem, lpNewItem1) == 0) ? false : true
    17391746    } 
    17401747} 
    17411748 
    17421749static bool InsertMenuItem (int hMenu, int uItem, bool fByPosition, MENUITEMINFO* lpmii) { 
    1743     if (IsUnicode) return InsertMenuItemW (hMenu, uItem, fByPosition, lpmii); 
    1744     return InsertMenuItemA (hMenu, uItem, fByPosition, lpmii); 
     1750    if (IsUnicode)  
     1751        return (InsertMenuItemW (hMenu, uItem, fByPosition, lpmii) == 0) ? false : true; 
     1752    return (InsertMenuItemA (hMenu, uItem, fByPosition, lpmii) == 0) ? false : true; 
    17451753} 
    17461754 
     
    18311839} 
    18321840 
    1833  
     1841// added to call proper win32 specific functions 
     1842 
     1843static void MoveMemory (DRAWITEMSTRUCT Destination, int Source, int Length) { 
     1844    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1845
     1846 
     1847static void MoveMemory (NMHDR* Destination, int Source, int Length) { 
     1848    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1849
     1850 
     1851static void MoveMemory (NMTTDISPINFOA Destination, int Source, int Length) { 
     1852    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1853
     1854 
     1855static void MoveMemory (NMTTDISPINFOW Destination, int Source, int Length) { 
     1856    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1857
     1858 
     1859static void MoveMemory (int Destination, NMTTDISPINFOW Source, int Length) { 
     1860    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1861
     1862 
     1863static void MoveMemory (HELPINFO* Destination, int Source, int Length) { 
     1864    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1865
     1866 
     1867static void MoveMemory (MEASUREITEMSTRUCT Destination, int Source, int Length) { 
     1868    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1869
     1870 
     1871static void MoveMemory (char* Destination, ACCEL Source, int Length) { 
     1872    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1873
     1874 
     1875static void MoveMemory (WINDOWPOS* Destination, int Source, int Length) { 
     1876    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1877
     1878 
     1879static void MoveMemory(int Destination, WINDOWPOS* Source, int Length) { 
     1880    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1881
     1882 
     1883static void MoveMemory(MSG Destination, int Source, int Length) { 
     1884    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1885
     1886 
     1887static void MoveMemory(int Destination, MEASUREITEMSTRUCT Source, int Length) { 
     1888    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1889
     1890 
     1891static void MoveMemory(int Destination, byte[] Source, int Length) { 
     1892    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1893
     1894 
     1895static void MoveMemory(int Destination, wchar* Source, int Length) { 
     1896    dwt.internal.win32.func.MoveMemory(Destination, Source, Length); 
     1897
     1898// ----------------------------- 
    18341899 
    18351900static bool PeekMessage(MSG* lpMsg, int hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg) { 
    1836     if (IsUnicode) return PeekMessageW (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); 
    1837     return PeekMessageA (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); 
     1901    if (IsUnicode)  
     1902        return (PeekMessageW (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg) == 0) ? false : true; 
     1903    return (PeekMessageA (lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg) == 0) ? false : true; 
    18381904} 
    18391905 
    18401906static bool PostMessage (int hWnd, int Msg, int wParam, int lParam) { 
    1841     if (IsUnicode) return PostMessageW (hWnd, Msg, wParam, lParam); 
    1842     return PostMessageA (hWnd, Msg, wParam, lParam); 
     1907    if (IsUnicode)  
     1908        return (PostMessageW (hWnd, Msg, wParam, lParam) == 0) ? false : true; 
     1909    return (PostMessageA (hWnd, Msg, wParam, lParam) == 0) ? false : true; 
    18431910} 
    18441911 
    18451912static bool PostThreadMessage (int idThread, int Msg, int wParam, int lParam) { 
    1846     if (IsUnicode) return PostThreadMessageW (idThread, Msg, wParam, lParam); 
    1847     return PostThreadMessageA (idThread, Msg, wParam, lParam); 
     1913    if (IsUnicode)  
     1914        return (PostThreadMessageW (idThread, Msg, wParam, lParam) == 0) ? false : true; 
     1915    return (PostThreadMessageA (idThread, Msg, wParam, lParam) == 0) ? false : true; 
    18481916} 
    18491917 
    18501918static bool PrintDlg (PRINTDLG lppd) { 
    1851     if (IsUnicode) return PrintDlgW (lppd); 
    1852     return PrintDlgA (lppd); 
     1919    if (IsUnicode)  
     1920        return (PrintDlgW (lppd) == 0) ? false : true; 
     1921    return (PrintDlgA (lppd) == 0) ? false : true; 
    18531922} 
    18541923 
     
    19982067 
    19992068static bool SetMenuItemInfo (int hMenu, int uItem, bool fByPosition, MENUITEMINFO* lpmii) { 
    2000     if (IsUnicode) return SetMenuItemInfoW (hMenu, uItem, fByPosition, lpmii); 
    2001     return SetMenuItemInfoA (hMenu, uItem, fByPosition, lpmii); 
     2069    if (IsUnicode)  
     2070        return (SetMenuItemInfoW (hMenu, uItem, fByPosition, lpmii) == 0) ? false : true; 
     2071    return (SetMenuItemInfoA (hMenu, uItem, fByPosition, lpmii) == 0) ? false : true; 
    20022072} 
    20032073 
     
    20152085    if (IsUnicode) { 
    20162086        wchar* lpString1 = w_str(lpString); 
    2017         return SetWindowTextW (hWnd, lpString1)
     2087        return (SetWindowTextW (hWnd, lpString1) == 0) ? false : true
    20182088    } 
    20192089    char* lpString1 = c_str(lpString); 
    2020     return SetWindowTextA (hWnd, lpString1)
     2090    return (SetWindowTextA (hWnd, lpString1) == 0) ? false : true
    20212091} 
    20222092 
     
    20272097 
    20282098static bool ShellExecuteEx (SHELLEXECUTEINFO* lpExecInfo) { 
    2029     if (IsUnicode) return ShellExecuteExW(lpExecInfo); 
    2030     return ShellExecuteExA (lpExecInfo); 
     2099    if (IsUnicode)  
     2100        return (ShellExecuteExW(lpExecInfo) == 0) ? false : true; 
     2101    return (ShellExecuteExA (lpExecInfo) == 0) ? false : true; 
    20312102} 
    20322103 
     
    20342105    if (IsUnicode) { 
    20352106        wchar* pszPath1 = w_str(pszPath); 
    2036         return SHGetPathFromIDListW (pidl, pszPath1)
     2107        return (SHGetPathFromIDListW (pidl, pszPath1) == 0) ? false : true
    20372108    } 
    20382109    char* pszPath1 = c_str(pszPath); 
    2039     return SHGetPathFromIDListA (pidl, pszPath1)
     2110    return (SHGetPathFromIDListA (pidl, pszPath1) == 0) ? false : true
    20402111} 
    20412112 
     
    20462117 
    20472118static bool SystemParametersInfo (int uiAction, int uiParam, RECT* pvParam, int fWinIni) { 
    2048     if (IsUnicode) return SystemParametersInfoW(uiAction, uiParam, pvParam, fWinIni); 
    2049     return SystemParametersInfoA (uiAction, uiParam, pvParam, fWinIni); 
     2119    if (IsUnicode)  
     2120        return (SystemParametersInfoW(uiAction, uiParam, pvParam, fWinIni) == 0) ? false : true; 
     2121    return (SystemParametersInfoA (uiAction, uiParam, pvParam, fWinIni) == 0) ? false : true; 
    20502122} 
    20512123 
    20522124static bool SystemParametersInfo (int uiAction, int uiParam, NONCLIENTMETRICS* pvParam, int fWinIni) { 
    2053     if (IsUnicode) return SystemParametersInfoW (uiAction, uiParam, cast(NONCLIENTMETRICSW*)pvParam, fWinIni); 
    2054     return SystemParametersInfoA (uiAction, uiParam, cast(NONCLIENTMETRICSA*)pvParam, fWinIni); 
     2125    if (IsUnicode)  
     2126        return (SystemParametersInfoW (uiAction, uiParam, cast(NONCLIENTMETRICSW*)pvParam, fWinIni) == 0) ? false : true; 
     2127    return (SystemParametersInfoA (uiAction, uiParam, cast(NONCLIENTMETRICSA*)pvParam, fWinIni) == 0) ? false : true; 
    20552128} 
    20562129 
    20572130static bool SystemParametersInfo (int uiAction, int uiParam, int[] pvParam, int fWinIni) { 
    2058     if (IsUnicode) return SystemParametersInfoW (uiAction, uiParam, pvParam, fWinIni); 
    2059     return SystemParametersInfoA (uiAction, uiParam, pvParam, fWinIni); 
     2131    if (IsUnicode)  
     2132        return (SystemParametersInfoW (uiAction, uiParam, pvParam, fWinIni) == 0) ? false : true; 
     2133    return (SystemParametersInfoA (uiAction, uiParam, pvParam, fWinIni) == 0) ? false : true; 
    20602134} 
    20612135 
     
    20682142    if (IsUnicode) { 
    20692143        wchar* lpClassName1 = w_str(lpClassName); 
    2070         return UnregisterClassW(lpClassName1, hInstance)
     2144        return (UnregisterClassW(lpClassName1, hInstance) == 0) ? false : true
    20712145    } 
    20722146    char* lpClassName1 = c_str(lpClassName); 
    2073     return UnregisterClassA (lpClassName1, hInstance)
     2147    return (UnregisterClassA (lpClassName1, hInstance) == 0) ? false : true
    20742148} 
    20752149 
     
    20792153} 
    20802154 
    2081  
    2082  
    2083  
    2084  
    2085 /** Natives */ 
    2086  
    2087 static extern (Windows) 
    2088 
    2089     int AbortDoc (int hdc); 
    2090     int ActivateKeyboardLayout(int hkl, int Flags); 
    2091     bool AdjustWindowRectEx (RECT* lpRect, int dwStyle, bool bMenu, int dwExStyle); 
    2092     bool Arc (int hdc,int nLeftRect,int nTopRect,int nRightRect,int nBottomRect,int nXStartArc,int nYStartArc,int nXEndArc,int nYEndArc); 
    2093     int BeginDeferWindowPos (int nNumWindows); 
    2094     int BeginPaint (int hWnd, PAINTSTRUCT* lpPaint); 
    2095     bool BitBlt (int hdcDest,int nXDest,int nYDest,int nWidth,int nHeight,int hdcSrc,int nXSrc,int nYSrc,int dwRop); 
    2096     bool BringWindowToTop (int hWnd); 
    2097     int Call (int address, DLLVERSIONINFO* arg0); 
    2098     int CallNextHookEx(int hhk, int nCode, int wParam, int lParam); 
    2099     int CallWindowProcW (int lpPrevWndFunc, int hWnd, int Msg, int wParam, int lParam); 
    2100     int CallWindowProcA (int lpPrevWndFunc, int hWnd, int Msg, int wParam, int lParam); 
    2101     short CharLowerW (short ch); 
    2102     short CharLowerA (short ch); 
    2103     short CharUpperW (short ch); 
    2104     short CharUpperA (short ch); 
    2105     bool CheckMenuItem (int hmenu, int uIDCheckItem, int uCheck); 
    2106