blob: 6ab660601bdc1e23d2d11b489b14fdddb762010d [file] [log] [blame]
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package windriver provides the Windows driver for accessing a screen.
package windriver // import ""
Implementation Details
On Windows, GUI is managed via user code and OS sending messages to
a window. These messages include paint events, input events and others.
Any thread that hosts GUI must handle incoming window messages through
a "message loop".
windriver designates the thread that calls Main as the GUI thread.
It locks this thread, creates a special window to handle screen.Screen
calls and runs message loop. All new windows are created by the
same thread, so message loop above handles all their window messages.
Some general Windows rules about thread affinity of GUI objects:
part 1: Window handles
part 2: Device contexts
part 3: Menus, icons, cursors, and accelerator tables
part 4: GDI objects and other notes on affinity
part 5: Object clean-up
How to build Windows GUI articles: