| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
package windriver |
| 6 |
|
| 7 |
import ( |
| 8 |
"unsafe" |
| 9 |
) |
| 10 |
|
| 11 |
type _COLORREF uint32 |
| 12 |
|
| 13 |
func _RGB(r, g, b byte) _COLORREF { |
| 14 |
return _COLORREF(r) | _COLORREF(g)<<8 | _COLORREF(b)<<16 |
| 15 |
} |
| 16 |
|
| 17 |
type _POINT struct { |
| 18 |
X int32 |
| 19 |
Y int32 |
| 20 |
} |
| 21 |
|
| 22 |
type _RECT struct { |
| 23 |
Left int32 |
| 24 |
Top int32 |
| 25 |
Right int32 |
| 26 |
Bottom int32 |
| 27 |
} |
| 28 |
|
| 29 |
type _BITMAPINFOHEADER struct { |
| 30 |
Size uint32 |
| 31 |
Width int32 |
| 32 |
Height int32 |
| 33 |
Planes uint16 |
| 34 |
BitCount uint16 |
| 35 |
Compression uint32 |
| 36 |
SizeImage uint32 |
| 37 |
XPelsPerMeter int32 |
| 38 |
YPelsPerMeter int32 |
| 39 |
ClrUsed uint32 |
| 40 |
ClrImportant uint32 |
| 41 |
} |
| 42 |
|
| 43 |
type _RGBQUAD struct { |
| 44 |
Blue byte |
| 45 |
Green byte |
| 46 |
Red byte |
| 47 |
Reserved byte |
| 48 |
} |
| 49 |
|
| 50 |
type _BITMAPINFO struct { |
| 51 |
Header _BITMAPINFOHEADER |
| 52 |
Colors [1]_RGBQUAD |
| 53 |
} |
| 54 |
|
| 55 |
type _BLENDFUNCTION struct { |
| 56 |
BlendOp byte |
| 57 |
BlendFlags byte |
| 58 |
SourceConstantAlpha byte |
| 59 |
AlphaFormat byte |
| 60 |
} |
| 61 |
|
| 62 |
|
| 63 |
func (bf _BLENDFUNCTION) ToUintptr() uintptr { |
| 64 |
return *((*uintptr)(unsafe.Pointer(&bf))) |
| 65 |
} |
| 66 |
|
| 67 |
type _XFORM struct { |
| 68 |
eM11 float32 |
| 69 |
eM12 float32 |
| 70 |
eM21 float32 |
| 71 |
eM22 float32 |
| 72 |
eDx float32 |
| 73 |
eDy float32 |
| 74 |
} |
| 75 |
|
| 76 |
const ( |
| 77 |
_WM_PAINT = 15 |
| 78 |
_WM_WINDOWPOSCHANGED = 71 |
| 79 |
_WM_KEYDOWN = 256 |
| 80 |
_WM_KEYUP = 257 |
| 81 |
_WM_SYSKEYDOWN = 260 |
| 82 |
_WM_SYSKEYUP = 261 |
| 83 |
_WM_MOUSEMOVE = 512 |
| 84 |
_WM_LBUTTONDOWN = 513 |
| 85 |
_WM_LBUTTONUP = 514 |
| 86 |
_WM_RBUTTONDOWN = 516 |
| 87 |
_WM_RBUTTONUP = 517 |
| 88 |
_WM_MBUTTONDOWN = 519 |
| 89 |
_WM_MBUTTONUP = 520 |
| 90 |
_WM_USER = 0x0400 |
| 91 |
) |
| 92 |
|
| 93 |
const ( |
| 94 |
_WS_OVERLAPPED = 0x00000000 |
| 95 |
_WS_CAPTION = 0x00C00000 |
| 96 |
_WS_SYSMENU = 0x00080000 |
| 97 |
_WS_THICKFRAME = 0x00040000 |
| 98 |
_WS_MINIMIZEBOX = 0x00020000 |
| 99 |
_WS_MAXIMIZEBOX = 0x00010000 |
| 100 |
_WS_OVERLAPPEDWINDOW = _WS_OVERLAPPED | _WS_CAPTION | _WS_SYSMENU | _WS_THICKFRAME | _WS_MINIMIZEBOX | _WS_MAXIMIZEBOX |
| 101 |
) |
| 102 |
|
| 103 |
const ( |
| 104 |
_COLOR_BTNFACE = 15 |
| 105 |
) |
| 106 |
|
| 107 |
const ( |
| 108 |
_IDI_APPLICATION = 32512 |
| 109 |
_IDC_ARROW = 32512 |
| 110 |
) |
| 111 |
|
| 112 |
const ( |
| 113 |
_BI_RGB = 0 |
| 114 |
_DIB_RGB_COLORS = 0 |
| 115 |
|
| 116 |
_AC_SRC_OVER = 0x00 |
| 117 |
_AC_SRC_ALPHA = 0x01 |
| 118 |
|
| 119 |
_SRCCOPY = 0x00cc0020 |
| 120 |
|
| 121 |
_SHADEBLENDCAPS = 120 |
| 122 |
_SB_NONE = 0 |
| 123 |
) |
| 124 |
|
| 125 |
const ( |
| 126 |
_GM_COMPATIBLE = 1 |
| 127 |
_GM_ADVANCED = 2 |
| 128 |
|
| 129 |
_MWT_IDENTITY = 1 |
| 130 |
) |
| 131 |
|
| 132 |
func _GET_X_LPARAM(lp uintptr) int32 { |
| 133 |
return int32(_LOWORD(lp)) |
| 134 |
} |
| 135 |
|
| 136 |
func _GET_Y_LPARAM(lp uintptr) int32 { |
| 137 |
return int32(_HIWORD(lp)) |
| 138 |
} |
| 139 |
|
| 140 |
func _LOWORD(l uintptr) uint16 { |
| 141 |
return uint16(uint32(l)) |
| 142 |
} |
| 143 |
|
| 144 |
func _HIWORD(l uintptr) uint16 { |
| 145 |
return uint16(uint32(l >> 16)) |
| 146 |
} |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|