From 732a6db368c3387488f458d642354e442e21f7c2 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 11 Jul 2014 12:16:49 -0400 Subject: [PATCH] More zwinconstgen.go output refinement. --- redo/zwinconstgen.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/redo/zwinconstgen.go b/redo/zwinconstgen.go index a6faf0a..c994da3 100644 --- a/redo/zwinconstgen.go +++ b/redo/zwinconstgen.go @@ -152,6 +152,15 @@ func main() { } fmt.Fprintf(buf, "}\n") {{end}} + + // let's generate names for window procedure types + fmt.Fprintf(buf, "\n") + fmt.Fprintf(buf, "type t_UINT %s\n", winName(reflect.TypeOf(C.UINT(0)))) + fmt.Fprintf(buf, "type t_WPARAM %s\n", winName(reflect.TypeOf(C.WPARAM(0)))) + fmt.Fprintf(buf, "type t_LPARAM %s\n", winName(reflect.TypeOf(C.LPARAM(0)))) + fmt.Fprintf(buf, "type t_LRESULT %s\n", winName(reflect.TypeOf(C.LRESULT(0)))) + + // and finally done res, err := format.Source(buf.Bytes()) if err != nil { panic(err.Error() + "\n" + string(buf.Bytes())) } fmt.Printf("%s", res)