// GetDefaultGroup() is a wrapper around gdk_display_get_default_group(). func (v *Display) GetDefaultGroup() (*Window, error) { c := C.gdk_display_get_default_group(v.Native()) if c == nil { return nil, nilPtrErr } obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))} w := &Window{obj} obj.Ref() runtime.SetFinalizer(obj, (*glib.Object).Unref) return w, nil }
// GetDeviceManager() is a wrapper around gdk_display_get_device_manager(). func (v *Display) GetDeviceManager() (*DeviceManager, error) { c := C.gdk_display_get_device_manager(v.Native()) if c == nil { return nil, nilPtrErr } obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))} d := &DeviceManager{obj} obj.Ref() runtime.SetFinalizer(obj, (*glib.Object).Unref) return d, nil }
// DisplayGetDefault() is a wrapper around gdk_display_get_default(). func DisplayGetDefault() (*Display, error) { c := C.gdk_display_get_default() if c == nil { return nil, nilPtrErr } obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))} d := &Display{obj} obj.Ref() runtime.SetFinalizer(obj, (*glib.Object).Unref) return d, nil }
// GetDefaultScreen() is a wrapper around gdk_display_get_default_screen(). func (v *Display) GetDefaultScreen() (*Screen, error) { c := C.gdk_display_get_default_screen(v.Native()) if c == nil { return nil, nilPtrErr } obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))} s := &Screen{obj} obj.Ref() runtime.SetFinalizer(obj, (*glib.Object).Unref) return s, nil }
// DisplayOpen() is a wrapper around gdk_display_open(). func DisplayOpen(displayName string) (*Display, error) { cstr := C.CString(displayName) defer C.free(unsafe.Pointer(cstr)) c := C.gdk_display_open((*C.gchar)(cstr)) if c == nil { return nil, nilPtrErr } obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))} d := &Display{obj} obj.Ref() runtime.SetFinalizer(obj, (*glib.Object).Unref) return d, nil }