github.com/jmigpin/editor@v1.6.0/driver/windriver/zwinapi_windows.go (about)

     1  // Code generated by 'go generate'; DO NOT EDIT.
     2  
     3  package windriver
     4  
     5  import (
     6  	"syscall"
     7  	"unsafe"
     8  
     9  	"golang.org/x/sys/windows"
    10  )
    11  
    12  var _ unsafe.Pointer
    13  
    14  // Do the interface allocations only once for common
    15  // Errno values.
    16  const (
    17  	errnoERROR_IO_PENDING = 997
    18  )
    19  
    20  var (
    21  	errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
    22  	errERROR_EINVAL     error = syscall.EINVAL
    23  )
    24  
    25  // errnoErr returns common boxed Errno values, to prevent
    26  // allocations at runtime.
    27  func errnoErr(e syscall.Errno) error {
    28  	switch e {
    29  	case 0:
    30  		return errERROR_EINVAL
    31  	case errnoERROR_IO_PENDING:
    32  		return errERROR_IO_PENDING
    33  	}
    34  	// TODO: add more here, after collecting data on the common
    35  	// error values see on Windows. (perhaps when running
    36  	// all.bat?)
    37  	return e
    38  }
    39  
    40  var (
    41  	modgdi32    = windows.NewLazySystemDLL("gdi32.dll")
    42  	modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
    43  	modshell32  = windows.NewLazySystemDLL("shell32.dll")
    44  	moduser32   = windows.NewLazySystemDLL("user32.dll")
    45  
    46  	procBitBlt                   = modgdi32.NewProc("BitBlt")
    47  	procCreateBitmap             = modgdi32.NewProc("CreateBitmap")
    48  	procCreateBitmapIndirect     = modgdi32.NewProc("CreateBitmapIndirect")
    49  	procCreateCompatibleBitmap   = modgdi32.NewProc("CreateCompatibleBitmap")
    50  	procCreateCompatibleDC       = modgdi32.NewProc("CreateCompatibleDC")
    51  	procCreateDIBSection         = modgdi32.NewProc("CreateDIBSection")
    52  	procDeleteDC                 = modgdi32.NewProc("DeleteDC")
    53  	procDeleteObject             = modgdi32.NewProc("DeleteObject")
    54  	procGetObject                = modgdi32.NewProc("GetObject")
    55  	procSelectObject             = modgdi32.NewProc("SelectObject")
    56  	procSetPixel                 = modgdi32.NewProc("SetPixel")
    57  	procGetConsoleWindow         = modkernel32.NewProc("GetConsoleWindow")
    58  	procGetCurrentProcessId      = modkernel32.NewProc("GetCurrentProcessId")
    59  	procGetModuleHandleW         = modkernel32.NewProc("GetModuleHandleW")
    60  	procGlobalAlloc              = modkernel32.NewProc("GlobalAlloc")
    61  	procGlobalLock               = modkernel32.NewProc("GlobalLock")
    62  	procGlobalUnlock             = modkernel32.NewProc("GlobalUnlock")
    63  	procDragAcceptFiles          = modshell32.NewProc("DragAcceptFiles")
    64  	procDragFinish               = modshell32.NewProc("DragFinish")
    65  	procDragQueryFileW           = modshell32.NewProc("DragQueryFileW")
    66  	procDragQueryPoint           = modshell32.NewProc("DragQueryPoint")
    67  	procBeginPaint               = moduser32.NewProc("BeginPaint")
    68  	procClientToScreen           = moduser32.NewProc("ClientToScreen")
    69  	procCloseClipboard           = moduser32.NewProc("CloseClipboard")
    70  	procCreateWindowExW          = moduser32.NewProc("CreateWindowExW")
    71  	procDefWindowProcW           = moduser32.NewProc("DefWindowProcW")
    72  	procDestroyWindow            = moduser32.NewProc("DestroyWindow")
    73  	procDispatchMessageW         = moduser32.NewProc("DispatchMessageW")
    74  	procEmptyClipboard           = moduser32.NewProc("EmptyClipboard")
    75  	procEndPaint                 = moduser32.NewProc("EndPaint")
    76  	procGetClipboardData         = moduser32.NewProc("GetClipboardData")
    77  	procGetCursorPos             = moduser32.NewProc("GetCursorPos")
    78  	procGetDC                    = moduser32.NewProc("GetDC")
    79  	procGetKeyState              = moduser32.NewProc("GetKeyState")
    80  	procGetKeyboardState         = moduser32.NewProc("GetKeyboardState")
    81  	procGetMessageW              = moduser32.NewProc("GetMessageW")
    82  	procGetWindowRect            = moduser32.NewProc("GetWindowRect")
    83  	procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
    84  	procInvalidateRect           = moduser32.NewProc("InvalidateRect")
    85  	procLoadCursorW              = moduser32.NewProc("LoadCursorW")
    86  	procLoadImageW               = moduser32.NewProc("LoadImageW")
    87  	procMapVirtualKeyW           = moduser32.NewProc("MapVirtualKeyW")
    88  	procMapWindowPoints          = moduser32.NewProc("MapWindowPoints")
    89  	procOpenClipboard            = moduser32.NewProc("OpenClipboard")
    90  	procPostMessageW             = moduser32.NewProc("PostMessageW")
    91  	procPostQuitMessage          = moduser32.NewProc("PostQuitMessage")
    92  	procRedrawWindow             = moduser32.NewProc("RedrawWindow")
    93  	procRegisterClassExW         = moduser32.NewProc("RegisterClassExW")
    94  	procReleaseDC                = moduser32.NewProc("ReleaseDC")
    95  	procSetClipboardData         = moduser32.NewProc("SetClipboardData")
    96  	procSetCursor                = moduser32.NewProc("SetCursor")
    97  	procSetCursorPos             = moduser32.NewProc("SetCursorPos")
    98  	procSetWindowTextW           = moduser32.NewProc("SetWindowTextW")
    99  	procShowWindow               = moduser32.NewProc("ShowWindow")
   100  	procShowWindowAsync          = moduser32.NewProc("ShowWindowAsync")
   101  	procToUnicode                = moduser32.NewProc("ToUnicode")
   102  	procTranslateAccelerator     = moduser32.NewProc("TranslateAccelerator")
   103  	procTranslateMessage         = moduser32.NewProc("TranslateMessage")
   104  	procUpdateWindow             = moduser32.NewProc("UpdateWindow")
   105  	procValidateRect             = moduser32.NewProc("ValidateRect")
   106  )
   107  
   108  func _BitBlt(hdc windows.Handle, x int32, y int32, w int32, h int32, hdcSrc windows.Handle, x2 int32, y2 int32, rOp uint32) (ok bool) {
   109  	r0, _, _ := syscall.Syscall9(procBitBlt.Addr(), 9, uintptr(hdc), uintptr(x), uintptr(y), uintptr(w), uintptr(h), uintptr(hdcSrc), uintptr(x2), uintptr(y2), uintptr(rOp))
   110  	ok = r0 != 0
   111  	return
   112  }
   113  
   114  func _CreateBitmap(w int32, h int32, planes uint32, bitCount uint32, bits uintptr) (bmH windows.Handle, err error) {
   115  	r0, _, e1 := syscall.Syscall6(procCreateBitmap.Addr(), 5, uintptr(w), uintptr(h), uintptr(planes), uintptr(bitCount), uintptr(bits), 0)
   116  	bmH = windows.Handle(r0)
   117  	if bmH == 0 {
   118  		err = errnoErr(e1)
   119  	}
   120  	return
   121  }
   122  
   123  func _CreateBitmapIndirect(bm *_Bitmap) (bmH windows.Handle, err error) {
   124  	r0, _, e1 := syscall.Syscall(procCreateBitmapIndirect.Addr(), 1, uintptr(unsafe.Pointer(bm)), 0, 0)
   125  	bmH = windows.Handle(r0)
   126  	if bmH == 0 {
   127  		err = errnoErr(e1)
   128  	}
   129  	return
   130  }
   131  
   132  func _CreateCompatibleBitmap(hdc windows.Handle, w int32, h int32) (bmH windows.Handle, err error) {
   133  	r0, _, e1 := syscall.Syscall(procCreateCompatibleBitmap.Addr(), 3, uintptr(hdc), uintptr(w), uintptr(h))
   134  	bmH = windows.Handle(r0)
   135  	if bmH == 0 {
   136  		err = errnoErr(e1)
   137  	}
   138  	return
   139  }
   140  
   141  func _CreateCompatibleDC(hdc windows.Handle) (dcH windows.Handle, err error) {
   142  	r0, _, e1 := syscall.Syscall(procCreateCompatibleDC.Addr(), 1, uintptr(hdc), 0, 0)
   143  	dcH = windows.Handle(r0)
   144  	if dcH == 0 {
   145  		err = errnoErr(e1)
   146  	}
   147  	return
   148  }
   149  
   150  func _CreateDIBSection(dc windows.Handle, bmi *_BitmapInfo, usage uint32, bits **byte, section windows.Handle, offset uint32) (bmH windows.Handle, err error) {
   151  	r0, _, e1 := syscall.Syscall6(procCreateDIBSection.Addr(), 6, uintptr(dc), uintptr(unsafe.Pointer(bmi)), uintptr(usage), uintptr(unsafe.Pointer(bits)), uintptr(section), uintptr(offset))
   152  	bmH = windows.Handle(r0)
   153  	if bmH == 0 {
   154  		err = errnoErr(e1)
   155  	}
   156  	return
   157  }
   158  
   159  func _DeleteDC(dc windows.Handle) (ok bool) {
   160  	r0, _, _ := syscall.Syscall(procDeleteDC.Addr(), 1, uintptr(dc), 0, 0)
   161  	ok = r0 != 0
   162  	return
   163  }
   164  
   165  func _DeleteObject(obj windows.Handle) (ok bool) {
   166  	r0, _, _ := syscall.Syscall(procDeleteObject.Addr(), 1, uintptr(obj), 0, 0)
   167  	ok = r0 != 0
   168  	return
   169  }
   170  
   171  func _GetObject(h windows.Handle, c int32, v uintptr) (n int) {
   172  	r0, _, _ := syscall.Syscall(procGetObject.Addr(), 3, uintptr(h), uintptr(c), uintptr(v))
   173  	n = int(r0)
   174  	return
   175  }
   176  
   177  func _SelectObject(hdc windows.Handle, obj windows.Handle) (prevObjH windows.Handle, err error) {
   178  	r0, _, e1 := syscall.Syscall(procSelectObject.Addr(), 2, uintptr(hdc), uintptr(obj), 0)
   179  	prevObjH = windows.Handle(r0)
   180  	if prevObjH == 0 {
   181  		err = errnoErr(e1)
   182  	}
   183  	return
   184  }
   185  
   186  func _SetPixel(hdc windows.Handle, x int, y int, c _ColorRef) (colorSet int32, err error) {
   187  	r0, _, e1 := syscall.Syscall6(procSetPixel.Addr(), 4, uintptr(hdc), uintptr(x), uintptr(y), uintptr(c), 0, 0)
   188  	colorSet = int32(r0)
   189  	if colorSet == -1 {
   190  		err = errnoErr(e1)
   191  	}
   192  	return
   193  }
   194  
   195  func _GetConsoleWindow() (cH windows.Handle) {
   196  	r0, _, _ := syscall.Syscall(procGetConsoleWindow.Addr(), 0, 0, 0, 0)
   197  	cH = windows.Handle(r0)
   198  	return
   199  }
   200  
   201  func _GetCurrentProcessId() (pid uint32) {
   202  	r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
   203  	pid = uint32(r0)
   204  	return
   205  }
   206  
   207  func _GetModuleHandleW(name *uint16) (modH windows.Handle, err error) {
   208  	r0, _, e1 := syscall.Syscall(procGetModuleHandleW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
   209  	modH = windows.Handle(r0)
   210  	if modH == 0 {
   211  		err = errnoErr(e1)
   212  	}
   213  	return
   214  }
   215  
   216  func _GlobalAlloc(uFlags uint32, dwBytes uintptr) (h windows.Handle, err error) {
   217  	r0, _, e1 := syscall.Syscall(procGlobalAlloc.Addr(), 2, uintptr(uFlags), uintptr(dwBytes), 0)
   218  	h = windows.Handle(r0)
   219  	if h == 0 {
   220  		err = errnoErr(e1)
   221  	}
   222  	return
   223  }
   224  
   225  func _GlobalLock(h windows.Handle) (ptr uintptr, err error) {
   226  	r0, _, e1 := syscall.Syscall(procGlobalLock.Addr(), 1, uintptr(h), 0, 0)
   227  	ptr = uintptr(r0)
   228  	if ptr == 0 {
   229  		err = errnoErr(e1)
   230  	}
   231  	return
   232  }
   233  
   234  func _GlobalUnlock(h windows.Handle) (ok bool) {
   235  	r0, _, _ := syscall.Syscall(procGlobalUnlock.Addr(), 1, uintptr(h), 0, 0)
   236  	ok = r0 != 0
   237  	return
   238  }
   239  
   240  func _DragAcceptFiles(hwnd windows.Handle, fAccept bool) {
   241  	var _p0 uint32
   242  	if fAccept {
   243  		_p0 = 1
   244  	}
   245  	syscall.Syscall(procDragAcceptFiles.Addr(), 2, uintptr(hwnd), uintptr(_p0), 0)
   246  	return
   247  }
   248  
   249  func _DragFinish(hDrop uintptr) {
   250  	syscall.Syscall(procDragFinish.Addr(), 1, uintptr(hDrop), 0, 0)
   251  	return
   252  }
   253  
   254  func _DragQueryFileW(hDrop uintptr, iFile uint32, lpszFile *uint16, cch uint32) (res uint32) {
   255  	r0, _, _ := syscall.Syscall6(procDragQueryFileW.Addr(), 4, uintptr(hDrop), uintptr(iFile), uintptr(unsafe.Pointer(lpszFile)), uintptr(cch), 0, 0)
   256  	res = uint32(r0)
   257  	return
   258  }
   259  
   260  func _DragQueryPoint(hDrop uintptr, ppt *_Point) (res bool) {
   261  	r0, _, _ := syscall.Syscall(procDragQueryPoint.Addr(), 2, uintptr(hDrop), uintptr(unsafe.Pointer(ppt)), 0)
   262  	res = r0 != 0
   263  	return
   264  }
   265  
   266  func _BeginPaint(hwnd windows.Handle, paint *_Paint) (dcH windows.Handle, err error) {
   267  	r0, _, e1 := syscall.Syscall(procBeginPaint.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(paint)), 0)
   268  	dcH = windows.Handle(r0)
   269  	if dcH == 0 {
   270  		err = errnoErr(e1)
   271  	}
   272  	return
   273  }
   274  
   275  func _ClientToScreen(hwnd windows.Handle, lpPoint *_Point) (ok bool) {
   276  	r0, _, _ := syscall.Syscall(procClientToScreen.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(lpPoint)), 0)
   277  	ok = r0 != 0
   278  	return
   279  }
   280  
   281  func _CloseClipboard() (ok bool) {
   282  	r0, _, _ := syscall.Syscall(procCloseClipboard.Addr(), 0, 0, 0, 0)
   283  	ok = r0 != 0
   284  	return
   285  }
   286  
   287  func _CreateWindowExW(dwExStyle uint32, lpClassName *uint16, lpWindowName *uint16, dwStyle int32, x int32, y int32, nWidth int32, nHeight int32, hWndParent windows.Handle, hMenu windows.Handle, hInstance windows.Handle, lpParam uintptr) (wndH windows.Handle, err error) {
   288  	r0, _, e1 := syscall.Syscall12(procCreateWindowExW.Addr(), 12, uintptr(dwExStyle), uintptr(unsafe.Pointer(lpClassName)), uintptr(unsafe.Pointer(lpWindowName)), uintptr(dwStyle), uintptr(x), uintptr(y), uintptr(nWidth), uintptr(nHeight), uintptr(hWndParent), uintptr(hMenu), uintptr(hInstance), uintptr(lpParam))
   289  	wndH = windows.Handle(r0)
   290  	if wndH == 0 {
   291  		err = errnoErr(e1)
   292  	}
   293  	return
   294  }
   295  
   296  func _DefWindowProcW(hwnd windows.Handle, msg uint32, wparam uintptr, lparam uintptr) (ret uintptr) {
   297  	r0, _, _ := syscall.Syscall6(procDefWindowProcW.Addr(), 4, uintptr(hwnd), uintptr(msg), uintptr(wparam), uintptr(lparam), 0, 0)
   298  	ret = uintptr(r0)
   299  	return
   300  }
   301  
   302  func _DestroyWindow(hwnd windows.Handle) (ok bool) {
   303  	r0, _, _ := syscall.Syscall(procDestroyWindow.Addr(), 1, uintptr(hwnd), 0, 0)
   304  	ok = r0 != 0
   305  	return
   306  }
   307  
   308  func _DispatchMessageW(msg *_Msg) (res int32) {
   309  	r0, _, _ := syscall.Syscall(procDispatchMessageW.Addr(), 1, uintptr(unsafe.Pointer(msg)), 0, 0)
   310  	res = int32(r0)
   311  	return
   312  }
   313  
   314  func _EmptyClipboard() (ok bool) {
   315  	r0, _, _ := syscall.Syscall(procEmptyClipboard.Addr(), 0, 0, 0, 0)
   316  	ok = r0 != 0
   317  	return
   318  }
   319  
   320  func _EndPaint(hwnd windows.Handle, paint *_Paint) (ok bool) {
   321  	r0, _, _ := syscall.Syscall(procEndPaint.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(paint)), 0)
   322  	ok = r0 != 0
   323  	return
   324  }
   325  
   326  func _GetClipboardData(uFormat uint32) (dataH windows.Handle, err error) {
   327  	r0, _, e1 := syscall.Syscall(procGetClipboardData.Addr(), 1, uintptr(uFormat), 0, 0)
   328  	dataH = windows.Handle(r0)
   329  	if dataH == 0 {
   330  		err = errnoErr(e1)
   331  	}
   332  	return
   333  }
   334  
   335  func _GetCursorPos(p *_Point) (ok bool) {
   336  	r0, _, _ := syscall.Syscall(procGetCursorPos.Addr(), 1, uintptr(unsafe.Pointer(p)), 0, 0)
   337  	ok = r0 != 0
   338  	return
   339  }
   340  
   341  func _GetDC(hwnd windows.Handle) (dcH windows.Handle, err error) {
   342  	r0, _, e1 := syscall.Syscall(procGetDC.Addr(), 1, uintptr(hwnd), 0, 0)
   343  	dcH = windows.Handle(r0)
   344  	if dcH == 0 {
   345  		err = errnoErr(e1)
   346  	}
   347  	return
   348  }
   349  
   350  func _GetKeyState(vkey int32) (state uint16) {
   351  	r0, _, _ := syscall.Syscall(procGetKeyState.Addr(), 1, uintptr(vkey), 0, 0)
   352  	state = uint16(r0)
   353  	return
   354  }
   355  
   356  func _GetKeyboardState(state *[256]byte) (ok bool) {
   357  	r0, _, _ := syscall.Syscall(procGetKeyboardState.Addr(), 1, uintptr(unsafe.Pointer(state)), 0, 0)
   358  	ok = r0 != 0
   359  	return
   360  }
   361  
   362  func _GetMessageW(msg *_Msg, hwnd windows.Handle, msgFilterMin uint32, msgFilterMax uint32) (res int32, err error) {
   363  	r0, _, e1 := syscall.Syscall6(procGetMessageW.Addr(), 4, uintptr(unsafe.Pointer(msg)), uintptr(hwnd), uintptr(msgFilterMin), uintptr(msgFilterMax), 0, 0)
   364  	res = int32(r0)
   365  	if res == -1 {
   366  		err = errnoErr(e1)
   367  	}
   368  	return
   369  }
   370  
   371  func _GetWindowRect(hwnd windows.Handle, r *_Rect) (ok bool) {
   372  	r0, _, _ := syscall.Syscall(procGetWindowRect.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(r)), 0)
   373  	ok = r0 != 0
   374  	return
   375  }
   376  
   377  func _GetWindowThreadProcessId(hwnd windows.Handle, pid *uint32) (threadId uint32) {
   378  	r0, _, _ := syscall.Syscall(procGetWindowThreadProcessId.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(pid)), 0)
   379  	threadId = uint32(r0)
   380  	return
   381  }
   382  
   383  func _InvalidateRect(hwnd windows.Handle, r *_Rect, erase bool) (ok bool) {
   384  	var _p0 uint32
   385  	if erase {
   386  		_p0 = 1
   387  	}
   388  	r0, _, _ := syscall.Syscall(procInvalidateRect.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(r)), uintptr(_p0))
   389  	ok = r0 != 0
   390  	return
   391  }
   392  
   393  func _LoadCursorW(hInstance windows.Handle, name uint32) (cursorH windows.Handle, err error) {
   394  	r0, _, e1 := syscall.Syscall(procLoadCursorW.Addr(), 2, uintptr(hInstance), uintptr(name), 0)
   395  	cursorH = windows.Handle(r0)
   396  	if cursorH == 0 {
   397  		err = errnoErr(e1)
   398  	}
   399  	return
   400  }
   401  
   402  func _LoadImageW(hInstance windows.Handle, name uintptr, typ uint32, cx int32, cy int32, fuLoad uint32) (imgH windows.Handle, err error) {
   403  	r0, _, e1 := syscall.Syscall6(procLoadImageW.Addr(), 6, uintptr(hInstance), uintptr(name), uintptr(typ), uintptr(cx), uintptr(cy), uintptr(fuLoad))
   404  	imgH = windows.Handle(r0)
   405  	if imgH == 0 {
   406  		err = errnoErr(e1)
   407  	}
   408  	return
   409  }
   410  
   411  func _MapVirtualKeyW(uCode uint32, uMapType uint32) (code uint32) {
   412  	r0, _, _ := syscall.Syscall(procMapVirtualKeyW.Addr(), 2, uintptr(uCode), uintptr(uMapType), 0)
   413  	code = uint32(r0)
   414  	return
   415  }
   416  
   417  func _MapWindowPoints(hwndFrom windows.Handle, hwndTo windows.Handle, lpPoints *_Point, cPoints uint32) (res int32) {
   418  	r0, _, _ := syscall.Syscall6(procMapWindowPoints.Addr(), 4, uintptr(hwndFrom), uintptr(hwndTo), uintptr(unsafe.Pointer(lpPoints)), uintptr(cPoints), 0, 0)
   419  	res = int32(r0)
   420  	return
   421  }
   422  
   423  func _OpenClipboard(hWndNewOwner windows.Handle) (ok bool) {
   424  	r0, _, _ := syscall.Syscall(procOpenClipboard.Addr(), 1, uintptr(hWndNewOwner), 0, 0)
   425  	ok = r0 != 0
   426  	return
   427  }
   428  
   429  func _PostMessageW(hwnd windows.Handle, msg uint32, wParam uintptr, lParam uintptr) (ok bool) {
   430  	r0, _, _ := syscall.Syscall6(procPostMessageW.Addr(), 4, uintptr(hwnd), uintptr(msg), uintptr(wParam), uintptr(lParam), 0, 0)
   431  	ok = r0 != 0
   432  	return
   433  }
   434  
   435  func _PostQuitMessage(exitCode int32) {
   436  	syscall.Syscall(procPostQuitMessage.Addr(), 1, uintptr(exitCode), 0, 0)
   437  	return
   438  }
   439  
   440  func _RedrawWindow(hwnd windows.Handle, r *_Rect, region windows.Handle, flags uint) (ok bool) {
   441  	r0, _, _ := syscall.Syscall6(procRedrawWindow.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(r)), uintptr(region), uintptr(flags), 0, 0)
   442  	ok = r0 != 0
   443  	return
   444  }
   445  
   446  func _RegisterClassExW(wcx *_WndClassExW) (atom uint16, err error) {
   447  	r0, _, e1 := syscall.Syscall(procRegisterClassExW.Addr(), 1, uintptr(unsafe.Pointer(wcx)), 0, 0)
   448  	atom = uint16(r0)
   449  	if atom == 0 {
   450  		err = errnoErr(e1)
   451  	}
   452  	return
   453  }
   454  
   455  func _ReleaseDC(hwnd windows.Handle, dc windows.Handle) (ok bool) {
   456  	r0, _, _ := syscall.Syscall(procReleaseDC.Addr(), 2, uintptr(hwnd), uintptr(dc), 0)
   457  	ok = r0 != 0
   458  	return
   459  }
   460  
   461  func _SetClipboardData(uFormat uint32, h windows.Handle) (dataH windows.Handle, err error) {
   462  	r0, _, e1 := syscall.Syscall(procSetClipboardData.Addr(), 2, uintptr(uFormat), uintptr(h), 0)
   463  	dataH = windows.Handle(r0)
   464  	if dataH == 0 {
   465  		err = errnoErr(e1)
   466  	}
   467  	return
   468  }
   469  
   470  func _SetCursor(cursorH windows.Handle) (prevCursorH windows.Handle) {
   471  	r0, _, _ := syscall.Syscall(procSetCursor.Addr(), 1, uintptr(cursorH), 0, 0)
   472  	prevCursorH = windows.Handle(r0)
   473  	return
   474  }
   475  
   476  func _SetCursorPos(x int32, y int32) (ok bool) {
   477  	r0, _, _ := syscall.Syscall(procSetCursorPos.Addr(), 2, uintptr(x), uintptr(y), 0)
   478  	ok = r0 != 0
   479  	return
   480  }
   481  
   482  func _SetWindowTextW(hwnd windows.Handle, lpString *uint16) (res bool) {
   483  	r0, _, _ := syscall.Syscall(procSetWindowTextW.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(lpString)), 0)
   484  	res = r0 != 0
   485  	return
   486  }
   487  
   488  func _ShowWindow(hwnd windows.Handle, nCmdShow int) (ok bool) {
   489  	r0, _, _ := syscall.Syscall(procShowWindow.Addr(), 2, uintptr(hwnd), uintptr(nCmdShow), 0)
   490  	ok = r0 != 0
   491  	return
   492  }
   493  
   494  func _ShowWindowAsync(hwnd windows.Handle, nCmdShow int) (ok bool) {
   495  	r0, _, _ := syscall.Syscall(procShowWindowAsync.Addr(), 2, uintptr(hwnd), uintptr(nCmdShow), 0)
   496  	ok = r0 != 0
   497  	return
   498  }
   499  
   500  func _ToUnicode(wVirtKey uint32, wScanCode uint32, lpKeyState *[256]byte, pwszBuff *uint16, cchBuff int32, wFlags uint32) (code int32) {
   501  	r0, _, _ := syscall.Syscall6(procToUnicode.Addr(), 6, uintptr(wVirtKey), uintptr(wScanCode), uintptr(unsafe.Pointer(lpKeyState)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(wFlags))
   502  	code = int32(r0)
   503  	return
   504  }
   505  
   506  func _TranslateAccelerator(hwnd windows.Handle, hAccTable windows.Handle, msg *_Msg) (ok bool) {
   507  	r0, _, _ := syscall.Syscall(procTranslateAccelerator.Addr(), 3, uintptr(hwnd), uintptr(hAccTable), uintptr(unsafe.Pointer(msg)))
   508  	ok = r0 != 0
   509  	return
   510  }
   511  
   512  func _TranslateMessage(msg *_Msg) (translated bool) {
   513  	r0, _, _ := syscall.Syscall(procTranslateMessage.Addr(), 1, uintptr(unsafe.Pointer(msg)), 0, 0)
   514  	translated = r0 != 0
   515  	return
   516  }
   517  
   518  func _UpdateWindow(hwnd windows.Handle) (ok bool) {
   519  	r0, _, _ := syscall.Syscall(procUpdateWindow.Addr(), 1, uintptr(hwnd), 0, 0)
   520  	ok = r0 != 0
   521  	return
   522  }
   523  
   524  func _ValidateRect(hwnd windows.Handle, r *_Rect) (ok bool) {
   525  	r0, _, _ := syscall.Syscall(procValidateRect.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(r)), 0)
   526  	ok = r0 != 0
   527  	return
   528  }