Changeset 183
- Timestamp:
- 04/30/07 03:12:15 (5 years ago)
- Files:
-
- trunk/win32/commctrl.d (modified) (8 diffs)
- trunk/win32/dde.d (modified) (12 diffs)
- trunk/win32/mmsystem.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/win32/commctrl.d
r181 r183 4711 4711 4712 4712 int 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)); 4714 4714 } 4715 4715 … … 4724 4724 4725 4725 BOOL 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)); 4727 4727 } 4728 4728 … … 4744 4744 4745 4745 BOOL 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)); 4747 4747 } 4748 4748 … … 4788 4788 4789 4789 BOOL 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)); 4791 4791 } 4792 4792 … … 5066 5066 5067 5067 DWORD 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)); 5069 5069 } 5070 5070 … … 5074 5074 5075 5075 void 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)); 5077 5077 } 5078 5078 … … 5266 5266 DWORD ListView_ApproximateViewRect(HWND w, int iw, int ih, int i) { 5267 5267 return cast(DWORD) SendMessage(w, LVM_APPROXIMATEVIEWRECT, i, 5268 MAKELPARAM( iw,ih));5268 MAKELPARAM(cast(ushort)iw, cast(ushort)ih)); 5269 5269 } 5270 5270 … … 5315 5315 DWORD ListView_SetIconSpacing(HWND w, int x, int y) { 5316 5316 return cast(DWORD) SendMessage(w, LVM_SETICONSPACING, 0, 5317 MAKELONG( x,y));5317 MAKELONG(cast(ushort)x, cast(ushort)y)); 5318 5318 } 5319 5319 trunk/win32/dde.d
r171 r183 32 32 ubyte _bf; 33 33 34 ubyte reserved() { return _bf & 0x3F; }34 ubyte reserved() { return cast(ubyte)(_bf & 0x3F); } 35 35 bool fBusy() { return cast(bool) (_bf & 0x40); } 36 36 bool fAck() { return cast(bool) (_bf & 0x80); } 37 37 38 38 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; } 45 45 } 46 46 … … 49 49 short cfFormat; 50 50 51 u byte reserved() { return _bf & 0x3FFF; }51 ushort reserved() { return cast(ushort)(_bf & 0x3FFF); } 52 52 bool fDeferUpd() { return cast(bool) (_bf & 0x4000); } 53 53 bool fAckReq() { return cast(bool) (_bf & 0x8000); } 54 54 55 55 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; } 62 62 } 63 63 … … 67 67 byte _Value; 68 68 69 u byte unused() { return _bf & 0x0FFF; }69 ushort unused() { return cast(ushort)(_bf & 0x0FFF); } 70 70 bool fResponse() { return cast(bool) (_bf & 0x1000); } 71 71 bool fRelease() { return cast(bool) (_bf & 0x2000); } … … 74 74 75 75 ushort unused(ushort r) { 76 _bf = (_bf & ~0x0FFF) | (r & 0x0FFF);76 _bf = cast(ushort)((_bf & ~0x0FFF) | (r & 0x0FFF)); 77 77 return r; 78 78 } … … 80 80 byte* Value() { return &_Value; } 81 81 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; } 86 86 } 87 87 … … 91 91 byte _Value; 92 92 93 ushort unused() { return _bf & 0x1FFF; }93 ushort unused() { return cast(ushort)(_bf & 0x1FFF); } 94 94 bool fRelease() { return cast(bool) (_bf & 0x2000); } 95 ubyte fReserved() { return (_bf & 0xC000) >>> 14; }95 ubyte fReserved() { return cast(ubyte)((_bf & 0xC000) >>> 14); } 96 96 97 97 ushort unused(ushort u) { 98 _bf = (_bf & ~0x1FFF) | (u & 0x1FFF);98 _bf = cast(ushort)((_bf & ~0x1FFF) | (u & 0x1FFF)); 99 99 return u; 100 100 } … … 102 102 byte* Value() { return &_Value; } 103 103 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; } 106 106 } 107 107 … … 110 110 short cfFormat; 111 111 112 u byte unused() { return _bf & 0x1FFF; }112 ushort unused() { return cast(ushort)(_bf & 0x1FFF); } 113 113 bool fRelease() { return cast(bool) (_bf & 0x2000); } 114 114 bool fDeferUpd() { return cast(bool) (_bf & 0x4000); } … … 116 116 117 117 ushort unused(ushort u) { 118 _bf = (_bf & ~0x1FFF) | (u & 0x1FFF);118 _bf = cast(ushort)((_bf & ~0x1FFF) | (u & 0x1FFF)); 119 119 return u; 120 120 } 121 121 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; } 125 125 } 126 126 … … 130 130 byte _rgb; 131 131 132 u byte unused() { return _bf & 0x0FFF; }132 ushort unused() { return cast(ushort)(_bf & 0x0FFF); } 133 133 bool fAck() { return cast(bool) (_bf & 0x1000); } 134 134 bool fRelease() { return cast(bool) (_bf & 0x2000); } … … 137 137 138 138 ushort unused(ushort r) { 139 _bf = (_bf & ~0x0FFF) | (r & 0x0FFF);139 _bf = cast(ushort)((_bf & ~0x0FFF) | (r & 0x0FFF)); 140 140 return r; 141 141 } … … 143 143 byte* rgb() { return &_rgb; } 144 144 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; } 149 149 } 150 150 trunk/win32/mmsystem.d
r178 r183 282 282 const MEVT_F_CALLBACK=0x40000000; 283 283 284 BYTE MEVT_EVENTTYPE(DWORD x) { return (x>>24) &0xFF; }285 DWORD MEVT_EVENTPARM(DWORD x) { return x & 0xFFFFFF L; }284 BYTE MEVT_EVENTTYPE(DWORD x) { return cast(BYTE)((x>>24) &0xFF); } 285 DWORD MEVT_EVENTPARM(DWORD x) { return x & 0xFFFFFF; } 286 286 287 287 const MEVT_SHORTMSG=0;
