windriver

package
v0.9.8 Latest Latest
Warning

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

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

Documentation

Overview

Package windriver provides the Windows driver for accessing a screen.

Index

Constants

This section is empty.

Variables

View Source
var ClipRetries = 5

ClipRetries determines how many times to retry in opening the clipboard

View Source
var ClipRetrySleep = 5 * time.Millisecond

ClipRetrySleep determines how long to sleep between retries

Functions

func AddAppMsg

func AddAppMsg(fn func(hwnd syscall.Handle, uMsg uint32, wParam, lParam uintptr)) uint32

func AddWindowMsg

func AddWindowMsg(fn func(hwnd syscall.Handle, uMsg uint32, wParam, lParam uintptr)) uint32

func ConfigWindowGeom

func ConfigWindowGeom(hwnd syscall.Handle, pos image.Point, size image.Point) error

ConfigWindowGeom configures size and position of window

func DecodeKeyEvent

func DecodeKeyEvent(r rune, hwnd syscall.Handle, uMsg uint32, wParam, lParam uintptr) (ro rune, c key.Codes, mod int32)

func DeleteWindow

func DeleteWindow(hwnd syscall.Handle)

func Main

func Main(f func(oswin.App))

Main is called by the program's main function to run the graphical application.

It calls f on the App, possibly in a separate goroutine, as some OS- specific libraries require being on 'the main thread'. It returns when f returns.

func MoveWindowPos

func MoveWindowPos(hwnd syscall.Handle, pos image.Point) error

MoveWindowPos

func NewWindow

func NewWindow(opts *oswin.NewWindowOptions) (syscall.Handle, error)

func NullTermToString

func NullTermToString(b []byte) string

func ResizeClientRect

func ResizeClientRect(hwnd syscall.Handle, size image.Point) error

ResizeClientRect makes hwnd client rectangle given size

func ScreenSize

func ScreenSize() (width, height int)

func SendAppMessage

func SendAppMessage(uMsg uint32, wParam uintptr, lParam uintptr) (lResult uintptr)

func SendMessage

func SendMessage(hwnd syscall.Handle, uMsg uint32, wParam uintptr, lParam uintptr) (lResult uintptr)

func Show

func Show(hwnd syscall.Handle)

Show shows a newly created window. It makes the window appear on the screen, and sends an initial size event.

This is a separate step from NewWindow to give the driver a chance to setup its internal state for a window before events start being delivered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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