screenshot

package
v0.0.0-...-8e54317 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HORZRES          = 8
	VERTRES          = 10
	DESKTOPHORZRES   = 118
	DESKTOPVERTRES   = 117
	BI_RGB           = 0
	InvalidParameter = 2
	DIB_RGB_COLORS   = 0
	SRCCOPY          = 0x00CC0020
)

Variables

This section is empty.

Functions

func BitBlt

func BitBlt(hdcDest HDC, nXDest, nYDest, nWidth, nHeight int, hdcSrc HDC, nXSrc, nYSrc int, dwRop uint)

func CaptureRect

func CaptureRect(rect image.Rectangle) (*image.RGBA, error)

func CaptureScreen

func CaptureScreen() (*image.RGBA, error)

func DeleteDC

func DeleteDC(hdc HDC) bool

func DeleteObject

func DeleteObject(hObject HGDIOBJ) bool

func GetDeviceCaps

func GetDeviceCaps(hdc HDC, index int) int

func GetLastError

func GetLastError() uint32

func ReleaseDC

func ReleaseDC(hwnd HWND, hDC HDC) bool

func ScreenRect

func ScreenRect() (image.Rectangle, error)

Types

type BITMAPINFO

type BITMAPINFO struct {
	BmiHeader BITMAPINFOHEADER
	BmiColors *RGBQUAD
}

type BITMAPINFOHEADER

type BITMAPINFOHEADER struct {
	BiSize          uint32
	BiWidth         int32
	BiHeight        int32
	BiPlanes        uint16
	BiBitCount      uint16
	BiCompression   uint32
	BiSizeImage     uint32
	BiXPelsPerMeter int32
	BiYPelsPerMeter int32
	BiClrUsed       uint32
	BiClrImportant  uint32
}

type HANDLE

type HANDLE uintptr

type HBITMAP

type HBITMAP HANDLE

func CreateDIBSection

func CreateDIBSection(hdc HDC, pbmi *BITMAPINFO, iUsage uint, ppvBits *unsafe.Pointer, hSection HANDLE, dwOffset uint) HBITMAP

type HDC

type HDC HANDLE

func CreateCompatibleDC

func CreateCompatibleDC(hdc HDC) HDC

func GetDC

func GetDC(hwnd HWND) HDC

type HGDIOBJ

type HGDIOBJ HANDLE

func SelectObject

func SelectObject(hdc HDC, hgdiobj HGDIOBJ) HGDIOBJ

type HWND

type HWND HANDLE

type RGBQUAD

type RGBQUAD struct {
	RgbBlue     byte
	RgbGreen    byte
	RgbRed      byte
	RgbReserved byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL