exp: golang.org/x/exp/shiny/driver/internal/win32 Index | Files

package win32

import "golang.org/x/exp/shiny/driver/internal/win32"

Package win32 implements a partial shiny screen driver using the Win32 API. It provides window, lifecycle, key, and mouse management, but no drawing. That is left to windriver (using GDI) or gldriver (using DirectX via ANGLE).

Index

Package Files

key.go syscall.go syscall_windows.go win32.go zsyscall_windows.go

Variables

var (
    MouseEvent     func(hwnd syscall.Handle, e mouse.Event)
    PaintEvent     func(hwnd syscall.Handle, e paint.Event)
    SizeEvent      func(hwnd syscall.Handle, e size.Event)
    KeyEvent       func(hwnd syscall.Handle, e key.Event)
    LifecycleEvent func(hwnd syscall.Handle, e lifecycle.Stage)
)

func AddScreenMsg Uses

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

func AddWindowMsg Uses

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

func GetDC Uses

func GetDC(hwnd syscall.Handle) (dc syscall.Handle, err error)

func Main Uses

func Main(f func()) (retErr error)

func NewWindow Uses

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

func Release Uses

func Release(hwnd syscall.Handle)

func ReleaseDC Uses

func ReleaseDC(hwnd syscall.Handle, dc syscall.Handle) (err error)

func ResizeClientRect Uses

func ResizeClientRect(hwnd syscall.Handle, opts *screen.NewWindowOptions) error

ResizeClientRect makes hwnd client rectangle opts.Width by opts.Height in size.

func SendMessage Uses

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

func SendScreenMessage Uses

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

func Show Uses

func Show(hwnd syscall.Handle)

Show shows a newly created window. It sends the appropriate lifecycle events, 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.

Package win32 imports 14 packages (graph) and is imported by 1 packages. Updated 2017-11-19 with GOOS=windows. Refresh now. Tools for package owners.