Documentation
¶
Index ¶
- Constants
- func BitBlt(destinationHandleDeviceContext HDC, destinationX, destinationY int32, ...) error
- func DeleteDC(handleDeviceContext HDC) error
- func DeleteObject(handleObject HGDIOBJ) error
- func GetClientRect(handleWindow windows.HWND) (windows.Rect, error)
- func GetDIBits(handleDeviceContext HDC, handleBitmap HBITMAP, firstScanLine uint32, ...) error
- func GetDesktopWindow() windows.HWND
- func GetWindowRect(handleWindow windows.HWND) (windows.Rect, error)
- func GlobalLock(handleMemory HGLOBAL) (unsafe.Pointer, error)
- func GlobalUnlock(handleMemory HGLOBAL) bool
- func ReleaseDC(handleWindow windows.HWND, handleDeviceContext HDC) error
- type BITMAPINFO
- type BITMAPINFOHEADER
- type HANDLE
- type HBITMAP
- type HDC
- type HGDIOBJ
- type HGLOBAL
- type HRESULT
- type LPVOID
- type POINT
- type ProcessId
- type RGBQUAD
Constants ¶
const ( SRCCOPY = 0x00CC0020 SRCPAINT = 0x00EE0086 SRCAND = 0x008800C6 SRCINVERT = 0x00660046 SRCERASE = 0x00440328 NOTSRCCOPY = 0x00330008 NOTSRCERASE = 0x001100A6 MERGECOPY = 0x00C000CA MERGEPAINT = 0x00BB0226 PATCOPY = 0x00F00021 PATPAINT = 0x00FB0A09 PATINVERT = 0x005A0049 DSTINVERT = 0x00550009 BLACKNESS = 0x00000042 WHITENESS = 0x00FF0062 NOMIRRORBITMAP = 0x80000000 CAPTUREBLT = 0x40000000 )
Ternary raster operations
const ( DIB_RGB_COLORS = 0 DIB_PAL_COLORS = 1 )
Bitmap color table usage
const ( BI_RGB = 0 BI_RLE8 = 1 BI_RLE4 = 2 BI_BITFIELDS = 3 BI_JPEG = 4 BI_PNG = 5 )
Bitmap compression constants
const ( GHND = 0x0042 GMEM_FIXED = 0x0000 GMEM_MOVEABLE = 0x0002 GMEM_ZEROINIT = 0x0040 GPTR = GMEM_FIXED | GMEM_ZEROINIT )
GlobalAlloc flags
const ( LHND = 0x0042 LMEM_FIXED = 0x0000 LMEM_MOVEABLE = 0x0002 LMEM_ZEROINIT = 0x0040 LPTR = LMEM_FIXED | LMEM_ZEROINIT )
LocalAlloc flags
Variables ¶
This section is empty.
Functions ¶
func BitBlt ¶
func BitBlt( destinationHandleDeviceContext HDC, destinationX, destinationY int32, width, height int32, sourceHandleDeviceContext HDC, sourceX, sourceY int32, rasterOperationCode uint, ) error
The BitBlt function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.
func DeleteObject ¶
The DeleteObject function deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid.
func GetClientRect ¶
Retrieves the coordinates of a window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).
func GetDIBits ¶
func GetDIBits(handleDeviceContext HDC, handleBitmap HBITMAP, firstScanLine uint32, scanLinesCount uint32, receiveBuffer *byte, bitmapInfo *BITMAPINFO, colorsFormat uint32) error
The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.
func GetDesktopWindow ¶
Retrieves a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which other windows are painted.
func GetWindowRect ¶
Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
func GlobalLock ¶
Locks a global memory object and returns a pointer to the first byte of the object's memory block.
func GlobalUnlock ¶
Decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE. This function has no effect on memory objects allocated with GMEM_FIXED.
Types ¶
type BITMAPINFO ¶
type BITMAPINFO struct { BmiHeader BITMAPINFOHEADER BmiColors *RGBQUAD }
type BITMAPINFOHEADER ¶
type HDC ¶
type HDC HANDLE
func CreateCompatibleDC ¶
The CreateCompatibleDC function creates a memory device context (DC) compatible with the specified device.
func GetWindowDC ¶
The GetWindowDC function retrieves the device context (DC) for the entire window, including title bar, menus, and scroll bars. A window device context permits painting anywhere in a window, because the origin of the device context is the upper-left corner of the window instead of the client area. GetWindowDC assigns default attributes to the window device context each time it retrieves the device context. Previous attributes are lost.
type HGLOBAL ¶
type HGLOBAL HANDLE
func GlobalAlloc ¶
Allocates the specified number of bytes from the heap.
func GlobalFree ¶
Frees the specified global memory object and invalidates its handle.