I'm trying to make a transparent GTK window to draw on; however, I can't seem to figure out how to implement this with Go using go-cairo and go-gtk. Does anyone know how this can be accomplished?
go-gtk doesn't have any window opacity functionality yet, making the task impossible unless you implement them yourself. This is evidenced by lines 1392 and 1393 of gtk.go.
As for go-cairo(which I haven't personally used) if you look at this, you'll see the functionality that is compatible with this. The Go function in questions is:
func (self *Surface) SetSourceRGBA(red, green, blue, alpha float64) {
C.cairo_set_source_rgba(self.context, C.double(red), C.double(green), C.double(blue), C.double(alpha))
}
which is the wrapper for cairo_set_source_rgba. A C-based example of this in action is available through plan99.net.
I would say that playing with alpha channels in go-cairo is the best bet right now to get the desired effect.