shiny/driver/windriver: implement Window.Fill.

We draw in real time using GetDC. WM_PAINT is only used to
send a paint.Event. To ensure all calls to GetDC only occur on
the main thread, the painting is done using window messages.

Hopefully the code is somewhat self-explanatory. The actual
GDI muckery may appear foreign, but that's GDI for you :/

This will be the last commit that introduces new C code.
Past experience has shown that working with GDI exposes
edge cases in the Go syscall implementation, so I wanted
to get at least Window.Fill working in C so I have a known
good point to work off of. If someone doesn't beat me to it,
I'll start converting the code to pure Go tomorrow.

This introduces the condition that all drawing must be done in
response to a paint.Event. If this is not desired, it can be changed
after the C -> Go conversion.

Change-Id: Ic02669d5f7281fac3c11951ce6a590f9d23dd0a1
Reviewed-on: https://go-review.googlesource.com/13740
Reviewed-by: Nigel Tao <nigeltao@golang.org>
5 files changed