github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/exp/shiny/driver/windriver/zsyscall_windows.go (about)

     1  // MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT
     2  
     3  package windriver
     4  
     5  import "unsafe"
     6  import "syscall"
     7  import "golang.org/x/exp/shiny/driver/internal/win32"
     8  
     9  var _ unsafe.Pointer
    10  
    11  var (
    12  	modgdi32   = syscall.NewLazyDLL("gdi32.dll")
    13  	modmsimg32 = syscall.NewLazyDLL("msimg32.dll")
    14  	moduser32  = syscall.NewLazyDLL("user32.dll")
    15  
    16  	procCreateDIBSection   = modgdi32.NewProc("CreateDIBSection")
    17  	procCreateCompatibleDC = modgdi32.NewProc("CreateCompatibleDC")
    18  	procDeleteDC           = modgdi32.NewProc("DeleteDC")
    19  	procSelectObject       = modgdi32.NewProc("SelectObject")
    20  	procAlphaBlend         = modmsimg32.NewProc("AlphaBlend")
    21  	procBitBlt             = modgdi32.NewProc("BitBlt")
    22  	procCreateSolidBrush   = modgdi32.NewProc("CreateSolidBrush")
    23  	procFillRect           = moduser32.NewProc("FillRect")
    24  	procDeleteObject       = modgdi32.NewProc("DeleteObject")
    25  )
    26  
    27  func _CreateDIBSection(dc syscall.Handle, bmi *_BITMAPINFO, usage uint32, bits **byte, section syscall.Handle, offset uint32) (bitmap syscall.Handle, err error) {
    28  	r0, _, e1 := syscall.Syscall6(procCreateDIBSection.Addr(), 6, uintptr(dc), uintptr(unsafe.Pointer(bmi)), uintptr(usage), uintptr(unsafe.Pointer(bits)), uintptr(section), uintptr(offset))
    29  	bitmap = syscall.Handle(r0)
    30  	if bitmap == 0 {
    31  		if e1 != 0 {
    32  			err = error(e1)
    33  		} else {
    34  			err = syscall.EINVAL
    35  		}
    36  	}
    37  	return
    38  }
    39  
    40  func _CreateCompatibleDC(dc win32.HDC) (newdc win32.HDC, err error) {
    41  	r0, _, e1 := syscall.Syscall(procCreateCompatibleDC.Addr(), 1, uintptr(dc), 0, 0)
    42  	newdc = win32.HDC(r0)
    43  	if newdc == 0 {
    44  		if e1 != 0 {
    45  			err = error(e1)
    46  		} else {
    47  			err = syscall.EINVAL
    48  		}
    49  	}
    50  	return
    51  }
    52  
    53  func _DeleteDC(dc win32.HDC) (err error) {
    54  	r1, _, e1 := syscall.Syscall(procDeleteDC.Addr(), 1, uintptr(dc), 0, 0)
    55  	if r1 == 0 {
    56  		if e1 != 0 {
    57  			err = error(e1)
    58  		} else {
    59  			err = syscall.EINVAL
    60  		}
    61  	}
    62  	return
    63  }
    64  
    65  func _SelectObject(dc win32.HDC, gdiobj syscall.Handle) (newobj syscall.Handle, err error) {
    66  	r0, _, e1 := syscall.Syscall(procSelectObject.Addr(), 2, uintptr(dc), uintptr(gdiobj), 0)
    67  	newobj = syscall.Handle(r0)
    68  	if newobj == 0 {
    69  		if e1 != 0 {
    70  			err = error(e1)
    71  		} else {
    72  			err = syscall.EINVAL
    73  		}
    74  	}
    75  	return
    76  }
    77  
    78  func _AlphaBlend(dcdest win32.HDC, xoriginDest int32, yoriginDest int32, wDest int32, hDest int32, dcsrc win32.HDC, xoriginSrc int32, yoriginSrc int32, wsrc int32, hsrc int32, ftn uintptr) (err error) {
    79  	r1, _, e1 := syscall.Syscall12(procAlphaBlend.Addr(), 11, uintptr(dcdest), uintptr(xoriginDest), uintptr(yoriginDest), uintptr(wDest), uintptr(hDest), uintptr(dcsrc), uintptr(xoriginSrc), uintptr(yoriginSrc), uintptr(wsrc), uintptr(hsrc), uintptr(ftn), 0)
    80  	if r1 == 0 {
    81  		if e1 != 0 {
    82  			err = error(e1)
    83  		} else {
    84  			err = syscall.EINVAL
    85  		}
    86  	}
    87  	return
    88  }
    89  
    90  func _BitBlt(dcdest win32.HDC, xdest int32, ydest int32, width int32, height int32, dcsrc win32.HDC, xsrc int32, ysrc int32, rop int32) (ok int32, err error) {
    91  	r0, _, e1 := syscall.Syscall9(procBitBlt.Addr(), 9, uintptr(dcdest), uintptr(xdest), uintptr(ydest), uintptr(width), uintptr(height), uintptr(dcsrc), uintptr(xsrc), uintptr(ysrc), uintptr(rop))
    92  	ok = int32(r0)
    93  	if ok == 0 {
    94  		if e1 != 0 {
    95  			err = error(e1)
    96  		} else {
    97  			err = syscall.EINVAL
    98  		}
    99  	}
   100  	return
   101  }
   102  
   103  func _CreateSolidBrush(color _COLORREF) (brush syscall.Handle, err error) {
   104  	r0, _, e1 := syscall.Syscall(procCreateSolidBrush.Addr(), 1, uintptr(color), 0, 0)
   105  	brush = syscall.Handle(r0)
   106  	if brush == 0 {
   107  		if e1 != 0 {
   108  			err = error(e1)
   109  		} else {
   110  			err = syscall.EINVAL
   111  		}
   112  	}
   113  	return
   114  }
   115  
   116  func _FillRect(dc win32.HDC, rc *_RECT, brush syscall.Handle) (err error) {
   117  	r1, _, e1 := syscall.Syscall(procFillRect.Addr(), 3, uintptr(dc), uintptr(unsafe.Pointer(rc)), uintptr(brush))
   118  	if r1 == 0 {
   119  		if e1 != 0 {
   120  			err = error(e1)
   121  		} else {
   122  			err = syscall.EINVAL
   123  		}
   124  	}
   125  	return
   126  }
   127  
   128  func _DeleteObject(object syscall.Handle) (err error) {
   129  	r1, _, e1 := syscall.Syscall(procDeleteObject.Addr(), 1, uintptr(object), 0, 0)
   130  	if r1 == 0 {
   131  		if e1 != 0 {
   132  			err = error(e1)
   133  		} else {
   134  			err = syscall.EINVAL
   135  		}
   136  	}
   137  	return
   138  }