Changeset 183

Show
Ignore:
Timestamp:
04/30/07 03:12:15 (5 years ago)
Author:
WeirdCat
Message:

warnings and minor bugs fixed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/win32/commctrl.d

    r181 r183  
    47114711 
    47124712int ListView_GetNextItem(HWND w, int i, UINT f) { 
    4713     return SendMessage(w, LVM_GETNEXTITEM, i, MAKELPARAM(f, 0)); 
     4713    return SendMessage(w, LVM_GETNEXTITEM, i, MAKELPARAM(cast(ushort)f, 0)); 
    47144714} 
    47154715 
     
    47244724 
    47254725BOOL ListView_SetItemPosition(HWND w, int i, int x, int y) { 
    4726     return cast(BOOL) SendMessage(w, LVM_SETITEMPOSITION, i, MAKELPARAM(x, y)); 
     4726    return cast(BOOL) SendMessage(w, LVM_SETITEMPOSITION, i, MAKELPARAM(cast(ushort)x, cast(ushort)y)); 
    47274727} 
    47284728 
     
    47444744 
    47454745BOOL ListView_EnsureVisible(HWND w, int i, BOOL f) { 
    4746     return cast(BOOL) SendMessage(w, LVM_ENSUREVISIBLE, i, MAKELPARAM(f, 0)); 
     4746    return cast(BOOL) SendMessage(w, LVM_ENSUREVISIBLE, i, MAKELPARAM(cast(ushort)f, 0)); 
    47474747} 
    47484748 
     
    47884788 
    47894789BOOL ListView_SetColumnWidth(HWND w, int i, int x) { 
    4790     return cast(BOOL) SendMessage(w, LVM_SETCOLUMNWIDTH, i, MAKELPARAM(x, 0)); 
     4790    return cast(BOOL) SendMessage(w, LVM_SETCOLUMNWIDTH, i, MAKELPARAM(cast(ushort)x, 0)); 
    47914791} 
    47924792 
     
    50665066 
    50675067DWORD TabCtrl_SetItemSize(HWND w, int x, int y) { 
    5068     return cast(DWORD) SendMessage(w, TCM_SETITEMSIZE, 0, MAKELPARAM(x, y)); 
     5068    return cast(DWORD) SendMessage(w, TCM_SETITEMSIZE, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y)); 
    50695069} 
    50705070 
     
    50745074 
    50755075void TabCtrl_SetPadding(HWND w, int x, int y) { 
    5076     SendMessage(w, TCM_SETPADDING, 0, MAKELPARAM(x, y)); 
     5076    SendMessage(w, TCM_SETPADDING, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y)); 
    50775077} 
    50785078 
     
    52665266    DWORD ListView_ApproximateViewRect(HWND w, int iw, int ih, int i) { 
    52675267        return cast(DWORD) SendMessage(w, LVM_APPROXIMATEVIEWRECT, i, 
    5268           MAKELPARAM(iw, ih)); 
     5268          MAKELPARAM(cast(ushort)iw, cast(ushort)ih)); 
    52695269    } 
    52705270 
     
    53155315    DWORD ListView_SetIconSpacing(HWND w, int x, int y) { 
    53165316        return cast(DWORD) SendMessage(w, LVM_SETICONSPACING, 0, 
    5317           MAKELONG(x, y)); 
     5317          MAKELONG(cast(ushort)x, cast(ushort)y)); 
    53185318    } 
    53195319 
  • trunk/win32/dde.d

    r171 r183  
    3232    ubyte _bf; 
    3333 
    34     ubyte reserved() { return _bf & 0x3F; } 
     34    ubyte reserved() { return cast(ubyte)(_bf & 0x3F); } 
    3535    bool  fBusy()    { return cast(bool) (_bf & 0x40); } 
    3636    bool  fAck()     { return cast(bool) (_bf & 0x80); } 
    3737 
    3838    ubyte reserved(ubyte r) { 
    39         _bf = (_bf & ~0x3F) | (r & 0x3F); 
    40         return r; 
    41     } 
    42  
    43     bool fBusy(bool f) { _bf = (_bf & ~0x40) | (f << 6); return f; } 
    44     bool fAck(bool f)  { _bf = (_bf & ~0x80) | (f << 7); return f; } 
     39        _bf = cast(ubyte)((_bf & ~0x3F) | (r & 0x3F)); 
     40        return r; 
     41    } 
     42 
     43    bool fBusy(bool f) { _bf = cast(ubyte)((_bf & ~0x40) | (f << 6)); return f; } 
     44    bool fAck(bool f)  { _bf = cast(ubyte)((_bf & ~0x80) | (f << 7)); return f; } 
    4545} 
    4646 
     
    4949    short  cfFormat; 
    5050 
    51     ubyte  reserved()  { return _bf & 0x3FFF; } 
     51    ushort reserved()  { return cast(ushort)(_bf & 0x3FFF); } 
    5252    bool   fDeferUpd() { return cast(bool) (_bf & 0x4000); } 
    5353    bool   fAckReq()   { return cast(bool) (_bf & 0x8000); } 
    5454 
    5555    ushort reserved(ushort r) { 
    56         _bf = (_bf & ~0x3FFF) | (r & 0x3FFF); 
    57         return r; 
    58     } 
    59  
    60     bool   fDeferUpd(bool f) { _bf = (_bf & ~0x4000) | (f << 14); return f; } 
    61     bool   fAckReq(bool f)   { _bf = (_bf & ~0x8000) | (f << 15); return f; } 
     56        _bf = cast(ushort)((_bf & ~0x3FFF) | (r & 0x3FFF)); 
     57        return r; 
     58    } 
     59 
     60    bool   fDeferUpd(bool f) { _bf = cast(ushort)((_bf & ~0x4000) | (f << 14)); return f; } 
     61    bool   fAckReq(bool f)   { _bf = cast(ushort)((_bf & ~0x8000) | (f << 15)); return f; } 
    6262} 
    6363 
     
    6767    byte   _Value; 
    6868 
    69     ubyte  unused() { return _bf & 0x0FFF; } 
     69    ushort unused() { return cast(ushort)(_bf & 0x0FFF); } 
    7070    bool   fResponse() { return cast(bool) (_bf & 0x1000); } 
    7171    bool   fRelease() { return cast(bool) (_bf & 0x2000); } 
     
    7474 
    7575    ushort unused(ushort r) { 
    76         _bf = (_bf & ~0x0FFF) | (r & 0x0FFF); 
     76        _bf = cast(ushort)((_bf & ~0x0FFF) | (r & 0x0FFF)); 
    7777        return r; 
    7878    } 
     
    8080    byte*  Value() { return &_Value; } 
    8181 
    82     bool   fResponse(bool f) { _bf = (_bf & ~0x1000) | (f << 12); return f; } 
    83     bool   fRelease(bool f)  { _bf = (_bf & ~0x2000) | (f << 13); return f; } 
    84     bool   reserved(bool f)  { _bf = (_bf & ~0x4000) | (f << 14); return f; } 
    85     bool   fAckReq(bool f)   { _bf = (_bf & ~0x8000) | (f << 15); return f; } 
     82    bool   fResponse(bool f) { _bf = cast(ushort)((_bf & ~0x1000) | (f << 12)); return f; } 
     83    bool   fRelease(bool f)  { _bf = cast(ushort)((_bf & ~0x2000) | (f << 13)); return f; } 
     84    bool   reserved(bool f)  { _bf = cast(ushort)((_bf & ~0x4000) | (f << 14)); return f; } 
     85    bool   fAckReq(bool f)   { _bf = cast(ushort)((_bf & ~0x8000) | (f << 15)); return f; } 
    8686} 
    8787 
     
    9191    byte   _Value; 
    9292 
    93     ushort unused()    { return _bf & 0x1FFF; } 
     93    ushort unused()    { return cast(ushort)(_bf & 0x1FFF); } 
    9494    bool   fRelease()  { return cast(bool) (_bf & 0x2000); } 
    95     ubyte  fReserved() { return (_bf & 0xC000) >>> 14; } 
     95    ubyte  fReserved() { return cast(ubyte)((_bf & 0xC000) >>> 14); } 
    9696 
    9797    ushort unused(ushort u) { 
    98         _bf = (_bf & ~0x1FFF) | (u & 0x1FFF); 
     98        _bf = cast(ushort)((_bf & ~0x1FFF) | (u & 0x1FFF)); 
    9999        return u; 
    100100    } 
     
    102102    byte*  Value() { return &_Value; } 
    103103 
    104     bool   fRelease(bool f)   { _bf = (_bf & ~0x2000) | (f << 13); return f; } 
    105     ubyte  fReserved(ubyte r) { _bf = (_bf & ~0xC000) | (r << 14); return r; } 
     104    bool   fRelease(bool f)   { _bf = cast(ushort)((_bf & ~0x2000) | (f << 13)); return f; } 
     105    ubyte  fReserved(ubyte r) { _bf = cast(ushort)((_bf & ~0xC000) | (r << 14)); return r; } 
    106106} 
    107107 
     
    110110    short  cfFormat; 
    111111 
    112     ubyte  unused() { return _bf & 0x1FFF; } 
     112    ushort unused() { return cast(ushort)(_bf & 0x1FFF); } 
    113113    bool   fRelease() { return cast(bool) (_bf & 0x2000); } 
    114114    bool   fDeferUpd() { return cast(bool) (_bf & 0x4000); } 
     
    116116 
    117117    ushort unused(ushort u) { 
    118         _bf = (_bf & ~0x1FFF) | (u & 0x1FFF); 
     118        _bf = cast(ushort)((_bf & ~0x1FFF) | (u & 0x1FFF)); 
    119119        return u; 
    120120    } 
    121121 
    122     bool   fRelease(bool f) { _bf = (_bf & ~0x2000) | (f << 13); return f; } 
    123     bool   fDeferUpd(bool f) { _bf = (_bf & ~0x4000) | (f << 14); return f; } 
    124     bool   fAckReq(bool f) { _bf = (_bf & ~0x8000) | (f << 15); return f; } 
     122    bool   fRelease(bool f) { _bf = cast(ushort)((_bf & ~0x2000) | (f << 13)); return f; } 
     123    bool   fDeferUpd(bool f) { _bf = cast(ushort)((_bf & ~0x4000) | (f << 14)); return f; } 
     124    bool   fAckReq(bool f) { _bf = cast(ushort)((_bf & ~0x8000) | (f << 15)); return f; } 
    125125} 
    126126 
     
    130130    byte   _rgb; 
    131131 
    132     ubyte  unused()    { return _bf & 0x0FFF; } 
     132    ushort unused()    { return cast(ushort)(_bf & 0x0FFF); } 
    133133    bool   fAck()      { return cast(bool) (_bf & 0x1000); } 
    134134    bool   fRelease()  { return cast(bool) (_bf & 0x2000); } 
     
    137137 
    138138    ushort unused(ushort r) { 
    139         _bf = (_bf & ~0x0FFF) | (r & 0x0FFF); 
     139        _bf = cast(ushort)((_bf & ~0x0FFF) | (r & 0x0FFF)); 
    140140        return r; 
    141141    } 
     
    143143    byte*  rgb() { return &_rgb; } 
    144144 
    145     bool   fAck(bool f)      { _bf = (_bf & ~0x1000) | (f << 12); return f; } 
    146     bool   fRelease(bool f)  { _bf = (_bf & ~0x2000) | (f << 13); return f; } 
    147     bool   fReserved(bool f) { _bf = (_bf & ~0x4000) | (f << 14); return f; } 
    148     bool   fAckReq(bool f)   { _bf = (_bf & ~0x8000) | (f << 15); return f; } 
     145    bool   fAck(bool f)      { _bf = cast(ushort)((_bf & ~0x1000) | (f << 12)); return f; } 
     146    bool   fRelease(bool f)  { _bf = cast(ushort)((_bf & ~0x2000) | (f << 13)); return f; } 
     147    bool   fReserved(bool f) { _bf = cast(ushort)((_bf & ~0x4000) | (f << 14)); return f; } 
     148    bool   fAckReq(bool f)   { _bf = cast(ushort)((_bf & ~0x8000) | (f << 15)); return f; } 
    149149} 
    150150 
  • trunk/win32/mmsystem.d

    r178 r183  
    282282const MEVT_F_CALLBACK=0x40000000; 
    283283 
    284 BYTE MEVT_EVENTTYPE(DWORD x) { return (x>>24) &0xFF; } 
    285 DWORD MEVT_EVENTPARM(DWORD x) { return x & 0xFFFFFFL; } 
     284BYTE MEVT_EVENTTYPE(DWORD x) { return cast(BYTE)((x>>24) &0xFF); } 
     285DWORD MEVT_EVENTPARM(DWORD x) { return x & 0xFFFFFF; } 
    286286 
    287287const MEVT_SHORTMSG=0;