Diff

Not logged in

Differences From Artifact [958265cdfd657f8f]:

To Artifact [4b60b1e6f45bd956]:


5 * * 5 * * 6 * Translated from MinGW Windows headers * 6 * Translated from MinGW Windows headers * 7 * by Stewart Gordon * 7 * by Stewart Gordon * 8 * * 8 * * 9 * Placed into public domain * 9 * Placed into public domain * 10 \***********************************************************************/ 10 \***********************************************************************/ 11 module win32.dde; 11 module win32.dde; 12 pragma(lib, "user32.lib"); | 12 pragma(lib, "user32"); 13 13 14 private import win32.windef; 14 private import win32.windef; 15 15 16 enum : uint { 16 enum : uint { 17 WM_DDE_FIRST = 0x03E0, 17 WM_DDE_FIRST = 0x03E0, 18 WM_DDE_INITIATE = WM_DDE_FIRST, 18 WM_DDE_INITIATE = WM_DDE_FIRST, 19 WM_DDE_TERMINATE, 19 WM_DDE_TERMINATE, ................................................................................................................................................................................ 27 WM_DDE_LAST = WM_DDE_EXECUTE 27 WM_DDE_LAST = WM_DDE_EXECUTE 28 } 28 } 29 29 30 struct DDEACK { 30 struct DDEACK { 31 ubyte bAppReturnCode; 31 ubyte bAppReturnCode; 32 ubyte _bf; 32 ubyte _bf; 33 33 34 ubyte reserved() { return cast(ubyte) (_bf & 0x3F); } | 34 @property ubyte reserved() { return cast(ubyte) (_bf & 0x3F); } 35 bool fBusy() { return cast(bool) (_bf & 0x40); } | 35 @property bool fBusy() { return cast(bool) (_bf & 0x40); } 36 bool fAck() { return cast(bool) (_bf & 0x80); } | 36 @property bool fAck() { return cast(bool) (_bf & 0x80); } 37 37 38 ubyte reserved(ubyte r) { | 38 @property ubyte reserved(ubyte r) { 39 _bf = cast(ubyte) ((_bf & ~0x3F) | (r & 0x3F)); 39 _bf = cast(ubyte) ((_bf & ~0x3F) | (r & 0x3F)); 40 return cast(ubyte)(r & 0x3F); 40 return cast(ubyte)(r & 0x3F); 41 } 41 } 42 42 43 bool fBusy(bool f) { _bf = cast(ubyte) ((_bf & ~0x40) | (f << 6)); retur | 43 @property bool fBusy(bool f) { _bf = cast(ubyte) ((_bf & ~0x40) | (f << 44 bool fAck(bool f) { _bf = cast(ubyte) ((_bf & ~0x80) | (f << 7)); retur | 44 @property bool fAck(bool f) { _bf = cast(ubyte) ((_bf & ~0x80) | (f << 45 } 45 } 46 46 47 struct DDEADVISE { 47 struct DDEADVISE { 48 ushort _bf; 48 ushort _bf; 49 short cfFormat; 49 short cfFormat; 50 50 51 ushort reserved() { return cast(ushort) (_bf & 0x3FFF); } | 51 @property ushort reserved() { return cast(ushort) (_bf & 0x3FFF); } 52 bool fDeferUpd() { return cast(bool) (_bf & 0x4000); } | 52 @property bool fDeferUpd() { return cast(bool) (_bf & 0x4000); } 53 bool fAckReq() { return cast(bool) (_bf & 0x8000); } | 53 @property bool fAckReq() { return cast(bool) (_bf & 0x8000); } 54 54 55 ushort reserved(ushort r) { | 55 @property ushort reserved(ushort r) { 56 _bf = cast(ushort) ((_bf & ~0x3FFF) | (r & 0x3FFF)); 56 _bf = cast(ushort) ((_bf & ~0x3FFF) | (r & 0x3FFF)); 57 return cast(ushort)(r & 0x3FFF); 57 return cast(ushort)(r & 0x3FFF); 58 } 58 } 59 59 60 bool fDeferUpd(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 1 | 60 @property bool fDeferUpd(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) 61 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 1 | 61 @property bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) 62 } 62 } 63 63 64 struct DDEDATA { 64 struct DDEDATA { 65 ushort _bf; 65 ushort _bf; 66 short cfFormat; 66 short cfFormat; 67 byte _Value; 67 byte _Value; 68 68 69 ushort unused() { return cast(ushort) (_bf & 0x0FFF); } | 69 @property ushort unused() { return cast(ushort) (_bf & 0x0FFF); } 70 bool fResponse() { return cast(bool) (_bf & 0x1000); } | 70 @property bool fResponse() { return cast(bool) (_bf & 0x1000); } 71 bool fRelease() { return cast(bool) (_bf & 0x2000); } | 71 @property bool fRelease() { return cast(bool) (_bf & 0x2000); } 72 bool reserved() { return cast(bool) (_bf & 0x4000); } | 72 @property bool reserved() { return cast(bool) (_bf & 0x4000); } 73 bool fAckReq() { return cast(bool) (_bf & 0x8000); } | 73 @property bool fAckReq() { return cast(bool) (_bf & 0x8000); } 74 74 75 byte* Value() { return &_Value; } | 75 @property byte* Value() { return &_Value; } 76 76 77 ushort unused(ushort r) { | 77 @property ushort unused(ushort r) { 78 _bf = cast(ushort) ((_bf & ~0x0FFF) | (r & 0x0FFF)); 78 _bf = cast(ushort) ((_bf & ~0x0FFF) | (r & 0x0FFF)); 79 return cast(ushort)(r & 0x0FFF); 79 return cast(ushort)(r & 0x0FFF); 80 } 80 } 81 81 82 bool fResponse(bool f) { _bf = cast(ushort) ((_bf & ~0x1000) | (f << 1 | 82 @property bool fResponse(bool f) { _bf = cast(ushort) ((_bf & ~0x1000) 83 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << 1 | 83 @property bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) 84 bool reserved(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 1 | 84 @property bool reserved(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) 85 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 1 | 85 @property bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) 86 } 86 } 87 87 88 struct DDEPOKE { 88 struct DDEPOKE { 89 ushort _bf; 89 ushort _bf; 90 short cfFormat; 90 short cfFormat; 91 byte _Value; 91 byte _Value; 92 92 93 ushort unused() { return cast(ushort) (_bf & 0x1FFF); } | 93 @property ushort unused() { return cast(ushort) (_bf & 0x1FFF); } 94 bool fRelease() { return cast(bool) (_bf & 0x2000); } | 94 @property bool fRelease() { return cast(bool) (_bf & 0x2000); } 95 ubyte fReserved() { return cast(ubyte) ((_bf & 0xC000) >>> 14); } | 95 @property ubyte fReserved() { return cast(ubyte) ((_bf & 0xC000) >>> 1 96 96 97 byte* Value() { return &_Value; } | 97 @property byte* Value() { return &_Value; } 98 98 99 ushort unused(ushort u) { | 99 @property ushort unused(ushort u) { 100 _bf = cast(ushort) ((_bf & ~0x1FFF) | (u & 0x1FFF)); 100 _bf = cast(ushort) ((_bf & ~0x1FFF) | (u & 0x1FFF)); 101 return cast(ushort)(u & 0x1FFF); 101 return cast(ushort)(u & 0x1FFF); 102 } 102 } 103 103 104 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << | 104 @property bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000 105 ubyte fReserved(ubyte r) { _bf = cast(ushort) ((_bf & ~0xC000) | (r << | 105 @property ubyte fReserved(ubyte r) { _bf = cast(ushort) ((_bf & ~0xC000 106 } 106 } 107 107 108 deprecated struct DDELN { 108 deprecated struct DDELN { 109 ushort _bf; 109 ushort _bf; 110 short cfFormat; 110 short cfFormat; 111 111 112 ushort unused() { return cast(ushort) (_bf & 0x1FFF); } | 112 @property ushort unused() { return cast(ushort) (_bf & 0x1FFF); } 113 bool fRelease() { return cast(bool) (_bf & 0x2000); } | 113 @property bool fRelease() { return cast(bool) (_bf & 0x2000); } 114 bool fDeferUpd() { return cast(bool) (_bf & 0x4000); } | 114 @property bool fDeferUpd() { return cast(bool) (_bf & 0x4000); } 115 bool fAckReq() { return cast(bool) (_bf & 0x8000); } | 115 @property bool fAckReq() { return cast(bool) (_bf & 0x8000); } 116 116 117 ushort unused(ushort u) { | 117 @property ushort unused(ushort u) { 118 _bf = cast(ushort)((_bf & ~0x1FFF) | (u & 0x1FFF)); 118 _bf = cast(ushort)((_bf & ~0x1FFF) | (u & 0x1FFF)); 119 return cast(ushort)(u & 0x1FFF); 119 return cast(ushort)(u & 0x1FFF); 120 } 120 } 121 121 122 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << 1 | 122 @property bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) 123 bool fDeferUpd(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 1 | 123 @property bool fDeferUpd(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) 124 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 1 | 124 @property bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) 125 } 125 } 126 126 127 deprecated struct DDEUP { 127 deprecated struct DDEUP { 128 ushort _bf; 128 ushort _bf; 129 short cfFormat; 129 short cfFormat; 130 byte _rgb; 130 byte _rgb; 131 131 132 ushort unused() { return cast(ushort) (_bf & 0x0FFF); } | 132 @property ushort unused() { return cast(ushort) (_bf & 0x0FFF); } 133 bool fAck() { return cast(bool) (_bf & 0x1000); } | 133 @property bool fAck() { return cast(bool) (_bf & 0x1000); } 134 bool fRelease() { return cast(bool) (_bf & 0x2000); } | 134 @property bool fRelease() { return cast(bool) (_bf & 0x2000); } 135 bool fReserved() { return cast(bool) (_bf & 0x4000); } | 135 @property bool fReserved() { return cast(bool) (_bf & 0x4000); } 136 bool fAckReq() { return cast(bool) (_bf & 0x8000); } | 136 @property bool fAckReq() { return cast(bool) (_bf & 0x8000); } 137 137 138 byte* rgb() { return &_rgb; } | 138 @property byte* rgb() { return &_rgb; } 139 139 140 ushort unused(ushort r) { | 140 @property ushort unused(ushort r) { 141 _bf = cast(ushort) ((_bf & ~0x0FFF) | (r & 0x0FFF)); 141 _bf = cast(ushort) ((_bf & ~0x0FFF) | (r & 0x0FFF)); 142 return cast(ushort)(r & 0x0FFF); 142 return cast(ushort)(r & 0x0FFF); 143 } 143 } 144 144 145 bool fAck(bool f) { _bf = cast(ushort) ((_bf & ~0x1000) | (f << 1 | 145 @property bool fAck(bool f) { _bf = cast(ushort) ((_bf & ~0x1000) 146 bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) | (f << 1 | 146 @property bool fRelease(bool f) { _bf = cast(ushort) ((_bf & ~0x2000) 147 bool fReserved(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) | (f << 1 | 147 @property bool fReserved(bool f) { _bf = cast(ushort) ((_bf & ~0x4000) 148 bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) | (f << 1 | 148 @property bool fAckReq(bool f) { _bf = cast(ushort) ((_bf & ~0x8000) 149 } 149 } 150 150 151 extern (Windows) { 151 extern (Windows) { 152 BOOL DdeSetQualityOfService(HWND, CPtr!(SECURITY_QUALITY_OF_SERVICE), | 152 BOOL DdeSetQualityOfService(HWND, const(SECURITY_QUALITY_OF_SERVICE)*, 153 PSECURITY_QUALITY_OF_SERVICE); 153 PSECURITY_QUALITY_OF_SERVICE); 154 BOOL ImpersonateDdeClientWindow(HWND, HWND); 154 BOOL ImpersonateDdeClientWindow(HWND, HWND); 155 LPARAM PackDDElParam(UINT, UINT_PTR, UINT_PTR); 155 LPARAM PackDDElParam(UINT, UINT_PTR, UINT_PTR); 156 BOOL UnpackDDElParam(UINT, LPARAM, PUINT_PTR, PUINT_PTR); 156 BOOL UnpackDDElParam(UINT, LPARAM, PUINT_PTR, PUINT_PTR); 157 BOOL FreeDDElParam(UINT, LPARAM); 157 BOOL FreeDDElParam(UINT, LPARAM); 158 LPARAM ReuseDDElParam(LPARAM, UINT, UINT, UINT_PTR, UINT_PTR); 158 LPARAM ReuseDDElParam(LPARAM, UINT, UINT, UINT_PTR, UINT_PTR); 159 } 159 }