// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gdk" "github.com/bnema/puregotk/v4/gio" "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 of callback used to calculate the next page in a `GtkAssistant`. // // It’s called both for computing the next page when the user presses the // “forward” button and for handling the behavior of the “last” button. // // See [method@Gtk.Assistant.set_forward_page_func]. type AssistantPageFunc func(int, uintptr) int // Determines the role of a page inside a `GtkAssistant`. // // The role is used to handle buttons sensitivity and visibility. // // Note that an assistant needs to end its page flow with a page of type // %GTK_ASSISTANT_PAGE_CONFIRM, %GTK_ASSISTANT_PAGE_SUMMARY or // %GTK_ASSISTANT_PAGE_PROGRESS to be correct. // // The Cancel button will only be shown if the page isn’t “committed”. // See gtk_assistant_commit() for details. type AssistantPageType int var xAssistantPageTypeGLibType func() types.GType func AssistantPageTypeGLibType() types.GType { return xAssistantPageTypeGLibType() } const ( // The page has regular contents. Both the // Back and forward buttons will be shown. AssistantPageContentValue AssistantPageType = 0 // The page contains an introduction to the // assistant task. Only the Forward button will be shown if there is a // next page. AssistantPageIntroValue AssistantPageType = 1 // The page lets the user confirm or deny the // changes. The Back and Apply buttons will be shown. AssistantPageConfirmValue AssistantPageType = 2 // The page informs the user of the changes // done. Only the Close button will be shown. AssistantPageSummaryValue AssistantPageType = 3 // Used for tasks that take a long time to // complete, blocks the assistant until the page is marked as complete. // Only the back button will be shown. AssistantPageProgressValue AssistantPageType = 4 // Used for when other page types are not // appropriate. No buttons will be shown, and the application must // add its own buttons through gtk_assistant_add_action_widget(). AssistantPageCustomValue AssistantPageType = 5 ) // `GtkAssistant` is used to represent a complex as a series of steps. // // <picture> // // <source srcset="assistant-dark.png" media="(prefers-color-scheme: dark)"> // <img alt="An example GtkAssistant" src="assistant.png"> // // </picture> // // Each step consists of one or more pages. `GtkAssistant` guides the user // through the pages, and controls the page flow to collect the data needed // for the operation. // // `GtkAssistant` handles which buttons to show and to make sensitive based // on page sequence knowledge and the [enum@Gtk.AssistantPageType] of each // page in addition to state information like the *completed* and *committed* // page statuses. // // If you have a case that doesn’t quite fit in `GtkAssistant`s way of // handling buttons, you can use the %GTK_ASSISTANT_PAGE_CUSTOM page // type and handle buttons yourself. // // `GtkAssistant` maintains a `GtkAssistantPage` object for each added // child, which holds additional per-child properties. You // obtain the `GtkAssistantPage` for a child with [method@Gtk.Assistant.get_page]. // // # GtkAssistant as GtkBuildable // // The `GtkAssistant` implementation of the `GtkBuildable` interface // exposes the @action_area as internal children with the name // “action_area”. // // To add pages to an assistant in `GtkBuilder`, simply add it as a // child to the `GtkAssistant` object. If you need to set per-object // properties, create a `GtkAssistantPage` object explicitly, and // set the child widget as a property on it. // // # CSS nodes // // `GtkAssistant` has a single CSS node with the name window and style // class .assistant. type Assistant struct { Window } var xAssistantGLibType func() types.GType func AssistantGLibType() types.GType { return xAssistantGLibType() } func AssistantNewFromInternalPtr(ptr uintptr) *Assistant { cls := &Assistant{} cls.Ptr = ptr return cls } var xNewAssistant func() uintptr // Creates a new `GtkAssistant`. func NewAssistant() *Assistant { var cls *Assistant cret := xNewAssistant() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Assistant{} cls.Ptr = cret return cls } var xAssistantAddActionWidget func(uintptr, uintptr) // Adds a widget to the action area of a `GtkAssistant`. func (x *Assistant) AddActionWidget(ChildVar *Widget) { xAssistantAddActionWidget(x.GoPointer(), ChildVar.GoPointer()) } var xAssistantAppendPage func(uintptr, uintptr) int // Appends a page to the @assistant. func (x *Assistant) AppendPage(PageVar *Widget) int { cret := xAssistantAppendPage(x.GoPointer(), PageVar.GoPointer()) return cret } var xAssistantCommit func(uintptr) // Erases the visited page history. // // GTK will then hide the back button on the current page, // and removes the cancel button from subsequent pages. // // Use this when the information provided up to the current // page is hereafter deemed permanent and cannot be modified // or undone. For example, showing a progress page to track // a long-running, unreversible operation after the user has // clicked apply on a confirmation page. func (x *Assistant) Commit() { xAssistantCommit(x.GoPointer()) } var xAssistantGetCurrentPage func(uintptr) int // Returns the page number of the current page. func (x *Assistant) GetCurrentPage() int { cret := xAssistantGetCurrentPage(x.GoPointer()) return cret } var xAssistantGetNPages func(uintptr) int // Returns the number of pages in the @assistant func (x *Assistant) GetNPages() int { cret := xAssistantGetNPages(x.GoPointer()) return cret } var xAssistantGetNthPage func(uintptr, int) uintptr // Returns the child widget contained in page number @page_num. func (x *Assistant) GetNthPage(PageNumVar int) *Widget { var cls *Widget cret := xAssistantGetNthPage(x.GoPointer(), PageNumVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xAssistantGetPage func(uintptr, uintptr) uintptr // Returns the `GtkAssistantPage` object for @child. func (x *Assistant) GetPage(ChildVar *Widget) *AssistantPage { var cls *AssistantPage cret := xAssistantGetPage(x.GoPointer(), ChildVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &AssistantPage{} cls.Ptr = cret return cls } var xAssistantGetPageComplete func(uintptr, uintptr) bool // Gets whether @page is complete. func (x *Assistant) GetPageComplete(PageVar *Widget) bool { cret := xAssistantGetPageComplete(x.GoPointer(), PageVar.GoPointer()) return cret } var xAssistantGetPageTitle func(uintptr, uintptr) string // Gets the title for @page. func (x *Assistant) GetPageTitle(PageVar *Widget) string { cret := xAssistantGetPageTitle(x.GoPointer(), PageVar.GoPointer()) return cret } var xAssistantGetPageType func(uintptr, uintptr) AssistantPageType // Gets the page type of @page. func (x *Assistant) GetPageType(PageVar *Widget) AssistantPageType { cret := xAssistantGetPageType(x.GoPointer(), PageVar.GoPointer()) return cret } var xAssistantGetPages func(uintptr) uintptr // Gets a list model of the assistant pages. func (x *Assistant) GetPages() *gio.ListModelBase { var cls *gio.ListModelBase cret := xAssistantGetPages(x.GoPointer()) if cret == 0 { return nil } cls = &gio.ListModelBase{} cls.Ptr = cret return cls } var xAssistantInsertPage func(uintptr, uintptr, int) int // Inserts a page in the @assistant at a given position. func (x *Assistant) InsertPage(PageVar *Widget, PositionVar int) int { cret := xAssistantInsertPage(x.GoPointer(), PageVar.GoPointer(), PositionVar) return cret } var xAssistantNextPage func(uintptr) // Navigate to the next page. // // It is a programming error to call this function when // there is no next page. // // This function is for use when creating pages of the // %GTK_ASSISTANT_PAGE_CUSTOM type. func (x *Assistant) NextPage() { xAssistantNextPage(x.GoPointer()) } var xAssistantPrependPage func(uintptr, uintptr) int // Prepends a page to the @assistant. func (x *Assistant) PrependPage(PageVar *Widget) int { cret := xAssistantPrependPage(x.GoPointer(), PageVar.GoPointer()) return cret } var xAssistantPreviousPage func(uintptr) // Navigate to the previous visited page. // // It is a programming error to call this function when // no previous page is available. // // This function is for use when creating pages of the // %GTK_ASSISTANT_PAGE_CUSTOM type. func (x *Assistant) PreviousPage() { xAssistantPreviousPage(x.GoPointer()) } var xAssistantRemoveActionWidget func(uintptr, uintptr) // Removes a widget from the action area of a `GtkAssistant`. func (x *Assistant) RemoveActionWidget(ChildVar *Widget) { xAssistantRemoveActionWidget(x.GoPointer(), ChildVar.GoPointer()) } var xAssistantRemovePage func(uintptr, int) // Removes the @page_num’s page from @assistant. func (x *Assistant) RemovePage(PageNumVar int) { xAssistantRemovePage(x.GoPointer(), PageNumVar) } var xAssistantSetCurrentPage func(uintptr, int) // Switches the page to @page_num. // // Note that this will only be necessary in custom buttons, // as the @assistant flow can be set with // gtk_assistant_set_forward_page_func(). func (x *Assistant) SetCurrentPage(PageNumVar int) { xAssistantSetCurrentPage(x.GoPointer(), PageNumVar) } var xAssistantSetForwardPageFunc func(uintptr, uintptr, uintptr, uintptr) // Sets the page forwarding function to be @page_func. // // This function will be used to determine what will be // the next page when the user presses the forward button. // Setting @page_func to %NULL will make the assistant to // use the default forward function, which just goes to the // next visible page. func (x *Assistant) SetForwardPageFunc(PageFuncVar *AssistantPageFunc, DataVar uintptr, DestroyVar *glib.DestroyNotify) { var PageFuncVarRef uintptr if PageFuncVar != nil { PageFuncVarPtr := uintptr(unsafe.Pointer(PageFuncVar)) if cbRefPtr, ok := glib.GetCallback(PageFuncVarPtr); ok { PageFuncVarRef = cbRefPtr } else { fcb := func(arg0 int, arg1 uintptr) int { cbFn := *PageFuncVar return cbFn(arg0, arg1) } PageFuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(PageFuncVarPtr, PageFuncVarRef, PageFuncVar) } } var DestroyVarRef uintptr if DestroyVar != nil { DestroyVarPtr := uintptr(unsafe.Pointer(DestroyVar)) if cbRefPtr, ok := glib.GetCallback(DestroyVarPtr); ok { DestroyVarRef = cbRefPtr } else { fcb := func(arg0 uintptr) { cbFn := *DestroyVar cbFn(arg0) } DestroyVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(DestroyVarPtr, DestroyVarRef, DestroyVar) } } xAssistantSetForwardPageFunc(x.GoPointer(), PageFuncVarRef, DataVar, DestroyVarRef) } var xAssistantSetPageComplete func(uintptr, uintptr, bool) // Sets whether @page contents are complete. // // This will make @assistant update the buttons state // to be able to continue the task. func (x *Assistant) SetPageComplete(PageVar *Widget, CompleteVar bool) { xAssistantSetPageComplete(x.GoPointer(), PageVar.GoPointer(), CompleteVar) } var xAssistantSetPageTitle func(uintptr, uintptr, string) // Sets a title for @page. // // The title is displayed in the header area of the assistant // when @page is the current page. func (x *Assistant) SetPageTitle(PageVar *Widget, TitleVar string) { xAssistantSetPageTitle(x.GoPointer(), PageVar.GoPointer(), TitleVar) } var xAssistantSetPageType func(uintptr, uintptr, AssistantPageType) // Sets the page type for @page. // // The page type determines the page behavior in the @assistant. func (x *Assistant) SetPageType(PageVar *Widget, TypeVar AssistantPageType) { xAssistantSetPageType(x.GoPointer(), PageVar.GoPointer(), TypeVar) } var xAssistantUpdateButtonsState func(uintptr) // Forces @assistant to recompute the buttons state. // // GTK automatically takes care of this in most situations, // e.g. when the user goes to a different page, or when the // visibility or completeness of a page changes. // // One situation where it can be necessary to call this // function is when changing a value on the current page // affects the future page flow of the assistant. func (x *Assistant) UpdateButtonsState() { xAssistantUpdateButtonsState(x.GoPointer()) } func (c *Assistant) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *Assistant) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyUseHeaderBar sets the "use-header-bar" property. // %TRUE if the assistant uses a `GtkHeaderBar` for action buttons // instead of the action-area. // // For technical reasons, this property is declared as an integer // property, but you should only set it to %TRUE or %FALSE. func (x *Assistant) SetPropertyUseHeaderBar(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("use-header-bar", &v) } // GetPropertyUseHeaderBar gets the "use-header-bar" property. // %TRUE if the assistant uses a `GtkHeaderBar` for action buttons // instead of the action-area. // // For technical reasons, this property is declared as an integer // property, but you should only set it to %TRUE or %FALSE. func (x *Assistant) GetPropertyUseHeaderBar() int { var v gobject.Value x.GetProperty("use-header-bar", &v) return v.GetInt() } // Emitted when the apply button is clicked. // // The default behavior of the `GtkAssistant` is to switch to the page // after the current page, unless the current page is the last one. // // A handler for the ::apply signal should carry out the actions for // which the wizard has collected data. If the action takes a long time // to complete, you might consider putting a page of type // %GTK_ASSISTANT_PAGE_PROGRESS after the confirmation page and handle // this operation within the [signal@Gtk.Assistant::prepare] signal of // the progress page. func (x *Assistant) ConnectApply(cb *func(Assistant)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "apply", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Assistant{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "apply", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when then the cancel button is clicked. func (x *Assistant) ConnectCancel(cb *func(Assistant)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "cancel", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Assistant{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "cancel", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted either when the close button of a summary page is clicked, // or when the apply button in the last page in the flow (of type // %GTK_ASSISTANT_PAGE_CONFIRM) is clicked. func (x *Assistant) ConnectClose(cb *func(Assistant)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "close", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Assistant{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "close", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // The action signal for the Escape binding. func (x *Assistant) ConnectEscape(cb *func(Assistant)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "escape", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Assistant{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "escape", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when a new page is set as the assistant's current page, // before making the new page visible. // // A handler for this signal can do any preparations which are // necessary before showing @page. func (x *Assistant) ConnectPrepare(cb *func(Assistant, uintptr)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "prepare", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr, PageVarp uintptr) { fa := Assistant{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa, PageVarp) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "prepare", 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 *Assistant) 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 *Assistant) 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 *Assistant) GetAccessibleRole() AccessibleRole { cret := XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) GetPlatformState(StateVar AccessiblePlatformState) bool { cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *Assistant) ResetProperty(PropertyVar AccessibleProperty) { XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *Assistant) ResetRelation(RelationVar AccessibleRelation) { XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) 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 *Assistant) GetBuildableId() string { cret := XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // Returns the renderer that is used for this `GtkNative`. func (x *Assistant) 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 *Assistant) 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 *Assistant) GetSurfaceTransform(XVar *float64, YVar *float64) { XGtkNativeGetSurfaceTransform(x.GoPointer(), XVar, YVar) } // Realizes a `GtkNative`. // // This should only be used by subclasses. func (x *Assistant) Realize() { XGtkNativeRealize(x.GoPointer()) } // Unrealizes a `GtkNative`. // // This should only be used by subclasses. func (x *Assistant) Unrealize() { XGtkNativeUnrealize(x.GoPointer()) } // Returns the display that this `GtkRoot` is on. func (x *Assistant) GetDisplay() *gdk.Display { var cls *gdk.Display cret := XGtkRootGetDisplay(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &gdk.Display{} cls.Ptr = cret return cls } // Retrieves the current focused widget within the root. // // Note that this is the widget that would have the focus // if the root is active; if the root is not focused then // `gtk_widget_has_focus (widget)` will be %FALSE for the // widget. func (x *Assistant) GetFocus() *Widget { var cls *Widget cret := XGtkRootGetFocus(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } // If @focus is not the current focus widget, and is focusable, sets // it as the focus widget for the root. // // If @focus is %NULL, unsets the focus widget for the root. // // To set the focus to a particular widget in the root, it is usually // more convenient to use [method@Gtk.Widget.grab_focus] instead of // this function. func (x *Assistant) SetFocus(FocusVar *Widget) { XGtkRootSetFocus(x.GoPointer(), FocusVar.GoPointer()) } // `GtkAssistantPage` is an auxiliary object used by `GtkAssistant`. type AssistantPage struct { gobject.Object } var xAssistantPageGLibType func() types.GType func AssistantPageGLibType() types.GType { return xAssistantPageGLibType() } func AssistantPageNewFromInternalPtr(ptr uintptr) *AssistantPage { cls := &AssistantPage{} cls.Ptr = ptr return cls } var xAssistantPageGetChild func(uintptr) uintptr // Returns the child to which @page belongs. func (x *AssistantPage) GetChild() *Widget { var cls *Widget cret := xAssistantPageGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } func (c *AssistantPage) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *AssistantPage) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyComplete sets the "complete" property. // Whether all required fields are filled in. // // GTK uses this information to control the sensitivity // of the navigation buttons. func (x *AssistantPage) SetPropertyComplete(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("complete", &v) } // GetPropertyComplete gets the "complete" property. // Whether all required fields are filled in. // // GTK uses this information to control the sensitivity // of the navigation buttons. func (x *AssistantPage) GetPropertyComplete() bool { var v gobject.Value x.GetProperty("complete", &v) return v.GetBoolean() } // SetPropertyTitle sets the "title" property. // The title of the page. func (x *AssistantPage) SetPropertyTitle(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("title", &v) } // GetPropertyTitle gets the "title" property. // The title of the page. func (x *AssistantPage) GetPropertyTitle() string { var v gobject.Value x.GetProperty("title", &v) return v.GetString() } 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(&xAssistantPageTypeGLibType, libs, "gtk_assistant_page_type_get_type") core.PuregoSafeRegister(&xAssistantGLibType, libs, "gtk_assistant_get_type") core.PuregoSafeRegister(&xNewAssistant, libs, "gtk_assistant_new") core.PuregoSafeRegister(&xAssistantAddActionWidget, libs, "gtk_assistant_add_action_widget") core.PuregoSafeRegister(&xAssistantAppendPage, libs, "gtk_assistant_append_page") core.PuregoSafeRegister(&xAssistantCommit, libs, "gtk_assistant_commit") core.PuregoSafeRegister(&xAssistantGetCurrentPage, libs, "gtk_assistant_get_current_page") core.PuregoSafeRegister(&xAssistantGetNPages, libs, "gtk_assistant_get_n_pages") core.PuregoSafeRegister(&xAssistantGetNthPage, libs, "gtk_assistant_get_nth_page") core.PuregoSafeRegister(&xAssistantGetPage, libs, "gtk_assistant_get_page") core.PuregoSafeRegister(&xAssistantGetPageComplete, libs, "gtk_assistant_get_page_complete") core.PuregoSafeRegister(&xAssistantGetPageTitle, libs, "gtk_assistant_get_page_title") core.PuregoSafeRegister(&xAssistantGetPageType, libs, "gtk_assistant_get_page_type") core.PuregoSafeRegister(&xAssistantGetPages, libs, "gtk_assistant_get_pages") core.PuregoSafeRegister(&xAssistantInsertPage, libs, "gtk_assistant_insert_page") core.PuregoSafeRegister(&xAssistantNextPage, libs, "gtk_assistant_next_page") core.PuregoSafeRegister(&xAssistantPrependPage, libs, "gtk_assistant_prepend_page") core.PuregoSafeRegister(&xAssistantPreviousPage, libs, "gtk_assistant_previous_page") core.PuregoSafeRegister(&xAssistantRemoveActionWidget, libs, "gtk_assistant_remove_action_widget") core.PuregoSafeRegister(&xAssistantRemovePage, libs, "gtk_assistant_remove_page") core.PuregoSafeRegister(&xAssistantSetCurrentPage, libs, "gtk_assistant_set_current_page") core.PuregoSafeRegister(&xAssistantSetForwardPageFunc, libs, "gtk_assistant_set_forward_page_func") core.PuregoSafeRegister(&xAssistantSetPageComplete, libs, "gtk_assistant_set_page_complete") core.PuregoSafeRegister(&xAssistantSetPageTitle, libs, "gtk_assistant_set_page_title") core.PuregoSafeRegister(&xAssistantSetPageType, libs, "gtk_assistant_set_page_type") core.PuregoSafeRegister(&xAssistantUpdateButtonsState, libs, "gtk_assistant_update_buttons_state") core.PuregoSafeRegister(&xAssistantPageGLibType, libs, "gtk_assistant_page_get_type") core.PuregoSafeRegister(&xAssistantPageGetChild, libs, "gtk_assistant_page_get_child") }