// GetWindow is a wrapper around gtk_widget_get_window(). func (v *Widget) GetWindow() (*gdk.Window, error) { c := C.gtk_widget_get_window(v.native()) if c == nil { return nil, nilPtrErr } w := &gdk.Window{wrapObject(unsafe.Pointer(c))} return w, nil }
func (w *Widget) GetWindow() *gdk.Window { gw := new(gdk.Window) gw.SetPtr(glib.Pointer(C.gtk_widget_get_window(w.g()))) //gw.SetPtr(glib.Pointer(w.g().window)) return gw }
func (w *Window) GetContentPosition() (int, int) { gdkWin := C.gtk_widget_get_window(w.gtkWin) var cx, cy C.gint C.gdk_window_get_position(gdkWin, &cx, &cy) return int(cx), int(cy) }
func (w *Window) GetCairo() *cairo.Context { return cairo.WrapContext(unsafe.Pointer(C.gdk_cairo_create(C.gtk_widget_get_window(w.gtkWin)))) }