// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gdk" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" "github.com/bnema/puregotk/v4/gsk" ) type PopoverClass struct { _ structs.HostLayout ParentClass WidgetClass xClosed uintptr xActivateDefault uintptr Reserved [8]uintptr } func (x *PopoverClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // OverrideClosed sets the "closed" callback function. func (x *PopoverClass) OverrideClosed(cb func(*Popover)) { if cb == nil { x.xClosed = 0 } else { x.xClosed = purego.NewCallback(func(PopoverVarp uintptr) { cb(PopoverNewFromInternalPtr(PopoverVarp)) }) } } // GetClosed gets the "closed" callback function. func (x *PopoverClass) GetClosed() func(*Popover) { if x.xClosed == 0 { return nil } var rawCallback func(PopoverVarp uintptr) purego.RegisterFunc(&rawCallback, x.xClosed) return func(PopoverVar *Popover) { rawCallback(PopoverVar.GoPointer()) } } // OverrideActivateDefault sets the "activate_default" callback function. func (x *PopoverClass) OverrideActivateDefault(cb func(*Popover)) { if cb == nil { x.xActivateDefault = 0 } else { x.xActivateDefault = purego.NewCallback(func(PopoverVarp uintptr) { cb(PopoverNewFromInternalPtr(PopoverVarp)) }) } } // GetActivateDefault gets the "activate_default" callback function. func (x *PopoverClass) GetActivateDefault() func(*Popover) { if x.xActivateDefault == 0 { return nil } var rawCallback func(PopoverVarp uintptr) purego.RegisterFunc(&rawCallback, x.xActivateDefault) return func(PopoverVar *Popover) { rawCallback(PopoverVar.GoPointer()) } } // Presents a bubble-like popup. // // <picture> // // <source srcset="popover-dark.png" media="(prefers-color-scheme: dark)"> // <img alt="An example GtkPopover" src="popover.png"> // // </picture> // // It is primarily meant to provide context-dependent information // or options. Popovers are attached to a parent widget. The parent widget // must support popover children, as [class@Gtk.MenuButton] and // [class@Gtk.PopoverMenuBar] do. If you want to make a custom widget that // has an attached popover, you need to call [method@Gtk.Popover.present] // in your [vfunc@Gtk.Widget.size_allocate] vfunc, in order to update the // positioning of the popover. // // The position of a popover relative to the widget it is attached to // can also be changed with [method@Gtk.Popover.set_position]. By default, // it points to the whole widget area, but it can be made to point to // a specific area using [method@Gtk.Popover.set_pointing_to]. // // By default, `GtkPopover` performs a grab, in order to ensure input // events get redirected to it while it is shown, and also so the popover // is dismissed in the expected situations (clicks outside the popover, // or the Escape key being pressed). If no such modal behavior is desired // on a popover, [method@Gtk.Popover.set_autohide] may be called on it to // tweak its behavior. // // ## GtkPopover as menu replacement // // `GtkPopover` is often used to replace menus. The best way to do this // is to use the [class@Gtk.PopoverMenu] subclass which supports being // populated from a `GMenuModel` with [ctor@Gtk.PopoverMenu.new_from_model]. // // ```xml // <section> // // <attribute name="display-hint">horizontal-buttons</attribute> // <item> // <attribute name="label">Cut</attribute> // <attribute name="action">app.cut</attribute> // <attribute name="verb-icon">edit-cut-symbolic</attribute> // </item> // <item> // <attribute name="label">Copy</attribute> // <attribute name="action">app.copy</attribute> // <attribute name="verb-icon">edit-copy-symbolic</attribute> // </item> // <item> // <attribute name="label">Paste</attribute> // <attribute name="action">app.paste</attribute> // <attribute name="verb-icon">edit-paste-symbolic</attribute> // </item> // // </section> // ``` // // # Shortcuts and Gestures // // `GtkPopover` supports the following keyboard shortcuts: // // - <kbd>Escape</kbd> closes the popover. // - <kbd>Alt</kbd> makes the mnemonics visible. // // The following signals have default keybindings: // // - [signal@Gtk.Popover::activate-default] // // # CSS nodes // // ``` // popover.background[.menu] // ├── arrow // ╰── contents // // ╰── <child> // // ``` // // `GtkPopover` has a main node with name `popover`, an arrow with name `arrow`, // and another node for the content named `contents`. The `popover` node always // gets the `.background` style class. It also gets the `.menu` style class // if the popover is menu-like, e.g. is a [class@Gtk.PopoverMenu]. // // Particular uses of `GtkPopover`, such as touch selection popups or // magnifiers in `GtkEntry` or `GtkTextView` get style classes like // `.touch-selection` or `.magnifier` to differentiate from plain popovers. // // When styling a popover directly, the `popover` node should usually // not have any background. The visible part of the popover can have // a shadow. To specify it in CSS, set the box-shadow of the `contents` node. // // Note that, in order to accomplish appropriate arrow visuals, `GtkPopover` // uses custom drawing for the `arrow` node. This makes it possible for the // arrow to change its shape dynamically, but it also limits the possibilities // of styling it using CSS. In particular, the `arrow` gets drawn over the // `content` node's border and shadow, so they look like one shape, which // means that the border width of the `content` node and the `arrow` node should // be the same. The arrow also does not support any border shape other than // solid, no border-radius, only one border width (border-bottom-width is // used) and no box-shadow. type Popover struct { Widget } var xPopoverGLibType func() types.GType func PopoverGLibType() types.GType { return xPopoverGLibType() } func PopoverNewFromInternalPtr(ptr uintptr) *Popover { cls := &Popover{} cls.Ptr = ptr return cls } var xNewPopover func() uintptr // Creates a new `GtkPopover`. func NewPopover() *Popover { var cls *Popover cret := xNewPopover() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Popover{} cls.Ptr = cret return cls } var xPopoverGetAutohide func(uintptr) bool // Returns whether the popover is modal. // // See [method@Gtk.Popover.set_autohide] for the // implications of this. func (x *Popover) GetAutohide() bool { cret := xPopoverGetAutohide(x.GoPointer()) return cret } var xPopoverGetCascadePopdown func(uintptr) bool // Returns whether the popover will close after a modal child is closed. func (x *Popover) GetCascadePopdown() bool { cret := xPopoverGetCascadePopdown(x.GoPointer()) return cret } var xPopoverGetChild func(uintptr) uintptr // Gets the child widget of @popover. func (x *Popover) GetChild() *Widget { var cls *Widget cret := xPopoverGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xPopoverGetHasArrow func(uintptr) bool // Gets whether this popover is showing an arrow // pointing at the widget that it is relative to. func (x *Popover) GetHasArrow() bool { cret := xPopoverGetHasArrow(x.GoPointer()) return cret } var xPopoverGetMnemonicsVisible func(uintptr) bool // Gets whether mnemonics are visible. func (x *Popover) GetMnemonicsVisible() bool { cret := xPopoverGetMnemonicsVisible(x.GoPointer()) return cret } var xPopoverGetOffset func(uintptr, *int, *int) // Gets the offset previous set with [method@Gtk.Popover.set_offset]. func (x *Popover) GetOffset(XOffsetVar *int, YOffsetVar *int) { xPopoverGetOffset(x.GoPointer(), XOffsetVar, YOffsetVar) } var xPopoverGetPointingTo func(uintptr, *gdk.Rectangle) bool // Gets the rectangle that the popover points to. // // If a rectangle to point to has been set, this function will // return %TRUE and fill in @rect with such rectangle, otherwise // it will return %FALSE and fill in @rect with the parent // widget coordinates. func (x *Popover) GetPointingTo(RectVar *gdk.Rectangle) bool { cret := xPopoverGetPointingTo(x.GoPointer(), RectVar) return cret } var xPopoverGetPosition func(uintptr) PositionType // Returns the preferred position of @popover. func (x *Popover) GetPosition() PositionType { cret := xPopoverGetPosition(x.GoPointer()) return cret } var xPopoverPopdown func(uintptr) // Pops @popover down. // // This may have the side-effect of closing a parent popover // as well. See [property@Gtk.Popover:cascade-popdown]. func (x *Popover) Popdown() { xPopoverPopdown(x.GoPointer()) } var xPopoverPopup func(uintptr) // Pops @popover up. func (x *Popover) Popup() { xPopoverPopup(x.GoPointer()) } var xPopoverPresent func(uintptr) // Allocate a size for the `GtkPopover`. // // This function needs to be called in size-allocate by widgets // who have a `GtkPopover` as child. When using a layout manager, // this is happening automatically. // // To make a popover appear on screen, use [method@Gtk.Popover.popup]. func (x *Popover) Present() { xPopoverPresent(x.GoPointer()) } var xPopoverSetAutohide func(uintptr, bool) // Sets whether @popover is modal. // // A modal popover will grab the keyboard focus on it when being // displayed. Focus will wrap around within the popover. Clicking // outside the popover area or pressing Esc will dismiss the popover. // // Called this function on an already showing popup with a new // autohide value different from the current one, will cause the // popup to be hidden. func (x *Popover) SetAutohide(AutohideVar bool) { xPopoverSetAutohide(x.GoPointer(), AutohideVar) } var xPopoverSetCascadePopdown func(uintptr, bool) // If @cascade_popdown is %TRUE, the popover will be // closed when a child modal popover is closed. // // If %FALSE, @popover will stay visible. func (x *Popover) SetCascadePopdown(CascadePopdownVar bool) { xPopoverSetCascadePopdown(x.GoPointer(), CascadePopdownVar) } var xPopoverSetChild func(uintptr, uintptr) // Sets the child widget of @popover. func (x *Popover) SetChild(ChildVar *Widget) { xPopoverSetChild(x.GoPointer(), ChildVar.GoPointer()) } var xPopoverSetDefaultWidget func(uintptr, uintptr) // Sets the default widget of a `GtkPopover`. // // The default widget is the widget that’s activated when the user // presses Enter in a dialog (for example). This function sets or // unsets the default widget for a `GtkPopover`. func (x *Popover) SetDefaultWidget(WidgetVar *Widget) { xPopoverSetDefaultWidget(x.GoPointer(), WidgetVar.GoPointer()) } var xPopoverSetHasArrow func(uintptr, bool) // Sets whether this popover should draw an arrow // pointing at the widget it is relative to. func (x *Popover) SetHasArrow(HasArrowVar bool) { xPopoverSetHasArrow(x.GoPointer(), HasArrowVar) } var xPopoverSetMnemonicsVisible func(uintptr, bool) // Sets whether mnemonics should be visible. func (x *Popover) SetMnemonicsVisible(MnemonicsVisibleVar bool) { xPopoverSetMnemonicsVisible(x.GoPointer(), MnemonicsVisibleVar) } var xPopoverSetOffset func(uintptr, int, int) // Sets the offset to use when calculating the position // of the popover. // // These values are used when preparing the [struct@Gdk.PopupLayout] // for positioning the popover. func (x *Popover) SetOffset(XOffsetVar int, YOffsetVar int) { xPopoverSetOffset(x.GoPointer(), XOffsetVar, YOffsetVar) } var xPopoverSetPointingTo func(uintptr, *gdk.Rectangle) // Sets the rectangle that @popover points to. // // This is in the coordinate space of the @popover parent. func (x *Popover) SetPointingTo(RectVar *gdk.Rectangle) { xPopoverSetPointingTo(x.GoPointer(), RectVar) } var xPopoverSetPosition func(uintptr, PositionType) // Sets the preferred position for @popover to appear. // // If the @popover is currently visible, it will be immediately // updated. // // This preference will be respected where possible, although // on lack of space (eg. if close to the window edges), the // `GtkPopover` may choose to appear on the opposite side. func (x *Popover) SetPosition(PositionVar PositionType) { xPopoverSetPosition(x.GoPointer(), PositionVar) } func (c *Popover) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *Popover) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyAutohide sets the "autohide" property. // Whether to dismiss the popover on outside clicks. func (x *Popover) SetPropertyAutohide(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("autohide", &v) } // GetPropertyAutohide gets the "autohide" property. // Whether to dismiss the popover on outside clicks. func (x *Popover) GetPropertyAutohide() bool { var v gobject.Value x.GetProperty("autohide", &v) return v.GetBoolean() } // SetPropertyCascadePopdown sets the "cascade-popdown" property. // Whether the popover pops down after a child popover. // // This is used to implement the expected behavior of submenus. func (x *Popover) SetPropertyCascadePopdown(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("cascade-popdown", &v) } // GetPropertyCascadePopdown gets the "cascade-popdown" property. // Whether the popover pops down after a child popover. // // This is used to implement the expected behavior of submenus. func (x *Popover) GetPropertyCascadePopdown() bool { var v gobject.Value x.GetProperty("cascade-popdown", &v) return v.GetBoolean() } // SetPropertyHasArrow sets the "has-arrow" property. // Whether to draw an arrow. func (x *Popover) SetPropertyHasArrow(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("has-arrow", &v) } // GetPropertyHasArrow gets the "has-arrow" property. // Whether to draw an arrow. func (x *Popover) GetPropertyHasArrow() bool { var v gobject.Value x.GetProperty("has-arrow", &v) return v.GetBoolean() } // SetPropertyMnemonicsVisible sets the "mnemonics-visible" property. // Whether mnemonics are currently visible in this popover. func (x *Popover) SetPropertyMnemonicsVisible(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("mnemonics-visible", &v) } // GetPropertyMnemonicsVisible gets the "mnemonics-visible" property. // Whether mnemonics are currently visible in this popover. func (x *Popover) GetPropertyMnemonicsVisible() bool { var v gobject.Value x.GetProperty("mnemonics-visible", &v) return v.GetBoolean() } // SetPropertyPointingTo sets the "pointing-to" property. // Rectangle in the parent widget that the popover points to. func (x *Popover) SetPropertyPointingTo(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("pointing-to", &v) } // GetPropertyPointingTo gets the "pointing-to" property. // Rectangle in the parent widget that the popover points to. func (x *Popover) GetPropertyPointingTo() uintptr { var v gobject.Value x.GetProperty("pointing-to", &v) return v.GetPointer() } // Emitted whend the user activates the default widget. // // This is a [keybinding signal](class.SignalAction.html). // // The default binding for this signal is <kbd>Enter</kbd>. func (x *Popover) ConnectActivateDefault(cb *func(Popover)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "activate-default", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Popover{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "activate-default", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when the popover is closed. func (x *Popover) ConnectClosed(cb *func(Popover)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Popover{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Requests the user's screen reader to announce the given message. // // This kind of notification is useful for messages that // either have only a visual representation or that are not // exposed visually at all, e.g. a notification about a // successful operation. // // Also, by using this API, you can ensure that the message // does not interrupts the user's current screen reader output. func (x *Popover) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) { XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar) } // Retrieves the accessible parent for an accessible object. // // This function returns `NULL` for top level widgets. func (x *Popover) GetAccessibleParent() *AccessibleBase { var cls *AccessibleBase cret := XGtkAccessibleGetAccessibleParent(x.GoPointer()) if cret == 0 { return nil } cls = &AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the accessible role of an accessible object. func (x *Popover) GetAccessibleRole() AccessibleRole { cret := XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *Popover) GetAtContext() *ATContext { var cls *ATContext cret := XGtkAccessibleGetAtContext(x.GoPointer()) if cret == 0 { return nil } cls = &ATContext{} cls.Ptr = cret return cls } // Queries the coordinates and dimensions of this accessible // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get the bounds from an ignored // child widget. func (x *Popover) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool { cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar) return cret } // Retrieves the first accessible child of an accessible object. func (x *Popover) GetFirstAccessibleChild() *AccessibleBase { var cls *AccessibleBase cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer()) if cret == 0 { return nil } cls = &AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the next accessible sibling of an accessible object func (x *Popover) GetNextAccessibleSibling() *AccessibleBase { var cls *AccessibleBase cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer()) if cret == 0 { return nil } cls = &AccessibleBase{} cls.Ptr = cret return cls } // Queries a platform state, such as focus. // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get platform state from an ignored // child widget, as is the case for `GtkText` wrappers. func (x *Popover) GetPlatformState(StateVar AccessiblePlatformState) bool { cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *Popover) ResetProperty(PropertyVar AccessibleProperty) { XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *Popover) ResetRelation(RelationVar AccessibleRelation) { XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *Popover) ResetState(StateVar AccessibleState) { XGtkAccessibleResetState(x.GoPointer(), StateVar) } // Sets the parent and sibling of an accessible object. // // This function is meant to be used by accessible implementations that are // not part of the widget hierarchy, and but act as a logical bridge between // widgets. For instance, if a widget creates an object that holds metadata // for each child, and you want that object to implement the `GtkAccessible` // interface, you will use this function to ensure that the parent of each // child widget is the metadata object, and the parent of each metadata // object is the container widget. func (x *Popover) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) { XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer()) } // Updates the next accessible sibling. // // That might be useful when a new child of a custom accessible // is created, and it needs to be linked to a previous child. func (x *Popover) UpdateNextAccessibleSibling(NewSiblingVar Accessible) { XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer()) } // Informs ATs that the platform state has changed. // // This function should be used by `GtkAccessible` implementations that // have a platform state but are not widgets. Widgets handle platform // states automatically. func (x *Popover) UpdatePlatformState(StateVar AccessiblePlatformState) { XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar) } // Updates a list of accessible properties. // // See the [enum@Gtk.AccessibleProperty] documentation for the // value types of accessible properties. // // This function should be called by `GtkWidget` types whenever // an accessible property change must be communicated to assistive // technologies. // // Example: // ```c // value = gtk_adjustment_get_value (adjustment); // gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button), // // GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value, // -1); // // ``` func (x *Popover) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) { XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...) } // Updates an array of accessible properties. // // This function should be called by `GtkWidget` types whenever an accessible // property change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Popover) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) { XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar) } // Updates a list of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // If the [enum@Gtk.AccessibleRelation] requires a list of references, // you should pass each reference individually, followed by `NULL`, e.g. // // ```c // gtk_accessible_update_relation (accessible, // // GTK_ACCESSIBLE_RELATION_CONTROLS, // ref1, NULL, // GTK_ACCESSIBLE_RELATION_LABELLED_BY, // ref1, ref2, ref3, NULL, // -1); // // ``` func (x *Popover) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) { XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...) } // Updates an array of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Popover) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) { XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar) } // Updates a list of accessible states. // // See the [enum@Gtk.AccessibleState] documentation for the // value types of accessible states. // // This function should be called by `GtkWidget` types whenever // an accessible state change must be communicated to assistive // technologies. // // Example: // // ```c // value = GTK_ACCESSIBLE_TRISTATE_MIXED; // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button), // // GTK_ACCESSIBLE_STATE_CHECKED, value, // -1); // // ``` func (x *Popover) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) { XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...) } // Updates an array of accessible states. // // This function should be called by `GtkWidget` types whenever an accessible // state change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Popover) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) { XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } // Gets the ID of the @buildable object. // // `GtkBuilder` sets the name based on the ID attribute // of the `<object>` tag used to construct the @buildable. func (x *Popover) GetBuildableId() string { cret := XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // Returns the renderer that is used for this `GtkNative`. func (x *Popover) GetRenderer() *gsk.Renderer { var cls *gsk.Renderer cret := XGtkNativeGetRenderer(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &gsk.Renderer{} cls.Ptr = cret return cls } // Returns the surface of this `GtkNative`. func (x *Popover) GetSurface() *gdk.Surface { var cls *gdk.Surface cret := XGtkNativeGetSurface(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &gdk.Surface{} cls.Ptr = cret return cls } // Retrieves the surface transform of @self. // // This is the translation from @self's surface coordinates into // @self's widget coordinates. func (x *Popover) GetSurfaceTransform(XVar *float64, YVar *float64) { XGtkNativeGetSurfaceTransform(x.GoPointer(), XVar, YVar) } // Realizes a `GtkNative`. // // This should only be used by subclasses. func (x *Popover) Realize() { XGtkNativeRealize(x.GoPointer()) } // Unrealizes a `GtkNative`. // // This should only be used by subclasses. func (x *Popover) Unrealize() { XGtkNativeUnrealize(x.GoPointer()) } func init() { core.SetPackageName("GTK", "gtk4") core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GTK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xPopoverGLibType, libs, "gtk_popover_get_type") core.PuregoSafeRegister(&xNewPopover, libs, "gtk_popover_new") core.PuregoSafeRegister(&xPopoverGetAutohide, libs, "gtk_popover_get_autohide") core.PuregoSafeRegister(&xPopoverGetCascadePopdown, libs, "gtk_popover_get_cascade_popdown") core.PuregoSafeRegister(&xPopoverGetChild, libs, "gtk_popover_get_child") core.PuregoSafeRegister(&xPopoverGetHasArrow, libs, "gtk_popover_get_has_arrow") core.PuregoSafeRegister(&xPopoverGetMnemonicsVisible, libs, "gtk_popover_get_mnemonics_visible") core.PuregoSafeRegister(&xPopoverGetOffset, libs, "gtk_popover_get_offset") core.PuregoSafeRegister(&xPopoverGetPointingTo, libs, "gtk_popover_get_pointing_to") core.PuregoSafeRegister(&xPopoverGetPosition, libs, "gtk_popover_get_position") core.PuregoSafeRegister(&xPopoverPopdown, libs, "gtk_popover_popdown") core.PuregoSafeRegister(&xPopoverPopup, libs, "gtk_popover_popup") core.PuregoSafeRegister(&xPopoverPresent, libs, "gtk_popover_present") core.PuregoSafeRegister(&xPopoverSetAutohide, libs, "gtk_popover_set_autohide") core.PuregoSafeRegister(&xPopoverSetCascadePopdown, libs, "gtk_popover_set_cascade_popdown") core.PuregoSafeRegister(&xPopoverSetChild, libs, "gtk_popover_set_child") core.PuregoSafeRegister(&xPopoverSetDefaultWidget, libs, "gtk_popover_set_default_widget") core.PuregoSafeRegister(&xPopoverSetHasArrow, libs, "gtk_popover_set_has_arrow") core.PuregoSafeRegister(&xPopoverSetMnemonicsVisible, libs, "gtk_popover_set_mnemonics_visible") core.PuregoSafeRegister(&xPopoverSetOffset, libs, "gtk_popover_set_offset") core.PuregoSafeRegister(&xPopoverSetPointingTo, libs, "gtk_popover_set_pointing_to") core.PuregoSafeRegister(&xPopoverSetPosition, libs, "gtk_popover_set_position") }