mswin

package
v0.0.0-...-dd2d463 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	SM_XVIRTUALSCREEN  = 76
	SM_YVIRTUALSCREEN  = 77
	SM_CXVIRTUALSCREEN = 78
	SM_CYVIRTUALSCREEN = 79
	HORZRES            = 8
	VERTRES            = 10
	BI_RGB             = 0
	InvalidParameter   = 2
	DIB_RGB_COLORS     = 0
	SRCCOPY            = 0x00CC0020

	DPI_AWARENESS_CONTEXT_UNAWARE      = -1
	DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = -2
)

Various MS Windows API constants. nolint: golint

Variables

This section is empty.

Functions

func BitBlt

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

BitBlt calls the Windows API function.

func DeleteDC

func DeleteDC(hdc HDC) bool

DeleteDC calls the Windows API function.

func DeleteObject

func DeleteObject(hObject HGDIOBJ) bool

DeleteObject calls the Windows API function.

func GetDIBits

func GetDIBits(hdc HDC, hBitmap HBITMAP, start uint32, cLines uint32,
	bits unsafe.Pointer, bitmapInfo *BITMAPINFOHEADER, usage uint32) bool

GetDIBits calls the Windows API function.

func GetDeviceCaps

func GetDeviceCaps(hdc HDC, index int) int

GetDeviceCaps calls the Windows API function.

func GetDpiForSystem

func GetDpiForSystem() int

GetDpiForSystem calls the Windows API function.

func GetSystemMetrics

func GetSystemMetrics(index int) int

GetSystemMetrics calls the Windows API function.

func ReleaseDC

func ReleaseDC(hwnd HWND, hDC HDC) bool

ReleaseDC calls the Windows API function.

func SetThreadDpiAwarenessContext

func SetThreadDpiAwarenessContext(value int32) error

SetThreadDpiAwarenessContext calls the Windows API function.

Types

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
}

BITMAPINFOHEADER describes a .bmp file.

type Grabber

type Grabber struct {
	// contains filtered or unexported fields
}

Grabber is the type that provides images from the desktop

func NewGrabber

func NewGrabber() (*Grabber, error)

NewGrabber creates a new instance of a grabber.

func (*Grabber) Dispose

func (grabber *Grabber) Dispose()

Dispose releases any allocated resources.

func (*Grabber) Grab

func (grabber *Grabber) Grab() image.Image

Grab makes a snapshot and returns the image. The returned image is valid until the grabber is used again.

type HANDLE

type HANDLE uintptr

HANDLE represents a generic handle.

type HBITMAP

type HBITMAP HANDLE

HBITMAP is a handle for a in-memory bitmap.

func CreateCompatibleBitmap

func CreateCompatibleBitmap(hdc HDC, cx, cy int) (HBITMAP, error)

CreateCompatibleBitmap calls the Windows API function.

type HDC

type HDC HANDLE

HDC is a handle for a device context.

func CreateCompatibleDC

func CreateCompatibleDC(hdc HDC) (HDC, error)

CreateCompatibleDC calls the Windows API function.

func GetDC

func GetDC(hwnd HWND) HDC

GetDC calls the Windows API function.

type HGDIOBJ

type HGDIOBJ HANDLE

HGDIOBJ is a handle for a graphical object.

func SelectObject

func SelectObject(hdc HDC, hgdiobj HGDIOBJ) (HGDIOBJ, error)

SelectObject calls the Windows API function.

type HWND

type HWND HANDLE

HWND is a window handle.

Jump to

Keyboard shortcuts

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